@reventlessdev/reventless-host-shell 3.0.0-alpha.53 → 3.0.0-alpha.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Geocoder.res-DPabxEgQ.js +7 -0
- package/dist/assets/{GraphMode.res-D7PtRXnc.js → GraphMode.res-B4riE4dd.js} +1 -1
- package/dist/assets/{MapMode.res-CEVJnyF7.js → MapMode.res-Byen0X6O.js} +1 -1
- package/dist/assets/{index-D8ZZdUvf.js → index-8UJpqCwV.js} +1 -1
- package/dist/assets/index-izXlqHwK.js +127 -0
- package/dist/mf-entry-bootstrap-0.js +1 -1
- package/package.json +5 -5
- package/dist/assets/Geocoder.res-DKcg156E.js +0 -1
- package/dist/assets/index-B708Gr2B.js +0 -127
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-B4riE4dd.js","assets/MapMode.res-Byen0X6O.js","assets/Geocoder.res-DPabxEgQ.js","assets/index-8UJpqCwV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import"./virtualExposes-DN39MDG_.js";import{d as AF}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-TJtk2Lkb.js";import{_ as $0}from"./preload-helper-BlTxHScW.js";import{_ as H7}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BzAfciYp.js";import{_ as L,a as b,b as Gr}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-hre-5-8f.js";import{a as se,b as Ae,c as cr,d as br,e as W7,f as Pt,g as en,h as We,i as Bt,j as Ox,k as G7,l as $F,m as Yi,n as J7,o as Q7,p as Y7,q as X7}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js";import{c as em,_ as St}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function Z7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{a as xp,b as eU}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Df1FMNLk.js";import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function tU(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Jt(e){return e===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:e!==null&&e.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function xa(e){if(e!=null)return Jt(e)}function nr(e){if(e===null||e.BS_PRIVATE_NESTED_SOME_NONE===void 0)return e;let t=e.BS_PRIVATE_NESTED_SOME_NONE;if(t!==0)return{BS_PRIVATE_NESTED_SOME_NONE:t-1|0}}let cg="JsExn";function rU(e){if(e.RE_EXN_ID===cg)return Jt(e._1)}function nU(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function Su(e){return nU(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let iU=["map","graph"];async function oU(e,t){switch(e){case"graph":return(await $0(()=>import("./GraphMode.res-B4riE4dd.js"),__vite__mapDeps([0])).then(o=>o.init))(t.graphLayout,void 0);case"map":let n=await $0(()=>import("./MapMode.res-Byen0X6O.js"),__vite__mapDeps([1])).then(o=>o.init),i=await $0(()=>import("./Geocoder.res-DPabxEgQ.js"),__vite__mapDeps([2])).then(o=>o.fromShell);return n(t.mapStyle,i(),void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+iU.join(", "));return}}async function aU(e){await Promise.all(e.viewModes.map(async t=>{try{return await oU(t,e)}catch(r){let n=Su(r);if(n.RE_EXN_ID===cg){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function Fh(e,t){if(e!==void 0&&t(nr(e)))return e}function ae(e,t){if(e!==void 0)return t(nr(e))}function de(e,t,r){return e!==void 0?r(nr(e)):t}function Q(e,t){if(e!==void 0)return Jt(t(nr(e)))}function R(e,t){if(e!==void 0)return t(nr(e))}function D(e,t){return e!==void 0?nr(e):t}function nd(e,t){return e!==void 0?e:t}function Ge(e){return e!==void 0}function Ui(e){return e===void 0}function sU(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function wk(e){switch(e){case"":case"/":return 0;default:let t=e.slice(1),n=t[t.length-1|0]==="/"?t.slice(0,-1):t,i=n.split("?",2),a=(i.length!==2?n:i[0]).split("/").filter(u=>u.length!==0),s=a.length-1|0,l=0;for(;;){let u=l,d=s;if(d<0)return u;l={hd:a[d],tl:u},s=d-1|0}}}function lU(e,t){let r=globalThis.window;return e!==void 0?wk(e):r!==void 0?wk(nr(r).location.pathname):0}function uU(){let e=globalThis.window;if(e===void 0)return"";let t=nr(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function kk(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function cU(e,t){let r=globalThis.window;return e!==void 0?kk(e):r!==void 0?kk(nr(r).location.search):""}function Ih(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){nr(t).pushState(null,"",e),nr(r).dispatchEvent(sU("popstate"));return}}function dU(e,t){if(e.hash!==t.hash||e.search!==t.search)return!0;{let r=e.path,n=t.path;for(;;){let i=n,o=r;if(o===0)return i!==0;if(i===0||o.hd!==i.hd)return!0;n=i.tl,r=o.tl}}}function Ny(e,t){return{path:lU(e),hash:uU(),search:cU(e)}}function fU(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(Ny(void 0));return nr(t).addEventListener("popstate",r),r}function hU(e){let t=globalThis.window;if(t!==void 0){nr(t).removeEventListener("popstate",e);return}}function pU(e,t){let r=se(()=>Ny(void 0)),n=r[1],i=r[0];return Ae(()=>{let o=fU(s=>n(l=>s)),a=Ny(void 0);return dU(a,i)&&n(s=>a),()=>hU(o)},[]),i}let dg=cr({prefix:"",path:""});function TF(e,t){return e===""||t.startsWith(e)?t:e+t}let mU=dg.Provider;function gU(e){return br(mU,{value:e.value,children:e.children})}let vU=gU,Ck="popstate";function _U(){let e=globalThis.window;return e!==void 0?nr(e).location.pathname:""}function bU(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=nr(t);return r.addEventListener(Ck,e),()=>{r.removeEventListener(Ck,e)}}function fg(e,t){return W7(bU,_U,()=>D(e,""))}function _l(){let t=Pt(dg).prefix;return r=>Ih(TF(t,r))}function yU(){let t=Pt(dg).path,r=fg(void 0);return t===""?r:t}function Ut(e,t){return e.catch(r=>t(Su(r)))}function Mx(e,t){return e<t?-1:e===t?0:1}function Bo(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function NF(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function il(e,t){if(e<=0)return[];let r=new Array(e);for(let n=0;n<e;++n)r[n]=t(n);return r}function ot(e,t,r){return e.reduce(r,t)}function xU(e,t){let r=e.findIndex(t);if(r!==-1)return r}function ie(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a);s!==void 0&&(n[i]=nr(s),i=i+1|0)}return n.length=i,n}function DF(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a,o);s!==void 0&&(n[i]=nr(s),i=i+1|0)}return n.length=i,n}function SU(e,t){let r=0;for(;;){let n=r;if(n===e.length)return;let i=t(e[n]);if(i!==void 0)return i;r=n+1|0}}function FF(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function EU(e,t){for(;;){let r=t,n=e;if(n===0)return r;let i={hd:n.hd,tl:0};r.tl=i,t=i,e=n.tl}}function wU(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return EU(e.tl,r).tl=t,r}function kU(e){let t=e,r=0;for(;;){let n=r,i=t;if(i===0)return n;r=n+1|0,t=i.tl}}function CU(e,t,r){for(;;){let n=r,i=t;if(n===0)return;e[i]=n.hd,r=n.tl,t=i+1|0}}function Lx(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}function zx(e){let t=kU(e),r=new Array(t);return CU(r,0,e),r}function RU(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function IF(e){return RU(e,0)}function AU(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function PF(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function $U(e){let t=e.length,r=0;for(let i=0;i<t;++i)r=r+e[i].length|0;let n=new Array(r);r=0;for(let i=0;i<t;++i){let o=e[i];for(let a=0,s=o.length;a<s;++a)n[r]=o[a],r=r+1|0}return n}function TU(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let OF=TU;function dc(e){return e!==void 0?e.h:0}function na(e,t,r,n){let i=dc(e),o=dc(n);return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n}}function NU(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function DU(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function Rk(e,t,r,n){let i=e!==void 0?e.h:0,o=n!==void 0?n.h:0;if(i>(o+2|0)){let l=e.l,u=e.r;return dc(l)>=dc(u)?na(l,e.k,e.v,na(u,t,r,n)):na(na(l,e.k,e.v,u.l),u.k,u.v,na(u.r,t,r,n))}if(o<=(i+2|0))return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n};let a=n.l,s=n.r;return dc(s)>=dc(a)?na(na(e,t,r,a),n.k,n.v,s):na(na(e,t,r,a.l),a.k,a.v,na(a.r,n.k,n.v,s))}function jf(e,t){return e===t?0:e<t?-1:1}function FU(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Jt(r.v);e=t<n?r.l:r.r}}function Dy(e,t,r){if(e===void 0)return NU(t,r);let n=e.k;if(t===n)return DU(e,r);let i=e.v;return t<n?Rk(Dy(e.l,t,r),n,i,e.r):Rk(e.l,n,i,Dy(e.r,t,r))}let MF=FU;function LF(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=Lx(n.split("/"));return i!==0&&i.hd===""?i.tl:i}},r=e.indexOf("?");return r===-1?t(e):r===0?0:t(e.slice(0,r))}let Fy={parsers:0,children:void 0,capture:void 0,wildcard:!1};function IU(e,t){let r=e,n=t;for(;;){let i=n,o=r,a=o.parsers,s=0;if(a!==0)s=1;else{if(i===0)return 0;s=1}if(s===1){let l=o.capture,u=0;if(i===0)return a;if(i.hd===""){if(i.tl===0)return a;u=2}else u=2;if(u===2){if(o.wildcard)return a;let d=i.tl,f=MF(o.children,i.hd);if(f!==void 0){n=d,r=f;continue}if(l===void 0)return 0;n=d,r=l;continue}}}}function PU(e,t,r){let n=(i,o)=>{if(i===0)return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:o.wildcard};let a=o.capture,s=o.children,l=i.tl,u=i.hd;if(typeof u!="object"){if(u!=="Capture")return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:!0};let f=n(l,a!==void 0?a:Fy);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=u._0,f=MF(s,d),p=n(l,f!==void 0?f:Fy);return{parsers:o.parsers,children:Dy(s,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function OU(e){return{prefix:0,matched:LF(e)}}function MU(e){return zx({hd:"",tl:e.matched}).join("/")}function LU(e){return zx({hd:"",tl:e.prefix}).join("/")}function zU(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function tm(e,t){return{TAG:"Match",_0:e,_1:t}}function Iy(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:Iy(e._1)}:{hd:"Capture",tl:Iy(e._1)}}function UU(e,t){let r=i=>e("/"+zx(i).join("/")),n=(i,o)=>{for(;;){let a=o,s=i;if(typeof a!="object")return a==="End"?s(0):d=>s(wU(d.matched,0));if(a.TAG==="Match"){let d=a._0;o=a._1,i=f=>s({hd:d,tl:f});continue}let l=a._1,u=a._0.to_;return d=>n(f=>s({hd:u(d),tl:f}),l)}};return n(r,t)}function BU(e){return UU(t=>t,e)}function jU(e,t,r){let n=e,i=t,o=0,a=r;for(;;){let s=a,l=o,u=i,d=n;if(typeof d!="object")return d==="End"?s!==0?s.hd===""&&s.tl===0?{TAG:"MatchWithTrailingSlash",_0:u}:"NoMatch":{TAG:"FullMatch",_0:u}:{TAG:"FullMatch",_0:u({prefix:IF(l),matched:s})};if(d.TAG==="Match"){if(s===0)return"NoMatch";let p=s.hd;if(d._0!==p)return"NoMatch";a=s.tl,o={hd:p,tl:l},n=d._1;continue}if(s===0)return"NoMatch";let f=s.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";a=s.tl,o={hd:f,tl:l},i=u(nr(h)),n=d._1}}function qU(e){let t=IF(e);return PF(t,Fy,(r,n)=>{let i=Iy(n._0);return PU(i,n,r)})}function VU(e,t){let r=LF(t),i=IU(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let a=o.hd,s=a._2,l=jU(a._0,a._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:s(l._0)}:{TAG:"MatchWithTrailingSlash",_0:s(l._0)};i=o.tl}}function KU(e,t){let r=VU(e,t);if(typeof r=="object")return Jt(r._0)}function zF(e){return e("End")}let UF={prefix:LU,wildcard_match:MU,of_parts:OU},HU="Wildcard",Va=BU,tc=zU;function eu(){return{}}let BF=cr({});function WU(e,t){return e+("."+t)}function GU(e,t,r,n){return e[WU(t,r)]=Va(n),e}function Py(e,t){return Object.assign(Object.assign({},e),t)}function hg(){return Pt(BF)}let JU=BF.Provider;function QU(e){return br(JU,{value:e.registry,children:e.children})}let YU={make:QU},jF={contents:{}};function XU(e){jF.contents=e}function ZU(e){return e.startsWith("/")?e.slice(1):e}function eB(e){let t=ZU(e);return Q(ot(Object.entries(jF.contents),void 0,(r,n)=>{let i=n[0];if(!t.startsWith(i+"/"))return r;let o=n[1];return r!==void 0&&r[0].length>=i.length?r:[i,o]}),r=>r[1])}function tu(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=eB(e);if(t===void 0)return e;let r=e.startsWith("/")?e:"/"+e;return(t.endsWith("/")?t.slice(0,t.length-1|0):t)+r}function tB(e){if(typeof e=="boolean")return e}function rB(e){if(e===null)return null}function nB(e){if(typeof e=="string")return e}function iB(e){if(typeof e=="number")return e}function oB(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function aB(e){if(Array.isArray(e))return e}let ve={bool:tB,$$null:rB,string:nB,float:iB,object:oB,array:aB};function O(e,t){if(t in e)return Jt(e[t])}function Qe(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i){let o=t[i];n[i]=[o,e[o]]}return n}function Ux(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i)n[i]=e[t[i]];return n}function ut(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}function it(e){let t=typeof e;return t==="string"?{TAG:"JSONString",_0:e}:t==="number"?{TAG:"JSONNumber",_0:e}:t==="boolean"?e===!0?"JSONTrue":"JSONFalse":e===null?"JSONNull":Array.isArray(e)?{TAG:"JSONArray",_0:e}:{TAG:"JSONObject",_0:e}}function ue(e){if(typeof e=="string")return e}function Bi(e){if(typeof e=="number")return e}function Y(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function _r(e){if(Array.isArray(e))return e}function Bx(e){if(typeof e=="boolean")return e}let Ak=(function(e,t){for(var r in e)t(r)});function ze(e,t){if(e===t)return!0;let r=typeof e;if(r==="string"||r==="number"||r==="bigint"||r==="boolean"||r==="undefined"||e===null)return!1;let n=typeof t;if(r==="function"||n==="function")throw{RE_EXN_ID:"Invalid_argument",_1:"equal: functional value",Error:new Error};if(n==="number"||n==="bigint"||n==="undefined"||t===null)return!1;let i=e.TAG,o=t.TAG;if(i!==o)return!1;let a=e.length|0,s=t.length|0;if(a===s)if(Array.isArray(e)){let l=0;for(;;){let u=l;if(u===a)return!0;if(!ze(e[u],t[u]))return!1;l=u+1|0}}else{if(e instanceof Date&&t instanceof Date)return!(e>t||e<t);{let l={contents:!0},u=f=>{if(!Object.prototype.hasOwnProperty.call(t,f)){l.contents=!1;return}},d=f=>{if(!Object.prototype.hasOwnProperty.call(e,f)||!ze(t[f],e[f])){l.contents=!1;return}};return Ak(e,u),l.contents&&Ak(t,d),l.contents}}else return!1}function qf(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!ze(e,t)}function Tn(e){let t=Y(e);if(t===void 0)return e;let r=O(t,"type"),n=O(t,"properties");return r!==void 0||n!==void 0?e:D(Q(ot(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:R(R(O(t,o),_r),a=>a.find(s=>qf(R(R(Y(s),l=>O(l,"type")),ue),"null")))),Tn),e)}function qF(e){return R(Y(Tn(e)),t=>{if(R(O(t,"type"),ue)==="array")return Q(O(t,"items"),Tn)})}function sB(e,t){return t.startsWith(e)}function lB(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let Qr={initial:"initial",inherit_:"inherit_",unset:"unset",toString:lB};function uB(e){return{NAME:"var",VAL:e}}function cB(e,t){return{NAME:"varDefault",VAL:[e,t]}}function $k(e){return sB("--",e)?e:"--"+e}function pg(e){if(e.NAME==="var")return"var("+$k(e.VAL)+")";let t=e.VAL;return"var("+$k(t[0])+","+t[1]+")"}function dB(e){return{NAME:"s",VAL:e}}function fB(e){return{NAME:"ms",VAL:e}}function hB(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let pB={s:dB,ms:fB,toString:hB};function jx(e){return e.VAL.toString()+"%"}function mB(e){return{NAME:"ch",VAL:e}}function gB(e){return{NAME:"em",VAL:e}}function vB(e){return{NAME:"ex",VAL:e}}function _B(e){return{NAME:"rem",VAL:e}}function bB(e){return{NAME:"vh",VAL:e}}function yB(e){return{NAME:"vw",VAL:e}}function xB(e){return{NAME:"vmin",VAL:e}}function SB(e){return{NAME:"vmax",VAL:e}}function EB(e){return{NAME:"px",VAL:e}}function wB(e){return{NAME:"pxFloat",VAL:e}}function kB(e){return{NAME:"cm",VAL:e}}function CB(e){return{NAME:"mm",VAL:e}}function RB(e){return{NAME:"inch",VAL:e}}function AB(e){return{NAME:"pc",VAL:e}}function $B(e){return{NAME:"pt",VAL:e}}function Oy(e){if(typeof e!="object")return"0";let t=e.NAME;return t==="inch"?e.VAL.toString()+"in":t==="vmax"?e.VAL.toString()+"vmax":t==="vmin"?e.VAL.toString()+"vmin":t==="percent"?e.VAL.toString()+"%":t==="ch"?e.VAL.toString()+"ch":t==="cm"?e.VAL.toString()+"cm":t==="em"?e.VAL.toString()+"em":t==="ex"?e.VAL.toString()+"ex":t==="mm"?e.VAL.toString()+"mm":t==="pc"?e.VAL.toString()+"pc":t==="pt"?e.VAL.toString()+"pt":t==="px"?e.VAL.toString()+"px":t==="vh"?e.VAL.toString()+"vh":t==="vw"?e.VAL.toString()+"vw":t==="rem"?e.VAL.toString()+"rem":e.VAL.toString()+"px"}let VF={ch:mB,em:gB,ex:vB,rem:_B,vh:bB,vw:yB,vmin:xB,vmax:SB,px:EB,pxFloat:wB,cm:kB,mm:CB,inch:RB,pc:AB,pt:$B,zero:"zero",toString:Oy};function TB(e,t){return{NAME:"min",VAL:[e,t]}}function NB(e,t){return{NAME:"max",VAL:[e,t]}}function Ro(e){if(typeof e!="object")return Oy(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+Ro(n[0])+" - "+Ro(n[1])+")"}if(t==="percent")return jx(e);if(t==="add"){let n=e.VAL;return"calc("+Ro(n[0])+" + "+Ro(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+Ro(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+Ro(n[0])+", "+Ro(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+Ro(n[0])+", "+Ro(n[1])+")"}if(t!=="mul")return Oy(e);let r=e.VAL;return"calc("+Ro(r[0])+" * "+r[1].toString()+")"}let jr={min:TB,max:NB,toString:Ro};function DB(e){let t=e.NAME;return t==="turn"?e.VAL.toString()+"turn":t==="deg"?e.VAL.toString()+"deg":t==="rad"?e.VAL.toString()+"rad":e.VAL.toString()+"grad"}function FB(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let IB={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:FB};function PB(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let KF={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:PB};function OB(e){return"auto"}let MB={auto:"auto",toString:OB};function LB(e,t){return{NAME:"steps",VAL:[e,t]}}function zB(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function UB(e){if(typeof e!="object")return e==="easeInOut"?"ease-in-out":e==="linear"?"linear":e==="jumpBoth"?"jump-both":e==="stepStart"?"step-start":e==="jumpNone"?"jump-none":e==="stepEnd"?"step-end":e==="easeIn"?"ease-in":e==="jumpEnd"?"jump-end":e==="jumpStart"?"jump-start":e==="easeOut"?"ease-out":"ease";if(e.NAME==="steps"){let r=e.VAL,n=r[0];return r[1]==="start"?"steps("+n.toString()+", start)":"steps("+n.toString()+", end)"}let t=e.VAL;return"cubic-bezier("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"}function BB(e){return e==="none"?"none":e==="circle"?"circle":e==="lowerGreek"?"lower-greek":e==="square"?"square":e==="lowerAlpha"?"lower-alpha":e==="upperAlpha"?"upper-alpha":e==="decimal"?"decimal":e==="lowerRoman"?"lower-roman":e==="lowerLatin"?"lower-latin":e==="upperRoman"?"upper-roman":e==="upperLatin"?"upper-latin":"disc"}let jB={toString:BB};function qB(e){return typeof e=="object"?e.VAL.toString():"infinite"}let VB={toString:qB};function KB(e){return e==="cell"?"cell":e==="copy"?"copy":e==="swResize"?"sw-resize":e==="grab"?"grab":e==="help"?"help":e==="move"?"move":e==="none"?"none":e==="text"?"text":e==="rowResize"?"row-resize":e==="wait"?"wait":e==="pointer"?"pointer":e==="seResize"?"se-resize":e==="zoomOut"?"zoom-out":e==="sResize"?"s-resize":e==="zoomIn"?"zoom-in":e==="grabbing"?"grabbing":e==="nsResize"?"ns-resize":e==="nwseResize"?"nwse-resize":e==="progress"?"progress":e==="crosshair"?"crosshair":e==="wResize"?"w-resize":e==="noDrop"?"no-drop":e==="allScroll"?"all-scroll":e==="verticalText"?"vertical-text":e==="nResize"?"n-resize":e==="default"?"default":e==="neswResize"?"nesw-resize":e==="alias"?"alias":e==="ewResize"?"ew-resize":e==="eResize"?"e-resize":e==="nwResize"?"nw-resize":e==="contextMenu"?"context-menu":e==="colResize"?"col-resize":e==="notAllowed"?"not-allowed":e==="neResize"?"ne-resize":"auto"}let HB={auto:"auto",$$default:"default",none:"none",contextMenu:"contextMenu",help:"help",pointer:"pointer",progress:"progress",wait:"wait",cell:"cell",crosshair:"crosshair",text:"text",verticalText:"verticalText",alias:"alias",copy:"copy",move:"move",noDrop:"noDrop",notAllowed:"notAllowed",grab:"grab",grabbing:"grabbing",allScroll:"allScroll",colResize:"colResize",rowResize:"rowResize",nResize:"nResize",eResize:"eResize",sResize:"sResize",wResize:"wResize",neResize:"neResize",nwResize:"nwResize",seResize:"seResize",swResize:"swResize",ewResize:"ewResize",nsResize:"nsResize",neswResize:"neswResize",nwseResize:"nwseResize",zoomIn:"zoomIn",zoomOut:"zoomOut",toString:KB};function WB(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function GB(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function JB(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function QB(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function YB(e){return{NAME:"hex",VAL:e}}function Tk(e){let t=e.NAME;return t==="var"||t==="varDefault"?pg(e):DB(e)}function Nk(e){let t=e.NAME;return t==="percent"?jx(e):t==="num"?e.VAL.toString():pg(e)}function Sp(e){return e.NAME==="percent"?jx(e):pg(e)}function Ep(e){if(typeof e!="object")return e==="transparent"?"transparent":"currentColor";let t=e.NAME;if(t==="rgba"){let n=e.VAL;return"rgba("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+", "+Nk(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+Tk(n[0])+", "+Sp(n[1])+", "+Sp(n[2])+")"}if(t==="rgb"){let n=e.VAL;return"rgb("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+")"}let r=e.VAL;return"hsla("+Tk(r[0])+", "+Sp(r[1])+", "+Sp(r[2])+", "+Nk(r[3])+")"}function XB(e){if(typeof e!="object"||e.NAME!=="lightDark")return Ep(e);let t=e.VAL;return"light-dark("+Ep(t[0])+", "+Ep(t[1])+")"}function ZB(e){return e==="hidden"?"hidden":e==="ridge"?"ridge":e==="solid"?"solid":e==="outset"?"outset":e==="groove"?"groove":e==="dashed"?"dashed":e==="dotted"?"dotted":e==="double"?"double":e==="inset"?"inset":"none"}let ej={toString:ZB};function tj(e){return typeof e=="object"?e.VAL.toString():"normal"}let Dk={toString:tj};function rj(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let nj={toString:rj};function ij(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let oj={toString:ij};function aj(e){return"list-item"}let sj={toString:aj};function lj(e){return e==="tableRow"?"table-row":e==="tableRowGroup"?"table-row-group":e==="tableColumn"?"table-column":e==="tableHeaderGroup"?"table-header-group":e==="tableCell"?"table-cell":e==="tableColumnGroup"?"table-column-group":e==="tableCaption"?"table-caption":"table-footer-group"}let uj={toString:lj};function cj(e){return e==="contents"?"contents":"none"}let dj={toString:cj};function fj(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let hj={toString:fj};function pj(e){return e==="left"?"left":e==="right"?"right":e==="selfEnd"?"self-end":e==="start"?"start":e==="center"?"center":e==="flexStart"?"flex-start":e==="flexEnd"?"flex-end":e==="selfStart"?"self-start":"end"}let qx={toString:pj};function mj(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let HF={toString:mj};function gj(e){return"normal"}let vj={toString:gj};function _j(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let bj={toString:_j};function yj(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let xj={toString:yj};function Sj(e){return e==="normal"?"normal":"stretch"}let Ej={toString:Sj};function wj(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let kj={toString:wj};function Cj(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let Rj={toString:Cj};function Aj(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let $j={toString:Aj};function Tj(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let Nj={toString:Tj};function Dj(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let Vx={toString:Dj};function Fj(e){return"none"}let mg={toString:Fj};function Ij(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let Kx={toString:Ij},qr={$$var:uB,varDefault:cB,toString:pg},Pj={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:LB,cubicBezier:zB,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:UB},My={rgb:WB,rgba:GB,hsl:JB,hsla:QB,hex:YB,transparent:"transparent",currentColor:"currentColor",toString:XB},Oj=mg,Mj=mg,Lj=mg,zj=mg,Uj=My.transparent;function Bj(e,t){switch(t.TAG){case"D":let r=t._1,n=t._0;n==="content"?e[n]=r===""?'""':r:e[n]=r;break;case"S":e[t._0]=Ul(t._1);break;case"PseudoClass":e[":"+t._0]=Ul(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=Ul(t._2);break}return e}function Ul(e){return OF(e,{},Bj)}function jj(e){let t=p=>e.injectRaw(p),r=(p,m)=>e.renderRaw(p,m),n=(p,m)=>e.injectRules(p,Ul(m)),i=(p,m,g)=>e.renderRules(p,m,Ul(g)),o=p=>e.make(Ul(p)),a=p=>e.mergeStyles(p),s=(p,m)=>e.mergeStyles([p,m]),l=(p,m,g)=>e.mergeStyles([p,m,g]),u=(p,m,g,v)=>e.mergeStyles([p,m,g,v]),d=p=>OF(p,{},(m,g)=>(m[g[0].toString()+"%"]=Ul(g[1]),m));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:a,merge2:s,merge3:l,merge4:u,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,m)=>e.renderKeyframes(p,d(m))}}function gg(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?qr.toString(e):jr.toString(e)}function qj(e){if(typeof e!="object")return My.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?qr.toString(e):My.toString(e)}function Vj(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?HF.toString(e):e==="normal"||e==="stretch"?Ej.toString(e):qx.toString(e)}}function Kj(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?qr.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?qx.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?HF.toString(e):kj.toString(e)}}function Hj(e){return{TAG:"D",_0:"animationDuration",_1:pB.toString(e)}}function Wj(e){return{TAG:"D",_0:"animationIterationCount",_1:VB.toString(e)}}function Gj(e){return{TAG:"D",_0:"animationTimingFunction",_1:Pj.toString(e)}}function Jj(e){return{TAG:"D",_0:"bottom",_1:gg(e)}}function Qj(e){return{TAG:"D",_0:"cursor",_1:HB.toString(e)}}function Yj(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?qr.toString(e):e==="table"||e==="grid"||e==="flex"?oj.toString(e):e==="contents"||e==="none"?dj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?hj.toString(e):e==="block"||e==="inline"||e==="runIn"?nj.toString(e):e==="listItem"?sj.toString(e):uj.toString(e)}}function Xj(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):$j.toString(e)}}function Zj(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function eq(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function tq(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?qr.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?Rj.toString(e):Qr.toString(e)}}function rq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):jr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):Kx.toString(e);return{TAG:"D",_0:"height",_1:t}}function nq(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?qr.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?bj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="normal"?vj.toString(e):qx.toString(e)}}function iq(e){return{TAG:"D",_0:"left",_1:gg(e)}}function oq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):r==="abs"?Dk.toString(e):jr.toString(e)}else t=e==="zero"?jr.toString(e):e==="normal"?Dk.toString(e):Qr.toString(e);return{TAG:"D",_0:"lineHeight",_1:t}}function aq(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):jB.toString(e)}}function ru(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):MB.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?qr.toString(e):jr.toString(e)}function sq(e){return{TAG:"D",_0:"margin",_1:ru(e)}}function lq(e,t){return{TAG:"D",_0:"margin",_1:ru(e)+(" "+ru(t))}}function uq(e){return{TAG:"D",_0:"marginLeft",_1:ru(e)}}function cq(e){return{TAG:"D",_0:"marginRight",_1:ru(e)}}function dq(e){return{TAG:"D",_0:"marginTop",_1:ru(e)}}function fq(e){return{TAG:"D",_0:"marginBottom",_1:ru(e)}}function hq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):jr.toString(e)}else t=e==="none"?Lj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):Kx.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function pq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):jr.toString(e)}else t=e==="none"?Oj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):Vx.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function mq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):jr.toString(e)}else t=e==="none"?zj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):Kx.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function gq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):jr.toString(e)}else t=e==="none"?Mj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):Vx.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function vq(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function _q(e){return{TAG:"D",_0:"overflow",_1:KF.toString(e)}}function bq(e){return{TAG:"D",_0:"overflowY",_1:KF.toString(e)}}function yq(e){return{TAG:"D",_0:"padding",_1:jr.toString(e)}}function xq(e,t){return{TAG:"D",_0:"padding",_1:jr.toString(e)+(" "+jr.toString(t))}}function Sq(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):IB.toString(e)}}function Eq(e){return{TAG:"D",_0:"right",_1:gg(e)}}function wq(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):xj.toString(e)}}function kq(e){return{TAG:"D",_0:"top",_1:gg(e)}}function Cq(e,t){return{TAG:"D",_0:e,_1:t}}function Rq(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):Nj.toString(e)}}function Aq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?qr.toString(e):jr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):e==="zero"?jr.toString(e):Vx.toString(e);return{TAG:"D",_0:"width",_1:t}}function $q(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function Tq(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function Nq(e,t){return{TAG:"S",_0:e,_1:t}}function Dq(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function Fq(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function Iq(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function Pq(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function Oq(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function Mq(e){return{TAG:"S",_0:"::placeholder",_1:e}}let Lq=VF.px;function zq(e){return typeof e=="object"?qr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Qr.toString(e):ej.toString(e)}function Uq(e,t,r){return{TAG:"D",_0:"border",_1:VF.toString(e)+" "+zq(t)+" "+qj(r)}}function Bq(e){return{TAG:"D",_0:"animationName",_1:e}}function jq(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function qq(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Vq=(function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(qq(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=jq(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),On="-ms-",rm="-moz-",Lt="-webkit-",WF="comm",Hx="rule",Wx="decl",Kq="@import",GF="@keyframes",Hq="@layer",Wq=Math.abs,vg=String.fromCharCode,Gq=Object.assign;function Jq(e,t){return Rn(e,0)^45?(((t<<2^Rn(e,0))<<2^Rn(e,1))<<2^Rn(e,2))<<2^Rn(e,3):0}function JF(e){return e.trim()}function Qq(e,t){return(e=t.exec(e))?e[0]:e}function zt(e,t,r){return e.replace(t,r)}function Ly(e,t){return e.indexOf(t)}function Rn(e,t){return e.charCodeAt(t)|0}function Vf(e,t,r){return e.slice(t,r)}function ua(e){return e.length}function Gx(e){return e.length}function wp(e,t){return t.push(e),e}function Yq(e,t){return e.map(t).join("")}var _g=1,Mc=1,QF=0,hi=0,Wr=0,id="";function bg(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:_g,column:Mc,length:a,return:""}}function zd(e,t){return Gq(bg("",null,null,"",null,null,0),e,{length:-e.length},t)}function Xq(){return Wr}function Zq(){return Wr=hi>0?Rn(id,--hi):0,Mc--,Wr===10&&(Mc=1,_g--),Wr}function Oi(){return Wr=hi<QF?Rn(id,hi++):0,Mc++,Wr===10&&(Mc=1,_g++),Wr}function _a(){return Rn(id,hi)}function T0(){return hi}function Ph(e,t){return Vf(id,e,t)}function Kf(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function YF(e){return _g=Mc=1,QF=ua(id=e),hi=0,[]}function XF(e){return id="",e}function N0(e){return JF(Ph(hi-1,zy(e===91?e+2:e===40?e+1:e)))}function eV(e){for(;(Wr=_a())&&Wr<33;)Oi();return Kf(e)>2||Kf(Wr)>3?"":" "}function tV(e,t){for(;--t&&Oi()&&!(Wr<48||Wr>102||Wr>57&&Wr<65||Wr>70&&Wr<97););return Ph(e,T0()+(t<6&&_a()==32&&Oi()==32))}function zy(e){for(;Oi();)switch(Wr){case e:return hi;case 34:case 39:e!==34&&e!==39&&zy(Wr);break;case 40:e===41&&zy(e);break;case 92:Oi();break}return hi}function rV(e,t){for(;Oi()&&e+Wr!==57;)if(e+Wr===84&&_a()===47)break;return"/*"+Ph(t,hi-1)+"*"+vg(e===47?e:Oi())}function nV(e){for(;!Kf(_a());)Oi();return Ph(e,hi)}function iV(e){return XF(D0("",null,null,null,[""],e=YF(e),0,[0],e))}function D0(e,t,r,n,i,o,a,s,l){for(var u=0,d=0,f=a,h=0,p=0,m=0,g=1,v=1,_=1,x=0,w="",E=i,C=o,k=n,A=w;v;)switch(m=x,x=Oi()){case 40:if(m!=108&&Rn(A,f-1)==58){Ly(A+=zt(N0(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:A+=N0(x);break;case 9:case 10:case 13:case 32:A+=eV(m);break;case 92:A+=tV(T0()-1,7);continue;case 47:switch(_a()){case 42:case 47:wp(oV(rV(Oi(),T0()),t,r),l);break;default:A+="/"}break;case 123*g:s[u++]=ua(A)*_;case 125*g:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+d:_==-1&&(A=zt(A,/\f/g,"")),p>0&&ua(A)-f&&wp(p>32?Ik(A+";",n,r,f-1):Ik(zt(A," ","")+";",n,r,f-2),l);break;case 59:A+=";";default:if(wp(k=Fk(A,t,r,u,d,i,s,w,E=[],C=[],f),o),x===123)if(d===0)D0(A,t,k,k,E,o,f,s,C);else switch(h===99&&Rn(A,3)===110?100:h){case 100:case 108:case 109:case 115:D0(e,k,k,n&&wp(Fk(e,k,k,0,0,i,s,w,i,E=[],f),C),i,C,f,s,n?E:C);break;default:D0(A,k,k,k,[""],C,0,s,C)}}u=d=p=0,g=_=1,w=A="",f=a;break;case 58:f=1+ua(A),p=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&Zq()==125)continue}switch(A+=vg(x),x*g){case 38:_=d>0?1:(A+="\f",-1);break;case 44:s[u++]=(ua(A)-1)*_,_=1;break;case 64:_a()===45&&(A+=N0(Oi())),h=_a(),d=f=ua(w=A+=nV(T0())),x++;break;case 45:m===45&&ua(A)==2&&(g=0)}}return o}function Fk(e,t,r,n,i,o,a,s,l,u,d){for(var f=i-1,h=i===0?o:[""],p=Gx(h),m=0,g=0,v=0;m<n;++m)for(var _=0,x=Vf(e,f+1,f=Wq(g=a[m])),w=e;_<p;++_)(w=JF(g>0?h[_]+" "+x:zt(x,/&\f/g,h[_])))&&(l[v++]=w);return bg(e,t,r,i===0?Hx:s,l,u,d)}function oV(e,t,r){return bg(e,t,r,WF,vg(Xq()),Vf(e,2,-2),0)}function Ik(e,t,r,n){return bg(e,t,r,Wx,Vf(e,0,n),Vf(e,n+1,-1),n)}function _c(e,t){for(var r="",n=Gx(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function aV(e,t,r,n){switch(e.type){case Hq:if(e.children.length)break;case Kq:case Wx:return e.return=e.return||e.value;case WF:return"";case GF:return e.return=e.value+"{"+_c(e.children,n)+"}";case Hx:e.value=e.props.join(",")}return ua(r=_c(e.children,n))?e.return=e.value+"{"+r+"}":""}function sV(e){var t=Gx(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function lV(e){return function(t){t.root||(t=t.return)&&e(t)}}function uV(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var cV=function(t,r,n){for(var i=0,o=0;i=o,o=_a(),i===38&&o===12&&(r[n]=1),!Kf(o);)Oi();return Ph(t,hi)},dV=function(t,r){var n=-1,i=44;do switch(Kf(i)){case 0:i===38&&_a()===12&&(r[n]=1),t[n]+=cV(hi-1,r,n);break;case 2:t[n]+=N0(i);break;case 4:if(i===44){t[++n]=_a()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=vg(i)}while(i=Oi());return t},fV=function(t,r){return XF(dV(YF(t),r))},Pk=new WeakMap,hV=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Pk.get(n))&&!i){Pk.set(t,!0);for(var o=[],a=fV(r,o),s=n.props,l=0,u=0;l<a.length;l++)for(var d=0;d<s.length;d++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},pV=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ZF(e,t){switch(Jq(e,t)){case 5103:return Lt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Lt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Lt+e+rm+e+On+e+e;case 6828:case 4268:return Lt+e+On+e+e;case 6165:return Lt+e+On+"flex-"+e+e;case 5187:return Lt+e+zt(e,/(\w+).+(:[^]+)/,Lt+"box-$1$2"+On+"flex-$1$2")+e;case 5443:return Lt+e+On+"flex-item-"+zt(e,/flex-|-self/,"")+e;case 4675:return Lt+e+On+"flex-line-pack"+zt(e,/align-content|flex-|-self/,"")+e;case 5548:return Lt+e+On+zt(e,"shrink","negative")+e;case 5292:return Lt+e+On+zt(e,"basis","preferred-size")+e;case 6060:return Lt+"box-"+zt(e,"-grow","")+Lt+e+On+zt(e,"grow","positive")+e;case 4554:return Lt+zt(e,/([^-])(transform)/g,"$1"+Lt+"$2")+e;case 6187:return zt(zt(zt(e,/(zoom-|grab)/,Lt+"$1"),/(image-set)/,Lt+"$1"),e,"")+e;case 5495:case 3959:return zt(e,/(image-set\([^]*)/,Lt+"$1$`$1");case 4968:return zt(zt(e,/(.+:)(flex-)?(.*)/,Lt+"box-pack:$3"+On+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Lt+e+e;case 4095:case 3583:case 4068:case 2532:return zt(e,/(.+)-inline(.+)/,Lt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ua(e)-1-t>6)switch(Rn(e,t+1)){case 109:if(Rn(e,t+4)!==45)break;case 102:return zt(e,/(.+:)(.+)-([^]+)/,"$1"+Lt+"$2-$3$1"+rm+(Rn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ly(e,"stretch")?ZF(zt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Rn(e,t+1)!==115)break;case 6444:switch(Rn(e,ua(e)-3-(~Ly(e,"!important")&&10))){case 107:return zt(e,":",":"+Lt)+e;case 101:return zt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Lt+(Rn(e,14)===45?"inline-":"")+"box$3$1"+Lt+"$2$3$1"+On+"$2box$3")+e}break;case 5936:switch(Rn(e,t+11)){case 114:return Lt+e+On+zt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Lt+e+On+zt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Lt+e+On+zt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Lt+e+On+e+e}return e}var mV=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Wx:t.return=ZF(t.value,t.length);break;case GF:return _c([zd(t,{value:zt(t.value,"@","@"+Lt)})],i);case Hx:if(t.length)return Yq(t.props,function(o){switch(Qq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _c([zd(t,{props:[zt(o,/:(read-\w+)/,":"+rm+"$1")]})],i);case"::placeholder":return _c([zd(t,{props:[zt(o,/:(plac\w+)/,":"+Lt+"input-$1")]}),zd(t,{props:[zt(o,/:(plac\w+)/,":"+rm+"$1")]}),zd(t,{props:[zt(o,/:(plac\w+)/,On+"input-$1")]})],i)}return""})}},gV=[mV],vV=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||gV,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;s.push(g)});var l,u=[hV,pV];{var d,f=[aV,lV(function(g){d.insert(g)})],h=sV(u.concat(i,f)),p=function(v){return _c(iV(v),h)};l=function(v,_,x,w){d=x,p(v?v+"{"+_.styles+"}":_.styles),w&&(m.inserted[_.name]=!0)}}var m={key:r,sheet:new Vq({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function _V(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var bV={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},yV=/[A-Z]|^ms/g,xV=/_EMO_([^_]+?)_([^]*?)_EMO_/g,eI=function(t){return t.charCodeAt(1)===45},Ok=function(t){return t!=null&&typeof t!="boolean"},t_=uV(function(e){return eI(e)?e:e.replace(yV,"-$&").toLowerCase()}),Mk=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(xV,function(n,i,o){return js={name:i,styles:o,next:js},i})}return bV[t]!==1&&!eI(t)&&typeof r=="number"&&r!==0?r+"px":r};function nm(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return js={name:i.name,styles:i.styles,next:js},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)js={name:a.name,styles:a.styles,next:js},a=a.next;var s=o.styles+";";return s}return SV(e,t,r)}}var l=r;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function SV(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=nm(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":Ok(s)&&(n+=t_(o)+":"+Mk(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)Ok(a[l])&&(n+=t_(o)+":"+Mk(o,a[l])+";");else{var u=nm(e,t,a);switch(o){case"animation":case"animationName":{n+=t_(o)+":"+u+";";break}default:n+=o+"{"+u+"}"}}}return n}var Lk=/label:\s*([^\s;{]+)\s*(;|$)/g,js;function r_(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";js=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=nm(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=nm(r,t,e[s]),n){var l=o;i+=l[s]}Lk.lastIndex=0;for(var u="",d;(d=Lk.exec(i))!==null;)u+="-"+d[1];var f=_V(i)+u;return{name:f,styles:i,next:js}}function tI(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var EV=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},wV=function(t,r,n){EV(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function zk(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Uk(e,t,r){var n=[],i=tI(e,n,r);return n.length<2?r:i+t(n)}var kV=function(t){var r=vV(t);r.sheet.speedy=function(s){this.isSpeedy=s},r.compat=!0;var n=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=r_(u,r.registered,void 0);return wV(r,f),r.key+"-"+f.name},i=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=r_(u,r.registered),h="animation-"+f.name;return zk(r,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=r_(u,r.registered);zk(r,f)},a=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return Uk(r.registered,n,CV(u))};return{css:n,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){r.inserted[u]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:tI.bind(null,r.registered),merge:Uk.bind(null,r.registered,n)}},CV=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},yg=kV({key:"css"}),RV=yg.cx,xg=yg.injectGlobal,rI=yg.keyframes,AV=yg.css;function $V(e,t){xg(t)}function TV(e,t){xg(ut([[e,t]]))}function NV(e,t,r){xg(ut([[t,r]]))}function DV(e){return rI(e)}function FV(e,t){return rI(t)}let Sg=jj({injectRaw:e=>{xg(e)},renderRaw:$V,injectRules:TV,renderRules:NV,make:e=>AV(e),mergeStyles:e=>RV(e),makeKeyframes:DV,renderKeyframes:FV}),c=Cq,Z=Vj,IV=Kj,Jx=Jj,xe=Qj,z=Yj,pe=Xj,_o=Zj,vi=eq,_i=tq,nI=rq,Ze=nq,od=iq,PV=oq,OV=aq,Sn=sq,MV=lq,Oh=uq,iI=cq,Ca=dq,Eg=fq,LV=hq,zV=pq,UV=mq,oI=gq,Ya=vq,fs=_q,BV=bq,jV=yq,qV=xq,qt=Sq,bl=Eq,hs=wq,ps=kq,aI=Rq,Ho=Aq,VV=$q,Cr=Nq,sI=Tq,lI=Dq,ms=Fq,uI=Iq,Je=Pq,cI=Oq,KV=Mq,Ce=Lq,HV=Uq,WV=Bq,GV=Hj,JV=Wj,QV=Gj,YV=Uj,XV=Sg.global,S=Sg.style,Ir=Sg.merge,ZV=Sg.keyframes,y={background:"--rv-color-background",surface:"--rv-color-surface",surfaceSubtle:"--rv-color-surface-subtle",surfaceElevated:"--rv-color-surface-elevated",brand:"--rv-color-brand",brandSubtle:"--rv-color-brand-subtle",success:"--rv-color-success",warning:"--rv-color-warning",error:"--rv-color-error",info:"--rv-color-info",textPrimary:"--rv-color-text-primary",textSecondary:"--rv-color-text-secondary",textDisabled:"--rv-color-text-disabled",textOnBrand:"--rv-color-text-on-brand",border:"--rv-color-border",borderSubtle:"--rv-color-border-subtle"},F={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},T={fontFamily:"--rv-font-family",fontFamilyMono:"--rv-font-family-mono",sizeXs:"--rv-font-size-xs",sizeSm:"--rv-font-size-sm",sizeMd:"--rv-font-size-md",sizeLg:"--rv-font-size-lg",sizeXl:"--rv-font-size-xl",sizeXxl:"--rv-font-size-xxl",weightNormal:"--rv-font-weight-normal",weightMedium:"--rv-font-weight-medium",weightBold:"--rv-font-weight-bold",lineHeightTight:"--rv-line-height-tight",lineHeightNormal:"--rv-line-height-normal",lineHeightRelaxed:"--rv-line-height-relaxed"},X={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},_n={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function no(e){return"var("+e+")"}let eK=S([z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",no(F.md)),_o(1),c("min-height","200px"),hs("center"),c("padding",no(F.xxl))]),tK=S([c("font-size","40px"),c("color",no(y.textDisabled)),c("line-height","1")]),rK=S([c("color",no(y.textPrimary)),c("font-size",no(T.sizeLg)),c("font-weight",no(T.weightMedium)),Sn(Ce(0))]),nK=S([c("color",no(y.textSecondary)),c("font-size",no(T.sizeMd)),c("max-width","360px"),Sn(Ce(0))]),iK=S([c("background",no(y.brand)),c("color",no(y.textOnBrand)),c("border","none"),c("border-radius",no(X.md)),c("padding","var("+F.sm+") var("+F.lg+")"),c("font-size",no(T.sizeMd)),c("cursor","pointer"),Ca(Ce(8))]);function oK(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[b("div",{children:"( )",className:tK}),b("h3",{children:r,className:rK}),de(e.description,null,n=>b("p",{children:n,className:nK})),de(e.action,null,n=>{let i=n[1];return b("button",{children:n[0],className:iK,onClick:o=>i()})})],className:eK})}let ad=oK;function ui(e){return"var("+e+")"}let aK=S([Ho({NAME:"percent",VAL:100}),c("border-collapse","collapse"),c("font-size",ui(T.sizeMd))]),sK=S([c("background",ui(y.surfaceSubtle)),c("border-bottom","2px solid var("+y.border+")")]),Bk=S([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",ui(y.textSecondary)),c("font-weight",ui(T.weightMedium)),c("font-size",ui(T.sizeSm)),c("text-align","left"),c("white-space","nowrap"),c("user-select","none")]),lK=S([c("padding","var("+F.sm+") var("+F.md+")"),c("font-size",ui(T.sizeMd))]),uK=S([xe("pointer"),Je([c("color",ui(y.textPrimary))])]),cK=S([c("color",ui(y.textPrimary))]),dK=S([Oh(Ce(4)),c("font-size",ui(T.sizeXs)),c("color",ui(y.brand))]),jk=S([c("border-bottom","1px solid var("+y.borderSubtle+")"),Je([c("background",ui(y.surfaceSubtle))])]),fK=S([c("min-height","44px")]),hK=S([xe("pointer")]),pK=S([c("background",ui(y.surfaceSubtle)),c("box-shadow","inset 3px 0 0 0 var("+y.brand+")")]),qk=S([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",ui(y.textPrimary)),c("vertical-align","middle")]),mK=S([c("padding","var("+F.sm+") var("+F.md+")")]),gK=S([hs("center"),c("padding",ui(F.xxl))]);function vK(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?Bk+" "+lK:Bk;return b("thead",{children:b("tr",{children:e.columns.map(i=>{let o=de(r,!1,l=>l.key===i.key),a=de(r,"Asc",l=>l.direction),s=i.sortable?n+" "+uK+(o?" "+cK:""):n;return L("th",{children:[i.label,o?b("span",{children:a==="Asc"?"^":"v",className:dK}):null],className:s,style:de(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return ae(t,u=>{let d=o&&a==="Asc"?"Desc":"Asc";u(i.key,d)})}},i.key)})}),className:sK})}function _K(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,a=e.columns,s=r!==void 0?r:"Compact",l=s==="Comfortable"?qk+" "+mK:qk,u=s==="Comfortable"?jk+" "+fK:jk;return L("table",{children:[b(vK,{columns:a,sortState:e.sortState,onSort:e.onSort,density:s}),b("tbody",{children:o.length===0?b("tr",{children:b("td",{children:D(e.emptyView,b(ad,{title:"No data"})),className:l+" "+gK,colSpan:a.length})}):o.map(d=>{let f=i(d),h=de(n,u,m=>u+" "+hK),p=ze(t,f)?h+" "+pK:h;return b("tr",{children:a.map(m=>b("td",{children:m.render(d),className:l},m.key)),className:p,onClick:m=>ae(n,g=>g(d))},f)})})],className:aK})}let im=_K;function om(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function bK(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function yK(e){let t=ie(e,i=>{if(typeof i=="object")return i._0});if(t.length===0)return e.length===0||e.some(i=>i===void 0)?void 0:"Complete";let r=t.some(i=>i!=="FromStart"),n=t.some(i=>i!=="ToEnd");return{TAG:"Partial",_0:r?n?"Between":"ToEnd":"FromStart"}}function Vk(e,t){return e.toString()+" "+t+(e===1?"":"s")}function dI(e,t,r,n){let i=n!==void 0?n:"item",o=D(r,t),a=o===t?Vk(o,i):o.toString()+" of "+Vk(t,i);if(e===void 0)return"Showing the "+a+" loaded";if(typeof e!="object")return"Showing all "+a;switch(e._0){case"FromStart":return"Showing the first "+a+" — more available";case"Between":return"Showing "+a+" — more before and after";case"ToEnd":return"Showing the last "+a+" — more before"}}function fI(e,t){return t?e+"+":e}function xK(e){return typeof e=="object"}function hI(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let pI=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function SK(e){let t={contents:5381};return e.split("").forEach(r=>{let n=D(r.codePointAt(0),0);t.contents=(t.contents*33|0)+n&2147483647}),Bo(t.contents,pI.length)}function EK(e){let t=ie(e.split(/[\s_.@-]+/),o=>o).filter(o=>o!==""),r=o=>o.slice(0,1).toUpperCase(),n=t[0],i=t[1];return n!==void 0?i!==void 0?r(n)+r(i):r(n):"?"}function n_(e){return"var("+e+")"}let wK=S([z("inlineFlex"),Z("center"),Ze("center"),c("border-radius",n_(X.full)),c("color","#ffffff"),c("font-family",n_(T.fontFamily)),c("font-weight",n_(T.weightMedium)),c("flex-shrink","0"),c("user-select","none"),c("vertical-align","middle"),c("overflow","hidden")]),kK=S([c("width","100%"),c("height","100%"),c("object-fit","cover")]);function CK(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=se(()=>!1),a=o[1],s=hI(i),l=s.toString()+"px",u=r!==void 0?r!==""&&!o[0]:!1,d={background:u?"transparent":pI[SK(n)],fontSize:((s/2|0)-1|0).toString()+"px",height:l,width:l};return b("span",{children:u?b("img",{className:kK,alt:n,src:D(r,""),onError:f=>a(h=>!0)}):EK(n),"aria-label":n,className:wK,role:"img",style:d,title:n})}let sd=CK;function Ms(e){return"var("+e+")"}let RK=S([z("flex"),_i("wrap"),c("gap",Ms(F.xs)),Z("center")]),AK=S([z("inlineFlex"),Z("center"),c("padding","2px 8px"),c("border-radius",Ms(X.full)),c("background",Ms(y.surfaceElevated)),c("color",Ms(y.textSecondary)),c("font-size",Ms(T.sizeXs)),c("font-weight",Ms(T.weightMedium)),c("line-height","1.5"),c("white-space","nowrap")]),$K=S([c("color",Ms(y.textDisabled)),c("font-size",Ms(T.sizeSm))]);function TK(e){let t=e.items;return t.length===0?b("span",{children:"—",className:$K}):b("div",{children:t.map((r,n)=>b("span",{children:r,className:AK},n.toString()+":"+r)),className:RK})}let mI=TK,NK=[["id","ID"],["ids","IDs"],["url","URL"],["uri","URI"],["api","API"],["arn","ARN"],["aws","AWS"],["iam","IAM"],["sqs","SQS"],["sns","SNS"],["uuid","UUID"],["ip","IP"],["dns","DNS"],["http","HTTP"],["https","HTTPS"],["json","JSON"],["xml","XML"],["sql","SQL"],["ui","UI"],["ux","UX"]],DK=ut(NK);function i_(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function o_(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function FK(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return!0;default:return!1}}function IK(e){let t=e.length,r=[],n={contents:""},i=()=>{if(n.contents.length>0){r.push(n.contents),n.contents="";return}};for(let o=0;o<t;++o){let a=e.charAt(o);if(a==="_"||a==="-"||a===" ")i();else if(i_(a)){let s=o>0&&o_(e.charAt(o-1|0)),l=(o+1|0)<t&&o_(e.charAt(o+1|0)),u=o>0&&i_(e.charAt(o-1|0));(s||u&&l)&&i(),n.contents=n.contents+a}else if(FK(a)){let s=!1;if(o>0){let l=e.charAt(o-1|0);s=i_(l)||o_(l)}s&&i(),n.contents=n.contents+a}else n.contents=n.contents+a}return i(),r}function PK(e){let t=e.toLowerCase(),r=O(DK,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function yt(e){let t=IK(e);return t.length!==0?t.map(PK).join(" "):e}function OK(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}function Ol(e){return"var("+e+")"}let Kk=S([z("inlineFlex"),Z("center"),c("gap","4px"),c("background","transparent"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Ol(X.sm)),c("padding","1px 6px"),c("color",Ol(y.textSecondary)),c("font-size",Ol(T.sizeXs)),c("line-height","1"),xe("pointer"),Je([c("background",Ol(y.surfaceElevated)),c("color",Ol(y.textPrimary))])]),MK=S([c("color",Ol(y.success)),c("border-color",Ol(y.success))]);function LK(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=se(()=>!1),o=i[1],a=i[0],s=u=>{u.stopPropagation(),u.preventDefault(),Ut(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=a?Kk+" "+MK:Kk;return b("button",{children:a?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:s})}let zK=LK;function am(e){return"var("+e+")"}let UK=S([z("inlineFlex"),Z("center"),c("gap",am(F.xs)),c("min-width","0")]),BK=S([c("color",am(y.brand)),c("text-decoration","none"),c("max-width","260px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Je([c("text-decoration","underline")])]),jK=S([c("color",am(y.textPrimary)),c("font-family","var(--rv-font-mono, ui-monospace, monospace)"),c("font-size",am(T.sizeSm)),c("max-width","200px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]);function qK(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function VK(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,a=_l();return L("span",{children:[i!==void 0?b("a",{children:n,className:BK,title:n,href:i,onClick:l=>{if(!(l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.button!==0)&&i!==void 0)return l.preventDefault(),l.stopPropagation(),a(i)}}):b("span",{children:qK(n,18),className:jK,title:r}),o?b(zK,{value:r}):null],className:UK})}let KK=VK;function Ka(e){return"var("+e+")"}let Hk=S([z("inlineFlex"),Z("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",Ka(X.full)),c("background",Ka(y.surfaceElevated)),c("color",Ka(y.textSecondary)),c("font-size",Ka(T.sizeXs)),c("font-weight",Ka(T.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("border","none")]),HK=S([xe("pointer"),Je([c("background",Ka(y.surface)),c("color",Ka(y.textPrimary))])]),WK=S([c("font-weight",Ka(T.weightBold)),c("color",Ka(y.textPrimary))]);function GK(e){let t=e.onClick,r=de(t,Hk,i=>Hk+" "+HK),n=L(Gr,{children:[b("span",{children:e.count.toString(),className:WK})," "+e.label,de(t,null,i=>b("span",{children:" ▸","aria-hidden":!0}))]});return t!==void 0?b("button",{children:n,className:r,type:"button",onClick:i=>t()}):b("span",{children:n,className:r})}let xf=GK;function Ud(e){let t=e.toString();return t.length<2?"0"+t:t}function wg(e){let t=new Date(e),r=t.getTime();if(Number.isNaN(r))return e;let n=t.getFullYear()|0,i=(t.getMonth()|0)+1|0,o=t.getDate()|0,a=t.getHours()|0,s=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+Ud(i)+"-"+Ud(o)+" "+Ud(a)+":"+Ud(s)+":"+Ud(l)}let JK=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function Hf(e){if(JK.test(e))return wg(e)}function QK(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function gI(e,t){if(!de(e,!1,QK))return Hf(t)}function YK(e,t){return e>t?e-t|0:0}function rc(e){return"var("+e+")"}let XK=S([z("inlineFlex"),Z("center"),c("vertical-align","middle")]),Wk=S([z("inlineFlex"),c("border-radius",rc(X.full)),c("box-shadow","0 0 0 2px var("+y.surface+")")]),ZK=S([z("inlineFlex"),Z("center"),Ze("center"),c("border-radius",rc(X.full)),c("background",rc(y.surfaceElevated)),c("color",rc(y.textSecondary)),c("font-family",rc(T.fontFamily)),c("font-weight",rc(T.weightMedium)),c("flex-shrink","0"),c("user-select","none")]);function eH(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,a=YK(n.length,o),s=a>0?n.slice(0,o):n,l=a>0?n.slice(o):[],u=hI(i),d=(-u|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((s.length+1|0)-h|0).toString()});return L("span",{children:[s.map((h,p)=>b("span",{children:b(sd,{name:h.name,src:h.imageUrl,size:i}),className:Wk,style:f(p)},p.toString())),a>0?b("span",{children:"+"+a.toString(),className:Wk+" "+ZK,style:{fontSize:((u/2|0)-2|0).toString()+"px",height:u.toString()+"px",marginLeft:d.toString()+"px",width:u.toString()+"px",zIndex:(s.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:XK})}let vI=eH;function a_(e){return"var("+e+")"}function tH(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[y.success,y.background];case"Warning":return[y.warning,y.background];case"Error":return[y.error,y.background];case"Info":return[y.info,y.background];case"Neutral":return[y.surfaceElevated,y.textSecondary]}}function rH(e,t){return S([z("inlineFlex"),Z("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",a_(X.full)),c("font-size",a_(T.sizeXs)),c("font-weight",a_(T.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("background",e.startsWith("--rv-")?"var("+e+")":e),c("color",t.startsWith("--rv-")?"var("+t+")":t)])}function nH(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=tH(n);return L("span",{children:[i?b("span",{style:{background:"currentColor",display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}):null,e.label],className:rH(o[0],o[1])})}let ns=nH,_I=cr(void 0),iH=_I.Provider;function oH(e){return br(iH,{value:e.fill,children:e.children})}let bI={make:oH};function aH(e){return R(Pt(_I),t=>t(e))}function jo(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}function sH(e){return Q(e.plugin,t=>t+"."+e.store)}let yI={isId:!1,isCompositeId:!1,isSubId:!1,isCompositeSubId:!1,index:void 0,hidden:!1,summary:!1,groupBy:!1,drillTarget:void 0,collapsed:!1,scan:!1,scanSort:!1,semantic:void 0,semanticFromType:!1,storeTarget:void 0,channel:void 0,setter:void 0};function ia(e,t){let r=Q(O(e,t),it);return r==="JSONTrue"&&typeof r!="object"}function Bd(e,t){return R(O(e,t),ue)}function lH(e){return R(R(O(e,"x-reventless-semantic-target"),Y),t=>Q(R(O(t,"store"),ue),r=>({plugin:R(O(t,"plugin"),ue),store:r})))}function uH(e){return R(R(O(e,"x-reventless-setter"),Y),t=>Q(R(O(t,"command"),ue),r=>({command:r,field:R(O(t,"field"),ue)})))}function cH(e){let t=Q(O(e,"x-reventless-index"),it);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function dH(e){let t=Y(e);if(t===void 0)return;let r=Y(Tn(e));if(r===void 0||r===t)return t;let n=ut(Qe(r));return Qe(t).forEach(i=>{n[i[0]]=i[1]}),n}function Sa(e){let t=dH(e);return t!==void 0?{isId:ia(t,"x-reventless-id"),isCompositeId:ia(t,"x-reventless-compositeId"),isSubId:ia(t,"x-reventless-subId"),isCompositeSubId:ia(t,"x-reventless-compositeSubId"),index:cH(t),hidden:ia(t,"x-reventless-hidden"),summary:ia(t,"x-reventless-summary"),groupBy:ia(t,"x-reventless-group-by"),drillTarget:Q(Bd(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:Bd(t,"x-reventless-drillTargetKey")})),collapsed:ia(t,"x-reventless-collapsed"),scan:ia(t,"x-reventless-scan"),scanSort:ia(t,"x-reventless-scanSort"),semantic:Bd(t,"x-reventless-semantic"),semanticFromType:ze(Bd(t,"x-reventless-semantic-source"),"type"),storeTarget:lH(t),channel:Bd(t,"x-reventless-channel"),setter:uH(t)}:yI}function Mh(e,t){return D(Q(R(R(Y(e),r=>O(r,"properties")),Y),r=>ie(Qe(r),n=>{if(t(Sa(n[1])))return n[0]})),[])}function fH(e){return D(Q(R(R(Y(e),t=>O(t,"properties")),Y),t=>ie(Qe(t),r=>{let n=r[0];return R(R(R(Y(r[1]),i=>O(i,"x-reventless-metric")),Y),i=>{let o=R(O(i,"aggregate"),ue),a=R(O(i,"label"),ue);return Q(o,s=>[n,s,a])})})),[])}function kg(e){return Mh(e,t=>t.summary)}function hH(e){return Mh(e,t=>t.isId)[0]}function pH(e){return Mh(e,t=>t.groupBy)[0]}function Qx(e){return Mh(e,t=>t.isCompositeId)}function Yx(e){return Mh(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function mH(e){return R(R(Y(e),t=>O(t,"x-reventless-live")),t=>{let r=it(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function xI(e){return R(R(Y(e),t=>O(t,"x-reventless-viewmode")),ue)}function gH(e){return R(R(Y(e),t=>O(t,"x-reventless-layout")),ue)}function Eu(e){return R(Q(R(R(Y(Tn(e)),t=>O(t,"enum")),_r),t=>ie(t,ue)),t=>{if(t.length!==0)return t})}function Wo(e,t){return D(R(R(R(R(Y(e),r=>O(r,"properties")),Y),r=>O(r,t)),Eu),[])}function ld(e){switch(e){case"Email":return"email";case"Phone":return"phone";case"Url":return"url";case"DateTime":return"date-time";case"Currency":return"currency";case"Percent":return"percent";case"Bytes":return"bytes";case"Duration":return"duration";case"Color":return"color";case"Image":return"image";case"Status":return"status";case"GeoLat":return"geo-lat";case"GeoLng":return"geo-lng";case"GeoPoint":return"geo-point";case"Label":return"label";case"UserRef":return"user-ref";case"File":return"file";case"Markdown":return"markdown";case"ChannelText":return"channel-text";case"Rating":return"rating";case"Progress":return"progress";case"FileUrl":return"file-url";case"Country":return"country";case"Address":return"address";case"Qr":return"qr";case"Barcode":return"barcode";case"Signature":return"signature";case"ParentRef":return"parent-ref";case"Money":return"money";case"DateRange":return"date-range"}}let vH=["Email","Phone","Url","DateTime","Currency","Percent","Bytes","Duration","Color","Image","Status","GeoLat","GeoLng","GeoPoint","Label","UserRef","File","Markdown","ChannelText","Rating","Progress","FileUrl","Country","Address","Qr","Barcode","Signature","ParentRef","Money","DateRange"],_H="storageRef";function Xx(e){switch(e){case"address":return"Address";case"barcode":return"Barcode";case"bytes":return"Bytes";case"channel-text":return"ChannelText";case"color":return"Color";case"country":return"Country";case"currency":return"Currency";case"date-time":return"DateTime";case"date-range":case"dateRange":return"DateRange";case"duration":return"Duration";case"email":return"Email";case"file":return"File";case"file-url":return"FileUrl";case"geo-lat":return"GeoLat";case"geo-lng":return"GeoLng";case"geo-point":case"geoPoint":return"GeoPoint";case"image":return"Image";case"label":return"Label";case"markdown":return"Markdown";case"money":return"Money";case"parent-ref":return"ParentRef";case"percent":return"Percent";case"phone":return"Phone";case"progress":return"Progress";case"qr":return"Qr";case"rating":return"Rating";case"signature":return"Signature";case"status":return"Status";case"url":return"Url";case"user-ref":return"UserRef";default:return}}function SI(e){switch(e){case"Image":return["Illustrable"];case"Status":return["Stageable"];case"GeoPoint":return["Mappable"];case"ParentRef":return["Hierarchical"];case"Money":return["Measure"];case"DateRange":return["Schedulable"];default:return[]}}function EI(e,t){return R(R(O(e,t),ue),r=>{if(r!=="")return r})}function wI(e,t,r){return R(R(R(R(O(e,t),Y),n=>O(n,r)),ue),n=>{if(n!=="")return n})}function wu(e,t){return e.TAG==="Pair"?EI(t,e.startField):wI(t,e._0,"start")}function Zx(e,t){if(e.TAG!=="Pair")return wI(t,e._0,"end");let r=e.endField;if(r!==void 0)return EI(t,r)}function kI(e){return e.TAG==="Pair"?e.endField!==void 0:!0}function Gk(e,t){let r=O(e,t);if(r===void 0)return;let n=Bi(r);return n!==void 0?n:R(ue(r),jo)}function Jk(e,t,r){return R(R(R(O(e,t),Y),n=>O(n,r)),Bi)}function C7e(e,t){let r;if(e.TAG==="Paired")r=[Gk(t,e.latField),Gk(t,e.lngField)];else{let o=e._0;r=[Jk(t,o,"lat"),Jk(t,o,"lng")]}let n=r[1],i=r[0];if(i!==void 0&&n!==void 0)return[i,n]}function $r(e){return D(Q(R(R(Y(Tn(e)),t=>O(t,"properties")),Y),Qe),[]).map(t=>[t[0],Tn(t[1])])}function Dr(e,t){return R(R(Y(Tn(e)),r=>O(r,t)),ue)}function bH(e){return Dr(e,"type")}function is(e){let t=Dr(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function Lh(e){return ze(Dr(e,"type"),"string")}function Cg(e){let t=Dr(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let CI=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function RI(e){return CI.includes(e.toLowerCase())}function sm(e,t){return t.some(r=>e.endsWith(r))}function yH(e){return sm(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function xH(e){let t=Dr(e,"format");if(t!==void 0)switch(t){case"date":case"date-time":return["DateTime","format:date-time"];case"email":return["Email","format:email"];case"uri":case"url":return["Url","format:uri"];default:return}}function Qk(e){return de(Eu(e),0,t=>t.length)}function Wf(e,t){return R(R(Y(Tn(e)),r=>O(r,t)),Bi)}function SH(e,t){if(!is(t))return;let r=Wf(t,"maximum");return["rating","stars","starrating"].includes(e)?r!==void 0&&r>10?void 0:["Rating","name:rating"]:e==="score"&&r!==void 0&&r<=10?["Rating","name:score-scale"]:void 0}let EH=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function wH(e){let t=$r(e),r=(n,i)=>t.some(o=>o[0].toLowerCase()===n?i(o[1]):!1);return r("amount",is)?r("currency",Lh):!1}function kH(e){let t=$r(e),r=n=>t.some(i=>{let o=i[1];return i[0].toLowerCase()===n&&ze(Dr(o,"type"),"string")?Cg(o):!1});return r("start")?r("end"):!1}function CH(e){let t=$r(e);return EH.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let RH=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function AH(e){return RH.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function $H(e,t){let r=e.toLowerCase(),n=SH(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&Qk(t)>0?Qk(t)<=8?["Status","name:status-enum"]:void 0:ze(Dr(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:is(t)&&sm(r,["price","amount","total"])?["Currency","name:currency"]:ze(Dr(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:ze(Dr(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:ze(Dr(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:ze(Dr(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||sm(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:is(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:ze(Dr(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:ze(Dr(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:ze(Dr(t,"type"),"string")&&AH(r)?["ParentRef","name:parent-ref"]:ze(Dr(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:ze(Dr(t,"type"),"string")&&CI.includes(r)?["UserRef","name:user"]:void 0}function AI(e){return["lat","latitude"].includes(e)}function $I(e){return["lng","lon","long","longitude"].includes(e)}function TH(e){let t=$r(e),r=t.some(i=>AI(i[0].toLowerCase())?is(i[1]):!1),n=t.some(i=>$I(i[0].toLowerCase())?is(i[1]):!1);return r?n:!1}function NH(e){return["createdat","updatedat","deletedat"].includes(e)}let Yk={contents:[]};function TI(e,t,r){let n=e+"."+t+"."+r;if(Yk.contents.some(o=>o===n))return;Yk.contents.push(n);let i=vH.map(ld).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function Lc(e,t){let r=Tn(t),n=Sa(r),i=n.semanticFromType?"Type":"Annotation",o=ze(n.semantic,_H),a=R(n.semantic,d=>{if(o)return;let f=Xx(d);if(f!==void 0)return{semantic:f,provenance:i};TI("x-reventless-semantic",e,d)});if(a!==void 0)return a;let s=e.toLowerCase(),l=ze(Dr(r,"type"),"object")&&wH(r)?["Money","shape:money"]:ze(Dr(r,"type"),"object")&&kH(r)?["DateRange","shape:date-range"]:ze(Dr(r,"type"),"object")&&CH(r)?["Address","shape:address"]:ze(Dr(r,"type"),"object")&&TH(r)?["GeoPoint","shape:geo-point"]:AI(s)&&is(r)?["GeoLat","name:geo-pair"]:$I(s)&&is(r)?["GeoLng","name:geo-pair"]:void 0,u;if(l!==void 0)u=l;else if(ze(Dr(r,"type"),"string")&&yH(s))u=["FileUrl","name:file-url"];else{let d=xH(r);u=d!==void 0?d:$H(e,r)}return nd(Q(u,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function DH(e,t){let r=Lc(e,t);return r!==void 0?r:R(qF(t),n=>Lc(OK(e),n))}function Nn(e,t,r){let n=$r(e),i={};n.forEach(k=>{let A=k[0],$=R(R(t,N=>O(N,A)),N=>{let M=Xx(N);if(M!==void 0)return{semantic:M,provenance:"Hint"};TI("uiHints.fields",A,N)});if($!==void 0){i[A]=$;return}else return ae(Lc(A,k[1]),N=>{i[A]=N})});let o=k=>n.map(A=>A[0]).find(A=>de(O(i,A),!1,$=>$.semantic===k)),a=k=>n.map(A=>A[0]).find(A=>de(O(i,A),!1,$=>SI($.semantic).includes(k))),s=R(Fh(r,k=>k.field!=="id"),k=>Q(n.find(A=>A[0]===k.field?ze(Dr(A[1],"type"),"string"):!1),A=>A[0])),l=de(r,!1,k=>ze(k.source,"annotation")),u=n.map(k=>k[0]).find(k=>de(O(i,k),!1,A=>A.semantic==="Label"?A.provenance==="Hint":!1)),d;if(u!==void 0)d=u;else{let k=0;if(s!==void 0&&l?d=s:k=1,k===1){let A=o("Label");d=A!==void 0?A:s}}if(d!==void 0&&s!==void 0&&d===s){let A={semantic:"Label",provenance:l?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},$=O(i,d);if($!==void 0){let N=0,M=$.provenance;(typeof M=="object"||M!=="Hint")&&(N=1),N===1&&$.semantic==="Label"&&(i[d]=A)}else i[d]=A}let f=a("Mappable"),h=o("GeoLat"),p=o("GeoLng"),g=f!==void 0?{TAG:"Pointed",_0:f}:h!==void 0&&p!==void 0?{TAG:"Paired",latField:h,lngField:p}:void 0,v=a("Schedulable"),_=ie(n,k=>{let A=k[0];if(de(O(i,A),!1,$=>$.semantic==="DateTime")||Cg(k[1]))return A}),x=_.find(k=>k.toLowerCase().startsWith("start")),w=_.find(k=>k.toLowerCase().startsWith("end")),E=x!==void 0?w!==void 0?{TAG:"Pair",startField:x,endField:w}:{TAG:"Pair",startField:x}:Q(_.find(k=>{let A=k.toLowerCase();return NH(A)?!1:sm(A,["at","date"])?!0:A==="date"}),k=>({TAG:"Pair",startField:k}));return{semantics:i,geo:g,dateSpan:v!==void 0?{TAG:"Ranged",_0:v}:E,statusField:a("Stageable"),labelField:d,imageField:a("Illustrable"),parentField:a("Hierarchical")}}function FH(e,t){let n=Nn(e,t,void 0).semantics;return ie($r(e),i=>{let o=i[0];return R(O(n,o),a=>{if(SI(a.semantic).includes("Measure"))return o})})}let NI=cr([]),DI=cr(e=>{}),IH=NI.Provider,PH=DI.Provider;function OH(e){let t=e.initial,r=t!==void 0?t:[],n=se(()=>r),i=n[1],o=en(a=>i(s=>a),[]);return br(PH,{value:o,children:br(IH,{value:n[0],children:e.children})})}let MH={make:OH};function Ra(){return Pt(NI)}function LH(){return Pt(DI)}function zH(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function UH(e){return e.endsWith("s")?e:e+"s"}function gs(e,t){let r=zH(t),n=UH(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function Fs(e,t){return zF(r=>tm(e,tm(encodeURIComponent(t),r)))}function nc(e,t){return tm(e,tm(encodeURIComponent(t),HU))}function os(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return Va(nc(e,t))(UF.of_parts(i.join("/")))}function BH(e){let r=UF.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=Q(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}var Ml=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Ml||{});const jH=[0,1],FI=[1,0],II=[2,3],PI=[3,2],qH={L:jH,M:FI,Q:II,H:PI},VH=/^\d*$/,KH=/^[A-Z0-9 $%*+./:-]*$/,s_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",eS=1,tS=40,Xk=3,HH=3,kp=40,WH=10,OI=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],MI=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];let GH=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<eS||t>tS)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const o=Array.from({length:this.size}).fill(!1);for(let s=0;s<this.size;s++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),i===-1){let s=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u<s&&(i=l,s=u),this.applyMask(l)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}size;mask;modules=[];types=[];getModule(t,r){return t>=0&&t<this.size&&r>=0&&r<this.size&&this.modules[r][t]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,Ml.Timing),this.setFunctionModule(n,6,n%2===0,Ml.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),r=t.length;for(let n=0;n<r;n++)for(let i=0;i<r;i++)n===0&&i===0||n===0&&i===r-1||n===r-1&&i===0||this.drawAlignmentPattern(t[n],t[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const r=this.ecc[1]<<3|t;let n=r;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const i=(r<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,Pa(i,o));this.setFunctionModule(8,7,Pa(i,6)),this.setFunctionModule(8,8,Pa(i,7)),this.setFunctionModule(7,8,Pa(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,Pa(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,Pa(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,Pa(i,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let n=0;n<12;n++)t=t<<1^(t>>>11)*7973;const r=this.version<<12|t;for(let n=0;n<18;n++){const i=Pa(r,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,i),this.setFunctionModule(a,o,i)}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){const o=Math.max(Math.abs(i),Math.abs(n)),a=t+i,s=r+n;a>=0&&a<this.size&&s>=0&&s<this.size&&this.setFunctionModule(a,s,o!==2&&o!==4,Ml.Position)}}drawAlignmentPattern(t,r){for(let n=-2;n<=2;n++)for(let i=-2;i<=2;i++)this.setFunctionModule(t+i,r+n,Math.max(Math.abs(i),Math.abs(n))!==1,Ml.Alignment)}setFunctionModule(t,r,n,i=Ml.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==F0(r,n))throw new RangeError("Invalid argument");const i=MI[n[0]][r],o=OI[n[0]][r],a=Math.floor(Uy(r)/8),s=i-a%i,l=Math.floor(a/i),u=[],d=nW(o);for(let h=0,p=0;h<i;h++){const m=t.slice(p,p+l-o+(h<s?0:1));p+=m.length;const g=iW(m,d);h<s&&m.push(0),u.push(m.concat(g))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,m)=>{(h!==l-o||m>=s)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(Uy(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){const a=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][a]&&r<t.length*8&&(this.modules[l][a]=Pa(t[r>>>3],7-(r&7)),r++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let n=0;n<this.size;n++){let i;switch(t){case 0:i=(n+r)%2===0;break;case 1:i=r%2===0;break;case 2:i=n%3===0;break;case 3:i=(n+r)%3===0;break;case 4:i=(Math.floor(n/3)+Math.floor(r/2))%2===0;break;case 5:i=n*r%2+n*r%3===0;break;case 6:i=(n*r%2+n*r%3)%2===0;break;case 7:i=((n+r)%2+n*r%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[r][n]&&i&&(this.modules[r][n]=!this.modules[r][n])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[o][u]===a?(s++,s===5?t+=Xk:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*kp),a=this.modules[o][u],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*kp}for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][o]===a?(s++,s===5?t+=Xk:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*kp),a=this.modules[u][o],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*kp}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const s=this.modules[o][a];s===this.modules[o][a+1]&&s===this.modules[o+1][a]&&s===this.modules[o+1][a+1]&&(t+=HH)}let r=0;for(const o of this.modules)r=o.reduce((a,s)=>a+(s?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*WH,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,r=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,n=[6];for(let i=this.size-7;n.length<t;i-=r)n.splice(1,0,i);return n}}finderPenaltyCountPatterns(t){const r=t[1],n=r>0&&t[2]===r&&t[3]===r*3&&t[4]===r&&t[5]===r;return(n&&t[0]>=r*4&&t[6]>=r?1:0)+(n&&t[6]>=r*4&&t[0]>=r?1:0)}finderPenaltyTerminateAndCount(t,r,n){return t&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(t,r){r[0]===0&&(t+=this.size),r.pop(),r.unshift(t)}};function Ha(e,t,r){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function Pa(e,t){return(e>>>t&1)!==0}class rS{constructor(t,r,n){if(this.mode=t,this.numChars=r,this.bitData=n,r<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const JH=[1,10,12,14],QH=[2,9,11,13],YH=[4,8,16,16];function LI(e,t){return e[Math.floor((t+7)/17)+1]}function zI(e){const t=[];for(const r of e)Ha(r,8,t);return new rS(YH,e.length,t)}function XH(e){if(!UI(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let r=0;r<e.length;){const n=Math.min(e.length-r,3);Ha(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new rS(JH,e.length,t)}function ZH(e){if(!BI(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let r;for(r=0;r+2<=e.length;r+=2){let n=s_.indexOf(e.charAt(r))*45;n+=s_.indexOf(e.charAt(r+1)),Ha(n,11,t)}return r<e.length&&Ha(s_.indexOf(e.charAt(r)),6,t),new rS(QH,e.length,t)}function eW(e){return e===""?[]:UI(e)?[XH(e)]:BI(e)?[ZH(e)]:[zI(rW(e))]}function UI(e){return VH.test(e)}function BI(e){return KH.test(e)}function tW(e,t){let r=0;for(const n of e){const i=LI(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function rW(e){e=encodeURI(e);const t=[];for(let r=0;r<e.length;r++)e.charAt(r)!=="%"?t.push(e.charCodeAt(r)):(t.push(Number.parseInt(e.substring(r+1,r+3),16)),r+=2);return t}function Uy(e){if(e<eS||e>tS)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}function F0(e,t){return Math.floor(Uy(e)/8)-OI[t[0]][e]*MI[t[0]][e]}function nW(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let r=1;for(let n=0;n<e;n++){for(let i=0;i<t.length;i++)t[i]=By(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=By(r,2)}return t}function iW(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,a)=>r[a]^=By(o,i))}return r}function By(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r}function oW(e,t,r=1,n=40,i=-1,o=!0){if(!(eS<=r&&r<=n&&n<=tS)||i<-1||i>7)throw new RangeError("Invalid value");let a,s;for(a=r;;a++){const f=F0(a,t)*8,h=tW(e,a);if(h<=f){s=h;break}if(a>=n)throw new RangeError("Data too long")}for(const f of[FI,II,PI])o&&s<=F0(a,f)*8&&(t=f);const l=[];for(const f of e){Ha(f.mode[0],4,l),Ha(f.numChars,LI(f.mode,a),l);for(const h of f.getData())l.push(h)}const u=F0(a,t)*8;Ha(0,Math.min(4,u-l.length),l),Ha(0,(8-l.length%8)%8,l);for(let f=236;l.length<u;f^=253)Ha(f,8,l);const d=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new GH(a,t,d,i)}function aW(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:a=-1,border:s=1}=t||{},l=typeof e=="string"?eW(e):Array.isArray(e)?[zI(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=oW(l,qH[r],i,o,a,n),d=sW({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},s);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function sW(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let a=0;a<t;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},a=>!1)),e.data.push(Array.from({length:n},a=>!1));const i=Ml.Border;e.types.forEach(o=>{for(let a=0;a<t;a++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},a=>i)),e.types.push(Array.from({length:n},a=>i));return e}function lW(e){return"var("+e+")"}let uW=S([z("inlineBlock"),c("background","#ffffff"),c("padding","6px"),c("border-radius",lW(X.md)),c("border","1px solid var("+y.borderSubtle+")"),c("line-height","0")]),cW=S([c("color","#000000"),c("display","block")]);function dW(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function fW(e){if(e.trim()!=="")try{return aW(e,{ecc:"M",border:4})}catch{return}}function hW(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=fW(r);if(i===void 0)return null;let o=i.size.toString();return b("span",{children:b("svg",{children:b("path",{d:dW(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:cW,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:uW})}let pW=hW,mW=["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","1100011101011"];function Zk(e){return e>="0"?e<="9":!1}function gW(e){let t=[],r=0,n=e.length;for(;r<n;)if(Zk(D(e[r],""))){let i=r;for(;r<n&&Zk(D(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function vW(e){let t={};return gW(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,a=n-o|0;if(a<=0)return;let s=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(a/2|0)|0)+(s?0:1)|0)<n){t[(i+o|0).toString()]=a;return}}),t}function _W(e){let t=e.length;if(t===0||e.split("").some(l=>{let u=D(l.codePointAt(0),0);return u<32?!0:u>126}))return;let n=vW(e),i=[],o=Ge(n[0]);i.push(o?105:104);let a=o?"C":"B",s=0;for(;s<t;){let l=n[s.toString()];if(l!==void 0){a!=="C"&&(i.push(99),a="C");for(let u=0,d=l/2|0;u<d;++u){let f=e.substring(s+(u<<1)|0,(s+(u<<1)|0)+2|0);i.push(D(FF(f),0))}s=s+l|0}else a==="C"&&(i.push(100),a="B"),i.push(D(e.codePointAt(s),32)-32|0),s=s+1|0}return i}function bW(e){return Q(_W(e),t=>{let r={contents:t[0]};return t.forEach((n,i)=>{if(i>0){r.contents=r.contents+(n*i|0)|0;return}}),t.concat([r.contents%103,106]).map(n=>mW[n]).join("")})}function yW(e,t,r){let n=r.toString(),i=[],o=0,a=e.length;for(;o<a;)if(ze(e[o],"1")){let s=o;for(;o<a&&ze(e[o],"1");)o=o+1|0;let l=(o-s|0).toString();i.push("M"+(s+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function xW(e){return"var("+e+")"}let SW=S([z("inlineBlock"),zV({NAME:"percent",VAL:100}),c("overflow-x","auto"),c("background","#ffffff"),c("padding","6px"),c("border-radius",xW(X.md)),c("border","1px solid var("+y.borderSubtle+")"),c("line-height","0")]),EW=S([c("color","#000000"),c("display","block")]);function wW(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,a=bW(n);if(a===void 0)return null;let s=a.length+20|0;return b("span",{children:b("svg",{children:b("path",{d:yW(a,10,40),fill:"currentColor"}),"aria-label":D(e.title,"Barcode for "+n),className:EW,role:"img",height:i.toString(),width:(s*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+s.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:SW})}let kW=wW;function ji(e){return"var("+e+")"}let CW=S([qt("fixed"),ps(Ce(0)),od(Ce(0)),bl(Ce(0)),Jx(Ce(0)),c("background","rgba(0,0,0,0.82)"),z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",ji(F.md)),c("padding",ji(F.lg)),c("z-index","1100")]),RW=S([c("max-width","min(92vw, 1400px)"),c("max-height","78vh"),c("object-fit","contain"),c("border-radius",ji(X.sm)),c("box-shadow",ji(_n.lg))]),AW=S([z("flex"),Z("center"),c("gap",ji(F.md)),c("max-width","100%")]),$W=S([z("flex"),Z("center"),c("gap",ji(F.md)),c("max-width","92vw"),c("color","#f5f5f5"),c("font-size",ji(T.sizeSm))]),TW=S([c("font-size",ji(T.sizeMd)),c("font-weight",ji(T.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),NW=S([c("color","#c8c8c8")]),DW=S([c("font-family",ji(T.fontFamilyMono)),c("color","#c8c8c8")]),jI=S([z("inlineFlex"),Z("center"),Ze("center"),c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",ji(X.md)),c("color","#f5f5f5"),c("padding","4px var("+F.sm+")"),c("font-size",ji(T.sizeSm)),xe("pointer"),Je([c("background","rgba(255,255,255,0.22)")])]),eC=Ir([jI,S([c("width","40px"),c("height","40px"),c("border-radius","50%"),c("font-size",ji(T.sizeLg)),vi(0)])]),FW=Ir([jI,S([qt("absolute"),ps(Ce(16)),bl(Ce(16)),c("width","32px")])]);function Ku(e,t,r){return t===0?0:Bo(Bo(e+r|0,t)+t|0,t)}function IW(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,a=o>1;Ae(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return a?r(Ku(n,o,-1)):void 0;case"ArrowRight":return a?r(Ku(n,o,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,o]);let s=i[Ku(n,o,0)];if(s===void 0)return null;let l=s.title,u=s.caption;return L("div",{children:[b("button",{children:"✕",className:FW,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[a?b("button",{children:"‹",className:eC,title:"Previous",type:"button",onClick:d=>r(Ku(n,o,-1))}):null,b("img",{className:RW,alt:D(s.title,""),src:s.src}),a?b("button",{children:"›",className:eC,title:"Next",type:"button",onClick:d=>r(Ku(n,o,1))}):null],className:AW,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?b("span",{children:l,className:TW,title:l}):null,u!==void 0?b("span",{children:u,className:NW}):null,a?b("span",{children:(Ku(n,o,0)+1|0).toString()+" / "+o.toString(),className:DW}):null,D(e.action,null)],className:$W,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:CW,role:"dialog",onClick:d=>t()})}let qI=IW;function Jn(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function ao(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function VI(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function Rg(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return ao(Jn(e),-r|0)}function KI(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function PW(e){let t=Rg(KI(e));return il(42,r=>ao(t,r))}function HI(e,t){return Jn(e)===Jn(t)}function OW(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function WI(e,t,r){let n=Jn(r),i=n+864e5;return e<i?t>=n:!1}function tC(e){let t=e.toString();return t.length<2?"0"+t:t}function GI(e){let t=new Date(e);return tC(t.getHours()|0)+":"+tC(t.getMinutes()|0)}function JI(e){return e===Jn(e)}let QI=["January","February","March","April","May","June","July","August","September","October","November","December"];function eo(e){let t=new Date(e),r=t.getMonth()|0;return D(QI[r],"")+" "+t.getFullYear().toString()}let nS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function YI(e){return new Date(e).getDate()|0}function as(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(nS[n],"")+" "+(new Date(e).getDate()|0).toString()}function Dn(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let XI=864e5;function Bl(e){return"var("+e+")"}function MW(e){return S([c("width","100%"),c("height",e),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Bl(X.md)),c("background",Bl(y.surfaceSubtle)),fs("hidden")])}let LW=S([z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",Bl(F.sm)),c("height","100%"),c("padding",Bl(F.lg)),c("color",Bl(y.textSecondary)),c("font-size",Bl(T.sizeSm)),c("text-align","center")]),zW=S([c("color",Bl(y.brand)),c("text-decoration","none"),Je([c("text-decoration","underline")])]);function UW(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function BW(e){let t=e.height,r=e.title,n=e.src,i=r!==void 0?r:"Document",o=t!==void 0?t:"70vh";return b("object",{children:L("div",{children:["This browser can't display the document inline.",b("a",{children:"Open "+i,className:zW,href:n,rel:"noopener noreferrer",target:"_blank"})],className:LW}),"aria-label":i,className:MW(o),data:n,type:"application/pdf"})}let jW=BW;function ZI(e){return e==="Small"?"13px":"18px"}let eP="★";function qW(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function nu(e){return"var("+e+")"}function VW(e){return S([z("inlineFlex"),qt("relative"),c("font-size",ZI(e)),c("line-height","1"),c("letter-spacing","1px"),c("white-space","nowrap"),c("vertical-align","-1px")])}let KW=S([c("color",nu(y.borderSubtle))]);function HW(e){return S([qt("absolute"),c("top","0"),c("left","0"),c("width",(e*100).toString()+"%"),fs("hidden"),c("white-space","nowrap"),c("color",nu(y.warning)),c("pointer-events","none")])}let rC=S([z("inlineFlex"),c("gap","2px"),Z("center")]);function WW(e,t){return S([c("background","none"),c("border","none"),c("padding","0 1px"),c("font-size",ZI(t)),c("line-height","1"),xe("pointer"),c("color",nu(e?y.warning:y.borderSubtle)),c("transition","color 120ms, transform 120ms"),Je([c("transform","scale(1.15)")]),Cr("&:focus-visible",[c("outline","2px solid var("+y.brand+")"),c("outline-offset","1px"),c("border-radius","2px")])])}let nC=S([c("color",nu(y.textSecondary)),c("font-size",nu(T.sizeSm))]),GW=S([z("inlineFlex"),Z("center"),c("gap","6px")]),JW=S([c("border","1px solid var("+y.error+")"),c("border-radius",nu(X.sm)),c("padding","2px 4px")]);function QW(e){return NF(e<=0?0:e,eP).join("")}function YW(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,a=e.max,s=e.value,l=a!==void 0?a:5,u=o!==void 0?o:"Small",d=i!==void 0?i:!1,f=t!==void 0?t:!1,h=l<=0?5:l,p=QW(h),m=D(e.label,(Math.round(s*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[il(h,g=>g+1|0).map(g=>{let v=g<=s;return b("button",{children:eP,"aria-label":g.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:WW(v,u),title:g.toString()+" of "+h.toString(),type:"button",onBlur:_=>ae(r,x=>x()),onClick:_=>{_.stopPropagation(),n(g===s?0:g)}},g.toString())}),d?b("span",{children:s<=0?"—":s.toString(),className:nC}):null],"aria-label":m,className:f?rC+" "+JW:rC,role:"group"}):L("span",{children:[L("span",{children:[b("span",{children:p,className:KW}),b("span",{children:p,className:HW(qW(s,h))})],"aria-label":m,className:VW(u),role:"img",title:m}),d?b("span",{children:(Math.round(s*10)/10).toString()+" / "+h.toString(),className:nC}):null],className:GW})}let l_=YW;function iu(e){return"var("+e+")"}let XW=S([z("flex"),pe("column"),c("gap","4px")]),ZW=S([z("flex"),Ze("spaceBetween"),c("font-size",iu(T.sizeSm))]),eG=S([c("color",iu(y.textSecondary))]),tG=S([c("color",iu(y.textPrimary)),c("font-weight",iu(T.weightMedium))]),rG=S([c("background",iu(y.surfaceSubtle)),c("border-radius",iu(X.full)),c("height","8px"),fs("hidden")]);function nG(e,t){return S([c("background",t!==void 0?t:"var("+y.brand+")"),c("border-radius",iu(X.full)),c("height","100%"),c("width",e.toString()+"%"),c("transition","width 0.3s ease")])}function iG(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,a=o<0?0:o;return L("div",{children:[Ge(r)||i?L("div",{children:[de(r,null,s=>b("span",{children:s,className:eG})),i?b("span",{children:Math.round(a).toString()+"%",className:tG}):null],className:ZW}):null,b("div",{children:b("div",{className:nG(a,e.color)}),className:rG})],className:XW})}let tP=iG,Ag={};function rP(e){Ag[e.id]=e}function nP(e){return O(Ag,e)}let iP={};function oG(e){return de(O(Ag,e),iP,t=>t.constraints)}let iC={contents:[]};function aG(e,t){if(iC.contents.some(n=>n===e))return;iC.contents.push(e);let r=Ux(Ag).map(n=>n.id).join(", ");console.error('[AutoUI] Unknown channel "'+e+'" ('+t+") — falling back to a plain-text preview. Registered channels: "+(r===""?"(none — has the channel adapter's init() run?)":r))}let oP="#111111";function No(e){return"var("+e+")"}let oC=S([z("flex"),pe("column"),c("gap",No(F.xs))]);function sG(e){return S([c("background","#ffffff"),c("border",e?"1px solid var("+y.error+")":"1px dashed var("+y.border+")"),c("border-radius",No(X.md)),c("touch-action","none"),c("max-width","100%"),c("width","100%"),c("height","auto"),xe("crosshair"),c("display","block")])}let lG=S([c("fill","#9ca3af"),c("font-size","13px"),c("pointer-events","none"),c("user-select","none")]),uG=S([c("stroke","#e5e7eb"),c("stroke-width","1")]),aC=S([z("flex"),Z("center"),c("gap",No(F.sm)),c("font-size",No(T.sizeXs)),c("color",No(y.textSecondary))]),sC=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",No(X.sm)),c("color",No(y.textSecondary)),c("font-size",No(T.sizeXs)),c("padding","2px 8px"),xe("pointer"),Je([c("border-color",No(y.brand)),c("color",No(y.brand))])]),cG=S([c("background","#ffffff"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",No(X.md)),c("padding","4px"),c("display","inline-block"),c("line-height","0")]),dG=S([c("display","block"),c("max-width","100%"),c("height","auto")]);function ai(e){return(Math.round(e*10)/10).toString()}function aP(e){return e.map(t=>ai(t.x)+","+ai(t.y)).join(" ")}function fG(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let a=o.length===1?o.concat(o):o;return'<polyline points="'+aP(a)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+ai(t)+" "+ai(r)+'" width="'+ai(t)+'" height="'+ai(r)+'"><g fill="none" stroke="'+oP+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function lC(e){return e.trim().startsWith("<svg")}function sP(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function hG(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function pG(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,a=e.value,s=n!==void 0?n:480,l=r!==void 0?r:160,u=t!==void 0?t:!1,d=We(null),f=se(()=>[]),h=f[1],p=f[0],m=se(()=>!1),g=m[1],v=We(!1),_=$=>Q(xa(d.current),N=>{let M=N.getBoundingClientRect(),P=M.width===0?1:s/M.width,I=M.height===0?1:l/M.height;return{x:($.clientX-M.left)*P,y:($.clientY-M.top)*I}}),x=$=>o(fG($,s,l)),w=$=>{$.preventDefault();let N=_($);if(N!==void 0)return v.current=!0,ae(xa(d.current),M=>{M.setPointerCapture($.pointerId)}),h(M=>M.concat([[N]]))},E=$=>{if(!v.current)return;let N=_($);if(N!==void 0)return h(M=>{let P=M[M.length-1|0];if(P===void 0)return M;let I=P[P.length-1|0];return I!==void 0&&!hG(N,I)?M:M.slice(0,M.length-1|0).concat([P.concat([N])])})},C=$=>{if(v.current)return v.current=!1,x(p),ae(i,N=>N())},k=()=>{h($=>[]),g($=>!0),o("")},A=p.length!==0;return a.trim().startsWith("<svg")&&!A&&!m[0]?L("div",{children:[b("span",{children:b("img",{className:dG,alt:"Signature",src:sP(a)}),className:cG}),b("div",{children:b("button",{children:"Sign again",className:sC,type:"button",onClick:$=>k()}),className:aC})],className:oC}):L("div",{children:[L("svg",{children:[b("line",{className:uG,x1:ai(s*.06),x2:ai(s*.94),y1:ai(l*.78),y2:ai(l*.78)}),A?null:b("text",{children:"Sign here",className:lG,textAnchor:"middle",x:ai(s/2),y:ai(l*.7)}),b("g",{children:p.map(($,N)=>b("polyline",{points:aP($.length===1?$.concat($):$)},N.toString())),fill:"none",stroke:oP,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Jt(d),"aria-label":"Signature pad",className:sG(u),role:"img",onPointerDown:w,onPointerMove:E,onPointerUp:C,onPointerCancel:C,viewBox:"0 0 "+ai(s)+" "+ai(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[A?b("button",{children:"Clear",className:sC,type:"button",onClick:$=>k()}):null,b("span",{children:"Draw your signature above"})],className:aC})],className:oC})}let mG=pG;function gG(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function io(e){return"var("+e+")"}let vG=S([z("flex"),pe("column"),c("gap",io(F.sm))]),_G=S([z("flex"),c("gap","4px")]),uC=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",io(X.sm)),c("color",io(y.textSecondary)),c("font-size",io(T.sizeXs)),c("padding","2px 8px"),xe("pointer")]),bG=S([c("background",io(y.brandSubtle)),c("border-color",io(y.brand)),c("color",io(y.textPrimary))]),yG=S([Ho({NAME:"percent",VAL:100}),c("min-height","220px"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",io(X.sm)),c("background","#ffffff")]),xG=S([c("margin","0"),c("font-family",io(T.fontFamilyMono)),c("font-size",io(T.sizeXs)),c("line-height",io(T.lineHeightRelaxed)),c("color",io(y.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]);function SG(e){let t=e.textAlternative,r=se(()=>!1),n=r[1],i=r[0],o=(l,u,d)=>b("button",{children:l,className:u?uC+" "+bG:uC,type:"button",onClick:d}),a,s=0;return i&&t!==void 0?a=b("pre",{children:t,className:xG}):s=1,s===1&&(a=b("iframe",{className:yG,title:"Email preview",sandbox:"",srcDoc:e.html})),L("div",{children:[t!==void 0?L("div",{children:[o("HTML",!i,l=>n(u=>!1)),o("Plain text",i,l=>n(u=>!0))],className:_G}):null,a],className:vG})}function EG(e,t){return b(SG,{html:e.body,textAlternative:e.textAlternative})}function wG(){rP({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:EG})}const cC={};function kG(e){let t=cC[e];if(t)return t;t=cC[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);t.push(n)}for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function zc(e,t){typeof t!="string"&&(t=zc.defaultChars);const r=kG(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,a=n.length;o<a;o+=3){const s=parseInt(n.slice(o+1,o+3),16);if(s<128){i+=r[s];continue}if((s&224)===192&&o+3<a){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const u=s<<6&1984|l&63;u<128?i+="��":i+=String.fromCharCode(u),o+=3;continue}}if((s&240)===224&&o+6<a){const l=parseInt(n.slice(o+4,o+6),16),u=parseInt(n.slice(o+7,o+9),16);if((l&192)===128&&(u&192)===128){const d=s<<12&61440|l<<6&4032|u&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((s&248)===240&&o+9<a){const l=parseInt(n.slice(o+4,o+6),16),u=parseInt(n.slice(o+7,o+9),16),d=parseInt(n.slice(o+10,o+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let f=s<<18&1835008|l<<12&258048|u<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}zc.defaultChars=";/?:@&=+$,#";zc.componentChars="";const dC={};function CG(e){let t=dC[e];if(t)return t;t=dC[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function zh(e,t,r){typeof t!="string"&&(r=t,t=zh.defaultChars),typeof r>"u"&&(r=!0);const n=CG(t);let i="";for(let o=0,a=e.length;o<a;o++){const s=e.charCodeAt(o);if(r&&s===37&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(s<128){i+=n[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}zh.defaultChars=";/?:@&=+$,-_.!~*'()#";zh.componentChars="-_.!~*'()";function iS(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function lm(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const RG=/^([a-z0-9.+-]+:)/i,AG=/:[0-9]*$/,$G=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,TG=["<",">",'"',"`"," ","\r",`
|
|
3
|
+
`," "],NG=["{","}","|","\\","^","`"].concat(TG),DG=["'"].concat(NG),fC=["%","/","?",";","#"].concat(DG),hC=["/","?","#"],FG=255,pC=/^[+a-z0-9A-Z_-]{0,63}$/,IG=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,mC={javascript:!0,"javascript:":!0},gC={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function oS(e,t){if(e&&e instanceof lm)return e;const r=new lm;return r.parse(e,t),r}lm.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=$G.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let a=RG.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&mC[a])&&(o=o.substr(2),this.slashes=!0)),!mC[a]&&(i||a&&!gC[a])){let u=-1;for(let m=0;m<hC.length;m++)n=o.indexOf(hC[m]),n!==-1&&(u===-1||n<u)&&(u=n);let d,f;u===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",u),f!==-1&&(d=o.slice(0,f),o=o.slice(f+1),this.auth=d),u=-1;for(let m=0;m<fC.length;m++)n=o.indexOf(fC[m]),n!==-1&&(u===-1||n<u)&&(u=n);u===-1&&(u=o.length),o[u-1]===":"&&u--;const h=o.slice(0,u);o=o.slice(u),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let g=0,v=m.length;g<v;g++){const _=m[g];if(_&&!_.match(pC)){let x="";for(let w=0,E=_.length;w<E;w++)_.charCodeAt(w)>127?x+="x":x+=_[w];if(!x.match(pC)){const w=m.slice(0,g),E=m.slice(g+1),C=_.match(IG);C&&(w.push(C[1]),E.unshift(C[2])),E.length&&(o=E.join(".")+o),this.hostname=w.join(".");break}}}}this.hostname.length>FG&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),gC[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};lm.prototype.parseHost=function(e){let t=AG.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const PG=Object.freeze(Object.defineProperty({__proto__:null,decode:zc,encode:zh,format:iS,parse:oS},Symbol.toStringTag,{value:"Module"})),lP=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,uP=/[\0-\x1F\x7F-\x9F]/,OG=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,aS=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,cP=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,dP=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,MG=Object.freeze(Object.defineProperty({__proto__:null,Any:lP,Cc:uP,Cf:OG,P:aS,S:cP,Z:dP},Symbol.toStringTag,{value:"Module"})),LG=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),zG=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var u_;const UG=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),BG=(u_=String.fromCodePoint)!==null&&u_!==void 0?u_:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function jG(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=UG.get(e))!==null&&t!==void 0?t:e}var fn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(fn||(fn={}));const qG=32;var qs;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qs||(qs={}));function jy(e){return e>=fn.ZERO&&e<=fn.NINE}function VG(e){return e>=fn.UPPER_A&&e<=fn.UPPER_F||e>=fn.LOWER_A&&e<=fn.LOWER_F}function KG(e){return e>=fn.UPPER_A&&e<=fn.UPPER_Z||e>=fn.LOWER_A&&e<=fn.LOWER_Z||jy(e)}function HG(e){return e===fn.EQUALS||KG(e)}var sn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(sn||(sn={}));var Wa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Wa||(Wa={}));class WG{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=sn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Wa.Strict}startEntity(t){this.decodeMode=t,this.state=sn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case sn.EntityStart:return t.charCodeAt(r)===fn.NUM?(this.state=sn.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=sn.NamedEntity,this.stateNamedEntity(t,r));case sn.NumericStart:return this.stateNumericStart(t,r);case sn.NumericDecimal:return this.stateNumericDecimal(t,r);case sn.NumericHex:return this.stateNumericHex(t,r);case sn.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|qG)===fn.LOWER_X?(this.state=sn.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=sn.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const o=n-r;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(r,o),i),this.consumed+=o}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(jy(i)||VG(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(jy(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===fn.SEMI)this.consumed+=1;else if(this.decodeMode===Wa.Strict)return 0;return this.emitCodePoint(jG(this.result),this.consumed),this.errors&&(t!==fn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],o=(i&qs.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=GG(n,i,this.treeIndex+Math.max(1,o),a),this.treeIndex<0)return this.result===0||this.decodeMode===Wa.Attribute&&(o===0||HG(a))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&qs.VALUE_LENGTH)>>14,o!==0){if(a===fn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Wa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&qs.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~qs.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case sn.NamedEntity:return this.result!==0&&(this.decodeMode!==Wa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case sn.NumericDecimal:return this.emitNumericEntity(0,2);case sn.NumericHex:return this.emitNumericEntity(0,3);case sn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case sn.EntityStart:return 0}}}function fP(e){let t="";const r=new WG(e,n=>t+=BG(n));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),r.startEntity(o);const u=r.write(i,s+1);if(u<0){a=s+r.end();break}a=s+u,s=u===0?a+1:a}const l=t+i.slice(a);return t="",l}}function GG(e,t,r,n){const i=(t&qs.BRANCH_LENGTH)>>7,o=t&qs.JUMP_TABLE;if(i===0)return o!==0&&n===o?r:-1;if(o){const l=n-o;return l<0||l>=i?-1:e[r+l]-1}let a=r,s=a+i-1;for(;a<=s;){const l=a+s>>>1,u=e[l];if(u<n)a=l+1;else if(u>n)s=l-1;else return e[l+i]}return-1}const hP=fP(LG);fP(zG);function JG(e,t=Wa.Legacy){return hP(e,t)}function QG(e){return hP(e,Wa.Strict)}function YG(e){return Object.prototype.toString.call(e)}function sS(e){return YG(e)==="[object String]"}const XG=Object.prototype.hasOwnProperty;function ZG(e,t){return XG.call(e,t)}function $g(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){e[n]=r[n]})}}),e}function pP(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function lS(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Gf(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const mP=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,eJ=/&([a-z#][a-z0-9]{1,31});/gi,tJ=new RegExp(mP.source+"|"+eJ.source,"gi"),rJ=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function nJ(e,t){if(t.charCodeAt(0)===35&&rJ.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return lS(n)?Gf(n):e}const r=JG(e);return r!==e?r:e}function iJ(e){return e.indexOf("\\")<0?e:e.replace(mP,"$1")}function Uc(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(tJ,function(t,r,n){return r||nJ(t,n)})}const oJ=/[&<>"]/,aJ=/[&<>"]/g,sJ={"&":"&","<":"<",">":">",'"':"""};function lJ(e){return sJ[e]}function ol(e){return oJ.test(e)?e.replace(aJ,lJ):e}const uJ=/[.?*+^$[\]\\(){}|-]/g;function cJ(e){return e.replace(uJ,"\\$&")}function lr(e){switch(e){case 9:case 32:return!0}return!1}function Jf(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function gP(e){return aS.test(e)||cP.test(e)}function Qf(e){return gP(Gf(e))}function Yf(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Tg(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function vC(e){return e===32||e===9||e===10||e===13}function Ng(e){let t=0;for(;t<e.length&&vC(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&vC(e.charCodeAt(r));r--);return e.slice(t,r+1)}const dJ={mdurl:PG,ucmicro:MG},fJ=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:pP,asciiTrim:Ng,assign:$g,escapeHtml:ol,escapeRE:cJ,fromCodePoint:Gf,has:ZG,isMdAsciiPunct:Yf,isPunctChar:gP,isPunctCharCode:Qf,isSpace:lr,isString:sS,isValidEntityCode:lS,isWhiteSpace:Jf,lib:dJ,normalizeReference:Tg,unescapeAll:Uc,unescapeMd:iJ},Symbol.toStringTag,{value:"Module"}));function hJ(e,t,r){let n,i,o,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),o===91){if(a===e.pos-1)n++;else if(r)return e.pos=l,-1}}let u=-1;return i&&(u=e.pos),e.pos=l,u}function pJ(e,t,r){let n,i=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<r;){if(n=e.charCodeAt(i),n===10||n===60)return o;if(n===62)return o.pos=i+1,o.str=Uc(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let a=0;for(;i<r&&(n=e.charCodeAt(i),!(n===32||n<32||n===127));){if(n===92&&i+1<r){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(n===40&&(a++,a>32))return o;if(n===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Uc(e.slice(t,i)),o.pos=i,o.ok=!0),o}function mJ(e,t,r,n){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o<r;){if(i=e.charCodeAt(o),i===a.marker)return a.pos=o+1,a.str+=Uc(e.slice(t,o)),a.ok=!0,a;if(i===40&&a.marker===41)return a;i===92&&o+1<r&&o++,o++}return a.can_continue=!0,a.str+=Uc(e.slice(t,o)),a}const gJ=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:pJ,parseLinkLabel:hJ,parseLinkTitle:mJ},Symbol.toStringTag,{value:"Module"})),Aa={};Aa.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+ol(o.content)+"</code>"};Aa.code_block=function(e,t,r,n,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+ol(e[t].content)+`</code></pre>
|
|
4
|
+
`};Aa.fence=function(e,t,r,n,i){const o=e[t],a=o.info?Uc(o.info).trim():"";let s="",l="";if(a){const d=a.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let u;if(r.highlight?u=r.highlight(o.content,s,l)||ol(o.content):u=ol(o.content),u.indexOf("<pre")===0)return u+`
|
|
5
|
+
`;if(a){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+s]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+s);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${u}</code></pre>
|
|
6
|
+
`}return`<pre><code${i.renderAttrs(o)}>${u}</code></pre>
|
|
7
|
+
`};Aa.image=function(e,t,r,n,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(e,t,r)};Aa.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
+
`:`<br>
|
|
9
|
+
`};Aa.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
+
`:`<br>
|
|
11
|
+
`:`
|
|
12
|
+
`};Aa.text=function(e,t){return ol(e[t].content)};Aa.html_block=function(e,t){return e[t].content};Aa.html_inline=function(e,t){return e[t].content};function ud(){this.rules=$g({},Aa)}ud.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+ol(t.attrs[r][0])+'="'+ol(t.attrs[r][1])+'"';return i};ud.prototype.renderToken=function(t,r,n){const i=t[r];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&t[r-1].hidden&&(o+=`
|
|
13
|
+
`),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let a=!1;if(i.block&&(a=!0,i.nesting===1&&r+1<t.length)){const s=t[r+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===i.tag)&&(a=!1)}return o+=a?`>
|
|
14
|
+
`:">",o};ud.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};ud.prototype.renderInlineAsText=function(e,t,r){let n="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":n+=e[i].content;break;case"image":n+=this.renderInlineAsText(e[i].children,t,r);break;case"html_inline":case"html_block":n+=e[i].content;break;case"softbreak":case"hardbreak":n+=`
|
|
15
|
+
`;break}return n};ud.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;s==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function pi(){this.__rules__=[],this.__cache__=null}pi.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};pi.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||e.__cache__[r].push(n.fn))})})};pi.prototype.at=function(e,t,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null};pi.prototype.before=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};pi.prototype.after=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};pi.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};pi.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!0,r.push(n)},this),this.__cache__=null,r};pi.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};pi.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!1,r.push(n)},this),this.__cache__=null,r};pi.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Go(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Go.prototype.attrIndex=function(t){if(!this.attrs)return-1;const r=this.attrs;for(let n=0,i=r.length;n<i;n++)if(r[n][0]===t)return n;return-1};Go.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Go.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};Go.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};Go.prototype.attrJoin=function(t,r){const n=this.attrIndex(t);n<0?this.attrPush([t,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function vP(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}vP.prototype.Token=Go;const vJ=/\r\n?|\n/g,_J=/\0/g;function bJ(e){let t;t=e.src.replace(vJ,`
|
|
16
|
+
`),t=t.replace(_J,"�"),e.src=t}function yJ(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function xJ(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const i=t[r];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function SJ(e){return/^<a[>\s]/i.test(e)}function EJ(e){return/^<\/a\s*>/i.test(e)}function wJ(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(SJ(s.content)&&o>0&&o--,EJ(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let u=e.md.linkify.match(l);const d=[];let f=s.level,h=0;u.length>0&&u[0].index===0&&a>0&&i[a-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const m=u[p].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let v=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const _=u[p].index;if(_>h){const C=new e.Token("text","",0);C.content=l.slice(h,_),C.level=f,d.push(C)}const x=new e.Token("link_open","a",1);x.attrs=[["href",g]],x.level=f++,x.markup="linkify",x.info="auto",d.push(x);const w=new e.Token("text","",0);w.content=v,w.level=f,d.push(w);const E=new e.Token("link_close","a",-1);E.level=--f,E.markup="linkify",E.info="auto",d.push(E),h=u[p].lastIndex}if(h<l.length){const p=new e.Token("text","",0);p.content=l.slice(h),p.level=f,d.push(p)}t[r].children=i=pP(i,a,d)}}}}const _P=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,kJ=/\((c|tm|r)\)/i,CJ=/\((c|tm|r)\)/ig,RJ={c:"©",r:"®",tm:"™"};function AJ(e,t){return RJ[t.toLowerCase()]}function $J(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&(n.content=n.content.replace(CJ,AJ)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function TJ(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&_P.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function NJ(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(kJ.test(e.tokens[t].content)&&$J(e.tokens[t].children),_P.test(e.tokens[t].content)&&TJ(e.tokens[t].children))}const DJ=/['"]/,_C=/['"]/g,bC="’";function Cp(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function FJ(e,t){let r="",n=0;t.sort((i,o)=>i.pos-o.pos);for(let i=0;i<t.length;i++){const o=t[i];r+=e.slice(n,o.pos)+o.ch,n=o.pos+1}return r+e.slice(n)}function IJ(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const a=e[o],s=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,a.type!=="text")continue;const l=a.content;let u=0;const d=l.length;e:for(;u<d;){_C.lastIndex=u;const f=_C.exec(l);if(!f)break;let h=!0,p=!0;u=f.index+1;const m=f[0]==="'";let g=32;if(f.index-1>=0)g=l.charCodeAt(f.index-1);else for(r=o-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){g=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(u<d)v=l.charCodeAt(u);else for(r=o+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const _=Yf(g)||Qf(g),x=Yf(v)||Qf(v),w=Jf(g),E=Jf(v);if(E?h=!1:x&&(w||_||(h=!1)),w?p=!1:_&&(E||x||(p=!1)),v===34&&f[0]==='"'&&g>=48&&g<=57&&(p=h=!1),h&&p&&(h=_,p=x),!h&&!p){m&&Cp(i,o,f.index,bC);continue}if(p)for(r=n.length-1;r>=0;r--){let C=n[r];if(n[r].level<s)break;if(C.single===m&&n[r].level===s){C=n[r];let k,A;m?(k=t.md.options.quotes[2],A=t.md.options.quotes[3]):(k=t.md.options.quotes[0],A=t.md.options.quotes[1]),Cp(i,o,f.index,A),Cp(i,C.token,C.pos,k),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:m,level:s}):p&&m&&Cp(i,o,f.index,bC)}}Object.keys(i).forEach(function(o){e[o].content=FJ(e[o].content,i[o])})}function PJ(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!DJ.test(e.tokens[t].content)||IJ(e.tokens[t].children,e)}function OJ(e){let t,r;const n=e.tokens,i=n.length;for(let o=0;o<i;o++){if(n[o].type!=="inline")continue;const a=n[o].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=r=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}}const c_=[["normalize",bJ],["block",yJ],["inline",xJ],["linkify",wJ],["replacements",NJ],["smartquotes",PJ],["text_join",OJ]];function uS(){this.ruler=new pi;for(let e=0;e<c_.length;e++)this.ruler.push(c_[e][0],c_[e][1])}uS.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};uS.prototype.State=vP;function $a(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,a=0,s=0,l=0,u=i.length,d=!1;a<u;a++){const f=i.charCodeAt(a);if(!d)if(lr(f)){s++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||a===u-1)&&(f!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),d=!1,s=0,l=0,o=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}$a.prototype.push=function(e,t,r){const n=new Go(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};$a.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};$a.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};$a.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!lr(n))break}return t};$a.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!lr(this.src.charCodeAt(--t)))return t+1;return t};$a.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};$a.prototype.skipCharsBack=function(t,r,n){if(t<=n)return t;for(;t>n;)if(r!==this.src.charCodeAt(--t))return t+1;return t};$a.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let a=0,s=t;s<r;s++,a++){let l=0;const u=this.bMarks[s];let d=u,f;for(s+1<r||i?f=this.eMarks[s]+1:f=this.eMarks[s];d<f&&l<n;){const h=this.src.charCodeAt(d);if(lr(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(d-u<this.tShift[s])l++;else break;d++}l>n?o[a]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[a]=this.src.slice(d,f)}return o.join("")};$a.prototype.Token=Go;const MJ=65536;function d_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function yC(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,a=0,s="";for(;n<r;)i===124&&(o?(s+=e.substring(a,n-1),a=n):(t.push(s+e.substring(a,n)),s="",a=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(s+e.substring(a)),t}function LJ(e,t,r,n){if(t+2>r)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!lr(s)||a===45&&lr(s))return!1;for(;o<e.eMarks[i];){const E=e.src.charCodeAt(o);if(E!==124&&E!==45&&E!==58&&!lr(E))return!1;o++}let l=d_(e,t+1),u=l.split("|");const d=[];for(let E=0;E<u.length;E++){const C=u[E].trim();if(!C){if(E===0||E===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?d.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=d_(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=yC(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const f=u.length;if(f===0||f!==d.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const _=e.push("tr_open","tr",1);_.map=[t,t+1];for(let E=0;E<u.length;E++){const C=e.push("th_open","th",1);d[E]&&(C.attrs=[["style","text-align:"+d[E]]]);const k=e.push("inline","",0);k.content=u[E].trim(),k.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let x,w=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let E=!1;for(let k=0,A=p.length;k<A;k++)if(p[k](e,i,r,!0)){E=!0;break}if(E||(l=d_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(u=yC(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),w+=f-u.length,w>MJ))break;if(i===t+2){const k=e.push("tbody_open","tbody",1);k.map=x=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[i,i+1];for(let k=0;k<f;k++){const A=e.push("td_open","td",1);d[k]&&(A.attrs=[["style","text-align:"+d[k]]]);const $=e.push("inline","",0);$.content=u[k]?u[k].trim():"",$.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return x&&(e.push("tbody_close","tbody",-1),x[1]=i),e.push("table_close","table",-1),g[1]=i,e.parentType=h,e.line=i,!0}function zJ(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,i=n;for(;n<r;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,i=n;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
17
|
+
`,o.map=[t,e.line],!0}function UJ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const u=e.src.slice(s,i),d=e.src.slice(i,o);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,a),!(i-s<l)&&(i=e.skipSpaces(i),!(i<o)))){h=!0;break}l=e.sCount[t],e.line=f+(h?1:0);const p=e.push("fence","code",0);return p.info=d,p.content=e.getLines(t+1,f,l,!0),p.markup=u,p.map=[t,e.line],!0}function BJ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const s=[],l=[],u=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m<r;m++){const w=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],o=e.eMarks[m],i>=o)break;if(e.src.charCodeAt(i++)===62&&!w){let C=e.sCount[m]+1,k,A;e.src.charCodeAt(i)===32?(i++,C++,A=!1,k=!0):e.src.charCodeAt(i)===9?(k=!0,(e.bsCount[m]+C)%4===3?(i++,C++,A=!1):A=!0):k=!1;let $=C;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<o;){const N=e.src.charCodeAt(i);if(lr(N))N===9?$+=4-($+e.bsCount[m]+(A?1:0))%4:$++;else break;i++}p=i>=o,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(k?1:0),u.push(e.sCount[m]),e.sCount[m]=$-C,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let E=!1;for(let C=0,k=f.length;C<k;C++)if(f[C](e,m,r,!0)){E=!0;break}if(E){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]=-1}const g=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const _=[t,0];v.map=_,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,_[1]=e.line;for(let w=0;w<d.length;w++)e.bMarks[w+t]=s[w],e.tShift[w+t]=d[w],e.sCount[w+t]=u[w],e.bsCount[w+t]=l[w];return e.blkIndent=g,!0}function jJ(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o<i;){const u=e.src.charCodeAt(o++);if(u!==a&&!lr(u))return!1;u===a&&s++}if(s<3)return!1;if(n)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function xC(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(n++);if(i!==42&&i!==45&&i!==43)return-1;if(n<r){const o=e.src.charCodeAt(n);if(!lr(o))return-1}return n}function SC(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-r>=10)return-1;continue}if(o===41||o===46)break;return-1}return i<n&&(o=e.src.charCodeAt(i),!lr(o))?-1:i}function qJ(e,t){const r=e.level+2;for(let n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function VJ(e,t,r,n){let i,o,a,s,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;n&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(d=!0);let f,h,p;if((p=SC(e,l))>=0){if(f=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,p-1)),d&&h!==1)return!1}else if((p=xC(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const m=e.src.charCodeAt(p-1),g=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const v=[l,0];s.map=v,s.markup=String.fromCharCode(m);let _=!1;const x=e.md.block.ruler.getRules("list"),w=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const E=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let C=E;for(;o<i;){const q=e.src.charCodeAt(o);if(q===9)C+=4-(C+e.bsCount[l])%4;else if(q===32)C++;else break;o++}const k=o;let A;k>=i?A=1:A=C-E,A>4&&(A=1);const $=E+A;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[l,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const M=e.tight,P=e.tShift[l],I=e.sCount[l],U=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=$,e.tight=!0,e.tShift[l]=k-e.bMarks[l],e.sCount[l]=C,k>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,l,r,!0),(!e.tight||_)&&(u=!1),_=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=U,e.tShift[l]=P,e.sCount[l]=I,e.tight=M,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,N[1]=l,l>=r||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let B=!1;for(let q=0,W=x.length;q<W;q++)if(x[q](e,l,r,!0)){B=!0;break}if(B)break;if(f){if(p=SC(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=xC(e,l),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return f?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),v[1]=l,e.line=l,e.parentType=w,u&&qJ(e,g),!0}function KJ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const w=e.lineMax;if(x>=w||e.isEmpty(x))return null;let E=!1;if(e.sCount[x]-e.blkIndent>3&&(E=!0),e.sCount[x]<0&&(E=!0),!E){const A=e.md.block.ruler.getRules("reference"),$=e.parentType;e.parentType="reference";let N=!1;for(let M=0,P=A.length;M<P;M++)if(A[M](e,x,w,!0)){N=!0;break}if(e.parentType=$,N)return null}const C=e.bMarks[x]+e.tShift[x],k=e.eMarks[x];return e.src.slice(C,k+1)}let l=e.src.slice(i,o+1);o=l.length;let u=-1;for(i=1;i<o;i++){const x=l.charCodeAt(i);if(x===91)return!1;if(x===93){u=i;break}else if(x===10){const w=s(a);w!==null&&(l+=w,o=l.length,a++)}else if(x===92&&(i++,i<o&&l.charCodeAt(i)===10)){const w=s(a);w!==null&&(l+=w,o=l.length,a++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(i=u+2;i<o;i++){const x=l.charCodeAt(i);if(x===10){const w=s(a);w!==null&&(l+=w,o=l.length,a++)}else if(!lr(x))break}const d=e.md.helpers.parseLinkDestination(l,i,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;i=d.pos;const h=i,p=a,m=i;for(;i<o;i++){const x=l.charCodeAt(i);if(x===10){const w=s(a);w!==null&&(l+=w,o=l.length,a++)}else if(!lr(x))break}let g=e.md.helpers.parseLinkTitle(l,i,o);for(;g.can_continue;){const x=s(a);if(x===null)break;l+=x,i=o,o=l.length,a++,g=e.md.helpers.parseLinkTitle(l,i,o,g)}let v;for(i<o&&m!==i&&g.ok?(v=g.str,i=g.pos):(v="",i=h,a=p);i<o;){const x=l.charCodeAt(i);if(!lr(x))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,a=p;i<o;){const x=l.charCodeAt(i);if(!lr(x))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const _=Tg(l.slice(1,u));return _?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[_]>"u"&&(e.env.references[_]={title:v,href:f}),e.line=a),!0):!1}const HJ=["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"],WJ="[a-zA-Z_:][a-zA-Z0-9:._-]*",GJ="[^\"'=<>`\\x00-\\x20]+",JJ="'[^']*'",QJ='"[^"]*"',YJ="(?:"+GJ+"|"+JJ+"|"+QJ+")",XJ="(?:\\s+"+WJ+"(?:\\s*=\\s*"+YJ+")?)",bP="<[A-Za-z][A-Za-z0-9\\-]*"+XJ+"*\\s*\\/?>",yP="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ZJ="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",eQ="<[?][\\s\\S]*?[?]>",tQ="<![A-Za-z][^>]*>",rQ="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",nQ=new RegExp("^(?:"+bP+"|"+yP+"|"+ZJ+"|"+eQ+"|"+tQ+"|"+rQ+")"),iQ=new RegExp("^(?:"+bP+"|"+yP+")"),Cl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+HJ.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(iQ.source+"\\s*$"),/^$/,!1]];function oQ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s<Cl.length&&!Cl[s][0].test(a);s++);if(s===Cl.length)return!1;if(n)return Cl[s][2];let l=t+1;const u=Cl[s][1].test("");if(!Cl[s][1].test(a)){for(;l<r&&!(e.sCount[l]<e.blkIndent&&(u||!e.isEmpty(l)));l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(i,o),Cl[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function aQ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i<o&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<o&&!lr(a))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&lr(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const u=e.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[t,e.line];const d=e.push("inline","",0);d.content=Ng(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function sQ(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s<r&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p<m&&(a=e.src.charCodeAt(p),(a===45||a===61)&&(p=e.skipChars(p,a),p=e.skipSpaces(p),p>=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=n.length;p<m;p++)if(n[p](e,s,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=Ng(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;const u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(a),u.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(a),e.parentType=i,!0}function lQ(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<r&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let u=!1;for(let d=0,f=n.length;d<f;d++)if(n[d](e,o,r,!0)){u=!0;break}if(u)break}const a=Ng(e.getLines(t,o,e.blkIndent,!1));e.line=o;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const Rp=[["table",LJ,["paragraph","reference"]],["code",zJ],["fence",UJ,["paragraph","reference","blockquote","list"]],["blockquote",BJ,["paragraph","reference","blockquote","list"]],["hr",jJ,["paragraph","reference","blockquote","list"]],["list",VJ,["paragraph","reference","blockquote"]],["reference",KJ],["html_block",oQ,["paragraph","reference","blockquote"]],["heading",aQ,["paragraph","reference","blockquote"]],["lheading",sQ],["paragraph",lQ]];function Dg(){this.ruler=new pi;for(let e=0;e<Rp.length;e++)this.ruler.push(Rp[e][0],Rp[e][1],{alt:(Rp[e][2]||[]).slice()})}Dg.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let a=t,s=!1;for(;a<r&&(e.line=a=e.skipEmptyLines(a),!(a>=r||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=r;break}const l=e.line;let u=!1;for(let d=0;d<i;d++)if(u=n[d](e,a,r,!1),u){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<r&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}};Dg.prototype.parse=function(e,t,r,n){if(!e)return;const i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)};Dg.prototype.State=$a;function Uh(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Uh.prototype.pushPending=function(){const e=new Go("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Uh.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new Go(e,t,r);let i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};Uh.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)===55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)===56320){const v=this.src.charCodeAt(e-2);i=(v&64512)===55296?65536+(v-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let o=e;for(;o<r&&this.src.charCodeAt(o)===n;)o++;const a=o-e;let s=o<r?this.src.charCodeAt(o):32;if((s&64512)===55296){const v=this.src.charCodeAt(o+1);s=(v&64512)===56320?65536+(s-55296<<10)+(v-56320):65533}else(s&64512)===56320&&(s=65533);const l=Yf(i)||Qf(i),u=Yf(s)||Qf(s),d=Jf(i),f=Jf(s),h=!f&&(!u||d||l),p=!d&&(!l||f||u);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||u),length:a}};Uh.prototype.Token=Go;function uQ(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function cQ(e,t){let r=e.pos;for(;r<e.posMax&&!uQ(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const dQ=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function fQ(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,n=e.posMax;if(r+3>n||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const i=e.pending.match(dQ);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const d=e.push("link_open","a",1);d.attrs=[["href",u]],d.markup="linkify",d.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-o.length,!0}function hQ(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<i&&lr(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const cS=[];for(let e=0;e<256;e++)cS.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){cS[e.charCodeAt(0)]=1});function pQ(e,t){let r=e.pos;const n=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=e.src.charCodeAt(r);if(i===10){for(t||e.push("hardbreak","br",0),r++;r<n&&(i=e.src.charCodeAt(r),!!lr(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const s=e.src.charCodeAt(r+1);s>=56320&&s<=57343&&(o+=e.src[r+1],r++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&cS[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=r+1,!0}function mQ(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const o=e.posMax;for(;r<o&&e.src.charCodeAt(r)===96;)r++;const a=e.src.slice(i,r),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=a),e.pos+=s,!0;let l=r,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&e.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===s){if(!t){const f=e.push("code_inline","code",0);f.markup=a,f.content=e.src.slice(r,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=u}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function gQ(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=a,o--);for(let l=0;l<o;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function EC(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];r=e.tokens[a.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[s.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&n.push(s.token-1)}for(;n.length;){const o=n.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(r=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=r)}}function vQ(e){const t=e.tokens_meta,r=e.tokens_meta.length;EC(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&EC(e,t[n].delimiters)}const xP={tokenize:gQ,postProcess:vQ};function _Q(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let o=0;o<i.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function wC(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const u=e.tokens[o.token];u.type=a?"strong_close":"em_close",u.tag=a?"strong":"em",u.nesting=-1,u.markup=a?s+s:s,u.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function bQ(e){const t=e.tokens_meta,r=e.tokens_meta.length;wC(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&wC(e,t[n].delimiters)}const SP={tokenize:_Q,postProcess:bQ};function yQ(e,t){let r,n,i,o,a="",s="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<f&&e.src.charCodeAt(m)===40){for(u=!1,m++;m<f&&(r=e.src.charCodeAt(m),!(!lr(r)&&r!==10));m++);if(m>=f)return!1;if(l=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",l=m;m<f&&(r=e.src.charCodeAt(m),!(!lr(r)&&r!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<f&&l!==m&&i.ok)for(s=i.str,m=i.pos;m<f&&(r=e.src.charCodeAt(m),!(!lr(r)&&r!==10));m++);}(m>=f||e.src.charCodeAt(m)!==41)&&(u=!0),m++}if(u){if(typeof e.env.references>"u")return!1;if(m<f&&e.src.charCodeAt(m)===91?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?n=e.src.slice(l,m++):m=p+1):m=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[Tg(n)],!o)return e.pos=d,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const g=e.push("link_open","a",1),v=[["href",a]];g.attrs=v,s&&v.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function xQ(e,t){let r,n,i,o,a,s,l,u,d="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!lr(r)&&r!==10));o++);if(o>=h)return!1;for(u=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(d=e.md.normalizeLink(s.str),e.md.validateLink(d)?o=s.pos:d=""),u=o;o<h&&(r=e.src.charCodeAt(o),!(!lr(r)&&r!==10));o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&u!==o&&s.ok)for(l=s.str,o=s.pos;o<h&&(r=e.src.charCodeAt(o),!(!lr(r)&&r!==10));o++);else l="";if(o>=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<h&&e.src.charCodeAt(o)===91?(u=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(u,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[Tg(i)],!a)return e.pos=f,!1;d=a.href,l=a.title}if(!t){n=e.src.slice(p,m);const g=[];e.md.inline.parse(n,e.md,e.env,g);const v=e.push("image","img",0),_=[["src",d],["alt",""]];v.attrs=_,v.children=g,v.content=n,l&&_.push(["title",l])}return e.pos=o,e.posMax=h,!0}const SQ=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,EQ=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function wQ(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const a=e.src.charCodeAt(r);if(a===60)return!1;if(a===62)break}const o=e.src.slice(n+1,r);if(EQ.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}if(SQ.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}return!1}function kQ(e){return/^<a[>\s]/i.test(e)}function CQ(e){return/^<\/a\s*>/i.test(e)}function RQ(e){const t=e|32;return t>=97&&t<=122}function AQ(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=e.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!RQ(i))return!1;const o=e.src.slice(n).match(nQ);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],kQ(a.content)&&e.linkLevel++,CQ(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const $Q=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,TQ=/^&([a-z][a-z0-9]{1,31});/i;function NQ(e,t){const r=e.pos,n=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=n)return!1;if(e.src.charCodeAt(r+1)===35){const o=e.src.slice(r).match($Q);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=lS(a)?Gf(a):Gf(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(TQ);if(o){const a=QG(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function kC(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;a<r;a++){const s=e[a];if(o.push(0),(e[n].marker!==s.marker||i!==s.token-1)&&(n=a),i=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let u=n-o[n]-1,d=u;for(;u>l;u-=o[u]+1){const f=e[u];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=u>0&&!e[u-1].open?o[u-1]+1:0;o[a]=a-u+p,o[u]=p,s.open=!1,f.end=a,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function DQ(e){const t=e.tokens_meta,r=e.tokens_meta.length;kC(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&kC(t[n].delimiters)}function FQ(e){let t,r,n=0;const i=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<o&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}const f_=[["text",cQ],["linkify",fQ],["newline",hQ],["escape",pQ],["backticks",mQ],["strikethrough",xP.tokenize],["emphasis",SP.tokenize],["link",yQ],["image",xQ],["autolink",wQ],["html_inline",AQ],["entity",NQ]],h_=[["balance_pairs",DQ],["strikethrough",xP.postProcess],["emphasis",SP.postProcess],["fragments_join",FQ]];function Bh(){this.ruler=new pi;for(let e=0;e<f_.length;e++)this.ruler.push(f_[e][0],f_[e][1]);this.ruler2=new pi;for(let e=0;e<h_.length;e++)this.ruler2.push(h_[e][0],h_[e][1])}Bh.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<i){for(let s=0;s<n;s++)if(e.level++,a=r[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Bh.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const o=e.pos;let a=!1;if(e.level<i){for(let s=0;s<r;s++)if(a=t[s](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Bh.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s<a;s++)o[s](i)};Bh.prototype.State=Uh;function IQ(e){const t={};e=e||{},t.src_Any=lP.source,t.src_Cc=uP.source,t.src_Z=dP.source,t.src_P=aS.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function qy(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function Fg(e){return Object.prototype.toString.call(e)}function PQ(e){return Fg(e)==="[object String]"}function OQ(e){return Fg(e)==="[object Object]"}function MQ(e){return Fg(e)==="[object RegExp]"}function CC(e){return Fg(e)==="[object Function]"}function LQ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const EP={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function zQ(e){return Object.keys(e||{}).reduce(function(t,r){return t||EP.hasOwnProperty(r)},!1)}const UQ={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},BQ="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",jQ="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function qQ(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function RC(){return function(e,t){t.normalize(e)}}function um(e){const t=e.re=IQ(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(BQ),r.push(t.src_xn),t.src_tlds=r.join("|");function n(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const u={validate:null,link:null};if(e.__compiled__[s]=u,OQ(l)){MQ(l.validate)?u.validate=qQ(l.validate):CC(l.validate)?u.validate=l.validate:o(s,l),CC(l.normalize)?u.normalize=l.normalize:l.normalize?o(s,l):u.normalize=RC();return}if(PQ(l)){i.push(s);return}o(s,l)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:RC()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(LQ).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function wP(e,t,r,n){const i=e.slice(r,n);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=i,this.text=i,this.url=i}function qi(e,t){if(!(this instanceof qi))return new qi(e,t);t||zQ(e)&&(t=e,e={}),this.__opts__=qy({},EP,t),this.__schemas__=qy({},UQ,e),this.__compiled__={},this.__tlds__=jQ,this.__tlds_replaced__=!1,this.re={},um(this)}qi.prototype.add=function(t,r){return this.__schemas__[t]=r,um(this),this};qi.prototype.set=function(t){return this.__opts__=qy(this.__opts__,t),this};qi.prototype.test=function(t){if(!t.length)return!1;let r,n;if(this.re.schema_test.test(t)){for(n=this.re.schema_search,n.lastIndex=0;(r=n.exec(t))!==null;)if(this.testSchemaAt(t,r[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};qi.prototype.pretest=function(t){return this.re.pretest.test(t)};qi.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};qi.prototype.match=function(t){const r=[],n=[],i=[],o=[];let a,s,l;function u(h,p){return h?p?h.index!==p.index?h.index<p.index?h:p:h.lastIndex>=p.lastIndex?h:p:h:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(a=l.exec(t))!==null;)s=this.testSchemaAt(t,a[2],l.lastIndex),s&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+s});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)i.push({schema:"",index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)o.push({schema:"mailto:",index:a.index+a[1].length,lastIndex:a.index+a[0].length});const d=[0,0,0];let f=0;for(;;){const h=[n[d[0]],o[d[1]],i[d[2]]],p=u(u(h[0],h[1]),h[2]);if(!p)break;if(p===h[0]?d[0]++:p===h[1]?d[1]++:d[2]++,p.index<f)continue;const m=new wP(t,p.schema,p.index,p.lastIndex);this.__compiled__[m.schema].normalize(m,this),r.push(m),f=p.lastIndex}return r.length?r:null};qi.prototype.matchAtStart=function(t){if(!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const n=this.testSchemaAt(t,r[2],r[0].length);if(!n)return null;const i=new wP(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};qi.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,o){return n!==o[i-1]}).reverse(),um(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,um(this),this)};qi.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};qi.prototype.onCompile=function(){};const bc=2147483647,ha=36,dS=1,Xf=26,VQ=38,KQ=700,kP=72,CP=128,RP="-",HQ=/^xn--/,WQ=/[^\0-\x7F]/,GQ=/[\x2E\u3002\uFF0E\uFF61]/g,JQ={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p_=ha-dS,pa=Math.floor,m_=String.fromCharCode;function Is(e){throw new RangeError(JQ[e])}function QQ(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function AP(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(GQ,".");const i=e.split("."),o=QQ(i,t).join(".");return n+o}function $P(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const o=e.charCodeAt(r++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const YQ=e=>String.fromCodePoint(...e),XQ=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ha},AC=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},TP=function(e,t,r){let n=0;for(e=r?pa(e/KQ):e>>1,e+=pa(e/t);e>p_*Xf>>1;n+=ha)e=pa(e/p_);return pa(n+(p_+1)*e/(e+VQ))},NP=function(e){const t=[],r=e.length;let n=0,i=CP,o=kP,a=e.lastIndexOf(RP);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&Is("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<r;){const l=n;for(let d=1,f=ha;;f+=ha){s>=r&&Is("invalid-input");const h=XQ(e.charCodeAt(s++));h>=ha&&Is("invalid-input"),h>pa((bc-n)/d)&&Is("overflow"),n+=h*d;const p=f<=o?dS:f>=o+Xf?Xf:f-o;if(h<p)break;const m=ha-p;d>pa(bc/m)&&Is("overflow"),d*=m}const u=t.length+1;o=TP(n-l,u,l==0),pa(n/u)>bc-i&&Is("overflow"),i+=pa(n/u),n%=u,t.splice(n++,0,i)}return String.fromCodePoint(...t)},DP=function(e){const t=[];e=$P(e);const r=e.length;let n=CP,i=0,o=kP;for(const l of e)l<128&&t.push(m_(l));const a=t.length;let s=a;for(a&&t.push(RP);s<r;){let l=bc;for(const d of e)d>=n&&d<l&&(l=d);const u=s+1;l-n>pa((bc-i)/u)&&Is("overflow"),i+=(l-n)*u,n=l;for(const d of e)if(d<n&&++i>bc&&Is("overflow"),d===n){let f=i;for(let h=ha;;h+=ha){const p=h<=o?dS:h>=o+Xf?Xf:h-o;if(f<p)break;const m=f-p,g=ha-p;t.push(m_(AC(p+m%g,0))),f=pa(m/g)}t.push(m_(AC(f,0))),o=TP(i,u,s===a),i=0,++s}++i,++n}return t.join("")},ZQ=function(e){return AP(e,function(t){return HQ.test(t)?NP(t.slice(4).toLowerCase()):t})},eY=function(e){return AP(e,function(t){return WQ.test(t)?"xn--"+DP(t):t})},FP={version:"2.3.1",ucs2:{decode:$P,encode:YQ},decode:NP,encode:DP,toASCII:eY,toUnicode:ZQ},tY={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},rY={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},nY={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},iY={default:tY,zero:rY,commonmark:nY},oY=/^(vbscript|javascript|file|data):/,aY=/^data:image\/(gif|png|jpeg|webp);/;function sY(e){const t=e.trim().toLowerCase();return oY.test(t)?aY.test(t):!0}const IP=["http:","https:","mailto:"];function lY(e){const t=oS(e,!0);if(t.hostname&&(!t.protocol||IP.indexOf(t.protocol)>=0))try{t.hostname=FP.toASCII(t.hostname)}catch{}return zh(iS(t))}function uY(e){const t=oS(e,!0);if(t.hostname&&(!t.protocol||IP.indexOf(t.protocol)>=0))try{t.hostname=FP.toUnicode(t.hostname)}catch{}return zc(iS(t),zc.defaultChars+"%")}function fo(e,t){if(!(this instanceof fo))return new fo(e,t);t||sS(e)||(t=e||{},e="default"),this.inline=new Bh,this.block=new Dg,this.core=new uS,this.renderer=new ud,this.linkify=new qi,this.validateLink=sY,this.normalizeLink=lY,this.normalizeLinkText=uY,this.utils=fJ,this.helpers=$g({},gJ),this.options={},this.configure(e),t&&this.set(t)}fo.prototype.set=function(e){return $g(this.options,e),this};fo.prototype.configure=function(e){const t=this;if(sS(e)){const r=e;if(e=iY[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};fo.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};fo.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};fo.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};fo.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens};fo.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};fo.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};fo.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function Kr(e){return"var("+e+")"}let cY=S([c("color",Kr(y.textPrimary)),c("font-size",Kr(T.sizeSm)),c("line-height",Kr(T.lineHeightRelaxed)),c("word-break","break-word"),Cr("& > :first-child",[c("margin-top","0")]),Cr("& > :last-child",[c("margin-bottom","0")]),Cr("& h1, & h2, & h3, & h4, & h5, & h6",[c("margin","var("+F.md+") 0 var("+F.sm+")"),c("line-height",Kr(T.lineHeightTight)),c("font-weight",Kr(T.weightBold))]),Cr("& h1",[c("font-size",Kr(T.sizeXl))]),Cr("& h2",[c("font-size",Kr(T.sizeLg))]),Cr("& h3, & h4, & h5, & h6",[c("font-size",Kr(T.sizeMd))]),Cr("& p",[c("margin","var("+F.sm+") 0")]),Cr("& a",[c("color",Kr(y.brand)),c("text-decoration","none")]),Cr("& a:hover",[c("text-decoration","underline")]),Cr("& ul, & ol",[c("margin","var("+F.sm+") 0"),c("padding-left","1.5em")]),Cr("& li",[c("margin","var("+F.xs+") 0")]),Cr("& code",[c("font-family",Kr(T.fontFamilyMono)),c("font-size","0.9em"),c("background",Kr(y.surfaceSubtle)),c("padding","1px 4px"),c("border-radius",Kr(X.sm))]),Cr("& pre",[c("background",Kr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Kr(X.md)),c("padding",Kr(F.md)),c("overflow","auto"),c("margin","var("+F.sm+") 0")]),Cr("& pre code",[c("background","none"),c("padding","0")]),Cr("& blockquote",[c("margin","var("+F.sm+") 0"),c("padding-left",Kr(F.md)),c("border-left","3px solid var("+y.border+")"),c("color",Kr(y.textSecondary))]),Cr("& table",[c("border-collapse","collapse"),c("margin","var("+F.sm+") 0")]),Cr("& th, & td",[c("border","1px solid var("+y.borderSubtle+")"),c("padding","var("+F.xs+") var("+F.sm+")"),c("text-align","left")]),Cr("& th",[c("background",Kr(y.surfaceSubtle)),c("font-weight",Kr(T.weightMedium))]),Cr("& img",[c("max-width","100%"),c("border-radius",Kr(X.sm))]),Cr("& hr",[c("border","none"),c("border-top","1px solid var("+y.borderSubtle+")"),c("margin","var("+F.md+") 0")])]),dY=new fo({html:!1,linkify:!0});function fY(e){let t=e.source,r=Bt(()=>dY.render(t),[t]),n=We(null);return Ae(()=>{ae(xa(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),b("div",{ref:Jt(n),className:cY,dangerouslySetInnerHTML:{__html:r}})}let PP=fY;function hY(e,t){return b(PP,{source:e.body})}function pY(){rP({id:"markdown",label:"Markdown",constraints:{},preview:hY})}function yc(e){return Array.from(e).length}function fS(e,t){let r=Array.from(e),n=t<0?0:t;return r.length<=n?[e,""]:[r.slice(0,n).join(""),r.slice(n).join("")]}function OP(e,t){return R(t,r=>{let i=fS(e,r)[1];if(i!=="")return i})}function pr(e){return"var("+e+")"}let mY=S([z("flex"),pe("column"),c("gap","4px")]),$C=S([c("background",pr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",pr(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-family","inherit"),c("font-size",pr(T.sizeMd)),c("line-height",pr(T.lineHeightNormal)),c("color",pr(y.textPrimary)),c("outline","none"),c("resize","vertical"),Ho({NAME:"percent",VAL:100}),c("box-sizing","border-box"),c("transition","border-color 120ms"),ms([c("border-color",pr(y.brand))])]),gY=S([c("border-color",pr(y.error)),ms([c("border-color",pr(y.error))])]),vY=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",pr(F.sm)),c("font-size",pr(T.sizeXs)),c("color",pr(y.textSecondary))]),_Y=S([z("inlineFlex"),Z("center"),c("gap","4px"),c("color",pr(y.textSecondary))]),TC=S([c("font-variant-numeric","tabular-nums")]),bY=S([c("color",pr(y.error)),c("font-weight",pr(T.weightMedium))]),yY=S([c("background",pr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-left","3px solid var("+y.error+")"),c("border-radius",pr(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",pr(T.sizeXs)),c("line-height",pr(T.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word"),c("max-height","8em"),c("overflow","auto")]),xY=S([c("color",pr(y.textSecondary)),c("font-size",pr(T.sizeXs)),Eg(Ce(2))]),SY=S([c("color",pr(y.textPrimary))]),EY=S([c("color",pr(y.error)),c("font-weight",pr(T.weightMedium))]),wY=S([c("color",pr(y.textDisabled)),c("text-decoration","line-through")]);function MP(e){return e.toString()+" character"+(e===1?"":"s")}function LP(e,t){return t!==void 0?e>t?(e-t|0).toString()+" over the "+t.toString()+"-character limit":e.toString()+" / "+t.toString():e.toString()+" characters"}function kY(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,a=e.onBlur,s=e.onChange,l=e.value,u=a!==void 0?a:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=OP(l,o),m=Ge(p),g=f||m?$C+" "+gY:$C,v;if(p!==void 0&&o!==void 0){let _=fS(l,o);v=L("div",{children:[b("div",{children:"Sent as:",className:xY}),L("div",{children:[b("span",{children:_[0],className:SY}),b("span",{children:"✂",className:EY}),b("span",{children:p,className:wY})],className:yY})]})}else v=null;return L("div",{children:[b("textarea",{className:g,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:_=>u(),onChange:_=>s(_.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?Ge(i)?" · "+t:t:null],className:_Y}),b("span",{children:LP(h,o),className:m?TC+" "+bY:TC})],className:vY}),v],className:mY})}let CY=kY;wG();pY();function Ht(e){return"var("+e+")"}let RY=S([z("flex"),pe("column"),c("gap",Ht(F.sm)),c("background",Ht(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Ht(X.md)),c("padding",Ht(F.md))]),AY=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",Ht(F.sm))]),$Y=S([c("font-size",Ht(T.sizeSm)),c("font-weight",Ht(T.weightMedium)),c("color",Ht(y.textPrimary))]),TY=S([c("font-size",Ht(T.sizeXs)),c("color",Ht(y.textSecondary))]),Ap=S([c("font-size",Ht(T.sizeXs)),c("color",Ht(y.textSecondary)),c("font-variant-numeric","tabular-nums"),c("white-space","nowrap")]),NC=S([c("color",Ht(y.error)),c("font-weight",Ht(T.weightMedium))]),NY=S([z("flex"),Z("baseline"),Ze("spaceBetween"),c("gap",Ht(F.sm)),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("padding-bottom",Ht(F.xs))]),DY=S([c("font-size",Ht(T.sizeMd)),c("font-weight",Ht(T.weightMedium)),c("color",Ht(y.textPrimary)),c("word-break","break-word")]),FY=S([c("color",Ht(y.textDisabled)),c("text-decoration","line-through")]),IY=S([c("color",Ht(y.error)),c("font-weight",Ht(T.weightMedium))]),PY=S([c("margin","0"),c("font-family","inherit"),c("font-size",Ht(T.sizeSm)),c("line-height",Ht(T.lineHeightRelaxed)),c("color",Ht(y.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]),OY=S([c("max-width","100%"),c("border-radius",Ht(X.sm)),c("border","1px solid var("+y.borderSubtle+")"),c("object-fit","cover")]),MY=S([c("font-size",Ht(T.sizeXs)),c("color",Ht(y.error)),c("background",Ht(y.surfaceSubtle)),c("border-left","3px solid var("+y.error+")"),c("border-radius",Ht(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")")]);function DC(e,t){let r=fS(e,t),n=r[1];return n===""?e:L(Gr,{children:[r[0],b("span",{children:"✂",className:IY}),b("span",{children:n,className:FY})]})}function LY(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=nP(n);Ae(()=>{Ui(o)&&aG(n,"ChannelPreview")},[n]);let a=de(o,n,_=>_.label),s=de(o,iP,_=>_.constraints),l=yc(r.body),u=OP(r.body,s.maxLength),d=r.subject,f;if(d!==void 0){let _=s.subjectMaxLength,x=yc(d),w=de(_,!1,E=>x>E);f=L("div",{children:[b("span",{children:_!==void 0?DC(d,_):d,className:DY}),_!==void 0?b("span",{children:x.toString()+" / "+_.toString(),className:w?Ap+" "+NC:Ap}):null],className:NY})}else f=null;let h=R(o,_=>_.preview),p;if(h!==void 0)p=h(r,s);else{let _=s.maxLength;p=b("pre",{children:_!==void 0?DC(r.body,_):r.body,className:PY})}let m=r.imageUrl,g;if(m!==void 0){let _=s.mediaAspect;g=b("img",{className:OY,style:_!==void 0?gG({},"aspectRatio",_):{},alt:"Message media",src:tu(m)})}else g=null;let v=s.note;return L("div",{children:[i?L("div",{children:[b("span",{children:a,className:$Y}),b("span",{children:LP(l,s.maxLength),className:Ge(u)?Ap+" "+NC:Ap})],className:AY}):null,f,p,u!==void 0?b("div",{children:MP(yc(u))+" past the limit — "+a+" will cut the tail.",className:MY}):null,g,v!==void 0?b("span",{children:v,className:TY}):null],className:RY})}let zY=LY;function ee(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function zP(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);r.search=n.toString(),console.warn(`Minified Lexical warning #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Jo=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,UY=Jo&&"documentMode"in document?document.documentMode:null,Ao=Jo&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),al=Jo&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Bc=!(!Jo||!("InputEvent"in window)||UY)&&"getTargetRanges"in new window.InputEvent("input"),sl=Jo&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,UP=Jo&&/Android/.test(navigator.userAgent),jh=Jo&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!UP,BP=Jo&&/^(?=.*Chrome).*/i.test(navigator.userAgent),cm=Jo&&UP&&BP,qh=Jo&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ao&&!BP,BY=0,jY=1,qY=2,FC=1,IC=2,PC=4,OC=8,VY=16,g_=32,v_=64,hS=128,KY=1,HY=2,WY=3,GY=4,JY=5,QY=6,Zf=jh||sl||qh?" ":"",jl=`
|
|
18
|
+
|
|
19
|
+
`,pS=al?" ":Zf,ss={bold:1,capitalize:1024,code:16,highlight:hS,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},YY={directionless:1,unmergeable:2},dm={center:2,end:6,justify:4,left:1,right:3,start:5},XY={[HY]:"center",[QY]:"end",[GY]:"justify",[KY]:"left",[WY]:"right",[JY]:"start"},ZY={normal:0,segmented:2,token:1},eX={[BY]:"normal",[qY]:"segmented",[jY]:"token"},MC="$config";function LC(){return yr()._blockCursorElement}function tX(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let jP=class I0{element;before;after;constructor(t,r,n){this.element=t,this.before=r||null,this.after=n||null}withBefore(t){return new I0(this.element,t,this.after)}withAfter(t){return new I0(this.element,this.before,t)}withElement(t){return this.element===t?this:new I0(t,this.before,this.after)}insertChild(t){const r=this.getInsertionAnchor();return r!==null&&r.parentElement!==this.element&&ee(357),this.element.insertBefore(t,r),this}removeChild(t){return t.parentElement!==this.element&&ee(358),this.element.removeChild(t),this}replaceChild(t,r){return r.parentElement!==this.element&&ee(359),this.element.replaceChild(t,r),this}getFirstChild(){const t=this.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;return r===this.getInsertionAnchor()?null:r}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,r,n){if(this.element===t)return r===t&&n===0?"before":"after";const i=zC(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(r===t)return n<=o?"before":"after";const a=zC(t,r);if(a===null)return"after";const s=Array.prototype.indexOf.call(t.childNodes,a);return s>=0&&s<=o?"before":"after"}getInsertionAnchor(){return this.before}};function zC(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class xc extends jP{withBefore(t){return new xc(this.element,t,this.after)}withAfter(t){return new xc(this.element,this.before,t)}withElement(t){return this.element===t?this:new xc(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;for(;tX(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===LC()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(qh||sl||jh);this.insertManagedLineBreak(r)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const r=this.element,n=t.nodeName==="IMG"?t.nextSibling:null;n&&r.removeChild(n),r.removeChild(t),r.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const r=this.getManagedLineBreak();if(r){if(t===(r.nodeName==="IMG"))return;this.removeManagedLineBreak()}const n=this.element,i=this.before,o=rr().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const a=rr().createElement("img");a.setAttribute("data-lexical-managed-linebreak","true"),a.style.setProperty("display","inline","important"),a.style.setProperty("border","0px","important"),a.style.setProperty("margin","0px","important"),a.alt="",n.insertBefore(a,o),n.__lexicalLineBreak=a}else n.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),r=this.getInsertionAnchor();let n=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==r;i=i.nextSibling)n++;return n}resolveChildIndex(t,r,n,i){if(n===this.element){const l=this.getFirstChildOffset(),u=LC(),d=this.element.childNodes,f=Math.min(i,d.length);let h=0;for(let p=l;p<f;p++)d[p]!==u&&h++;return[t,Math.min(h,t.getChildrenSize())]}const o=UC(r,n);o.push(i);const a=UC(r,this.element);let s=t.getIndexWithinParent();for(let l=0;l<a.length;l++){const u=o[l],d=a[l];if(u===void 0||u<d)break;if(u>d){s+=1;break}}return[t.getParentOrThrow(),s]}}function UC(e,t){const r=[];let n=t;for(;n!==e&&n!==null;n=n.parentNode){let i=0;for(let o=n.previousSibling;o!==null;o=o.previousSibling)i++;r.push(i)}return n!==e&&ee(225),r.reverse()}let qP;try{qP="0.48.0+prod.esm"}catch{}const VP=qP??'"<unknown>+source"';let jd=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const r of this._back)t.push(r);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const Rl=null;function KP(e,t=1e3){return e instanceof Vy?e.clone():e.size<t?new Map(e):new Vy().init(new Map(e),void 0,e.size)}let Vy=class HP{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new HP().init(this._old,this._nursery,this._size)}init(t,r,n){return this._old=t,this._nursery=r,this._size=n,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const r=this._nursery&&this._nursery.get(t);return r!==void 0?r:this._old&&this._old.get(t)}get(t){const r=this.getWithTombstone(t);return r===Rl?void 0:r}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const r=new Map(this._old);for(const[n,i]of this._nursery)i!==Rl?r.set(n,i):r.delete(n);this._old=r,this._nursery=void 0}return this._mutable=!1,this}set(t,r){const n=this.getWithTombstone(t);if(n===r)return this;const i=this.getNursery();return n!==Rl&&n!==void 0||(this._size++,n===Rl&&i.delete(t)),i.set(t,r),this}delete(t){const r=this.has(t);return r&&(this.getNursery().set(t,Rl),this._size--),r}getOrInsert(t,r){const n=this.get(t);return n!==void 0?n:(this.set(t,r),r)}getOrInsertComputed(t,r){const n=this.get(t);if(n!==void 0)return n;const i=r(t);return this.set(t,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,r=this._old;if(r)for(const n of r){const i=n[0],o=t?t.get(i):void 0;o!==Rl&&(o!==void 0&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===Rl||r&&r.has(n[0])||(yield n)}forEach(t,r){r!==void 0&&(t=t.bind(r));for(const[n,i]of this.entries())t(i,n,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function fm(e,t,r,n,i,o){if(V(e)){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&((V(a)||Xa(a)&&a.__slots!==null)&&fm(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}for(const a of Xa(e)&&e.__slots!==null?e.__slots.values():[]){const s=n.get(a);s!==void 0&&du(s)&&s.__slotHost===t&&((V(s)||Xa(s)&&s.__slots!==null)&&fm(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a))}}let Ky=!1,mS=0;function rX(e){mS=e.timeStamp}function __(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&vd(e,r)!==void 0}function nX(e,t,r){const n=Zn(yi(r)),i=n&&ho(n,r._rootElement);let o=null,a=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,a=i.focusOffset);const s=e.nodeValue;s!==null&&NS(t,s,o,a,!1)}function iX(e,t,r){if(te(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return bi(t)&&r.isAttached()}function oX(e,t,r){for(let n=e;n&&!C6(n);n=Ru(n)){const i=vd(n,t);if(i!==void 0){const o=tr(i,r);if(o)return ct(o)||!tt(n)?void 0:[n,o]}}}function WP(e,t,r){Ky=!0;const n=performance.now()-mS>100;try{so(e,()=>{const i=he()||(function(f){return f.read("latest",()=>{const h=he();return h!==null?h.clone():null})})(e),o=new Map,a=e._editorState,s=e._blockCursorElement;let l=!1,u="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,m=h.target,g=oX(m,e,a);if(!g)continue;const[v,_]=g;if(p==="characterData")n&&ne(_)&&bi(m)&&iX(i,m,_)&&nX(m,_,e);else if(p==="childList"){l=!0;const x=h.addedNodes;for(let C=0;C<x.length;C++){const k=x[C],A=f6(k),$=k.parentNode;if(!($==null||k===s||A!==null||__(k,$,e)||e._slotsUsed&&tt(k)&&k.hasAttribute("data-lexical-slot")||C6(k))){if(al){const N=(tt(k)?k.innerText:null)||k.nodeValue;N&&(u+=N)}$.removeChild(k)}}const w=h.removedNodes,E=w.length;if(E>0){let C=0;for(let k=0;k<E;k++){const A=w[k];(__(A,m,e)||s===A)&&(m.appendChild(A),C++)}E!==C&&o.set(v,_)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=r.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],p=h.addedNodes,m=h.target;for(let g=0;g<p.length;g++){const v=p[g],_=v.parentNode;_==null||v.nodeName!=="BR"||__(v,m,e)||_.removeChild(v)}}r.takeRecords()}i!==null&&(l&&bn(i),al&&_6(e)&&i.insertRawText(u))})}finally{Ky=!1}}function GP(e){const t=e._observer;t!==null&&WP(e,t.takeRecords(),t)}function JP(e){(function(t){mS===0&&yi(t).addEventListener("textInput",rX,!0)})(e),e._observer=new MutationObserver((t,r)=>{WP(e,t,r)})}const BC="latest";let aX=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||uX).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function Vh(e,t){return new aX(e,t)}function Kh(e,t,r=BC){const n=(r===BC?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function Sc(e,t,r){let n;if(un(),typeof r=="function"){const o=e.getLatest(),a=Kh(o,t);if(n=r(a),t.isEqual(a,n))return o}else n=r;const i=e.getWritable();return YP(i).updateFromKnown(t,n),i}function sX(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of OS(typeof e=="function"?e:e.replace))if(n&&n.stateConfigs)for(const i of n.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&r.add(o.key)):o=i,t.set(o.key,o)}return{flatKeys:r,sharedConfigMap:t}}const jC=new Set(["__proto__","constructor","prototype"]);let lX=class QP{node;knownState;unknownState;sharedNodeState;size;constructor(t,r,n=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=r,this.unknownState=n,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,u,d){let f=d.size;if(u)for(const h in u){const p=l.get(h);p&&d.has(p)||f++}return f})(a,n,i);this.size=s}getValue(t){const r=this.knownState.get(t);if(r!==void 0)return r;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(n=t.parse(i)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},r={};for(const[n,i]of this.knownState)n.isEqual(i,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(i);for(const n of this.sharedNodeState.flatKeys)n in t&&(r[n]=t[n],delete t[n]);return qC(t)&&(r.$=t),r}getWritable(t){if(this.node===t)return this;const{sharedNodeState:r,unknownState:n}=this,i=new Map(this.knownState);return new QP(t,r,(function(o,a,s){let l;if(s)for(const[u,d]of Object.entries(s)){if(jC.has(u))continue;const f=o.get(u);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[u]=d)}return l})(r.sharedConfigMap,i,n),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,r){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&n in o||(o&&(delete o[n],this.unknownState=qC(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(jC.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(r)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=r)}updateFromJSON(t){const{knownState:r}=this;for(const n of r.keys())r.set(n,n.defaultValue);if(this.size=r.size,this.unknownState=void 0,t)for(const[n,i]of Object.entries(t))this.updateFromUnknown(n,i)}};function YP(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new lX(t,XP(t));return t.__state=r,r}function XP(e){return e.__state?e.__state.sharedNodeState:u6(yr(),e.getType()).sharedNodeState}function qC(e){if(e)for(const t in e)return e}function uX(e){return e}function VC(e,t,r){for(const[n,i]of t.knownState){if(e.has(n.key))continue;e.add(n.key);const o=r?r.getValue(n):n.defaultValue;if(o!==i&&!n.isEqual(o,i))return!0}return!1}function KC(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,a]of Object.entries(n))if(!e.has(o)&&(e.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function HC(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function WC(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style,l=e.__state,u=t.__state;return(r===null||r===o)&&(n===null||n===a)&&(i===null||i===s)&&(e.__state===null||l===u||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&VC(h,d,f)||f&&VC(h,f,d)||d&&KC(h,d,f)||f&&KC(h,f,d))})(l,u))}function GC(e,t){const r=e.mergeWithSibling(t),n=Ot()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function JC(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&ne(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(WC(t,n)){n=GC(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&ne(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(WC(n,r)){n=GC(n,r);break}break}r.remove()}}else n.remove()}function Vs(e){return QC(e.anchor),QC(e.focus),e}function QC(e){for(;e.type==="element";){const t=e.getNode(),r=e.offset;let n,i;if(r===t.getChildrenSize()?(n=t.getChildAtIndex(r-1),i=!0):(n=t.getChildAtIndex(r),i=!1),ne(n)){e.set(n.__key,i?n.getTextContentSize():0,"text",!0);break}if(!V(n))break;e.set(n.__key,i?n.getChildrenSize():0,"element",!0)}}const eh=Symbol.for("@lexical/CachedTextSize");function YC(e,t){return Wy.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=Fo.get(n);if(o===void 0&&ee(345,n),V(o)){const a=hr.get(n);if(a!==void 0&&V(a)&&a.__parent!==o.__parent)r+=o.getTextContentSize();else{const s=ou.get(n),l=s&&s.__lexicalTextContent;typeof l!="string"&&ee(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const a=o[eh];a===void 0&&ee(347,o.getType(),n),r+=a}n=o.__next}return r},{editor:kt})}function ZP(e){V(e)||e[eh]===void 0&&(e[eh]=ne(e)?e.__text.length:e.getTextContentSize())}const cX=4;let th,kt,rh,ht="",Nr=null,Mn=null,kn=null;function ma(){return{firstTextKey:kn,format:Nr,style:Mn}}function Xi(e){e.firstTextKey!==null&&(Nr=e.format,Mn=e.style,kn=e.firstTextKey)}function Hy(e){if(kn!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&ee(348),t===null)return;const r=hr.get(t);ne(r)&&(Nr=r.getFormat(),Mn=r.getStyle(),kn=t)}let Ig,Sf,Ef,Fo,Wy,hr,ou,Gy,nh,au,Ga=!1,hm=!1;function Zs(e,t){const r=Fo.get(e),n=hr.has(e);if(t!==null){const i=Zy(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(kt._keyToDOMMap.delete(e),V(r)){const i=Tm(r,Fo);Jy(i,0,i.length-1,null)}if(r!==void 0){for(const i of Ti(r).values()){const o=Yy(i);Zs(i,null),o!==null&&o.remove()}DS(nh,rh,Ig,r,"destroyed")}}}function Jy(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&Zs(o,n)}}function Al(e,t){e.setProperty("text-align",t)}const dX="40px";function eO(e,t){const r=th.theme.indent;if(typeof r=="string"){const n=e.classList.contains(r);t>0&&!n?e.classList.add(r):t<1&&n&&e.classList.remove(r)}e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * var(--lexical-indent-base-value, ${dX}))`)}function tO(e,t){const r=e.style;t===0?Al(r,""):t===1?Al(r,"left"):t===2?Al(r,"center"):t===3?Al(r,"right"):t===4?Al(r,"justify"):t===5?Al(r,"start"):t===6&&Al(r,"end")}function Qy(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(Ar(n))return null;const o=n.getParent();return o===null||sr(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function rO(e){const t=rr().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function nO(e,t,r){t||e.contentEditable==="false"?AZ(r,kt):r.removeAttribute("contenteditable")}function XC(e,t,r){const n=ht,i=ma();ht="";let o="";const a=ct(e);for(const[s,l]of r){const u=rO(s);nO(t,a,u),t.appendChild(u),ht="";const d=ma();el(l,po(e,u,kt)),Xi(d),iO(e,s,t,u),o+=ht}return Xi(i),ht=n,o}function Ti(e){return Xa(e)&&e.__slots!==null?e.__slots:$6}function iO(e,t,r,n){const i=au.$getSlotTargetElement(e,t,r,kt);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function Yy(e){const t=ou.get(e);return t!==void 0?t.parentElement:null}function ZC(e,t,r){const n=Ti(e),i=Ti(t);for(const[d,f]of n)if(!i.has(d)){const h=Yy(f);Zs(f,null),h!==null&&h.remove()}const o=ht,a=ma();let s="",l=null;const u=ct(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?Yy(h):null;ht="";const m=ma();if(p===null){p=rO(d);let g=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){g=v;break}r.insertBefore(p,g),el(f,po(t,p,kt))}else h===f?qa(f,p):(h!==void 0&&Zs(h,p),el(f,po(t,p,kt)));if(Xi(m),nO(r,u,p),iO(t,d,r,p),s+=ht,p.parentElement===r){const g=l===null?r.firstChild:l.nextSibling;g!==p&&r.insertBefore(p,g),l=p}}return Xi(a),ht=o,s}function el(e,t){const r=hr.get(e);if(r===void 0&&ee(60),t!==null){const i=Fo.get(e);if(i!==void 0){const o=ou.get(e);if(o!==void 0){const a=du(i)?i.__slotHost:null,s=du(r)?r.__slotHost:null,l=i.__parent!==r.__parent||a!==s,u=s!==null&&o.parentElement!==t.element;if(l||u)return t.insertChild(o),qa(e,t.element)}}}const n=au.$createDOM(r,kt);if((function(i,o,a){const s=a._keyToDOMMap;h6(o,a,i),s.set(i,o)})(e,n,kt),ne(r)?n.setAttribute("data-lexical-text","true"):ct(r)&&(n.setAttribute("data-lexical-decorator","true"),RZ(n,{captureSelection:!0})),V(r)){const i=r.__indent,o=r.__size;Qy(n,r),i!==0&&eO(n,i);const a=Ti(r),s=a.size>0?XC(r,n,a):"";if(o===0)n.__lexicalTextContent=s,n.__lexicalFirstTextKey=null,ht+=s,a.size>0&&(n.__lexicalSlotTextLength=s.length);else{const u=ht,d=o-1;if(Xy(Tm(r,hr),r,0,d,po(r,n,kt)),s!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=s+f,ht=u+s+f}a.size>0&&(n.__lexicalSlotTextLength=s.length)}const l=r.__format;l!==0&&tO(n,l),r.isInline()||oO(null,r,n)}else{const i=r.getTextContent();if(ct(r)){const o=r.decorate(kt,th);o!==null&&aO(e,o),n.contentEditable="false";const a=Ti(r);a.size>0&&XC(r,n,a)}ht+=i}return t!==null&&t.insertChild(n),au.$decorateDOM(r,null,n,kt),ZP(r),DS(nh,rh,Ig,r,"created"),n}function Xy(e,t,r,n,i){const o=ht,a=ma();ht="",Nr=null,Mn=null,kn=null;let s=r;for(;s<=n;++s){const u=ma();el(e[s],i);const d=hr.get(e[s]);d!==null&&ne(d)?Nr===null&&(Nr=d.getFormat(),Mn=d.getStyle(),kn=d.__key):V(d)&&s<n&&!d.isInline()&&(ht+=jl),Xi(u)}const l=kt._keyToDOMMap.get(t.__key);l===void 0&&ee(349,t.__key),l.__lexicalTextContent=ht,l.__lexicalFirstTextKey=kn,ht=o+ht,Xi(a)}function oO(e,t,r){const n=po(t,r,kt),i=n.element.__lexicalLastChildKind??null,o=(function(a,s){if(a){const l=a.__last;if(l){const u=s.get(l);if(u)return Yn(u)?"line-break":ct(u)&&u.isInline()?"decorator":null}return Ti(a).size>0?null:"empty"}return null})(t,hr);i!==o&&n.setManagedLineBreak(o)}function fX(e,t,r){var n;Nr=null,Mn=null,kn=null,(function(i,o,a){const s=ht,l=i.__size,u=o.__size;ht="";const d=a.element,f=kt._keyToDOMMap.get(o.__key);f===void 0&&ee(351,o.__key);const h=u-l;if(!Ga&&Math.abs(h)<=1&&l>=cX&&i.__first===o.__first&&(h!==0||!kt._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,m=Gy.get(i.__key);if(!Ga&&typeof p=="string"&&m!==void 0){const g=(function(v,_){const x=_.size;if(x===0||x>=v.__size)return null;let w=v.__last,E=null,C=0;for(;w!==null&&C<x;){if(!_.has(w))return null;E=w;const k=hr.get(w);if(k===void 0)return null;w=k.__prev,C++}return C!==x||w!==null&&_.has(w)?null:E})(o,m);if(g!==null){const v=m.size;if(h===0){const _=YC(g,v);let x=g,w=0;for(;x!==null&&w<v;){const $=hr.get(x);if($===void 0)break;const N=ma();qa(x,d),ne($)&&Nr===null&&(Nr=$.getFormat(),Mn=$.getStyle(),kn=$.__key),Xi(N),x=$.__next,w++}let E="";for(x=g,w=0;x!==null&&w<v;){const $=hr.get(x);if($===void 0)break;let N;if(V($)){const M=kt._keyToDOMMap.get(x),P=M&&M.__lexicalTextContent;typeof P!="string"&&ee(352,$.getType()),N=P}else N=$.getTextContent();E+=N,w<v-1&&V($)&&!$.isInline()&&(E+=jl),x=$.__next,w++}const C=f.__lexicalSlotTextLength||0,k=C>0?p.slice(C):p,A=k.slice(0,k.length-_)+E;return f.__lexicalTextContent=A,ht=s+A,void eR(o,f,m)}if((function(_,x,w,E,C,k,A,$){if($!==1&&$!==-1||A!==($===1?2:1))return!1;const M=A-$;let P=_.__last;for(let ge=0;ge<M-1;ge++){if(P===null)return!1;const be=Fo.get(P);if(be===void 0)return!1;P=be.__prev}if(P===null)return!1;const I=hr.get(k),U=Fo.get(P);if(I===void 0||U===void 0||I.__prev!==U.__prev)return!1;const B=[];let q=k;for(let ge=0;ge<A;ge++){if(q===null)return!1;B.push(q);const be=hr.get(q);q=be?be.__next:null}const W=[];q=P;for(let ge=0;ge<M;ge++){if(q===null)return!1;W.push(q);const be=Fo.get(q);q=be?be.__next:null}const J=new Set(W),K=new Set(B),G=[];let re=0,oe=0;for(;re<M&&oe<A;)if(B[oe]===W[re])G.push({key:B[oe],kind:"reconcile"}),re++,oe++;else if(K.has(W[re])){if(J.has(B[oe]))return!1;G.push({key:B[oe],kind:"create",nextIndex:oe}),oe++}else G.push({key:W[re],kind:"destroy"}),re++;for(;re<M;)G.push({key:W[re++],kind:"destroy"});for(;oe<A;)G.push({key:B[oe],kind:"create",nextIndex:oe}),oe++;const _e=YC(P,M);for(const ge of G){const be=ma();if(ge.kind==="reconcile")qa(ge.key,w.element);else if(ge.kind==="destroy")Zs(ge.key,w.element);else{let mt=null;for(let fr=ge.nextIndex+1;fr<A;fr++){const Mt=kt._keyToDOMMap.get(B[fr]);if(Mt!==void 0){mt=Mt;break}}el(ge.key,w.withBefore(mt??w.before))}if(ge.kind!=="destroy"){const mt=hr.get(ge.key);mt&&ne(mt)&&Nr===null&&(Nr=mt.getFormat(),Mn=mt.getStyle(),kn=mt.__key)}Xi(be)}let Re="";for(let ge=0;ge<A;ge++){const be=hr.get(B[ge]);if(be===void 0)return!1;let mt;if(V(be)){const fr=kt._keyToDOMMap.get(B[ge]),Mt=fr&&fr.__lexicalTextContent;typeof Mt!="string"&&ee(350,be.getType()),mt=Mt}else mt=be.getTextContent();Re+=mt,ge<A-1&&V(be)&&!be.isInline()&&(Re+=jl)}const Te=E.__lexicalSlotTextLength||0,He=Te>0?C.slice(Te):C;return E.__lexicalTextContent=He.slice(0,He.length-_e)+Re,!0})(i,0,a,f,p,g,v,h)){const _=f.__lexicalTextContent;return typeof _!="string"&&ee(353),ht=s+_,void eR(o,f,m)}}}if(h===0){let g=i.__first,v=0;for(;g!==null;){const _=hr.get(g);if(_===void 0)break;const x=Ga||Ef.has(g)||Sf.has(g),w=ma();if(x)qa(g,d);else{let E,C;if(V(_)){C=ou.get(g);const k=C&&C.__lexicalTextContent;typeof k!="string"&&ee(354,_.getType()),E=k}else E=_.getTextContent();ht+=E,C!==void 0&&Hy(C)}ne(_)?Nr===null&&(Nr=_.getFormat(),Mn=_.getStyle(),kn=_.__key):V(_)&&v<u-1&&!_.isInline()&&(ht+=jl),Xi(w),g=_.__next,v++}return f.__lexicalTextContent=ht,f.__lexicalFirstTextKey=kn,void(ht=s+ht)}}if(l===1&&u===1){const p=i.__first,m=o.__first;if(p===m)qa(p,d);else{const v=Zy(p),_=el(m,null);try{v.parentNode===d?d.replaceChild(_,v):a.insertChild(_)}catch(x){if(typeof x=="object"&&x!=null){const w=`${x.toString()} Parent: ${d.tagName}, new child: {tag: ${_.tagName} key: ${m}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(w)}throw x}Zs(p,null)}const g=hr.get(m);ne(g)&&Nr===null&&(Nr=g.getFormat(),Mn=g.getStyle(),kn=g.__key)}else{const p=Tm(i,Fo),m=Tm(o,hr);if(p.length!==l&&ee(227),m.length!==u&&ee(228),l===0)u!==0&&Xy(m,o,0,u-1,a);else if(u===0){if(l!==0){const g=a.after==null&&a.before==null&&Ti(o).size===0&&a.element.__lexicalLineBreak==null;Jy(p,0,l-1,g?null:d),g&&(d.textContent="")}}else(function(g,v,_,x,w,E){const C=x-1,k=w-1;let A,$,N=E.getFirstChild(),M=0,P=0;for(;M<=C&&P<=k;){const B=v[M],q=_[P],W=ma();if(B===q)N=b_(qa(q,E.element)),M++,P++;else{if($===void 0&&($=tR(_,P)),A===void 0)A=tR(v,M);else if(!A.has(B)){M++,Xi(W);continue}if(!$.has(B)){N=b_(Zy(B)),Zs(B,E.element),M++,A.delete(B),Xi(W);continue}if(A.has(q)){const K=Kc(kt,q);K!==N&&E.withBefore(N??E.before).insertChild(K),N=b_(qa(q,E.element)),M++,P++}else el(q,E.withBefore(N??E.before)),P++}const J=hr.get(q);J!==null&&ne(J)?Nr===null&&(Nr=J.getFormat(),Mn=J.getStyle(),kn=J.__key):V(J)&&P<=k&&!J.isInline()&&(ht+=jl),Xi(W)}const I=M>C,U=P>k;if(I&&!U){const B=_[k+1],q=B===void 0?null:kt.getElementByKey(B);Xy(_,g,P,k,E.withBefore(q??E.before))}else U&&!I&&Jy(v,M,C,E.element)})(o,p,m,l,u,a)}f.__lexicalTextContent=ht,f.__lexicalFirstTextKey=kn,ht=s+ht})(e,t,po(t,r,kt)),sr(t)||(n=t,Nr==null||Nr===n.__textFormat||hm||n.setTextFormat(Nr),(function(i){Mn==null||Mn===i.__textStyle||hm||i.setTextStyle(Mn)})(t))}function eR(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const a=hr.get(o);if(a===void 0){o=null;break}if(a.__parent===i)break;o=a.__parent}if(o!==null&&!r.has(o)){const a=hr.get(n);if(ne(a))return Nr=a.getFormat(),void(Mn=a.getStyle())}}t.__lexicalFirstTextKey=kn}function qa(e,t){const r=Fo.get(e);let n=hr.get(e);r!==void 0&&n!==void 0||ee(61);const i=Ga||Ef.has(e)||Sf.has(e),o=Kc(kt,e);if(r===n&&!i){let a;if(V(r)){const s=o.__lexicalTextContent;typeof s!="string"&&ee(355,r.getType()),a=s,Hy(o)}else a=r.getTextContent();return ht+=a,o}if(r!==n&&i&&DS(nh,rh,Ig,n,"updated"),au.$updateDOM(n,r,o,kt)){const a=el(e,null);return t===null&&ee(62),t.replaceChild(a,o),Zs(e,null),a}if(V(r)){V(n)||ee(334,e);const a=n.__indent;(Ga||a!==r.__indent)&&eO(o,a);const s=n.__format;(Ga||s!==r.__format)&&tO(o,s);const l=i&&(Ti(n).size>0||Ti(r).size>0)?ZC(r,n,o):"";if(i){const u=ht;if(fX(r,n,o),Ar(n)||n.isInline()||oO(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,ht=u+l+d,o.__lexicalSlotTextLength=l.length}else(Ti(n).size>0||Ti(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&ee(356,r.getType()),ht+=u,Hy(o)}if((Ga||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(Qy(o,n),Ar(n)&&!Ga))for(const u of n.getChildren())V(u)&&Qy(Kc(kt,u.getKey()),u)}else{const a=n.getTextContent();if(ct(n)){const s=n.decorate(kt,th);s!==null&&aO(e,s),i&&(Ti(n).size>0||Ti(r).size>0)&&ZC(r,n,o)}ht+=a}if(!hm&&Ar(n)){const a=n.getLatest();if(a.__cachedText!==ht){const s=a.getWritable();s.__cachedText=ht,n=s}}return au.$decorateDOM(n,r,o,kt),ZP(n),o}function aO(e,t){let r=kt._pendingDecorators;const n=kt._decorators;if(r===null){if(n[e]===t)return;r=p6(kt)}r[e]=t}function b_(e){let t=e.nextSibling;return t!==null&&t===kt._blockCursorElement&&(t=t.nextSibling),t}function tR(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function hX(e,t,r,n,i,o){ht="",Nr=null,Mn=null,kn=null,Ga=n===2,kt=r,th=r._config,au=r._config.dom||km,rh=r._nodes,Ig=kt._listeners.mutation,Sf=i,Ef=o,Fo=e._nodeMap,Wy=e,hr=t._nodeMap,hm=t._readOnly,ou=KP(r._keyToDOMMap),Gy=(function(){const s=new Map,l=u=>{for(const d of u){const f=hr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=s.get(h);p===void 0&&(p=new Set,s.set(h,p)),p.add(d)}};return l(Sf.keys()),l(Ef),s})();const a=new Map;return nh=a,qa("root",null),kt=void 0,rh=void 0,Sf=void 0,Ef=void 0,Fo=void 0,Wy=void 0,hr=void 0,th=void 0,ou=void 0,Gy=void 0,nh=void 0,au=km,a}function Zy(e){const t=ou.get(e);return t===void 0&&ee(75,e),t}function je(e){return{type:e}}const sO=je("SELECTION_CHANGE_COMMAND"),pX=je("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),lO=je("CLICK_COMMAND"),uO=je("BEFORE_INPUT_COMMAND"),cO=je("INPUT_COMMAND"),dO=je("COMPOSITION_START_COMMAND"),fO=je("COMPOSITION_END_COMMAND"),Kl=je("DELETE_CHARACTER_COMMAND"),Ec=je("INSERT_LINE_BREAK_COMMAND"),ih=je("INSERT_PARAGRAPH_COMMAND"),wc=je("CONTROLLED_TEXT_INSERTION_COMMAND"),gS=je("PASTE_COMMAND"),P0=je("REMOVE_TEXT_COMMAND"),oh=je("DELETE_WORD_COMMAND"),ah=je("DELETE_LINE_COMMAND"),Io=je("FORMAT_TEXT_COMMAND"),mX=je("SET_TEXT_FORMAT_COMMAND"),Pg=je("UNDO_COMMAND"),Og=je("REDO_COMMAND"),hO=je("KEYDOWN_COMMAND"),pO=je("KEY_ARROW_RIGHT_COMMAND"),mO=je("MOVE_TO_END"),gO=je("KEY_ARROW_LEFT_COMMAND"),vO=je("MOVE_TO_START"),_O=je("KEY_ARROW_UP_COMMAND"),bO=je("KEY_ARROW_DOWN_COMMAND"),sh=je("KEY_ENTER_COMMAND"),yO=je("KEY_SPACE_COMMAND"),vS=je("KEY_BACKSPACE_COMMAND"),xO=je("KEY_ESCAPE_COMMAND"),SO=je("KEY_DELETE_COMMAND"),EO=je("KEY_TAB_COMMAND"),gX=je("INSERT_TAB_COMMAND"),vX=je("INDENT_CONTENT_COMMAND"),rR=je("OUTDENT_CONTENT_COMMAND"),wO=je("DROP_COMMAND"),_X=je("FORMAT_ELEMENT_COMMAND"),kO=je("DRAGSTART_COMMAND"),CO=je("DRAGOVER_COMMAND"),bX=je("DRAGEND_COMMAND"),Mg=je("COPY_COMMAND"),_S=je("CUT_COMMAND"),RO=je("SELECT_ALL_COMMAND"),yX=je("CLEAR_EDITOR_COMMAND"),xX=je("CLEAR_HISTORY_COMMAND"),$p=je("CAN_REDO_COMMAND"),Tp=je("CAN_UNDO_COMMAND"),SX=je("FOCUS_COMMAND"),EX=je("BLUR_COMMAND"),wX=je("KEY_MODIFIER_COMMAND");function kX(e){const t=new Map;return{dispose(){for(const r of t.values())r.dispose();t.clear()},register(r,n){let i=t.get(r);i===void 0&&(i={dispose:e(r,n),holders:new Set},t.set(r,i));const o=()=>{const a=t.get(r);a&&a.holders.delete(o)&&a.holders.size===0&&(t.delete(r),a.dispose())};return i.holders.add(o),o}}}function CX(e,t,r,n){return e.addEventListener(t,r,n),e.removeEventListener.bind(e,t,r,n)}const Oa=Object.freeze({}),e1=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&lh(r),!t.isComposing()&&Se(t,hO,e)}],["pointerdown",function(e,t){const r=E6(e),n=e.pointerType;_d(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&so(t,()=>{$m(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){Se(t,dO,e)}],["compositionend",function(e,t){const r=t._inputState;al?r.compositionPhase="ending-firefox":sl||!jh&&!qh?Se(t,fO,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;lh(r),so(t,()=>{NO(e,t)||t.dispatchCommand(cO,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){so(t,()=>{const r=he(),n=Zn(yi(t)),i=fd();if(n){if(te(r)){const o=r.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!Ar(a)&&Jr().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=ho(n,t._rootElement).anchorNode;(tt(o)||bi(o))&&bn(xS(i,n,t,e))}}Se(t,lO,e)})}],["cut",Oa],["copy",Oa],["dragstart",Oa],["dragover",Oa],["dragend",Oa],["paste",Oa],["focus",Oa],["blur",Oa],["drop",Oa]];Bc&&e1.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||al&&_6(n)||i!=="insertCompositionText"&&so(n,()=>{NO(r,n)||Se(n,uO,r)},{event:r})})(e,t)]);const t1=new WeakMap,pm=new WeakMap,RX=kX(e=>(e.addEventListener("selectionchange",sR),()=>e.removeEventListener("selectionchange",sR)));function AO(e,t,r,n,i,o){const a=e.anchor,s=e.focus,l=a.getNode(),u=Ot();let d;if(o!==void 0)d=o;else{const g=Zn(yi(u));d=g!==null?ho(g,u._rootElement):null}const f=d!==null?d.anchorNode:null,h=a.key,p=u.getElementByKey(h),m=r.length;return h!==s.key||!ne(l)||(!i&&(!Bc||u._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&m<2||m6(r))&&a.offset!==s.offset&&!l.isComposing()||Di(l)||l.isDirty()&&m>1||(i||!Bc)&&p!==null&&!l.isComposing()&&f!==tl(l,p,u)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!l.isComposing()&&(l.getFormat()!==e.format||l.getStyle()!==e.style)||(function(g,v){if(v.isSegmented())return!0;if(!g.isCollapsed())return!1;const _=g.anchor.offset,x=v.getParentOrThrow(),w=Hl(v);return _===0?!v.canInsertTextBefore()||!x.canInsertTextBefore()&&!v.isComposing()||w||(function(E){const C=E.getPreviousSibling();return(ne(C)||V(C)&&C.isInline())&&!C.canInsertTextAfter()})(v):_===v.getTextContentSize()&&(!v.canInsertTextAfter()||!x.canInsertTextAfter()&&!v.isComposing()||w)})(e,l)}function nR(e,t){return bi(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function iR(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:a}=ho(e,t._rootElement),s=t._inputState;s.isSelectionChangeFromDOMUpdate&&(s.isSelectionChangeFromDOMUpdate=!1,nR(n,i)&&nR(o,a)&&!s.postDeleteSelectionToRestore)||so(t,()=>{if(!r)return void bn(null);if(!Wh(t,n,o))return;let l=he();if(s.postDeleteSelectionToRestore&&te(l)&&l.isCollapsed()){const u=l.anchor,d=s.postDeleteSelectionToRestore.anchor;(u.key===d.key&&u.offset===d.offset+1||u.offset===1&&d.getNode().is(u.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),bn(l))}if(s.postDeleteSelectionToRestore=null,te(l)){const u=l.anchor,d=u.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=yi(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:m,offset:g,key:v,timeStamp:_}=s.collapsedSelectionFormat,x=Jr(),w=t.isComposing()===!1&&x.getTextContent()==="";if(h<_+200&&u.offset===g&&u.key===v)O0(l,p,m);else if(u.type==="text")ne(d)||ee(141),$O(l,d);else if(u.type==="element"&&!w){V(d)||ee(259);const E=u.getNode();E.isEmpty()?(function(C,k){const A=k.getTextFormat(),$=k.getTextStyle();O0(C,A,$)})(l,E):O0(l,l.format,"")}}else{const f=u.key,h=l.focus.key,p=l.getNodes(),m=p.length,g=l.isBackward(),v=g?a:i,_=g?i:a,x=g?h:f,w=g?f:h;let E=2047,C=!1;for(let k=0;k<m;k++){const A=p[k],$=A.getTextContentSize();if(ne(A)&&$!==0&&!(k===0&&A.__key===x&&v===$||k===m-1&&A.__key===w&&_===0)&&(C=!0,E&=A.getFormat(),E===0))break}l.format=C?E:0}}Se(t,sO,void 0)})}function O0(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function $O(e,t){O0(e,t.getFormat(),t.getStyle())}function TO(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function oR(e){const{lastKeyCode:t}=Ot()._inputState;if(e==null||e.length<=1||t==null)return;const r=t.length===1?t:t==="Enter"?`
|
|
20
|
+
`:t==="Tab"?" ":null;if(!r)return;const n=he();if(!te(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!ne(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const a=i.getNextSibling();if(r===`
|
|
21
|
+
`){if(Yn(a))a.selectEnd();else if(!a){const s=Qt(i,jc),l=s&&s.getNextSibling();V(l)&&l.selectStart()}}else r===" "?su(a)&&a.selectEnd():ne(a)&&a.getTextContent()[0]===r&&a.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function lh(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function aR(e){lh(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>lh(e),0)}function NO(e,t){const r=E6(e);if(tt(r)&&$m(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=dh(n.ownerDocument);return i!==null&&n.contains(i)&&$m(i,t)}function AX(e){const t=e.inputType,r=TO(e),n=Ot(),i=n._inputState,o=he();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(lh(i),e.preventDefault(),te(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(t==="deleteContentBackward"){if(o===null){const f=fd();if(!te(f))return!0;bn(f.clone())}if(te(o)){const f=o.anchor.key===o.focus.key;if((function(h,p){return h.lastKeyCode==="MediaLast"&&p<h.lastKeyDownTimeStamp+30})(i,e.timeStamp)&&n.isComposing()&&f){if(cn(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{so(n,()=>{cn(null)})},30),te(o)){const h=o.anchor.getNode();h.markDirty(),ne(h)||ee(142),$O(o,h)}}else{if(cn(null),sl&&r!==null&&!r.collapsed&&(o.applyDOMRange(r),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),p=h.getTextContent(),m=h.canInsertTextAfter(),g=o.anchor.offset===0&&o.focus.offset===p.length;let v=cm&&f&&!g&&m;if(v&&o.isCollapsed()&&(v=!ct(fZ(o.anchor,!0))),!v){Se(n,Kl,!0);const _=he();cm&&te(_)&&_.isCollapsed()&&(i.postDeleteSelectionToRestore=_,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!te(o))return!0;const a=e.data;i.unprocessedBeforeInputData!==null&&TS(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Ar(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const s=o.anchor,l=o.focus,u=s.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(a===`
|
|
22
|
+
`)e.preventDefault(),Se(n,Ec,!1);else if(a===jl)e.preventDefault(),Se(n,ih,void 0);else if(a==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else a!=null&&AO(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Se(n,wc,a),oR(a)):i.unprocessedBeforeInputData=a;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Se(n,wc,e),oR((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;cn(null),f||Se(n,wc,e),M0(h);break}case"insertLineBreak":cn(null),Se(n,Ec,!1);break;case"insertParagraph":cn(null),i.isInsertLineBreak&&!sl?(i.isInsertLineBreak=!1,Se(n,Ec,!1)):Se(n,ih,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Se(n,gS,e);break;case"deleteByComposition":(function(f,h){return f!==h||V(f)||V(h)||!Hl(f)||!Hl(h)})(u,d)&&Se(n,P0,e);break;case"deleteByDrag":cu(n1),Se(n,P0,e);break;case"deleteByCut":Se(n,P0,e);break;case"deleteContent":Se(n,Kl,!1);break;case"deleteWordBackward":Se(n,oh,!0);break;case"deleteWordForward":Se(n,oh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Se(n,ah,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Se(n,ah,!1);break;case"formatStrikeThrough":Se(n,Io,"strikethrough");break;case"formatBold":Se(n,Io,"bold");break;case"formatItalic":Se(n,Io,"italic");break;case"formatUnderline":Se(n,Io,"underline");break;case"historyUndo":Se(n,Pg,void 0);break;case"historyRedo":Se(n,Og,void 0)}return!0}function $X(e){const t=Ot(),r=t._inputState,n=he(),i=e.data,o=TO(e);let a=!1;if(i!=null&&te(n)){const s=Zn(yi(t)),l=s!==null?ho(s,t._rootElement):null,u=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&!t.isComposing();u&&(r.hadOrphanedCompositionEvents=!0);const d=n.anchor.getNode(),f=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&t.isComposing()&&ne(d)&&Di(d);if(!u&&!f&&AO(n,o,i,e.timeStamp,!1,l)){if(a=!0,r.compositionPhase==="ending-firefox"){const _=mm(t,i);if(r.compositionPhase="idle",_)return cu(uh),DR(),!0}const h=n.anchor.getNode();if(s===null||l===null)return!0;const p=n.isBackward(),m=p?n.anchor.offset:n.focus.offset,g=p?n.focus.offset:n.anchor.offset;Bc&&!n.isCollapsed()&&ne(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,m)+i+h.getTextContent().slice(m+g)===v6(l.anchorNode)||Se(t,wc,i);const v=i.length;al&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),cm&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,cn(null))}}return a||(TS(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(mm(t,i||void 0),cu(uh),r.compositionPhase="idle")),DR(),!0}function TX(e){const t=Ot(),r=t._inputState,n=he();if(te(n)&&!t.isComposing()){r.compositionPhase="composing",r.hadOrphanedCompositionEvents=!1;const i=n.anchor,o=n.anchor.getNode();if(cn(i.key),cu(zO),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!cm&&(o.getFormat()!==n.format||ne(o)&&o.getStyle()!==n.style)||ne(o)&&(Di(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){Se(t,wc,pS);const a=he();te(a)&&cn(a.anchor.key)}}return!0}function NX(e){const t=Ot();return t._inputState.compositionPhase="idle",mm(t,e.data),cu(uh),!0}function M0(e){if(e===null)return;const t=tr(e);if(!ne(t)||t.getType()==="text"||Di(t)||!t.isAttached())return;const r=he(),n=te(r)&&r.anchor.key===e?r.anchor.offset:null,i=Rr(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),n!==null){const o=Math.min(n,i.getTextContentSize());i.select(o,o)}}function mm(e,t){const r=e._compositionKey;if(cn(null),r!==null&&t!=null){if(t===""){const i=tr(r),o=e.getElementByKey(r),a=o!==null&&ne(i)?tl(i,o,e):null;if(a!==null&&a.nodeValue!==null&&ne(i)){const s=Zn(yi(e)),l=s&&ho(s,e._rootElement);let u=null,d=null;l!==null&&l.anchorNode===a&&(u=l.anchorOffset,d=l.focusOffset),NS(i,a.nodeValue,u,d,!0)}return M0(r),!1}if(t[t.length-1]===`
|
|
23
|
+
`){const i=he();if(te(i)||Xt(i)){if(te(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return Se(e,sh,null),M0(r),!1}}const n=tr(r);if(n!==null&&ne(n)&&Di(n)){n.markDirty();const i=he(),o=n.getTextContentSize(),a=te(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(a,a).insertText(t),!0}}return TS(!0,e,t),M0(r),!1}function DX(e){const t=Ot(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=IR(e);if(n&&so(t,()=>{mm(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return Gt(n,"ArrowRight",{shiftKey:"any"})})(e))Se(t,pO,e);else if((function(n){return Gt(n,"ArrowRight",{...La,shiftKey:"any"})})(e))Se(t,mO,e);else if((function(n){return Gt(n,"ArrowLeft",{shiftKey:"any"})})(e))Se(t,gO,e);else if((function(n){return Gt(n,"ArrowLeft",{...La,shiftKey:"any"})})(e))Se(t,vO,e);else if((function(n){return Gt(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))Se(t,_O,e);else if((function(n){return Gt(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))Se(t,bO,e);else if((function(n){return Gt(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,Se(t,sh,e);else if((function(n){return n.key===" "})(e))Se(t,yO,e);else if((function(n){return Ao&&Gt(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,Se(t,Ec,!0);else if((function(n){return Gt(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,Se(t,sh,e);else if((function(n){return Gt(n,"Backspace",{shiftKey:"any"})||Ao&&Gt(n,"h",{ctrlKey:!0})})(e))IR(e)?Se(t,vS,e)&&aR(r):(e.preventDefault(),Se(t,Kl,!0));else if((function(n){return n.key==="Escape"})(e))Se(t,xO,e);else if((function(n){return Gt(n,"Delete",{})||Ao&&Gt(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?Se(t,SO,e):(e.preventDefault(),Se(t,Kl,!1));else if((function(n){return Gt(n,"Backspace",FR)})(e))e.preventDefault(),Se(t,oh,!0);else if((function(n){return Gt(n,"Delete",FR)})(e))e.preventDefault(),Se(t,oh,!1);else if((function(n){return Ao&&Gt(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),Se(t,ah,!0);else if((function(n){return Ao&&(Gt(n,"Delete",{metaKey:!0})||Gt(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),Se(t,ah,!1);else if((function(n){return Gt(n,"b",La)})(e))e.preventDefault(),Se(t,Io,"bold");else if((function(n){return Gt(n,"u",La)})(e))e.preventDefault(),Se(t,Io,"underline");else if((function(n){return Gt(n,"i",La)})(e))e.preventDefault(),Se(t,Io,"italic");else if((function(n){return Gt(n,"Tab",{shiftKey:"any"})})(e))Se(t,EO,e);else if((function(n){return Gt(n,"z",La)})(e))e.preventDefault(),Se(t,Pg,void 0);else if((function(n){return Ao?Gt(n,"z",{metaKey:!0,shiftKey:!0}):Gt(n,"y",{ctrlKey:!0})||Gt(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),Se(t,Og,void 0);else{const n=t._editorState._selection;(function(i){return Gt(i,"a",La)})(e)?(e.preventDefault(),Se(t,RO,e)&&aR(r)):n===null||te(n)||((function(i){return Gt(i,"c",La)})(e)?(e.preventDefault(),Se(t,Mg,e)):(function(i){return Gt(i,"x",La)})(e)&&(e.preventDefault(),Se(t,_S,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(wX,e),!0}function DO(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const kc=new Map;function sR(e){const t=gZ(e.target);if(t===null)return;const r=FS(e.target);let n=null,i=null;const o=r!==null?pm.get(r):void 0;if(r!==null){if(o!==void 0){const f=o.editors;let h=o.hasShadowEditor;if(h===void 0){h=!1;for(const p of f)if(p._rootElement!==null&&ls(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,m=null;for(const g of f){const v=g._rootElement;if(v===null)continue;const _=ho(t,v).anchorNode;if(_!==null&&Rc(_)===g){if(ls(v.getRootNode())){n=g,i=_;break}p===null&&(p=g,m=_)}}n===null&&p!==null&&(n=p,i=m)}else{const p=t.anchorNode;p===null||tt(p)&&p.shadowRoot!==null||(n=Rc(p),n!==null&&(i=p))}}if(n===null){const f=dh(r);n=f!==null?Rc(f):null}}if(n===null)return;if(n._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;so(n,()=>{const f=fd(),h=i??ho(t,n._rootElement).anchorNode;(tt(h)||bi(h))&&bn(xS(f,t,n,e))})}const a=$S(n),s=a[a.length-1],l=s._key,u=kc.get(l),d=u||s;d!==n&&iR(t,d,!1),iR(t,n,!0),n!==s?kc.set(l,n):u&&kc.delete(l)}function lR(e){e._lexicalHandled=!0}function uR(e){return e._lexicalHandled===!0}function FX(e){const t=t1.get(e);if(t===void 0)return;const r=pm.get(t);if(r===void 0)return;t1.delete(e);const n=Gh(e);Ug(n)?((function(o){if(o._parentEditor!==null){const a=$S(o),s=a[a.length-1]._key;kc.get(s)===o&&kc.delete(s)}else kc.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&ee(198);const i=DO(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function r1(e,t,r){un();const n=e.__key,i=e.getParent();if(i===null)return void($n(e)!==null&&ee(367,n,String($n(e))));const o=(function(s){const l=he();if(!te(l)||!V(s))return l;const{anchor:u,focus:d}=l,f=u.getNode(),h=d.getNode();return Hc(f,s)&&u.set(s.__key,0,"element"),Hc(h,s)&&d.set(s.__key,0,"element"),l})(e);let a=!1;if(te(o)&&t){const s=o.anchor,l=o.focus;s.key===n&&(ym(s,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),l.key===n&&(ym(l,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else Xt(o)&&t&&e.isSelected()&&e.selectPrevious();if(te(o)&&t&&!a){const s=e.getIndexWithinParent();Ja(e),Ll(o,i,s,-1)}else Ja(e);r||sr(i)||i.canBeEmpty()||!i.isEmpty()||r1(i,t),t&&o&&Ar(i)&&i.isEmpty()&&i.selectEnd()}const FO=Symbol.for("ephemeral");function gm(e){return e[FO]||!1}const cR={configurable:!0,enumerable:!1,value:void 0,writable:!0};class Mi{__type;__key;__parent;__prev;__next;__state;[eh];static getType(){const{ownNodeType:t}=PS(this);return t===void 0&&ee(64,this.name),t}static clone(t){ee(65,this.name)}$config(){return{}}config(t,r){const n=r.extends||A6(this.constructor);return Object.assign(r,{extends:n}),typeof t=="string"&&Object.assign(r,{type:t}),{[t]:r}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}resetOnCopyNodeFrom(t){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",cR),Object.defineProperty(this,eh,cR),d6(this,t)}getType(){return this.__type}isInline(){ee(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const r=tr(t);if(r===null)break;t=r.__parent!==null?r.__parent:$n(r)}return!1}isSelected(t){const r=t||he();if(r==null)return!1;const n=r.getNodes().some(i=>i.__key===this.__key);if(ne(this))return n;if(te(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(ct(this)&&this.isInline()&&i){const o=r.isBackward()?r.focus:r.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let r=t.getFirstChild(),n=0;for(;r!==null;){if(this.is(r))return n;n++,r=r.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:tr(t)}getParentOrThrow(){const t=this.getParent();return t===null&&ee(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const r=t.getParent();if(sr(r)||$n(t)!==null)return V(t)||t===this&&ct(t)||ee(194),t;t=r}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&ee(67,this.__key),t}getParents(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r),r=r.getParent();return t}getParentKeys(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r.__key),r=r.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:tr(t)}getPreviousSiblings(){const t=[],r=this.getParent();if(r===null)return t;let n=r.getFirstChild();for(;n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:tr(t)}getNextSiblings(){const t=[];let r=this.getNextSibling();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getCommonAncestor(t){const r=V(this)?this:this.getParent(),n=V(t)?t:t.getParent(),i=r&&n?h1(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=h1(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?I6(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&ee(279),!1)))}isParentOf(t){return Hc(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const a=o.__key;if(i.has(a)||(i.add(a),n.push(o)),o===t)break;const s=V(o)?r?o.getFirstChild():o.getLastChild():null;if(s!==null){o=s;continue}const l=r?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||n.push(u),u===t)break;let d=null,f=u;do{if(f===null&&ee(68),d=r?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||n.push(f)}while(d===null);o=d}return r||n.reverse(),n}isDirty(){const t=Ot()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(gm(this))return this;const t=tr(this.__key);return t===null&&ee(113),t}getWritable(){if(gm(this))return this;un();const t=_s(),r=Ot(),n=t._nodeMap,i=this.__key,o=this.getLatest(),a=r._cloneNotNeeded,s=he();if(s!==null&&s.setCachedNodes(null),a.has(i))return Cm(o),o;const l=k6(o);return a.add(i),Cm(l),n.set(i,l),l}getTextContent(){return T6(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){ee(70)}updateDOM(t,r,n){ee(71)}getDOMSlot(t){return new jP(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){ee(18,this.name)}updateFromJSON(t){return(function(r,n){const i=r.getWritable(),o=n.$;let a=o;for(const s of XP(i).flatKeys)s in n&&(a!==void 0&&a!==o||(a={...o}),a[s]=n[s]);return(i.__state||a)&&YP(r).updateFromJSON(a),i})(this,t)}static transform(){return null}remove(t){r1(this,!0,t)}replace(t,r){un();let n=he();n!==null&&(n=n.clone()),A_(this,t);const i=this.getLatest(),o=this.__key,a=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,d=s.getParent(),f=d!==null?s.getIndexWithinParent():-1;Ja(s),d!==null&&te(n)&&Ll(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),m=i.__prev,g=i.__next,v=i.__parent;r1(i,!1,!0),h===null?l.__first=a:h.getWritable().__next=a,s.__prev=m,p===null?l.__last=a:p.getWritable().__prev=a,s.__next=g,s.__parent=v,l.__size=u;let _=0;r&&(V(this)&&V(s)||ee(139),_=s.getChildrenSize(),s.splice(_,0,this.getChildren()));const x=lo(this);if(x.length>0){Xa(this)&&Xa(s)||ee(368,this.__key,s.__key);for(const w of x){const E=fu(this,w);E!==null&&(IZ(this,w),N6(s,w,E))}}if(te(n)){bn(n);const w=n.anchor,E=n.focus;w.key===o&&(r&&w.type==="element"?w.set(s.__key,_+w.offset,"element"):pR(w,s)),E.key===o&&(r&&E.type==="element"?E.set(s.__key,_+E.offset,"element"):pR(E,s))}return Qa()===o&&cn(a),s}insertAfter(t,r=!0){un(),A_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),a=he();let s=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(te(a)){const m=o.__key,g=a.anchor,v=a.focus;s=g.type==="element"&&g.key===m&&g.offset===p+1,l=v.type==="element"&&v.key===m&&v.offset===p+1}Ja(i),r&&te(a)&&Ll(a,o,p,-1)}else Ja(i);const u=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),f=i.__key,h=n.__next;if(u===null?d.__last=f:u.getWritable().__prev=f,d.__size++,n.__next=f,i.__next=h,i.__prev=n.__key,i.__parent=n.__parent,r&&te(a)){const p=this.getIndexWithinParent();Ll(a,d,p+1);const m=d.__key;s&&a.anchor.set(m,p+2,"element"),l&&a.focus.set(m,p+2,"element")}return t}insertBefore(t,r=!0){un(),A_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,a=he(),s=i.getParent(),l=s!==null?i.getIndexWithinParent():-1;Ja(i),s!==null&&r&&te(a)&&Ll(a,s,l,-1);const u=this.getPreviousSibling(),d=this.getParentOrThrow().getWritable(),f=n.__prev,h=this.getIndexWithinParent();return u===null?d.__first=o:u.getWritable().__next=o,d.__size++,n.__prev=o,i.__prev=f,i.__next=n.__key,i.__parent=n.__parent,r&&te(a)&&Ll(a,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return jt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){un();const n=Po(this);if(n!==null)return n.selectPrevious(t,r);const i=this.getPreviousSibling(),o=this.getParentOrThrow();if(i===null)return o.select(0,0);if(V(i))return i.select();if(!ne(i)){const a=i.getIndexWithinParent()+1;return o.select(a,a)}return i.select(t,r)}selectNext(t,r){un();const n=Po(this);if(n!==null)return n.selectNext(t,r);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(V(i))return i.select(0,0);if(!ne(i)){const a=i.getIndexWithinParent();return o.select(a,a)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function IO(e){return e instanceof Mi}const vm="historic",PO="history-push",wf="history-merge",OO="paste",MO="cut",LO="collaboration",IX="skip-scroll-into-view",PX="skip-dom-selection",n1="skip-selection-focus",zO="composition-start",uh="composition-end",OX="!important";function _m(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,a=!1,s=!1,l=0;const u=e.length;let d=-1;for(let p=0;p<u;p++){const m=e[p];if(o)m==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(a)d===-1&&(d=p),a=!1;else if(i===null)if(m!=="/"||e[p+1]!=="*")if(m!=='"'&&m!=="'")if(m!=="(")if(m!==")")if(s||m!==":"||l!==0){if(m===";"&&l===0){d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const g=r.trim(),v=n.trim();g!==""&&v!==""&&(t[g]=v),r="",n="",s=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),s=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=m;else d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),m==="\\"?a=!0:m===i&&(i=null)}d!==-1&&(s?n+=e.slice(d,u):r+=e.slice(d,u));const f=r.trim(),h=n.trim();return f!==""&&h!==""&&(t[f]=h),t}function MX(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===OX?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function Cc(e,t,r=""){if(t===r)return;const n=_m(r),i=_m(t);for(const o in i)delete n[o],MX(e,o,i[o]);for(const o in n)e.removeProperty(o)}function y_(e,t){return 16&t?"code":t&hS?"mark":32&t?"sub":64&t?"sup":null}function x_(e,t){return 1&t?"strong":2&t?"em":"span"}function UO(e,t,r,n,i){const o=n.classList;let a=Ac(i,"base");a!==void 0&&o.add(...a),a=Ac(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;a!==void 0&&(8&r&&4&r?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const u in ss){const d=ss[u];if(a=Ac(i,u),a!==void 0)if(r&d){if(s&&(u==="underline"||u==="strikethrough")){t&d&&o.remove(...a);continue}((t&d)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...a)}else t&d&&o.remove(...a)}}function BO(e,t,r){const n=r.isComposing(),i=e+(n?Zf:""),o=yr(),a=jg(o).$getDOMSlot(r,t,o),s=a.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void a.insertChild(rr().createTextNode(i));const l=s,u=l.nodeValue;if(u!==i)if(n||al){const[d,f,h]=(function(p,m){const g=p.length,v=m.length;let _=0,x=0;for(;_<g&&_<v&&p[_]===m[_];)_++;for(;x+_<g&&x+_<v&&p[g-x-1]===m[v-x-1];)x++;return[_,g-_-x,m.slice(_,v-x)]})(u,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function dR(e,t,r,n,i,o){BO(i,e,t);const a=o.theme.text;a!==void 0&&UO(0,0,n,e,a)}function Np(e,t){const r=rr().createElement(t);return r.appendChild(e),r}function i1(e){return e!=null&&e.__isInlineFormattable===!0}class vs extends Mi{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new vs(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",r){super(r),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return eX[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Qa()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=ss[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return lu(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const n=this.__format,i=y_(0,n),o=x_(0,n),a=i===null?o:i,s=rr().createElement(a);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),i!==null&&(l=rr().createElement(o),s.appendChild(l)),dR(l,this,0,n,this.__text,t);const u=this.__style;return u!==""&&Cc(s.style,u),s}updateDOM(t,r,n){const i=this.__text,o=t.__format,a=this.__format,s=y_(0,o),l=y_(0,a),u=x_(0,o),d=x_(0,a);if((s===null?u:s)!==(l===null?d:l))return!0;if(s===l&&u!==d){const g=r.firstChild;g==null&&ee(48);const v=rr().createElement(d);return dR(v,this,0,a,i,n),r.replaceChild(v,g),!1}let f=r;l!==null&&s!==null&&(f=r.firstChild,f==null&&ee(49)),BO(i,f,this);const h=n.theme.text;h!==void 0&&o!==a&&UO(0,o,a,f,h);const p=t.__style,m=this.__style;return p!==m&&Cc(r.style,m,p),!1}static importDOM(){return{"#text":()=>({conversion:BX,priority:0}),b:()=>({conversion:zX,priority:0}),code:()=>({conversion:Ma,priority:0}),em:()=>({conversion:Ma,priority:0}),i:()=>({conversion:Ma,priority:0}),mark:()=>({conversion:Ma,priority:0}),s:()=>({conversion:Ma,priority:0}),span:()=>({conversion:LX,priority:0}),strong:()=>({conversion:Ma,priority:0}),sub:()=>({conversion:Ma,priority:0}),sup:()=>({conversion:Ma,priority:0}),u:()=>({conversion:Ma,priority:0})}}static importJSON(t){return Rr().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:r}=super.exportDOM(t);return tt(r)||ee(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=Np(r,"b")),this.hasFormat("italic")&&(r=Np(r,"i")),this.hasFormat("strikethrough")&&(r=Np(r,"s")),this.hasFormat("underline")&&(r=Np(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,r){}setFormat(t){const r=this.getWritable();return r.__format=typeof t=="string"?ss[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?YY[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=lu(this.getFormat(),t,null);return this.setFormat(r)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const r=ZY[t];if(this.__mode===r)return this;const n=this.getWritable();return n.__mode=r,n}setTextContent(t){if(this.__text===t)return this;const r=this.getWritable();return r.__text=t,r}select(t,r){un();let n=t,i=r;const o=he(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!te(o))return XO(s,n,s,i,"text","text");{const l=Qa();l!==o.anchor.key&&l!==o.focus.key||cn(s),o.setTextNodeRange(this,n,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,r,n,i){const o=this.getWritable(),a=o.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const u=he();if(i&&te(u)){const f=t+s;u.setTextNodeRange(o,f,o,f)}const d=a.slice(0,l)+n+a.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){un();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=Qa(),a=n.length;t.sort(($,N)=>$-N),t.push(a);const s=[],l=t.length;for(let $=0,N=0;$<a&&N<=l;N++){const M=t[N];M>$&&(s.push(n.slice($,M)),$=M)}const u=s.length;if(u===1)return[r];const d=s[0],f=r.getParent();let h;const p=r.getFormat(),m=r.getStyle(),g=r.__detail;let v=!1,_=null,x=null;const w=he();if(te(w)){const[$,N]=w.isBackward()?[w.focus,w.anchor]:[w.anchor,w.focus];$.type==="text"&&$.key===i&&(_=$),N.type==="text"&&N.key===i&&(x=N)}r.isSegmented()?(h=Rr(d),h.__format=p,h.__style=m,h.__detail=g,h.__state=HC(r,h),v=!0):h=r.setTextContent(d);const E=[h];for(let $=1;$<u;$++){const N=Rr(s[$]);N.__format=p,N.__style=m,N.__detail=g,N.__state=HC(r,N);const M=N.__key;o===i&&cn(M),E.push(N)}const C=_?_.offset:null,k=x?x.offset:null;let A=0;for(const $ of E){if(!_&&!x)break;const N=A+$.getTextContentSize();if(_!==null&&C!==null&&C<=N&&C>=A&&(_.set($.getKey(),C-A,"text"),C<N&&(_=null)),x!==null&&k!==null&&k<=N&&k>=A){x.set($.getKey(),k-A,"text");break}A=N}if(f!==null){(function(M){const P=M.getPreviousSibling(),I=M.getNextSibling();P!==null&&Cm(P),I!==null&&Cm(I)})(this);const $=f.getWritable(),N=this.getIndexWithinParent();v?($.splice(N,0,E),this.remove()):$.splice(N,1,E),te(w)&&Ll(w,f,N,u-1)}return E}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||ee(50);const n=this.__key,i=t.__key,o=this.__text,a=o.length;Qa()===i&&cn(n);const s=he();if(te(s)){const f=s.anchor,h=s.focus;f!==null&&f.key===i&&xR(f,r,n,t,a),h!==null&&h.key===i&&xR(h,r,n,t,a)}const l=t.__text,u=r?l+o:o+l;this.setTextContent(u);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function LX(e){return{forChild:bS(e.style),node:null}}function zX(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:bS(t.style,r?void 0:"bold"),node:null}}const fR=new WeakMap;function UX(e){if(!tt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function BX(e){const t=e;e.parentElement===null&&ee(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const a=[n];for(;o!==null&&(i=fR.get(o))===void 0&&!UX(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l<a.length;l++)fR.set(a[l],s);return s})(t)!==null)return{node:ch(r)};if(r=r.replace(/\r/g,"").replace(/[ \t\n]+/g," "),r==="")return{node:null};if(r[0]===" "){let n=t,i=!0;for(;n!==null&&(n=hR(n,!1))!==null;){const o=n.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(r=r.slice(1)),i=!1;break}}i&&(r=r.slice(1))}if(r[r.length-1]===" "){let n=t,i=!0;for(;n!==null&&(n=hR(n,!0))!==null;)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(r=r.slice(0,r.length-1))}return r===""?{node:null}:{node:Rr(r)}}function hR(e,t){let r=e;for(;;){let n;for(;(n=t?r.nextSibling:r.previousSibling)===null;){const o=r.parentElement;if(o===null)return null;r=o}if(r=n,tt(r)){const o=r.style.display;if(o===""&&!Am(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(bi(r))return r;if(r.nodeName==="BR")return null}}const jX={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ma(e){const t=jX[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:bS(e.style,t),node:null}}function Rr(e=""){return Qo(new vs(e))}function ne(e){return e instanceof vs}function bS(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),a=e.fontStyle==="italic",s=n.includes("underline"),l=e.verticalAlign;return u=>((ne(u)||i1(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),s&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class cd extends vs{static getType(){return"tab"}static clone(t){return new cd(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const r=super.createDOM(t),n=Ac(t.theme,"tab");return n!==void 0&&r.classList.add(...n),r}static importJSON(t){return dd().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,r,n,i){return n===""&&r===0||n===" "&&r===1||ee(286),this}setDetail(t){return t!==2&&ee(127),this}setMode(t){return t!=="normal"&&ee(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function dd(){return Qo(new cd)}function su(e){return e instanceof cd}class qX{key;offset;type;_selection;constructor(t,r,n){this._selection=null,this.key=t,this.offset=r,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:hh(Fi(di(this,"next")),Fi(di(t,"next")))<0}getNode(){const t=tr(this.key);return t===null&&ee(20),t}set(t,r,n,i){const o=this._selection,a=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,qc()||(Qa()===a&&cn(t),o!==null&&(o.setCachedNodes(null),te(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function Ea(e,t,r){return new qX(e,t,r)}function S_(e,t){let r=t.__key,n=e.offset,i="element";if(ne(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!V(t)){const o=t.getNextSibling();if(ne(o))r=o.__key,n=0,i="text";else{const a=t.getParent();a&&(r=a.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function pR(e,t){if(V(t)){const r=t.getLastDescendant();V(r)||ne(r)?S_(e,r):S_(e,t)}else S_(e,t)}class Lg{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Xt(t))return!1;const r=this._nodes,n=t._nodes;return r.size===n.size&&Array.from(r).every(i=>n.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Lg(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(a=>$n(a)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(ne(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a<n;a++)r[a].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=tr(i);o!==null&&n.push(o)}return qc()||(this._cachedNodes=n),n}getTextContent(){const t=this.getNodes();let r="";for(let n=0;n<t.length;n++)r+=t[n].getTextContent();return r}deleteNodes(){const t=this.getNodes().filter(r=>$n(r)===null);if((he()||fd())===this&&t[0]){const r=It(t[0],"next");ph(Mo(r,r))}for(const r of t)r.remove();jO()}}function jO(){const e=Jr();if(e.isEmpty()){const t=jt();e.append(t),t.select()}}function te(e){return e instanceof ku}class ku{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,r,n,i){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!te(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=(function(n){const i=[],[o,a]=n.getTextSlices();o&&i.push(o.caret.origin);const s=new Set,l=new Set;for(const u of n)if(co(u)){const{origin:d}=u;i.length===0?s.add(d):(l.add(d),i.push(d))}else{const{origin:d}=u;V(d)&&l.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),ll(n.focus)&&V(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let u=mo(n.focus.origin,"previous");co(u)&&s.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=zS(u))s.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!V(u)||l.has(u)||u.isEmpty()||s.has(u))break;i.pop()}if(i.length===0&&n.isCollapsed()){const u=Fi(n.anchor),d=Fi(n.anchor.getFlipped()),f=p=>uo(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(n.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(jS(p1(this),"next"));return qc()||(this._cachedNodes=r),r}setTextNodeRange(t,r,n,i){return this.anchor.set(t.__key,r,"text"),this.focus.set(n.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const r=t[0],n=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=o1(this);let u="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(V(h)&&!h.isInline()){d||(u+=`
|
|
24
|
+
`);let p="";for(const m of lo(h)){const g=fu(h,m);g!==null&&(p+=g.getTextContent())}p!==""?(u+=p,d=!1):d=!h.isEmpty()}else if(d=!1,ne(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=s<l?p.slice(s,l):p.slice(l,s)):p=a?p.slice(s):p.slice(l):h===n&&(p=a?p.slice(0,l):p.slice(0,s)),u+=p}else!ct(h)&&!Yn(h)||h===n&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const r=Ot(),n=r.getEditorState()._selection,i=YO(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,a,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(a.key,a.offset,a.type,!0),s&&(this.dirty=!0),Vs(this)}clone(){const t=this.anchor,r=this.focus;return new ku(Ea(t.key,t.offset,t.type),Ea(r.key,r.offset,r.type),this.format,this.style)}toggleFormat(t){this.format=lu(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const r=ss[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(ch(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let a=r,s=n;!this.isCollapsed()&&n.isBefore(r)&&(a=n,s=r),a.type==="element"&&(function(v,_,x,w){const E=v.getNode(),C=E.getChildAtIndex(v.offset),k=Rr();if(k.setFormat(x),k.setStyle(w),gd(C))C.splice(0,0,[k]);else if(C!==null){const A=sr(E)?jt().append(k):k;C.insertBefore(A)}else if(sr(E)){const A=E.getLastChild();V(A)&&!A.isInline()&&A.isEmpty()?A.append(k):E.append(jt().append(k))}else E.append(k);v.is(_)&&_.set(k.__key,0,"text"),v.set(k.__key,0,"text")})(a,s,i,o),s.type==="element"&&mu(s,Fi(di(s,"next")));const l=a.offset;let u=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];ne(h)||ee(26);const p=h.getTextContent().length,m=h.getParentOrThrow();let g=d[f-1];if(f===1&&s.type==="element"&&(u=p,s.set(a.key,u,"text")),this.isCollapsed()&&l===p&&(Di(h)||!h.canInsertTextAfter()||!m.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let _;if(ne(v)&&v.canInsertTextBefore()&&!Di(v)?_=v:(_=Rr(),_.setFormat(i),_.setStyle(o),m.canInsertTextAfter()?h.insertAfter(_):m.insertAfter(_)),_.select(0,0),h=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Di(h)||!h.canInsertTextBefore()||!m.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let _;if(!ne(v)||Di(v)?(_=Rr(),_.setFormat(i),m.canInsertTextBefore()?h.insertBefore(_):m.insertBefore(_)):_=v,_.select(),h=_,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(Qa()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=Rr(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=g.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||V(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),GO(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(Hl(h)){const w=Rr(t);return w.select(),void h.replace(w)}const v=h.getFormat(),_=h.getStyle();if(l!==u||v===i&&_===o){if(su(h)){const w=Rr(t);return w.setFormat(i),w.setStyle(o),w.select(),void h.replace(w)}}else{if(h.getTextContent()!==""){const w=Rr(t);if(w.setFormat(i),w.setStyle(o),w.select(),l===0)h.insertBefore(w,!1);else{const[E]=h.splitText(l);E.insertAfter(w,!1)}return void(w.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}h.setFormat(i),h.setStyle(o)}const x=u-l;h=h.spliceText(l,x,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=v,this.style=_,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const v=new Set([...h.getParentKeys(),...g.getParentKeys()]),_=V(h)?h:h.getParentOrThrow();let x=V(g)?g:g.getParentOrThrow(),w=g;if(!_.is(x)&&x.isInline())do w=x,x=x.getParentOrThrow();while(x.isInline());if(s.type==="text"&&(u!==0||g.getTextContent()==="")||s.type==="element"&&g.getIndexWithinParent()<u)if(ne(g)&&!Hl(g)&&u!==g.getTextContentSize()){if(g.isSegmented()){const $=Rr(g.getTextContent());g.replace($),g=$}Ar(s.getNode())||s.type!=="text"||(ne(g)||ee(395),g=g.spliceText(0,u,"")),v.add(g.__key)}else{const $=g.getParentOrThrow();$.canBeEmpty()||$.getChildrenSize()!==1?g.remove():$.remove()}else v.add(g.__key);const E=x.getChildren(),C=new Set(d),k=_.is(x),A=_.isInline()&&h.getNextSibling()===null?_:h;for(let $=E.length-1;$>=0;$--){const N=E[$];if(N.is(h)||V(N)&&N.isParentOf(h))break;N.isAttached()&&(!C.has(N)||N.is(w)?k||A.insertAfter(N,!1):N.remove())}if(!k){let $=x,N=null;for(;$!==null;){const M=$.getChildren(),P=M.length;(P===0||M[P-1].is(N))&&(v.delete($.__key),N=$),$=$.getParent()}}if(Hl(h))if(l===p)h.select();else{const $=Rr(t);$.select(),h.replace($)}else h=h.spliceText(l,p-l,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let $=1;$<f;$++){const N=d[$],M=N.__key;v.has(M)||N.remove()}}}removeText(){const t=he()===this;B0(this,jZ(p1(this))),t&&he()!==this&&bn(this)}formatText(t,r=null){VO(this,t,r)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const r=this.anchor.getNode();if(this.anchor.type==="element"&&V(r)&&$n(r)!==null){let g=r.isShadowRoot()?r.getFirstChild()??r.append(jt()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&g!==null&&!V(g)){const v=jt();g.insertBefore(v),g=v}if(g!==null){g.selectStart();const v=he();return te(v)||ee(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&sr(r)){const g=w_(t),v=g.getLastDescendant();return r.splice(this.anchor.offset,0,g.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=Qt(n,Cn);const o=t[t.length-1];if(V(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=qd(this);i.splice(g,0,t),o.selectEnd()}return}if(!t.some(g=>(V(g)||ct(g))&&!g.isInline())){V(i)||ee(211,n.constructor.name,n.getType());const g=qd(this);return i.splice(g,0,t),void o.selectEnd()}if(V(i)&&$n(i)!==null){const g=qd(this),v=s1(t);i.splice(g,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(g,g))}if(i===null){const g=w_(t),v=g.getLastDescendant();let _=di(this.anchor,"next");for(const x of g.getChildren())_=O6(x,_);return void(v!==null&&v.selectEnd())}if(V(i)&&!i.isParentRequired()&&!sr(i.getParentOrThrow())){const g=qd(this),v=s1(t);i.splice(g,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(g,g))}const a=w_(t),s=a.getLastDescendant(),l=a.getChildren(),u=!V(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(n=this.anchor.getNode(),i=Qt(n,Cn));const d=l[l.length-1];let f=l[0];var h;V(h=f)&&Cn(h)&&!h.isEmpty()&&V(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(V(i)||ee(211,n.constructor.name,n.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&ee(212,n.constructor.name,n.getType()),(function(g,v){const _=v.getParentOrThrow().getLastChild();let x=v;const w=[v];for(;x!==_;)x.getNextSibling()||ee(140),x=x.getNextSibling(),w.push(x);let E=g;for(const C of w)E=E.insertAfter(C)})(i,f));const p=Qt(s,Cn);u&&V(p)&&(u.canMergeWhenEmpty()||Cn(d))&&(p.append(...u.getChildren()),u.remove()),V(i)&&i.isEmpty()&&i.remove(),s.selectEnd();const m=V(i)?i.getLastChild():null;Yn(m)&&p!==i&&m.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&sr(t)){const s=jt();return t.splice(this.anchor.offset,0,[s]),s.select(),s}const r=qd(this),n=Qt(this.anchor.getNode(),Cn);if(n!==null&&$n(n)!==null)return null;V(n)||ee(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...o),a.selectStart(),a):null}insertLineBreak(t){const r=qo();if(this.insertNodes([r]),t){const n=r.getParentOrThrow(),i=r.getIndexWithinParent();n.select(i,i)}}extract(){const t=[...this.getNodes()],r=t.length;let n=t[0],i=t[r-1];const[o,a]=o1(this),s=this.isBackward(),[l,u]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(r===0)return[];if(r===1){if(ne(n)&&!this.isCollapsed()){const h=n.splitText(d,f),p=d===0?h[0]:h[1];return p?(l.set(p.getKey(),0,"text"),u.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[n]}if(ne(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),ne(i)){const h=i.getTextContent().length;f===0?t.pop():f!==h&&([i]=i.splitText(f),t[t.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,r,n){if(Sm(this,t,r,n))return;const i=t==="move",o=Ot(),a=Zn(yi(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();l===null||s===null||!V(u)||u.isInline()||u.canBeEmpty()||Rm(s,o,l);const d=Kc(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=ne(u)?tl(u,d,o):null),this.dirty){const h=Kc(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const m=this.anchor.getNode();p=ne(m)?tl(m,h,o):null}p&&f&&xm(a,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&ne(u)&&u.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const h=It(u,r?"previous":"next").getNodeAtCaret();if(ne(h)){if(!i){const p=h.getTextContentSize();return r?this.focus.set(h.__key,p-1,"text"):this.focus.set(h.__key,1,"text"),void(this.dirty=!0)}{const p=o.getElementByKey(h.getKey()),m=p?tl(h,p,o):null;if(m){const g=r?m.length:0;xm(a,m,g,m,g)}}}}if(HO(a,t,r?"backward":"forward",n),a.rangeCount>0){const h=Bg(a,o._rootElement),p=h||a.getRangeAt(0),m=this.anchor.getNode(),g=Ar(m)?m:b6(m);this.applyDOMRange(p),this.dirty=!0,!i&&(WO(this,r,g),(h?a.direction!=="backward":a.anchorNode===p.startContainer&&a.anchorOffset===p.startOffset)||KO(this))}n==="lineboundary"&&Sm(this,t,r,n,"decorators")}forwardDeletion(t,r,n){if(!n&&(t.type==="element"&&V(r)&&t.offset===r.getChildrenSize()||t.type==="text"&&t.offset===r.getTextContentSize())){const i=r.getParent(),o=r.getNextSibling()||(i===null?null:i.getNextSibling());if(V(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const r=this.isCollapsed();if(this.isCollapsed()){const n=this.anchor;let i=n.getNode();if(this.forwardDeletion(n,i,t))return;const o=Kg(di(n,t?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(co(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(V(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Fi(l);B0(this,Mo(u,u)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(ll(l)){if(V(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(ct(l.origin)){if(!l.origin.isIsolated())if(lo(l.origin).length>0){if(V(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=bm();u.add(l.origin.getKey()),bn(u)}}else if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&V(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=bm();u.add(l.origin.getKey()),bn(u)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:u}=s;return lo(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(B0(this,Mo(!l.origin.isEmpty()&&u.isEmpty()?$u(It(u,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if($n(l)!==null)return;if(V(l)&&l.isShadowRoot())break;l=l.getParent()}}const a=this.focus;if(E_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&gR(this,n.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=n.type==="text"?n.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,u=s.getTextContentSize();if(s.is(i)||t&&l!==u||!t&&l!==0)return void vR(s,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,u=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==u)return void vR(i,t,l)}(function(l,u){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const m=d.offset,g=f.offset,v=m<g,_=v?m:g,x=v?g:m,w=x-1;_!==w&&(function(E){return!(m6(E)||KX(E))})(h.getTextContent().slice(_,x))&&(u?f.set(f.key,w,f.type):d.set(d.key,w,d.type))}})(this,t)}}if(this.removeText(),t&&!r&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const n=this.anchor.getNode();n.isEmpty()&&Ar(n.getParent())&&n.getPreviousSibling()===null&&gR(this,n),jO()}}deleteLine(t){const r=a1(this.anchor);if(r!==null&&ct(Po(r)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&E_(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):Qt(this.anchor.getNode(),Cn)!==Qt(this.focus.getNode(),Cn)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(t)):this.removeText()}deleteWord(t){if(this.isCollapsed()){const r=this.anchor,n=r.getNode();if(this.forwardDeletion(r,n,t))return;E_(this,t,"word")}this.isCollapsed()?this.deleteCharacter(t):this.removeText()}isBackward(){const t=this._cachedIsBackward;if(t!==null)return t;const r=this.focus.isBefore(this.anchor);return qc()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function Xt(e){return e instanceof Lg}function qO(e,t){if(Xt(e)){for(const _ of e.getNodes())i1(_)&&_.setFormat(t(_.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void cn(null);const r=[];for(const _ of e.getNodes())ne(_)?r.push(_):V(_)?_.setTextFormat(t(_.getTextFormat())):i1(_)&&_.setFormat(t(_.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void cn(null);const i=e.anchor,o=e.focus,a=e.isBackward(),s=a?o:i,l=a?i:o;let u=0,d=r[0],f=s.type==="element"?0:s.offset;if(s.type==="text"&&f===d.getTextContentSize()&&(u=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const m=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===m)return;const _=t(d.getFormat());if(Di(d)||f===0&&m===d.getTextContentSize())d.setFormat(_);else{const x=d.splitText(f,m),w=f===0?x[0]:x[1];w.setFormat(_),s.type==="text"&&s.set(w.__key,0,"text"),l.type==="text"&&l.set(w.__key,m-f,"text")}return void(e.format=_)}f===0||Di(d)||([,d]=d.splitText(f),f=0);const g=t(d.getFormat());d.setFormat(g);const v=t(p.getFormat());m>0&&(m===p.getTextContentSize()||Di(p)||([p]=p.splitText(m)),p.setFormat(v));for(let _=u+1;_<h;_++){const x=r[_];x.setFormat(t(x.getFormat()))}s.type==="text"&&s.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,m,"text"),e.format=g|v}function VX(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&qO(e,n=>{for(const[i,o]of r)n=lu(n,i,o?ss[i]:0);return n})}function VO(e,t,r=null){const n=r===null&&te(e)?lu(e.format,t,null):r;qO(e,i=>lu(i,t,n))}function mR(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function o1(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[r,n]=t;return r.type==="element"&&n.type==="element"&&r.key===n.key&&r.offset===n.offset?[0,0]:[mR(r),mR(n)]}function gR(e,t){for(let r=t;r;r=r.getParent()){if(V(r)){if(r.collapseAtStart(e))return!0;if(sr(r))break}if(r.getPreviousSibling())break}return!1}function KO(e){const t=e.focus,r=e.anchor,n=r.key,i=r.offset,o=r.type;r.set(t.key,t.offset,t.type,!0),t.set(n,i,o,!0)}function HO(e,t,r,n){e.modify(t,r,n)}function WO(e,t,r){const n=e.getNodes(),i=n.filter(s=>Hc(s,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],a=V(o)?o:o.getParentOrThrow();return t?a.selectStart():a.selectEnd(),!0}function E_(e,t,r){if(Sm(e,"extend",t,r))return;const n=Ot(),i=Zn(yi(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,a=n._rootElement,s=e.anchor,l=e.focus.getNode();a===null||o===null||!V(l)||l.isInline()||l.canBeEmpty()||Rm(o,n,a);const u=N=>{const M=N.getNode(),P=n.getElementByKey(N.key);return P!==null&&N.type==="text"&&ne(M)?tl(M,P,n):P},d=s.getNode(),f=u(s);if(f===null)return;const h=s.offset,p=e.isCollapsed(),m=e.focus,g=p?f:u(m);if(g===null)return;const v=m.offset;if(xm(i,g,v,g,v),HO(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const _=Bg(i,a)||i.getRangeAt(0),x=_.startContainer,w=_.startOffset;if(p&&r==="character"&&s.type==="text"&&ne(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const N=It(d,t?"previous":"next").getNodeAtCaret();if(ne(N)){const M=t?N.getTextContentSize()-1:1;return e.focus.set(N.__key,M,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&s.type==="text"){const N=t?0:d.getTextContentSize(),M=x===f?w:h!==N?N:-1;if(M>=0)return void(M!==h&&(e.focus.set(s.key,M,"text"),e.dirty=!0))}const[E,C,k,A]=t?[x,w,f,h]:[f,h,x,w],$=Ar(d)?d:b6(d);e.applyDOMRange({collapsed:!1,endContainer:k,endOffset:A,startContainer:E,startOffset:C}),e.dirty=!0,!WO(e,t,$)&&t&&KO(e),r==="lineboundary"&&Sm(e,"extend",t,r,"decorators")}const KX=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function vR(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let u=0;u<o;u++){const d=u===o-1;if(s=a,a+=i[u].length,t&&a===r||a>r||d){i.splice(u,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(s,s))}function _R(e,t,r,n){let i,o=t,a=!1;if(tt(e)){let s=!1;const l=e.childNodes,u=l.length,d=n._blockCursorElement;o===u&&u>0&&(s=!0,o=u-1),vd(e,n)!==void 0||$m(e,n)||(a=!0);let f=l[o],h=!1;if(f===d)f=l[o+1],h=!0;else if(d!==null){const p=d.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,d)&&o--}if(i=fc(f),ne(i))o=ba(i,s?"next":"previous");else{let p=fc(e);if(p===null)return null;if(V(p)){const m=n.getElementByKey(p.getKey());m===null&&ee(214),[p,o]=po(p,m,n).resolveChildIndex(p,m,e,t),V(p)||ee(215),s&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(V(v)&&(function(_,x,w){const E=_.getParent();return w===null||E===null||!E.canBeEmpty()||E!==w.getNode()})(v,0,r)){const _=s?v.getLastDescendant():v.getFirstDescendant();_===null?p=v:(v=_,p=V(v)?v:v.getParentOrThrow()),o=0}ne(v)?(i=v,p=null,o=ba(v,s?"next":"previous")):v!==p&&s&&!h&&(V(p)||ee(216),o=Math.min(p.getChildrenSize(),o+1))}else{const m=Po(p),g=m!==null?m:p,v=g.getIndexWithinParent(),_=n.getElementByKey(p.getKey());let x="after";if(_!==null&&fc(e)===p){const w=po(p,_,n);w.element!==_?x=w.resolveLeafPosition(_,e,t):t===0&&ct(p)&&(x="before")}o=x==="before"?v:v+1,p=g.getParentOrThrow()}if(V(p))return[Ea(p.__key,o,"element"),a]}}else i=fc(e);return ne(i)?[Ea(i.__key,ba(i,o,"clamp"),"text"),a]:null}function bR(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((r||!t)&&o===null&&V(a)&&a.isInline()){const s=a.getPreviousSibling();ne(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else V(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):ne(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&V(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&V(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){const s=a.getNextSibling();ne(s)&&e.set(s.__key,0,"text")}}}function GO(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);bR(e,n,i),bR(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function a1(e){const t=tr(e.key);return t===null?null:qg(t)}function JO(e,t,r){const n=a1(e),i=a1(t);if(n===i||n!==null&&i!==null&&n.is(i))return!1;const o=r(n,i);if(n!==null)return V(n)?t.set(n.getKey(),o?n.getChildrenSize():0,"element"):t.set(n.getKey(),o?n.getTextContentSize():0,"text"),!0;const a=Po(i);if(a===null)return!1;const s=a.getParent();if(s===null)return!1;const l=a.getIndexWithinParent();return t.set(s.getKey(),o?l+1:l,"element"),!0}function QO(e){const t=JO(e.anchor,e.focus,(r,n)=>(function(i,o,a,s){if(a!==null&&s!==null){const d=Po(a),f=Po(s);if(d!==null&&d.is(f)){for(const h of Vg(d).values()){if(h===a.getKey())return!0;if(h===s.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(a!==null){const d=Po(a),f=tr(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=Po(s),u=tr(i.key);return l!==null&&u!==null&&!l.is(u)&&!l.isParentOf(u)&&u.isBefore(l)})(e.anchor,e.focus,r,n));return t&&(e.dirty=!0),t}function YO(e,t,r,n,i,o){if(e===null||r===null||!Wh(i,e,r))return null;const a=_R(e,t,te(o)?o.anchor:null,i);if(a===null)return null;const s=_R(r,n,te(o)?o.focus:null,i);if(s===null)return null;const[l,u]=a,[d,f]=s;if(l.type==="element"&&d.type==="element"){const p=fc(e),m=fc(r);if(ct(p)&&ct(m))return null}const h=i._slotsUsed&&JO(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return GO(l,d),[l,d,u||f||h]}function jc(e){return V(e)&&!e.isInline()}function XO(e,t,r,n,i,o){const a=_s(),s=new ku(Ea(e,t,i),Ea(r,n,o),0,"");return s.dirty=!0,a._selection=s,s}function yS(){const e=Ea("root",0,"element"),t=Ea("root",0,"element");return new ku(e,t,0,"")}function bm(){return new Lg(new Set)}function xS(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!Ky&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,d,f,h;if(te(e)&&!l)return e.clone();{if(t===null)return null;const E=ho(t,r._rootElement);if(u=E.anchorNode,d=E.focusNode,f=E.anchorOffset,h=E.focusOffset,(s||a===void 0)&&te(e)&&!Wh(r,u,d))return e.clone()}const p=YO(u,f,d,h,r,e);if(p===null)return null;const[m,g,v]=p;let _=0,x="";if(te(e)){const E=e.anchor;if(m.key===E.key)_=e.format,x=e.style;else{const C=m.getNode();ne(C)?(_=C.getFormat(),x=C.getStyle()):V(C)&&(_=C.getTextFormat(),x=C.getTextStyle())}}const w=new ku(m,g,_,x);return v&&(w.dirty=!0),w}function he(){return _s()._selection}function fd(){return Ot()._editorState._selection}function Ll(e,t,r,n=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(r<=u&&n>0||r<u&&n<0){const d=Math.max(0,u+n);i.set(l,d,"element"),o.set(l,d,"element"),yR(e)}}else{const u=e.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(t.is(f)){const m=d.offset;(r<=m&&n>0||r<m&&n<0)&&d.set(l,Math.max(0,m+n),"element")}if(t.is(p)){const m=h.offset;(r<=m&&n>0||r<m&&n<0)&&h.set(l,Math.max(0,m+n),"element")}}yR(e)}function yR(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),a=n.getNode();if(e.isCollapsed()){if(!V(o))return;const s=o.getChildrenSize(),l=r>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(ne(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text"),n.set(u.__key,d,"text")}return}if(V(o)){const s=o.getChildrenSize(),l=r>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(ne(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(V(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(ne(u)){let d=0;l&&(d=u.getTextContentSize()),n.set(u.__key,d,"text")}}}function ym(e,t,r,n,i){let o=null,a=0,s=null;n!==null?(o=n.__key,ne(n)?(a=n.getTextContentSize(),s="text"):V(n)&&(a=n.getChildrenSize(),s="element")):i!==null&&(o=i.__key,ne(i)?s="text":V(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=r.getChildrenSize()),e.set(r.__key,a,"element"))}function xR(e,t,r,n,i){e.type==="text"?e.set(r,e.offset+(t?0:i),"text"):e.offset>n.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function xm(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function SR(e,t,r){const n=Kc(e,t.getKey());if(V(t)){const i=po(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function HX(e,t,r,n,i,o){const a=o.getRootNode(),s=Cu(a)||ls(a)?dh(a):null;if(i.has(LO)&&s!==o||s!==null&&AS(s,s))return;const l=ho(n,o);let u;if(!te(t))return void(e!==null&&Wh(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[m,g]=SR(r,h,d.offset),[v,_]=SR(r,p,f.offset),x=t.format,w=t.style,E=t.isCollapsed();let C=m,k=v,A=!1;if(d.type==="text"?(C=ne(h)?tl(h,m,r):null,A=h.getFormat()!==x||h.getStyle()!==w):te(e)&&e.anchor.type==="text"&&(A=!0),f.type==="text"&&(k=ne(p)?tl(p,v,r):null),C!==null&&k!==null){if(E&&(e===null||A||te(e)&&(e.format!==x||e.style!==w))&&(function($,N,M,P,I,U){$._inputState.collapsedSelectionFormat={format:N,key:I,offset:P,style:M,timeStamp:U}})(r,x,w,g,d.key,performance.now()),(n.type!=="Range"||!E)&&l.anchorOffset===g&&l.focusOffset===_&&l.anchorNode===C&&l.focusNode===k){if(s===null||!o.contains(s)){const $=s!==null?Rc(s):null;$!==null&&$!==r||i.has(n1)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(xm(n,C,g,k,_),al&&t.isCollapsed()&&o!==null&&!i.has(n1)){const $=c1(o);if($===null||!o.contains($)){const N=dh(o.ownerDocument),M=N!==null?Rc(N):null;M!==null&&M!==r||o.focus({preventScroll:!0})}}if(!i.has(IX)&&t.isCollapsed()&&o!==null&&o===c1(o)){const $=te(t)&&t.anchor.type==="element"?C.childNodes[g]||null:(u===void 0&&(u=_Z(n,o)),u);if($!==null){let N;if(bi($)){const M=$.ownerDocument.createRange();M.selectNode($),N=M.getBoundingClientRect()}else N=$.getBoundingClientRect();(function(M,P,I){const U=FS(I),B=IS(U);if(U===null||B===null)return;const q=I.getBoundingClientRect();if(P.bottom<q.top)return;let{top:W,bottom:J}=P,K=0,G=0,re=I;for(;re!==null;){const oe=re===U.body;if(oe){const Re=B.visualViewport;if(Re){const be=Re.offsetTop;K=be,G=be+Re.height}else K=0,G=yi(M).innerHeight;const Te=B.getComputedStyle(U.documentElement),He=parseFloat(Te.scrollPaddingTop),ge=parseFloat(Te.scrollPaddingBottom);isFinite(He)&&(K+=He),isFinite(ge)&&(G-=ge)}else{const Re=re===I?q:re.getBoundingClientRect();K=Re.top,G=Re.bottom}let _e=0;if(W<K?_e=-(K-W):J>G&&(_e=J-G),_e!==0)if(oe)B.scrollBy(0,_e);else{const Re=re.scrollTop;re.scrollTop+=_e;const Te=re.scrollTop-Re;W-=Te,J-=Te}if(oe)break;re=Ru(re)}})(r,N,o)}}(function($){$._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function WX(e){let t=he()||fd();t===null&&(t=Jr().selectEnd()),t.insertNodes(e)}function ZO(e,t){for(const r of e.split(/(\r?\n|\t)/))r===`
|
|
25
|
+
`||r===`\r
|
|
26
|
+
`?t.linebreak():r===" "?t.tab():r!==""&&t.text(r)}function ch(e){const t=[];return ZO(e,{linebreak:()=>t.push(qo()),tab:()=>t.push(dd()),text:r=>t.push(Rr(r))}),t}function s1(e){const t=[];for(const r of e)Yn(r)||(!V(r)&&!ct(r)||r.isInline()?t.push(r):V(r)&&t.push(...s1(r.getChildren())));return t}function qd(e){let t=e;e.isCollapsed()||t.removeText();const r=he();te(r)&&(t=r),te(t)||ee(161);const n=t.anchor;let i=n.getNode(),o=n.offset;for(;!Cn(i)&&$n(i)===null;){const a=i;if([i,o]=GX(i,o),a.is(i))break}return o}function GX(e,t){const r=e.getParent();if(!r){const i=jt();return Jr().append(i),i.select(),[Jr(),0]}if(ne(e)){const i=e.splitText(t);if(i.length===0)return[r,e.getIndexWithinParent()];const o=t===0?0:1;return[r,i[0].getIndexWithinParent()+o]}if(!V(e)||t===0)return[r,e.getIndexWithinParent()];const n=e.getChildAtIndex(t);if(n){const i=new ku(Ea(e.__key,t,"element"),Ea(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function ER(e){return Yn(e)||pZ(e)||ne(e)||e.isParentRequired()}function w_(e){const t=jt();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(ER(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(Yn(i)&&(o===void 0||!ER(o)))continue}r.append(i)}else t.append(i),r=null}return t}function Sm(e,t,r,n,i="decorators-and-blocks"){if(t==="move"&&n==="character"&&!e.isCollapsed()){const[d,f]=r===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(d.key,d.offset,d.type),!0}const o=di(e.focus,r?"previous":"next"),a=n==="lineboundary",s=t==="move";let l=o,u=i==="decorators-and-blocks";if(!BS(l)){for(const d of l){u=!1;const{origin:f}=d;if(!ct(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(u)for(const d of Kg(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(co(d))d.origin.isInline()||(l=d);else{if(V(d.origin))continue;ct(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&ct(l.origin)&&l.origin.isKeyboardSelectable()){const d=bm();return d.add(l.origin.getKey()),bn(d),!0}return l=Fi(l),s&&mu(e.anchor,l),mu(e.focus,l),u||!a}let hn=null,Br=null,ci=!1,k_=!1,L0=!1;const C_=new Set;let z0=0;const wR={characterData:!0,childList:!0,subtree:!0};function qc(){return ci||hn!==null&&hn._readOnly}function un(){ci&&ee(13)}function e6(){z0>99&&ee(14)}function _s(){return hn===null&&ee(195,t6()),hn}function JX(e){_s()!==null&&Br===null&&(Br=e),Br!==e&&zP(378)}function Ot(){return Br===null&&ee(337,t6()),Br}function QX(){Ot()._dirtyType=2}function t6(){let e=0;const t=new Set,r=Vc.version;if(typeof window<"u")for(const i of x6(document)){const o=Gh(i);if(Ug(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===r&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let n=` Detected on the page: ${e} compatible editor(s) with version ${r}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function r6(){return Br}function kR(e,t,r){const n=t.__type,i=u6(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const a=o.length;for(let s=0;s<a&&(o[s](t),t.isAttached());s++);}function CR(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function n6(e,t){if(!t)return;const r=e._updateTags;let n=t;Array.isArray(t)||(n=[t]);for(const i of n)r.add(i)}function YX(e){return Em(e,Ot()._nodes)}function Em(e,t){const r=e.type,n=t.get(r);n===void 0&&ee(17,r);const i=n.klass;e.type!==i.getType()&&ee(18,i.name);const o=i.importJSON(e),a=e.children;if(V(o)&&Array.isArray(a))for(let l=0;l<a.length;l++){const u=Em(a[l],t);o.append(u)}const s=e.$slots;if(s){Xa(o)||ee(379,i.name);for(const l in s)N6(o,l,Em(s[l],t))}return o}function RR(e,t,r){const n=hn,i=ci,o=Br;hn=t,ci=!0,Br=e;try{return r()}finally{hn=n,ci=i,Br=o}}function Ks(e,t){const r=L0;L0=!0;try{(function(n,i){const o=n._pendingEditorState,a=n._rootElement,s=n._headless||a===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&AR(n,n._deferred));const l=n._editorState,u=l._selection,d=o._selection,f=n._dirtyType!==0,h=hn,p=ci,m=Br,g=n._updating,v=n._observer;let _=null;if(n._pendingEditorState=null,n._editorState=o,!s&&f&&v!==null){Br=n,hn=o,ci=!1,n._updating=!0;try{const $=n._dirtyType,N=n._dirtyElements,M=n._dirtyLeaves;v.disconnect(),_=hX(l,o,n,$,N,M)}catch($){if($ instanceof Error&&n._onError($),k_)throw $;return l6(n,null,a,o),JP(n),n._dirtyType=2,k_=!0,Ks(n,l),void(k_=!1)}finally{v.observe(a,wR),n._updating=g,hn=h,ci=p,Br=m}}o._readOnly||(o._readOnly=!0);const x=n._dirtyLeaves,w=n._dirtyElements,E=n._normalizedNodes,C=n._updateTags;f&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set),n._updateTags=new Set,(function($,N){const M=$._decorators;let P=$._pendingDecorators||M;const I=N._nodeMap;let U;for(U in P)I.has(U)||(P===M&&(P=p6($)),delete P[U])})(n,o);const k=s?null:Zn(yi(n));if(n._editable&&k!==null&&(f||d===null||d.dirty||!d.is(u))&&a!==null&&!C.has(PX)){Br=n,hn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const $=n._blockCursorElement;$!==null&&Rm($,n,a),HX(u,d,n,k,C,a)}(function($,N,M){let P=$._blockCursorElement;if(te(M)&&M.isCollapsed()&&M.anchor.type==="element"&&N.contains(c1(N))){const I=M.anchor,U=I.getNode(),B=I.offset;let q=!1,W=null;if(B===U.getChildrenSize())U0(U.getChildAtIndex(B-1))&&(q=!0);else{const J=U.getChildAtIndex(B);if(J!==null&&U0(J)){const K=J.getPreviousSibling();(K===null||U0(K))&&(q=!0,W=$.getElementByKey(J.__key))}}if(q){const J=po(U,$.getElementByKey(U.__key),$).element;return P===null&&($._blockCursorElement=P=(function(K){const G=K.theme,re=rr().createElement("div");re.contentEditable="false",re.setAttribute("data-lexical-cursor","true");let oe=G.blockCursor;if(oe!==void 0){if(typeof oe=="string"){const _e=Za(oe);oe=G.blockCursor=_e}oe!==void 0&&re.classList.add(...oe)}return re})($._config)),N.style.caretColor="transparent",void(W===null?J.appendChild(P):J.insertBefore(P,W))}}P!==null&&Rm(P,$,N)})(n,a,d)}finally{v!==null&&v.observe(a,wR),Br=m,hn=h}}_!==null&&(function($,N,M,P,I){const U=Array.from($._listeners.mutation),B=U.length;for(let q=0;q<B;q++){const[W,J]=U[q];for(const K of J){const G=N.get(K);G!==void 0&&W(G,{dirtyLeaves:P,prevEditorState:I,updateTags:M})}}})(n,_,C,x,l),te(d)||d===null||u!==null&&u.is(d)||n.dispatchCommand(sO,void 0);const A=n._pendingDecorators;A!==null&&(n._decorators=A,n._pendingDecorators=null,kf("decorator",n,!0,A)),(function($,N,M){const P=NR(N),I=NR(M);P!==I&&kf("textcontent",$,!0,I)})(n,i||l,o),kf("update",n,!0,{dirtyElements:w,dirtyLeaves:x,editorState:o,mutatedNodes:_,normalizedNodes:E,prevEditorState:i||l,tags:C}),!g&&AR(n,n._deferred),(function($){const N=$._updates;if(N.length===0)return void($._cascadeCount=0);if((function(P){C_.has(P)||(C_.add(P),setTimeout(()=>{C_.delete(P),P._cascadeCount=0},0))})($),$._cascadeCount++>99)return $._updates=[],$._cascadeCount=0,void $._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${$._config.namespace}`));const M=N.shift();if(M){const[P,I]=M;zg($,P,I)}})(n)})(e,t)}finally{L0=r}}function kf(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],a=Array.from(o);for(const[s,l]of a){l&&l();const u=s(...n);o.has(s)?o.set(s,u):u&&u()}}finally{t._updating=i}}function i6(e,t,r,n){const i=$S(e);let o;if(!L0)for(let a=0;a<i.length;a++)i[a]._updating||(i[a]._cascadeCount=0);for(let a=4;a>=0;a--)for(let s=0;s<i.length;s++){const l=i[s];if(s>0&&l._updating){o=l;break}const u=l._commands.get(t);if(u!==void 0){const d=u[a];if(d.size>0){let f=!1;if(so(l,()=>{for(const h of d)if(h(r,n))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{i6(o,t,r,n)}),!1}function AR(e,t){if(e._deferred=[],t.length!==0){const r=e._updating;e._updating=!0;try{for(let n=0;n<t.length;n++)t[n]()}finally{e._updating=r}}}function $R(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,a]=i,s=e._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(n=!0),a.discrete&&(s===null&&ee(191),s._flushSync=!0),l&&e._deferred.push(l),n6(e,a.tag)),s==null?zg(e,o,a):o()}}return n}function zg(e,t,r){const n=e._updateTags;let i,o=!1,a=!1;r!==void 0&&(i=r.onUpdate,n6(e,r.tag),o=r.skipTransforms||!1,a=r.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=o6(l||s),u=!0),l._flushSync=a;const d=hn,f=ci,h=Br,p=e._updating;hn=l,ci=!1,e._updating=!0,Br=e;const m=e._headless||e.getRootElement()===null;CS(null);try{u&&(m?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(x,w){const E=x.getEditorState()._selection,C=Zn(yi(x));return te(E)||E==null?xS(E,C,x,w):E.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=$R(e,o),(function(x,w){const E=w.getEditorState()._selection,C=x._selection;if(te(C)){const k=C.anchor,A=C.focus;let $;if(k.type==="text"&&($=k.getNode(),$.selectionTransform(E,C)),A.type==="text"){const N=A.getNode();$!==N&&N.selectionTransform(E,C)}}})(l,e),e._dirtyType!==0&&(o?(function(x,w){const E=w._dirtyLeaves,C=x._nodeMap;for(const k of E){const A=C.get(k);ne(A)&&A.isAttached()&&A.isSimpleText()&&!A.isUnmergeable()&&JC(A)}})(l,e):(function(x,w){const E=w._dirtyLeaves,C=w._dirtyElements,k=x._nodeMap,A=Qa(),$=new Map;let N=E,M=N.size,P=C,I=P.size;for(;M>0||I>0;){if(M>0){w._dirtyLeaves=new Set;for(const U of N){const B=k.get(U);ne(B)&&B.isAttached()&&B.isSimpleText()&&!B.isUnmergeable()&&JC(B),B!==void 0&&CR(B,A)&&kR(w,B,$),E.add(U)}if(N=w._dirtyLeaves,M=N.size,M>0){z0++;continue}}w._dirtyLeaves=new Set,w._dirtyElements=new Map,P.delete("root")&&P.set("root",!0);for(const U of P){const B=U[0],q=U[1];if(C.set(B,q),!q)continue;const W=k.get(B);W!==void 0&&CR(W,A)&&kR(w,W,$)}N=w._dirtyLeaves,M=N.size,P=w._dirtyElements,I=P.size,z0++}w._dirtyLeaves=E,w._dirtyElements=C})(l,e),$R(e),(function(x,w,E,C){const k=x._nodeMap,A=w._nodeMap,$=[];for(const[P]of C){const I=A.get(P);I!==void 0&&(I.isAttached()||(V(I)&&fm(I,P,k,A,$,C),k.has(P)||C.delete(P),$.push(P)))}for(const P of E){const I=A.get(P);I===void 0||I.isAttached()||(Xa(I)&&I.__slots!==null&&fm(I,P,k,A,$,E),k.has(P)||E.delete(P),$.push(P))}for(const P of $)A.delete(P);const N=Ot(),M=N._compositionKey;M===null||A.has(M)||(N._compositionKey=null)})(s,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const _=l._selection;if(te(_)){e._slotsUsed&&QO(_);const x=l._nodeMap,w=_.anchor.key,E=_.focus.key;x.get(w)!==void 0&&x.get(E)!==void 0||ee(19)}else Xt(_)&&_._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Ks(e)}finally{hn=d,ci=f,Br=h,e._updating=p,z0=0}e._dirtyType!==0||e._deferred.length>0||(function(v,_){const x=_.getEditorState()._selection,w=v._selection;if(w!==null){if(w.dirty||!w.is(x))return!0}else if(x!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,Ks(e)):u&&lZ(()=>{Ks(e)}):(l._flushSync=!1,u&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function so(e,t,r){Br===e&&r===void 0?t():zg(e,t,r)}function XX(e){if(sr(e)){let t=null;for(const r of e.getChildren())t=r.isInline()?(t||r.replace(r.createParentElementNode())).append(r):null}}class mi extends Mi{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:XX,extends:Mi})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ee(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return XY[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getChildrenKeys(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r.__key),r=r.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&lo(this).length===0}isDirty(){const t=Ot()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(t)}getAllTextNodes(){const t=[];for(const n of lo(this)){const i=fu(this,n);V(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(ne(r)&&t.push(r),V(r)){const n=r.getAllTextNodes();t.push(...n)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;V(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;V(t);){const r=t.getLastChild();if(r===null)break;t=r}return t}getDescendantByIndex(t){const r=this.getChildren(),n=r.length;if(t>=n){const o=r[n-1];return V(o)&&o.getLastDescendant()||o||null}const i=r[t];return V(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:tr(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&ee(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:tr(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&ee(96,this.__key),t}getChildAtIndex(t){const r=this.getChildrenSize();let n,i;if(t<r/2){for(n=this.getFirstChild(),i=0;n!==null&&i<=t;){if(i===t)return n;n=n.getNextSibling(),i++}return null}for(n=this.getLastChild(),i=r-1;n!==null&&i>=t;){if(i===t)return n;n=n.getPreviousSibling(),i--}return null}getTextContent(){let t=T6(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContent(),V(o)&&i!==n-1&&!o.isInline()&&(t+=jl)}return t}getTextContentSize(){let t=(function(i){let o=0;for(const a of lo(i)){const s=fu(i,a);s!==null&&(o+=s.getTextContentSize())}return o})(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContentSize(),V(o)&&i!==n-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const r=dm[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=ss[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return lu(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){un();const n=he();let i=t,o=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(ne(l)||V(l))return l.select(0,0)}else if(!(t!==void 0&&t!==a||r!==void 0&&r!==a)){const l=this.getLastChild();if(ne(l)||V(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return te(n)?(n.anchor.set(s,i,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):XO(s,i,s,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(r=>r.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const r=this.getWritable();return r.__dir=t,r}setFormat(t){return this.getWritable().__format=t!==""&&dm[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const r=this.getWritable();return r.__textFormat=t,r}setTextStyle(t){const r=this.getWritable();return r.__textStyle=t,r}setIndent(t){return this.getWritable().__indent=t,this}splice(t,r,n){gm(this)&&ee(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();t+r<=i||ee(226,String(t),String(r),String(i));for(const p of n);const a=o.__key,s=[],l=[],u=this.getChildAtIndex(t+r);let d=null,f=i-r+n.length;if(t!==0)if(t===i)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){p===null&&ee(100);const g=p.getNextSibling(),v=p.__key;Ja(p.getWritable()),l.push(v),p=g}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const m=p.getWritable();m.__parent===a&&f--,Ja(m);const g=p.__key;if(h===null)o.__first=g,m.__prev=null;else{const v=h.getWritable();v.__next=g,m.__prev=v.__key}p.__key===a&&ee(76),m.__parent=a,s.push(g),h=p}if(t+r===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const m=h.getWritable();p.__prev=h.__key,m.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=he();if(te(p)){const m=new Set(l),g=new Set(s),{anchor:v,focus:_}=p;TR(v,m,g)&&ym(v,v.getNode(),this,d,u),TR(_,m,g)&&ym(_,_.getNode(),this,d,u),f!==0||this.canBeEmpty()||sr(this)||this.remove()}}return o}getDOMSlot(t){return new xc(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){const n=this.getIndent();n>0&&(r.style.paddingInlineStart=40*n+"px",r.setAttribute("data-lexical-indent",String(n)));const i=this.getDirection();i&&(r.dir=i)}return{element:r}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),n=this.getTextStyle();return r===0&&n===""||sr(this)||this.getChildren().some(ne)||(r!==0&&(t.textFormat=r),n!==""&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,r){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,r,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,r){const n=po(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(i==null?(n.insertChild(a),i=a):i!==a&&n.replaceChild(a,i),i=i.nextSibling)}}}function V(e){return e instanceof mi}function TR(e,t,r){let n=e.getNode();for(;n;){const i=n.__key;if(t.has(i)&&!r.has(i))return!0;n=n.getParent()}return!1}class SS extends Mi{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ee(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots)}decorate(t,r){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ct(e){return e instanceof SS}class hd extends mi{__cachedText;static getType(){return"root"}static clone(){return new hd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){ee(51)}getTextContent(){const t=this.__cachedText;return t===null||!qc()&&Ot()._dirtyType!==0?super.getTextContent():t}remove(){ee(52)}replace(t){ee(53)}insertBefore(t){ee(54)}insertAfter(t){ee(55)}updateDOM(t,r){return!1}splice(t,r,n){for(const i of n)V(i)||ct(i)||ee(282);return super.splice(t,r,n)}static importJSON(t){return Jr().updateFromJSON(t)}collapseAtStart(){return!0}}function Ar(e){return e instanceof hd}function o6(e){return new Hh(KP(e._nodeMap),null,e._slotsUsed)}function ES(){return new Hh(new Map([["root",new hd]]),null,!1)}function l1(e){const t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&ee(130,r.name),V(e)){const i=t.children;Array.isArray(i)||ee(59,r.name);const o=e.getChildren();for(let a=0;a<o.length;a++){const s=l1(o[a]);i.push(s)}}const n=lo(e);if(n.length>0){const i={};for(const o of n){const a=fu(e,o);a===null&&ee(366,r.name,o),i[o]=l1(a)}t.$slots=i}return t}function ZX(e){return e instanceof Hh}class Hh{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,r=null,n=!1){this._nodeMap=t,this._selection=r||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,r){return RR(r&&r.editor||null,this,t)}clone(t){const r=new Hh(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return RR(null,this,()=>({root:l1(Jr())}))}}class wS extends mi{static getType(){return"artificial"}createDOM(t){return rr().createElement("div")}}class pd extends Mi{static getType(){return"linebreak"}static clone(t){return new pd(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
27
|
+
`}createDOM(){return rr().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>a6(t)||s6(t)?null:{conversion:eZ,priority:0}}}static importJSON(t){return qo().updateFromJSON(t)}}function eZ(e){return{node:qo()}}function qo(){return Qo(new pd)}function Yn(e){return e instanceof pd}function a6(e){const t=e.parentElement;if(t!==null&&Wc(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&wm(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&wm(n))return!0}}return!1}function s6(e){const t=e.parentElement;if(t!==null&&Wc(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&wm(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&wm(n))return!0}return!1}function wm(e){return bi(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class md extends mi{static getType(){return"paragraph"}static clone(t){return new md(t.__key)}createDOM(t){const r=rr().createElement("p"),n=Ac(t.theme,"paragraph");return n!==void 0&&r.classList.add(...n),r}updateDOM(t,r,n){return!1}static importDOM(){return{p:t=>({conversion:tZ,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){this.isEmpty()&&r.append(rr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return jt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(ne);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=jt();n.setTextFormat(t.format),n.setTextStyle(t.style);const i=this.getDirection();return n.setDirection(i),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,r),n}collapseAtStart(){const t=this.getChildren();if(t.length===0||ne(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function tZ(e){const t=jt();if(Ta(t,e),Au(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in dm&&t.setFormat(r)}return bo(t,e),{node:t}}function jt(){return Qo(new md)}function gd(e){return e instanceof md}function rZ(e){console.warn(e)}const lt=0,ic=1,nZ=4,iZ=-8;function l6(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=ES(),e._pendingEditorState=n,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(s,l){const u=`__lexicalKey_${l._key}`;delete s[u]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),h6(r,e,"root"))}function oZ(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of OS(e)){const o=n.transform;if(!r.has(o)){r.add(o);const a=n.transform();a&&t.add(a)}if(i){const a=i.$transform;a&&t.add(a)}}return t}const km={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=RS(t,e.getType());return r&&r.exportDOM!==void 0?r.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,r,n,i)=>V(e)&&e.extractWithChild(t,r,n),$getDOMSlot:(e,t,r)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,r,n)=>null,$shouldExclude:(e,t,r)=>V(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,r)=>!t||e.isSelected(t),$updateDOM:(e,t,r,n)=>e.updateDOM(t,r,n._config)};function kS(e){const t=e||{},r=r6(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,a=ES(),s=t.namespace||(i!==null?i._config.namespace:g6()),l=t.editorState,u=[hd,vs,pd,cd,md,wS,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&r!==null)m=r._nodes;else{m=new Map;for(let v=0;v<u.length;v++){let _=u[v],x=null,w=null;if(_&&typeof _=="object"){const k=_;_=k.replace,x=k.with,w=k.withKlass||null}if(typeof _!="function"||!_.prototype||!(_===Mi||_.prototype instanceof Mi)){let k="<unknown>";try{k=JSON.parse(VP)}catch{}ee(365,String(v-u.length+(t.nodes?t.nodes.length:0)),typeof _=="function"?`${_.name}${typeof _.getType=="function"?` (type ${String(_.getType())})`:""}`:String(_),String(k))}PS(_);const E=_.getType(),C=oZ(_);m.set(E,{exportDOM:h&&h.export?h.export.get(_):void 0,klass:_,replace:x,replaceWithKlass:w,sharedNodeState:sX(u[v]),transforms:C})}}const g=new Vc(a,i,m,{disableEvents:o,dom:{...km,...e&&e.dom},namespace:s,theme:n},d||console.error,f||rZ,(function(v,_){const x=new Map,w=new Set,E=C=>{Object.keys(C).forEach(k=>{let A=x.get(k);A===void 0&&(A=[],x.set(k,A)),A.push(C[k])})};return v.forEach(C=>{const k=C.klass.importDOM;if(k==null||w.has(k))return;w.add(k);const A=k.call(C.klass);A!==null&&E(A)}),_&&E(_),x})(m,h?h.import:void 0),p,e);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),(function(v){v.registerCommand(uO,AX,lt),v.registerCommand(cO,$X,lt),v.registerCommand(dO,TX,lt),v.registerCommand(fO,NX,lt),v.registerCommand(hO,DX,lt)})(g),g}function aZ(e,t){const r=e.get(t);e.delete(t),r&&r()}function Vd(e,t,r){return e.set(t,r),aZ.bind(null,e,t)}class Vc{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,r,n,i,o,a,s,l,u){this._createEditorArgs=u,this._parentEditor=r,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Vy,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=i,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=g6(),this._onError=o,this._onWarn=a,this._htmlConversions=s,this._editable=l,this._headless=r!==null&&r._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){return Vd(this._listeners.update,t)}registerEditableListener(t){return Vd(this._listeners.editable,t)}registerDecoratorListener(t){return Vd(this._listeners.decorator,t)}registerTextContentListener(t){return Vd(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return cl(Vd(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const a=n.get(i);a&&a(),n.set(i,i(...o)||void 0)})(r,t,[null,this._rootElement]))}registerCommand(t,r,n){n===void 0&&ee(35);const i=this._commands;i.has(t)||i.set(t,[new jd,new jd,new jd,new jd,new jd]);const o=i.get(t);o===void 0&&ee(36,String(t));const a=(function(l){return 7&l})(n),s=o[a];return a!==n?s.addFront(r):s.addBack(r),()=>{s.delete(r),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,r,n){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;let a=o.get(r);a===void 0&&(a=new Set,o.set(r,a)),a.add(i);const s=n&&n.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(r,i),()=>{a.delete(i),a.size===0&&o.delete(r)}}getRegisteredNode(t){const r=this._nodes.get(t.getType());return r===void 0&&ee(37,t.name),r}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,r){const n=this._editorState,i=MR(n).get(r.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,r){const n=this.getRegisteredNode(t);return n.transforms.add(r),n}registerNodeTransform(t,r){const n=this.registerNodeTransformToKlass(t,r),i=[n],o=n.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,r);i.push(a)}return(function(a,s){const l=MR(a.getEditorState()),u=[];for(const d of s){const f=l.get(d);f&&u.push(f)}u.length!==0&&a.update(()=>{for(const d of u)for(const f of d.keys()){const h=tr(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:wf}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return Se(this,t,r)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const r=this._rootElement;if(t!==r){const n=Ac(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,l6(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||FX(r),n!=null&&r.classList.remove(...n)),t!==null){const o=IS(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,JP(this),this._updateTags.add(wf),Ks(this),this._config.disableEvents||(function(s,l){const u=s.ownerDocument;t1.set(s,u);let d=pm.get(u);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},pm.set(u,d)),d.editors.add(l),d.hasShadowEditor=void 0,s.__lexicalEditor=l;const f=DO(s);f.push(RX.register(u));for(let h=0;h<e1.length;h++){const[p,m]=e1[h],g=typeof m=="function"?v=>{uR(v)||(lR(v),(l.isEditable()||p==="click")&&m(v,l))}:v=>{if(uR(v))return;lR(v);const _=l.isEditable();switch(p){case"cut":return _&&Se(l,_S,v);case"copy":return Se(l,Mg,v);case"paste":return _&&Se(l,gS,v);case"dragstart":return _&&Se(l,kO,v);case"dragover":return _&&Se(l,CO,v);case"dragend":return _&&Se(l,bX,v);case"focus":return _&&Se(l,SX,v);case"blur":return _&&Se(l,EX,v);case"drop":return _&&Se(l,wO,v)}};f.push(CX(s,p,g))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(wf),Ks(this);kf("root",this,!1,t,r)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,r){t.isEmpty()&&ee(38);let n=t;n._readOnly&&(n=o6(t),n._selection=t._selection?t._selection.clone():null),GP(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),Ks(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||t._slotsUsed,so(this,()=>{if(o&&this._updateTags.add(o),t._parsed)for(const[a,s]of n._nodeMap.entries())V(s)?this._dirtyElements.set(a,!0):this._dirtyLeaves.add(a)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const a=ES(),s=hn,l=ci,u=Br,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,hn=a,ci=!1,Br=i,CS(null);try{const m=i._nodes;Em(n.root,m),o&&o(),a._readOnly=!0,a._parsed=!0}catch(m){m instanceof Error&&i._onError(m)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,hn=s,ci=l,Br=u}return a})(typeof t=="string"?JSON.parse(t):t,this,r)}read(...t){const[r,n]=t.length===1?["force-commit",t[0]]:t;return r==="force-commit"&&Ks(this),(r==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,r){(function(n,i,o){n._updating?n._updates.push([i,o]):zg(n,i,o)})(this,t,r)}focus(t,r={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),so(this,()=>{const i=he(),o=Jr();i!==null?i.dirty||bn(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),cu("focus"),hZ(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const r=Zn(this._window);r!==null&&r.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,kf("editable",this,!0,t),this._slotsUsed&&this.update(()=>QX()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Vc.version=VP;let u1=null;function CS(e){u1=e}let sZ=1;function u6(e,t){const r=RS(e,t);return r===void 0&&ee(30,t),r}function RS(e,t){return e._nodes.get(t)}const lZ=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function AS(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return Cu(o)||ls(o)?dh(o):null})();if(!tt(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=uu(r),i=r.nodeName;return IO(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&Gh(r)==null)}function Wh(e,t,r){const n=e.getRootElement();if(!n)return!1;try{if(!t||!n.contains(t)||!n.contains(r))return!1}catch{return!1}return Rc(t)===e&&e.read("latest",()=>!AS(t))}function Ug(e){return e instanceof Vc}function Rc(e){let t=e;for(;t!=null;){const r=Gh(t);if(Ug(r))return r;t=Ru(t)}return null}function Gh(e){return e?e.__lexicalEditor:null}function Hl(e){return su(e)||e.isToken()}function Di(e){return Hl(e)||e.isSegmented()}function bi(e){return _d(e)&&e.nodeType===3}function Cu(e){return _d(e)&&e.nodeType===9}function uZ(e){let t=e;for(;t!=null;){if(bi(t))return t;t=t.firstChild}return null}function lu(e,t,r){const n=ss[t];if(r!==null&&(e&n)===(r&n))return e;let i=e^n;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function c6(e){return ne(e)||Yn(e)||ct(e)}function d6(e,t){const r=(function(){const a=u1;return u1=null,a})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);un(),e6();const n=Ot(),i=_s(),o=""+sZ++;i._nodeMap.set(o,e),V(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType===0&&(n._dirtyType=1),e.__key=o}function Ja(e){$n(e)!==null&&ee(380,e.__key,String($n(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(n.__first=a),o===null&&(n.__last=s),l!==null&&(l.__next=a),u!==null&&(u.__prev=s),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function Cm(e){e6(),gm(e)&&ee(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:du(t)?t.__slotHost:null,n=_s(),i=Ot(),o=n._nodeMap,a=i._dirtyElements;r!==null&&(function(l,u,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent!==null?h.__parent:du(h)?h.__slotHost:null}})(r,o,a);const s=t.__key;i._dirtyType===0&&(i._dirtyType=1),V(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function cn(e){un();const t=Ot(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=tr(r);n!==null&&n.getWritable()}if(e!==null){const n=tr(e);n!==null&&n.getWritable()}}}function Qa(){return qc()?null:Ot()._compositionKey}function tr(e,t){const r=(t||_s())._nodeMap.get(e);return r===void 0?null:r}function f6(e,t){const r=vd(e,Ot());return r!==void 0?tr(r,t):null}function h6(e,t,r){e[`__lexicalKey_${t._key}`]=r}function vd(e,t){return e[`__lexicalKey_${t._key}`]}function uu(e,t){let r=e;for(;r!=null;){const n=f6(r,t);if(n!==null)return n;r=Ru(r)}return null}function p6(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function NR(e){return e.read(()=>Jr().getTextContent())}function Jr(){return _s()._nodeMap.get("root")}function bn(e){un();const t=_s();e!==null&&(e.dirty=!0,e.setCachedNodes(null),te(e)&&Ot()._slotsUsed&&QO(e)),t._selection=e}function DR(){un(),GP(Ot())}function fc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=vd(i,n);if(o!==void 0)return o;i=Ru(i)}return null})(e,Ot());return t===null?null:tr(t)}function m6(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function $S(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function g6(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function v6(e){return bi(e)?e.nodeValue:null}function TS(e,t,r){const n=Zn(yi(t));if(n===null)return;const i=ho(n,t._rootElement),o=i.anchorNode;let{anchorOffset:a,focusOffset:s}=i;if(o!==null){let l=v6(o);const u=uu(o);if(l!==null&&ne(u)){if((l===Zf||l===pS)&&r){const d=r.length;l=r,a=d,s=d}l!==null&&NS(u,l,a,s,e)}}}function NS(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();if(o.isToken()&&a)return;let s=t;if((a||i)&&(t.endsWith(Zf)&&(s=t.slice(0,-Zf.length)),i)){const u=pS;let d;for(;(d=s.indexOf(u))!==-1;)s=s.slice(0,d)+s.slice(d+u.length),r!==null&&r>d&&(r=Math.max(d,r-u.length)),n!==null&&n>d&&(n=Math.max(d,n-u.length))}const l=o.getTextContent();if(i||s!==l){const u=he();if(s===""){if(cn(null),jh||sl||qh)o.remove();else{const g=Ot();R_(o,"",u),setTimeout(()=>{g.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=fd(),h=o.getTextContentSize(),p=Qa(),m=o.getKey();if(o.isToken()&&!a||p!==null&&m===p&&!a||te(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!a))return void o.markDirty();if(!te(u)||r===null||n===null)return void R_(o,s,u);if(u.setTextNodeRange(o,r,o,n),o.isSegmented()){const g=Rr(o.getTextContent());o.replace(g),o=g}R_(o,s,u)}}}function R_(e,t,r){if(e.setTextContent(t),te(r)){const n=e.getKey();let i=!1;for(const o of["anchor","focus"]){const a=r[o];a.type==="text"&&a.key===n&&(a.offset=ba(e,a.offset,"clamp"),i=!0)}i&&(r._cachedNodes=null,r._cachedIsBackward=null)}}function Dp(e,t,r){const n=t[r]||!1;return n==="any"||n===e[r]}function cZ(e,t){return Dp(e,t,"altKey")&&Dp(e,t,"ctrlKey")&&Dp(e,t,"shiftKey")&&Dp(e,t,"metaKey")}function Gt(e,t,r){if(!cZ(e,r))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;const n="Key"+t.toUpperCase();return e.code===n}const La={ctrlKey:!Ao,metaKey:Ao},FR={altKey:Ao,ctrlKey:!Ao};function IR(e){return e.key==="Backspace"}function dZ(e){const t=Jr();if(te(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(Ar(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Vs(e),e;const o=i.getTopLevelElementOrThrow(),a=o.getParent();if(a===null)return V(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Vs(e)),e;const s=a;return r.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),Vs(e),e}{const r=t.select(0,t.getChildrenSize());return bn(Vs(r)),r}}function Ac(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const r=e.__lexicalClassNameCache,n=r[t];if(n!==void 0)return n;const i=e[t];if(typeof i=="string"){const o=Za(i);return r[t]=o,o}return i}function DS(e,t,r,n,i){if(r.size===0)return;const o=n.__type,a=n.__key,s=t.get(o);s===void 0&&ee(33,o);const l=s.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const d=u.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(a,f?"updated":i)}function PR(e,t,r){const n=e.getParent();let i=r,o=e;return n!==null&&(r===0&&(i=o.getIndexWithinParent(),o=n)),o.getChildAtIndex(i-1)}function fZ(e,t){const r=e.offset;if(e.type==="element")return PR(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?PR(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function _6(e){const t=yi(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function Se(e,t,r){return i6(e,t,r,e)}function Kc(e,t){const r=e._keyToDOMMap.get(t);return r===void 0&&ee(75,t),r}function Ru(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const r=e.parentNode;return ls(r)?r.host:null}function FS(e){return Cu(e)?e:tt(e)?e.ownerDocument:null}function cu(e){un(),Ot()._updateTags.add(e)}function hZ(e){un(),Ot()._deferred.push(e)}function Hc(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function IS(e){const t=FS(e);return t?t.defaultView:null}function yi(e){const t=e._window;return t===null&&ee(78),t}function pZ(e){return V(e)&&e.isInline()||ct(e)&&e.isInline()}function b6(e){let t=e.getLatest();for(;t!==null;){if($n(t)!==null&&V(t))return t;const r=t.getParentOrThrow();if(sr(r))return r;t=r}return t}function $c(e){return V(e)&&e.isShadowRoot()}function sr(e){return Ar(e)||$c(e)}function Un(e,t=!1){const r=e.constructor.clone(e);return d6(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function Qo(e){const t=Ot(),r=e.getType(),n=RS(t,r);n===void 0&&ee(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const a=i(e),s=a.constructor;return o!==null?a instanceof o||ee(201,o.name,o.getType(),s.name,s.getType(),e.constructor.name,r):a instanceof e.constructor&&s!==e.constructor||ee(202,s.name,s.getType(),e.constructor.name,r),a.__key===e.__key&&ee(203,e.constructor.name,r,s.name,s.getType()),a}return e}function A_(e,t){!Ar(e.getParent())||V(t)||ct(t)||ee(99)}function mZ(e){const t=tr(e);return t===null&&ee(63,e),t}function U0(e){if(!e||e.isInline())return!1;if(ct(e))return!0;if(V(e)){if(e.isShadowRoot()){const t=e.getParent();return!(V(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function Rm(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function Zn(e){return Jo?(e||window).getSelection():null}function gZ(e){const t=IS(e);return t?t.getSelection():null}function ls(e){return d1(e)&&"host"in e}const vZ=[];function y6(e){const t=e.getRootNode();if(t===e||!ls(t))return vZ;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!ls(i))break;r.push(i),n=i.host}return r}function*x6(e){const t=[e];let r;for(;r=t.pop();){yield*r.querySelectorAll('[data-lexical-editor="true"]');const n=(Cu(r)?r:r.ownerDocument).createTreeWalker(r,NodeFilter.SHOW_ELEMENT);let i;for(;i=n.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}function S6(e){return e!==null?e.ownerDocument:document}function rr(){const e=r6();return S6(e!==null?e._rootElement:null)}function Bg(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=y6(t);if(r.length===0)return null;const n=e.getComposedRanges;try{const i=n.call(e,{shadowRoots:r})[0];if(i!==void 0)return i}catch{}try{const i=n.apply(e,r)[0];if(i!==void 0)return i}catch{}return null}function _Z(e,t){const r=Bg(e,t);if(r!==null){const n=bZ(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function ho(e,t){const r=Bg(e,t);return r===null?e:yZ(r,xZ(e))}function bZ(e){const t=e.startContainer.ownerDocument;if(t===null)return null;const r=t.createRange();try{return r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset),r}catch{return null}}function yZ(e,t){const{startContainer:r,startOffset:n,endContainer:i,endOffset:o}=e;return t==="backward"?{anchorNode:i,anchorOffset:o,direction:t,focusNode:r,focusOffset:n}:{anchorNode:r,anchorOffset:n,direction:t,focusNode:i,focusOffset:o}}function xZ(e){return e.direction}function c1(e){const t=e.getRootNode();return Cu(t)||ls(t)?t.activeElement:null}function dh(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){const r=t.shadowRoot.activeElement;if(r===null)break;t=r}return t}function E6(e){const t=e.target;if(t!==null&&tt(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function w6(e){return tt(e)&&e.tagName==="A"}function tt(e){return _d(e)&&e.nodeType===1}function _d(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function d1(e){return _d(e)&&e.nodeType===11}const SZ=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Am(e){return!(!tt(e)||!e.style.display.startsWith("inline"))||SZ.test(e.nodeName)}const EZ=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Wc(e){return(!tt(e)||!e.style.display.startsWith("inline"))&&EZ.test(e.nodeName)}function Cn(e){if(ct(e)&&!e.isInline())return!0;if(!V(e)||sr(e))return!1;const t=e.getFirstChild(),r=t===null||Yn(t)||ne(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function yr(){return Ot()}function jg(e=yr()){return e._config.dom||km}function po(e,t,r=yr()){const n=jg(r).$getDOMSlot(e,t,r);return V(e)&&(wZ(n)||ee(344,e.getKey(),e.getType())),n}function wZ(e){return e instanceof xc}function tl(e,t,r=yr()){return uZ(po(e,t,r).element)}const OR=new WeakMap,kZ=new Map;function MR(e){if(!e._readOnly&&e.isEmpty())return kZ;e._readOnly||ee(192);let t=OR.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const a=o.__type;let s=n.get(a);s||(s=new Map,n.set(a,s)),s.set(i,o)}return n})(e),OR.set(e,t)),t}function k6(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function CZ(e){return(t=k6(e))[FO]=!0,t;var t}function Au(e,t){const r=e.getAttribute("data-lexical-indent");if(r!==null){const o=parseInt(r,10);if(Number.isFinite(o)&&o>=0)return void t.setIndent(o)}const n=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(n/40);t.setIndent(i)}function bo(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function Ta(e,t){const r=t.style.textAlign;return r&&r in dm?e.setFormat(r):e}function RZ(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function C6(e){return e.__lexicalUnmanaged===!0}function AZ(e,t=yr()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function $m(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(tt(r)&&r.hasAttribute("data-lexical-slot")||vd(r,t)!==void 0)return!1;r=Ru(r)}return!1}function Kd(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==Mi[t]}const LR=new WeakMap;function PS(e){const t=LR.get(e);if(t)return t;const r=e.prototype!=null&&MC in e.prototype?e.prototype[MC]():void 0,n=(function(l){if(!(l===Mi||l.prototype instanceof Mi)){let u="<unknown>",d="<unknown>";try{u=l.getType()}catch{}try{Vc.version&&(d=JSON.parse(Vc.version))}catch{}ee(290,l.name,u,d)}return l===SS||l===mi||l===Mi})(e),i=!n&&Kd(e,"getType")?e.getType():void 0;let o,a=i;if(r)if(i)o=r[i];else{for(const[l,u]of Object.entries(r))a=l,o=u;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const u=r[l];if(u){o=u;break}}}if(!n&&a&&(Kd(e,"getType")||(e.getType=()=>a),Kd(e,"clone")||(e.clone=l=>(CS(l),new e)),Kd(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!Kd(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const s={klass:e,ownNodeConfig:o,ownNodeType:a};return LR.set(e,s),s}function*OS(e){for(let t=e;t&&(t===Mi||IO(t.prototype));){const r=PS(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||A6(t)}}function R6(e){const t=yr();return un(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const Qt=(e,t)=>{let r=e;for(;r!=null&&!Ar(r);){if(t(r))return r;r=r.getParent()}return null};function Tm(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?tr(n):t.get(n);i==null&&ee(174),r.push(n),n=i.__next}return r}function A6(e){const t=Object.getPrototypeOf(e);if(typeof t=="function"&&t!==Function.prototype)return t;const r=e.prototype&&Object.getPrototypeOf(e.prototype);return r?r.constructor:null}const $6=new Map;function Xa(e){return V(e)||ct(e)}function du(e){return V(e)||ct(e)}function $n(e){const t=e.getLatest();return du(t)?t.__slotHost:null}function Po(e){const t=$n(e);if(t===null)return null;const r=tr(t);return V(r)||ct(r)||ee(370),r}function $Z(e){const t=Po(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of Vg(t))if(i===r)return n;return null}function qg(e){let t=e.getLatest();for(;t!==null;){if($n(t)!==null)return t;t=t.getParent()}return null}function Vg(e){const t=e.getLatest();return Xa(t)&&t.__slots!==null?t.__slots:$6}function lo(e){return Array.from(Vg(e).keys())}function fu(e,t){const r=Vg(e).get(t);return r===void 0?null:tr(r)}const TZ=["__proto__","constructor","prototype"],zR=Symbol("slotMapOwner");function f1(e){let t=e.__slots;return t!==null&&t[zR]===e||(t=new Map(t),t[zR]=e,e.__slots=t),t}const UR=new WeakMap,NZ=[];function DZ(e){for(const{ownNodeConfig:t}of OS(e)){const r=t&&t.slots;if(r)return r}return NZ}function T6(e){let t="";for(const r of lo(e)){const n=fu(e,r);n!==null&&(t+=n.getTextContent())}return t}function BR(e,t,r){const n=r.get(e),i=r.get(t);return n!==void 0?i!==void 0?n-i:-1:i!==void 0?1:e<t?-1:e>t?1:0}function FZ(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(a){let s=UR.get(a);if(s===void 0){const l=DZ(a),u=new Map;for(const d of l)TZ.includes(d)&&ee(371,a.name,d),u.has(d)&&ee(372,a.name,d),u.set(d,u.size);s=u,UR.set(a,s)}return s})(e.constructor);let n=null,i=!0;for(const a of t.keys()){if(n!==null&&BR(n,a,r)>0){i=!1;break}n=a}if(i)return;const o=Array.from(t).sort(([a],[s])=>BR(a,s,r));t.clear();for(const[a,s]of o)t.set(a,s)}function N6(e,t,r){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||ee(373,t);const n=e.getLatest();if(n.__slots!==null&&n.__slots.get(t)===r.getLatest().__key)return n;(!V(r)&&!ct(r)||r.isInline())&&ee(374,r.__key);const i=e.getWritable(),o=f1(i),a=o.get(t);a!==void 0&&D6(a);const s=r.getWritable(),l=Po(s);if(l!==null){const u=$Z(s);u!==null&&f1(l.getWritable()).delete(u),s.__slotHost=null}return Ja(s),s.__slotHost=i.__key,o.set(t,s.__key),FZ(i),(function(){const u=yr();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}function IZ(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(D6(n),f1(r).delete(t)),r}function D6(e){const t=tr(e);if(t===null)return;const r=t.getWritable();du(r)||ee(377,e),r.__slotHost=null,r.remove()}const PZ={next:"previous",previous:"next"};class MS{origin;constructor(t){this.origin=t}[Symbol.iterator](){return F6({hasNext:ll,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return It(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return It(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,r){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(n===null?this.insert(t):n.replace(t,r)),this}splice(t,r,n="next"){const i=n===this.direction?r:Array.from(r).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();s.set(u.getKey(),u)}for(const l of i){if(s.size>0){const u=o.getNodeAtCaret();if(u){if(s.delete(u.getKey()),s.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),u.replace(l)}}else u===null&&ee(263,Array.from(s).join(" "))}else o.insert(l);o=It(l,this.direction)}for(const l of s.values())l.remove();return this}}class fh extends MS{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:mo(t,this.direction)}getParentCaret(t="root"){return It(LS(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=yl(this.direction);return It(this.getNodeAtCaret(),t)||mo(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof fh&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const OZ={root:Ar,shadowRoot:sr};function yl(e){return PZ[e]}function LS(e,t="root"){return e===null||OZ[t](e)?null:$n(e)===null?e:null}class hu extends MS{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:It(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return V(this.origin)?mo(this.origin,this.direction):null}getParentCaret(t="root"){return It(LS(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=yl(this.direction);return It(this.getNodeAtCaret(),t)||mo(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof hu&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof hu||t instanceof pu)&&this.direction===t.direction&&this.origin.is(t.origin)}}class pu extends MS{type="text";offset;constructor(t,r){super(t),this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:ul(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return It(LS(this.getParentAtCaret(),t),this.direction)}getFlipped(){return ul(this.origin,yl(this.direction),this.offset)}isSamePointCaret(t){return t instanceof pu&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof hu||t instanceof pu)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return It(this.origin,this.direction)}}function uo(e){return e instanceof pu}function ll(e){return e instanceof hu}function co(e){return e instanceof fh}const MZ={next:class extends pu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends pu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},LZ={next:class extends hu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends hu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},zZ={next:class extends fh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends fh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function It(e,t){return e?new LZ[t](e):null}function ul(e,t,r){return e?new MZ[t](e,ba(e,r)):null}function ba(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&zP(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function jR(e,t){return new BZ(e,t)}function mo(e,t){return V(e)?new zZ[t](e):null}function UZ(e){return e&&e.getChildCaret()||e}function zS(e){return e&&UZ(e.getAdjacentCaret())}class US{type="node-caret-range";direction;anchor;focus;constructor(t,r,n){this.anchor=t,this.focus=r,this.direction=n}getLatest(){const t=this.anchor.getLatest(),r=this.focus.getLatest();return t===this.anchor&&r===this.focus?this:new US(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return uo(o)?(function(a,s){const{direction:l,origin:u}=a,d=ba(u,s==="focus"?yl(l):l);return jR(a,d-a.offset)})(o,i):null},r=t("anchor"),n=t("focus");if(r&&n){const{caret:i}=r,{caret:o}=n;if(i.isSameNodeCaret(o))return[jR(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=uo(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=uo(n),o=a=>a.isSameNodeCaret(n)?null:zS(a)||a.getParentCaret(t);return F6({hasNext:a=>a!==null&&!(i&&n.isSameNodeCaret(a)),initial:r.isSameNodeCaret(n)?null:o(r),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class BZ{type="slice";caret;distance;constructor(t,r){this.caret=t,this.distance=r}getSliceIndices(){const{distance:t,caret:{offset:r}}=this,n=r+t;return n<r?[n,r]:[r,n]}getTextContent(){const[t,r]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,r)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:r}}=this,[n,i]=this.getSliceIndices(),o=t.getTextContent();return ul(t.setTextContent(o.slice(0,n)+o.slice(i)),r,n)}}function Kg(e){return Mo(e,It(Jr(),e.direction))}function Hg(e){return Mo(e,e)}function Mo(e,t){return e.direction!==t.direction&&ee(265),new US(e,t,e.direction)}function F6(e){const{initial:t,hasNext:r,step:n,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!r(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=n(o),a}}}function hh(e,t){const r=h1(e.origin,t.origin);switch(r===null&&ee(275,e.origin.getKey(),t.origin.getKey()),r.type){case"same":{const n=e.type==="text",i=t.type==="text";return n&&i?(function(o,a){return Math.sign(o-a)})(e.offset,t.offset):e.type===t.type?0:n?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return I6(r)}}function I6(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,a=r;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===n)return 1}return o===null?1:-1}function Fp(e,t){return t.is(e)}function qR(e){return V(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function h1(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=qR(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=qR(t);n;i=n,n=n.getParent()){const o=r.get(n);if(o!==void 0)return o===null?(Fp(e,n)||ee(276),{commonAncestor:n,type:"ancestor"}):i===null?(Fp(t,n)||ee(277),{commonAncestor:n,type:"descendant"}):((V(o)||Fp(e,o))&&(V(i)||Fp(t,i))&&n.is(o.getParent())&&n.is(i.getParent())||ee(278),{a:o,b:i,commonAncestor:n,type:"branch"})}return null}function di(e,t){const{type:r,key:n,offset:i}=e,o=mZ(e.key);return r==="text"?(ne(o)||ee(266,o.getType(),n),ul(o,t,i)):(V(o)||ee(267,o.getType(),n),m1(o,e.offset,t))}function mu(e,t){const{origin:r,direction:n}=t,i=n==="next";uo(t)?e.set(r.getKey(),t.offset,"text"):ll(t)?ne(r)?e.set(r.getKey(),ba(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(co(t)&&V(r)||ee(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function ph(e){const t=he(),r=te(t)?t:yS();return B0(r,e),bn(r),r}function B0(e,t){mu(e.anchor,t.anchor),mu(e.focus,t.focus)}function p1(e){const{anchor:t,focus:r}=e,n=di(t,"next"),i=di(r,"next"),o=hh(n,i)<=0?"next":"previous";return Mo(us(n,o),us(i,o))}function $u(e){const{direction:t,origin:r}=e,n=It(r,yl(t)).getNodeAtCaret();return n?It(n,t):mo(r.getParentOrThrow(),t)}function VR(e,t="root"){const r=[e];for(let n=co(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push($u(n));return r}function $_(e){return!!e&&e.origin.isAttached()}function jZ(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=jS(e,n),a=VR(o.anchor,r),s=VR(o.focus.getFlipped(),r),l=new Set,u=[];for(const m of o.iterNodeCarets(r))if(co(m))l.add(m.origin.getKey());else if(ll(m)){const{origin:g}=m;V(g)&&!l.has(g.getKey())||u.push(g)}for(const m of u)m.remove();for(const m of o.getTextSlices()){if(!m)continue;const{origin:g}=m.caret,v=g.getTextContentSize(),_=$u(It(g,n)),x=g.getMode();if(Math.abs(m.distance)===v&&i==="removeEmptySlices"||x==="token"&&m.distance!==0)_.remove();else if(m.distance!==0){i="removeEmptySlices";let w=m.removeTextSlice();const E=m.caret.origin;if(x==="segmented"){const C=w.origin,k=Rr(C.getTextContent()).setStyle(C.getStyle()).setFormat(C.getFormat());_.replaceOrInsert(k),w=ul(k,n,w.offset)}E.is(a[0].origin)&&(a[0]=w),E.is(s[0].origin)&&(s[0]=w.getFlipped())}}let d,f;for(const m of a)if($_(m)){d=Fi(m);break}for(const m of s)if($_(m)){f=Fi(m);break}const h=(function(m,g,v){if(!m||!g)return null;const _=m.getParentAtCaret(),x=g.getParentAtCaret();if(!_||!x)return null;const w=_.getParents().reverse();w.push(_);const E=x.getParents().reverse();E.push(x);const C=Math.min(w.length,E.length);let k;for(k=0;k<C&&w[k]===E[k];k++);const A=(M,P)=>{let I;for(let U=k;U<M.length;U++){const B=M[U];if(sr(B))return;!I&&P(B)&&(I=B)}return I},$=A(w,Cn),N=$&&A(E,M=>v.has(M.getKey())&&Cn(M));return N&&lo(N).length>0?null:$&&N?[$,N]:null})(d,f,l);if(h){const[m,g]=h;mo(m,"previous").splice(0,g.getChildren());let v=g.getParent();for(g.remove(!0);v&&v.isEmpty();){const _=v;v=v.getParent(),_.remove(!0)}}else if(f){const m=(function(_){if(co(_)){const x=_.origin;if(Cn(x))return x}else{const x=_.getParentAtCaret();if(x&&Cn(x))return x}return null})(f),g=m&&m.getParent(),v=m&&m.getParents().findLast($c);if(m&&g&&!Ar(g)&&m.isEmpty()&&l.has(m.getKey())&&lo(m).length===0&&(!v||l.has(v.getKey()))){m.remove(!0);let _=g;for(;_&&!Ar(_)&&_.isEmpty();){const x=_.getParent();if(x&&Ar(x)&&x.getChildrenSize()<=1)break;const w=_;_=x,w.remove(!0)}}}const p=[d,f,...a,...s].find($_);if(p)return Hg(us(Fi(p),e.direction));ee(269,JSON.stringify(a.map(m=>m.origin.__key)))}function Fi(e){const t=(function(i){let o=i;for(;co(o);){const a=zS(o);if(!co(a))break;o=a}return o})(e.getLatest()),{direction:r}=t;if(ne(t.origin))return uo(t)?t:ul(t.origin,r,r);const n=t.getAdjacentCaret();return ll(n)&&ne(n.origin)?ul(n.origin,r,yl(r)):t}function BS(e){return uo(e)&&e.offset!==ba(e.origin,e.direction)}function us(e,t){return e.direction===t?e:e.getFlipped()}function jS(e,t){return e.direction===t?e:Mo(us(e.focus,t),us(e.anchor,t))}function m1(e,t,r){let n=mo(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return us(n,r)}function qZ(e){const{origin:t,offset:r,direction:n}=e;if(r===ba(t,n))return e.getSiblingCaret();if(r===ba(t,yl(n)))return $u(e.getSiblingCaret());const[i]=t.splitText(r);return ne(i)||ee(281),us(It(i,"next"),n)}function VZ(e,t){return!0}function P6(e,{$copyElementNode:t=Un,$splitTextPointCaretNext:r=qZ,rootMode:n="shadowRoot",$shouldSplit:i=VZ,removeEmptyDestination:o=!1}={}){if(uo(e))return r(e);const a=e.getParentCaret(n);if(a){const{origin:s}=a;if(co(e)){const u=$u(a);if(o&&s.isEmpty())return s.remove(),u;if(!s.canBeEmpty()||!i(s,"first"))return u}const l=(function(u){const d=[];for(let f=u.getAdjacentCaret();f;f=f.getAdjacentCaret())d.push(f.origin);return d})(e);(l.length>0||!o&&s.canBeEmpty()&&i(s,"last"))&&a.insert(t(s).splice(0,0,l))}return a}function O6(e,t,r){let n=us(t,"next");uo(n)&&(n.offset===0?n=It(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=It(n.origin,"next"))),n.origin.is(e)&&(ll(n)||ee(342,e.getKey(),e.getType()),n=$u(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=P6(i,r))n=i;return uo(n)&&ee(283),n.insert(e.isInline()?jt().append(e):e),us(It(e.getLatest(),"next"),t.direction)}function qS(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function Za(...e){const t=[];for(const r of e)if(r&&typeof r=="string")for(const[n]of r.matchAll(/\S+/g))t.push(n);return t}function wa(e,...t){const r=Za(...t);r.length>0&&e.classList.add(...r)}function VS(e,...t){const r=Za(...t);r.length>0&&e.classList.remove(...r)}function cl(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function M6(e){const t=yr().getElementByKey(e.getKey());if(t===null)return null;const r=t.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(t)}function L6(e){return M6(Ar(e)?e:e.getParentOrThrow())}function Ip(e){const t=L6(e);return t!==null&&t.direction==="rtl"}function z6(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!Di(t)&&n!==null){const[i,o]=n,a=e.isBackward(),s=i.getNode(),l=o.getNode(),u=t.is(s),d=t.is(l);if(u||d){const[f,h]=o1(e),p=s.is(l),m=t.is(a?l:s),g=t.is(a?s:l);let v,_=0;p?(_=f>h?h:f,v=f>h?f:h):m?(_=a?h:f,v=void 0):g&&(_=0,v=a?f:h);const x=t.__text.slice(_,v);x!==t.__text&&(r==="clone"&&(t=CZ(t)),t.__text=x)}}return t}function KZ(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function HZ(e,t,r){let n=di(e,r);if(BS(n))return!1;for(;n;n=n.getParentCaret()){const i=n.getParentAtCaret();if(!i||n.getNodeAtCaret())return!1;if(t.is(i))return!0}return!1}function WZ(e,t,r=KZ){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const a=new Map;if(n){const[s,l]=n,u=Qt(s.getNode(),Cn);o=Qt(l.getNode(),Cn);const d=e.isBackward()?"previous":"next";i=V(o)&&!o.is(u)&&(function(f,h,p){const m=f.getNode();return(!V(m)||!m.isEmpty())&&HZ(f,h,p)})(l,o,yl(d)),V(u)&&a.set(u.getKey(),u),V(o)&&!i&&a.set(o.getKey(),o)}for(const s of e.getNodes())if(V(s)&&Cn(s)){if(i&&s.is(o))continue;a.set(s.getKey(),s)}else if(!n){const l=Qt(s,Cn);V(l)&&a.set(l.getKey(),l)}for(const s of a.values()){const l=t();r(s,l),s.replace(l,!0)}}function U6(e){const t=B6(e);return t!==null&&t.writingMode==="vertical-rl"}function B6(e){const t=e.anchor.getNode();return V(t)?M6(t):L6(t)}function KR(e,t){let r=U6(e)?!t:t;j6(e)&&(r=!r);const n=di(e.focus,r?"previous":"next");if(BS(n))return!1;if(uo(n)&&!su(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(ne(i)&&!su(i))return!0}for(const i of Kg(n)){if(co(i))return!i.origin.isInline();if(!V(i.origin)){if(ct(i.origin))return!0;break}}return!1}function GZ(e,t,r,n){e.modify(t?"extend":"move",r,n)}function j6(e){const t=B6(e);return t!==null&&t.direction==="rtl"}function HR(e,t,r){const n=j6(e);let i;i=U6(e)||n?!r:r,GZ(e,t,i,"character")}function JZ(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function QZ(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function YZ(e){const t=Qt(e,r=>V(r)&&!r.isInline());return V(t)||JZ(4,e.__key),t}function Hs(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Pp(e){let t=null;if(Hs(e,DragEvent)?t=e.dataTransfer:Hs(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const r=t.types,n=r.includes("Files"),i=r.includes("text/html")||r.includes("text/plain");return[n,Array.from(t.files),i]}function WR(e){const t=he();if(!te(t))return!1;const r=new Set,n=t.getNodes();for(let i=0;i<n.length;i++){const o=n[i],a=o.getKey();if(r.has(a))continue;const s=Qt(o,u=>V(u)&&!u.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!r.has(l)&&(r.add(l),e(s))}return r.size>0}const XZ=Symbol.for("preact-signals");function KS(){if(Wl>1)return void Wl--;let e,t=!1;for(!(function(){let r=Nm;for(Nm=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();Cf!==void 0;){let r=Cf;for(Cf=void 0,Dm++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&q6(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Dm=0,Wl--,t)throw e}let Kt,Cf;function GR(e){const t=Kt;Kt=void 0;try{return e()}finally{Kt=t}}let Nm,Wl=0,Dm=0,JR=0,j0=0;function QR(e){if(Kt===void 0)return;let t=e.n;return t===void 0||t.t!==Kt?(t={i:0,S:e,p:Kt.s,n:void 0,t:Kt,e:void 0,x:void 0,r:t},Kt.s!==void 0&&(Kt.s.n=t),Kt.s=t,e.n=t,32&Kt.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Kt.s,t.n=void 0,Kt.s.n=t,Kt.s=t),t):void 0}function Vn(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function ZZ(e,t){return new Vn(e,t)}function q6(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function YR(e){for(let t=e.s;t!==void 0;t=t.n){const r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function V6(e){let t,r=e.s;for(;r!==void 0;){const n=r.p;r.i===-1?(r.S.U(r),n!==void 0&&(n.n=r.n),r.n!==void 0&&(r.n.p=n)):t=r,r.S.n=r.r,r.r!==void 0&&(r.r=void 0),r=n}e.s=t}function Hu(e,t){Vn.call(this,void 0),this.x=e,this.s=void 0,this.g=j0-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function K6(e){const t=e.m;if(e.m=void 0,typeof t=="function"){Wl++;const r=Kt;Kt=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,HS(e),n}finally{Kt=r,KS()}}}function HS(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,K6(e)}function eee(e){if(Kt!==this)throw new Error("Out-of-order effect");V6(this),Kt=e,this.f&=-2,8&this.f&&HS(this),KS()}function oc(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function tee(e,t){const r=new oc(e,t);try{r.c()}catch(i){throw r.d(),i}const n=r.d.bind(r);return n[Symbol.dispose]=n,n}Vn.prototype.brand=XZ,Vn.prototype.h=function(){return!0},Vn.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:GR(()=>{var r;(r=this.W)==null||r.call(this)}))},Vn.prototype.U=function(e){if(this.t!==void 0){const t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&GR(()=>{var n;(n=this.Z)==null||n.call(this)}))}},Vn.prototype.subscribe=function(e){return tee(()=>{const t=this.value,r=Kt;Kt=void 0;try{e(t)}finally{Kt=r}},{name:"sub"})},Vn.prototype.valueOf=function(){return this.value},Vn.prototype.toString=function(){return this.value+""},Vn.prototype.toJSON=function(){return this.value},Vn.prototype.peek=function(){const e=Kt;Kt=void 0;try{return this.value}finally{Kt=e}},Object.defineProperty(Vn.prototype,"value",{get(){const e=QR(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Dm>100)throw new Error("Cycle detected");(function(t){Wl!==0&&Dm===0&&t.l!==JR&&(t.l=JR,Nm={S:t,v:t.v,i:t.i,o:Nm})})(this),this.v=e,this.i++,j0++,Wl++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{KS()}}}}),Hu.prototype=new Vn,Hu.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===j0))return!0;if(this.g=j0,this.f|=1,this.i>0&&!q6(this))return this.f&=-2,!0;const e=Kt;try{YR(this),Kt=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Kt=e,V6(this),this.f&=-2,!0},Hu.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}Vn.prototype.S.call(this,e)},Hu.prototype.U=function(e){if(this.t!==void 0&&(Vn.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Hu.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Hu.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=QR(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),oc.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}},oc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,K6(this),YR(this),Wl++;const e=Kt;return Kt=this,eee.bind(this,e)},oc.prototype.N=function(){2&this.f||(this.f|=2,this.u=Cf,Cf=this)},oc.prototype.d=function(){this.f|=8,1&this.f||HS(this)},oc.prototype.dispose=function(){this.d()};function ree(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function er(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let H6;try{H6="0.48.0+prod.esm"}catch{}const nee=H6??'"<unknown>+source"',iee=new Set(["__proto__","constructor","prototype"]);function W6(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!iee.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=W6(r[i],n[i]));return e}return t}const WS=0,g1=1,G6=2,T_=3,Op=4,Wu=5,N_=6,Hd=7;function D_(e){return e.id===WS}function J6(e){return e.id===G6}function oee(e){return(function(t){return t.id===g1})(e)||er(305,String(e.id),String(g1)),Object.assign(e,{id:G6})}const aee=new Set;let see=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:WS}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):qS;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;J6(r)||er(306,String(r.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,u){return Object.assign(s,{config:l,id:T_,registerState:u})})(r,this.mergeConfigs(),n);let a;this.state=o,this.extension.init&&(a=this.extension.init(t,o.config,n)),this.state=(function(s,l,u){return Object.assign(s,{id:Op,initResult:l,registerState:u})})(o,a,i)}build(t){const r=this.state;let n;r.id!==Op&&er(307,String(r.id),String(Wu)),this.extension.build&&(n=this.extension.build(t,r.config,r.registerState));const i={...r.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:Wu,output:a,registerState:s})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==Wu&&er(308,String(n.id),String(Wu));const i=this.extension.register&&this.extension.register(t,n.config,n.registerState);return this.state=(function(o){return Object.assign(o,{id:N_})})(n),()=>{const o=this.state;o.id!==Hd&&er(309,String(n.id),String(Hd)),this.state=(function(a){return Object.assign(a,{id:Wu})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==N_&&er(310,String(r.id),String(N_)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:Hd})})(r),n}getSignal(){return this._signal===void 0&&er(311),this._signal}getInitResult(){this.extension.init===void 0&&er(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Op})(t)||er(313,String(t.id),String(Op)),t.initResult}getInitPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return(function(r){return r.id>=T_})(t)||er(314,String(t.id),String(T_)),{config:t.config}}getPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}getInitDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&er(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&er(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=Hd})(t)||er(316,String(t.id),String(Hd)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||aee}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([r])=>r)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(r){return r.id>=Wu})(t)||er(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const XR={tag:wf};function lee(){const e=Jr();e.isEmpty()&&e.append(jt())}const uee={config:{setOptions:XR,updateOptions:XR},init:({$initialEditorState:e=lee})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:r},n){const i=n.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(ZX(o))e.setEditorState(o,r);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const a=e.parseEditorState(o);e.setEditorState(a,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[hd,vs,pd,cd,md]},ZR=Symbol.for("@lexical/extension/LexicalBuilder");function eA(){}function cee(e){throw e}function Mp(e){return Array.isArray(e)?e:[e]}const F_=nee;class Rf{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(t){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=F_,this.roots=t;for(const r of t)this.addExtension(r)}static fromExtensions(t){const r=[Mp(uee)];for(const n of t)r.push(Mp(n));return new Rf(r)}static maybeFromEditor(t){const r=t[ZR];return r&&(r.PACKAGE_VERSION!==F_&&er(292,r.PACKAGE_VERSION,F_),r instanceof Rf||er(293)),r}static fromEditor(t){const r=Rf.maybeFromEditor(t);return r===void 0&&er(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(kS({...i,...r?{onError:a=>{r(a,o)}}:{},...n?{onWarn:a=>{n(a,o)}}:{}}),{[ZR]:this});for(const a of this.sortedExtensionReps())a.build(o);return o}buildEditor(){let t=eA;function r(){try{t()}finally{t=eA}}const n=Object.assign(this.constructEditor(),{dispose:r,[Symbol.dispose]:r});return t=cl(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const r=this.extensionNameMap.get(t.name);if(r)return r.extension!==t&&er(295,t.name),r}addEdge(t,r,n){const i=this.outgoingConfigEdges.get(t);i?i.set(r,n):this.outgoingConfigEdges.set(t,new Map([[r,n]]));const o=this.incomingEdges.get(r);o?o.add(t):this.incomingEdges.set(r,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&er(296);const r=Mp(t),[n]=r;typeof n.name!="string"&&er(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&er(298,n.name),!i){i=new see(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&er(299,n.name,o);for(const a of n.conflictsWith||[])this.extensionNameMap.has(a)&&er(299,n.name,a),this.conflicts.set(a,n.name);for(const a of n.dependencies||[]){const s=Mp(a);this.addEdge(n.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of n.peerDependencies||[])this.addEdge(n.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(J6(o))return;const a=n.extension.name;var s;D_(o)||er(300,a,i||"[unknown]"),D_(s=o)||er(304,String(s.id),String(WS)),o=Object.assign(s,{id:g1}),n.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&r(d,a)}o=oee(o),n.state=o,t.push(n)};for(const n of this.extensionNameMap.values())D_(n.state)&&r(n);for(const n of t)for(const[i,o]of this.outgoingConfigEdges.get(n.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&er(301,n.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const a of r){const s=a.register(t,o);s&&i.push(s)}for(const a of r){const s=a.afterRegistration(t);s&&i.push(s)}return cl(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of ree(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&er(302,f.name,h.replace.name,p.extension.name),n.set(h.replace,d)}r.add(h)}if(f.html){if(f.html.export)for(const[h,p]of f.html.export.entries())i.set(h,p);f.html.import&&Object.assign(o,f.html.import)}f.theme&&W6(a,f.theme)}Object.keys(a).length>0&&(t.theme=a),r.size&&(t.nodes=[...r]);const l=Object.keys(o).length>0,u=i.size>0;(l||u)&&(t.html={},l&&(t.html.import=o),u&&(t.html.export=i));for(const d of s)d.init(t);return t.onError||(t.onError=cee),t}}function Jh(e,t){const r=Rf.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function dee(e){return Jh(yr(),e)}class Wg extends SS{static getType(){return"horizontalrule"}static clone(t){return new Wg(t.__key)}static importJSON(t){return GS().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:fee,priority:0})}}exportDOM(){return{element:rr().createElement("hr")}}createDOM(t){const r=rr().createElement("hr");return wa(r,t.theme.hr),r}getTextContent(){return`
|
|
28
|
+
`}isInline(){return!1}updateDOM(){return!1}}function fee(){return{node:GS()}}function GS(){return R6(Wg)}function bd(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Tc;function Q6(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function Y6(e){return Tc&&Tc.editor===e?Tc:void 0}function hee(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n(Q6(e,r))]}return t}function pee(e,t){let r=t;for(const n of e){const[i,o]=hee(r,n),a=i.key;if(r===t&&Q6(r,i)===o)continue;const s=r===t||r===void 0?mee(t):r;s[a]=o,r=s}return r}function mee(e){return Object.create(e||null)}function X6(e,t){return[e,t]}function gee(e,t,r,n=yr()){const i=Tc,o=Y6(n);try{return Tc={...o,editor:n,[e]:t},r()}finally{Tc=i}}function vee(e,t=()=>{}){return(r,n=yr())=>i=>{const o=Y6(n),a=o&&o[e],s=pee(r,a||t(n));return s&&s!==a?gee(e,s,i,n):i()}}function Z6(e,t,r,n){return Object.assign(Vh(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function _ee(e){if(!Cu(e))return;const t=e;if(t.querySelector("style")===null)return;const r=new Map;function n(i){let o=r.get(i);if(o===void 0){o=new Set;for(let a=0;a<i.style.length;a++)o.add(i.style[a]);r.set(i,o)}return o}try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const a of Array.from(o)){if(!Hs(a,CSSStyleRule))continue;let s;try{s=t.querySelectorAll(a.selectorText)}catch{continue}for(const l of Array.from(s)){if(!tt(l))continue;const u=n(l);for(let d=0;d<a.style.length;d++){const f=a.style[d];u.has(f)||l.style.setProperty(f,a.style.getPropertyValue(f),a.style.getPropertyPriority(f))}}}}}catch{}}const eM="@lexical/html/DOM",tM=Symbol.for("@lexical/html/DOMExportContext"),bee=Symbol.for("@lexical/html/DOMImportContext");function yee(e,t,r){return Z6(tM,e,t,r)}const xee=yee("isExport",Boolean);function See(e){const t=Jh(e,eM);return t?t.output.defaults:void 0}function Eee(e){const t=Jh(e,eM);return t?t.output.runtime:void 0}function wee(e=yr()){const t=Eee(e);return t?t.getSessionConfig():jg(e)}const kee=vee(tM,See),Gg=Symbol.for("@lexical/html/SelectorImpl");function mh(e,t){const r={kind:"element",predicate:(n=t,n.length===0?tt:n.length===1?n[0]:(o,a)=>{for(const s of n)if(!s(o,a))return!1;return!0}),tags:e};var n;const i=o=>mh(e,[...t,o]);return{[Gg]:r,attr:(o,a,s)=>i(v1(o,a,s)),classAll:(...o)=>i(nM(o)),classAny:(...o)=>i((function(a){const s=rM(a);return s.length===0?()=>!1:l=>{if(!tt(l))return!1;const u=l.classList;for(const d of s)if(u.contains(d))return!0;return!1}})(o)),styleAny:(o,a,s)=>i((function(l,u,d){if(typeof u=="string")return f=>tt(f)&&f.style.getPropertyValue(l)===u;if(u instanceof RegExp){const f=d&&d.capture,h=u;return(p,m)=>{if(!tt(p))return!1;const g=p.style.getPropertyValue(l);if(!g)return!1;const v=g.match(h);return v!==null&&(f!==void 0&&(m[f]=v),!0)}}bd(362,JSON.stringify(l))})(o,a,s))}}function rM(e){const t=[];for(const r of e)r&&t.push(r);return t}function nM(e){const t=rM(e);return t.length===0?()=>!0:r=>{if(!tt(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function v1(e,t,r){if(t===!0)return n=>tt(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>tt(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,a)=>{if(!tt(o))return!1;const s=o.getAttribute(e);if(s==null)return!1;const l=s.match(i);return l!==null&&(n!==void 0&&(a[n]=l),!0)}}bd(361,JSON.stringify(e))}const Cee={kind:"text",predicate:bi,tags:new Set},Ree={[Gg]:Cee},Aee={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},$ee={[Gg]:Aee},hc={any:()=>mh(new Set,[]),comment:()=>$ee,tag(...e){e.length>0||bd(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return mh(t,[])},text:()=>Ree};function iM(e,t){return tt(e)&&e.nodeName===t.toUpperCase()}const oM=/[A-Za-z0-9_-]/;let Tee=class{constructor(t,r){this.source=t,this.pos=r}peek(t=0){return this.source[this.pos+t]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const t=this.pos;for(;!this.eof()&&oM.test(this.peek());)this.pos++;return this.source.slice(t,this.pos)}readQuoted(){const t=this.consume();this.assert(t==='"'||t==="'","expected quote");const r=this.pos;for(;!this.eof()&&this.peek()!==t;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(r,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(t,r){t||bd(364,String(this.pos+1),r,this.source)}};function Nee(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(oM.test(e.peek())){const i=e.readIdent();i&&t.add(i.toUpperCase())}for(;!e.eof();){const i=e.peek();if(i==="."){e.consume();const o=e.readIdent();e.assert(o!=="",'expected class name after "."'),n.push(o)}else if(i==="#"){e.consume();const o=e.readIdent();e.assert(o!=="",'expected id after "#"'),r.push(v1("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let a=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const s=e.peek();s==='"'||s==="'"?a=e.readQuoted():(a=e.readIdent(),e.assert(a!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(v1(o,a))}}}return n.length>0&&r.push(nM(n)),{predicates:r,tags:t}}function Dee(e){const t=new Tee(e,0),r=[];for(;;){const i=Nee(t);if(r.push(i),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===",",'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(r.length===1)return mh(r[0].tags,r[0].predicates);const n=new Set;for(const i of r)for(const o of i.tags)n.add(o);return mh(n,[(i,o)=>{for(const a of r){const s=i.nodeName;if(a.tags.size>0&&!a.tags.has(s))continue;let l=!0;for(const u of a.predicates)if(!u(i,o)){l=!1;break}if(l)return!0}return!1}])}function JS(e,t,r){return Z6(bee,e,t,r)}const _1=JS("textFormat",()=>0),Fee=JS("textStyle",()=>({}));function Iee(e){if(!tt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function Pee(e){if(bi(e))return!0;if(!tt(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Wc(e)&&Am(e)}const Oee=JS("whitespaceConfig",()=>({isInline:Pee,preservesWhitespace:Iee}));function QS(e){return jc(e)||ct(e)&&!e.isInline()}function aM(e,t){const r=[];let n=[];const i=()=>{n.length!==0&&(r.push(t().splice(0,0,n)),n=[])};for(const o of e)if(QS(o)){if(i(),V(o)){const a=aM(o.getChildren(),t);o.splice(0,o.getChildrenSize(),a)}r.push(o)}else n.push(o);return i(),r}function sM(e,t){if(!tt(t))return e;const r=t.style.textAlign;if(!YS(r))return e;for(const n of e)jc(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function Mee(e,t,r){e.length===1&&Yn(e[0])&&(e=[]);const n=jt();if(tt(r)){const i=r.style.textAlign;YS(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const lM={$accepts:QS,$packageRun:Mee,name:"BlockSchema"},Tu=hc,Lee=new Set(["center","end","justify","left","right","start"]);function YS(e){return Lee.has(e)}const zee={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},Uee={CODE:VY,MARK:hS},Bee=new Set(["font-weight","font-style","text-decoration","vertical-align"]),jee={$import:(e,t)=>{const r=e.get(_1),n=zee[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=n?(a=n,{fontStyle:(s=i).fontStyle||a.fontStyle,fontWeight:s.fontWeight||a.fontWeight,textDecoration:s.textDecoration||a.textDecoration,verticalAlign:s.verticalAlign||a.verticalAlign}):i;var a,s;let l=(u=r,d=(function(h){let p=0,m=0;const{fontWeight:g,fontStyle:v,textDecoration:_,verticalAlign:x}=h;if(g==="700"||g==="bold"?p|=FC:g!=="normal"&&g!=="400"||(m|=FC),v==="italic"?p|=IC:v==="normal"&&(m|=IC),_){const w=_.split(" ");w.includes("underline")&&(p|=OC),w.includes("line-through")&&(p|=PC),w.includes("none")&&(m|=OC|PC)}return x==="sub"?(p|=g_,m|=v_):x==="super"?(p|=v_,m|=g_):x==="baseline"&&(m|=g_|v_),{clear:m,set:p}})(o),u&~d.clear|d.set);var u,d;const f=Uee[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[X6(_1,l)]})},match:Tu.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function tA(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentNode;if(a===null)return null;n=a}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(bi(n))return n;if(n.nodeName==="BR")return null}}function rA(e,t){return t!==0&&ne(e)?e.setFormat(t):e}function nA(e,t){if(ne(e)){const r=(function(n){let i="";for(const o in n)Bee.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const qee={$import:(e,t)=>{const r=e.get(_1),n=e.get(Fee),i=e.get(Oee);if((function(s,l){let u=s.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(t,i)){const s=ch(t.textContent||"");for(const l of s)rA(l,r),nA(l,n);return s}const o=(function(s,l){let u=(s.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let d=s,f=!0;for(;d!==null&&(d=tA(d,!1,l))!==null;){const h=d.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(u=u.slice(1)),f=!1;break}}f&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let d=s,f=!0;for(;d!==null&&(d=tA(d,!0,l))!==null;)if((d.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(u=u.slice(0,-1))}return u})(t,i);if(o==="")return[];const a=Rr(o);return rA(a,r),nA(a,n),[a]},match:Tu.text(),name:"@lexical/html/#text"},Vee={$import:()=>[],match:Tu.tag("script","style"),name:"@lexical/html/script-style-ignore"},Kee={$import:(e,t)=>a6(t)||s6(t)?[]:[qo()],match:Tu.tag("br"),name:"@lexical/html/br"},Hee={$import:(e,t)=>{const r=jt();if(Ta(r,t),Au(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&YS(n)&&r.setFormat(n)}return bo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Tu.tag("p"),name:"@lexical/html/p"},Wee={$import:(e,t,r)=>yr().hasNode(Wg)?[GS()]:r(),match:Tu.tag("hr"),name:"@lexical/html/hr"};Tu.any();function Gee(e,t){const r=[];let n=0,i=0;for(;n<e.length&&i<t.length;)e[n]<=t[i]?r.push(e[n++]):r.push(t[i++]);for(;n<e.length;)r.push(e[n++]);for(;i<t.length;)r.push(t[i++]);return r}function Jee(e){const t=[],r=new Map,n=[],i=[],o=[],a=new Set;e.forEach((l,u)=>{const d=(function(h){const p=h[Gg];return p===void 0&&bd(360),p})(l.match),f=l.name||(function(h,p){return h.kind==="text"?`#text@${p}`:h.kind==="comment"?`#comment@${p}`:h.tags.size===0?`*@${p}`:`${Array.from(h.tags).join(",").toLowerCase()}@${p}`})(d,u);if(l.name&&a.add(l.name),t.push({$import:l.$import,name:f,predicate:d.predicate}),d.kind==="text")i.push(u);else if(d.kind==="comment")o.push(u);else if(d.tags.size===0)n.push(u);else for(const h of d.tags){let p=r.get(h);p||(p=[],r.set(h,p)),p.push(u)}});const s=new Map;if(n.length===0)for(const[l,u]of r)s.set(l,u);else for(const[l,u]of r)s.set(l,Gee(u,n));return{byTag:s,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function Qee(e){const t=[];for(const r of e)if(Yee(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function Yee(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function uM(e){const t=Qee(e);return{__type:"CompiledOverlayRules",dispatch:Jee(t),rules:t}}hc.any();const xn={any:hc.any,comment:hc.comment,css:Dee,tag:hc.tag,text:hc.text},cM=new Set(["STYLE","SCRIPT"]);function Xee(e,t){_ee(t);const r=Cu(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!cM.has(o.nodeName)){const a=fM(o,e,i,!1);if(a!==null)for(const s of a)n.push(s)}return(function(o){for(const a of o)a.getParent()&&a.getNextSibling()instanceof wS&&a.insertAfter(qo());for(const a of o){const s=a.getParent();s&&s.splice(a.getIndexWithinParent(),1,a.getChildren())}})(i),n}function Zee(e,t=null,r=yr()){return kee([X6(xee,!0)],r)(()=>{const n=Jr(),i=wee(r),o=te(t)?qg(t.anchor.getNode()):null,a=e.append.bind(e);for(const s of(V(o)?o:n).getChildren())dM(r,s,a,t,i);return e})}function ete(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&bd(338),JX(e),Zee(rr().createElement("div"),t,e).innerHTML}function dM(e,t,r,n=null,i=jg(e)){let o=i.$shouldInclude(t,n,e);const a=i.$shouldExclude(t,n,e);let s=t;n!==null&&ne(t)&&(s=z6(n,t,"clone"));const l=i.$exportDOM(s,e),{element:u,after:d,append:f,$getChildNodes:h}=l;if(!u)return!1;const p=rr().createDocumentFragment(),m=h?h():V(s)?s.getChildren():[],g=o&&Xt(n)&&V(t)?null:n,v=p.append.bind(p);for(const _ of m){const x=dM(e,_,v,g,i);!o&&x&&i.$extractWithChild(t,_,n,"html",e)&&(o=!0)}if(o&&!a){if((tt(u)||d1(u))&&(f?f(p):u.append(p)),r(u),d){const _=d.call(s,u);_&&(d1(u)?u.replaceChildren(_):u.replaceWith(_))}}else r(p);return o}function fM(e,t,r,n,i=new Map,o){const a=[];if(cM.has(e.nodeName))return a;let s=null;const l=(function(m,g){const{nodeName:v}=m,_=g._htmlConversions.get(v.toLowerCase());let x=null;if(_!==void 0)for(const w of _){const E=w(m);E!==null&&(x===null||(x.priority||0)<=(E.priority||0))&&(x=E)}return x!==null?x.conversion:null})(e,t),u=l?l(e):null;let d=null;if(u!==null){d=u.after;const m=u.node;if(s=Array.isArray(m)?m[m.length-1]:m,s!==null){for(const[,g]of i)if(s=g(s,o),!s)break;s&&a.push(...Array.isArray(m)?m:[s])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const f=e.childNodes;let h=[];const p=(s==null||!sr(s))&&(s!=null&&jc(s)||n);for(let m=0;m<f.length;m++)h.push(...fM(f[m],t,r,p,new Map(i),s));if(d!=null&&(h=d(h)),Wc(e)&&(h=tte(e,h,p?()=>{const m=new wS;return r.push(m),m}:jt)),s==null)if(h.length>0)for(const m of h)a.push(m);else Wc(e)&&(function(m){return m.nextSibling==null||m.previousSibling==null?!1:Am(m.nextSibling)&&Am(m.previousSibling)})(e)&&a.push(qo());else V(s)&&s.append(...h);return a}function tte(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let a=0;a<t.length;a++){const s=t[a];if(jc(s))n&&!s.getFormat()&&s.setFormat(n),i.push(s);else if(o.push(s),a===t.length-1||a<t.length-1&&jc(t[a+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function Ls(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function rte(e){let t=1,r=e.getParent();for(;r!=null;){if(At(r)){const n=r.getParent();if(at(n)){t++,r=n.getParent();continue}Ls(40)}return t}return t}function b1(e){const t=e.getParent();at(t)||Ls(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),at(n)&&(r=n);return r}function hM(e){let t=[];const r=e.getChildren().filter(At);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();at(o)?t=t.concat(hM(o)):t.push(i)}return t}function to(e){return At(e)&&at(e.getFirstChild())}function pM(e,t){return At(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function iA(e){const t=he();if(t!==null){let r=t.getNodes();if(te(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),a=o.getParent();if(sr(o)){const s=o.getFirstChild();if(s)r=s.selectStart().getNodes();else{const l=jt();o.append(l),r=l.select().getNodes()}}else if(pM(o,r)){const s=Lo(e);if(sr(a)){o.replace(s);const l=ka();V(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),s.append(l)}else if(At(o)){const l=o.getParentOrThrow();gu(s,l.getChildren()),l.replace(s)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(V(o)&&o.isEmpty()&&!At(o)&&!n.has(o.getKey())){oA(o,e);continue}let a=c6(o)?o.getParent():At(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(at(a)){if(!n.has(s)){const l=Lo(e);gu(l,a.getChildren()),a.replace(l),n.add(s)}break}{const l=a.getParent();if(sr(l)&&!n.has(s)){n.add(s),oA(a,e);break}a=l}}}}}function gu(e,t){e.splice(e.getChildrenSize(),0,t)}function oA(e,t){if(at(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=ka();let o;if(gu(i,e.getChildren()),at(r)&&t===r.getListType())r.append(i),at(n)&&t===n.getListType()&&(gu(r,n.getChildren()),n.remove()),o=r;else if(at(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const s=Lo(t);s.append(i),e.replace(s),o=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const a=he();return te(a)&&(o.getKey()===a.anchor.key&&a.anchor.set(i.getKey(),a.anchor.offset,"element"),o.getKey()===a.focus.key&&a.focus.set(i.getKey(),a.focus.offset,"element")),e.remove(),o}function XS(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&to(r)&&to(n)&&(XS(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function nte(){const e=he();if(te(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(pM(n,r))t.add(b1(n));else for(let i=0;i<r.length;i++){const o=r[i];if(c6(o)){const a=QZ(o,Nu);a!=null&&t.add(b1(a))}}for(const i of t){let o=i;const a=hM(i);for(const s of a){const l=jt().setTextStyle(e.style).setTextFormat(e.format);gu(l,s.getChildren()),o.insertAfter(l),o=l,s.__key===e.anchor.key&&mu(e.anchor,Fi(mo(l,"next"))),s.__key===e.focus.key&&mu(e.focus,Fi(mo(l,"next"))),s.remove()}i.remove()}}}function mM(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())At(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),at(n.getFirstChild())||r++)}function ite(e){const t=new Set;if(to(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(to(n)&&to(i)){const o=i.getFirstChild();if(at(o)){o.append(e);const a=n.getFirstChild();at(a)&&(gu(o,a.getChildren()),n.remove(),t.add(n.getKey()))}}else if(to(n)){const o=n.getFirstChild();if(at(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(e)}}else if(to(i)){const o=i.getFirstChild();at(o)&&o.append(e)}else if(at(r)){const o=Un(e),a=Un(r);o.append(a),a.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function aA(e){if(to(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(at(r?r.getParent():void 0)&&At(r)&&at(t)){const n=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(n))r.insertBefore(e),t.isEmpty()&&r.remove();else if(e.is(i))r.insertAfter(e),t.isEmpty()&&r.remove();else{const o=Un(e),a=Un(t);o.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const s=Un(e),l=Un(t);s.append(l),gu(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(s),r.replace(e)}}}function ote(e=!1){const t=he();if(!te(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(At(r)&&r.getChildrenSize()===0)n=r;else if(ne(r)){const u=r.getParent();At(u)&&u.getChildren().every(d=>ne(d)&&d.getTextContent().trim()==="")&&(n=u)}if(n===null)return!1;const i=b1(n),o=n.getParent();at(o)||Ls(40);const a=o.getParent();let s;if(sr(a))s=jt(),i.insertAfter(s);else{if(!At(a))return!1;s=Un(a),a.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=n.getNextSiblings();if(l.length>0){const u=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,n):1,d=Un(o).setStart(u);if(At(s)){const f=Un(s);f.append(d),s.insertAfter(f)}else s.insertAfter(d);d.append(...l)}return(function(u){let d=u;for(;d.getNextSibling()==null&&d.getPreviousSibling()==null;){const f=d.getParent();if(f==null||!At(f)&&!at(f))break;d=f}d.remove()})(n),!0}let Nu=class extends mi{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(at(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();at(n)||Ls(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:a}of It(t,o)){if(!At(a))break;i.push(a)}}t.insertBefore(n),n.splice(0,0,i),sr(r)||(O6(n,$u(It(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:mi,importDOM:{li:()=>({conversion:ate,priority:0})}})}constructor(t=1,r=void 0,n){super(n),this.__value=t===void 0?1:t,this.__checked=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const r=rr().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(a,s){const l=s.getParent();!at(l)||l.getListType()!=="check"||at(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(a,s,l){const u=s.list;if(!u)return;const d=u.listitem,f=u.nested&&u.nested.listitem,h=l.getParent(),p=at(h)&&h.getListType()==="check",m=l.getChecked(),g=l.getChildren().some(x=>at(x)),v=[];u.listitemChecked!==void 0&&v.push(u.listitemChecked),u.listitemUnchecked!==void 0&&v.push(u.listitemUnchecked),f!==void 0&&v.push(...Za(f)),v.length>0&&VS(a,...v);const _=[];if(d!==void 0&&_.push(...Za(d)),p){const x=m?u.listitemChecked:u.listitemUnchecked;x!==void 0&&_.push(x)}f!==void 0&&g&&_.push(...Za(f)),_.length>0&&wa(a,..._)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&Cc(r.style,o,i),(function(a,s,l){const u=s.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===u)return;const f=_m(u);for(const h in f)a.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in _m(d))h in f||a.style.removeProperty(`--listitem-marker-${h}`)})(r,this,t)}updateDOM(t,r,n){const i=r;return this.updateListItemDOM(t,i,n),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const r=this.createDOM(t._config),n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();return i&&(r.dir=i),to(this)?{after(o){if(tt(o)){const a=o.previousElementSibling;if(tt(a)&&a.nodeName==="LI"){for(;o.firstChild;)a.append(o.firstChild);o.remove()}}return o},element:r}:{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let r=0;r<t.length;r++){const n=t[r];if(V(n)&&this.canMergeWith(n)){const i=n.getChildren();this.append(...i),n.remove()}else super.append(n)}return this}replace(t,r){if(At(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!at(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const a=Un(n);let s=this.getNextSibling();for(;s;){const l=s;s=s.getNextSibling(),a.append(l)}n.insertAfter(t),t.insertAfter(a)}const i=this.__key;let o=0;if(r&&(V(t)||Ls(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&V(t)){const a=he();if(te(a))for(const s of a.getStartEndPoints())s.key===i&&s.type==="element"&&s.set(t.getKey(),o+s.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(at(n)||Ls(39),At(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=Un(n);i.forEach(a=>o.append(a)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&to(r)&&to(n)&&(XS(r.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,r=!0){const n=Un(this);return this.insertAfter(n,r),n}collapseAtStart(t){if(to(this))return!1;const r=this.getParentOrThrow();if(At(r.getParentOrThrow()))return aA(this),!0;const n=jt().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=Un(r);o.append(...i),r.insertAfter(o)}return r.insertAfter(n),this.remove(),r.getChildrenSize()===0&&r.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(t){const r=this.getWritable();return r.__value=t,r}getChecked(){const t=this.getLatest();let r;const n=this.getParent();return at(n)&&(r=n.getListType()),r==="check"?!!t.__checked:void 0}setChecked(t){const r=this.getWritable();return r.__checked=t,r}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let r=t.getParentOrThrow(),n=0;for(;At(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&Ls(117),(t=Math.floor(t))>=0||Ls(199);let r=this.getIndent();for(;r!==t;)r<t?(ite(this),r++):(aA(this),r--);return this}canInsertAfter(t){return At(t)}canReplaceWith(t){return At(t)}canMergeWith(t){return At(t)||gd(t)}extractWithChild(t,r){if(!te(r))return!1;const n=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(n)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Lo("bullet")}canMergeWhenEmpty(){return!0}};function ate(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return sA(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return sA(n.children[0])}const t=e.getAttribute("aria-checked"),r=ka(t==="true"||t!=="false"&&void 0);return Ta(r,e),{after:gM.bind(null,r),node:bo(r,e)}}function sA(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=ka(e.hasAttribute("checked"));return{after:gM.bind(null,t),node:t}}function gM(e,t){const r=t[0];return t.length===1&&gd(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function ka(e){return Qo(new Nu(void 0,e))}function At(e){return e instanceof Nu}let Qh=class extends mi{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();at(n)&&r.getListType()===n.getListType()&&XS(r,n)})(t),mM(t)},extends:mi,importDOM:{ol:()=>({conversion:uA,priority:0}),ul:()=>({conversion:uA,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=ste[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const r=this.getWritable();return r.__listType=t,r.__tag=t==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const r=this.getWritable();return r.__start=t,r}createDOM(t,r){const n=this.__tag,i=rr().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,lA(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(lA(r,n.theme,this),t.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const r=this.createDOM(t._config,t);return tt(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,r,n){let i=n;for(let o=0;o<n.length;o++){const a=n[o];At(a)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!V(a)||at(a)||a.isInline()?a:Rr(a.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return At(t)}createListItemNode(){return ka()}};function lA(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const a=o[`${r.__tag}Depth`]||[],s=rte(r)-1,l=s%a.length,u=a[l],d=o[r.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&n.push(d),p!==void 0&&r.__listType==="check"&&n.push(p),u!==void 0){n.push(...Za(u));for(let m=0;m<a.length;m++)m!==l&&i.push(r.__tag+m)}if(f!==void 0){const m=Za(f);s>1?n.push(...m):i.push(...m)}}i.length>0&&VS(e,...i),n.length>0&&wa(e,...n)}function uA(e){let t;if((function(r){return tt(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=Lo("number",r)}else t=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const n of r.childNodes)if(tt(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?Lo("check"):Lo("bullet");return bo(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),a=[];for(let s=0;s<n.length;s++){const l=n[s];if(At(l)){a.push(l);const u=l.getChildren();u.length>1&&u.forEach(d=>{at(d)&&a.push(o().append(d))})}else a.push(o().append(l))}return a})(r,t),node:t}}const ste={ol:"number",ul:"bullet"};function Lo(e="number",t=1){return Qo(new Qh(e,t))}function at(e){return e instanceof Qh}function lte(e){const t=[];for(const r of e)if(At(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)at(i)&&t.push(ka().append(i))}else t.push(ka().append(r));return t}const ute={$import:(e,t)=>{let r;var n;return iM(t,"ol")?r=Lo("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?Lo("check"):Lo("bullet"),bo(r,t),[r.splice(0,0,sM(lte(e.$importChildren(t)),t))]},match:xn.tag("ol","ul"),name:"@lexical/list/list"};function vM(e,t){if(t.length!==1)return t;const r=t[0];return gd(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function _M(e){const t=a=>QS(a)&&!at(a);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const a of e)t(a)?(i(),r.push(V(a)?a.getChildren():[a])):n.push(a);i();const o=[];for(const a of r)o.length>0&&o.push(qo()),o.push(...a);return o}const cte={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=ka(r==="true"||r!=="false"&&void 0);return Ta(n,t),bo(n,t),[n.splice(0,0,_M(vM(n,e.$importChildren(t))))]},match:xn.tag("li"),name:"@lexical/list/li"};function cA(e,t,r){const n=iM(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=ka(n.hasAttribute("checked"));return Ta(i,t),bo(i,t),[i.splice(0,0,_M(vM(i,e.$importChildren(t))))]}xn.tag("li").classAll("task-list-item"),xn.tag("li").classAll("joplin-checkbox");const dte=je("UPDATE_LIST_START_COMMAND"),bM=je("INSERT_UNORDERED_LIST_COMMAND"),yM=je("INSERT_ORDERED_LIST_COMMAND"),fte=je("REMOVE_LIST_COMMAND");function hte(e,t){return cl(e.registerCommand(yM,()=>(iA("number"),!0),ic),e.registerCommand(dte,r=>{const{listNodeKey:n,newStart:i}=r,o=tr(n);return!!at(o)&&(o.getListType()==="number"&&(o.setStart(i),mM(o)),!0)},ic),e.registerCommand(bM,()=>(iA("bullet"),!0),ic),e.registerCommand(fte,()=>(nte(),!0),ic),e.registerCommand(ih,()=>ote(!1),ic),e.registerCommand(vS,r=>{if((function(){const a=he();if(!te(a)||!a.isCollapsed()||a.anchor.offset!==0)return!1;const s=a.anchor.getNode(),l=Qt(s,At);if(!At(l))return!1;const u=l.getFirstDescendant();if(u===null||!l.is(s)&&!u.is(s))return!1;const d=l.getParent();if(!at(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!ct(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=jt().append(...l.getChildren());return d.insertBefore(h),l.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return r.preventDefault(),!0;const n=he();if(!te(n)||!n.isCollapsed())return!1;const{anchor:i}=n;if(i.offset!==0)return!1;let o=i.getNode();for(;!At(o);){if(o.getPreviousSibling()!==null)return!1;const a=o.getParent();if(a===null)return!1;o=a}return!(!At(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},iZ),e.registerNodeTransform(Nu,r=>{const n=r.getFirstChild();if(n){if(ne(n)){const i=n.getStyle(),o=n.getFormat();r.getTextStyle()!==i&&r.setTextStyle(i),r.getTextFormat()!==o&&r.setTextFormat(o)}}else{const i=he();te(i)&&(i.style!==r.getTextStyle()||i.format!==r.getTextFormat())&&i.isCollapsed()&&r.is(i.anchor.getNode())&&r.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(vs,r=>{const n=r.getParent();if(At(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function pte(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,a=e._selection;if(i)return 1;if(!(te(o)&&te(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(_,x,w){const E=_._nodeMap,C=[];for(const k of x){const A=E.get(k);A!==void 0&&C.push(A)}for(const[k,A]of w){if(!A)continue;const $=E.get(k);$===void 0||Ar($)||C.push($)}return C})(t,r,n);if(s.length===0)return 0;if(s.length>1){const _=t._nodeMap,x=_.get(o.anchor.key),w=_.get(a.anchor.key);return x&&w&&!e._nodeMap.has(x.__key)&&ne(x)&&x.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],u=e._nodeMap.get(l.__key);if(!ne(u)||!ne(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const m=h.offset,g=p.offset,v=f.length-d.length;return v===1&&g===m-1?2:v===-1&&g===m+1?3:v===-1&&g===m?4:0}function mte(e,t,r){let n=r(),i=0,o=n,a=0,s=null;return(l,u,d,f,h,p)=>{const m=r();if(p.has(zO)&&(o=n,a=i,s=l),p.has(vm))return i=0,n=m,2;p.has(uh)&&s&&(n=o,i=a,l=s);const g=p.has(OO)||p.has(MO)?0:pte(l,u,f,h,e.isComposing()),v=(()=>{const _=d===null||d.editor===e,x=p.has(PO);if(!x&&_&&p.has(wf))return 0;if(g===1)return 2;if(l===null)return 1;const w=u._selection;return f.size>0||h.size>0?x===!1&&g!==0&&g===i&&m<n+t&&_||f.size===1&&(function(C,k,A){const $=k._nodeMap.get(C),N=A._nodeMap.get(C),M=k._selection,P=A._selection;return!(te(M)&&te(P)&&M.anchor.type==="element"&&M.focus.type==="element"&&P.anchor.type==="text"&&P.focus.type==="text"||!ne($)||!ne(N)||$.__parent!==N.__parent)&&JSON.stringify(k.read(()=>$.exportJSON()))===JSON.stringify(A.read(()=>N.exportJSON()))})(Array.from(f)[0],l,u)?0:1:w!==null?0:2})();return n=m,i=g,v}}function dA(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function gte(e,t,r,n=Date.now,i,o=null){const a=mte(e,r,n);return cl(e.registerCommand(Pg,()=>((function(s,l,u){const d=l.redoStack,f=l.undoStack;if(f.length!==0){const h=l.current,p=f.pop();h!==null&&(d.push(h),s.dispatchCommand($p,!0)),f.length===0&&s.dispatchCommand(Tp,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:vm})}})(e,t),!0),lt),e.registerCommand(Og,()=>((function(s,l,u){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),s.dispatchCommand(Tp,!0));const p=d.pop();d.length===0&&s.dispatchCommand($p,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:vm})}})(e,t),!0),lt),e.registerCommand(yX,()=>(dA(t),!1),lt),e.registerCommand(xX,()=>(dA(t),e.dispatchCommand($p,!1),e.dispatchCommand(Tp,!1),!0),lt),e.registerUpdateListener(({editorState:s,prevEditorState:l,dirtyLeaves:u,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,m=t.undoStack,g=h===null?null:h.editorState;if(h!==null&&s===g)return;const v=a(l,s,h,u,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand($p,!1)),h!==null){m.push({...h});const _=typeof o=="number"||o===null?o:o.peek();_!==null&&m.length>_&&m.splice(0,m.length-_),e.dispatchCommand(Tp,!0)}}else if(v===2)return;t.current={editor:e,editorState:s}}))}function vte(){return{current:null,redoStack:[],undoStack:[]}}function _te(e,t){let r=e;for(let n=It(e,t);n&&(EM(n.origin)||su(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function bte(e){return _te(e,"previous")}function xM(e,t){for(const r of e.childNodes)if(tt(r)&&r.tagName===t||xM(r,t))return!0;return!1}const cf="data-language",Wd="data-highlight-language",Lp="data-theme";class yd extends mi{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new yd(t.__language,t.__key)}constructor(t,r){super(r),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const r=rr().createElement("code");wa(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(cf,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Wd,n));const i=this.getTheme();i&&r.setAttribute(Lp,i);const o=this.getStyle();return o&&Cc(r.style,o),r}updateDOM(t,r,n){const i=this.__language,o=t.__language;i?i!==o&&r.setAttribute(cf,i):o&&r.removeAttribute(cf);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&r.setAttribute(Wd,i):r.removeAttribute(Wd):a&&i&&r.setAttribute(Wd,i);const s=this.__theme,l=t.__theme;s?s!==l&&r.setAttribute(Lp,s):l&&r.removeAttribute(Lp);const u=this.__style,d=t.__style;return u!==d&&Cc(r.style,u,d),!1}exportDOM(t){const r=rr().createElement("pre");wa(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(cf,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Wd,n));const i=this.getTheme();i&&r.setAttribute(Lp,i);const o=this.getStyle();return o&&Cc(r.style,o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||xM(t,"BR"))?{conversion:fA,priority:1}:null,div:()=>({conversion:yte,priority:1}),pre:()=>({conversion:fA,priority:0}),table:t=>I_(t)?{conversion:xte,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&I_(n)?{conversion:hA,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&I_(r)?{conversion:hA,priority:3}:null}}}static importJSON(t){return Wn().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,r=!0){if(!Jh(yr(),"@lexical/code")){const a=Ste(t);if(a)return a}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(ne(o)){let a=bte(o);const s=[];for(;;)if(su(a))s.push(dd()),a=a.getNextSibling();else{if(!EM(a))break;{let m=0;const g=a.getTextContent(),v=a.getTextContentSize();for(;m<v&&g[m]===" ";)m++;if(m!==0&&s.push(SM(" ".repeat(m))),m!==v)break;a=a.getNextSibling()}}const l=o.splitText(n.offset)[0],u=n.offset===0?0:1,d=l.getIndexWithinParent()+u,f=o.getParentOrThrow(),h=[qo(),...s];f.splice(d,0,h);const p=s[s.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(gh(o)){const{offset:a}=t.anchor;o.splice(a,0,[qo()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=jt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}setLanguage(t){const r=this.getWritable();return r.__language=t||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const r=this.getWritable();return r.__isSyntaxHighlightSupported=t,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const r=this.getWritable();return r.__theme=t||void 0,r}getTheme(){return this.getLatest().__theme}}function Wn(e,t){return R6(yd).setLanguage(e).setTheme(t)}function gh(e){return e instanceof yd}function fA(e){return{node:Wn(e.getAttribute(cf))}}function yte(e){const t=e,r=pA(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(pA(i))return!0;i=i.parentElement}return!1})(t)?{node:r?Wn():null}:{node:null}}function xte(){return{node:Wn()}}function hA(){return{node:null}}function pA(e){return e.style.fontFamily.match("monospace")!==null}function I_(e){return e.classList.contains("js-file-line-container")}function Ste(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const r=t.getNode();if(gh(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(Yn(i)&&Yn(i.getPreviousSibling())){const o=jt();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class Jg extends vs{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new Jg(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const r=this.getWritable();return r.__highlightType=t||void 0,r}canHaveFormat(){return!1}createDOM(t){const r=super.createDOM(t),n=P_(t.theme,this.__highlightType);return wa(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=P_(n.theme,t.__highlightType),a=P_(n.theme,this.__highlightType);return o!==a&&(o&&VS(r,o),a&&wa(r,a)),i}static importJSON(t){return SM().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return Wn()}}function P_(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function SM(e="",t){return Qo(new Jg(e,t))}function EM(e){return e instanceof Jg}const wM="data-language";function kM(e){return e.style.fontFamily.match("monospace")!==null}function y1(e){let t=e.parentElement;for(;t!==null;){if(kM(t))return!0;t=t.parentElement}return!1}const Ete=uM([{$import:(e,t)=>e.$importChildren(t),match:xn.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),wte={$import:(e,t)=>[Wn(t.getAttribute(wM)).splice(0,0,e.$importChildren(t))],match:xn.tag("pre"),name:"@lexical/code/pre"},kte={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[Wn(t.getAttribute(wM)).splice(0,0,e.$importChildren(t))]:r()},match:xn.tag("code"),name:"@lexical/code/code-multiline"};function zp(e){if(!tt(e))return!1;const t=e.style.fontFamily,r=e.style.whiteSpace;return typeof t=="string"&&/monospace/i.test(t)&&typeof r=="string"&&r.startsWith("pre")}function Cte(e){let t=!1;const r=[];let n="",i=!1;const o=()=>{i&&(r.push(n),n="",i=!1)};for(const a of Array.from(e.childNodes))if(tt(a))a.tagName==="DIV"?(o(),r.push(a.textContent||""),t=!0):a.tagName==="BR"?(o(),r.push(""),t=!0):(n+=a.textContent||"",i=!0);else if(bi(a)){const s=a.textContent||"";s.length>0&&(n+=s,i=!0)}return o(),t?r:null}xn.tag("div"),xn.tag("div","br");const Rte={$import:(e,t,r)=>kM(t)?[Wn().splice(0,0,e.$importChildren(t))]:y1(t)?e.$importChildren(t):r(),match:xn.tag("div"),name:"@lexical/code/div"};xn.tag("table").classAll("js-file-line-container"),xn.tag("td").classAll("js-file-line");const mA=new Set(["http:","https:","mailto:","sms:","tel:"]);let Yh=class CM extends mi{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new CM(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",r={},n){super(n);const{target:i=null,rel:o=null,title:a=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=a}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const r=rr().createElement("a");return this.updateLinkDOM(null,r,t),wa(r,t.theme.link),r}updateLinkDOM(t,r,n){if(w6(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];t&&t[o]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:Ate,priority:1})}}static importJSON(t){return Gc().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){const r=t;t=_A(t);try{const n=new URL(_A(t));if(!mA.has(n.protocol))return"about:blank"}catch{const i=r.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!mA.has(`${i[1].toLowerCase()}:`))return"about:blank"}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const r=this.getWritable();return r.__url=t,r}getTarget(){return this.getLatest().__target}setTarget(t){const r=this.getWritable();return r.__target=t,r}getRel(){return this.getLatest().__rel}setRel(t){const r=this.getWritable();return r.__rel=t,r}getTitle(){return this.getLatest().__title}setTitle(t){const r=this.getWritable();return r.__title=t,r}insertNewAfter(t,r=!0){const n=Un(this);return this.insertAfter(n,r),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,n){if(!te(r))return!1;const i=r.anchor.getNode(),o=r.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(t){return this.getType()===t.getType()&&this.__url===t.__url&&this.__target===t.__target&&this.__rel===t.__rel&&this.__title===t.__title}};function Ate(e){let t=null;if(w6(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=Gc(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Gc(e="",t){return Qo(new Yh(e,t))}function sa(e){return e instanceof Yh}let RM=class AM extends Yh{__isUnlinked;constructor(t="",r={},n){super(t,r,n),this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}afterCloneFrom(t){super.afterCloneFrom(t),this.__isUnlinked=t.__isUnlinked}static getType(){return"autolink"}static clone(t){return new AM(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(t){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const r=this.getWritable();return r.__isUnlinked=t,r}createDOM(t){return this.__isUnlinked?rr().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return gA().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,r=!0){const n=gA(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function gA(e="",t){return Qo(new RM(e,t))}function ac(e){return e instanceof RM}function vA(e,t){if(e.type==="element"){const r=e.getNode();return V(r)||(function(n,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",n);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${n}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),r.getChildren()[e.offset+t]||null}return null}function $te(e,t={}){let r;if(e&&typeof e=="object"){const{url:d,...f}=e;r=d,t={...f,...t}}else r=e;const{target:n,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,a=he();if(a===null||!te(a)&&!Xt(a))return;if(Xt(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=Qt(f,p=>!ac(p)&&sa(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=Qt(f,p=>!ac(p)&&sa(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=Gc(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(a.isCollapsed()&&r===null)for(const d of a.getNodes()){const f=Qt(d,h=>!ac(h)&&sa(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const s=a.extract();if(r===null){const d=new Set;return void s.forEach(f=>{const h=Qt(f,p=>!ac(p)&&sa(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(m,g){const v=new Set(g.filter($=>m.isParentOf($)).map($=>$.getKey())),_=m.getChildren(),x=$=>v.has($.getKey())||V($)&&g.some(N=>m.isParentOf(N)&&$.isParentOf(N)),w=_.filter(x);if(w.length===_.length)return _.forEach($=>m.insertBefore($)),void m.remove();const E=_.findIndex(x),C=_.findLastIndex(x),k=E===0,A=C===_.length-1;if(k)w.forEach($=>m.insertBefore($));else if(A)for(let $=w.length-1;$>=0;$--)m.insertAfter(w[$]);else{for(let N=w.length-1;N>=0;N--)m.insertAfter(w[N]);const $=_.slice(C+1);if($.length>0){const N=Un(m);w[w.length-1].insertAfter(N),$.forEach(M=>N.append(M))}}})(h,s),d.add(p)}})}const l=new Set,u=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(r),n!==void 0&&d.setTarget(n),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=Qt(d,sa);if(f!==null)return u(f)}(function(d){const f=he();if(!te(f))return d();const h=Vs(f),p=h.isBackward(),m=vA(h.anchor,p?-1:0),g=vA(h.focus,p?0:-1);if(d(),m||g){const v=he();if(te(v)){const _=v.clone();if(m){const x=m.getParent();x&&_.anchor.set(x.getKey(),m.getIndexWithinParent()+(p?1:0),"element")}if(g){const x=g.getParent();x&&_.focus.set(x.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}bn(Vs(_))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=Qt(f,sa);if(h){u(h);continue}if(V(f)){if(!f.isInline())continue;if(sa(f)){if(!(ac(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const m of f.getChildren())f.insertBefore(m);f.remove();continue}}const p=f.getPreviousSibling();sa(p)&&p.is(d)?p.append(f):(d=Gc(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const Tte=/^\+?[0-9\s()-]{5,}$/;function _A(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:Tte.test(e)?`tel:${e}`:`https://${e}`}xn.tag("a");function Fm(e,t,r=null){const n=S6(r),i=r?y6(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&(function(s,l){for(let u=s;u!==null;){if(u===l)return!0;u=Ru(u)}return!1})(a.offsetNode,r))return{node:a.offsetNode,offset:a.offset}}if(o){const a=r.getRootNode();if(ls(a)){const s=a.elementFromPoint(e,t);if(s!==null&&r.contains(s)){const l=(function(u,d,f,h){const p=h.createRange(),m=A=>d<A.top?A.top-d:d>A.bottom?d-A.bottom:0,g=A=>u<A.left?A.left-u:u>A.right?u-A.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let _=null,x=1/0,w=1/0;for(let A=v.nextNode();A;A=v.nextNode()){p.selectNodeContents(A);for(const $ of p.getClientRects()){const N=m($),M=g($);(N<x||N===x&&M<w)&&(x=N,w=M,_=A)}}if(_===null)return null;let E=0,C=1/0,k=1/0;for(let A=0;A<=_.length;A++){p.setStart(_,A),p.collapse(!0);const $=p.getBoundingClientRect(),N=m($),M=Math.abs(u-$.left);(N<C||N===C&&M<k)&&(C=N,k=M,E=A)}return{node:_,offset:E}})(e,t,s,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const a=n.caretRangeFromPoint(e,t);return a===null?null:{node:a.startContainer,offset:a.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t);return a===null?null:{node:a.offsetNode,offset:a.offset}}return null}function pc(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const x1={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Nte(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const bA=(e,t)=>{if(!te(t))return t.insertRawText(e),!0;const r=n=>{const i=he();te(i)&&n(i)};return ZO(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([dd()])),text:n=>r(i=>i.insertText(n))}),!0},S1={"application/x-lexical-editor":[(e,t,r)=>{try{const n=yr(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return yA(n,zte(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=yr(),i=new DOMParser().parseFromString(Nte(e),"text/html");return yA(n,Xee(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[bA],"text/uri-list":[bA]};function Dte(e,t,r,n){if(!e)return!1;const i=o=>!!e[o]&&e[o](t,r,i.bind(null,o-1),n);return i(e.length-1)}function $M(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(a=>o.$importMimeType[a]!==void 0).sort((a,s)=>{const l=o.priority[a],u=o.priority[s];return l===void 0&&u===void 0?a<s?-1:a>s?1:0:l===void 0?1:u===void 0?-1:l-u})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==n)&&Dte(e.$importMimeType[i],o,r,t))return!0}return!1}const Fte={$importMimeType:S1,$insertDataTransfer:(e,t)=>$M({$importMimeType:S1,priority:x1},e,t),priority:x1},Ite={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>$M(t,r,n),priority:t.priority}),config:{$importMimeType:S1,priority:x1},mergeConfig(e,t){const r=qS(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function TM(e,t=he()){return t==null&&pc(166),te(t)&&t.isCollapsed()||t.getNodes().length===0?"":ete(e,t)}function NM(e,t=he()){return t==null&&pc(166),te(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Lte(e,t))}function E1(e,t,r){(function(){const n=dee(Ite.name);return n?n.output:Fte})().$insertDataTransfer(e,t)}const DM="application/x-lexical-drag";function Pte(e,t){const r={editorKey:t.getKey()};e.setData(DM,JSON.stringify(r))}function Ote(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(u){const d=u.getData(DM);if(!d)return null;let f;try{f=JSON.parse(d)}catch{return null}return(h=f)!==null&&typeof h=="object"&&"editorKey"in h&&typeof h.editorKey=="string"?f:null;var h})(n);if(i===null)return!1;const o=(function(u,d){const f=Fm(u.clientX,u.clientY,d.getRootElement());if(f===null)return null;const h=uu(f.node);if(h===null)return null;if(ne(h))return ul(h,"next",f.offset);if(V(h))return m1(h,f.offset,"next");const p=h.getParent();return p===null?null:m1(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const a=P6(o);if(a===null)return!1;const s=i.editorKey===t.getKey(),l=he();if(s){if(!te(l)||l.isCollapsed())return!1;if((function(u,d){const{anchor:f,focus:h}=jS(p1(d),"next");return hh(f,u)<0&&hh(u,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!a.origin.isAttached())return e.preventDefault(),!0;if(r(n,ph(Hg(a)),t),!s){const u=t.getRootElement(),d=u?u.ownerDocument:null,f=d?(function(h,p){for(const m of x6(p)){const g=Gh(m);if(Ug(g)&&g.getKey()===h&&tt(m))return m}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function Mte(e,t){return Ote(e,t,E1)}function yA(e,t,r){e.dispatchCommand(pX,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(te(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const a=di(i,"previous");if(a)if(uo(a))o=a.origin;else{const s=Mo(a,mo(Jr(),"next").getFlipped());for(const l of s){if(ne(l.origin)){o=l.origin;break}if(V(l.origin)&&!l.origin.isInline())break}}if(o&&ne(o)){const s=o.getFormat(),l=o.getStyle();n.format===s&&n.style===l||(n.format=s,n.style=l,n.dirty=!0)}}})(r))}function w1(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=V(r)&&r.excludeFromCopy("html");let a=r;t!==null&&ne(a)&&(a=z6(t,a,"clone"));const s=V(a)?a.getChildren():[],l=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&pc(58,h.name),V(d)){const p=f.children;Array.isArray(p)||pc(59,h.name)}return f})(a);ne(a)&&a.getTextContentSize()===0&&(i=!1);const u=i&&Xt(t)&&V(r)?null:t;for(let d=0;d<s.length;d++){const f=s[d],h=w1(e,u,f,l.children);!i&&V(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=lo(a);if(d.length>0){const f={};for(const h of d){const p=fu(a,h);p===null&&pc(366,a.constructor.name,h);const m=[];w1(e,null,p,m),m.length===1&&m[0].type===p.getType()||pc(385,h,a.constructor.name,String(m.length),String(m.length>0?m[0].type:"none")),f[h]=m[0]}l.$slots=f}}if(i&&!o)n.push(l);else if(Array.isArray(l.children))for(let d=0;d<l.children.length;d++){const f=l.children[d];n.push(f)}return i}function Lte(e,t){const r=[],n=Jr(),i=te(t)?t.anchor.getNode():Xt(t)?t.getNodes()[0]??null:null,o=i!==null?qg(i):null,a=(V(o)?o:n).getChildren();for(let s=0;s<a.length;s++)w1(e,t,a[s],r);return{namespace:e._config.namespace,nodes:r}}function zte(e){const t=[];for(const r of e)t.push(YX(r));return t}let Gu=null;async function xA(e,t,r){if(Gu!==null)return!1;if(t!==null)return new Promise((u,d)=>{e.update(()=>{u(SA(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,a=Zn(i);if(n===null||a===null)return!1;const s=o.createElement("span");s.style.position="fixed",s.style.top="-1000px",s.append(o.createTextNode("#")),n.append(s);const l=o.createRange();return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((u,d)=>{const f=e.registerCommand(Mg,h=>(Hs(h,ClipboardEvent)&&(f(),Gu!==null&&(i.clearTimeout(Gu),Gu=null),u(SA(e,h,r))),!0),nZ);Gu=i.setTimeout(()=>{f(),Gu=null,u(!1)},50),o.execCommand("copy"),s.remove()})}function SA(e,t,r){if(r===void 0){const i=Zn(e._window),o=he();if(!o||o.isCollapsed()||!i)return!1;const a=ho(i,e.getRootElement()),s=a.anchorNode,l=a.focusNode;if(s!==null&&l!==null&&!Wh(e,s,l))return!1;r=FM(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(IM(n,r),!0)}const Ute=[["text/html",TM],["application/x-lexical-editor",NM]];function FM(e=he()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const a=jte(o,r);a!==null&&(n[i]=a)}return n})(Bte(),e)}function IM(e,t){for(const[r]of Ute)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function Bte(e=yr()){const t=Jh(e,qte.name);return t?t.output:PM}const PM={"application/x-lexical-editor":[(e,t)=>e?NM(yr(),e):t()],"text/html":[(e,t)=>e?TM(yr(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function jte(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const qte={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:PM},mergeConfig(e,t){const r=qS(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},Vte={$import:(e,t)=>{const r=es(t.nodeName.toLowerCase());return Au(t,r),Ta(r,t),bo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:xn.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},Kte={$import:(e,t)=>{const r=Sd();return Ta(r,t),Au(t,r),bo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:xn.tag("blockquote"),name:"@lexical/rich-text/blockquote"};xn.tag("blockquote");xn.tag("p"),xn.tag("span");const EA=je("DRAG_DROP_PASTE_FILE"),O_=Vh("shadowRoot",{parse:Boolean});class xd extends mi{static getType(){return"quote"}static clone(t){return new xd(t.__key)}$config(){return this.config("quote",{extends:mi,stateConfigs:[{flat:!0,stateConfig:O_}]})}isShadowRoot(){return Kh(this,O_)}setIsShadowRoot(t){return Sc(this,O_,t)}createDOM(t){const r=rr().createElement("blockquote");return wa(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:Hte,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){this.isEmpty()&&r.append(rr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return Sd().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=jt(),i=this.getDirection();return n.setDirection(i),this.insertAfter(n,r),n}collapseAtStart(){if(this.isShadowRoot()){for(const r of this.getChildren())this.insertBefore(r);return this.remove(),!0}const t=jt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Sd(e){const t=Qo(new xd);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function k1(e){return e instanceof xd}let Qg=class OM extends mi{__tag;static getType(){return"heading"}static clone(t){return new OM(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}constructor(t="h1",r){super(r),this.__tag=t}getTag(){return this.getLatest().__tag}setTag(t){const r=this.getWritable();return r.__tag=t,r}createDOM(t){const r=this.__tag,n=rr().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];wa(n,o)}return n}updateDOM(t,r,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Ju,priority:0}),h2:t=>({conversion:Ju,priority:0}),h3:t=>({conversion:Ju,priority:0}),h4:t=>({conversion:Ju,priority:0}),h5:t=>({conversion:Ju,priority:0}),h6:t=>({conversion:Ju,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&wA(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>wA(t)?{conversion:r=>({node:es("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(tt(r)){this.isEmpty()&&r.append(rr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return es(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,r=!0){const n=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&n===i.getTextContentSize()||!t?jt():es(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const s=jt();s.select(),this.replace(s,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=jt();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function wA(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Ju(e){const t=e.nodeName.toLowerCase();let r=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(r=es(t),Au(e,r),Ta(r,e),bo(r,e)),{node:r}}function Hte(e){const t=Sd();return Ta(t,e),Au(e,t),bo(t,e),{node:t}}function es(e="h1"){return Qo(new Qg(e))}function Wte(e){return e instanceof Qg}function kA(e){const t=uu(e);return ct(t)}function Qu(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const s=e.anchor.getNode();if(ne(s)){o=s;const l=e.anchor.offset,u=l===s.getTextContentSize()&&s.getNextSibling()===null,d=l===0&&s.getPreviousSibling()===null;i=r==="end"&&u||r==="start"&&d||r==="both"&&(u||d)}}let a=!1;for(const[s,l]of Object.entries(n)){if(l==null||!l[t])continue;const u=s;if(l.onlyAtBoundary){if(!(i&&o&&ne(o)&&o.hasFormat(u)))continue;a=!0}e.hasFormat(u)&&e.toggleFormat(u)}a&&e.setStyle("")}const Gte={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Up(e,t){return(function(r,n){if(!r.isCollapsed())return!1;const i=di(r.focus,n),o=Qt(i.origin,$c);if(!o)return!1;const a=r.focus.getNode();if(!o.is(a)&&!Hc(a,o))return!1;const s=Mo(i,It(o,n));if(s.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=Mo(s.anchor.getSiblingCaret(),s.focus);let u=l.anchor.origin;for(const f of l){if(!ll(f)||!f.origin.is(u.getParent()))return!1;u=f.origin}let d=o;for(const f of Kg(It(o,n))){if(!f.origin.is(d.getParent())){if(U0(f.origin)){const h=It(d,n);return ph(Mo(h,h)),!0}break}if(!$c(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=di(r.anchor,n).getNodeAtCaret();return!(!$c(i)||i.isInline()||(ph(Hg(Fi(mo(i,n)))),0))})(e,t)}function CA(e){return ct(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function Bp(e){const t=bm();t.add(e),bn(t)}function RA(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=di(r,i);if(r.type==="element"&&V(n)&&(Ar(n)||$c(n))){const _=o.getNodeAtCaret();return!(_===null||!CA(_))&&(Bp(_.__key),!0)}const a=Qt(V(n)?n:n.getParentOrThrow(),_=>V(_)&&!_.isInline()&&sr(_.getParent()));if(a===null)return!1;const s=It(a,i).getNodeAtCaret();if(s===null||!CA(s))return!1;if(a.getTextContentSize()===0)return Bp(s.__key),!0;const l=yr().getRootElement();if(l===null)return!1;const u=Zn(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const d=u.anchorNode,f=u.anchorOffset,h=u.focusNode,p=u.focusOffset;u.modify("move",t?"backward":"forward","line");const m=u.anchorNode,g=u.anchorOffset;if(m===null)return AA(u,d,f,h,p),!1;const v=uu(m);return AA(u,d,f,h,p),v===null?!1:(m===d&&g===f||!v.is(a)&&!Hc(v,a))&&(Bp(s.__key),!0)}function AA(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function $A(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=Qt(V(r)?r:r.getParentOrThrow(),v=>V(v)&&!v.isInline());if(n===null)return!1;const i=yr(),o=i.getRootElement();if(o===null)return!1;const a=o.ownerDocument.defaultView;if(a===null)return!1;let s=!1;for(const v of n.getChildren())if(V(v)&&v.isInline()){const _=i.getElementByKey(v.getKey());if(_!==null){const x=a.getComputedStyle(_).display;if(x==="inline-grid"||x==="inline-flex"){s=!0;break}}}if(!s)return!1;const l=It(n,t?"previous":"next").getNodeAtCaret();if(l===null||!V(l)){if(t){const v=n.getFirstDescendant();ne(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(ne(v)){const _=v.getTextContentSize();v.select(_,_)}else{const _=n.getChildrenSize();n.select(_,_)}}return!0}const u=i.getElementByKey(l.getKey());if(u===null)return!1;const d=Zn(a);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=u.getBoundingClientRect(),m=p.top+p.height/2;if(h.height>0){const v=Fm(h.left,m,o);if(v!==null&&u.contains(v.node)){const _=o.ownerDocument.createRange();return _.setStart(v.node,v.offset),_.collapse(!0),e.applyDOMRange(_),e.dirty=!0,!0}}const g=t?l.getLastDescendant():l.getFirstDescendant();if(ne(g)){const v=t?g.getTextContentSize():0;g.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function jp(e,t){const r=It(e,t),n=r.getAdjacentCaret();n!==null&&V(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?ph(Hg(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function TA(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>It(l,"next")).sort(hh),o=(t?i[0]:i[i.length-1]).origin,a=Qt(o,l=>l!==o&&V(l)&&!l.isInline())??Jr(),s=t?0:a.getChildrenSize();return a.select(s,s),!0}function Jte(e,t=ZZ(Gte)){return cl(e.registerCommand(lO,()=>{const r=he();return Xt(r)?(r.clear(),!0):(te(r)&&Qu(r,"click","both",t.peek()),!1)},lt),e.registerCommand(Kl,r=>{const n=he();return te(n)?(n.deleteCharacter(r),!0):!!Xt(n)&&(n.deleteNodes(),!0)},lt),e.registerCommand(oh,r=>{const n=he();return!!te(n)&&(n.deleteWord(r),!0)},lt),e.registerCommand(ah,r=>{const n=he();return!!te(n)&&(n.deleteLine(r),!0)},lt),e.registerCommand(wc,r=>{const n=he();if(typeof r=="string")n!==null&&n.insertText(r);else{if(n===null)return!1;const i=r.dataTransfer;if(i!=null)E1(i,n);else if(te(n)){const o=r.data;return o&&n.insertText(o),!0}}return!0},lt),e.registerCommand(P0,()=>{const r=he();return!!te(r)&&(r.removeText(),!0)},lt),e.registerCommand(Io,r=>{const n=he();return!(!te(n)&&!Xt(n))&&(VO(n,r),!0)},lt),e.registerCommand(mX,r=>{const n=he();return!(!te(n)&&!Xt(n))&&(VX(n,r),!0)},lt),e.registerCommand(_X,r=>{const n=he();if(!te(n)&&!Xt(n))return!1;const i=n.getNodes();for(const o of i){const a=Qt(o,s=>V(s)&&!s.isInline());a!==null&&a.setFormat(r)}return!0},lt),e.registerCommand(Ec,r=>{const n=he();return!!te(n)&&(n.insertLineBreak(r),!0)},lt),e.registerCommand(ih,()=>{const r=he();return!!te(r)&&(r.insertParagraph(),!0)},lt),e.registerCommand(gX,()=>{const r=dd(),n=he();return te(n)&&(r.setFormat(n.format),r.setStyle(n.style)),WX([r]),!0},lt),e.registerCommand(vX,()=>WR(r=>{const n=r.getIndent();r.setIndent(n+1)}),lt),e.registerCommand(rR,()=>WR(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),lt),e.registerCommand(_O,r=>{const n=he();if(Xt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],"previous"),!0}else if(te(n)&&(!r.shiftKey&&Up(n,"previous")||!r.shiftKey&&RA(n,!0)||!r.shiftKey&&$A(n,!0)))return r.preventDefault(),!0;return!1},lt),e.registerCommand(bO,r=>{const n=he();if(Xt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],"next"),!0}else if(te(n)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===Jr().getChildrenSize()})(n)||!r.shiftKey&&Up(n,"next")||!r.shiftKey&&RA(n,!1)||!r.shiftKey&&$A(n,!1)))return r.preventDefault(),!0;return!1},lt),e.registerCommand(gO,r=>{const n=he();if(Xt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],Ip(i[0])?"next":"previous"),!0}if(!te(n))return!1;if(!r.shiftKey&&Up(n,Ip(n.anchor.getNode())?"next":"previous"))return r.preventDefault(),!0;if(r.shiftKey||Qu(n,"arrow","start",t.peek()),KR(n,!0)){const i=r.shiftKey;return r.preventDefault(),HR(n,i,!0),!0}return!1},lt),e.registerCommand(pO,r=>{const n=he();if(Xt(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),jp(i[0],Ip(i[0])?"previous":"next"),!0}if(!te(n))return!1;if(!r.shiftKey&&Up(n,Ip(n.anchor.getNode())?"previous":"next"))return r.preventDefault(),!0;if(r.shiftKey||Qu(n,"arrow","end",t.peek()),KR(n,!1)){const i=r.shiftKey;return r.preventDefault(),HR(n,i,!1),!0}return!1},lt),e.registerCommand(vS,r=>{const n=he();if(!Xt(n)&&kA(r.target))return!1;if(te(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const a=o.getNode();if(Ar(a))return!1;const s=YZ(a);return s.getIndent()>0&&(s.is(a)||a.is(s.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(rR,void 0);if(sl&&Bc)return!1}else if(!Xt(n))return!1;return r.preventDefault(),e.dispatchCommand(Kl,!0)},lt),e.registerCommand(SO,r=>{const n=he();return!(!Xt(n)&&kA(r.target))&&!(!te(n)&&!Xt(n))&&(r.preventDefault(),e.dispatchCommand(Kl,!1))},lt),e.registerCommand(sh,r=>{let n=he();if(Xt(n)){const i=n.getNodes();i.length===1&&ct(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!te(n))return!1;if(Qu(n,"enter","both",t.peek()),r!==null){if((sl||jh||qh)&&Bc)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(Ec,!1)}return e.dispatchCommand(ih,void 0)},lt),e.registerCommand(xO,()=>{const r=he();return!!te(r)&&(e.blur(),!0)},lt),e.registerCommand(wO,r=>{const[,n]=Pp(r);if(n.length>0){const i=r.clientX,o=r.clientY,a=Fm(i,o,e.getRootElement());if(a!==null){const{offset:s,node:l}=a,u=uu(l);if(u!==null){const d=yS();if(ne(u))d.anchor.set(u.getKey(),s,"text"),d.focus.set(u.getKey(),s,"text");else{const h=u.getParentOrThrow().getKey(),p=u.getIndexWithinParent()+1;d.anchor.set(h,p,"element"),d.focus.set(h,p,"element")}const f=Vs(d);bn(f)}e.dispatchCommand(EA,n)}return r.preventDefault(),!0}return Mte(r,e)},lt),e.registerCommand(kO,r=>{const[n]=Pp(r),i=he();return!(n&&!te(i))&&(te(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(IM(r.dataTransfer,FM(i)),Pte(r.dataTransfer,e)),!0)},lt),e.registerCommand(CO,r=>{const[n]=Pp(r),i=he();if(n&&!te(i))return!1;const o=r.clientX,a=r.clientY,s=Fm(o,a,e.getRootElement());if(s!==null){const l=uu(s.node);ct(l)&&r.preventDefault()}return!0},lt),e.registerCommand(RO,()=>{const r=he();return dZ(te(r)&&qg(r.anchor.getNode())!==null?r:null),!0},lt),e.registerCommand(Mg,r=>(xA(e,Hs(r,ClipboardEvent)?r:null),!0),lt),e.registerCommand(_S,r=>((async function(n,i){await xA(i,Hs(n,ClipboardEvent)?n:null),i.update(()=>{const o=he();te(o)?o.removeText():Xt(o)&&o.getNodes().forEach(a=>a.remove())},{tag:MO})})(r,e),!0),lt),e.registerCommand(gS,r=>{const[,n,i]=Pp(r);return n.length>0&&!i?(e.dispatchCommand(EA,n),!0):_d(r.target)&&AS(r.target)?!1:he()!==null&&((function(o,a){o.preventDefault(),a.update(()=>{const s=he(),l=Hs(o,InputEvent)||Hs(o,KeyboardEvent)?null:o.clipboardData;l!=null&&s!==null&&E1(l,s)},{tag:OO})})(r,e),!0)},lt),e.registerCommand(yO,()=>{const r=he();return te(r)&&Qu(r,"space","both",t.peek()),!1},lt),e.registerCommand(EO,()=>{const r=he();return te(r)&&Qu(r,"tab","both",t.peek()),!1},lt),e.registerCommand(mO,r=>{const n=he();if(Xt(n))return TA(n,!1,r);if(!te(n))return!1;const{anchor:i}=n;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!V(o))return!1;const a=o.getFirstChild();if(!ct(a)||!a.isInline())return!1;const s=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(s,0,"element"),r.preventDefault(),r.stopPropagation(),!0},lt),e.registerCommand(vO,r=>{const n=he();if(Xt(n))return TA(n,!0,r);if(!te(n))return!1;const{anchor:i,focus:o}=n,a=Qt(o.getNode(),u=>V(u)&&!u.isInline());if(a===null)return!1;const s=a.getFirstChild();if(!ct(s)||!s.isInline()||Qt(i.getNode(),u=>V(u)&&!u.isInline())!==a)return!1;const l=a.getKey();return(o.type!=="element"||o.key!==l||o.offset!==0)&&(n.focus.set(l,0,"element"),r.shiftKey||n.anchor.set(l,0,"element"),r.preventDefault(),r.stopPropagation(),!0)},lt))}function C1(e,t){const r={};for(const n of e){const i=t(n);i&&(r[i]?r[i].push(n):r[i]=[n])}return r}function ZS(e){const t=C1(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const NA=/[!-/:-@[-`{-~\s]/,DA=/\s/,R1=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Qte=/^\s{0,3}$/;function A1(e){if(!gd(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&ne(t)&&Qte.test(t.getTextContent())}function $1(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const MM=/^(\s*)(\d{1,})\.\s/,LM=/^(\s*)[-*+]\s/,Yte=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,T1=/^(#{1,6})\s/,zM=/^>\s/,UM=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,N1=/^[ \t]*`{3,}$/,Xte=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,Zte=/^(?:\|)(.+)(?:\|)\s?$/;function ere(e){if(e[0]!=="|")return!1;const{length:t}=e;let r=1,n=0;for(;r<t;){let i=r;for(e[i]===" "&&i++,e[i]===":"&&i++;e[i]==="-";)i++;if(e[i]===":"&&i++,e[i]===" "&&i++,e[i]!=="|")break;n++,r=i+1}return n>0&&(r===t||r===t-1&&/\s/.test(e[r]))}const FA=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,IA=/^<\/[a-z_][\w-]*\s*>/i,PA=e=>new RegExp(`(?:${e.source})$`,e.flags),df=Vh("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),OA=Vh("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),BM=Vh("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function D1(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function tre(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!ne(n))return null;const i=n.getTextContent(),o=D1(i);if(o!==null){const[a,s]=o;return n.setTextContent(a),s}return/^ {2,}$/.test(i)&&(function(a,s){for(let l=s-1;l>=0;l--){if(Yn(a[l]))return!1;if(/\S/.test(a[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function jM(e){const t=qo(),r=tre(e);return r!==null&&Sc(t,BM,r),t}const qM=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},VM=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),a=t.getNextSibling(),s=ka(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],u=e!=="bullet"&&e!=="check"||l!==df.parse(l)?void 0:l;if(at(a)&&a.getListType()===e){u&&Sc(a,df,u);const f=a.getFirstChild();f!==null?f.insertBefore(s):a.append(s),e==="number"&&a.setStart(Number(n[2])),t.remove()}else if(at(o)&&o.getListType()===e)u&&Sc(o,df,u),o.append(s),t.remove();else{const f=Lo(e,e==="number"?Number(n[2]):void 0);u&&Sc(f,df,u),f.append(s),t.replace(f)}s.append(...r),i||s.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let m=0;return h&&(m+=h.length),p&&(m+=Math.floor(p.length/4)),m})(n[1]);d&&s.setIndent(d)},eE=(e,t,r,n)=>{const i=[],o=e.getChildren();let a=0;for(const s of o)if(At(s)){if(s.getChildrenSize()===1){const p=s.getFirstChild();if(at(p)){const m=eE(p,t,r+1,n);m&&i.push(m);continue}}if(n&&!s.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),u=e.getListType(),d=Kh(e,df),f=u==="number"?`${e.getStart()+a}. `:u==="check"?`${d} [${s.getChecked()?"x":" "}] `:d+" ";let h=t(s);u!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),a++}return i.join(`
|
|
29
|
+
`)},rre={dependencies:[Qg],export:(e,t)=>{if(!Wte(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:T1,replace:qM(e=>{const t="h"+e[1].length;return es(t)}),triggerOnEnter:!0,type:"element"},nre={dependencies:[xd],export:(e,t)=>{if(!k1(e))return null;const r=t(e).split(`
|
|
30
|
+
`),n=[];for(const i of r)n.push("> "+i);return n.join(`
|
|
31
|
+
`)},regExp:zM,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(k1(o))return o.splice(o.getChildrenSize(),0,[jM(o),...t]),void e.remove()}const i=Sd();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},q0={dependencies:[yd],export:e=>{if(!gh(e))return null;const t=e.getTextContent();let r=Kh(e,OA);if(t.indexOf(r)>-1){const n=t.match(/`{3,}/g);if(n){const i=Math.max(...n.map(o=>o.length));r="`".repeat(i+1)}}return r+(e.getLanguage()||"")+(t?`
|
|
32
|
+
`+t:"")+`
|
|
33
|
+
`+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:r,startMatch:n})=>{const i=n[1],o=i.trim().length,a=e[r],s=n.index+i.length,l=a.slice(s),u=new RegExp(`\`{${o},}$`);if(u.test(l)){const p=l.match(u),m=l.slice(0,l.lastIndexOf(p[0])),g=[...n];return g[2]="",q0.replace(t,null,g,p,[m],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const m=e[p];if(d.test(m)){const g=m.match(d),v=e.slice(r+1,p),_=a.slice(n[0].length);return _.length>0&&v.unshift(_),q0.replace(t,null,n,g,v,!0),[!0,p]}}const f=e.slice(r+1),h=a.slice(n[0].length);return h.length>0&&f.unshift(h),q0.replace(t,null,n,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:N1},regExpStart:UM,replace:(e,t,r,n,i,o)=>{let a,s;const l=r[1]?r[1].trim():"```",u=r[2]||void 0;if(!t&&i){if(i.length===1)n?(a=Wn(u),s=i[0]):(a=Wn(u),s=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(a=Wn(u),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
|
|
34
|
+
`)}Sc(a,OA,l);const d=Rr(s);a.append(d),e.append(a)}else t&&qM(d=>Wn(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},ire={dependencies:[Qh,Nu],export:(e,t,r)=>at(e)?eE(e,t,0,r):null,regExp:LM,replace:VM("bullet"),triggerOnEnter:!0,type:"element"},ore={dependencies:[Qh,Nu],export:(e,t,r)=>at(e)?eE(e,t,0,r):null,regExp:MM,replace:VM("number"),triggerOnEnter:!0,type:"element"},are={format:["code"],tag:"`",type:"text-format"},sre={format:["highlight"],tag:"==",type:"text-format"},lre={format:["bold","italic"],tag:"***",type:"text-format"},ure={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},cre={format:["bold"],tag:"**",type:"text-format"},dre={format:["bold"],intraword:!1,tag:"__",type:"text-format"},fre={format:["strikethrough"],tag:"~~",type:"text-format"},hre={format:["italic"],tag:"*",type:"text-format"},pre={format:["italic"],intraword:!1,tag:"_",type:"text-format"},mre={dependencies:[Yh],export:(e,t,r)=>{if(!sa(e)||ac(e))return null;const n=t(e);let i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${n}](${e.getURL()} "${i}")`:`[${n}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{if(Qt(e,sa))return;const[,r,n,i]=t,o=n!=null?$1(n):void 0,a=i!=null?$1(i):void 0,s=Gc(o,{title:a}),l=r.split("[").length-1,u=r.split("]").length-1;let d=r,f="";if(l<u)return;if(l>u){const p=r.split("[");f="["+p[0],d=p.slice(1).join("[")}const h=Rr(d);return h.setFormat(e.getFormat()),s.append(h),e.replace(s),f&&s.insertBefore(Rr(f)),h},trigger:")",type:"text-match"},gre=[rre,nre,ire,ore],vre=[q0],_re=[are,lre,ure,cre,dre,sre,hre,pre,fre],bre=[mre],rl=[...gre,...vre,..._re,...bre];function yre(e,t=!1){const r=e.split(`
|
|
35
|
+
`);let n=0;const i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a.trimEnd(),l=i[i.length-1],u=o<r.length-1?D1(a):null,d=l!==void 0&&D1(l)!==null;if(Xte.test(s))i.push(s);else if(n===0){{const f=s.match(UM);if(f){n=f[1].trim().length,i.push(s);continue}}s===""||l===""||!l||T1.test(l)||T1.test(s)||zM.test(s)||MM.test(s)||LM.test(s)||Yte.test(s)||Zte.test(s)||ere(s)||d||!t||FA.test(s)||IA.test(s)||PA(IA).test(l)||PA(FA).test(l)||N1.test(l)?i.push(!t&&s!==""||u!==null?a:s):i[i.length-1]=l+" "+(u===null?s:a).trimStart()}else{if(N1.test(s)&&s.trim().length>=n){n=0,i.push(s);continue}i.push(a)}}return i.join(`
|
|
36
|
+
`)}function xre(e,t,r,n,i){for(const o of t){if(!o.export)continue;const a=o.export(e,s=>Im(s,r,n,void 0,void 0,i));if(a!=null)return a}return V(e)?Im(e,r,n,void 0,void 0,i):ct(e)?e.getTextContent():null}function Im(e,t,r,n,i,o=!1){const a=[],s=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of s){for(const u of r){if(!u.export)continue;const d=u.export(l,f=>Im(f,t,r,n,[...i,...n],o),(f,h)=>MA(f,h,t,n,i,o));if(d!=null){a.push(d);continue e}}Yn(l)?a.push(Sre(l)):ne(l)?a.push(MA(l,l.getTextContent(),t,n,i,o)):V(l)?a.push(Im(l,t,r,n,i,o)):ct(l)&&a.push(l.getTextContent())}return a.join("")}function Sre(e){return Kh(e,BM)+`
|
|
37
|
+
`}function MA(e,t,r,n,i,o=!1){const a=e.hasFormat("code");let s,l,u,d,f=t;if(a||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),a){const{fence:x,padded:w}=(function(E){const C=E.match(/`+/g),k=C?Math.max(...C.map(A=>A.length)):0;return{fence:"`".repeat(k+1),padded:E.length===0||E.includes("`")||/^\s/.test(E)&&/\s$/.test(E)?` ${E} `:E}})(t);s="",u="",l=x+w+x,d=!1}else{const x=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];s=x[1],l=x[2],u=x[3],d=l===""}let h="",p="",m="";const g=LA(e,!0),v=LA(e,!1),_=new Set;for(const x of r){const w=x.format[0],E=x.tag;w!=="code"&&zA(e,w)&&!_.has(w)&&(_.add(w),zA(g,w)&&n.find(C=>C.tag===E)||(n.push({format:w,tag:E}),h+=E))}for(let x=0;x<n.length;x++){const w=F1(e,n[x].format),E=F1(v,n[x].format);if(w&&E)continue;const C=[...n];for(;C.length>x;){const k=C.pop();i&&k&&i.find(A=>A.tag===k.tag)||(k&&typeof k.tag=="string"&&(w?E||(m+=k.tag):p+=k.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+s+h+l+m+u}function LA(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return ne(r)?r:null}function F1(e,t){return ne(e)&&e.hasFormat(t)}function zA(e,t){return!!F1(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function Ere(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=x=>{let w=0;for(let E=x-1;E>=0&&h[E]==="\\";E--)w++;return w%2==1},m=[];let g=0;for(;g<h.length;)if(h[g]==="`"){let x=1;for(;g+x<h.length&&h[g+x]==="`";)x++;m.push({index:g,length:x}),g+=x}else g++;const v=[];let _=0;for(;_<m.length;){const x=m[_];if(p(x.index)){_++;continue}let w=-1;for(let k=_+1;k<m.length;k++)if(m[k].length===x.length){w=k;break}if(w===-1){_++;continue}const E=m[w];let C=h.slice(x.index+x.length,E.index);C.length>=2&&C.startsWith(" ")&&C.endsWith(" ")&&/[^ ]/.test(C)&&(C=C.slice(1,-1)),v.push({content:C,endIndex:E.index+E.length,startIndex:x.index}),_=w+1}return v})(r);for(const h of f)o||(o={content:h.content,endIndex:h.endIndex,startIndex:h.startIndex,tag:"`"}),i.push({end:h.endIndex,start:h.startIndex})}const a=(function(f,h,p=[]){const m=[],g=new Set(Object.keys(h.transformersByTag).filter(w=>w[0]!=="`").map(w=>w[0])),v=w=>{let E=0;for(let C=w-1;C>=0&&f[C]==="\\";C--)E++;return E%2==1},_=w=>p.some(E=>w>=E.start&&w<E.end);let x=0;for(;x<f.length;){const w=f[x];if(!g.has(w)||v(x)||_(x)){x++;continue}let E=1;for(;x+E<f.length&&f[x+E]===w;)E++;const C=UA(w,f,x,E,!0),k=UA(w,f,x,E,!1);(C||k)&&m.push({active:!0,canClose:k,canOpen:C,char:w,index:x,length:E}),x+=E}return m})(r,t,i),s=a.length>0?(function(f,h,p){const m={};let g=0,v=null;for(;g<h.length;){const _=h[g];if(!_.active||!_.canClose||_.length===0){g++;continue}const x=`${_.char}${_.canOpen}${_.length%3}`,w=m[x]??-1;let E=!1;for(let C=g-1;C>w;C--){const k=h[C];if(!k.active||!k.canOpen||k.length===0||k.char!==_.char||(k.canClose||_.canOpen)&&(k.length+_.length)%3==0&&k.length%3!=0&&_.length%3!=0)continue;const A=Math.min(k.length,_.length),$=Object.keys(p.transformersByTag).filter(P=>P[0]===k.char&&P.length<=A).sort((P,I)=>I.length-P.length)[0];if(!$)continue;E=!0;const N=$.length,M={content:f.slice(k.index+k.length,_.index),endIndex:_.index+N,startIndex:k.index+(k.length-N),tag:$};(!v||M.startIndex<v.startIndex||M.startIndex===v.startIndex&&M.endIndex>v.endIndex)&&(v=M);for(let P=C+1;P<g;P++)h[P].active=!1;k.length-=N,_.length-=N,k.active=k.length>0,_.length>0?_.index+=N:(_.active=!1,g++);break}E||(m[x]=g-1,_.canOpen||(_.active=!1),g++)}return v})(r,a,t):null;let l=null,u=null;if(o&&s?s.startIndex<=o.startIndex&&s.endIndex>=o.endIndex?(l=s,u=t.transformersByTag[s.tag]):(l=o,u=n):o?(l=o,u=n):s&&(l=s,u=t.transformersByTag[s.tag]),!l||!u)return null;const d=[r.slice(l.startIndex,l.endIndex),l.tag,l.content];return d.index=l.startIndex,d.input=r,{endIndex:l.endIndex,isCodeSpan:u===n,match:d,startIndex:l.startIndex,transformer:u}}function UA(e,t,r,n,i){if(!BA(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!BA(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&R1.test(o)}return!0}function BA(e,t,r,n){const i=e[t-1],o=e[t+r],[a,s]=n?[o,i]:[i,o];return a!==void 0&&!DA.test(a)&&(!R1.test(a)||s===void 0||DA.test(s)||R1.test(s))}function Ps(e){return ne(e)&&!e.hasFormat("code")}function Nl(e,t,r){let n=Ere(e,t),i=(function(a,s){const l=a;let u,d,f,h;for(const p of s){if(!p.replace||!p.importRegExp)continue;const m=l.getTextContent().match(p.importRegExp);if(!m)continue;const g=m.index||0,v=p.getEndIndex?p.getEndIndex(l,m):g+m[0].length;v!==!1&&(u===void 0||d===void 0||g<u&&(v>d||v<=u))&&(u=g,d=v,f=p,h=m)}return u===void 0||d===void 0||f===void 0||h===void 0?null:{endIndex:d,match:h,startIndex:u,transformer:f}})(e,r);if(n&&i&&(n.isCodeSpan?i.startIndex<=n.startIndex&&i.endIndex>=n.endIndex?n=null:i=null:n.startIndex<=i.startIndex&&n.endIndex>=i.endIndex||i.startIndex>n.endIndex?i=null:n=null),n){const a=(function(s,l,u,d,f){const h=s.getTextContent();let p,m,g;if(f[0]===h?p=s:l===0?[p,m]=s.splitText(u):[g,p,m]=s.splitText(l,u),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:m,nodeBefore:g,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);Ps(a.nodeAfter)&&Nl(a.nodeAfter,t,r),Ps(a.nodeBefore)&&Nl(a.nodeBefore,t,r),Ps(a.transformedNode)&&Nl(a.transformedNode,t,r)}else if(i){const a=(function(s,l,u,d,f){let h,p,m;return l===0?[h,p]=s.splitText(u):[m,h,p]=s.splitText(l,u),d.replace?{nodeAfter:p,nodeBefore:m,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!a)return;Ps(a.nodeAfter)&&Nl(a.nodeAfter,t,r),Ps(a.nodeBefore)&&Nl(a.nodeBefore,t,r),Ps(a.transformedNode)&&Nl(a.transformedNode,t,r)}const o=$1(e.getTextContent());e.setTextContent(o)}function wre(e,t,r,n=!1){const i=ZS(r),o=(function(u){const d={},f={},h=[];for(const p of u){const{tag:m}=p;d[m]=p;const g=m.replace(/(\*|\^|\+)/g,"\\$1");h.push(g),m.length===1?f[m]=m==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${g}])(${g})((\\\\${g})?.*?[^${g}\\s](\\\\${g})?)(${g})(?![\\\\${g}])`):f[m]=new RegExp(`(^|[^\\\\])(${g})((\\\\${g})?.*?[^\\s](\\\\${g})?)(${g})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),a=e.split(`
|
|
38
|
+
`),s=a.length;for(let u=0;u<s;u++){const d=a[u],[f,h]=kre(a,u,i.multilineElement,t);f?u=h:Cre(d,t,i.element,o,i.textMatch,n)}const l=t.getChildren();for(const u of l)if(!n&&A1(u)&&t.getChildrenSize()>1)u.remove();else if(V(u))for(const d of u.getAllTextNodes())Rre(d)}function kre(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,u=e[t].match(s);if(!u)continue;if(o){const m=o({lines:e,rootNode:n,startLineIndex:t,startMatch:u,transformer:i});if(m===null)continue;if(m)return m}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=t;const p=e.length;for(;h<p;){const m=d?e[h].match(d):null;if(!m&&(!f||f&&h<p-1)){h++;continue}if(m&&t===h&&m.index===u.index){h++;continue}const g=[];if(m&&t===h)g.push(e[t].slice(u[0].length,-m[0].length));else for(let v=t;v<=h;v++)if(v===t){const _=e[v].slice(u[0].length);g.push(_)}else if(v===h&&m){const _=e[v].slice(0,-m[0].length);g.push(_)}else g.push(e[v]);if(l(n,null,u,m,g,!0)!==!1)return[!0,h];break}}return[!1,t]}function Cre(e,t,r,n,i,o){const a=Rr(e),s=jt();s.append(a),t.append(s);for(const{regExp:l,replace:u}of r){const d=e.match(l);if(d&&(a.setTextContent(e.slice(d[0].length)),u(s,[a],d,!0)!==!1))break}if(Nl(a,n,i),s.getParent()!==null&&e.length>0){const l=s.getPreviousSibling();if(!o&&(gd(l)||k1(l)||at(l))){let u=l;if(at(l)){const d=l.getLastDescendant();u=d==null?null:Qt(d,At)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[jM(u),...s.getChildren()]),s.remove())}}}function Rre(e){const t=new Set,r=e.getTextContent();let n=r.indexOf(" ");for(;n!==-1;)t.add(n),t.add(n+1),n=r.indexOf(" ",n+1);e.splitText(...t).forEach(i=>{i.getTextContent()===" "&&i.replace(dd())})}function Are(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function jA(e,t,r,n,i){const o=e.getParent();if(!sr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExp:s,replace:l}of n){const u=a.match(s),d=i||u&&u[0].endsWith(" ")?r:r-1;if(u&&u[0].length===d){const f=t.getNextSiblings(),[h,p]=t.splitText(r);if(l(e,p?[p,...f]:f,u,!1)!==!1)return h.remove(),!0}}return!1}function qA(e,t,r,n,i){const o=e.getParent();if(!sr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExpStart:s,replace:l,regExpEnd:u}of n){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const d=a.match(s);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,m]=t.splitText(r);if(l(e,m?[m,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function $re(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function VA(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(KM(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function KM(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function Tre(e,t=rl){const r=ZS(t),n=r.element.filter(l=>l.triggerOnEnter),i=C1(r.textFormat,({tag:l})=>l[l.length-1]),o=C1(r.textMatch,({trigger:l})=>l),a=new Set([" "]);for(const l of r.textFormat)a.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&a.add(l.trigger);for(const l of t){const u=l.type;if(u==="element"||u==="text-match"||u==="multiline-element"){const d=l.dependencies;for(const f of d)e.hasNode(f)||Are(173,f.getType())}}const s=(l,u,d)=>!!jA(l,u,d,r.element)||!!qA(l,u,d,r.multilineElement)||!!(function(f,h,p){let m=f.getTextContent();const g=p[m[h-1]];if(g==null)return!1;h<m.length&&(m=m.slice(0,h));for(const v of g){if(!v.replace||!v.regExp)continue;const _=m.match(v.regExp);if(_===null)continue;const x=_.index||0,w=x+_[0].length;let E;return x===0?[E]=f.splitText(w):[,E]=f.splitText(x,w),E.selectNext(0,0),v.replace(E,_),!0}return!1})(u,d,o)||!!(function(f,h,p){const m=f.getTextContent(),g=h-1,v=m[g],_=p[v];if(!_)return!1;for(const x of _){const{tag:w}=x,E=w.length,C=g-E+1;if(E>1&&!KM(m,C,w,0,E)||m[C-1]===" ")continue;const k=m[g+1];if(x.intraword===!1&&k&&!NA.test(k))continue;const A=f;let $=A,N=VA(m,C,w),M=$;for(;N<0&&(M=M.getPreviousSibling())&&!Yn(M);)if(ne(M)){if(M.hasFormat("code"))continue;const G=M.getTextContent();$=M,N=VA(G,G.length,w)}if(N<0||$===A&&N+E===C)continue;const P=$.getTextContent();if(N>0&&P[N-1]===v)continue;const I=P[N-1];if(x.intraword===!1&&I&&!NA.test(I)||!x.format.includes("code")&&$re($,N))continue;const U=A.getTextContent(),B=U.slice(0,C)+U.slice(g+1);A.setTextContent(B);const q=$===A?B:P;$.setTextContent(q.slice(0,N)+q.slice(N+E));const W=he(),J=yS();bn(J);const K=g-E*($===A?2:1)+1;J.anchor.set($.__key,N,"text"),J.focus.set(A.__key,K,"text");for(const G of x.format)J.formatText(G,ss[G]);J.anchor.set(J.focus.key,J.focus.offset,J.focus.type);for(const G of x.format)J.hasFormat(G)&&J.toggleFormat(G);return te(W)&&(J.format=W.format),!0}return!1})(u,d,i);return cl(e.registerUpdateListener(({tags:l,dirtyLeaves:u,editorState:d,prevEditorState:f})=>{if(l.has(LO)||l.has(vm)||e.isComposing())return;const h=l.has(uh),p=d.read(he),m=f.read(he);if(!te(m)||!te(p)||!p.isCollapsed()||p.is(m)&&!h)return;const g=p.anchor.key,v=p.anchor.offset,_=d._nodeMap.get(g);if(ne(_)&&u.has(g)&&(h||v===1||!(v>m.anchor.offset+1))){if(h){const x=d.read(()=>_.getTextContent())[v-1];if(!a.has(x))return}e.update(()=>{if(!Ps(_))return;const x=_.getParent();x===null||gh(x)||s(x,_,p.anchor.offset)&&cu(PO)})}}),e.registerCommand(sh,l=>{if(l!==null&&l.shiftKey)return!1;const u=he();if(!te(u)||!u.isCollapsed())return!1;const d=u.anchor.offset,f=u.anchor.getNode();if(!ne(f)||!Ps(f))return!1;const h=f.getParent();return h===null||gh(h)?!1:d===f.getTextContent().length&&!(!qA(h,f,d,r.multilineElement,!0)&&!jA(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},ic))}function HM(e,t=rl,r,n=!1,i=!1){const o=n?e:yre(e,i),a=Jr();a.clear(),wre(o,a,t,n),he()!==null&&a.selectStart()}function WM(e=rl,t,r=!1){return(function(i,o=!1){const a=ZS(i),s=[...a.multilineElement,...a.element],l=!o,u=a.textFormat.filter(d=>d.format.length===1).sort((d,f)=>Number(d.format.includes("code"))-Number(f.format.includes("code")));return d=>{const f=[],h=(d||Jr()).getChildren();for(let p=0;p<h.length;p++){const m=h[p],g=xre(m,s,u,a.textMatch,o);g!=null&&f.push(l&&p>0&&!A1(m)&&!A1(h[p-1])?`
|
|
39
|
+
`.concat(g):g)}return f.join(`
|
|
40
|
+
`)}})(e,r)(t)}let GM=[Qg,xd,Qh,Nu,Yh,yd];function li(e){return"var("+e+")"}let Nre=S([z("flex"),_i("wrap"),Z("center"),c("gap","2px"),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),M_=S([c("background","none"),c("border","1px solid transparent"),c("border-radius",li(X.sm)),c("color",li(y.textSecondary)),c("font-family","inherit"),c("font-size",li(T.sizeSm)),c("line-height","1"),c("min-width","26px"),c("padding","5px 6px"),xe("pointer"),Je([c("background",li(y.surfaceSubtle))])]),Dre=S([c("background",li(y.surfaceSubtle)),c("border-color",li(y.border)),c("color",li(y.textPrimary))]),Fre=S([Ya(.4),xe("notAllowed")]),L_=S([c("width","1px"),c("align-self","stretch"),c("background",li(y.borderSubtle)),c("margin","2px 4px")]),Ire=S([z("flex"),Z("center"),c("gap",li(F.xs)),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),Pre=S([_o(1),c("background",li(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",li(X.sm)),c("color",li(y.textPrimary)),c("font-family","inherit"),c("font-size",li(T.sizeSm)),c("padding","3px 6px"),c("outline","none"),ms([c("border-color",li(y.brand))])]);function Ore(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=se(()=>{}),a=o[1],s=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},u=h=>{n.update(()=>{let p=he();if(p!=null&&te(p)){WZ(p,h);return}})},d=(h,p,m,g)=>{let v=m!==void 0?m:!1,_=i?M_+" "+Fre:v?M_+" "+Dre:M_;return b("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:_,title:p,disabled:i,type:"button",onClick:x=>g(),onMouseDown:x=>{x.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{$te(p===""?null:p)}),a(m=>{})};return L(Gr,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(Io,"bold")),d("I","Italic",r.italic,()=>l(Io,"italic")),d("</>","Inline code",r.code,()=>l(Io,"code")),b("span",{className:L_}),d("H1","Heading 1",void 0,()=>u(()=>es("h1"))),d("H2","Heading 2",void 0,()=>u(()=>es("h2"))),d("¶","Paragraph",void 0,()=>u(()=>jt())),b("span",{className:L_}),d("•","Bulleted list",void 0,()=>l(bM,void 0)),d("1.","Numbered list",void 0,()=>l(yM,void 0)),d("“","Quote",void 0,()=>u(()=>Sd())),d("🔗","Link",void 0,()=>a(h=>{if(!Ge(h))return""})),b("span",{className:L_}),d("↩","Undo",void 0,()=>l(Pg,void 0)),d("↪","Redo",void 0,()=>l(Og,void 0))],"aria-label":"Formatting",className:Nre,role:"toolbar"}),s!==void 0?L("div",{children:[b("input",{"aria-label":"Link URL",className:Pre,autoFocus:!0,placeholder:"https://…",type:"url",value:s,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(s);case"Escape":return a(m=>{});default:return}},onChange:h=>{let p=h.target.value;a(m=>p)}}),d("Apply","Apply link",void 0,()=>f(s)),d("Remove","Remove link",void 0,()=>f(""))],className:Ire}):null]})}let KA={bold:!1,italic:!1,code:!1},Mre=Ore;function Lre(e){return e.trim()===""}let HA={contents:void 0};function zre(){let e=HA.contents;if(e!==void 0)return nr(e);let t=kS({namespace:"reventless-rich-text-probe",nodes:GM,onError:r=>{}});return HA.contents=Jt(t),t}function Ure(e){let t=zre(),r={contents:""};return t.update(()=>{HM(e,rl)},{discrete:!0}),t.read(()=>{r.contents=WM(rl)}),r.contents}function Bre(e){return e.trim()!==""?e.trimEnd()!==Ure(e).trimEnd():!1}function nt(e){return"var("+e+")"}let WA=S([z("flex"),pe("column"),c("background",nt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",nt(X.sm)),c("box-sizing","border-box"),c("transition","border-color 120ms"),Ho({NAME:"percent",VAL:100}),fs("hidden"),uI([c("border-color",nt(y.brand))])]),jre=S([c("border-color",nt(y.error)),uI([c("border-color",nt(y.error))])]),qre=S([z("flex"),Z("center"),c("gap","2px"),c("justify-content","flex-end"),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]);function Vre(e){return S([c("background",e?nt(y.surfaceSubtle):"transparent"),c("border","1px solid "+(e?nt(y.border):"transparent")),c("border-radius",nt(X.sm)),c("color",nt(e?y.textPrimary:y.textSecondary)),c("font-family","inherit"),c("font-size",nt(T.sizeXs)),c("padding","2px var("+F.sm+")"),xe("pointer")])}let Kre=S([c("background",nt(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",nt(y.textSecondary)),c("font-size",nt(T.sizeXs)),c("line-height",nt(T.lineHeightNormal)),c("padding","var("+F.xs+") var("+F.sm+")")]),Hre=S([qt("relative"),z("flex"),pe("column")]),Wre=S([qt("absolute"),c("top","var("+F.sm+")"),c("left","var("+F.sm+")"),c("color",nt(y.textDisabled)),c("font-size",nt(T.sizeSm)),c("pointer-events","none"),c("user-select","none")]);function Gre(e){return S([c("color",nt(y.textPrimary)),c("font-size",nt(T.sizeSm)),c("line-height",nt(T.lineHeightRelaxed)),c("min-height",e),c("outline","none"),c("padding",nt(F.sm)),c("word-break","break-word"),c("overflow-y","auto"),c("tab-size","4")])}let Jre=S([c("margin","0 0 var("+F.sm+")")]),Qre=S([c("font-size",nt(T.sizeXl)),c("font-weight",nt(T.weightBold)),c("line-height",nt(T.lineHeightTight)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),Yre=S([c("font-size",nt(T.sizeLg)),c("font-weight",nt(T.weightBold)),c("line-height",nt(T.lineHeightTight)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),Xre=S([c("font-size",nt(T.sizeMd)),c("font-weight",nt(T.weightBold)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),Zre=S([c("border-left","3px solid var("+y.border+")"),c("color",nt(y.textSecondary)),c("margin","var("+F.xs+") 0"),c("padding-left",nt(F.md))]),GA=S([c("margin","var("+F.xs+") 0"),c("padding-left","1.5em")]),ene=S([c("margin","2px 0")]),tne=S([c("color",nt(y.brand)),c("text-decoration","underline")]),rne=S([c("font-weight",nt(T.weightBold))]),nne=S([c("font-style","italic")]),ine=S([c("text-decoration","line-through")]),one=S([c("background",nt(y.surfaceSubtle)),c("border-radius",nt(X.sm)),c("font-family",nt(T.fontFamilyMono)),c("font-size","0.9em"),c("padding","1px 4px")]),ane=S([c("background",nt(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",nt(X.md)),c("display","block"),c("font-family",nt(T.fontFamilyMono)),c("font-size","0.9em"),c("margin","var("+F.xs+") 0"),c("padding",nt(F.sm)),c("white-space","pre-wrap")]);function sne(e){return S([c("background","transparent"),c("border","none"),c("color",nt(y.textPrimary)),c("font-family",nt(T.fontFamilyMono)),c("font-size",nt(T.sizeSm)),c("line-height",nt(T.lineHeightNormal)),c("min-height",e),c("outline","none"),c("padding",nt(F.sm)),c("resize","vertical"),c("box-sizing","border-box"),Ho({NAME:"percent",VAL:100})])}let lne=Object.fromEntries([["paragraph",Jre],["quote",Zre],["link",tne],["code",ane],["heading",Object.fromEntries([["h1",Qre],["h2",Yre],["h3",Xre]])],["list",Object.fromEntries([["ul",GA],["ol",GA],["listitem",ene]])],["text",Object.fromEntries([["bold",rne],["italic",nne],["strikethrough",ine],["code",one]])]]);function une(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,a=e.onChange,s=e.value,l=o!==void 0?o:()=>{},u=i!==void 0?i:"Write markdown…",d=n!==void 0?n:"180px",f=r!==void 0?r:!1,h=t!==void 0?t:!1,p=se(()=>"Rich"),m=p[1],g=p[0],v=se(()=>KA),_=v[1],x=se(()=>s.trim()===""),w=x[1],E=se(()=>!1),C=E[1],k=We(null),A=We(s),$=We(s),N=We(!1),M=We(a);M.current=a;let P=Bt(()=>kS({namespace:"reventless-rich-text",nodes:GM,onError:K=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",K)},theme:lne}),[]),I=()=>{let K={contents:""};return P.read(()=>{K.contents=WM(rl)}),K.contents},U=K=>{$.current=K,A.current=K,N.current=!0,C(G=>Bre(K)),P.update(()=>{HM(K,rl)})},B=()=>{let K=I();if(w(G=>K.trim()===""),_(G=>{let re={contents:KA};return P.read(()=>{let oe=he();if(oe!=null&&te(oe)){re.contents={bold:oe.hasFormat("bold"),italic:oe.hasFormat("italic"),code:oe.hasFormat("code")};return}}),re.contents}),N.current){N.current=!1,A.current=K;return}else return K!==A.current?(A.current=K,M.current(K)):void 0},q=g==="Rich";Ae(()=>{if(!q)return;P.setRootElement(k.current);let K=cl(Jte(P),hte(P),gte(P,vte(),300),Tre(P,rl),P.registerUpdateListener(G=>B()));return U(s),()=>{K(),P.setRootElement(null)}},[q]),Ae(()=>{q&&s!==A.current&&s!==$.current&&U(s)},[s]),Ae(()=>{P.setEditable(!h)},[h]);let W=(K,G)=>b("button",{children:G,"aria-pressed":g===K?"true":"false",className:Vre(g===K),type:"button",onClick:re=>{if(m(oe=>K),K==="Source")return C(oe=>!1)}}),J;return J=g==="Rich"?L("div",{children:[b("div",{ref:Jt(k),"aria-label":"Rich text editor","aria-multiline":!0,className:Gre(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:K=>l(),suppressContentEditableWarning:!0}),x[0]&&!h?b("div",{children:u,className:Wre}):null],className:Hre}):b("textarea",{"aria-label":"Markdown source",className:sne(d),spellCheck:!1,placeholder:u,readOnly:h,value:s,onBlur:K=>l(),onChange:K=>{let G=K.target.value;A.current=G,$.current=G,a(G)}}),L("div",{children:[L("div",{children:[W("Rich","Rich text"),W("Source","Markdown")],className:qre}),!h&&q?b(Mre,{editor:P,formats:v[0]}):null,E[0]&&q?b("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:Kre}):null,J],className:f?WA+" "+jre:WA})}let cne=une;function dl(e){return"var("+e+")"}let JM=S([z("inlineFlex"),Z("center"),Ze("center"),c("background",dl(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("color",dl(y.textDisabled))]),JA=Ir([JM,S([c("width","24px"),c("height","24px"),c("border-radius",dl(X.sm)),c("font-size",dl(T.sizeSm)),c("vertical-align","middle")])]),QM=Ir([JM,S([c("border-radius",dl(X.md)),c("font-size",dl(T.sizeSm))])]),dne=Ir([QM,S([pe("column"),c("gap",dl(F.xs)),c("aspect-ratio","4 / 3")])]),fne=Ir([QM,S([pe("row"),c("gap",dl(F.sm)),c("padding","var("+F.sm+") var("+F.md+")")])]),hne=S([c("width","240px"),c("max-width","100%")]),pne=S([c("width","100%")]),mne=S([c("width","100%"),c("height","100%"),c("aspect-ratio","auto")]),QA=S([c("font-size","20px"),c("line-height","1")]),gne=S([c("position","absolute"),c("width","1px"),c("height","1px"),c("padding","0"),c("margin","-1px"),fs("hidden"),c("clip","rect(0, 0, 0, 0)"),c("white-space","nowrap"),c("border","0")]);function qp(e){return e==="Media"?"⬚":"▤"}function vne(e){return e==="Media"?"No image":"No file"}function YA(e){switch(e){case"Thumb":case"Detail":return hne;case"Tile":return pne;case"Fill":return mne}}function _ne(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=D(e.label,vne(n)),a;return a=n==="Media"?dne:fne,n==="Media"?i==="Thumb"?b("span",{children:qp(n),"aria-label":o,className:JA,role:"img",title:o}):L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0,className:QA}),o],"aria-label":o,className:Ir([a,YA(i)]),role:"img"}):i==="Thumb"?L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0}),b("span",{children:o,className:gne})],className:JA,title:o}):L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0,className:QA}),o],className:Ir([a,YA(i)])})}let I1=_ne;function Ct(e){return"var("+e+")"}let P1=S([c("color",Ct(y.brand)),c("text-decoration","none"),Je([c("text-decoration","underline")])]),bne=S([z("inlineBlock"),c("width","12px"),c("height","12px"),c("border-radius","3px"),c("border","1px solid var("+y.border+")"),c("vertical-align","-1px")]),Ed=S([z("inlineFlex"),Z("center"),c("gap","6px")]),yne=S([c("height","24px"),c("width","24px"),c("object-fit","cover"),c("border-radius",Ct(X.sm)),c("border","1px solid var("+y.borderSubtle+")"),c("vertical-align","middle")]),xne=S([c("max-height","160px"),c("max-width","240px"),c("object-fit","cover"),c("border-radius",Ct(X.md)),c("border","1px solid var("+y.borderSubtle+")"),xe("zoomIn")]),Sne=S([c("color",Ct(y.error)),c("font-size",Ct(T.sizeXs)),c("font-weight",Ct(T.weightMedium)),c("white-space","nowrap"),Oh(Ce(6))]),Ene=S([z("inlineBlock"),c("background",Ct(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius","3px"),c("color",Ct(y.textSecondary)),c("font-size",Ct(T.sizeXs)),c("font-weight",Ct(T.weightMedium)),c("letter-spacing","0.03em"),c("padding","1px 4px"),c("line-height","1.2")]),wne=S([z("inlineBlock"),c("background",Ct(y.surfaceSubtle)),c("border-radius",Ct(X.full)),c("width","64px"),c("height","6px"),fs("hidden")]);function kne(e){return S([c("background",Ct(y.brand)),c("border-radius",Ct(X.full)),c("height","100%"),c("width",e.toString()+"%")])}let tE=S([c("color",Ct(y.textSecondary)),c("font-size",Ct(T.sizeXs)),c("font-variant-numeric","tabular-nums")]),Cne=S([c("width","220px"),c("max-width","100%")]),Rne=S([z("flex"),pe("column"),c("gap","1px"),c("line-height","1.35")]),Ane=S([c("background","none"),c("border","none"),c("padding","0"),xe("zoomIn")]),$ne=S([z("inlineFlex"),c("background","none"),c("border","none"),c("padding","0"),c("line-height","0"),c("max-width","100%"),xe("pointer"),Je([c("opacity","0.75")])]),Tne=S([z("flex"),pe("column"),c("gap",Ct(F.xs)),c("width","100%")]),Nne=S([c("background","none"),c("border","none"),c("padding","0"),c("color",Ct(y.textSecondary)),c("font-size",Ct(T.sizeXs)),c("text-decoration","underline"),xe("pointer"),Je([c("color",Ct(y.brand))])]),YM=S([z("flex"),pe("column"),Z("flexStart"),c("gap","6px")]),XM=S([c("color",Ct(y.textSecondary)),c("font-family",Ct(T.fontFamilyMono)),c("font-size",Ct(T.sizeXs))]),Dne=S([z("inlineBlock"),c("background","#ffffff"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Ct(X.md)),c("padding","4px"),c("line-height","0")]),Fne=S([c("display","block"),c("max-width","260px"),c("height","auto")]),Ine=S([z("flex"),Z("center"),c("gap",Ct(F.xs))]);function Af(e){return S([c("background",Ct(y.surface)),c("border","1px solid var("+(e?y.error:y.border)+")"),c("border-radius",Ct(X.sm)),c("color",Ct(y.textPrimary)),c("font-family","inherit"),c("font-size",Ct(T.sizeSm)),c("padding","6px 8px")])}let XA=S([c("flex","1 1 auto"),c("min-width","0")]),ZA=S([c("flex","0 0 auto")]),Pne=S([c("color",Ct(y.textSecondary)),c("font-size",Ct(T.sizeXs)),c("font-variant-numeric","tabular-nums")]),One=S([z("inlineFlex"),Z("center"),c("gap","6px")]);function ZM(e){return S([c("color",Ct(e?y.error:y.textSecondary)),c("font-size",Ct(T.sizeXs)),c("font-variant-numeric","tabular-nums")])}let Mne=S([z("flex"),pe("column"),c("gap","4px")]),Lne=S([z("flex"),Z("center"),c("gap",Ct(F.xs))]);function wd(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function rE(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),o=D(n[1],"00"),a=s=>{let l=s.length;return l<=3?s:a(s.slice(0,l-3|0))+","+s.slice(l-3|0)};return(t?"-":"")+a(i)+"."+o}function zne(e){return/^[A-Z]{3}$/.test(e)}function e4(e){if(zne(e))try{return Jt(new Intl.NumberFormat("en-US",{style:"currency",currency:e}))}catch{return}}function t4(e,t){let r=e4(t);if(r===void 0)return rE(e)+" "+t;let n=nr(r),i=n.resolvedOptions().maximumFractionDigits;return n.format(e/Math.pow(10,i))}function Yg(e){return R(Y(e),t=>{let r=R(O(t,"amount"),Bi),n=R(O(t,"currency"),ue);if(r!==void 0&&n!==void 0)return[r,n]})}function Une(e,t){let r=e4(t);return r!==void 0?e/Math.pow(10,nr(r).resolvedOptions().maximumFractionDigits):e}function r4(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function n4(e){let t=["B","KB","MB","GB","TB","PB"],n=((s,l)=>{for(;;){let u=l,d=s;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function nE(e){let t=e<0?0:Math.floor(e)|0,r=t/86400|0,n=t%86400/3600|0,i=t%3600/60|0,o=t%60;return r>0?r.toString()+"d "+n.toString()+"h":n>0?n.toString()+"h "+i.toString()+"m":i>0?i.toString()+"m "+o.toString()+"s":o.toString()+"s"}function iE(e){return R(Y(e),t=>{let r=o=>R(R(O(t,o),ue),a=>{if(a!=="")return a}),n=r("start"),i=r("end");if(n!==void 0&&i!==void 0)return[n,i]})}function oE(e,t){let r=Dn(e),n=Dn(t);return r!==void 0&&n!==void 0?n<r?"Ends before it starts":void 0:"Not a date-time"}function i4(e,t){let r=Dn(e),n=Dn(t);if(r!==void 0&&n!==void 0&&n>=r)return nE((n-r)/1e3)}function Bne(e){return e.replace(/```[^\n]*\n?/g,"").replace(/`([^`]*)`/g,"$1").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s{0,3}(?:[-*+]|\d+\.)\s+/gm,"").replace(/^>\s?/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/~~(.*?)~~/g,"$1").replace(/\s+/g," ").trim()}function jne(e,t){return ot(t,e,(r,n)=>D(r.split(n)[0],r))}function Pm(e){let r=jne(e,["?","#"]).split("/").filter(o=>o!==""),n=D(r[r.length-1|0],""),i;try{i=decodeURIComponent(n)}catch{i=n}return i===""?"file":i}function qne(e){let t=e.split("."),r=t.length;if(r===0||r===1)return;let n=D(t[r-1|0],"");if(/^[A-Za-z0-9]{1,5}$/.test(n))return n.toUpperCase()}function aE(e){return/^[A-Za-z]{2}$/.test(e)}function o4(e){if(aE(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let e$={contents:void 0};function Vne(){let e=e$.contents;if(e!==void 0)return nr(e);let t;try{t=Jt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return e$.contents=Jt(t),t}function sE(e){if(!aE(e))return e;let t=Vne();if(t===void 0)return e;try{let r=nr(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let Kne=["street","streetaddress","line1","addressline1","address1"],Hne=["line2","addressline2","address2","apartment","unit","suite"],Wne=["postalcode","zip","zipcode","postcode"],Gne=["city","town","locality"],Jne=["state","region","province","county"],Qne=["country","countrycode"];function Yne(e){let t=it(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0;return r===""?void 0:r;case"JSONNumber":return t._0.toString();default:return}}function a4(e){let t=it(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0.split(`
|
|
41
|
+
`).map(u=>u.trim()).filter(u=>u!=="");return r.length===0?void 0:r;case"JSONObject":let n=Qe(t._0),i=u=>R(n.find(d=>u.includes(d[0].toLowerCase())),d=>Yne(d[1])),o=i(Wne),a=i(Gne),s=o!==void 0?a!==void 0?o+" "+a:o:a!==void 0?a:void 0,l=ie([i(Kne),i(Hne),s,i(Jne),i(Qne)],u=>u).map(u=>u.trim()).filter(u=>u!=="");return l.length===0?void 0:l;default:return}}function Xne(e){return Q(a4(e),t=>t.map(r=>aE(r)?sE(r):r).join(", "))}function Zne(e){let t=o4(e);return t!==void 0?t+" "+sE(e):e}function Vp(e){return de(Q(Wf(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function t$(e,t){let r=Wf(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let Xg={};function xr(e,t){Xg[ld(e)]=t}function eie(e){return O(Xg,ld(e))}function s4(e,t){return R(Lc(e,t),r=>O(Xg,ld(r.semantic)))}function l4(e,t,r){return R(s4(e,t),n=>n.cell(e,t,r))}function O1(e,t,r){return R(s4(e,t),n=>n.detail(e,t,r))}function tie(e,t){return l4(e,t,null)}function rie(e,t){return O1(e,t,null)}function lE(e,t){return R(DH(e,t),r=>O(Xg,ld(r.semantic)))}function nie(e,t){return de(lE(e,t),!1,r=>Ge(r.input))}function iie(e,t,r,n,i,o,a){return Q(R(lE(e,t),s=>s.input),s=>s(e,t,r,n,i,o,a))}function oie(e,t,r,n){return R(R(lE(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function Om(e){e.stopPropagation()}function Mm(e,t,r){return r?b("a",{children:t,className:P1,href:e,rel:"noopener noreferrer",target:"_blank",onClick:Om}):b("a",{children:t,className:P1,href:e,onClick:Om})}function Xn(e){return R(ue(e),t=>{if(t!=="")return t})}function uE(e){let t=(r,n,i)=>Q(Xn(i),e);return{cell:t,detail:t}}function Zg(e){let t=(r,n,i)=>Q(Bi(i),o=>e(o));return{cell:t,detail:t}}xr("Email",uE(e=>Mm("mailto:"+e,e,!1)));xr("Phone",uE(e=>Mm("tel:"+e,e,!1)));xr("Url",{cell:(e,t,r)=>Q(Xn(r),n=>Mm(n,wd(n,40),!0)),detail:(e,t,r)=>Q(Xn(r),n=>Mm(n,n,!0))});xr("Currency",Zg(rE));xr("Percent",Zg(r4));xr("Bytes",Zg(n4));xr("Duration",Zg(nE));xr("Color",uE(e=>L("span",{children:[b("span",{className:bne,style:{background:e}}),e],className:Ed})));function aie(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function Lm(e){let t=e.size,r=e.kind,n=aH(e.field);if(n===void 0)return b(I1,{kind:r,size:t});let i=aie(r);return b("button",{children:b(I1,{kind:r,size:t,label:i[1]}),className:$ne,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function sie(e){let t=e.alt,r=e.src,n=se(()=>!1);if(r===void 0)return b(Lm,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(Gr,{children:[b("button",{children:b("img",{className:xne,alt:t,src:r}),className:Ane,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(a=>!0)}}),n[0]?b(qI,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function zm(e){let t=it(e);if(typeof t!="object")return t==="JSONNull"?Jt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Jt(r===""?void 0:r)}xr("Image",{cell:(e,t,r)=>Q(zm(r),n=>n!==void 0?b("img",{className:yne,alt:e,src:tu(n),onClick:Om}):b(Lm,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>Q(zm(r),n=>b(sie,{src:Q(n,tu),alt:e,field:e}))});function lie(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)?!0:/^[0-9A-Za-z_-]{16,}$/.test(e)}function uie(e){return L("span",{children:[b(sd,{name:e,size:"Small"}),e],className:Ed})}function r$(e,t,r){return R(Xn(r),n=>{if(!lie(n))return uie(n)})}xr("UserRef",{cell:r$,detail:r$});xr("Markdown",{cell:(e,t,r)=>Q(Xn(r),n=>wd(Bne(n),80)),detail:(e,t,r)=>Q(Xn(r),n=>b(PP,{source:n})),input:(e,t,r,n,i,o,a)=>b(cne,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&Lre(r))return"Required"}});xr("Rating",{cell:(e,t,r)=>Q(Bi(r),n=>b(l_,{value:n,max:Vp(t)})),detail:(e,t,r)=>Q(Bi(r),n=>b(l_,{value:n,max:Vp(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,a)=>b(l_,{value:D(jo(r),0),max:Vp(t),size:"Medium",showValue:!0,onChange:s=>n(s<=0?"":s.toString()),onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=jo(r);if(i===void 0)return"Invalid rating";let o=Vp(t);if(i<0||i>o)return"Must be between 0 and "+o.toString()}});function cie(e){return e<0?0:e>100?100:e}xr("Progress",{cell:(e,t,r)=>Q(Bi(r),n=>{let i=cie(t$(t,n));return L("span",{children:[b("span",{children:b("span",{className:kne(i)}),className:wne}),b("span",{children:Math.round(i).toString()+"%",className:tE})],className:Ed})}),detail:(e,t,r)=>Q(Bi(r),n=>b("div",{children:b(tP,{value:t$(t,n)}),className:Cne}))});function cE(e,t){let r=tu(e),n=qne(t);return L("span",{children:[n!==void 0?b("span",{children:n,className:Ene}):null,b("a",{children:t,className:P1,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:Om})],className:Ed})}function u4(e){let t=e.name,r=e.href,n=se(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[cE(r,t),UW(r)?b("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:Nne,type:"button",onClick:a=>{a.stopPropagation(),i(s=>!s)}}):null],className:Ed}),o?b(jW,{src:tu(r),title:t,height:"60vh"}):null],className:Tne})}xr("FileUrl",{cell:(e,t,r)=>Q(Xn(r),n=>cE(n,wd(Pm(n),40))),detail:(e,t,r)=>Q(Xn(r),n=>b(u4,{href:n,name:Pm(n)}))});xr("File",{cell:(e,t,r)=>Q(zm(r),n=>n!==void 0?cE(n,wd(Pm(n),40)):b(Lm,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>Q(zm(r),n=>n!==void 0?b(u4,{href:n,name:Pm(n)}):b(Lm,{field:e,kind:"Document",size:"Detail"}))});function die(e){return D(R($r(e).find(t=>t[0].toLowerCase()==="currency"),t=>Eu(t[1])),[])}function fie(e,t){return b("span",{children:t4(e,t),className:tE})}function n$(e,t,r){return Q(Yg(r),n=>fie(n[0],n[1]))}function hie(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o=die(e.propSchema),a;if(i==="")a=void 0;else try{a=Yg(JSON.parse(i))}catch{a=void 0}let s=a!==void 0?[a[0].toString(),a[1]]:["",D(o[0],"")],l=s[1],u=s[0],d=(h,p)=>{let m=jo(h);n(m!==void 0&&p!==""?JSON.stringify(ut([["amount",m],["currency",p]])):"")},f=jo(u);return L("span",{children:[L("span",{children:[b("input",{"aria-label":"Amount in minor units",className:Af(t)+" "+XA,step:1,type:"number",value:u,onBlur:h=>r(),onChange:h=>d(h.target.value,l)}),b("span",{children:f!==void 0&&l!==""?"= "+t4(f,l):"minor units",className:Pne})],className:XA}),o.length===0?b("input",{"aria-label":"Currency",className:Af(t)+" "+ZA,placeholder:"EUR",value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)}):b("select",{children:o.map(h=>b("option",{children:h,value:h},h)),"aria-label":"Currency",className:Af(t)+" "+ZA,value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)})],className:Ine})}xr("Money",{cell:n$,detail:n$,input:(e,t,r,n,i,o,a)=>b(hie,{propSchema:t,value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=Yg(i);if(o===void 0)return"Invalid amount";let a=o[0];if(a!==Math.trunc(a))return"An amount is a whole number of minor units"}});function pie(e,t){let r=oE(e,t),n=i4(e,t),i=r!==void 0?r:n!==void 0?n:"";return L("span",{children:[D(Hf(e),e)+" → "+D(Hf(t),t),i===""?null:b("span",{children:i,className:ZM(Ge(r))})],className:One})}function i$(e,t,r){return Q(iE(r),n=>pie(n[0],n[1]))}function Kp(e){if(e==="")return;let t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toISOString()}function o$(e){let t=wg(e);return t===e?"":t.slice(0,10)+"T"+t.slice(11,16)}function mie(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o;if(i==="")o=void 0;else try{o=iE(JSON.parse(i))}catch{o=void 0}let a=o!==void 0?[o$(o[0]),o$(o[1])]:["",""],s=a[1],l=a[0],u=(p,m)=>{let g=Kp(p),v=Kp(m);n(g!==void 0&&v!==void 0?JSON.stringify(ut([["start",g],["end",v]])):"")},d=Kp(l),f=Kp(s),h;if(d!==void 0&&f!==void 0){let p=oE(d,f);h=p!==void 0?[p,!0]:[D(i4(d,f),""),!1]}else h=["start and end",!1];return L("span",{children:[L("span",{children:[b("input",{"aria-label":"Start",className:Af(t),type:"datetime-local",value:l,onBlur:p=>r(),onChange:p=>u(p.target.value,s)}),b("span",{children:"→","aria-hidden":!0}),b("input",{"aria-label":"End",className:Af(t),type:"datetime-local",value:s,onBlur:p=>r(),onChange:p=>u(l,p.target.value)})],className:Lne}),b("span",{children:h[0],className:ZM(h[1])})],className:Mne})}xr("DateRange",{cell:i$,detail:i$,input:(e,t,r,n,i,o,a)=>b(mie,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=iE(i);return o!==void 0?oE(o[0],o[1]):"Invalid range"}});function gie(e){let t=o4(e);return t!==void 0?L("span",{children:[b("span",{children:t,"aria-hidden":!0}),sE(e)],className:Ed}):e}function a$(e,t,r){return Q(Xn(r),gie)}xr("Country",{cell:a$,detail:a$});xr("Address",{cell:(e,t,r)=>Q(Xne(r),n=>wd(n,60)),detail:(e,t,r)=>Q(a4(r),n=>b("span",{children:n.map((i,o)=>b("span",{children:Zne(i)},o.toString())),className:Rne}))});function vie(e){return Q(R(R(Y(e),t=>O(t,"maxLength")),Bi),t=>t|0)}function z_(e){let t=R(Sa(e).channel,n=>oG(n).maxLength),r=vie(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}xr("ChannelText",{cell:(e,t,r)=>Q(Xn(r),n=>{let i=R(z_(t),o=>{if(yc(n)>o)return yc(n)-o|0});return L("span",{children:[wd(n,80),i!==void 0?b("span",{children:i.toString()+" over",className:Sne}):null]})}),detail:(e,t,r)=>{let n=Xn(r),i=Sa(t).channel;if(n!==void 0&&i!==void 0)return b(zY,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,a)=>{let s=R(Sa(t).channel,nP);return b(CY,{value:r,onChange:n,onBlur:i,maxLength:z_(t),channelLabel:Q(s,l=>l.label),hasError:a,note:R(s,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":R(z_(t),i=>{let o=yc(r);if(o>i)return MP(o-i|0)+" over the "+i.toString()+"-character limit"})});xr("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>Q(Xn(r),n=>L("span",{children:[b(pW,{value:n}),b("span",{children:n,className:XM})],className:YM}))});xr("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>Q(Xn(r),n=>L("span",{children:[b(kW,{value:n}),b("span",{children:n,className:XM})],className:YM}))});xr("Signature",{cell:(e,t,r)=>R(Xn(r),n=>{if(lC(n))return b("span",{children:"✓ Signed",className:tE})}),detail:(e,t,r)=>R(Xn(r),n=>{if(lC(n))return b("span",{children:b("img",{className:Fne,alt:"Signature",src:sP(n)}),className:Dne})}),input:(e,t,r,n,i,o,a)=>b(mG,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function vh(e){return"var("+e+")"}let _ie=S([z("inlineFlex"),Z("center"),_i("wrap"),c("gap","4px"),c("font-size",vh(T.sizeSm)),c("min-width","0")]),bie=S([c("color",vh(y.textDisabled)),c("font-size",vh(T.sizeXs))]),yie=S([c("color",vh(y.brand)),c("text-decoration","none"),Je([c("text-decoration","underline")])]),xie=S([c("color",vh(y.textPrimary))]);function Sie(e){let t=e.segments,r=_l();return b("span",{children:t.map((n,i)=>{let o=i===(t.length-1|0),a=n.href;return L(Ox,{children:[a!==void 0?b("a",{children:n.label,className:yie,href:a,onClick:s=>{if(!(s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.button!==0))return s.preventDefault(),s.stopPropagation(),r(a)}}):b("span",{children:n.label,className:xie}),o?null:b("span",{children:" › ",className:bie})]},i.toString()+":"+n.label)}),className:_ie})}let Eie=Sie;function s$(e){return R(R(Y(e),t=>O(t,"type")),ue)}function dE(e){return R(R(Y(e),t=>O(t,"format")),ue)}function wie(e){return R(Y(e),t=>O(t,"items"))}function l$(e){return Ge(R(R(Y(e),t=>O(t,"properties")),Y))}function Jc(e){let t=e.toLowerCase(),r=e.length,n=o=>{let a=o.length;if(r>a&&t.endsWith(o))return e.slice(0,r-a|0)},i=n("ids");return i!==void 0?i:n("id")}function kie(e,t,r){let n=Tn(t);if(e==="compositeId")return"KCompositeId";let i=Eu(n);if(i!==void 0)return{TAG:"KEnum",_0:i};let o=s$(n),a=0;if(o!==void 0)switch(o){case"array":let s=wie(n);if(s===void 0)return"KArrayOfStrings";if(l$(s)||ze(s$(s),"object"))return{TAG:"KArrayOfObjects",_0:s};let l=Jc(e);return l!==void 0?{TAG:"KArrayOfEntityIds",_0:l}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return l$(n)?{TAG:"KNestedObject",_0:n}:"KString";default:a=1}else a=1;if(a===1){let s=dE(n),l=0;if(s!==void 0)switch(s){case"date":case"date-time":return"KDate";default:l=2}else l=2;if(l===2){if(r.isId)return"KString";let u=Jc(e);return u!==void 0?{TAG:"KEntityId",_0:u}:"KString"}}}function Cie(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function Rie(e,t,r){return t.isCompositeId?!0:r.includes(e)}function Aie(e,t,r,n,i){return t.hidden||Cie(e)||n&&Rie(e,t,i)?!1:r?t.summary||t.isId||e==="compositeId"?!0:n?!1:e==="id":!(n&&e==="id")}function $ie(e,t,r){if(e==="compositeId"||r.isId)return 0;if(e==="id")return 1;if(r.summary)return 2;if(typeof t!="object")switch(t){case"KBoolean":return 7;case"KCompositeId":return 0;case"KDate":return 4;case"KNumber":return 8;case"KString":return 5;case"KArrayOfStrings":return 11}else switch(t.TAG){case"KEnum":return 6;case"KEntityId":return 9;case"KArrayOfEntityIds":return 10;case"KArrayOfObjects":return 12;case"KNestedObject":return 13}}function Tie(e,t){if(typeof e!="object")switch(e){case"KBoolean":return"80px";case"KCompositeId":return"260px";case"KNumber":return"100px";case"KString":return t==="id"?"220px":void 0;case"KDate":case"KArrayOfStrings":return"180px"}else switch(e.TAG){case"KEnum":return"140px";case"KEntityId":return"220px";case"KArrayOfEntityIds":return"260px";case"KArrayOfObjects":case"KNestedObject":return"240px"}}function Do(e,t){let r=t!==void 0?t:"List",n=D(Q(R(R(Y(e),u=>O(u,"properties")),Y),Qe),[]),i=kg(e),o=r==="List"&&i.length!==0,a=Qx(e),s=a.length!==0||n.some(u=>u[0]==="compositeId");return ie(n,u=>{let d=u[1],f=u[0],h=Sa(d);if(!Aie(f,h,o,s,a))return;let p=kie(f,d,h),m=D(R(R(Y(d),g=>O(g,"title")),ue),yt(f));return{key:f,label:m,kind:p,ann:h,propSchema:d,priority:$ie(f,p,h),width:Tie(p,f)}}).toSorted((u,d)=>u.priority-d.priority|0)}function Nie(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function c4(e){return b(ns,{variant:"Neutral",label:e,dot:!1})}function u$(e,t,r,n,i){let o=gs(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[os(o.pluginId,o.name,t,[]),t]}function c$(e,t,r){if(r===void 0)return[t,!1];let n=r.lookupLabel(e,t);return n!==void 0?[n,!1]:[t,r.isMissing(e,t)]}function Um(e,t,r){let n=gs(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function M1(e,t,r,n,i,o,a,s,l){let u=l!==void 0?l:!1,d=Um(t,n,a),f=D(s,RI(t)),h=g=>{let v=u$(t,g,n,i,a),_=v[1],x=d?[_,!1]:c$(t,_,o),w=x[0],E=b(KK,{href:v[0],label:w,rawValue:_}),C=f&&w!==_?L("span",{children:[b(sd,{name:w,size:"Small"}),E],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):E;return x[1]?b("span",{children:C,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+_+")"}):C},p=g=>{let v=ie(g,_=>{let w=u$(t,_,n,i,a)[1],C=c$(t,w,o)[0];if(C!==w)return{name:C}});if(u&&f&&!d&&g.length>=2&&v.length===g.length)return b(vI,{members:v,size:"Small"})},m=it(r);if(typeof m!="object")return JSON.stringify(r);switch(m.TAG){case"JSONString":return h(m._0);case"JSONArray":let g=m._0,v=ie(g,ue),_=v.length===g.length?p(v):void 0;return _!==void 0?_:b("span",{children:g.map((x,w)=>{let E=it(x);return typeof E!="object"||E.TAG!=="JSONString"?null:L("span",{children:[h(E._0),w<(g.length-1|0)?", ":null]},w.toString())})});default:return JSON.stringify(r)}}function Die(e){let t=it(e);if(typeof t!="object"||t.TAG!=="JSONString")return JSON.stringify(e);let r=t._0.split("/").map(n=>({label:n,href:void 0}));return b(Eie,{segments:r})}function $o(e,t,r){let n=it(r);if(typeof n!="object")switch(n){case"JSONFalse":return b(ns,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return b(ns,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=gI(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return wg(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function d$(e,t){let r=Y(t);if(r===void 0)return;let n=O(r,"name");if(n!==void 0&&it(n)!=="JSONNull")return $o("name",void 0,n);let i=Do(e,"Drill"),o=ie(i,d=>{let f=d.kind,h;if(typeof f!="object")h=f!=="KArrayOfStrings";else switch(f.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":h=!1;break;default:h=!0}let p=O(r,d.key);if(!h||p===void 0)return;let m=it(p);if(!(typeof m!="object"&&m==="JSONNull"))return[d,p]});if(o.length===0)return;let a=o.slice(0,2),s=i.length-a.length|0,l=a.map((d,f)=>{let h=d[1],p=d[0],m=p.kind,g;if(typeof m!="object")g=m==="KDate"?$o(p.key,dE(p.propSchema),h):$o(p.key,void 0,h);else if(m.TAG==="KEnum"){let v=it(h);g=typeof v!="object"||v.TAG!=="JSONString"?$o(p.key,void 0,h):c4(v._0)}else g=$o(p.key,void 0,h);return L("span",{children:[f>0?" · ":null,g]},f.toString())}),u=s>0?b("span",{children:"+"+s.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return L("span",{children:[l,u],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function Gl(e,t,r,n,i,o,a,s,l){let u=i!==void 0?i:yI;if(n===void 0)return D(tie(e,r),"—");let d=l4(e,r,n);if(d!==void 0)return d;if(typeof t!="object")switch(t){case"KCompositeId":return Die(n);case"KDate":return $o(e,dE(r),n);case"KBoolean":case"KNumber":return $o(e,void 0,n);case"KString":let h=it(n);if(typeof h!="object"||h.TAG!=="JSONString")return $o(e,void 0,n);let p=h._0;return p.length>60?b("span",{children:Nie(p,60),title:p}):$o(e,void 0,n);case"KArrayOfStrings":let m=D(Q(_r(n),g=>ie(g,ue)),[]);return b(mI,{items:m})}else switch(t.TAG){case"KEnum":let h=it(n);return typeof h!="object"||h.TAG!=="JSONString"?$o(e,void 0,n):c4(h._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let p=t._0,m=D(_r(n),[]),g=m.length;if(u.collapsed){let E=m[0];return E!==void 0?f$(p,E,o,a,s,l):b(xf,{count:g,label:"items"})}let v=R(m[0],E=>d$(p,E));return v!==void 0?L("span",{children:[v,g>1?b("span",{children:"+"+(g-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):b(xf,{count:g,label:"items"});case"KNestedObject":let _=t._0;if(u.collapsed)return f$(_,n,o,a,s,l);let x=d$(_,n);if(x!==void 0)return x;let w=D(Q(Y(n),E=>Object.keys(E).length),0);return b(xf,{count:w,label:"fields"})}let f=de(Lc(e,r),!1,h=>h.semantic==="UserRef");return M1(e,t._0,n,o,a,s,l,f?!0:void 0,!0)}function f$(e,t,r,n,i,o){let a=D(Y(t),{}),s=Do(e,"Drill").filter(l=>{let u=l.kind;if(typeof u!="object")return!0;switch(u.TAG){case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}});return b("div",{children:s.map(l=>L("div",{children:[b("span",{children:l.label,style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),b("span",{children:Gl(l.key,l.kind,l.propSchema,O(a,l.key),l.ann,r,n,i,o)})],style:{display:"flex",alignItems:"baseline",gap:"6px"}},l.key)),style:{display:"flex",maxHeight:"120px",overflow:"auto",flexDirection:"column",gap:"2px"}})}function Fie(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}}function Iie(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function h$(e,t,r,n){let i=gs(r,e);if(i===void 0)return n;let o=i.name.endsWith("s");return t?o?i.name:i.name+"s":o?i.name.slice(0,i.name.length-1|0):i.name}function Pie(e,t,r,n,i,o,a,s){return e.map(l=>{let u=l.kind,d;if(typeof u!="object")d=l.label;else switch(u.TAG){case"KEntityId":let h=u._0;d=Um(h,t,a)?l.label:h$(h,!1,t,l.label);break;case"KArrayOfEntityIds":let p=u._0;d=Um(p,t,a)?l.label:h$(p,!0,t,l.label);break;default:d=l.label}let f=de(Lc(l.key,l.propSchema),!1,h=>h.semantic==="Image"?!0:h.semantic==="File");return{key:l.key,label:d,render:h=>{let p=Gl(l.key,l.kind,l.propSchema,n(h,l.key),l.ann,t,r,o,a);return s!==void 0&&f?b(bI.make,{fill:m=>s(h,m),children:p}):p},sortable:Fie(l.kind),width:l.width}})}let d4=cr(void 0),Oie={contents:void 0},Mie=d4.Provider;function Lie(e){return br(Mie,{value:e.execute,children:e.children})}let zie={make:Lie};function xi(){return Pt(d4)}let f4={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function h4(e,t){let r=Y(e),n=R(R(R(r,i=>O(i,"data")),Y),i=>O(i,t));return n!==void 0?n:R(r,i=>O(i,t))}function fE(e,t){let r=h4(e,t),n=R(r,_r);return n!==void 0?n:ie(D(R(R(R(r,Y),i=>O(i,"edges")),_r),[]),i=>R(Y(i),o=>O(o,"node")))}function p4(e,t){return ie(fE(e,t),Y)}function m4(e,t){let r=(i,o)=>D(R(O(i,o),Bx),!1),n=(i,o)=>R(O(i,o),ue);return de(R(R(R(h4(e,t),Y),i=>O(i,"pageInfo")),Y),f4,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function Uie(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function Bie(e,t){return e.hasNextPage?!0:t==="Backward"}function jie(e,t){return e.hasPreviousPage?!0:t==="Forward"}let qie={};function Xh(e,t,r,n){return R(gs(r,t),i=>R(O(e,i.queryField),o=>O(o.labels,n)))}function ev(e,t,r,n){let i=gs(r,t);if(i===void 0)return!1;let o=O(e,i.queryField);return o!==void 0&&o.loaded?Ui(O(o.labels,n)):!1}function Vie(e){let t=it(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return ie(t._0,ue).filter(n=>n!=="");default:return[]}}function Kie(e,t,r){let n={};return t.forEach(i=>{let o=i.kind;if(typeof o!="object")return;switch(o.TAG){case"KEntityId":case"KArrayOfEntityIds":break;default:return}let a=gs(r,o._0);if(a===void 0)return;let s=a.queryField,u={contents:D(O(n,s),[])};e.forEach(d=>{let f=O(d,i.key);if(f!==void 0){Vie(f).forEach(h=>{if(!u.contents.some(p=>p===h)){u.contents.push(h);return}});return}}),n[s]=u.contents}),n}function Hie(e){return Qe(e).toSorted((r,n)=>jf(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(jf).join(",")).join("|")}function Wie(e){try{let t=atob(e),r=t.indexOf(":");return r>0&&r<(t.length-1|0)?t.slice(r+1|0):void 0}catch{return}}function g4(e,t,r){let n={};return p4(e,t).forEach(i=>{let o=R(O(i,"id"),ue),a=D(R(O(i,r),ue),"");if(o===void 0)return;let s=Wie(o),l=r==="id"?s!==void 0?s:o:a===""?o:a;if(n[o]=l,s!==void 0){n[s]=l;return}}),n}function Zh(e,t,r){let n=xi(),i=se(()=>qie),o=i[1],a=Kie(e,t,r),s=Hie(a);return Ae(()=>{let l={contents:!1};return s!==""&&n!==void 0&&Qe(a).forEach(u=>{let d=u[1];if(d.length===0)return;let f=u[0],h=r.find(_=>_.queryField===f);if(h===void 0)return;let p=h.labelField,m=p==="id"?"id":"id "+p,g="query($ids: [ID!]) { "+f+"(first: "+d.length.toString()+", filter: {ids: $ids}) { edges { node { "+m+" } } } }",v={};v.ids=d.map(_=>_),Ut(n(g,v).then(_=>{if(!l.contents){let x=g4(_,f,p);o(w=>{let E=ut(Qe(w));return E[f]={loaded:!0,labels:x},E})}return Promise.resolve()}),_=>(l.contents||(console.warn("[AutoUI] RefLabel batch "+f+" failed; cells fall back to raw ids",_),o(x=>{let w=ut(Qe(x));return w[f]={loaded:!0,labels:{}},w})),Promise.resolve()))}),()=>{l.contents=!0}},[s,n]),i[0]}let cs="table",zs={contents:[]};function Yo(e){zs.contents.some(t=>t.id===e.id)?zs.contents=zs.contents.map(t=>t.id===e.id?e:t):zs.contents=zs.contents.concat([e])}function v4(e){return zs.contents.find(t=>t.id===e)}function Bm(){return zs.contents}function hE(e){let t=Nn(e,void 0,void 0),r=zs.contents.filter(n=>{let i=n.arity;return typeof i!="object"||i.TAG==="Multi"?n.isCapable(e,t):!1});return r.filter(n=>n.id===cs).concat(r.filter(n=>n.id!==cs))}function pE(e){return yK(e.map(t=>t.window))}function Gie(e){return ot(e,0,(t,r)=>t+r.rows.length|0)}function ep(e,t,r){let n=r!==void 0?r:"item";return dI(pE(e),Gie(e),t,n)}function mE(e){try{return xa(localStorage.getItem(e))}catch{return}}function _4(e,t){try{return localStorage.setItem(e,t)}catch{return}}function b4(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+de(r,"",n=>"."+n)}function Ws(e){return"var("+e+")"}let y4=S([z("inlineFlex"),Z("center"),c("border","1px solid var("+y.border+")"),c("border-radius",Ws(X.md)),c("overflow","hidden")]),gE=S([z("inlineFlex"),Z("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","2px var("+F.sm+")"),c("color",Ws(y.textSecondary)),c("font-size",Ws(T.sizeSm)),xe("pointer"),Je([c("background",Ws(y.surfaceSubtle)),c("color",Ws(y.textPrimary))])]),x4=Ir([gE,S([c("background",Ws(y.surfaceSubtle)),c("color",Ws(y.textPrimary)),c("font-weight",Ws(T.weightMedium))])]),Jie={group:y4,btn:gE,btnActive:x4};function Qie(e){let t=e.onSelect,r=e.activeId;return b("div",{children:e.modes.map(n=>L("button",{children:[n.icon,b("span",{children:n.label})],className:n.id===r?x4:gE,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:y4,role:"group"})}let ff={Style:Jie,make:Qie};function Yie(e){let t=e.source,r=Ra(),n=hg(),i=Do(t.schema,"List"),o=t.rows.map((f,h)=>{let p=D(Y(f),{});return{rowKey:D(R(O(p,"id"),ue),"#"+h.toString()),json:f,dict:p}}),a=Zh(o.map(f=>f.dict),i,r),u={lookupLabel:(f,h)=>Xh(a,f,r,h),isMissing:(f,h)=>ev(a,f,r,h)},d=i.map(f=>({key:f.key,label:f.label,render:h=>Gl(f.key,f.kind,f.propSchema,O(h.dict,f.key),f.ann,r,n,u,void 0),sortable:!1,width:f.width}));return b(im,{columns:d,data:o,keyFn:f=>f.rowKey,onRowClick:f=>t.onOpenRow(f.rowKey,f.json)})}let Xie=b("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});Yo({id:cs,label:"Table",icon:Xie,arity:"Single",isCapable:(e,t)=>!0,render:e=>{let t=e[0];return t!==void 0?b(Yie,{source:t}):null},capability:"always — the universal default"});let p$=["resources","events"],m$=["split","full"],g$=["funnel","scatter"],L1={};function oo(e,t){return R(e.views,r=>O(r,t))}function ds(e,t){return R(e.fields,r=>O(r,t))}function go(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function Zi(e,t,r){let n=e[t];if(n===void 0)return;let i=ve.string(n);if(i!==void 0)return i;go(r+"."+t,"expected a string — dropped")}function v$(e,t,r){let n=e[t];if(n===void 0)return;let i=ve.bool(n);if(i!==void 0)return i;go(r+"."+t,"expected a boolean — dropped")}function Zie(e,t,r){let n=e[t];if(n===void 0)return;let i=ve.array(n);if(i!==void 0)return ie(i,ve.string);go(r+"."+t,"expected an array of strings — dropped")}function _$(e,t,r,n){let i=e[t];if(i===void 0)return;let o=ve.object(i);if(o!==void 0){let a={};return Object.entries(o).forEach(s=>{let l=s[0];ae(n(s[1],r+"."+t+'["'+l+'"]'),u=>{a[l]=u})}),a}go(r+"."+t,"expected an object — dropped")}function S4(e,t){let r=ve.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],a=ve.string(i[1]);if(a!==void 0){n[o]=a;return}else return go(t+"."+o,"expected a string — dropped")}),n}go(t,"expected an object of string values — dropped")}function eoe(e,t){let r=ve.object(e);if(r!==void 0){let n=r.transitions;return{mode:Zi(r,"mode",t),layout:Zi(r,"layout",t),canvas:Zi(r,"canvas",t),role:Zi(r,"role",t),resourceRef:Zi(r,"resourceRef",t),accent:Zi(r,"accent",t),audit:v$(r,"audit",t),presence:v$(r,"presence",t),suppress:Zie(r,"suppress",t),transitions:n!==void 0?S4(n,t+".transitions"):void 0}}go(t,"expected an object — dropped")}function toe(e,t){let r=ve.object(e);if(r!==void 0){let n=Zi(r,"view",t);if(n!==void 0)return{view:n,label:Zi(r,"label",t),field:Zi(r,"field",t),aggregate:Zi(r,"aggregate",t),viz:Zi(r,"viz",t),xField:Zi(r,"xField",t)};go(t,"metric without a `view` — dropped");return}go(t,"expected an object — dropped")}function roe(e,t){let r=e!==void 0?e:"ui-hints",n=ve.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let a=ve.array(i);a!==void 0?o=DF(a,(s,l)=>toe(s,r+".dashboard["+l.toString()+"]")):(go(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:_$(n,"views",r,eoe),fields:_$(n,"fields",r,S4),dashboard:o}}return go(r,"expected an object — no hints applied"),L1}function noe(e){let t=ve.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=roe('ui-hints["'+i+'"]',n[1])}),r}return go("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function ioe(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];Ge(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function sc(e){return D(Q(R(R(Y(Tn(e)),t=>O(t,"properties")),Y),t=>Object.keys(t)),[])}function ooe(e,t){return R(R(Q(R(R(R(Y(Tn(e)),r=>O(r,"properties")),Y),r=>O(r,t)),Tn),Y),r=>O(r,"items"))}function U_(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(a=>a.name===n),o=i!==void 0?i.schema:Q(e.stateViewSlices.find(a=>a.name===n),a=>a.schema);return o!==void 0?ot(r.slice(1),{TAG:"Ok",_0:{schema:o}},(a,s)=>{if(a.TAG!=="Ok")return a;let l=a._0.schema,u=ooe(l,s);return u!==void 0?{TAG:"Ok",_0:{schema:u}}:sc(l).includes(s)?de(R(R(R(Y(Tn(l)),d=>O(d,"properties")),Y),d=>O(d,s)),{TAG:"Error",_0:'unresolvable path segment "'+s+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+s+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(a=>a.name).concat(e.stateViewSlices.map(a=>a.name)).join(", ")}}function aoe(e){return e.aggregates.flatMap(t=>t.commands).concat(e.stateChangeSlices.flatMap(t=>t.commands).concat(e.readModels.flatMap(t=>t.commands))).map(t=>t.name)}function E4(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.statusField:R(e.stateViewSlices.find(n=>n.name===t),n=>n.statusField)}function soe(e,t,r){let n=nd(E4(e,t),Nn(r,void 0,void 0).statusField);return n!==void 0?Wo(r,n):[]}function loe(e){return $r(e).filter(t=>is(t[1])).map(t=>t[0])}function b$(e,t){if(v4(e)!==void 0)return;let n=Bm().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function uoe(e,t){let r=[],n=i=>{r.push("[AutoUI] uiHints ("+t.id+"): "+i)};return ae(e.views,i=>{Qe(i).forEach(o=>{let a=o[1],s=o[0],l=U_(t,s);l.TAG!=="Ok"&&n('views["'+s+'"]: '+l._0),ae(a.role,u=>{if(!p$.includes(u))return n('views["'+s+'"].role: unknown role "'+u+'" — expected '+p$.join(" or "));if(u!=="events")return;let d=a.resourceRef;return d!==void 0?l.TAG==="Ok"&&!sc(l._0.schema).includes(d)?n('views["'+s+'"].resourceRef: unknown field "'+d+'"'):void 0:n('views["'+s+'"]: role "events" requires a resourceRef field')}),ae(a.resourceRef,u=>{if(qf(a.role,"events"))return n('views["'+s+'"].resourceRef: only meaningful with role "events"')}),ae(a.transitions,u=>{let d=aoe(t),f=E4(t,s),h;h=l.TAG==="Ok"?f!==void 0?Wo(l._0.schema,f):[]:[],h.length===0&&n('views["'+s+'"].transitions: the view declares no status enum, so no transition can apply'),Qe(u).forEach(p=>{let m=p[1],g=p[0];if(d.includes(m)||n('views["'+s+'"].transitions["'+g+'"]: unknown command "'+m+'" — known commands: '+d.join(", ")),h.length!==0&&!h.includes(g))return n('views["'+s+'"].transitions: unknown target state "'+g+'" — known states: '+h.join(", "))})}),ae(a.mode,u=>ae(b$(u,'views["'+s+'"].mode'),n)),ae(a.layout,u=>{if(!m$.includes(u))return n('views["'+s+'"].layout: unknown layout "'+u+'" — expected '+m$.join(" or "))}),ae(a.suppress,u=>{u.forEach(d=>{if(ae(b$(d,'views["'+s+'"].suppress'),n),d===cs)return n('views["'+s+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),ae(e.fields,i=>{Qe(i).forEach(o=>{let a=o[0],s=U_(t,a);if(s.TAG!=="Ok")return n('fields["'+a+'"]: '+s._0);let l=sc(s._0.schema);Qe(o[1]).forEach(u=>{let d=u[1],f=u[0];if(l.includes(f)||n('fields["'+a+'"]: unknown field "'+f+'"'),Ui(Xx(d)))return n('fields["'+a+'"].'+f+': unknown semantic "'+d+'"')})})}),ae(e.dashboard,i=>{i.forEach(o=>{let a=D(o.aggregate,"count");["count","sum","avg"].includes(a)?a!=="count"&&Ui(o.field)&&n('dashboard metric on "'+o.view+'": aggregate "'+a+'" requires a field'):n('dashboard metric on "'+o.view+'": unknown aggregate "'+a+'" — expected count, sum, or avg');let s=U_(t,o.view);if(s.TAG!=="Ok")return n("dashboard metric: "+s._0);let l=s._0.schema;ae(o.field,u=>{if(!sc(l).includes(u))return n('dashboard metric on "'+o.view+'": unknown field "'+u+'"')}),ae(o.xField,u=>{if(!sc(l).includes(u))return n('dashboard metric on "'+o.view+'": unknown xField "'+u+'"')}),ae(o.viz,u=>{if(!g$.includes(u))return n('dashboard metric on "'+o.view+'": unknown viz "'+u+'" — expected '+g$.join(", "));if(u==="funnel"&&soe(t,o.view,l).length===0)return n('dashboard metric on "'+o.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(u!=="scatter")return;let d=o.field,f=o.xField;if(d!==void 0&&f!==void 0){let h=sc(l),p=loe(l);[["field",d],["xField",f]].forEach(m=>{let g=m[1];if(h.includes(g)&&!p.includes(g))return n('dashboard metric on "'+o.view+'": viz "scatter" '+m[0]+' "'+g+'" is not a numeric field')});return}n('dashboard metric on "'+o.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),r.forEach(i=>{console.error(i)}),r}function w4(e,t){let r=hE(e),n=R(t,i=>i.suppress);return n!==void 0?r.filter(i=>i.id===cs?!0:!n.includes(i.id)):r}function k4(e,t,r,n){let i=l=>R(l,u=>n.find(d=>d.id===u)),o=i(e);if(o!==void 0)return o;let a=i(R(t,l=>l.mode));if(a!==void 0)return a;let s=i(r);return s!==void 0?s:n[0]}function B_(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function coe(e,t,r,n){if(!n)return"Full";let i=R(e,B_);if(i!==void 0)return i;let o=R(R(t,a=>a.layout),B_);return o!==void 0?o:D(R(r,B_),"Full")}function doe(e,t){return D(R(e,r=>r.audit),!1)?!0:t}function foe(e){return D(R(e,t=>t.presence),!1)}function hoe(e){return e.startsWith("https://")?"wss://"+e.slice(8):e.startsWith("http://")?"ws://"+e.slice(7):e.startsWith("/")?(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:e}let poe="/ui-hints.json";function moe(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function goe(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function voe(e){let t=ve.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=s=>R(t[s],ve.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=D(r("platformApiEndpoint"),n),o=s=>R(t[s],ve.bool),a=s=>D(Q(R(t[s],ve.object),l=>Object.fromEntries(ie(Object.entries(l),u=>{let d=u[0];return Q(ve.string(u[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),hoe(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),clientEventsNamespace:r("clientEventsNamespace"),liveUpdates:D(o("liveUpdates"),!0),liveReconnectRefetch:D(o("liveReconnectRefetch"),!0),region:r("region"),authMode:D(Q(r("authMode"),goe),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:D(o("autoRedirectFirstPage"),!1),mode:D(Q(r("mode"),moe),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:ie(D(R(t.accessTiers,ve.array),[]),ve.string),viewModes:ie(D(R(t.viewModes,ve.array),[]),ve.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),assetOrigins:a("assetOrigins"),uiHintsUrl:D(r("uiHintsUrl"),poe)}}}function _oe(e){return Ut(fetch(e).then(t=>t.ok?t.json().then(noe):(console.warn("[AutoUI] "+e+": not loaded (status "+t.status.toString()+") — no UI hints applied"),Promise.resolve({}))),t=>(console.warn("[AutoUI] "+e+": not loaded ("+String(t)+") — no UI hints applied"),Promise.resolve({})))}function boe(){return Ut(fetch("/config.json").then(e=>e.ok?e.json().then(voe):Promise.resolve({TAG:"Error",_0:"config.json: fetch failed with status "+e.status.toString()})),e=>Promise.resolve({TAG:"Error",_0:"config.json: fetch threw — "+String(e)}))}function jm(e){return D(R(R(ve.object(e),t=>t.errors),ve.array),[]).some(t=>D(Q(R(R(R(R(ve.object(t),r=>r.extensions),ve.object),r=>r.code),ve.string),r=>r==="UNAUTHORIZED"),!1))}function yoe(e,t,r,n){return(i,o)=>{let a=i.includes("Platform")||i.includes("platform")?t:e,s=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(s.Authorization="Bearer "+l),fetch(a,{method:"POST",headers:s,body:D(JSON.stringify({query:i,variables:o}),"")}).then(u=>(u.status===401&&n(),u.json())).then(u=>(jm(u)&&n(),Promise.resolve(D(R(ve.object(u),d=>d.data),null))))}}class hf extends Error{}hf.prototype.name="InvalidTokenError";function xoe(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Soe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return xoe(t)}catch{return atob(t)}}function Eoe(e,t){if(typeof e!="string")throw new hf("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new hf(`Invalid token specified: missing part #${r+1}`);let i;try{i=Soe(n)}catch(o){throw new hf(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new hf(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let woe=(function(e){return e&&e.name?String(e.name):"UnknownError"}),koe=(function(e){return e&&e.message?String(e.message):""});function vE(e){return{name:woe(e),message:koe(e)}}function _E(e){switch(e.name){case"PasswordResetRequiredException":return"Password reset required — contact your administrator";case"LimitExceededException":case"TooManyRequestsException":return"Too many attempts — please wait a moment and try again";case"UserNotConfirmedException":return"Account not confirmed — check your email";case"NotAuthorizedException":case"UserNotFoundException":return"Incorrect username or password";default:return"Sign-in failed. Please try again."}}const Coe=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),Roe=e=>({httpHandler:e.httpHandler()});var _h;(function(e){e.HTTP="http",e.HTTPS="https"})(_h||(_h={}));var bh;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(bh||(bh={}));const z1="__smithy_context";class Vi{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const r=new Vi({...t,headers:{...t.headers}});return r.query&&(r.query=Aoe(r.query)),r}static isInstance(t){if(!t)return!1;const r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return Vi.clone(this)}}function Aoe(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class Qc{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const $oe=e=>t=>async r=>{if(!Vi.isInstance(r.request))return t(r);const{request:n}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return t(r)},Toe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Noe=e=>({applyToStack:t=>{t.add($oe(e),Toe)}}),Doe=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=s,d=l??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return a?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l}=s,u=l??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:o,input:u(r.input),error:n,metadata:n.$metadata}),n}},Foe={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ioe=e=>({applyToStack:t=>{t.add(Doe(),Foe)}}),Poe={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Ooe=()=>e=>async t=>e(t),Moe=e=>({applyToStack:t=>{t.add(Ooe(),Poe)}}),kd=e=>e[z1]||(e[z1]={}),ts=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Loe=(e,t)=>{if(!t||t.length===0)return e;const r=[];for(const n of t)for(const i of e)i.schemeId.split("#")[1]===n&&r.push(i);for(const n of e)r.find(({schemeId:i})=>i===n.schemeId)||r.push(n);return r};function zoe(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const Uoe=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),a=e.authSchemePreference?await e.authSchemePreference():[],s=Loe(o,a),l=zoe(e.httpAuthSchemes),u=kd(n),d=[];for(const f of s){const h=l.get(f.schemeId);if(!h){d.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const p=h.identityProvider(await t.identityProviderConfigProvider(e));if(!p){d.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},m),f.signingProperties=Object.assign(f.signingProperties||{},g),u.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(d.join(`
|
|
42
|
+
`));return r(i)},Boe={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},joe=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Uoe(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),Boe)}}),qoe=e=>t=>{throw t},Voe=(e,t)=>{},Koe=e=>(t,r)=>async n=>{if(!Vi.isInstance(n.request))return t(n);const o=kd(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:s,signer:l}=o,u=await t({...n,request:await l.sign(n.request,s,a)}).catch((l.errorHandler||qoe)(a));return(l.successHandler||Voe)(u.response,a),u},Hoe={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Woe=e=>({applyToStack:t=>{t.addRelativeTo(Koe(),Hoe)}}),$f=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},C4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y$=Object.entries(C4).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),Goe=C4.split(""),Nc=6,Tf=8,Joe=63,tv=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let i=0;i<e.length;i+=4){let o=0,a=0;for(let u=i,d=i+3;u<=d;u++)if(e[u]!=="="){if(!(e[u]in y$))throw new TypeError(`Invalid character ${e[u]} in base64 string.`);o|=y$[e[u]]<<(d-u)*Nc,a+=Nc}else o>>=Nc;const s=i/4*3;o>>=a%Tf;const l=Math.floor(a/Tf);for(let u=0;u<l;u++){const d=(l-u-1)*Tf;n.setUint8(s+u,(o&255<<d)>>d)}}return new Uint8Array(r)},Yc=e=>new TextEncoder().encode(e),yh=e=>typeof e=="string"?Yc(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),bE=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function qm(e){let t;typeof e=="string"?t=Yc(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let o=0;o<t.length;o+=3){let a=0,s=0;for(let u=o,d=Math.min(o+3,t.length);u<d;u++)a|=t[u]<<(d-u-1)*Tf,s+=Tf;const l=Math.ceil(s/Nc);a<<=l*Nc-s;for(let u=1;u<=l;u++){const d=(l-u)*Nc;i+=Goe[(a&Joe<<d)>>d]}i+="==".slice(0,4-l)}return i}class Jl extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?Jl.mutate(tv(t)):Jl.mutate(Yc(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Jl.prototype),t}transformToString(t="utf-8"){return t==="base64"?qm(this):bE(this)}}const Ql=e=>encodeURIComponent(e).replace(/[!'()*]/g,Qoe),Qoe=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Yoe(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=Ql(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${Ql(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${Ql(n)}`),t.push(i)}}return t.join("&")}function x$(e,t){return new Request(e,t)}function Xoe(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}const j_={supported:void 0};class yE{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new yE(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),j_.supported===void 0&&(j_.supported=typeof Request<"u"&&"keepalive"in x$("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(r?.aborted){const x=S$(r);return Promise.reject(x)}let s=t.path;const l=Yoe(t.query||{});l&&(s+=`?${l}`),t.fragment&&(s+=`#${t.fragment}`);let u="";if(t.username!=null||t.password!=null){const x=t.username??"",w=t.password??"";u=`${x}:${w}@`}const{port:d,method:f}=t,h=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${s}`,p=f==="GET"||f==="HEAD"?void 0:t.body,m={body:p,headers:new Headers(t.headers),method:f,credentials:a};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),typeof AbortController<"u"&&(m.signal=r),j_.supported&&(m.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(m,this.config.requestInit(t));let g=()=>{};const v=x$(h,m),_=[fetch(v).then(x=>{const w=x.headers,E={};for(const k of w.entries())E[k[0]]=k[1];return x.body!=null?{response:new Qc({headers:E,reason:x.statusText,statusCode:x.status,body:x.body})}:x.blob().then(k=>({response:new Qc({headers:E,reason:x.statusText,statusCode:x.status,body:k})}))}),Xoe(i)];return r&&_.push(new Promise((x,w)=>{const E=()=>{const C=S$(r);w(C)};if(typeof r.addEventListener=="function"){const C=r;C.addEventListener("abort",E,{once:!0}),g=()=>C.removeEventListener("abort",E)}else r.onabort=E})),Promise.race(_).finally(g)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function S$(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=t,i}const n=new Error(String(t));return n.name="AbortError",n}const r=new Error("Request aborted");return r.name="AbortError",r}const Zoe=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):eae(e):tae(e);async function eae(e){const t=await rae(e),r=tv(t);return new Uint8Array(r)}async function tae(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:s,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=s}const o=new Uint8Array(i);let a=0;for(const s of t)o.set(s,a),a+=s.length;return o}function rae(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const R4={},U1={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),R4[e]=t,U1[t]=e}function nae(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in U1)t[r/2]=U1[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function Yl(e){let t="";for(let r=0;r<e.byteLength;r++)t+=R4[e[r]];return t}const B1=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Jl.mutate(e);if(!e)return Jl.mutate(new Uint8Array);const r=t.streamCollector(e);return Jl.mutate(await r)},V0=e=>typeof e=="function"?e():e,A4=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),iae=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=kd(r),[,a,s,l,u,d]=o??[];try{const f=await e.protocol.deserializeResponse(A4(a,s,l,u,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
|
|
43
|
+
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof f.$responseBodyText<"u"&&f.$response&&(f.$response.body=f.$responseBodyText);try{if(Qc.isInstance(i)){const{headers:p={}}=i,m=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:q_(/^x-[\w-]+-request-?id$/,m),extendedRequestId:q_(/^x-[\w-]+-id-2$/,m),cfId:q_(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw f}},q_=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function oae(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in t?Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i}return t}const Xc=e=>{if(typeof e=="string")return Xc(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let a;return o&&(a=oae(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:a}},aae=e=>{if(typeof e=="object"){if("url"in e){const t=Xc(e.url);if(e.headers){t.headers={};for(const r in e.headers)t.headers[r.toLowerCase()]=e.headers[r].join(", ")}return t}return e}return Xc(e)},sae=e=>(t,r)=>async n=>{const{operationSchema:i}=kd(r),[,o,a,s,l,u]=i??[],d=r.endpointV2?async()=>aae(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(A4(o,a,s,l,u),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},lae={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},uae={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function cae(e){return{applyToStack:t=>{t.add(sae(e),uae),t.add(iae(e),lae),e.protocol.setSerdeContext(e)}}}const V_=[];function pf(e){if(typeof e=="object")return e;if(e=e|0,V_[e])return V_[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return V_[e]=t}const Gd={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},K_=[],H_={};class pn{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=pn.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const n=[];let i=t,o=t;for(this._isMemberSchema=!1;W_(i);)n.push(i[1]),i=i[0],o=V0(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){const s=n[a];Object.assign(this.memberTraits,pf(s))}}else this.memberTraits=0;if(o instanceof pn){const a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=V0(o),dae(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){const r=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(K_[t])return K_[t]}else if(typeof t=="string"){if(H_[t])return H_[t]}else if(r&&t[Gd.ns])return t[Gd.ns];const n=V0(t);if(n instanceof pn)return n;if(W_(n)){const[o,a]=n;if(o instanceof pn)return Object.assign(o.getMergedTraits(),pf(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new pn(n);return r?t[Gd.ns]=i:typeof n=="string"?H_[n]=i:typeof n=="number"?K_[n]=i:i}getSchema(){const t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){const{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const t=this.getSchema();if(typeof t!="object")return!1;const r=t[0];return r===3||r===-3||r===4}isUnionSchema(){const t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return pf(this.memberTraits)}getOwnTraits(){return pf(this.traits)}getKeySchema(){const[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema(),i=t?15:n[4]??0;return Jd([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],o=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||i)?t[3+t[0]]:r?15:void 0;if(o!=null)return Jd([o,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){const n=r[4].indexOf(t),i=r[5][n];return Jd(W_(i)?i:[i,0],t)}if(this.isDocumentSchema())return Jd([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[r,n]of this.structIterator())t[r]=n}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),r=t[4].length;let n=t[Gd.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],a=Jd([t[5][i],0],o);yield n[i]=[o,a]}t[Gd.it]=n}}function Jd(e,t){if(e instanceof pn)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=pn;return new r(e,t)}const W_=e=>Array.isArray(e)&&e.length===2,dae=e=>Array.isArray(e)&&e.length>=5;class $i{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,n=new Map){this.namespace=t,this.schemas=r,this.exceptions=n}static for(t){return $i.registries.has(t)||$i.registries.set(t,new $i(t)),$i.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:n}=this;for(const[i,o]of t.schemas)r.has(i)||r.set(i,o);for(const[i,o]of t.exceptions)n.has(i)||n.set(i,o)}register(t,r){const n=this.normalizeShapeId(t);for(const i of[this,$i.for(n.split("#")[0])])i.schemas.set(n,r)}getSchema(t){const r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){const n=t,i=n[1];for(const o of[this,$i.for(i)])o.schemas.set(i+"#"+n[2],n),o.exceptions.set(n,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):$i.for(r[1]).exceptions.get(r)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,r,n]=t,i=r+"#"+n;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){for(const r of this.schemas.values())if(t(r))return r}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const j1=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&yae.warn(bae(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},fae=Math.ceil(2**127*(2-2**-23)),E$=e=>{const t=j1(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>fae)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},hae=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},w$=e=>$4(e,16),k$=e=>$4(e,8),$4=(e,t)=>{const r=hae(e);if(r!==void 0&&pae(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},pae=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},mae=e=>j1(typeof e=="string"?rv(e):e),gae=e=>E$(typeof e=="string"?rv(e):e),vae=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,rv=e=>{const t=e.match(vae);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},Vm=e=>w$(typeof e=="string"?rv(e):e),_ae=e=>k$(typeof e=="string"?rv(e):e),bae=e=>String(new TypeError(e).stack||e).split(`
|
|
44
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
45
|
+
`),yae={warn:console.warn},xae=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],xE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Sae(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,f=s<10?`0${s}`:`${s}`;return`${xae[n]}, ${l} ${xE[r]} ${t} ${u}:${d}:${f} GMT`}const Eae=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),wae=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Eae.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,a,s,l,u,d]=t,f=Vm(xh(n)),h=nl(i,"month",1,12),p=nl(o,"day",1,31),m=K0(f,h,p,{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&m.setTime(m.getTime()-Oae(d)),m},kae=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Cae=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Rae=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),T4=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=kae.exec(e);if(t){const[r,n,i,o,a,s,l,u]=t;return K0(Vm(xh(o)),G_(i),nl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u})}if(t=Cae.exec(e),t){const[r,n,i,o,a,s,l,u]=t;return Nae(K0($ae(o),G_(i),nl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u}))}if(t=Rae.exec(e),t){const[r,n,i,o,a,s,l,u]=t;return K0(Vm(xh(u)),G_(n),nl(i.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},Aae=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=mae(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},K0=(e,t,r,n)=>{const i=t-1;return Fae(e,i,r),new Date(Date.UTC(e,i,r,nl(n.hours,"hour",0,23),nl(n.minutes,"minute",0,59),nl(n.seconds,"seconds",0,60),Pae(n.fractionalMilliseconds)))},$ae=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Vm(xh(e));return r<t?r+100:r},Tae=50*365*24*60*60*1e3,Nae=e=>e.getTime()-new Date().getTime()>Tae?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,G_=e=>{const t=xE.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Dae=[31,28,31,30,31,30,31,31,30,31,30,31],Fae=(e,t,r)=>{let n=Dae[t];if(t===1&&Iae(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${xE[t]} in ${e}: ${r}`)},Iae=e=>e%4===0&&(e%100!==0||e%400===0),nl=(e,t,r,n)=>{const i=_ae(xh(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},Pae=e=>e==null?0:gae("0."+e)*1e3,Oae=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(n*60+i)*60*1e3},xh=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},C$=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),N4=()=>{if(C$)return C$();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Pn[e[0]]+Pn[e[1]]+Pn[e[2]]+Pn[e[3]]+"-"+Pn[e[4]]+Pn[e[5]]+"-"+Pn[e[6]]+Pn[e[7]]+"-"+Pn[e[8]]+Pn[e[9]]+"-"+Pn[e[10]]+Pn[e[11]]+Pn[e[12]]+Pn[e[13]]+Pn[e[14]]+Pn[e[15]]},Gs=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Gs.from=e=>e&&typeof e=="object"&&(e instanceof Gs||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Gs(String(e)):Gs(JSON.stringify(e));Gs.fromObject=Gs.from;const R$=/^-?\d*(\.\d+)?$/;class ga{string;type;constructor(t,r){if(this.string=t,this.type=r,!R$.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return ga.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&R$.test(r.string)}}class Mae{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Lae extends Mae{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=$i.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Vi}getResponseType(){return Qc}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[n,i]of r.url.searchParams.entries())t.query[n]=i;if(r.headers)for(const n in r.headers)t.headers[n]=r.headers[n].join(", ");return t}else{if(t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},r.headers)for(const n in r.headers)t.headers[n]=r.headers[n];return t}}setHostPrefix(t,r,n){if(this.serdeContext?.disableHostPrefix)return;const i=pn.of(r.input),o=pf(r.traits??{});if(o.endpoint){let a=o.endpoint?.[0];if(typeof a=="string"){for(const[s,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const u=n[s];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${s} in input must be a string as hostLabel.`);a=a.replace(`{${s}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await $0(async()=>{const{EventStreamSerde:r}=await import("./index-8UJpqCwV.js");return{EventStreamSerde:r}},__vite__mapDeps([3]));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,n,i,o){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class zae extends Lae{async serializeRequest(t,r,n){const i=this.serializer,o={},a={},s=await n.endpoint(),l=pn.of(t?.input),u=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new Vi({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:a,body:void 0});if(s&&(this.updateServiceEndpoint(h,s),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const m={};for(const[g,v]of l.structIterator())g!==p&&f[g]&&(i.write(v,f[g]),m[g]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:m})}}else i.write(u,f),d=i.flush()}return h.headers=Object.assign(h.headers,a),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=pn.of(t.output),a={};if(n.statusCode>=300){const l=await B1(n.body,r);throw l.byteLength>0&&Object.assign(a,await i.read(15,l)),await this.handleError(t,r,n,a,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const u=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=u}const s=o.getEventStreamMember();if(s)a[s]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:a});else{const l=await B1(n.body,r);l.byteLength>0&&Object.assign(a,await i.read(o,l))}return a.$metadata=this.deserializeMetadata(n),a}}function D4(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:i,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||i?6:o||r?5:void 0:void 0)??t.timestampFormat.default}function Uae(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class Bae{authSchemes=new Map;constructor(t){for(const r in t){const n=t[r];n!==void 0&&this.authSchemes.set(r,n)}}getIdentityProvider(t){return this.authSchemes.get(t)}}class jae{async sign(t,r,n){return t}}const qae=e=>function(r){return F4(r)&&r.expiration.getTime()-Date.now()<e},Vae=3e5,Kae=qae(Vae),F4=e=>e.expiration!==void 0,Hae=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,a,s=!1;const l=async u=>{o||(o=n(u));try{i=await o,a=!0,s=!1}finally{o=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await l(u)),s?i:r(i)?(t(i)&&await l(u),i):(s=!0,i))},Wae=void 0;function Gae(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Jae(e){const t=$f(e.userAgentAppId??Wae),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!Gae(n)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?i?.warn("userAgentAppId must be a string or undefined."):n.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class SE{nodes;root;conditions;results;constructor(t,r,n,i){this.nodes=t,this.root=r,this.conditions=n,this.results=i}static from(t,r,n,i){return new SE(t,r,n,i)}}class Qae{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let o=0;for(;;){const{value:a,done:s}=i.next();if(this.data.delete(a),s||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const o=String(t[i]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}class Vo extends Error{constructor(t){super(t),this.name="EndpointError"}}const Yae="endpoints";function Km(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Km(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Km).join(", ")})`:JSON.stringify(e,null,2)}const EE={},Xae=(e,t)=>e===t;function Zae(...e){for(const t of e)if(t!=null)return t}const ese=e=>{const t=e.split("."),r=[];for(const n of t){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new Vo(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new Vo(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},I4=(e,t)=>ese(t).reduce((r,n)=>{if(typeof r!="object")throw new Vo(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(r)){const i=parseInt(n);return r[i<0?r.length+i:i]}return r[n]},e),tse=e=>e!=null,rse=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),nv=(e,t=!1)=>{if(!t)return rse.test(e);const r=e.split(".");for(const n of r)if(!nv(n))return!1;return!0};function nse(e,t,r){return e?t:r}const ise=e=>!e,ose=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),P4=e=>ose.test(e)||e.startsWith("[")&&e.endsWith("]"),J_={[_h.HTTP]:80,[_h.HTTPS]:443},ase=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:m="",path:g="",query:v={}}=e,_=new URL(`${m}//${h}${p?`:${p}`:""}${g}`);return _.search=Object.entries(v).map(([x,w])=>`${x}=${w}`).join("&"),_}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:s}=t;if(s)return null;const l=a.slice(0,-1);if(!Object.values(_h).includes(l))return null;const u=P4(i),d=r.includes(`${n}:${J_[l]}`)||typeof e=="string"&&e.includes(`${n}:${J_[l]}`),f=`${n}${d?`:${J_[l]}`:""}`;return{scheme:l,authority:f,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}};function sse(e,t,r){if(r===1)return[e];if(e==="")return[""];const n=e.split(t);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(t))}const lse=(e,t)=>e===t,use=(e,t,r,n)=>e==null||t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),cse=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),dse={booleanEquals:Xae,coalesce:Zae,getAttr:I4,isSet:tse,isValidHostLabel:nv,ite:nse,not:ise,parseURL:ase,split:sse,stringEquals:lse,substring:use,uriEncode:cse},O4=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const a=e.indexOf("{",o);if(a===-1){r.push(e.slice(o));break}r.push(e.slice(o,a));const s=e.indexOf("}",a);if(s===-1){r.push(e.slice(a));break}e[a+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(a+1,s)),o=s+2);const l=e.substring(a+1,s);if(l.includes("#")){const[u,d]=l.split("#");r.push(I4(n[u]??i[u],d))}else r.push(n[l]??i[l]);o=s+1}return r.join("")},fse=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],iv=(e,t,r)=>{if(typeof e=="string")return O4(e,r);if(e.fn)return L4.callFunction(e,r);if(e.ref)return fse(e,r);throw new Vo(`'${t}': ${String(e)} is not a string, function or reference.`)},M4=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let a=0;a<n.length;++a){const s=t[a];typeof s=="boolean"||typeof s=="number"?n[a]=s:n[a]=L4.evaluateExpression(s,"arg",r)}const i=e.indexOf(".");if(i!==-1){const s=EE[e.slice(0,i)]?.[e.slice(i+1)];if(typeof s=="function")return s(...n)}const o=dse[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},L4={evaluateExpression:iv,callFunction:M4},hse=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new Vo(`'${r}' is already defined in Reference Record.`);const n=M4(e,t);t.logger?.debug?.(`${Yae} evaluateCondition: ${Km(e)} = ${Km(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},pse=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const a=iv(o,"Header value entry",t);if(typeof a!="string")throw new Vo(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),z4=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=B4.getEndpointProperty(i,t),r),{}),U4=(e,t)=>{if(Array.isArray(e))return e.map(r=>U4(r,t));switch(typeof e){case"string":return O4(e,t);case"object":if(e===null)throw new Vo(`Unexpected endpoint property: ${e}`);return B4.getEndpointProperties(e,t);case"boolean":return e;default:throw new Vo(`Unexpected endpoint property type: ${typeof e}`)}},B4={getEndpointProperty:U4,getEndpointProperties:z4},mse=(e,t)=>{const r=iv(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new Vo(`Endpoint URL must be a string, got ${typeof r}`)},Q_=1e8,gse=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let a=n;const s={},l={referenceRecord:s,endpointParams:t.endpointParams,logger:t.logger};for(;a!==1&&a!==-1&&a<Q_;){const u=3*(Math.abs(a)-1),[d,f,h]=[r[u],r[u+1],r[u+2]],[p,m,g]=o[d],v=hse({fn:p,assign:g,argv:m},l);if(v.toAssign){const{name:_,value:x}=v.toAssign;s[_]=x}a=a>=0===v.result?f:h}if(a>=Q_){const u=i[a-Q_];if(u[0]===-1){const[,p]=u;throw new Vo(iv(p,"Error",l))}const[d,f,h]=u;return{url:mse(d,l),properties:z4(f,l),headers:pse(h??{},l)}}throw new Vo("No matching endpoint.")},j4=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!j4(r))return!1;return!0}return!(!nv(e)||e.length<3||e.length>63||e!==e.toLowerCase()||P4(e))},A$=":",vse="/",_se=e=>{const t=e.split(A$);if(t.length<6)return null;const[r,n,i,o,a,...s]=t;if(r!=="arn"||n===""||i===""||s.join(A$)==="")return null;const l=s.map(u=>u.split(vse)).flat();return{partition:n,service:i,region:o,accountId:a,resourceId:l}},bse=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],yse={partitions:bse};let xse=yse;const Sse=e=>{const{partitions:t}=xse;for(const n of t){const{regions:i,outputs:o}=n;for(const[a,s]of Object.entries(i))if(a===e)return{...o,...s}}for(const n of t){const{regionRegex:i,outputs:o}=n;if(new RegExp(i).test(e))return{...o}}const r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},q4={isVirtualHostableS3Bucket:j4,parseArn:_se,partition:Sse};EE.aws=q4;function Ese(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function za(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}var fl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(fl||(fl={}));const Nf=3,wse=fl.STANDARD,kse=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Cse=["TimeoutError","RequestTimeout","RequestTimeoutException"],Rse=[500,502,503,504],Ase=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],$se=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Tse=e=>e?.$retryable!==void 0,Nse=e=>e.$metadata?.clockSkewCorrected,Dse=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},V4=e=>e.$metadata?.httpStatusCode===429||kse.includes(e.name)||e.$retryable?.throttling==!0,wE=(e,t=0)=>Tse(e)||Nse(e)||Cse.includes(e.name)||Ase.includes(e?.code||"")||$se.includes(e?.code||"")||Rse.includes(e.$metadata?.httpStatusCode||0)||Dse(e)||Ise(e)||e.cause!==void 0&&t<=10&&wE(e.cause,t+1),Fse=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!wE(e)}return!1};function Ise(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class kE{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(t){let r;this.updateMeasuredRate();const n=t;if(n?.errorType==="THROTTLING"||V4(n?.error??t)){const a=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=a,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(a),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){const r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>kE.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=t}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const K4=20*1e3,$$=500,Pse=1,Ose="amz-sdk-invocation-id",Mse="amz-sdk-request";var Lse={};class Hn{static v2026=typeof process<"u"&&Lse?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Hn.v2026?50:100}static throttlingDelay(){return Hn.v2026?1e3:500}static cost(){return Hn.v2026?14:5}static throttlingCost(){return Hn.v2026?5:10}static modifiedCostType(){return Hn.v2026?"THROTTLING":"TRANSIENT"}}class zse{x=Hn.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,K4);return Math.floor(i)}setDelayBase(t){this.x=t}}class T${delay;count;cost;longPoll;constructor(t,r,n,i){this.delay=t,this.count=r,this.cost=n,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(K4,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class q1{mode=fl.STANDARD;capacity=$$;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(t){typeof t=="number"?this.maxAttemptsProvider=async()=>t:typeof t=="function"?this.maxAttemptsProvider=t:t&&typeof t=="object"&&(this.maxAttemptsProvider=async()=>t.maxAttempts,this.baseDelay=t.baseDelay,this.retryBackoffStrategy=t.backoff),this.maxAttemptsProvider??=async()=>Nf,this.baseDelay??=Hn.delay(),this.retryBackoffStrategy??=new zse}async acquireInitialRetryToken(t){return new T$(Hn.delay(),0,void 0,Hn.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,r){const n=await this.getMaxAttempts(),i=this.shouldRetry(t,r,n);if(i||t.isLongPoll?.()){const o=r.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?Hn.throttlingDelay():this.baseDelay);const a=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let s=a;if(r.retryAfterHint instanceof Date&&(s=Math.max(a,Math.min(r.retryAfterHint.getTime()-Date.now(),a+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new T$(s,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:Hn.v2026?s:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min($$,this.capacity+(t.getRetryCost()??Pse))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Nf}`),Nf}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===Hn.modifiedCostType()?Hn.throttlingCost():Hn.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class Use{mode=fl.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new kE,this.standardRetryStrategy=r?new q1({maxAttempts:typeof t=="number"?t:3,...r}):new q1(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}const Bse=/\d{12}\.ddb/;async function jse(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&za(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();if(typeof o.mode=="string")switch(o.mode){case fl.ADAPTIVE:za(e,"RETRY_MODE_ADAPTIVE","F");break;case fl.STANDARD:za(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Bse)&&za(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":za(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":za(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":za(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&za(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,s]of Object.entries(o.$source??{}))za(e,a,s)}}const N$="user-agent",Y_="x-amz-user-agent",D$=" ",X_="/",qse=/[^!$%&'*+\-.^_`|~\w]/g,Vse=/[^!$%&'*+\-.^_`|~\w#]/g,F$="-",Kse=1024;function Hse(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Kse){t.length?t+=","+n:t+=n;continue}break}return t}const Wse=e=>(t,r)=>async n=>{const{request:i}=n;if(!Vi.isInstance(i))return t(n);const{headers:o}=i,a=r?.userAgent?.map(Hp)||[],s=(await e.defaultUserAgentProvider()).map(Hp);await jse(r,e,n);const l=r;s.push(`m/${Hse(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Hp)||[],d=await e.userAgentAppId();d&&s.push(Hp(["app",`${d}`]));const f=[].concat([...s,...a,...u]).join(D$),h=[...s.filter(p=>p.startsWith("aws-sdk-")),...u].join(D$);return e.runtime!=="browser"?(h&&(o[Y_]=o[Y_]?`${o[N$]} ${h}`:h),o[N$]=f):o[Y_]=f,t({...n,request:i})},Hp=e=>{const t=e[0].split(X_).map(a=>a.replace(qse,F$)).join(X_),r=e[1]?.replace(Vse,F$),n=t.indexOf(X_),i=t.substring(0,n);let o=t.substring(n+1);return i==="api"&&(o=o.toLowerCase()),[i,o,r].filter(a=>a&&a.length>0).reduce((a,s,l)=>{switch(l){case 0:return s;case 1:return`${a}/${s}`;default:return`${a}#${s}`}},"")},Gse={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Jse=e=>({applyToStack:t=>{t.add(Wse(e),Gse)}}),Qse=!1,Yse=!1,I$=new Set,Xse=(e,t=nv)=>{if(!I$.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else I$.add(e)},H4=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Zse=e=>H4(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,ele=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const n=typeof t=="function"?await t():t,i=Zse(n);return Xse(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return H4(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},P$="content-length";function tle(e){return t=>async r=>{const n=r.request;if(Vi.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(a=>a.toLowerCase()).indexOf(P$)===-1)try{const a=e(i);n.headers={...n.headers,[P$]:String(a)}}catch{}}return t({...r,request:n})}}const rle={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},nle=e=>({applyToStack:t=>{t.add(tle(e.bodyLengthChecker),rle)}}),ile=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),ule(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!lle(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},ole=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,ale=/(\d+\.){3}\d+/,sle=/\.\./,lle=e=>ole.test(e)&&!ale.test(e)&&!sle.test(e),ule=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,a=!!(o&&r&&n&&i);if(o&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},cle=(e,t,r,n=!1)=>{const i=async()=>{let o;return n?o=r.clientContextParams?.[e]??r[e]??r[t]:o=r[e]??r[t],typeof o=="function"?o():o};return e==="credentialScope"||t==="CredentialScope"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const o=await i();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){const{protocol:a,hostname:s,port:l,path:u}=o;return`${a}//${s}${l?":"+l:""}${u}`}}return o}:i},W4=async e=>{},G4=e=>{if(typeof e=="object"){if("url"in e){const t=Xc(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return Xc(e)},dle=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await W4(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(G4(a)),r.isCustomEndpoint=!0)}const i=await fle(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const a=await r.endpoint();if(a?.headers){o.headers??={};for(const[s,l]of Object.entries(a.headers))o.headers[s]=Array.isArray(l)?l:[l]}}return o},fle=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=e[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await cle(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await ile(n),n},hle=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&Uae(n,"ENDPOINT_OVERRIDE","N");const o=await dle(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const a=n.authSchemes?.[0];if(a){n.signing_region=a.signingRegion,n.signing_service=a.signingName;const l=kd(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},ple={name:"serializerMiddleware"},mle={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ple.name},gle=(e,t)=>({applyToStack:r=>{r.addRelativeTo(hle({config:e,instructions:t}),mle)}}),vle=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>G4(await ts(r)()):void 0,s=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ts(n??!1),useFipsEndpoint:ts(i??!1)});let l;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=W4(e.serviceId)),l),s},_le=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),ble=e=>{const{retryStrategy:t,retryMode:r}=e,n=ts(e.maxAttempts??Nf);let i=t?Promise.resolve(t):void 0;const o=async()=>await ts(r)()===fl.ADAPTIVE?new Use(n):new q1(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},$l=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},Ts=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Hm=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>O$[p.step]-O$[h.step]||M$[p.priority||"normal"]-M$[h.priority||"normal"]),o=f=>{let h=!1;const p=m=>{const g=$l(m.name,m.aliases);if(g.includes(f)){h=!0;for(const v of g)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=f=>{let h=!1;const p=m=>{if(m.middleware===f){h=!0;for(const g of $l(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>(e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),l=f=>{const h=[];return f.before.forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h.push(f),f.after.reverse().forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h},u=(f=!1)=>{const h=[],p=[],m={};return e.forEach(v=>{const _={...v,before:[],after:[]};for(const x of $l(_.name,_.aliases))m[x]=_;h.push(_)}),t.forEach(v=>{const _={...v,before:[],after:[]};for(const x of $l(_.name,_.aliases))m[x]=_;p.push(_)}),p.forEach(v=>{if(v.toMiddleware){const _=m[v.toMiddleware];if(_===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${Ts(v.name,v.aliases)} middleware ${v.relation} ${v.toMiddleware}`)}v.relation==="after"&&_.after.push(v),v.relation==="before"&&_.before.push(v)}}),i(h).map(l).reduce((v,_)=>(v.push(..._),v),[])},d={add:(f,h={})=>{const{name:p,override:m,aliases:g}=h,v={step:"initialize",priority:"normal",middleware:f,...h},_=$l(p,g);if(_.length>0){if(_.some(x=>n.has(x))){if(!m)throw new Error(`Duplicate middleware name '${Ts(p,g)}'`);for(const x of _){const w=e.findIndex(C=>C.name===x||C.aliases?.some(k=>k===x));if(w===-1)continue;const E=e[w];if(E.step!==v.step||v.priority!==E.priority)throw new Error(`"${Ts(E.name,E.aliases)}" middleware with ${E.priority} priority in ${E.step} step cannot be overridden by "${Ts(p,g)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(w,1)}}for(const x of _)n.add(x)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:m,aliases:g}=h,v={middleware:f,...h},_=$l(p,g);if(_.length>0){if(_.some(x=>n.has(x))){if(!m)throw new Error(`Duplicate middleware name '${Ts(p,g)}'`);for(const x of _){const w=t.findIndex(C=>C.name===x||C.aliases?.some(k=>k===x));if(w===-1)continue;const E=t[w];if(E.toMiddleware!==v.toMiddleware||E.relation!==v.relation)throw new Error(`"${Ts(E.name,E.aliases)}" middleware ${E.relation} "${E.toMiddleware}" middleware cannot be overridden by "${Ts(p,g)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(w,1)}}for(const x of _)n.add(x)}t.push(v)},clone:()=>s(Hm()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):a(f),removeByTag:f=>{let h=!1;const p=m=>{const{tags:g,name:v,aliases:_}=m;if(g&&g.includes(f)){const x=$l(v,_);for(const w of x)n.delete(w);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=s(Hm());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:s,identify:()=>u(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return Ts(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of u().map(m=>m.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},O$={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},M$={high:3,normal:2,low:1};class yle{config;middlewareStack=Hm();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){const i=typeof r!="function"?r:void 0,o=typeof r=="function"?r:n,a=i===void 0&&this.config.cacheMiddleware===!0;let s;if(a){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?s=l.get(t.constructor):(s=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,s))}else delete this.handlers,s=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)s(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return s(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Z_="***SensitiveInformation***";function V1(e,t){if(t==null)return t;const r=pn.of(e);if(r.getMergedTraits().sensitive)return Z_;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return Z_}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return Z_}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[o,a]of r.structIterator())n[o]!=null&&(i[o]=V1(a,n[o]));return i}return t}class J4{middlewareStack=Hm();schema;static classBuilder(){return new xle}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:d,CommandCtor:f}){for(const _ of i.bind(this)(f,t,r,n))this.middlewareStack.use(_);const h=t.concat(this.middlewareStack),{logger:p}=r,m={logger:p,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[z1]:{commandInstance:this,...u},...d},{requestHandler:g}=r;let v=n??{};return u.eventStream&&(v={isEventStream:!0,...v}),h.resolve(_=>g.handle(_.request,v),m)}}class xle{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let r;return r=class extends J4{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,o){const a=t._operationSchema,s=a?.[4]??a?.input,l=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?V1.bind(null,s):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?V1.bind(null,l):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class mc extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const r=t;return mc.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const r=t;return this===mc?mc.isInstance(t):mc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const L$=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(e[n]==null||e[n]==="")&&(e[n]=i)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},Sle=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Q4=Object.values(bh),Ele=e=>{const t=[];for(const r in bh){const n=bh[r];e[n]!==void 0&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}for(const[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>n});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};const n=r.algorithmId(),i=r.checksumConstructor();Q4.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},wle=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();Q4.includes(n)&&(t[n]=r.checksumConstructor())}),t},kle=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),Cle=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Rle=e=>Object.assign(Ele(e),kle(e)),Ale=e=>Object.assign(wle(e),Cle(e));class Y4{trace(){}debug(){}info(){}warn(){}error(){}}const $le=e=>e?.body instanceof ReadableStream;function Tle(e,t){if(Qc.isInstance(e))for(const r of Object.keys(e.headers)){const n=r.toLowerCase();if(n==="retry-after"){const i=e.headers[r];let o=NaN;if(i.endsWith("GMT"))try{o=(T4(i).getTime()-Date.now())/1e3}catch(a){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(a)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?o=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?o=Number(i):Date.parse(i)>=Date.now()&&(o=(Date.parse(i)-Date.now())/1e3);return isNaN(o)?void 0:new Date(Date.now()+o*1e3)}else if(n==="x-amz-retry-after"){const i=e.headers[r],o=Number(i);if(isNaN(o)){t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+o)}}}const Nle=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(Dle(i)){i=i;let a=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),s=new Error,l=0,u=0;const{request:d}=n,f=Vi.isInstance(d);for(f&&(d.headers[Ose]=N4());;)try{f&&(d.headers[Mse]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=Fle(h,e.logger);if(s=_le(h),f&&$le(d))throw(r.logger instanceof Y4?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{a=await i.refreshRetryTokenForRetry(a,p)}catch(g){throw typeof g.$backoff=="number"&&await z$(g.$backoff),s.$metadata||(s.$metadata={}),s.$metadata.attempts=l+1,s.$metadata.totalRetryDelay=u,s}l=a.getRetryCount();const m=a.getRetryDelay();u+=m,await z$(m)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},z$=e=>new Promise(t=>setTimeout(t,e)),Dle=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",Fle=(e,t)=>{const r={error:e,errorType:Ile(e)},n=Tle(e.$response,t);return n&&(r.retryAfterHint=n),r},Ile=e=>V4(e)?"THROTTLING":wE(e)?"TRANSIENT":Fse(e)?"SERVER_ERROR":"CLIENT_ERROR",Ple={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ole=e=>({applyToStack:t=>{t.add(Nle(e),Ple)}}),U$=e=>Qc.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,X4=e=>new Date(Date.now()+e),Mle=(e,t)=>Math.abs(X4(t).getTime()-e)>=3e5,B$=(e,t)=>{const r=Date.parse(e);return Mle(r,t)?r-Date.now():t},Df=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Lle=async e=>{const t=Df("context",e.context),r=Df("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await Df("signer",r.signer)(n),a=e?.signingRegion,s=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:a,signingRegionSet:s,signingName:l}};class zle{async sign(t,r,n){if(!Vi.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Lle(n),{config:o,signer:a}=i;let{signingRegion:s,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[f,h]=u.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(s=h?.signingRegion??s,l=h?.signingName??l)}return await a.sign(t,{signingDate:X4(o.systemClockOffset),signingRegion:s,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??U$(r.$response);if(n){const i=Df("config",t.config),o=i.systemClockOffset;i.systemClockOffset=B$(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=U$(t);if(n){const i=Df("config",r.config);i.systemClockOffset=B$(n,i.systemClockOffset)}}}const Ule=(e,t,r)=>{let n,i,o,a=!1;const s=async()=>{i||(i=e());try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await s()),n)},Ble="X-Amz-Algorithm",jle="X-Amz-Credential",Z4="X-Amz-Date",qle="X-Amz-SignedHeaders",Vle="X-Amz-Expires",eL="X-Amz-Signature",tL="X-Amz-Security-Token",rL="authorization",nL=Z4.toLowerCase(),Kle="date",Hle=[rL,nL,Kle],Wle=eL.toLowerCase(),K1="x-amz-content-sha256",Gle=tL.toLowerCase(),Jle={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Qle=/^proxy-/,Yle=/^sec-/,eb="AWS4-HMAC-SHA256",Xle="AWS4-HMAC-SHA256-PAYLOAD",Zle="UNSIGNED-PAYLOAD",eue=50,iL="aws4_request",tue=3600*24*7,Wp={},tb=[],rb=(e,t,r)=>`${e}/${t}/${r}/${iL}`,rue=async(e,t,r,n,i)=>{const o=await j$(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${Yl(o)}:${t.sessionToken}`;if(a in Wp)return Wp[a];for(tb.push(a);tb.length>eue;)delete Wp[tb.shift()];let s=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,iL])s=await j$(e,s,l);return Wp[a]=s},j$=(e,t,r)=>{const n=new e(t);return n.update(yh(r)),n.digest()},q$=({headers:e},t,r)=>{const n={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const o=i.toLowerCase();(o in Jle||t?.has(o)||Qle.test(o)||Yle.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},nue=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",nb=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===K1)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||nue(t)){const n=new r;return n.update(yh(t)),Yl(await n.digest())}return Zle};class iue{format(t){const r=[];for(const o of Object.keys(t)){const a=Yc(o);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,a)=>o+a.byteLength,0));let i=0;for(const o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(t.value,3),a;case"string":const s=Yc(t.value),l=new DataView(new ArrayBuffer(3+s.byteLength));l.setUint8(0,7),l.setUint16(1,s.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(s,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(CE.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!oue.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(nae(t.value.replace(/\-/g,"")),1),f}}}var V$;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(V$||(V$={}));const oue=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class CE{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&K$(r),new CE(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&K$(t),parseInt(Yl(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function K$(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const aue=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},sue=(e,t={})=>{const{headers:r,query:n={}}=Vi.clone(e);for(const i of Object.keys(r)){const o=i.toLowerCase();(o.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(o)||t.hoistableHeaders?.has(o))&&(n[i]=r[i],delete r[i])}return{...e,headers:r,query:n}},H$=e=>{e=Vi.clone(e);for(const t of Object.keys(e.headers))Hle.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},lue=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===Wle)continue;const i=Ql(n);t.push(i);const o=e[n];typeof o=="string"?r[i]=`${i}=${Ql(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((a,s)=>a.concat([`${i}=${Ql(s)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},uue=e=>cue(e).toISOString().replace(/\.\d{3}Z$/,"Z"),cue=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class due{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ts(n),this.credentialProvider=ts(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
46
|
+
${this.getCanonicalPath(t)}
|
|
47
|
+
${lue(t)}
|
|
48
|
+
${i.map(o=>`${o}:${r[o]}`).join(`
|
|
49
|
+
`)}
|
|
50
|
+
|
|
51
|
+
${i.join(";")}
|
|
52
|
+
${n}`}async createStringToSign(t,r,n,i){const o=new this.sha256;o.update(yh(n));const a=await o.digest();return`${i}
|
|
53
|
+
${t}
|
|
54
|
+
${r}
|
|
55
|
+
${Yl(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const o of t.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));const n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return Ql(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const r=uue(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class W$ extends due{headerFormatter=new iue;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:s,hoistableHeaders:l,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=u??await this.regionProvider(),{longDate:p,shortDate:m}=this.formatDate(n);if(i>tue)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=rb(m,h,d??this.service),v=sue(H$(t),{unhoistableHeaders:a,hoistableHeaders:l});f.sessionToken&&(v.query[tL]=f.sessionToken),v.query[Ble]=eb,v.query[jle]=`${f.accessKeyId}/${g}`,v.query[Z4]=p,v.query[Vle]=i.toString(10);const _=q$(v,o,s);return v.query[qle]=this.getCanonicalHeaderList(_),v.query[eL]=await this.getSignature(p,g,this.getSigningKey(f,h,m,d),this.createCanonicalRequest(v,_,await nb(t,this.sha256))),v}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:a,eventStreamCredentials:s}){const l=o??await this.regionProvider(),{shortDate:u,longDate:d}=this.formatDate(n),f=rb(u,l,a??this.service),h=await nb({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const m=Yl(await p.digest()),g=[Xle,d,f,i,m,h].join(`
|
|
56
|
+
`);return this.signString(g,{signingDate:n,signingRegion:l,signingService:a,eventStreamCredentials:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature,eventStreamCredentials:o}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(a,s,l,i));return u.update(yh(t)),Yl(await u.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:a}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const l=o??await this.regionProvider(),u=H$(t),{longDate:d,shortDate:f}=this.formatDate(r),h=rb(f,l,a??this.service);u.headers[nL]=d,s.sessionToken&&(u.headers[Gle]=s.sessionToken);const p=await nb(u,this.sha256);!aue(K1,u.headers)&&this.applyChecksum&&(u.headers[K1]=p);const m=q$(u,i,n),g=await this.getSignature(d,h,this.getSigningKey(s,l,f,a),this.createCanonicalRequest(u,m,p));return u.headers[rL]=`${eb} Credential=${s.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${g}`,u}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,eb),a=new this.sha256(await n);return a.update(yh(o)),Yl(await a.digest())}getSigningKey(t,r,n,i){return rue(this.sha256,t,n,r,i||this.service)}}const fue=e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(u){u&&u!==t&&u!==n&&(r=!0),t=u;const d=hue(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=pue(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const g=await f(p);return h&&(!g.$source||Object.keys(g.$source).length===0)?Ese(g,"CREDENTIALS_CODE","e"):g},n.memoized=f.memoized,n.configBound=f.configBound,n.attributed=!0}else n=f},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:a}=e;let s;return e.signer?s=$f(e.signer):e.regionInfoProvider?s=()=>$f(e.region)().then(async u=>[await e.regionInfoProvider(u,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:f,signingService:h}=u;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||h||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},m=e.signerConstructor||W$;return new m(p)}):s=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await $f(e.region)(),properties:{}},u);const d=u.signingRegion,f=u.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},p=e.signerConstructor||W$;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:s})};function hue(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=Hae(t,Kae,F4):r?n=$f(r(Object.assign({},e,{parentClientConfig:e}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function pue(e,t){if(t.configBound)return t;const r=async n=>t({...n,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}const mue=async(e,t,r)=>({operation:kd(t).operation,region:await ts(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function gue(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Dt(e){return{schemeId:"smithy.api#noAuth"}}const vue=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(Dt());break}case"ChangePassword":{t.push(Dt());break}case"CompleteWebAuthnRegistration":{t.push(Dt());break}case"ConfirmDevice":{t.push(Dt());break}case"ConfirmForgotPassword":{t.push(Dt());break}case"ConfirmSignUp":{t.push(Dt());break}case"DeleteUser":{t.push(Dt());break}case"DeleteUserAttributes":{t.push(Dt());break}case"DeleteWebAuthnCredential":{t.push(Dt());break}case"ForgetDevice":{t.push(Dt());break}case"ForgotPassword":{t.push(Dt());break}case"GetDevice":{t.push(Dt());break}case"GetTokensFromRefreshToken":{t.push(Dt());break}case"GetUser":{t.push(Dt());break}case"GetUserAttributeVerificationCode":{t.push(Dt());break}case"GetUserAuthFactors":{t.push(Dt());break}case"GlobalSignOut":{t.push(Dt());break}case"InitiateAuth":{t.push(Dt());break}case"ListDevices":{t.push(Dt());break}case"ListWebAuthnCredentials":{t.push(Dt());break}case"ResendConfirmationCode":{t.push(Dt());break}case"RespondToAuthChallenge":{t.push(Dt());break}case"RevokeToken":{t.push(Dt());break}case"SetUserMFAPreference":{t.push(Dt());break}case"SetUserSettings":{t.push(Dt());break}case"SignUp":{t.push(Dt());break}case"StartWebAuthnRegistration":{t.push(Dt());break}case"UpdateAuthEventFeedback":{t.push(Dt());break}case"UpdateDeviceStatus":{t.push(Dt());break}case"UpdateUserAttributes":{t.push(Dt());break}case"VerifySoftwareToken":{t.push(Dt());break}case"VerifyUserAttribute":{t.push(Dt());break}default:t.push(gue(e))}return t},_ue=e=>{const t=fue(e);return Object.assign(t,{authSchemePreference:ts(e.authSchemePreference??[])})},bue=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),yue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},xue="3.1033.0",Sue={version:xue},Eue=e=>new TextEncoder().encode(e);var wue=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Eue;function Sh(e){return e instanceof Uint8Array?e:typeof e=="string"?wue(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function H1(e){return typeof e=="string"?e.length===0:e.byteLength===0}var oL={name:"SHA-256"},G$={name:"HMAC",hash:oL},kue=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Cue={};function H0(){return typeof window<"u"?window:typeof self<"u"?self:Cue}var Rue=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!H1(t)){var r=Sh(t),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return H0().crypto.subtle.sign(G$,r,t.toHash).then(function(n){return new Uint8Array(n)})}):H1(this.toHash)?Promise.resolve(kue):Promise.resolve().then(function(){return H0().crypto.subtle.digest(oL,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){H0().crypto.subtle.importKey("raw",Sh(t.secret),G$,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function Aue(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{u(n.next(d))}catch(f){a(f)}}function l(d){try{u(n.throw(d))}catch(f){a(f)}}function u(d){d.done?o(d.value):i(d.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function $ue(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Gi=64,Tue=32,Nue=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Due=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Fue=Math.pow(2,53)-1,W0=(function(){function e(){this.state=Int32Array.from(Due),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>Fue)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===Gi&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%Gi>=Gi-8){for(var i=this.bufferLength;i<Gi;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<Gi-8;i++)r.setUint8(i,0);r.setUint32(Gi-8,Math.floor(t/4294967296),!0),r.setUint32(Gi-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(Tue),i=0;i<8;i++)o[i*4]=this.state[i]>>>24&255,o[i*4+1]=this.state[i]>>>16&255,o[i*4+2]=this.state[i]>>>8&255,o[i*4+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],d=n[6],f=n[7],h=0;h<Gi;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var p=this.temp[h-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(m+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var v=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(f+(Nue[h]+this.temp[h]|0)|0)|0,_=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&a^o&a)|0;f=d,d=u,u=l,l=s+v|0,s=a,a=o,o=i,i=v+_|0}n[0]+=i,n[1]+=o,n[2]+=a,n[3]+=s,n[4]+=l,n[5]+=u,n[6]+=d,n[7]+=f},e})(),Iue=(function(){function e(t){this.secret=t,this.hash=new W0,this.reset()}return e.prototype.update=function(t){if(!(H1(t)||this.error))try{this.hash.update(Sh(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Aue(this,void 0,void 0,function(){return $ue(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new W0,this.secret){this.outer=new W0;var t=Pue(this.secret),r=new Uint8Array(Gi);r.set(t);for(var n=0;n<Gi;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();function Pue(e){var t=Sh(e);if(t.byteLength>Gi){var r=new W0;r.update(t),t=r.digest()}var n=new Uint8Array(Gi);return n.set(t),n}var Oue=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Mue(e){if(Lue(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return zue(t)}return!1}function Lue(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function zue(e){return e&&Oue.every(function(t){return typeof e[t]=="function"})}var Uue=(function(){function e(t){Mue(H0())?this.hash=new Rue(t):this.hash=new Iue(t)}return e.prototype.update=function(t,r){this.hash.update(Sh(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const Bue=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??J$.os(i)??"other",a=void 0,s=n?.userAgentData?.brands??[],l=s[s.length-1],u=l?.brand??J$.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},J$={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},jue=e=>()=>Promise.reject(e),Q$=typeof TextEncoder=="function"?new TextEncoder:null,que=e=>{if(typeof e=="string"){if(Q$)return Q$.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},Vue=["in-region","cross-region","mobile","standard","legacy"],Kue=({defaultsMode:e}={})=>Ule(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Hue()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Vue.join(", ")}, got ${t}`)}}),Hue=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:n}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(n)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1};class Wue{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const n=r.getMemberSchemas(),i=Object.values(n).find(o=>!!o.getMergedTraits().httpPayload);if(i){const o=i.getMergedTraits().mediaType;return o||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(a=>{const{httpQuery:s,httpQueryParams:l,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!s&&!l&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,a){let s=t;t.includes("#")&&([,s]=t.split("#"));const l={$metadata:o,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:a?.(this.errorRegistry,s)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const m=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:s}),l),i)}const h=i,p=h?.message??h?.Message??h?.Error?.Message??h?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(p),{name:s},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=$i.for(i),a=$i.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(a),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=L$(t,r);n&&(i.message=n);const o=i.Error??{};o.Type=i.Error?.Type,o.Code=i.Error?.Code,o.Message=i.Error?.message??i.Error?.Message??n,i.Error=o;const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return L$(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),a=Object.keys(t),s={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<a.length;l++){const u=a[l];s[u==="message"?"Message":u]=t[u]}delete s.__type,t.Error=s}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>pn.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class RE{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Gue{from;to;keys;constructor(t,r){this.from=t,this.to=r;const n=Object.keys(this.from),i=new Set(n);i.delete("__type"),this.keys=i}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}function Jue(e,t,r){if(r?.source){const n=r.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||n!==String(t)))return n.includes(".")?new ga(n,"bigDecimal"):BigInt(n)}return t}const Que=(e,t)=>B1(e,t).then(r=>(t?.utf8Encoder??bE)(r)),Yue=(e,t)=>Que(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),Y$=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),ib=e=>{let t=e;return typeof t=="number"&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},Xue=(e,t)=>{const r=Y$(e.headers,"x-amzn-errortype");if(r!==void 0)return ib(e.headers[r]);if(t&&typeof t=="object"){const n=Y$(t,"code");if(n&&t[n]!==void 0)return ib(t[n]);if(t.__type!==void 0)return ib(t.__type)}};class Zue extends RE{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,Jue):await Yue(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=pn.of(t);if(n){if(i.isStructSchema()){const a=r,s=i.isUnionSchema(),l={};let u;const{jsonName:d}=this.settings;d&&(u={});let f;s&&(f=new Gue(a,l));for(const[h,p]of i.structIterator()){let m=h;d&&(m=p.getMergedTraits().jsonName??m,u[m]=h),s&&f.mark(m),a[m]!=null&&(l[h]=this._read(p,a[m]))}if(s)f.writeUnknown();else if(typeof a.__type=="string")for(const h in a){const p=a[h],m=d?u[h]??h:h;m in l||(l[m]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const a=i.getValueSchema(),s=[];for(const l of r)s.push(this._read(a,l));return s}if(i.isMapSchema()){const a=i.getValueSchema(),s={};for(const l in r)s[l]=this._read(a,r[l]);return s}}if(i.isBlobSchema()&&typeof r=="string")return tv(r);const o=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&o)return o==="application/json"||o.endsWith("+json")?Gs.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(D4(i,this.settings)){case 5:return wae(r);case 6:return T4(r);case 7:return Aae(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(i.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(i.isBigDecimalSchema()&&r!=null){if(r instanceof ga)return r;const a=r;return a.type==="bigDecimal"&&"string"in a?new ga(a.string,a.type):new ga(String(r),"bigDecimal")}if(i.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(i.isDocumentSchema())if(n){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof ga?a[s]=l:a[s]=this._read(i,l)}return a}else return structuredClone(r);return r}}const X$="Ν";class ece{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,r)=>{if(r instanceof ga){const n=`${X$+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${X$+"b"+this.counter++}_`+n;return this.values.set(`"${i}"`,n),i}return r}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(const[r,n]of this.values)t=t.replace(r,n);return t}}class tce extends RE{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=pn.of(t),this.buffer=this._write(this.rootSchema,r)}flush(){const{rootSchema:t,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);const n=new ece;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(t,r){this.write(t,r),typeof this.buffer=="object"&&(this.buffer.__type=pn.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=pn.of(t);if(i){if(o.isStructSchema()){const a=r,s={},{jsonName:l}=this.settings;let u;l&&(u={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,a[f],o);if(p!==void 0){let m=f;l&&(m=h.getMergedTraits().jsonName??f,u[f]=m),s[m]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=a;if(Array.isArray(f)){const[h,p]=f;s[h]=this._write(15,p)}}else if(typeof a.__type=="string")for(const f in a){const h=a[f],p=l?u[f]??f:f;p in s||(s[p]=this._write(15,h))}return s}if(Array.isArray(r)&&o.isListSchema()){const a=o.getValueSchema(),s=[],l=!!o.getMergedTraits().sparse;for(const u of r)(l||u!=null)&&s.push(this._write(a,u));return s}if(o.isMapSchema()){const a=o.getValueSchema(),s={},l=!!o.getMergedTraits().sparse;for(const u in r){const d=r[u];(l||d!=null)&&(s[u]=this._write(a,d))}return s}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??qm)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(D4(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return Sae(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof ga&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return N4();const a=o.getMergedTraits().mediaType;return r!=null&&a&&(a==="application/json"||a.endsWith("+json"))?Gs.from(r):r}if(typeof r=="number"&&o.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&o.isBlobSchema())return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??qm)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof ga?(this.useReplacer=!0,a[s]=l):a[s]=this._write(o,l)}return a}else return structuredClone(r);return r}}}class rce extends RE{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new tce(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Zue(this.settings);return t.setSerdeContext(this.serdeContext),t}}class nce extends zae{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=o??new rce({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new Wue(this.awsQueryCompatible)}async serializeRequest(t,r,n){const i=await super.serializeRequest(t,r,n);return i.path.endsWith("/")||(i.path+="/"),i.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,i.headers["x-amz-target"]=`${this.serviceTarget}.${t.name}`,this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),(V0(t.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(t,r,n,i,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const a=Xue(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);const{errorSchema:s,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=pn.of(s),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(s)??Error,h=new f(d),p={},m=this.codec.createDeserializer();for(const[g,v]of u.structIterator())i[g]!=null&&(p[g]=m.readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:u.getMergedTraits().error,message:d},p),i)}}class ice extends nce{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const Eh="ref",Tl=-1,Gp=!0,Z$="isSet",aL="PartitionResult",Jp="booleanEquals",ob="getAttr",Qd="stringEquals",eT={[Eh]:"Endpoint"},ab={[Eh]:aL},mf={[Eh]:"Region"},oa={},tT=[mf],rT={conditions:[[Z$,[eT]],[Z$,tT],["aws.partition",tT,aL],[Jp,[{[Eh]:"UseFIPS"},Gp]],[Jp,[{fn:ob,argv:[ab,"supportsFIPS"]},Gp]],[Jp,[{[Eh]:"UseDualStack"},Gp]],[Jp,[{fn:ob,argv:[ab,"supportsDualStack"]},Gp]],[Qd,[{fn:ob,argv:[ab,"name"]},"aws"]],[Qd,[mf,"us-east-1"]],[Qd,[mf,"us-east-2"]],[Qd,[mf,"us-west-1"]],[Qd,[mf,"us-west-2"]]],results:[[Tl],[Tl,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Tl,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[eT,oa],["https://cognito-idp-fips.us-east-1.amazonaws.com",oa],["https://cognito-idp-fips.us-east-2.amazonaws.com",oa],["https://cognito-idp-fips.us-west-1.amazonaws.com",oa],["https://cognito-idp-fips.us-west-2.amazonaws.com",oa],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",oa],[Tl,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",oa],[Tl,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",oa],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",oa],[Tl,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",oa],[Tl,"Invalid Configuration: Missing Region"]]},oce=2,on=1e8,ace=new Int32Array([-1,1,-1,0,17,3,1,4,on+16,2,5,on+16,3,9,6,5,7,on+15,6,8,on+14,7,on+12,on+13,4,11,10,5,on+9,on+11,5,12,on+10,6,13,on+9,8,on+4,14,9,on+5,15,10,on+6,16,11,on+7,on+8,3,on+1,18,5,on+2,on+3]),sce=SE.from(ace,oce,rT.conditions,rT.results),lce=new Qae({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),uce=(e,t={})=>lce.get(e,()=>gse(sce,{endpointParams:e,logger:t.logger}));EE.aws=q4;class De extends mc{constructor(t){super(t),Object.setPrototypeOf(this,De.prototype)}}class AE extends De{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,AE.prototype)}}class $E extends De{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,$E.prototype)}}class TE extends De{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,TE.prototype),this.reasonCode=t.reasonCode}}class NE extends De{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,NE.prototype)}}class DE extends De{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,DE.prototype)}}class FE extends De{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,FE.prototype)}}class IE extends De{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,IE.prototype)}}class PE extends De{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,PE.prototype)}}class OE extends De{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,OE.prototype)}}class ME extends De{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,ME.prototype)}}class LE extends De{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,LE.prototype)}}class zE extends De{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,zE.prototype)}}class UE extends De{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,UE.prototype)}}class BE extends De{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,BE.prototype)}}class jE extends De{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,jE.prototype)}}class qE extends De{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,qE.prototype)}}class VE extends De{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,VE.prototype)}}class KE extends De{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,KE.prototype)}}class HE extends De{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,HE.prototype)}}class WE extends De{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,WE.prototype)}}class GE extends De{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,GE.prototype)}}class JE extends De{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,JE.prototype)}}class QE extends De{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,QE.prototype)}}class YE extends De{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,YE.prototype)}}class XE extends De{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,XE.prototype)}}class ZE extends De{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,ZE.prototype)}}class ew extends De{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,ew.prototype)}}class tw extends De{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,tw.prototype)}}class rw extends De{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,rw.prototype)}}class nw extends De{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,nw.prototype)}}class iw extends De{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,iw.prototype)}}class ow extends De{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,ow.prototype)}}class aw extends De{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,aw.prototype)}}class sw extends De{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,sw.prototype)}}class lw extends De{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,lw.prototype)}}class uw extends De{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,uw.prototype)}}class cw extends De{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,cw.prototype)}}class dw extends De{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,dw.prototype)}}class fw extends De{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,fw.prototype)}}class hw extends De{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,hw.prototype)}}class pw extends De{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,pw.prototype)}}class mw extends De{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,mw.prototype)}}class gw extends De{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,gw.prototype)}}class vw extends De{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,vw.prototype)}}class _w extends De{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,_w.prototype)}}class bw extends De{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,bw.prototype)}}class yw extends De{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,yw.prototype)}}class xw extends De{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,xw.prototype)}}class Sw extends De{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,Sw.prototype)}}class Ew extends De{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,Ew.prototype)}}class ww extends De{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,ww.prototype)}}class kw extends De{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,kw.prototype)}}class Cw extends De{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,Cw.prototype)}}class Rw extends De{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,Rw.prototype)}}class Aw extends De{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,Aw.prototype)}}class $w extends De{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,$w.prototype)}}class Tw extends De{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,Tw.prototype)}}const cce="AvailableChallenges",dce="AccessDeniedException",fce="AliasExistsException",hce="AnalyticsEndpointId",pce="AuthFlow",mce="AnalyticsMetadata",gce="AnalyticsMetadataType",vce="AuthParameters",_ce="AuthParametersType",bce="AuthenticationResult",yce="AuthenticationResultType",xce="AccessToken",Sce="CodeDeliveryFailureException",Ece="ClientId",wce="ClientIdType",kce="ClientMetadata",Cce="CodeMismatchException",Rce="ConcurrentModificationException",Ace="ChallengeName",$ce="ChallengeParameters",Tce="DeviceGroupKey",Nce="DeviceKey",Dce="DeviceKeyExistsException",Fce="DuplicateProviderException",Ice="ExpiredCodeException",Pce="EncodedData",Oce="ExpiresIn",Mce="EnableSoftwareTokenMFAException",Lce="ForbiddenException",zce="FeatureUnavailableInTierException",Uce="GroupExistsException",Bce="IpAddress",jce="InitiateAuthRequest",qce="InitiateAuthResponse",Vce="InitiateAuth",Kce="InternalErrorException",Hce="InvalidEmailRoleAccessPolicyException",Wce="InvalidLambdaResponseException",Gce="InvalidOAuthFlowException",Jce="InvalidParameterException",Qce="InvalidPasswordException",Yce="InternalServerException",Xce="InvalidSmsRoleAccessPolicyException",Zce="InvalidSmsRoleTrustRelationshipException",ede="IdToken",tde="InvalidUserPoolConfigurationException",rde="LimitExceededException",nde="MFAMethodNotFoundException",ide="ManagedLoginBrandingExistsException",ode="NotAuthorizedException",ade="NewDeviceMetadata",sde="NewDeviceMetadataType",lde="PasswordHistoryPolicyViolationException",ude="PreconditionNotMetException",cde="PasswordResetRequiredException",dde="ResourceNotFoundException",fde="RefreshToken",hde="RefreshTokenReuseException",sL="Session",pde="ScopeDoesNotExistException",mde="SessionType",gde="SoftwareTokenMFANotFoundException",vde="TierChangeNotAllowedException",_de="TermsExistsException",bde="TooManyFailedAttemptsException",yde="TooManyRequestsException",xde="TokenModelType",Sde="TokenType",Ede="UserContextDataType",wde="UserContextData",kde="UnauthorizedException",Cde="UsernameExistsException",Rde="UserImportInProgressException",Ade="UnsupportedIdentityProviderException",$de="UnexpectedLambdaException",Tde="UserLambdaValidationException",Nde="UserNotConfirmedException",Dde="UserNotFoundException",Fde="UnsupportedOperationException",Ide="UserPoolAddOnNotEnabledException",Pde="UserPoolTaggingException",Ode="UnsupportedTokenTypeException",Mde="UnsupportedUserStateException",Lde="WebAuthnClientMismatchException",zde="WebAuthnConfigurationMissingException",Ude="WebAuthnChallengeNotFoundException",Bde="WebAuthnCredentialNotSupportedException",jde="WebAuthnNotEnabledException",qde="WebAuthnOriginNotAllowedException",Vde="WebAuthnRelyingPartyMismatchException",qe="client",Me="error",Ve="httpError",Le="message",Kde="reasonCode",lL="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",uL="server",we="com.amazonaws.cognitoidentityprovider",cL=$i.for(lL);var Hde=[-3,lL,"CognitoIdentityProviderServiceException",0,[],[]];cL.registerError(Hde,De);const Oe=$i.for(we);var Wde=[-3,we,dce,{[Me]:qe,[Ve]:403},[Le],[0]];Oe.registerError(Wde,AE);var Gde=[-3,we,fce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Gde,JE);var Jde=[-3,we,Sce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Jde,jE);var Qde=[-3,we,Cce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Qde,nw);var Yde=[-3,we,Rce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Yde,sw);var Xde=[-3,we,Dce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Xde,mw);var Zde=[-3,we,Fce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Zde,vw);var efe=[-3,we,Mce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(efe,Tw);var tfe=[-3,we,Ice,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(tfe,iw);var rfe=[-3,we,zce,{[Me]:qe,[Ve]:403},[Le],[0]];Oe.registerError(rfe,yw);var nfe=[-3,we,Lce,{[Me]:qe,[Ve]:403},[Le],[0]];Oe.registerError(nfe,lw);var ife=[-3,we,Uce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(ife,gw);var ofe=[-3,we,Kce,{[Me]:uL},[Le],[0]];Oe.registerError(ofe,$E);var afe=[-3,we,Yce,{[Me]:uL},[Le],[0]];Oe.registerError(afe,PE);var sfe=[-3,we,Hce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(sfe,YE);var lfe=[-3,we,Wce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(lfe,LE);var ufe=[-3,we,Gce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(ufe,Ew);var cfe=[-3,we,Jce,{[Me]:qe,[Ve]:400},[Le,Kde],[0,0]];Oe.registerError(cfe,TE);var dfe=[-3,we,Qce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(dfe,qE);var ffe=[-3,we,Xce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(ffe,VE);var hfe=[-3,we,Zce,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(hfe,KE);var pfe=[-3,we,tde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(pfe,QE);var mfe=[-3,we,rde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(mfe,OE);var gfe=[-3,we,ide,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(gfe,_w);var vfe=[-3,we,nde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(vfe,XE);var _fe=[-3,we,ode,{[Me]:qe,[Ve]:403},[Le],[0]];Oe.registerError(_fe,NE);var bfe=[-3,we,lde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(bfe,ow);var yfe=[-3,we,cde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(yfe,ZE);var xfe=[-3,we,ude,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(xfe,HE);var Sfe=[-3,we,hde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Sfe,Cw);var Efe=[-3,we,dde,{[Me]:qe,[Ve]:404},[Le],[0]];Oe.registerError(Efe,DE);var wfe=[-3,we,pde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(wfe,ww);var kfe=[-3,we,gde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(kfe,aw);var Cfe=[-3,we,_de,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Cfe,bw);var Rfe=[-3,we,vde,{[Me]:qe,[Ve]:403},[Le],[0]];Oe.registerError(Rfe,xw);var Afe=[-3,we,bde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Afe,zE);var $fe=[-3,we,yde,{[Me]:qe,[Ve]:429},[Le],[0]];Oe.registerError($fe,FE);var Tfe=[-3,we,kde,{[Me]:qe,[Ve]:401},[Le],[0]];Oe.registerError(Tfe,Rw);var Nfe=[-3,we,$de,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Nfe,UE);var Dfe=[-3,we,Ade,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Dfe,kw);var Ffe=[-3,we,Fde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Ffe,ew);var Ife=[-3,we,Ode,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Ife,Aw);var Pfe=[-3,we,Mde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Pfe,WE);var Ofe=[-3,we,Rde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Ofe,IE);var Mfe=[-3,we,Tde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Mfe,BE);var Lfe=[-3,we,Cde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Lfe,GE);var zfe=[-3,we,Nde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(zfe,tw);var Ufe=[-3,we,Dde,{[Me]:qe,[Ve]:404},[Le],[0]];Oe.registerError(Ufe,ME);var Bfe=[-3,we,Ide,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Bfe,rw);var jfe=[-3,we,Pde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(jfe,Sw);var qfe=[-3,we,Ude,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(qfe,uw);var Vfe=[-3,we,Lde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Vfe,cw);var Kfe=[-3,we,zde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Kfe,$w);var Hfe=[-3,we,Bde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Hfe,dw);var Wfe=[-3,we,jde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Wfe,fw);var Gfe=[-3,we,qde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Gfe,hw);var Jfe=[-3,we,Vde,{[Me]:qe,[Ve]:400},[Le],[0]];Oe.registerError(Jfe,pw);const Qfe=[cL,Oe];var Yfe=[0,we,wce,8,0],dL=[0,we,mde,8,0],sb=[0,we,xde,8,0],Xfe=[3,we,gce,0,[hce],[0]],Zfe=[3,we,yce,0,[xce,Oce,Sde,fde,ede,ade],[[()=>sb,0],1,0,[()=>sb,0],[()=>sb,0],()=>rhe]],ehe=[3,we,jce,0,[pce,Ece,vce,kce,mce,wde,sL],[0,[()=>Yfe,0],[()=>ihe,0],128,()=>Xfe,[()=>nhe,0],[()=>dL,0]],2],the=[3,we,qce,0,[Ace,sL,$ce,bce,cce],[0,[()=>dL,0],128,[()=>Zfe,0],64]],rhe=[3,we,sde,0,[Nce,Tce],[0,0]],nhe=[3,we,Ede,8,[Bce,Pce],[0,0]],ihe=[2,we,_ce,8,0,0],ohe=[9,we,Vce,0,()=>ehe,()=>the];const ahe=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??tv,base64Encoder:e?.base64Encoder??qm,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??uce,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??vue,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new zle},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new jae}],logger:e?.logger??new Y4,protocol:e?.protocol??ice,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:Qfe,xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:e?.serviceId??"Cognito Identity Provider",urlParser:e?.urlParser??Xc,utf8Decoder:e?.utf8Decoder??Yc,utf8Encoder:e?.utf8Encoder??bE}),she=e=>{const t=Kue(e),r=()=>t().then(Sle),n=ahe(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??que,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Bue({serviceId:n.serviceId,clientVersion:Sue.version}),maxAttempts:e?.maxAttempts??Nf,region:e?.region??jue("Region is missing"),requestHandler:yE.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||wse),sha256:e?.sha256??Uue,streamCollector:e?.streamCollector??Zoe,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Qse)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Yse))}},lhe=e=>({setRegion(t){e.region=t},region(){return e.region}}),uhe=e=>({region:e.region()}),che=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(a=>a.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},dhe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),fhe=(e,t)=>{const r=Object.assign(lhe(e),Rle(e),Coe(e),che(e));return t.forEach(n=>n.configure(r)),Object.assign(e,uhe(r),Ale(r),Roe(r),dhe(r))};class fL extends yle{config;constructor(...[t]){const r=she(t||{});super(r),this.initConfig=r;const n=bue(r),i=Jae(n),o=ble(i),a=ele(o),s=a,l=vle(s),u=_ue(l),d=fhe(u,t?.extensions||[]);this.config=d,this.middlewareStack.use(cae(this.config)),this.middlewareStack.use(Jse(this.config)),this.middlewareStack.use(Ole(this.config)),this.middlewareStack.use(nle(this.config)),this.middlewareStack.use(Noe(this.config)),this.middlewareStack.use(Ioe(this.config)),this.middlewareStack.use(Moe(this.config)),this.middlewareStack.use(joe(this.config,{httpAuthSchemeParametersProvider:mue,identityProviderConfigProvider:async f=>new Bae({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Woe(this.config))}destroy(){super.destroy()}}class hL extends J4.classBuilder().ep(yue).m(function(t,r,n,i){return[gle(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(ohe).build(){}let hhe="reventless.auth.v1",phe=300*1e3;function mhe(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=ve.object(r);if(n===void 0)return;let i=R(n.token,ve.string),o=n.identity,a=R(n.refreshToken,ve.string),s=R(n.expiresAt,ve.float);return i!==void 0&&o!==void 0?Q(ve.object(o),l=>{let u=f=>R(l[f],ve.string),d=ie(D(R(l.groups,ve.array),[]),ve.string);return{token:i,identity:{userId:D(u("userId"),""),username:D(u("username"),""),groups:d,provider:D(u("provider"),"InMemory")},refreshToken:a,expiresAt:s}}):void 0}catch{return}}function lb(e,t){let r=t.identity.groups.map(d=>d),n=Object.fromEntries([["userId",t.identity.userId],["username",t.identity.username],["groups",r],["provider",t.identity.provider]]),i=[["token",t.token],["identity",n]],o=t.refreshToken,a=o!==void 0?i.concat([["refreshToken",o]]):i,s=t.expiresAt,l=s!==void 0?a.concat([["expiresAt",s]]):a,u=JSON.stringify(Object.fromEntries(l));localStorage.setItem(e,u)}function ghe(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function vhe(e){let t=n=>D(R(e[n],ve.string),""),r=ie(D(R(e.groups,ve.array),[]),ve.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider")}}function pL(e){let t=n=>R(e[n],ve.string),r=ie(D(R(e["cognito:groups"],ve.array),[]),ve.string);return{userId:D(t("sub"),""),username:D(nd(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito"}}function mL(e){try{return Eoe(e)}catch{return}}function _he(e){let t=e.IdToken;if(t===void 0)return;let r=mL(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:pL(r),refreshToken:e.RefreshToken,expiresAt:i}}async function bhe(e,t,r,n){try{let i=new fL({region:t}),o=new hL({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),a=await i.send(o),s=R(a.AuthenticationResult,_he);return s!==void 0?{TAG:"Ok",_0:s}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=Su(i);return{TAG:"Error",_0:_E(vE(o))}}}async function yhe(e,t,r,n){try{let i=new fL({region:t}),o=new hL({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),s=(await i.send(o)).AuthenticationResult;if(s===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=s.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let u=mL(l),d=D(Q(u,pL),n),f=s.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=s.RefreshToken;return{TAG:"Ok",_0:{token:l,identity:d,refreshToken:p!==void 0?p:r,expiresAt:h}}}catch(i){let o=Su(i);return{TAG:"Error",_0:_E(vE(o))}}}let gL=cr(void 0),xhe=gL.Provider;function She(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,a=t!==void 0?t:hhe,s=se(()=>mhe(a)),l=s[1],u=s[0];Ae(()=>{if(u===void 0)return;let v=u.refreshToken;if(v===void 0)return;let _=u.expiresAt;if(_===void 0)return;let x=u.identity;switch(o){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let w=Math.max(0,_-Date.now()-phe),E=setTimeout(()=>{yhe(n,r,v,x).then(C=>{if(C.TAG==="Ok"){let k=C._0;return lb(a,k),l(A=>k)}localStorage.removeItem(a),l(k=>{})})},w);return()=>{clearTimeout(E)}}},[u,o,n,r]);let d=Q(u,v=>v.identity),f=Ge(u);return br(xhe,{value:{identity:d,isAuthenticated:f,login:async(v,_)=>{try{let x=0;switch(o){case"Anonymous":case"Local":x=1;break;case"Cognito":if(n===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};if(r===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};let w=await bhe(n,r,v,_);if(w.TAG!=="Ok")return{TAG:"LoginErr",_0:w._0};let E=w._0;return lb(a,E),l(C=>E),"LoginOk"}if(x===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let w=await fetch(ghe(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:v,password:_}),"")}),E=await w.json();if(w.ok){let k=ve.object(E);if(k===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let A=R(k.token,ve.string),$=R(k.identity,ve.object);if(A===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if($===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=vhe($),M={token:A,identity:N,refreshToken:void 0,expiresAt:void 0};return lb(a,M),l(P=>M),"LoginOk"}return{TAG:"LoginErr",_0:D(R(R(ve.object(E),k=>k.error),ve.string),"Login failed")}}}catch(x){let w=Su(x);return{TAG:"LoginErr",_0:_E(vE(w))}}},logout:()=>{localStorage.removeItem(a),l(v=>{})},getToken:()=>Q(u,v=>v.token)},children:e.children})}let Ehe={make:She};function Na(){return Pt(gL)}let whe={background:"var("+y.surface+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+T.fontFamily+")",fontSize:"var("+T.sizeSm+")",fontWeight:"var("+T.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+X.md+")",alignItems:"center",gap:"0.375rem"},khe={color:"var("+y.textSecondary+")",fontSize:"0.625rem"},Che={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+T.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+X.md+")",boxShadow:"var("+_n.md+")"},Rhe={background:"var("+y.brandSubtle+")",color:"var("+y.brand+")",display:"inline-block",fontSize:"var("+T.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+X.full+")"},Ahe={border:"none",borderTop:"1px solid var("+y.borderSubtle+")",margin:"0.5rem 0"},$he={background:"transparent",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",fontSize:"var("+T.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+X.sm+")"};function The(e){let t=Na(),r=se(()=>!1);if(t===void 0)return null;let n=r[1],i=r[0],o=t.identity;return o!==void 0?L("div",{children:[L("button",{children:[o.username,b("span",{children:i?"▴":"▾",style:khe})],"aria-label":"Signed in as "+o.username,style:whe,onClick:a=>n(s=>!s)}),i?L("div",{children:[b("div",{children:o.username,style:{fontSize:"var("+T.sizeMd+")",fontWeight:"var("+T.weightMedium+")",marginBottom:"0.25rem"}}),o.groups.length!==0?b("div",{children:o.groups.map(a=>b("span",{children:a,style:Rhe},a)),style:{marginBottom:"0.25rem"}}):null,b("hr",{style:Ahe}),b("button",{children:"Sign out",style:$he,onClick:a=>{n(s=>!1),t.logout()}})],style:Che}):null],style:{position:"relative"}}):null}let Nhe=The,Dhe={background:"var("+y.surface+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+T.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+X.md+")"},nT={color:"var("+y.textSecondary+")",display:"block",fontSize:"var("+T.sizeSm+")",marginBottom:"0.25rem"},iT={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",fontSize:"var("+T.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+X.sm+")",boxSizing:"border-box"};function Fhe(e){return{background:e?"var("+y.textDisabled+")":"var("+y.brand+")",border:"none",color:"var("+y.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+T.sizeMd+")",fontWeight:"var("+T.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+X.sm+")"}}let Ihe={color:"var("+y.error+")",fontSize:"var("+T.sizeSm+")",marginBottom:"0.75rem"};function Phe(e){let t=Na(),r=se(()=>""),n=r[1],i=r[0],o=se(()=>""),a=o[1],s=o[0],l=se(()=>{}),u=l[1],d=l[0],f=se(()=>!1),h=f[1],p=f[0],m=g=>{g.preventDefault(),u(v=>{}),h(v=>!0),t!==void 0?Ut(t.login(i,s).then(v=>{if(h(x=>!1),typeof v!="object")return;let _=v._0;u(x=>_)}),v=>(h(_=>!1),u(_=>"Unexpected error during sign-in"),Promise.resolve())):(u(v=>"Auth provider missing"),h(v=>!1),Promise.resolve())};return L("div",{children:[b("h1",{children:"Sign in",style:{fontSize:"var("+T.sizeXl+")",fontWeight:"var("+T.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[b("label",{children:"Username",style:nT}),b("input",{style:iT,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:g=>{let v=g.target.value;n(_=>v)}}),b("label",{children:"Password",style:nT}),b("input",{style:iT,autoComplete:"current-password",type:"password",value:s,onChange:g=>{let v=g.target.value;a(_=>v)}}),d!==void 0?b("div",{children:d,style:Ihe}):null,b("button",{children:p?"Signing in…":"Sign in",style:Fhe(p),disabled:p,type:"submit"})],onSubmit:m})],style:Dhe})}let oT=Phe;function Ohe(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(KU(e.routes,n),i)}let Mhe=Ohe;function Lhe(e){return e.button===0&&!e.altKey&&!e.ctrlKey&&!e.metaKey?!e.shiftKey:!1}function zhe(e){let t=Pt(dg),r=TF(t.prefix,e.route),n=i=>{if(!i.defaultPrevented&&Lhe(i))return i.preventDefault(),Ih(r)};return b("a",{children:e.children,href:r,onClick:n})}let Uhe=zhe,tp=cr(void 0),Bhe=tp.Provider;function jhe(e){let t=e.initialPages,r=t!==void 0?t:[],n=se(()=>r),i=n[1],o=se(()=>[]),a=o[1],s=n[0].concat(o[0]);return br(Bhe,{value:{register:m=>i(g=>g.concat(m)),deregister:m=>i(g=>g.filter(v=>v.fragmentId!==m)),setPluginPages:m=>a(g=>m),getPages:()=>s,getPage:m=>s.find(g=>g.fragmentId===m)},children:e.children})}let qhe={make:jhe};function vL(){let e=Pt(tp);return e!==void 0?e.getPages():[]}let Vhe=[];function Khe(e){return!1}let Hhe={activeAccess:Vhe,hasAccess:Khe},_L=cr(Hhe),Whe=_L.Provider;function Ghe(e){let t=e.access;return br(Whe,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function xl(){return Pt(_L).hasAccess}let Jhe=Ghe;function Dc(e){return"var("+e+")"}let Qhe=S([z("flex"),Z("center"),c("gap",Dc(F.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("color",Dc(y.textDisabled)),c("font-size",Dc(T.sizeSm)),xe("notAllowed"),aI("none")]),Yhe=S([c("font-size","14px"),vi(0)]),Xhe=S([_o(1),c("font-weight",Dc(T.weightMedium))]),Zhe=S([c("font-size",Dc(T.sizeXs)),c("color",Dc(y.brand)),xe("pointer"),c("text-decoration","none"),vi(0)]);function epe(e){return L("div",{children:[b("span",{children:"[locked]",className:Yhe}),b("span",{children:e.label,className:Xhe}),b("span",{children:"Upgrade",className:Zhe})],className:Qhe})}let tpe=epe;function rpe(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function si(e){return"var("+e+")"}let npe=S([z("flex"),pe("column"),c("gap",si(F.xs)),c("padding","var("+F.sm+") 0")]),ipe=S([c("color",si(y.textDisabled)),c("font-size",si(T.sizeXs)),c("font-weight",si(T.weightBold)),c("letter-spacing","0.08em"),c("text-transform","uppercase"),c("padding","var("+F.xs+") var("+F.md+")"),Ca(Ce(8))]),aT=S([z("flex"),Z("center"),c("gap",si(F.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("color",si(y.textSecondary)),c("font-size",si(T.sizeMd)),xe("pointer"),c("border-radius",si(X.sm)),c("text-decoration","none"),Je([c("background",si(y.surfaceSubtle)),c("color",si(y.textPrimary))])]),ope=S([c("background",si(y.surfaceSubtle)),c("color",si(y.textPrimary)),c("font-weight",si(T.weightMedium))]),ape=S([c("font-size","12px"),c("color",si(y.textDisabled)),Oh("auto")]);function spe(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function lpe(e){let t=e.hasAccess,r=e.page,n=de(r.requiredAccess,!1,s=>!t(s)),i=e.isActive?aT+" "+ope:aT,o=L(Gr,{children:[de(r.menuEntry.icon,null,s=>b("span",{children:s})),b("span",{children:r.menuEntry.label}),n?b("span",{children:"[locked]",className:ape}):null]}),a=r.url;return!n&&a!==void 0?b(Uhe,{route:a,children:b("span",{children:o,className:i})}):b("div",{children:o,className:i,role:"button"})}function sT(e){let t=e.hasAccess,r=e.currentUrl,n=e.pages.toSorted((i,o)=>Mx(i.menuEntry.sortOrder,o.menuEntry.sortOrder));return L(Gr,{children:[de(e.label,null,i=>b("div",{children:i,className:ipe})),n.map(i=>b(lpe,{page:i,isActive:spe(i,r),hasAccess:t},i.fragmentId))]})}function upe(e){let t=e.currentUrl,r=vL(),n=xl(),i={};r.forEach(s=>{let l=D(s.menuEntry.group,""),u=D(i[l],[]);i[l]=u.concat([s])});let o=D(i[""],[]),a=Object.entries(i).filter(s=>s[0]!=="").toSorted((s,l)=>{let u=ot(s[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder),d=ot(l[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder);return Mx(u,d)});return L("nav",{children:[o.length!==0?b(sT,{label:void 0,pages:o,currentUrl:t,hasAccess:n}):null,a.map(s=>{let l=s[1],u=s[0];switch(rpe(l,n)){case"Active":return b(sT,{label:u,pages:l,currentUrl:t,hasAccess:n},u);case"Locked":return b(tpe,{label:u},u);case"Absent":return null}})],"aria-label":"primary navigation",className:npe})}let cpe=upe;function Fc(e){return"var("+e+")"}let dpe=S([z("flex"),pe("row"),nI({NAME:"vh",VAL:100}),c("overflow","hidden"),c("background",Fc(y.background))]),fpe=S([z("flex"),pe("column"),c("width","240px"),vi(0),c("background",Fc(y.surface)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow-y","auto")]),hpe=S([c("padding","var("+F.md+") var("+F.lg+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",Fc(y.textPrimary)),c("font-size",Fc(T.sizeLg)),c("font-weight",Fc(T.weightBold)),vi(0)]),ppe=S([z("flex"),pe("column"),_o(1),c("overflow","hidden")]),mpe=S([z("flex"),pe("column"),_o(1),c("overflow","auto"),c("background",Fc(y.background))]);function gpe(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",a=n!==void 0?n:"404 — Page not found",s=r!==void 0?r:!0,l=t!==void 0?t:null,u=yU();return L("div",{children:[L("aside",{children:[L("div",{children:[de(e.logoUrl,null,d=>b("img",{style:{height:"24px",marginRight:"8px"},alt:o,src:d})),o],className:hpe}),b(cpe,{currentUrl:u})],className:fpe}),L("main",{children:[D(e.headerSlot,null),b("div",{children:s?b(Mhe,{url:u,routes:e.router,children:a}):l,className:mpe})],className:ppe})],className:dpe})}let vpe=gpe,_pe=[c(y.background,"#0d1117"),c(y.surface,"#161b22"),c(y.surfaceSubtle,"#1c2128"),c(y.surfaceElevated,"#21262d"),c(y.brand,"#2f81f7"),c(y.brandSubtle,"#1f4b8e"),c(y.success,"#3fb950"),c(y.warning,"#d29922"),c(y.error,"#f85149"),c(y.info,"#58a6ff"),c(y.textPrimary,"#e6edf3"),c(y.textSecondary,"#8b949e"),c(y.textDisabled,"#484f58"),c(y.textOnBrand,"#ffffff"),c(y.border,"#30363d"),c(y.borderSubtle,"#21262d"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(_n.sm,"0 1px 3px rgba(0,0,0,0.4)"),c(_n.md,"0 4px 12px rgba(0,0,0,0.5)"),c(_n.lg,"0 8px 24px rgba(0,0,0,0.6)")],bpe=[c(y.background,"#ffffff"),c(y.surface,"#f6f8fa"),c(y.surfaceSubtle,"#eaeef2"),c(y.surfaceElevated,"#ffffff"),c(y.brand,"#0969da"),c(y.brandSubtle,"#ddf4ff"),c(y.success,"#1a7f37"),c(y.warning,"#9a6700"),c(y.error,"#cf222e"),c(y.info,"#0550ae"),c(y.textPrimary,"#1f2328"),c(y.textSecondary,"#636c76"),c(y.textDisabled,"#bec1c5"),c(y.textOnBrand,"#ffffff"),c(y.border,"#d0d7de"),c(y.borderSubtle,"#eaeef2"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(_n.sm,"0 1px 3px rgba(0,0,0,0.08)"),c(_n.md,"0 4px 12px rgba(0,0,0,0.12)"),c(_n.lg,"0 8px 24px rgba(0,0,0,0.16)")],ype=[c(y.background,"#f5f5f5"),c(y.surface,"#ffffff"),c(y.surfaceSubtle,"#eeeeee"),c(y.surfaceElevated,"#ffffff"),c(y.brand,"#424242"),c(y.brandSubtle,"#e0e0e0"),c(y.success,"#388e3c"),c(y.warning,"#f57c00"),c(y.error,"#d32f2f"),c(y.info,"#1976d2"),c(y.textPrimary,"#212121"),c(y.textSecondary,"#757575"),c(y.textDisabled,"#bdbdbd"),c(y.textOnBrand,"#ffffff"),c(y.border,"#bdbdbd"),c(y.borderSubtle,"#e0e0e0"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(_n.sm,"0 1px 3px rgba(0,0,0,0.12)"),c(_n.md,"0 4px 12px rgba(0,0,0,0.14)"),c(_n.lg,"0 8px 24px rgba(0,0,0,0.18)")],xpe=[c(y.background,"#000000"),c(y.surface,"#0a0a0a"),c(y.surfaceSubtle,"#111111"),c(y.surfaceElevated,"#1a1a1a"),c(y.brand,"#ffdd00"),c(y.brandSubtle,"#332b00"),c(y.success,"#00ff00"),c(y.warning,"#ffaa00"),c(y.error,"#ff4444"),c(y.info,"#44aaff"),c(y.textPrimary,"#ffffff"),c(y.textSecondary,"#cccccc"),c(y.textDisabled,"#555555"),c(y.textOnBrand,"#000000"),c(y.border,"#ffffff"),c(y.borderSubtle,"#888888"),c(F.xs,"4px"),c(F.sm,"8px"),c(F.md,"16px"),c(F.lg,"24px"),c(F.xl,"32px"),c(F.xxl,"48px"),c(T.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(T.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(T.sizeXs,"11px"),c(T.sizeSm,"12px"),c(T.sizeMd,"14px"),c(T.sizeLg,"16px"),c(T.sizeXl,"20px"),c(T.sizeXxl,"24px"),c(T.weightNormal,"400"),c(T.weightMedium,"500"),c(T.weightBold,"600"),c(T.lineHeightTight,"1.25"),c(T.lineHeightNormal,"1.5"),c(T.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(_n.sm,"0 1px 3px rgba(255,255,255,0.1)"),c(_n.md,"0 4px 12px rgba(255,255,255,0.15)"),c(_n.lg,"0 8px 24px rgba(255,255,255,0.2)")];function Qp(e,t){let r=t!==void 0?[c(y.brand,t.primaryColor)]:[];return S(e.concat(r))}function Spe(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=Qp(_pe,t.brand);break;case"Light":n=Qp(bpe,t.brand);break;case"Neutral":n=Qp(ype,t.brand);break;case"HighContrast":n=Qp(xpe,t.brand);break}return b("div",{children:e.children,className:n})}let Epe=Spe;function wpe(e){}let kpe={preset:"Light",setPreset:wpe},bL=cr(kpe),Cpe=bL.Provider;function Rpe(){return Pt(bL)}let yL="reventless-ui:theme";function xL(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function W1(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function Ape(e){let t=localStorage.getItem(yL);return t==null?e:xL(t)}function $pe(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=se(()=>Ape(r)),i=n[1],o=n[0],a=en(l=>{localStorage.setItem(yL,W1(l)),i(u=>l)},[]),s=Bt(()=>({preset:o,setPreset:a}),[o,a]);return b(Cpe,{value:s,children:b(Epe,{theme:{preset:o,brand:e.brand},children:e.children})})}let Tpe={make:$pe},rp=cr(void 0),Npe=rp.Provider;function Dpe(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=se(()=>n),a=o[1],s=se(()=>[]),l=s[1],u=o[0].concat(s[0]);return br(Npe,{value:{register:_=>a(x=>x.concat(_)),deregister:_=>a(x=>x.filter(w=>w.extensionPackage!==_)),setPluginPanels:_=>l(x=>_),getPanel:_=>u.find(x=>x.fragmentId===_),getPanelsForPosition:_=>u.filter(x=>x.positions.some(w=>w===_)),hasAccess:_=>i.some(x=>x===_)},children:e.children})}let Fpe={make:Dpe};function Ipe(e){let t=Pt(rp);return t!==void 0?t.getPanelsForPosition(e):[]}function Ppe(e){let t=Pt(rp);if(t!==void 0)return t.getPanel(e)}function Nw(e){return"/"+e.environment+"/"+e.platformName}function SL(e){let t=e.split("?")[0],r=t.split("/").filter(l=>l!==""),n=r[0],i=r[1];if(n===void 0||i===void 0)return;let o={environment:n,platformName:i},a=Nw(o),s=t.startsWith(a)?t.slice(a.length):"/";return[o,s===""?"/":s]}let Ope=cr(void 0),Mpe=Ope.Provider;function Lpe(e){return br(Mpe,{value:e.scope,children:e.children})}let EL={make:Lpe};function zpe(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}let wL=cr(void 0),kL=cr({routes:[],publicLinks:eu()}),CL=cr(!1),Upe=wL.Provider;function Bpe(e){return br(Upe,{value:e.value,children:e.children})}let jpe=kL.Provider;function qpe(e){return br(jpe,{value:e.value,children:e.children})}let Vpe=CL.Provider;function Kpe(e){return br(Vpe,{value:e.value,children:e.children})}function Hpe(e){let t=se(()=>({routes:[],publicLinks:eu()})),r=t[1],n=t[0],i=se(()=>({routes:[],publicLinks:eu()})),o=i[1],a=i[0],s=se(()=>!1),l=s[1],u=n.routes.concat(a.routes),d=Py(n.publicLinks,a.publicLinks),f={routes:u,publicLinks:d};return b(Bpe,{value:{register:(g,v)=>r(_=>({routes:_.routes.concat(g),publicLinks:Py(_.publicLinks,v)})),setPluginRoutes:(g,v)=>{o(_=>({routes:g,publicLinks:v})),l(_=>!0)}},children:b(Kpe,{value:s[0],children:b(qpe,{value:f,children:b(YU.make,{registry:d,children:e.children})})})})}let Wpe={make:Hpe};function Dw(){return Pt(wL)}function Gpe(){return Pt(CL)}function Jpe(){let e=Pt(kL).routes;return Bt(()=>qU(zpe(e.toReversed())),[e])}function Yd(e){return"var("+e+")"}let Qpe=S([c("background",Yd(y.surface)),c("color",Yd(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",Yd(X.sm)),c("padding","4px 8px"),c("font-size",Yd(T.sizeSm)),c("font-family",Yd(T.fontFamily)),xe("pointer")]);function Ype(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}let Xpe=["Light","Dark","Neutral","HighContrast"];function Zpe(e){let t=Rpe(),r=t.setPreset,n=i=>{let o=i.target.value;r(xL(o))};return b("select",{children:Xpe.map(i=>{let o=W1(i);return b("option",{children:Ype(i),value:o},o)}),className:Qpe,value:W1(t.preset),onChange:n})}let e0e=Zpe;function RL(e){return e.startsWith("/")?!e.startsWith("//"):!1}function t0e(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):RL(e)?t=(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:t=e;let r=t.replace("appsync-api.","appsync-realtime-api.");return r.endsWith("/realtime")?r:r+"/realtime"}function r0e(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):RL(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function n0e(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function i0e(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+n0e(r)}function G1(e,t){if(e.state===t)return;let r=e.state;e.state=t;let n=0;switch(t){case"Closed":case"Connecting":n=1;break;case"Open":let i=e.disconnectedSince;if(i!==void 0){let o=Date.now()-i;e.disconnectedSince=void 0,ae(e.onReconnect,a=>a(o))}break}if(n===1)switch(r){case"Closed":case"Connecting":break;case"Open":e.disconnectedSince=Date.now();break}ae(e.onStateChange,i=>i(t))}function o0e(e){switch(e){case 1:return 1e3;case 2:return 2e3;case 3:return 4e3;case 4:return 8e3;case 5:return 16e3;default:return 3e4}}let a0e='{"type":"connection_init"}';function J1(e,t){let r=e.ws,n=e.getToken();if(r===void 0||n===void 0)return;let i=Object.fromEntries([["host",e.host],["Authorization",n]]),o=JSON.stringify(Object.fromEntries([["type","subscribe"],["id",t.id],["channel",t.channel],["authorization",i]]));try{nr(r).send(o);return}catch{return}}function s0e(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{nr(r).send(n);return}catch{return}}function l0e(e){e.subscriptions.forEach(t=>J1(e,t))}function u0e(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=R(r,ve.object);if(n===void 0)return;let i=R(n.type,ve.string);if(i!==void 0)switch(i){case"connection_ack":G1(e,"Open"),e.reconnectAttempts=0;let o=e.pendingPostAck;return e.pendingPostAck=[],o.forEach(h=>h()),l0e(e);case"data":let a=R(n.id,ve.string),s=D(n.event,null),l=h=>{let p=ve.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},u=ve.array(s),d=u!==void 0?u.map(l):[l(s)],f=R(a,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function AL(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([i0e(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Jt(i),G1(e,"Connecting"),i.onopen=()=>{try{i.send(a0e);return}catch{return}},i.onmessage=o=>u0e(e,o.data),i.onclose=()=>{if(e.ws=void 0,G1(e,"Closed"),e.disposed)return;let o=e.reconnectAttempts+1|0;e.reconnectAttempts=o,e.reconnectTimer=setTimeout(()=>AL(e),o0e(o))},i.onerror=o=>{}}function c0e(e,t,r,n,i){let o={ws:void 0,state:"Closed",url:e,host:t,getToken:r,subscriptions:new Map,pendingPostAck:[],reconnectAttempts:0,reconnectTimer:void 0,disposed:!1,onStateChange:n,disconnectedSince:void 0,onReconnect:i};return AL(o),o}function d0e(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};e.subscriptions.set(n,i);let o=e.state,a=0;switch(o){case"Closed":case"Connecting":a=1;break;case"Open":J1(e,i);break}return a===1&&e.pendingPostAck.push(()=>J1(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),s0e(e,n)}}function lT(e){e.disposed=!0;let t=e.reconnectTimer;t!==void 0&&clearTimeout(t),e.reconnectTimer=void 0;let r=e.ws;if(r!==void 0)try{nr(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function f0e(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(a=>JSON.stringify(a))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let a=await fetch(e,{method:"POST",headers:o,body:i});return a.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+a.status.toString()}}catch(a){let s=Su(a);return s.RE_EXN_ID===cg?{TAG:"Error",_0:D(s._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function Wm(e){return e.startsWith("Platform_")||e.startsWith("platform_")?"Platform":"Domain"}let $L=cr(void 0);function ov(){return Pt($L)}function uT(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[]}}let h0e=$L.Provider;function p0e(e){let t=e.getToken,r=e.clientEventsNamespace,n=e.liveReconnectRefetch,i=e.liveUpdates,o=e.platformEventsEndpoint,a=e.domainEventsEndpoint,s=n!==void 0?n:!0,l=We(t);Ae(()=>{l.current=t},[t]);let u=()=>l.current(),d=We(uT()),f=We(uT()),h=se(()=>"Closed"),p=h[1],m=h[0],g=se(()=>"Closed"),v=g[1],_=g[0],x=U=>U==="Domain"?d:f,w=U=>U==="Domain"?a:o,E=U=>{let B=x(U).current,q=B.client;if(q!==void 0)return q;let W=w(U);if(W===void 0)return;let J=t0e(W),K=r0e(W),G=c0e(J,K,u,re=>U==="Domain"?p(oe=>re):v(oe=>re),re=>{let oe=x(U).current;if(!(s&&re>=2e3))return;oe.reconnectListeners.slice().forEach(Re=>{try{return Re()}catch{return}})});return B.client=G,G},C=U=>{let B=x(U).current,q=B.idleTimer;if(q!==void 0){clearTimeout(q),B.idleTimer=void 0;return}},k=(U,B,q)=>{let W=x(U).current;if(!i||Ui(w(U)))return()=>{};C(U),W.refcount=W.refcount+1|0;let J=W.registry.get(B),K;if(J!==void 0){let G=J.drainTimer;G!==void 0&&(clearTimeout(G),J.drainTimer=void 0),K=J}else{let G={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};W.registry.set(B,G),K=G}if(K.callbacks.push(q),K.refcount=K.refcount+1|0,K.refcount===1&&Ui(K.underlyingUnsub)){let G=E(U);if(G!==void 0){let re=d0e(G,B,oe=>{K.callbacks.forEach(_e=>_e(oe))});K.underlyingUnsub=re}}return()=>{if(K.callbacks=K.callbacks.filter(G=>G!==q),K.refcount=K.refcount-1|0,K.refcount===0&&(K.drainTimer=setTimeout(()=>{let G=K.underlyingUnsub;G!==void 0&&G(),K.underlyingUnsub=void 0,K.drainTimer=void 0,W.registry.delete(B)},5e3)),W.refcount=W.refcount-1|0,W.refcount===0){let G=x(U).current,re=G.idleTimer;re!==void 0&&clearTimeout(re),G.idleTimer=setTimeout(()=>{let oe=G.client;oe!==void 0&&(lT(oe),G.client=void 0),G.idleTimer=void 0},3e4);return}}},A=U=>i?Ge(w(Wm(U))):!1;Ae(()=>{let U=()=>{};return addEventListener("visibilitychange",U),()=>{removeEventListener("visibilitychange",U)}},[]),Ae(()=>(()=>{["Domain","Platform"].forEach(U=>{let B=x(U).current,q=B.idleTimer;q!==void 0&&clearTimeout(q),B.idleTimer=void 0,B.registry.forEach(J=>{let K=J.drainTimer;if(K!==void 0){clearTimeout(K),J.drainTimer=void 0;return}});let W=B.client;W!==void 0&&lT(W),B.client=void 0})}),[]);let $=U=>U==="Domain"?m:_,N=(U,B)=>{let q=x(U).current;return q.reconnectListeners.push(B),()=>{q.reconnectListeners=q.reconnectListeners.filter(W=>W!==B)}},M=()=>i&&Ge(r)?Ge(a):!1,P=async(U,B,q)=>{let W=w(U);return W!==void 0?await f0e(W,l.current(),B,q):{TAG:"Error",_0:"no events endpoint configured"}},I=Bt(()=>({subscribe:k,isLive:A,apiForReadModel:Wm,statusFor:$,registerReconnect:N,publish:P,clientChannelsAvailable:M,clientNamespace:()=>r}),[i,a,o,m,_,r]);return br(h0e,{value:I,children:e.children})}let m0e={make:p0e};function cT(e){return Object.fromEntries([["eq",e]])}function g0e(e,t){let r=ve.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=R(n.filter,ve.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=cT(t.environment),o.platformName=cT(t.platformName),n.filter=o,n}let v0e=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,_0e=/\$filter\s*:/,dT={};function b0e(e){if(dT[e]===void 0){dT[e]=!0,console.warn("PlatformFilter: this query declares a `$filter` variable that is not a fleet-scope `<Type>Filter` input object, so it is left untouched. `$filter` is reserved for platform-scope injection in fleet mode — rename the variable (e.g. `$logFilter`) to avoid ambiguity. Query: "+e);return}}function y0e(e){return t=>((r,n)=>v0e.test(r)?t(r,g0e(n,e)):(_0e.test(r)&&b0e(r),t(r,n)))}let x0e={background:"var("+y.surface+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+T.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+X.md+")"},S0e={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+T.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+X.sm+")",alignItems:"center",justifyContent:"space-between"},E0e={background:"var("+y.brandSubtle+")",color:"var("+y.brand+")",fontSize:"var("+T.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+X.full+")"};function w0e(e){let t=e.discover,r=xi(),n=se(()=>"Loading"),i=n[1],o=n[0];Ae(()=>{r!==void 0?(i(s=>"Loading"),Ut(t(r).then(s=>i(l=>({TAG:"Loaded",_0:s}))),s=>{let l=D(R(rU(s),u=>u.message),"Platform discovery failed");return i(u=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(s=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[Ge(r)]);let a;if(typeof o!="object")a=b("div",{children:"Discovering platforms…",style:{color:"var("+y.textSecondary+")"}});else if(o.TAG==="Loaded"){let s=o._0;a=s.length!==0?s.map(l=>L("button",{children:[l.platformName,b("span",{children:l.environment,style:E0e})],style:S0e,onClick:u=>Ih(Nw(l)+"/")},l.environment+"/"+l.platformName)):b("div",{children:"No platforms discovered.",style:{color:"var("+y.textSecondary+")"}})}else a=b("div",{children:o._0,style:{color:"var("+y.error+")",fontSize:"var("+T.sizeSm+")"}});return L("div",{children:[b("h1",{children:"Select a platform",style:{fontSize:"var("+T.sizeXl+")",fontWeight:"var("+T.weightBold+")",margin:"0 0 1.5rem"}}),a],style:x0e})}let k0e=w0e;function Cd(e){let t=R(R(Y(e),n=>Ux(n)[0]),Y),r=R(R(t,n=>O(n,"__typename")),ue);if(r===void 0)return"Accepted";switch(r){case"CommandPending":return"Pending";case"CommandRejected":let n=R(R(t,o=>O(o,"errorCode")),ue),i=R(R(t,o=>O(o,"errorDetail")),ue);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return"Accepted"}}function Xo(e,t){let r=O(e,t);if(r===void 0)return;let n=ue(r);return n!==void 0?n:R(R(Y(r),i=>O(i,"TAG")),ue)}function TL(e,t,r){if(r===void 0)return e;let n=Xo(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function C0e(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function R0e(e){let t=ve.object(e);if(t===void 0)return;let r=o=>R(t[o],ve.string),n=R(r("changeKind"),C0e),i=r("id");if(n!==void 0&&i!==void 0)return{changeKind:n,id:i,sortKeyValue:r("sortKeyValue")}}function fT(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let hT="default";function A0e(e,t){let r=fT(e);return typeof t!="object"?"/"+hT+"/"+r+"/*":"/"+hT+"/"+r+"/"+fT(t._0)}function Q1(e,t,r,n,i){let o=r!==void 0?r:!0,a=ov(),s=A0e(e,t),l=We(n);Ae(()=>{l.current=n},[n]);let u=We(i);Ae(()=>{u.current=i},[i]),Ae(()=>{if(!o||a===void 0)return;let d=Wm(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let m=a.subscribe(d,s,v=>{let _=R0e(v);if(_!==void 0)return l.current(_)});f.contents=m;let g=a.registerReconnect(d,()=>ae(u.current,v=>v()));h.contents=g},100);return()=>{clearTimeout(p);let m=f.contents;m!==void 0&&m();let g=h.contents;if(g!==void 0)return g()}},[s,o,a])}function NL(e,t,r,n,i,o){let a=t!==void 0?t:{},s=r!==void 0?r:"",l=n!==void 0?n:!0,u=i!==void 0?i:()=>{},d=xi(),f=se(()=>[]),h=f[1],p=se(()=>f4),m=p[1],g=p[0],v=se(()=>"Loading"),_=v[1],x=se(()=>0),w=x[1],E=se(()=>1),C=E[1],k=E[0];return Ae(()=>{if(l)if(d!==void 0){_($=>"Loading"),u();let A;if(o!==void 0){let $=ut(de(Y(a),[],Qe));$.first=o*k|0,A=$}else A=a;Ut(d(e.queryDocument,A).then($=>(h(N=>fE($,e.queryField)),m(N=>m4($,e.queryField)),_(N=>"Loaded"),Promise.resolve())),$=>(_(N=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else _(A=>({TAG:"Error",_0:"Not connected"}));else _(A=>"Loaded")},[x[0],s,l,k]),{rows:f[0],setRows:h,pageInfo:g,fetchState:v[0],refetch:()=>w(A=>A+1|0),loadMore:()=>C(A=>A+1|0),canLoadMore:g.hasNextPage}}function vu(e,t,r){let n=t!==void 0?t:!0,o=NL(e,void 0,void 0,n,void 0,50),a=We(void 0),s=d=>{let f=a.current;f!==void 0&&clearTimeout(f),a.current=setTimeout(()=>{a.current=void 0,o.refetch()},250)},l=ov(),u=n&&de(l,!1,d=>d.isLive(e.queryField));return Q1(e.queryField,"All",u,s,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:u,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let $0e=50,pT=["message","body","text","title","content"],DL=["userId","recipientId","recipient","user","targetUserId"],T0e=["createdAt","sentAt","notifiedAt","at","timestamp"],N0e=["read","isRead","seen","acknowledged"];function Fw(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function FL(e){return ie($r(e),t=>{if(Lh(t[1]))return t[0]})}function IL(e,t){return FL(e).find(r=>Fw(r,t))}function D0e(e){let t=IL(e,DL);if(t!==void 0)return t;let r=Nn(e,void 0,void 0);return $r(e).map(n=>n[0]).find(n=>de(O(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function F0e(e){return ie($r(e),t=>{if(Cg(t[1]))return t[0]}).find(t=>Fw(t,T0e))}function I0e(e){return ie($r(e),t=>{if(ze(bH(t[1]),"boolean"))return t[0]}).find(t=>Fw(t,N0e))}function P0e(e,t){return ie(FL(e),r=>{let n=r.toLowerCase();if(!(r===t||n==="id"||!n.endsWith("id")))return{field:r,stem:r.slice(0,r.length-2|0)}})}function O0e(e){return de(R(Y(e),t=>O(t,"x-reventless-notifications")),!1,t=>{let r=it(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let M0e=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function L0e(e,t){let r=ie(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>M0e.some(i=>n.name.toLowerCase().startsWith(i)))}let mT={contents:[]};function gT(e,t,r){if(!mT.contents.includes(e)){mT.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as notifications but has no '+t+" field — no notification bell is wired. The convention expects a string field named "+r.join(" | ")+"; see docs/guides/notifications-read-model-convention.md.");return}}function z0e(e){return ie(e.readModels.filter(t=>O0e(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=IL(t.schema,pT),n=D0e(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:F0e(t.schema),readField:I0e(t.schema),refFields:P0e(t.schema,n),markReadCommand:L0e(t,e)};gT(t.name,"recipient",DL);return}else{gT(t.name,"message",pT);return}})[0]}function gc(e,t){return R(O(e,t),ue)}function U0e(e,t,r){let n=gc(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function Gm(e,t){return R(R(t.timestampField,r=>gc(e,r)),Dn)}function B0e(e,t,r){let n=t.readField;if(n!==void 0){let o=Q(O(e,n),it);return o==="JSONTrue"&&typeof o!="object"}let i=Gm(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function j0e(e,t,r,n){return ie(t,i=>{let o=D(Y(i),{});if(U0e(o,e,r))return o}).toSorted((i,o)=>{let a=Gm(i,e),s=Gm(o,e);return a!==void 0?s!==void 0?s-a:-1:s!==void 0?1:0}).map((i,o)=>({id:D(gc(i,"id"),"#"+o.toString()),message:D(gc(i,e.messageField),""),timestamp:R(e.timestampField,a=>gc(i,a)),read:B0e(i,e,n),refs:ie(e.refFields,a=>Q(gc(i,a.field),s=>[a.stem,s]))}))}function q0e(e,t){return ot(t,void 0,(r,n)=>{let i=D(Y(n),{}),o=Gm(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function V0e(e,t){let r=D(R(e.markReadCommand,n=>n.aggregateIdField),"id");return ut([[r,t]])}function K0e(e,t){let r=e.length,n=t.length,i=NF((r+1|0)*(n+1|0)|0,0),o=(u,d)=>i[(u*(n+1|0)|0)+d|0];for(let u=0;u<r;++u)for(let d=0;d<n;++d)i[((u+1|0)*(n+1|0)|0)+(d+1|0)|0]=e[u]===t[d]?o(u,d)+1|0:o(u,d+1|0)>o(u+1|0,d)?o(u,d+1|0):o(u+1|0,d);let a=[],s=r,l=n;for(;s>0||l>0;){let u=e[s-1|0],d=t[l-1|0];s>0&&l>0&&u===d?(a=[{kind:"Unchanged",text:u}].concat(a),s=s-1|0,l=l-1|0):l>0&&(s===0||o(s,l-1|0)>=o(s-1|0,l))?(a=[{kind:"Added",text:d}].concat(a),l=l-1|0):(a=[{kind:"Removed",text:u}].concat(a),s=s-1|0)}return a}function ql(e){return"var("+e+")"}let H0e=S([c("font-family",ql(T.fontFamilyMono)),c("font-size",ql(T.sizeSm)),c("line-height",ql(T.lineHeightNormal)),c("border","1px solid var("+y.border+")"),c("border-radius",ql(X.md)),fs("auto")]),ub=S([z("flex"),c("padding","1px var("+F.md+")")]),W0e=S([c("background","rgba(248,81,73,0.12)"),c("color",ql(y.error))]),G0e=S([c("background","rgba(63,185,80,0.12)"),c("color",ql(y.success))]),J0e=S([c("color",ql(y.textSecondary))]),Q0e=S([c("width","16px"),vi(0),c("user-select","none"),iI(Ce(8))]);function Y0e(e){let t=e.before.split(`
|
|
57
|
+
`),r=e.after.split(`
|
|
58
|
+
`),n=K0e(t,r);return b("div",{children:n.map((i,o)=>{let a=i.kind,s;switch(a){case"Removed":s=[ub+" "+W0e,"-"];break;case"Added":s=[ub+" "+G0e,"+"];break;case"Unchanged":s=[ub+" "+J0e," "];break}return L("div",{children:[b("span",{children:s[1],className:Q0e}),b("span",{children:i.text})],className:s[0]},o.toString())}),className:H0e})}let X0e=Y0e;function av(e,t){let r=new Date(t).getTime();if(Number.isNaN(r))return t;let n=(e-r)/1e3;return n<45?"just now":n<3600?Math.floor(n/60).toString()+"m ago":n<86400?Math.floor(n/3600).toString()+"h ago":n<1209600?Math.floor(n/86400).toString()+"d ago":t.slice(0,10)}function Qn(e){return"var("+e+")"}let Z0e=S([z("flex"),pe("column"),c("gap","2px"),c("font-family",Qn(T.fontFamily)),c("font-size",Qn(T.sizeSm))]),vT=S([z("flex"),Z("flexStart"),c("gap","10px"),c("padding",Qn(F.xs)+" "+Qn(F.sm)),c("border-radius",Qn(X.sm))]),eme=S([xe("pointer"),Je([c("background",Qn(y.surfaceSubtle))])]),tme=S([z("flex"),pe("column"),c("gap","2px"),c("min-width","0"),c("flex","1")]),rme=S([c("color",Qn(y.textPrimary))]),nme=S([c("font-weight",Qn(T.weightMedium))]),ime=S([c("color",Qn(y.textSecondary))]),ome=S([z("inlineFlex"),Z("center"),c("gap","6px"),c("color",Qn(y.textSecondary)),c("font-size",Qn(T.sizeXs)),c("white-space","nowrap")]),ame=S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("flex-shrink","0")]),sme=S([c("background","none"),c("border","none"),c("padding","0"),c("color",Qn(y.brand)),c("font-size",Qn(T.sizeXs)),xe("pointer"),c("text-align","left"),Je([c("text-decoration","underline")])]),lme=S([c("margin-top","4px"),c("max-width","560px")]),ume=S([c("color",Qn(y.textSecondary)),c("padding",Qn(F.md)),hs("center")]);function cme(e){let t=e.onClick,r=e.entry,n=se(()=>!1),i=n[1],o=n[0],a=Ge(r.before)&&Ge(r.after),s=D(r.actor,r.subject),l=t!==void 0?vT+" "+eme:vT,u=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[b(sd,{name:s,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[u!==void 0?b("span",{children:u+" ",className:nme}):null,b("span",{children:r.verb+" ",className:ime}),r.subject],className:rme}),L("span",{children:[d!==void 0?b("span",{className:ame,style:{background:d}}):null,f!==void 0?av(e.nowMs,f):null],className:ome}),a?b("button",{children:o?"Hide changes":"Show changes",className:sme,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&a?b("div",{children:b(X0e,{before:D(r.before,""),after:D(r.after,"")}),className:lme}):null],className:tme})],className:l,onClick:h=>ae(t,p=>p(r))})}function dme(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",a=t!==void 0?t:Date.now();return i.length===0?b("div",{children:o,className:ume}):b("div",{children:i.map(s=>b(cme,{entry:s,nowMs:a,onClick:r},s.id)),className:Z0e})}let fme=dme;function Ft(e){return"var("+e+")"}let hme=S([qt("relative"),z("inlineBlock")]),pme=S([qt("relative"),z("inlineFlex"),Z("center"),Ze("center"),c("background","none"),c("border","none"),c("border-radius",Ft(X.md)),c("cursor","pointer"),c("color",Ft(y.textSecondary)),c("padding","6px"),Je([c("background",Ft(y.surfaceSubtle)),c("color",Ft(y.textPrimary))])]),mme=S([qt("absolute"),ps(Ce(0)),bl(Ce(0)),z("inlineFlex"),Z("center"),Ze("center"),c("min-width","16px"),c("height","16px"),c("padding","0 4px"),c("border-radius",Ft(X.full)),c("background",Ft(y.brand)),c("color",Ft(y.textOnBrand)),c("font-family",Ft(T.fontFamily)),c("font-size","10px"),c("font-weight",Ft(T.weightBold)),c("line-height","1")]),gme=S([qt("absolute"),bl(Ce(0)),ps({NAME:"percent",VAL:100}),Ca(Ce(4)),c("width","320px"),c("background",Ft(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",Ft(X.md)),c("box-shadow",Ft(_n.md)),c("z-index","200"),c("overflow","hidden"),c("font-family",Ft(T.fontFamily))]),vme=S([z("flex"),Z("center"),Ze("spaceBetween"),c("padding","var("+F.sm+") var("+F.md+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",Ft(y.textSecondary)),c("font-size",Ft(T.sizeSm)),c("font-weight",Ft(T.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),_me=S([c("background","none"),c("border","none"),c("color",Ft(y.brand)),c("font-size",Ft(T.sizeXs)),c("text-transform","none"),c("letter-spacing","0"),xe("pointer"),Je([c("text-decoration","underline")])]),bme=S([c("max-height","360px"),c("overflow-y","auto")]);function yme(e){return S([z("flex"),Z("flexStart"),c("gap",Ft(F.sm)),c("width","100%"),c("background","none"),c("border","none"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("text-align","left"),c("padding","var("+F.sm+") var("+F.md+")"),xe(e?"pointer":"default"),Je(e?[c("background",Ft(y.surfaceSubtle))]:[])])}function xme(e){return S([c("width","8px"),c("height","8px"),c("border-radius",Ft(X.full)),c("margin-top","5px"),c("flex-shrink","0"),c("background",e?"transparent":Ft(y.brand))])}let Sme=S([z("flex"),pe("column"),c("gap","2px"),c("min-width","0")]);function Eme(e){return S([c("color",Ft(y.textPrimary)),c("font-size",Ft(T.sizeSm)),c("font-weight",Ft(e?T.weightNormal:T.weightMedium)),c("line-height",Ft(T.lineHeightNormal)),c("word-break","break-word")])}let wme=S([c("color",Ft(y.textDisabled)),c("font-size",Ft(T.sizeXs))]),kme=S([c("color",Ft(y.textDisabled)),c("font-size",Ft(T.sizeSm)),c("padding",Ft(F.md)),c("text-align","center")]);function Cme(e){return L("svg",{children:[b("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),b("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],"aria-hidden":!0,height:"18",width:"18",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24"})}function Rme(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,a=e.onOpen,s=e.notifications,l=n!==void 0?n:"No notifications",u=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=se(()=>u),h=f[1],p=f[0],m=s.filter(v=>!v.read).length;Ae(()=>{if(!p)return;let v=x=>h(w=>!1),_=x=>{if(x.key==="Escape")return h(w=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",_),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",_)}},[p]);let g=()=>{let v=!p;v&&ae(i,_=>_()),h(_=>v)};return L("div",{children:[L("button",{children:[b(Cme,{}),m>0?b("span",{children:m>99?"99+":m.toString(),className:mme}):null],"aria-label":m>0?"Notifications ("+m.toString()+" unread)":"Notifications",className:pme,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),g()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&m>0?b("button",{children:"Mark all read",className:_me,type:"button",onClick:v=>o()}):null],className:vme}),s.length===0?b("div",{children:l,className:kme}):b("div",{children:s.map(v=>{let _=v.timestamp;return L("button",{children:[b("span",{className:xme(v.read)}),L("span",{children:[b("span",{children:v.message,className:Eme(v.read)}),_!==void 0?b("span",{children:av(d,_),className:wme}):null],className:Sme})],className:yme(Ge(a)),type:"button",onClick:x=>{ae(a,w=>w(v)),h(w=>!1)}},v.id)}),className:bme})],className:gme,onClick:v=>{v.stopPropagation()}}):null],className:hme})}let Ame=Rme,PL=cr([]),OL=cr(e=>{}),$me=PL.Provider,Tme=OL.Provider;function Nme(e){let t=e.initial,r=t!==void 0?t:[],n=se(()=>r),i=n[1],o=en(a=>i(s=>a),[]);return br(Tme,{value:o,children:br($me,{value:n[0],children:e.children})})}let Dme={make:Nme};function Fme(){return Pt(PL)}function Ime(){return Pt(OL)}function ML(e){return"autoui.notifications.seen."+e}function Pme(e){let t=localStorage.getItem(ML(e));if(t!=null)return jo(t)}function Ome(e,t){localStorage.setItem(ML(e),t.toString())}function Mme(e){let t=e.onData,r=vu(e.binding.readModel,void 0);return Ae(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function Lme(e){let t=Fme(),r=Na(),n=xi(),i=Ra(),o=_l(),a=se(()=>({})),s=a[1],l=a[0],d=se(()=>0)[1],f=E=>(C=>s(k=>{let A=ut(Qe(k));return A[E]=C,A})),h=Q(R(r,E=>E.identity),E=>({userId:E.userId,username:E.username})),p=t.flatMap(E=>{let C=de(O(l,E.pluginId),[],k=>k.rows);return j0e(E.binding,C,h,Pme(E.pluginId)).map(k=>({key:E.pluginId+":"+k.id,appBinding:E,entry:k}))}).toSorted((E,C)=>{let k=R(E.entry.timestamp,Dn),A=R(C.entry.timestamp,Dn);return k!==void 0?A!==void 0?A-k:-1:A!==void 0?1:0}),m=(E,C)=>{let k=E.binding.markReadCommand;if(k!==void 0&&n!==void 0){Ut(n(k.mutationDocument,V0e(E.binding,C)).then(A=>{if(typeof Cd(A)!="object"){let N=E.pluginId;return ae(O(l,N),M=>M.refetch())}}),A=>Promise.resolve());return}},g=E=>ae(p.find(C=>C.key===E.id),C=>{C.entry.read||m(C.appBinding,C.entry.id);let k=C.entry;ae(SU(k.refs,A=>{let $=A[1];return Q(gs(i,A[0]),N=>[N,$])}),A=>{let $=A[0];o(os($.pluginId,$.name,A[1],[]))})}),v=Ge(n)&&t.some(E=>Ge(E.binding.markReadCommand)),_=()=>{p.forEach(E=>{if(!E.entry.read)return m(E.appBinding,E.entry.id)})},x=()=>{t.forEach(E=>{let C=de(O(l,E.pluginId),[],k=>k.rows);ae(q0e(E.binding,C),k=>Ome(E.pluginId,k))}),d(E=>E+1|0)},w=p.map(E=>({id:E.key,message:E.entry.message,timestamp:E.entry.timestamp,read:E.entry.read}));return t.length===0?null:L(Gr,{children:[t.map(E=>b(Mme,{binding:E.binding,onData:f(E.pluginId)},E.pluginId)),b(Ame,{notifications:w,onOpen:g,onMarkAllRead:v?_:void 0,onPanelOpen:x})]})}let zme=Lme;function Ume(e,t,r){if(e===void 0)return!0;let n=t.toLowerCase(),i=r.toLowerCase();return e.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o!=="").some(o=>o.startsWith(".")?n.endsWith(o):o.endsWith("/*")?i.startsWith(o.slice(0,o.length-1|0)):i===o)}function Bme(e){let t=["B","KB","MB","GB"],n=((s,l)=>{for(;;){let u=l,d=s;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function jme(e,t){if(e)return[t,!1];let r=t.slice(0,1);return[r,r.length!==0]}function Zr(e){return"var("+e+")"}let _T=S([z("flex"),pe("column"),Z("center"),Ze("center"),c("gap","6px"),c("padding",Zr(F.lg)),c("border","2px dashed var("+y.border+")"),c("border-radius",Zr(X.md)),c("color",Zr(y.textSecondary)),c("font-family",Zr(T.fontFamily)),c("font-size",Zr(T.sizeSm)),xe("pointer"),c("transition","border-color 120ms, background 120ms"),hs("center")]),qme=S([c("border-color",Zr(y.brand)),c("background",Zr(y.brandSubtle))]),Vme=S([c("font-size",Zr(T.sizeXs))]),Kme=S([z("flex"),Z("center"),c("gap","8px"),c("padding",Zr(F.xs)+" 0"),c("font-family",Zr(T.fontFamily)),c("font-size",Zr(T.sizeSm)),c("color",Zr(y.textPrimary))]),Hme=S([c("flex","1"),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Wme=S([c("color",Zr(y.textSecondary)),c("font-size",Zr(T.sizeXs)),c("white-space","nowrap")]),Gme=S([c("color",Zr(y.success))]),bT=S([c("color",Zr(y.error))]),Jme=S([c("width","120px")]),Qme=S([c("flex","0 0 auto"),c("border","none"),c("background","transparent"),c("padding","0 4px"),c("color",Zr(y.textSecondary)),c("font-size",Zr(T.sizeMd)),PV({NAME:"abs",VAL:1}),xe("pointer")]),Yme=S([c("width","40px"),c("height","40px"),c("flex","0 0 auto"),c("object-fit","cover"),c("border-radius",Zr(X.sm)),c("border","1px solid var("+y.border+")")]);function Xme(e){let t=e.onRemoved,r=e.onUploaded,n=e.label,i=e.multiple,o=e.accept,a=e.adapter,s=i!==void 0?i:!0,l=n!==void 0?n:"Drop files here or click to browse",u=se(()=>[]),d=u[1],f=u[0],h=se(()=>!1),p=h[1],m=We(null),g=We(0),v=We([]),_=We([]);Ae(()=>(()=>{v.current.forEach(P=>{URL.revokeObjectURL(P)})}),[]);let x=(P,I)=>d(U=>U.map(B=>B.key===P?{key:B.key,name:B.name,size:B.size,status:I,preview:B.preview}:B)),w=P=>ae(P.preview,I=>{URL.revokeObjectURL(I),v.current=v.current.filter(U=>U!==I)}),E=P=>ae(a.remove,I=>{Ut(I(P).then(U=>{U.TAG!=="Ok"&&console.error("[FileDropzone] could not remove "+P+": "+U._0)}),U=>(console.error("[FileDropzone] could not remove "+P),Promise.resolve()))}),C=P=>{_.current=_.current.concat([P.key]),w(P);let I=P.status;if(I.TAG!=="Done")return;let U=I._0;ae(t,B=>B(U)),E(U)},k=P=>{let I=jme(s,P),U=I[1];U&&f.forEach(C),I[0].forEach((B,q)=>{let W=U&&q===0;g.current=g.current+1|0;let J=g.current.toString()+":"+B.name,K=Ume(o,B.name,B.type),G=K?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"},re=B.type,oe;if(re.toLowerCase().startsWith("image/")){let He=URL.createObjectURL(B);v.current=v.current.concat([He]),oe=He}else oe=void 0;let _e=B.name,Re=B.size,Te={key:J,name:_e,size:Re,status:G,preview:oe};if(d(He=>W?[Te]:He.concat([Te])),K){Ut(a.upload(B,He=>x(J,{TAG:"Uploading",_0:He})).then(He=>{if(He.TAG==="Ok"){let ge=He._0;_.current.includes(J)?E(ge):(x(J,{TAG:"Done",_0:ge}),ae(r,be=>be(B.name,ge)))}else x(J,{TAG:"Failed",_0:He._0});return Promise.resolve()}),He=>(x(J,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}})},A=P=>{P.preventDefault(),p(U=>!1);let I=P.dataTransfer;if(I!=null)return k(Array.from(I.files))},$=P=>{let I=P.target.files;I!=null&&k(Array.from(I)),P.target.value=""},N=()=>ae(xa(m.current),P=>P.click()),M=h[0]?_T+" "+qme:_T;return L("div",{children:[L("div",{children:[b("span",{children:l}),o!==void 0?b("span",{children:"Accepted: "+o,className:Vme}):null],className:M,role:"button",onClick:P=>N(),onDragLeave:P=>p(I=>!1),onDragOver:P=>{P.preventDefault(),p(I=>!0)},onDrop:A}),b("input",{ref:Jt(m),style:{display:"none"},accept:o,multiple:s,type:"file",onChange:$}),f.map(P=>{let I=P.preview,U=P.status,B;switch(U.TAG){case"Uploading":B=b("span",{children:b(tP,{value:U._0,showValue:!1}),className:Jme});break;case"Done":B=b("span",{children:"Uploaded",className:Gme});break;case"Rejected":B=b("span",{children:"Rejected",className:bT,title:U._0});break;case"Failed":B=b("span",{children:"Failed",className:bT,title:U._0});break}return L("div",{children:[I!==void 0?b("img",{className:Yme,alt:P.name,src:I}):null,b("span",{children:P.name,className:Hme,title:P.name}),b("span",{children:Bme(P.size),className:Wme}),B,b("button",{children:"×","aria-label":"Remove "+P.name,className:Qme,title:"Remove "+P.name,type:"button",onClick:q=>{q.stopPropagation();let W=P.key;ae(f.find(J=>J.key===W),C),d(J=>J.filter(K=>K.key!==W))}})],className:Kme},P.key)})]})}let Zme=Xme;function cb(e){switch(e){case"SubmitStarted":return!1;case"FormOpened":case"SubmitFailed":return!0}}let LL=cr(void 0),ege=LL.Provider;function tge(e){return br(ege,{value:e.session,children:e.children})}let rge={make:tge};function nge(){return Pt(LL)}function ige(e,t){return e.concat([t])}function oge(e,t){return e.filter(r=>r!==t)}function age(e,t){return de(e,[],r=>r.armed.current?t:[])}function zL(e){if(e==="")return[];let t;try{t=_r(JSON.parse(e))}catch{return[e]}return t!==void 0?ie(t,ue):[e]}function sge(e){return{upload:(t,r)=>Promise.resolve({TAG:"Error",_0:e!==void 0?'No upload endpoint is configured for the store "'+e+'".':"No upload endpoint is configured."})}}function lge(e){return ze(R(R(Y(Tn(e)),t=>O(t,"type")),ue),"array")}function UL(e){let t=r=>R(Sa(r).storeTarget,sH);return nd(t(e),R(qF(e),t))}function uge(e,t,r){return nd(R(UL(e),r),t)}function cge(e,t,r){return D(uge(e,t,r),sge(UL(e)))}function dge(e){let t=e.onChange,r=e.value,n=e.multiple,i=e.adapter,o=We(n?zL(r):r===""?[]:[r]),a=We([]),s=nge(),l=h=>n?JSON.stringify(h.map(p=>p)):D(h[0],""),u=(h,p)=>{let m=n?o.current.concat([p]):[p];o.current=m,a.current=ige(a.current,p),t(l(m))},d=h=>{let p=o.current.filter(m=>m!==h);o.current=p,a.current=oge(a.current,h),t(l(p))},f=h=>ae(i.remove,p=>{Ut(p(h).then(m=>{m.TAG!=="Ok"&&console.error("[FileDropzoneInput] could not release "+h+": "+m._0)}),m=>(console.error("[FileDropzoneInput] could not release "+h),Promise.resolve()))});return Ae(()=>(()=>{age(s,a.current).forEach(f)}),[]),b(Zme,{adapter:i,accept:e.accept,multiple:n,onUploaded:u,onRemoved:d})}function fge(e,t,r,n){if(n&&zL(r).length===0)return"Required"}function hge(e,t,r){let n=e!==void 0?e:a=>{},i=(a,s,l,u,d,f,h)=>b(dge,{adapter:cge(s,void 0,n),accept:t,multiple:D(r,lge(s)),value:l,onChange:u}),o=a=>{let l={...D(eie(a),{cell:(u,d,f)=>{},detail:(u,d,f)=>{}})};xr(a,(l.validateInput=fge,l.input=i,l))};o("File"),o("Image")}var pge={FRAGMENT:"Fragment",INLINE_DATA_FRAGMENT:"InlineDataFragment",LINKED_FIELD:"LinkedField",LITERAL:"Literal",LIST_VALUE:"ListValue",RELAY_LIVE_RESOLVER:"RelayLiveResolver",OBJECT_VALUE:"ObjectValue",REQUEST:"Request",SCALAR_FIELD:"ScalarField",SPLIT_OPERATION:"SplitOperation",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"},Du=pge,mge=function(e,t,r,n,i,o,a,s){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Pe=mge;function sv(e){return function(){return e}}var Rd=function(){};Rd.thatReturns=sv;Rd.thatReturnsFalse=sv(!1);Rd.thatReturnsTrue=sv(!0);Rd.thatReturnsNull=sv(null);Rd.thatReturnsThis=function(){return this};Rd.thatReturnsArgument=function(e){return e};var lv=Du,np=Pe;function gge(e){np(!1)}function bs(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function BL(e){var t=bs(e);return typeof t=="object"&&t!==null&&t.kind===lv.FRAGMENT}function jL(e){var t=bs(e);return typeof t=="object"&&t!==null&&t.kind===lv.REQUEST}function vge(e){var t=bs(e);return typeof t=="object"&&t!==null&&t.kind===lv.UPDATABLE_QUERY}function qL(e){var t=bs(e);return typeof t=="object"&&t!==null&&t.kind===lv.INLINE_DATA_FRAGMENT}function Iw(e){var t=bs(e);return BL(t)||np(!1),t}function _ge(e){var t,r=Iw(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch,i=n?.connection;return n===null||typeof n!="object"||i===null||typeof i!="object"?null:r}function bge(e){var t,r=Iw(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function yge(e){var t=bs(e);return jL(t)||np(!1),t}function xge(e){var t=bs(e);return vge(t)||np(!1),t}function Sge(e){var t=bs(e);return qL(t)||np(!1),t}var Zo={getFragment:Iw,getNode:bs,getPaginationFragment:_ge,getRefetchableFragment:bge,getRequest:yge,getUpdatableQuery:xge,getInlineDataFragment:Sge,graphql:gge,isFragment:BL,isRequest:jL,isInlineDataFragment:qL},VL={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(VL);var Ke=VL.exports,KL={exports:{}},HL={exports:{}},WL={exports:{}},GL={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(GL);var JL=GL.exports,QL={exports:{}};(function(e){var t=JL.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,i||"default");if(t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(QL);var Ege=QL.exports;(function(e){var t=JL.default,r=Ege;function n(i){var o=r(i,"string");return t(o)=="symbol"?o:o+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(WL);var YL=WL.exports;(function(e){var t=YL;function r(n,i,o){return(i=t(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(HL);var ei=HL.exports;(function(e){var t=ei;function r(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);o&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),a.push.apply(a,s)}return a}function n(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?r(Object(a),!0).forEach(function(s){t(i,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(a,s))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(KL);var Wt=KL.exports,XL={exports:{}},ZL={exports:{}},e8={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,o=Array(n);i<n;i++)o[i]=r[i];return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(e8);var t8=e8.exports;(function(e){var t=t8;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var o={}.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(ZL);var r8=ZL.exports;(function(e){var t=r8;function r(n,i){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!o){if(Array.isArray(n)||(o=t(n))||i&&n&&typeof n.length=="number"){o&&(n=o);var a=0,s=function(){};return{s,n:function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,u=!0,d=!1;return{s:function(){o=o.call(n)},n:function(){var h=o.next();return u=h.done,h},e:function(h){d=!0,l=h},f:function(){try{u||o.return==null||o.return()}finally{if(d)throw l}}}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(XL);var Pr=XL.exports,n8=Ke.default,yT=n8(Wt),xT=n8(Pr),wge=Pe;function kge(e,t,r){var n=(0,xT.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,yT.default)((0,yT.default)({},o),{},{uiContext:r}))}}catch(u){n.e(u)}finally{n.f()}var a=(0,xT.default)(t),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(i8(l))switch(l.kind){case"relay_resolver.error":throw new Error("Relay: Resolver error at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'. Message: ").concat(l.error.message));case"relay_field_payload.error":throw new Error("Relay: Unexpected response payload - check server logs for details.");case"missing_expected_data.throw":throw new Error("Relay: Missing expected data at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.throw":throw new Error("Relay: Missing @required value at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.log":case"missing_expected_data.log":break;default:l.kind,wge(!1)}}}catch(u){a.e(u)}finally{a.f()}}function i8(e){switch(e.kind){case"relay_resolver.error":case"relay_field_payload.error":return e.shouldThrow&&!e.handled;case"missing_expected_data.throw":case"missing_required_field.throw":return!e.handled;case"missing_required_field.log":case"missing_expected_data.log":return!1;default:throw e.kind,new Error("Relay: Unexpected event kind")}}function Cge(e,t,r){t!=null&&kge(e,t,r)}var ip={handlePotentialSnapshotErrors:Cge,eventShouldThrow:i8},o8={exports:{}},a8={exports:{}};(function(e){var t=t8;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(a8);var Rge=a8.exports,s8={exports:{}};(function(e){function t(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(s8);var Age=s8.exports,l8={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
60
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(l8);var $ge=l8.exports;(function(e){var t=Rge,r=Age,n=r8,i=$ge;function o(a){return t(a)||r(a)||n(a)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(o8);var Sl=o8.exports,u8={DEFAULT_HANDLE_KEY:""},Tge=u8,Nge=Tge.DEFAULT_HANDLE_KEY,Dge=Pe;function Fge(e,t,r){return t&&t!==Nge?"__".concat(t,"_").concat(e):(r==null&&Dge(!1),"__".concat(r,"_").concat(e))}var c8=Fge,Ige={ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_STORE_ID_COLLISION_LOGGING:!1,ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION:!1,MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD:!1,ENABLE_CYLE_DETECTION_IN_VARIABLES:!1,ENABLE_ACTIVITY_COMPATIBILITY:!1,ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX:!0,ENABLE_USE_PAGINATION_IS_LOADING_FIX:!1,DISALLOW_NESTED_UPDATES:!1,ENABLE_TYPENAME_PREFIXED_DATA_ID:!1,ENABLE_UI_CONTEXT_ON_RELAY_LOGGER:!1,CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES:!1},yo=Ige;function Y1(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(Y1);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=Y1(e[t[n]]);return r}function d8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(!e||typeof e!="object")return!1;if(t.has(e))return!0;var r=new Set(t);r.add(e);var n=Array.isArray(e)?e:Object.values(e);return n.some(function(i){return d8(i,r)})}var Fu={stableCopy:Y1,hasCycle:d8},Pge=Ke.default,Oge=Pge(Sl),Mge=c8,uv=Du,Lge=yo,zge=Fu,f8=zge.stableCopy,Uge=Pe,Bge=uv.VARIABLE,jge=uv.LITERAL,qge=uv.OBJECT_VALUE,Vge=uv.LIST_VALUE,Kge="__errors",Hge="__module_component_",Wge="__module_operation_";function X1(e,t){if(e.kind===Bge)return Xge(e.variableName,t);if(e.kind===jge)return e.value;if(e.kind===qge){var r={};return e.fields.forEach(function(i){r[i.name]=X1(i,t)}),r}else if(e.kind===Vge){var n=[];return e.items.forEach(function(i){i!=null&&n.push(X1(i,t))}),n}}function Pw(e,t,r){var n={};return r&&(n[p8.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=X1(i,t)}),n}function Gge(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,a=e.args,s=e.filters,l=Mge(n,i,o),u=null;return a&&s&&a.length!==0&&s.length!==0&&(u=a.filter(function(d){return s.indexOf(d.name)>-1})),r&&(u=u!=null?[r].concat((0,Oge.default)(u)):[r]),u===null?l:Ow(l,Pw(u,t))}function h8(e,t){if(e.storageKey)return e.storageKey;var r=Qge(e),n=e.name;return r&&r.length!==0?Ow(n,Pw(r,t)):n}function Jge(e,t){var r=h8(e,t);return Lge.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function Qge(e){if(e.kind==="RelayResolver"||e.kind==="RelayLiveResolver"){var t;if(e.args==null){var r;return(r=e.fragment)===null||r===void 0?void 0:r.args}return((t=e.fragment)===null||t===void 0?void 0:t.args)==null?e.args:e.args.concat(e.fragment.args)}var n=typeof e.args>"u"?void 0:e.args;return n}function Yge(e,t){return Ow(e,f8(t))}function Ow(e,t){if(!t)return e;var r=[];for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i!=null){var o;r.push(n+":"+((o=JSON.stringify(i))!==null&&o!==void 0?o:"undefined"))}}return r.length===0?e:e+"(".concat(r.join(","),")")}function Xge(e,t){return t.hasOwnProperty(e)||Uge(!1),f8(t[e])}function Zge(e){return"".concat(Hge).concat(e)}function eve(e){return"".concat(Wge).concat(e)}var p8={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"$isWithinUnmatchedTypeRefinement",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ERRORS_KEY:Kge,ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",getArgumentValues:Pw,getHandleStorageKey:Gge,getStorageKey:h8,getReadTimeResolverStorageKey:Jge,getStableStorageKey:Yge,getModuleComponentKey:Zge,getModuleOperationKey:eve},dr=p8,tve=Ke.default,m8=tve(Wt),rve=dr,nve=rve.getArgumentValues,ive=Pe;function ove(e,t,r){if(e.argumentDefinitions==null)return r;var n;return e.argumentDefinitions.forEach(function(i){if(!r.hasOwnProperty(i.name))switch(n=n||(0,m8.default)({},r),i.kind){case"LocalArgument":n[i.name]=i.defaultValue;break;case"RootArgument":if(!t.hasOwnProperty(i.name)){n[i.name]=void 0;break}n[i.name]=t[i.name];break;default:ive(!1)}}),n||r}function ave(e,t,r){var n={};return e.argumentDefinitions.forEach(function(i){var o=i.defaultValue;r[i.name]!=null&&(o=r[i.name]),n[i.name]=o}),t!=null&&Object.keys(t).forEach(function(i){n[i]=t[i].get()}),n}function sve(e,t,r){if(t==null)return e;var n=(0,m8.default)({},e),i=r?nve(r,e):{};return t.forEach(function(o){var a,s=(a=i[o.name])!==null&&a!==void 0?a:o.defaultValue;n[o.name]=s}),n}var El={getLocalVariables:sve,getFragmentVariables:ove,getOperationVariables:ave},db=[],fb=[];/**
|
|
61
|
+
* Checks if two values are equal. Values may be primitives, arrays, or objects.
|
|
62
|
+
* Returns true if both arguments have the same keys and values.
|
|
63
|
+
*
|
|
64
|
+
* @see http://underscorejs.org
|
|
65
|
+
* @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function lve(e,t){var r=db.length?db.pop():[],n=fb.length?fb.pop():[],i=Z1(e,t,r,n);return r.length=0,n.length=0,db.push(r),fb.push(n),i}function Z1(e,t,r,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;var i=Object.prototype.toString,o=i.call(e);if(o!=i.call(t))return!1;switch(o){case"[object String]":return e==String(t);case"[object Number]":return isNaN(e)||isNaN(t)?!1:e==Number(t);case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}for(var a=r.length;a--;)if(r[a]==e)return n[a]==t;r.push(e),n.push(t);var s=0;if(o==="[object Array]"){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!Z1(e[s],t[s],r,n))return!1}else{if(e.constructor!==t.constructor)return!1;if(e.hasOwnProperty("valueOf")&&t.hasOwnProperty("valueOf"))return e.valueOf()==t.valueOf();var l=Object.keys(e);if(l.length!=Object.keys(t).length)return!1;for(var u=0;u<l.length;u++)if(!Z1(e[l[u]],t[l[u]],r,n))return!1}return r.pop(),n.pop(),!0}var ys=lve,uve=El,cve=uve.getFragmentVariables,op=dr,dve=op.CLIENT_EDGE_TRAVERSAL_PATH,fve=op.FRAGMENT_OWNER_KEY,hve=op.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,pve=op.FRAGMENTS_KEY,g8=op.ID_KEY,v8=ys,hl=Pe;function cv(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||hl(!1);var r=t[g8],n=t[pve],i=t[fve],o=t[dve];if(typeof r=="string"&&typeof n=="object"&&n!==null&&typeof n[e.name]=="object"&&n[e.name]!==null&&typeof i=="object"&&i!==null&&(o==null||Array.isArray(o))){var a=i,s=o,l=n[e.name],u=cve(e,a.variables,l),d=l[hve]===!0;return w8(e,r,u,a,d,s)}return null}function _8(e,t){var r=null;return t.forEach(function(n,i){var o=n!=null?cv(e,n):null;o!=null&&(r=r||[],r.push(o))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function b8(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||hl(!1),_8(e,t)):(Array.isArray(t)&&hl(!1),cv(e,t))}function mve(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=b8(i,o)}return r}function gve(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=y8(i,o)}return r}function y8(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||hl(!1),vve(e,t)):(Array.isArray(t)&&hl(!1),x8(e,t))}function vve(e,t){var r=null;return t.forEach(function(n){var i=n!=null?x8(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function x8(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||hl(!1);var r=t[g8];return typeof r=="string"?r:null}function _ve(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],a=S8(i,o);Object.assign(r,a)}return r}function S8(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||hl(!1),E8(e,t)):(Array.isArray(t)&&hl(!1),Mw(e,t)||{})}function Mw(e,t){var r=cv(e,t);return r?r.variables:null}function E8(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=Mw(e,n);o!=null&&Object.assign(r,o)}}),r}function ST(e,t){return e.dataID===t.dataID&&e.node===t.node&&v8(e.variables,t.variables)&&bve(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&yve(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function bve(e,t){return e===t?!0:e.identifier===t.identifier&&v8(e.cacheConfig,t.cacheConfig)}function yve(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=e.length;r--;){var n=e[r],i=t[r];if(n!==i&&(n==null||i==null||n.clientEdgeDestinationID!==i.clientEdgeDestinationID||n.readerClientEdge!==i.readerClientEdge))return!1}return!0}function xve(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?ST(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return ST(r,t.selectors[n])}):!1}function w8(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o=arguments.length>5?arguments[5]:void 0;return{kind:"SingularReaderSelector",dataID:t,isWithinUnmatchedTypeRefinement:i,clientEdgeTraversalPath:o??null,node:e,variables:r,owner:n}}function Sve(e,t,r){return{dataID:t,node:e,variables:r}}var ea={areEqualSelectors:xve,createReaderSelector:w8,createNormalizationSelector:Sve,getDataIDsFromFragment:y8,getDataIDsFromObject:gve,getSingularSelector:cv,getPluralSelector:_8,getSelector:b8,getSelectorsFromObject:mve,getVariablesFromSingularFragment:Mw,getVariablesFromPluralFragment:E8,getVariablesFromFragment:S8,getVariablesFromObject:_ve},Eve=Zo,wve=Eve.getFragment,kve=ip,Cve=kve.eventShouldThrow,Rve=ea,Ave=Rve.getSelector,ET=Pe,Ff=[];function $ve(e,t){Ff.push(e);try{return t()}finally{Ff.pop()}}function Tve(e,t){if(!Ff.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Ff[Ff.length-1],n=wve(e),i=Ave(n,t);i==null&&ET(!1),i.kind!=="SingularReaderSelector"&&ET(!1);var o=r.getDataForResolverFragment(i,t),a=o.data,s=o.isMissingData,l=o.fieldErrors;if(s||l!=null&&l.some(Cve))throw k8;return a}var k8={},Lw={readFragment:Tve,withResolverContext:$ve,RESOLVER_FRAGMENT_ERRORED_SENTINEL:k8},Nve=Lw;Nve.readFragment;var C8={exports:{}};(function(e){function t(n,i,o,a,s,l,u){try{var d=n[l](u),f=d.value}catch(h){return void o(h)}d.done?i(f):Promise.resolve(f).then(a,s)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(a,s){var l=n.apply(i,o);function u(f){t(l,a,s,u,d,"next",f)}function d(f){t(l,a,s,u,d,"throw",f)}u(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(C8);var R8=C8.exports;function Dve(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var A8=Dve,Fve=A8,ja=zve,wh=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){ja=n},e.from=function(n){return Ive(n)?Pve(n):Fve(n)?Ove(n):Mve(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){a=d},next:o.next,complete:o.complete,error:o.error})}catch(u){o.error(u,!0)}}}),function(){return a.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,error:o.error,complete:function(){a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var a=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(u){ja(u,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:a("start"),next:a("next"),error:a("error"),complete:a("complete"),unsubscribe:a("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var a=i.subscribe(o);return function(){a.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var a=!1,s;return s=i.subscribe({next:function(u){a=!0,o.next(u)},error:o.error,complete:function(){a?o.complete():s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.subscribe=function(n){return Lve(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var a=i.subscribe({complete:o.complete,error:o.error,next:function(l){try{var u=n(l);o.next(u)}catch(d){o.error(d,!0)}}});return function(){a.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var a=[];function s(u){this._sub=u,a.push(u)}function l(){a.splice(a.indexOf(this._sub),1),a.length===0&&o.complete()}return i.subscribe({start:s,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:s,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){a.forEach(function(u){return u.unsubscribe()}),a.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var a,s,l=function u(){a=i.subscribe({next:o.next,error:o.error,complete:function(){s=setTimeout(u,n)}})};return l(),function(){clearTimeout(s),a.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var a=!1;n.subscribe({next:function(l){a||(a=!0,i(l))},error:o,complete:i})})},e})();function Ive(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function Pve(e){return e instanceof wh?e:wh.create(function(t){return e.subscribe(t)})}function Ove(e){return wh.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function Mve(e){return wh.create(function(t){t.next(e),t.complete()})}function Lve(e,t){var r=!1,n,i=function(u){return Object.defineProperty(u,"closed",{get:function(){return r}})};function o(){if(n){if(n.unsubscribe)n.unsubscribe();else try{n()}catch(l){ja(l,!0)}n=void 0}}var a=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(a)}catch(u){ja(u,!0)}finally{o()}}}});try{t.start&&t.start(a)}catch(l){ja(l,!0)}if(r)return a;var s=i({next:function(u){if(!r&&t.next)try{t.next(u)}catch(d){ja(d,!0)}},error:function(u,d){if(r||!t.error)r=!0,ja(u,d||!1),o();else{r=!0;try{t.error(u)}catch(f){ja(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(u){ja(u,!0)}finally{o()}}}});try{n=e(s)}catch(l){s.error(l,!0)}return r&&o(),a}function zve(e,t){}var wl=wh,$8=Ke.default,Uve=$8(Pr),Yp=$8(ei),Bve=wl,jve=Pe,qve=(function(){function e(){var r=this;(0,Yp.default)(this,"_complete",!1),(0,Yp.default)(this,"_events",[]),(0,Yp.default)(this,"_sinks",new Set),(0,Yp.default)(this,"_subscription",[]),this._observable=Bve.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var a=i[o];switch(a.kind){case"complete":n.complete();break;case"error":n.error(a.error);break;case"next":n.next(a.data);break;default:a.kind,jve(!1)}}return function(){r._sinks.delete(n)}})}var t=e.prototype;return t.complete=function(){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"complete"}),this._sinks.forEach(function(n){return n.complete()}))},t.error=function(n){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"error",error:n}),this._sinks.forEach(function(i){return i.error(n)}))},t.next=function(n){this._complete!==!0&&(this._events.push({kind:"next",data:n}),this._sinks.forEach(function(i){return i.next(n)}))},t.subscribe=function(n){var i=this._observable.subscribe(n);return this._subscription.push(i),i},t.unsubscribe=function(){var n=(0,Uve.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(a){n.e(a)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),T8=qve,zw=wl,wT=T8,N8=Pe,Vve=typeof WeakMap=="function",kT=Vve?new WeakMap:new Map;function Kve(e,t){return D8(e,t.request.identifier,function(){return e.execute({operation:t})})}function D8(e,t,r){return zw.create(function(n){var i=Uw(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(s){o={identifier:t,subject:new wT,subjectForInFlightStatus:new wT,subscription:s,promise:null},i.set(t,o)},next:function(s){var l=Xp(i,t);l.subject.next(s),l.subjectForInFlightStatus.next(s)},error:function(s){var l=Xp(i,t);l.subject.error(s),l.subjectForInFlightStatus.error(s)},complete:function(){var s=Xp(i,t);s.subject.complete(),s.subjectForInFlightStatus.complete()},unsubscribe:function(s){var l=Xp(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&N8(!1),Hve(i,o).subscribe(n)})}function Hve(e,t){return zw.create(function(r){var n=t.subject.subscribe(r);return function(){n.unsubscribe();var i=e.get(t.identifier);if(i){var o=i.subscription;o!=null&&i.subject.getObserverCount()===0&&(o.unsubscribe(),e.delete(t.identifier))}}})}function F8(e,t,r){return zw.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(a){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function Wve(e,t){var r=Uw(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,a){var s=!1;F8(e,r,n).subscribe({complete:o,error:a,next:function(u){s&&o(u)}}),s=!0});return i}function Gve(e,t){var r=Uw(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:F8(e,r,n)}function Uw(e){var t=kT.get(e);if(t!=null)return t;var r=new Map;return kT.set(e,r),r}function Xp(e,t){var r=e.get(t);return r==null&&N8(!1),r}var dv={fetchQuery:Kve,fetchQueryDeduped:D8,getPromiseForActiveRequest:Wve,getObservableForActiveRequest:Gve},Jve=Ke.default;R8.default;var Qve=Jve(Pr),I8=wl,Yve=dv,Xve=Yve.getObservableForActiveRequest,Zve=Zo,e_e=Zve.getFragment,t_e=ip,r_e=t_e.handlePotentialSnapshotErrors,n_e=ea,i_e=n_e.getSelector,G0=Pe;function o_e(e,t,r){var n,i=e_e(t),o=i_e(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&G0(!1),o==null&&G0(!1),o.kind){case"SingularReaderSelector":return a_e(e,t,o);case"PluralReaderSelector":return s_e(e,t,o)}G0(!1)}function a_e(e,t,r){var n=e.lookup(r);return I8.create(function(i){i.next(Jm(e,t,r.owner,n));var o=e.subscribe(n,function(a){i.next(Jm(e,t,r.owner,a))});return function(){return o.dispose()}})}function s_e(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return I8.create(function(i){var o=n.map(function(s,l){return Jm(e,t,r.selectors[l].owner,s)});i.next(CT(o));var a=n.map(function(s,l){return e.subscribe(s,function(u){o[l]=Jm(e,t,r.selectors[l].owner,u),i.next(CT(o))})});return function(){return a.forEach(function(s){return s.dispose()})}})}function Jm(e,t,r,n){var i=n.missingLiveResolverFields!=null&&n.missingLiveResolverFields.length>0,o=n.missingClientEdges!=null&&n.missingClientEdges.length>0;if(i||o)return{state:"loading"};if(n.isMissingData&&(Xve(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{r_e(e,n.fieldErrors)}catch(a){return{error:a,state:"error"}}return n.data==null&&G0(!1),{state:"ok",value:n.data}}function CT(e){var t=[],r=(0,Qve.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.state==="ok")t.push(i.value);else return i}}catch(o){r.e(o)}finally{r.f()}return{state:"ok",value:t}}var Bw={observeFragment:o_e};function P8(e){return l_e(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&P8(r)})),e}function l_e(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var O8=P8,u_e=Fu,c_e=u_e.stableCopy,d_e=Pe;function f_e(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&d_e(!1),r+JSON.stringify(c_e(t))}var M8=f_e,h_e=M8,p_e=yo,m_e=Fu,g_e=m_e.hasCycle,v_e=El,__e=v_e.getOperationVariables,L8=ea,b_e=L8.createNormalizationSelector,y_e=L8.createReaderSelector,x_e=dr,S_e=x_e.ROOT_ID,E_e=Pe;function w_e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:S_e,i=e.operation,o=__e(i,e.params.providedVariables,t);p_e.ENABLE_CYLE_DETECTION_IN_VARIABLES&&g_e(o)&&E_e(!1);var a=z8(e,o,r),s={fragment:y_e(e.fragment,n,o,a),request:a,root:b_e(i,n,o)};return s}function z8(e,t,r){var n={identifier:h_e(e.params,t),node:e,variables:t,cacheConfig:r};return n}var kl={createOperationDescriptor:w_e,createRequestDescriptor:z8},k_e=Ke.default,C_e=k_e(ei),R_e=Bw,A_e=R_e.observeFragment,$_e=kl,T_e=$_e.createOperationDescriptor;function N_e(e,t,r){var n=T_e(t,r),i={__id:n.fragment.dataID,__fragments:(0,C_e.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return A_e(e,o,i)}var D_e={observeQuery:N_e},F_e=R8.default,I_e=Bw,P_e=I_e.observeFragment;function O_e(e,t,r){return ex.apply(this,arguments)}function ex(){return ex=F_e(function*(e,t,r){var n;try{var i,o=yield new Promise(function(s,l){n=P_e(e,t,r).subscribe({next:function(d){d.state==="ok"?s(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(s){var a;throw(a=n)===null||a===void 0||a.unsubscribe(),s}}),ex.apply(this,arguments)}var M_e={waitForFragmentData:O_e},L_e=Bw;L_e.observeFragment;var z_e=D_e;z_e.observeQuery;var U_e=M_e;U_e.waitForFragmentData;function B_e(e){return e.ok===!0}function j_e(e){return e.ok===!1}var q_e={isValueResult:B_e,isErrorResult:j_e},RT=new Map,V_e=1,K_e=H_e(),U8=" ",AT="\v";function H_e(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function W_e(e){return e[0]===U8&&K_e.has(e[1])||e[0]===AT?AT+e:e}function G_e(e,t){if(t==null||e.length<t)return W_e(e);var r=RT.get(e);return r!=null||(r=U8+V_e++,RT.set(e,r)),r}var B8={intern:G_e},$T=yo,J_e=B8,Q_e=J_e.intern,kh="client:";function Y_e(e,t,r){var n=$T.STRING_INTERN_LEVEL<=0?e:Q_e(e,$T.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(kh)!==0&&(i=kh+i),i}function X_e(e){return e.indexOf(kh)===0}var Z_e=0;function ebe(){return"".concat(kh,"local:").concat(Z_e++)}function tbe(e,t,r){var n="".concat(kh).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var Da={generateClientID:Y_e,generateClientObjectClientID:tbe,generateUniqueClientID:ebe,isClientID:X_e},rbe={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},TT={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},nbe={inject:function(t){TT=t},get:function(){return TT},isConnectionCall:function(t){return rbe.hasOwnProperty(t.name)}},jw=nbe,ibe=Da,Ch=ibe.generateClientID,obe=dr,abe=obe.getStableStorageKey,j8=c8,Iu=jw,sbe=Pe,q8="connection",tx="__connection_next_edge_index";function lbe(e,t){var r=e.get(t.dataID);if(r){var n=Iu.get(),i=n.EDGES,o=n.END_CURSOR,a=n.HAS_NEXT_PAGE,s=n.HAS_PREV_PAGE,l=n.PAGE_INFO,u=n.PAGE_INFO_TYPE,d=n.START_CURSOR,f=r.getLinkedRecord(t.fieldKey),h=f&&f.getLinkedRecord(l);if(!f){r.setValue(null,t.handleKey,void 0,r.getErrors(t.fieldKey));return}var p=Ch(r.getDataID(),t.handleKey),m=r.getLinkedRecord(t.handleKey),g=m??e.get(p),v=g&&g.getLinkedRecord(l);if(g){m==null&&r.setLinkedRecord(g,t.handleKey);var w=g,E=f.getLinkedRecords(i);E&&(E=E.map(function(K){return rx(e,w,K)}));var C=w.getLinkedRecords(i),k=w.getLinkedRecord(l);w.copyFieldsFrom(f),C&&w.setLinkedRecords(C,i),k&&w.setLinkedRecord(k,l);var A=[],$=t.args;if(C&&E)if($.after!=null){var N,M=(N=v)===null||N===void 0?void 0:N.getValue(o),P=h?.getValue(o),I=v&&$.after===M,U=v&&M===P;if(I||U){var B=new Set;Zp(C,A,B),Zp(E,A,B)}else return}else if($.before!=null)if(v&&$.before===v.getValue(d)){var q=new Set;Zp(E,A,q),Zp(C,A,q)}else return;else A=E;else E?A=E:A=C;if(A!=null&&A!==C&&w.setLinkedRecords(A,i),v&&h){if($.after==null&&$.before==null)v.copyFieldsFrom(h);else if($.before!=null||$.after==null&&$.last){v.setValue(!!h.getValue(s),s);var W=h.getValue(d);typeof W=="string"&&v.setValue(W,d)}else if($.after!=null||$.before==null&&$.first){v.setValue(!!h.getValue(a),a);var J=h.getValue(o);typeof J=="string"&&v.setValue(J,o)}}}else{var _=e.create(p,f.getType());_.setValue(0,tx),_.copyFieldsFrom(f);var x=f.getLinkedRecords(i);x&&(x=x.map(function(K){return rx(e,_,K)}),_.setLinkedRecords(x,i)),r.setLinkedRecord(_,t.handleKey),v=e.create(Ch(_.getDataID(),l),u),v.setValue(!1,a),v.setValue(!1,s),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),_.setLinkedRecord(v,l)}}}function ube(e,t,r){var n=j8(q8,t,null);return e.getLinkedRecord(n,r)}function cbe(e,t,r){var n=j8(q8,t,null),i=abe(n,r);return Ch(e,i)}function dbe(e,t,r){var n=Iu.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=a.concat(t);else{s=[];for(var l=!1,u=0;u<a.length;u++){var d=a[u];if(s.push(d),d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}}l||s.push(t)}e.setLinkedRecords(s,o)}function fbe(e,t,r,n){var i=Iu.get(),o=i.NODE,a=Ch(t.getDataID(),r.getDataID()),s=e.get(a);return s||(s=e.create(a,n)),s.setLinkedRecord(r,o),s.getValue("cursor")==null&&s.setValue(null,"cursor"),s}function hbe(e,t,r){var n=Iu.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=[t].concat(a);else{s=[];for(var l=!1,u=0;u<a.length;u++){var d=a[u];if(d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}s.push(d)}l||s.unshift(t)}e.setLinkedRecords(s,o)}function pbe(e,t){var r=Iu.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var a,s=0;s<o.length;s++){var l=o[s],u=l&&l.getLinkedRecord(i);u!=null&&u.getDataID()===t?a===void 0&&(a=o.slice(0,s)):a!==void 0&&a.push(l)}a!==void 0&&e.setLinkedRecords(a,n)}}function rx(e,t,r){if(r==null)return r;var n=Iu.get(),i=n.EDGES,o=t.getValue(tx);typeof o!="number"&&sbe(!1);var a=Ch(t.getDataID(),i,o),s=e.create(a,r.getType());return s.copyFieldsFrom(r),s.getValue("cursor")==null&&s.setValue(null,"cursor"),t.setValue(o+1,tx),s}function Zp(e,t,r){for(var n=Iu.get(),i=n.NODE,o=0;o<e.length;o++){var a=e[o];if(a){var s=a.getLinkedRecord(i),l=s&&s.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(a)}}}var fv={buildConnectionEdge:rx,createEdge:fbe,deleteNode:pbe,getConnection:ube,getConnectionID:cbe,insertEdgeAfter:dbe,insertEdgeBefore:hbe,update:lbe},mbe=Ke.default,Rh=mbe(Pr),Pu=fv,V8=jw,Ic=Pe;var gbe={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=n.getValue(r.fieldKey);typeof i=="string"?t.delete(i):Array.isArray(i)&&i.forEach(function(o){typeof o=="string"&&t.delete(o)})}}},vbe={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&Ic(!1);var o=n.getValue(r.fieldKey),a=Array.isArray(o)?o:[o];a.forEach(function(s){if(typeof s=="string"){var l=(0,Rh.default)(i),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=t.get(d);f!=null&&Pu.deleteNode(f,s)}}catch(h){l.e(h)}finally{l.f()}}})}}},_be={update:K8(Pu.insertEdgeAfter)},bbe={update:K8(Pu.insertEdgeBefore)},ybe={update:H8(Pu.insertEdgeAfter)},xbe={update:H8(Pu.insertEdgeBefore)};function K8(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs.connections;o==null&&Ic(!1);var a,s;try{a=i.getLinkedRecord(r.fieldKey)}catch{}if(!a)try{s=i.getLinkedRecords(r.fieldKey)}catch{}if(!(a==null&&s==null)){var l=V8.get(),u=l.NODE,d=l.EDGES,f=(n=s)!==null&&n!==void 0?n:[a],h=(0,Rh.default)(f),p;try{var m=function(){var x=p.value;if(x==null)return"continue";var w=x.getLinkedRecord("node");if(!w)return"continue";var E=w.getDataID(),C=(0,Rh.default)(o),k;try{for(C.s();!(k=C.n()).done;){var A=k.value,$=t.get(A);if($!=null){var N=(g=$.getLinkedRecords(d))===null||g===void 0?void 0:g.some(function(P){var I;return(P==null||(I=P.getLinkedRecord(u))===null||I===void 0?void 0:I.getDataID())===E});if(!N){var M=Pu.buildConnectionEdge(t,$,x);M==null&&Ic(!1),e($,M)}}}}catch(P){C.e(P)}finally{C.f()}};for(h.s();!(p=h.n()).done;)var g,v=m()}catch(_){h.e(_)}finally{h.f()}}}}}function H8(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,a=o.connections,s=o.edgeTypeName;a==null&&Ic(!1),s==null&&Ic(!1);var l,u;try{l=i.getLinkedRecord(r.fieldKey)}catch{}if(!l)try{u=i.getLinkedRecords(r.fieldKey)}catch{}if(!(l==null&&u==null)){var d=V8.get(),f=d.NODE,h=d.EDGES,p=(n=u)!==null&&n!==void 0?n:[l],m=(0,Rh.default)(p),g;try{var v=function(){var E=g.value;if(E==null)return"continue";var C=E.getDataID(),k=(0,Rh.default)(a),A;try{for(k.s();!(A=k.n()).done;){var $=A.value,N=t.get($);if(N!=null){var M=(_=N.getLinkedRecords(h))===null||_===void 0?void 0:_.some(function(I){var U;return(I==null||(U=I.getLinkedRecord(f))===null||U===void 0?void 0:U.getDataID())===C});if(!M){var P=Pu.createEdge(t,N,E,s);P==null&&Ic(!1),e(N,P)}}}}catch(I){k.e(I)}finally{k.f()}};for(m.s();!(g=m.n()).done;)var _,x=v()}catch(w){m.e(w)}finally{m.f()}}}}}var Sbe={AppendEdgeHandler:_be,DeleteRecordHandler:gbe,PrependEdgeHandler:bbe,AppendNodeHandler:ybe,PrependNodeHandler:xbe,DeleteEdgeHandler:vbe},Ebe=fv,Yu=Sbe,wbe=Pe;function kbe(e){switch(e){case"connection":return Ebe;case"deleteRecord":return Yu.DeleteRecordHandler;case"deleteEdge":return Yu.DeleteEdgeHandler;case"appendEdge":return Yu.AppendEdgeHandler;case"prependEdge":return Yu.PrependEdgeHandler;case"appendNode":return Yu.AppendNodeHandler;case"prependNode":return Yu.PrependNodeHandler}wbe(!1)}var Cbe=kbe;function Rbe(e){return!!(e&&e["@@RelayModernEnvironment"])}var qw=Rbe,Abe=Ke.default,Vw=Abe(Pr),vc=fv;var $be=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),Tbe=Object.freeze({APPEND:"append",PREPEND:"prepend"});function Nbe(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(a){switch(a.type){case"NODE_DELETE":var s=Dbe(a,t);s&&(i.push(s),o.push(s));break;case"RANGE_ADD":var l=Fbe(a,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var u=Ibe(a,t);u&&(i.push(u),o.push(u));break}}),{optimisticUpdater:function(s,l){i.forEach(function(u){u(s,l)})},updater:function(s,l){o.forEach(function(u){u(s,l)})}}}function Dbe(e,t){var r=e.deletedIDFieldName,n=Kw(t);return n?function(i,o){var a=i.getRootField(n);if(a){var s=a.getValue(r),l=Array.isArray(s)?s:[s];l.forEach(function(u){u&&typeof u=="string"&&i.delete(u)})}}:null}function Fbe(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=Kw(t);return!n||!o?null:function(a,s){var l=a.get(r);if(l){var u=a.getRootField(o);if(u){var d=u.getLinkedRecord(i),f=(0,Vw.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var m=vc.getConnection(l,p.key,p.filters);if(m){var g=vc.buildConnectionEdge(a,m,d);if(g)switch(p.rangeBehavior){case"append":vc.insertEdgeAfter(m,g);break;case"prepend":vc.insertEdgeBefore(m,g);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function Ibe(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var a=Kw(t);return a?function(s,l){if(l){var u=[],d=l[a];if(d&&Array.isArray(o)){var f=(0,Vw.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(m){f.e(m)}finally{f.f()}Array.isArray(d)?d.forEach(function(m){m&&m.id&&typeof m=="object"&&typeof m.id=="string"&&u.push(m.id)}):d&&d.id&&typeof d.id=="string"&&u.push(d.id)}else d&&typeof o=="string"&&typeof d=="object"&&(d=d[o],typeof d=="string"?u.push(d):Array.isArray(d)&&d.forEach(function(m){typeof m=="string"&&u.push(m)}));Pbe(r,n,i,s,u)}}:null}function Pbe(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var a=o,s=1;s<r.length-1;s++)a&&(a=a.getLinkedRecord(r[s]));if(!(!t||!a)){var l=(0,Vw.default)(t),u;try{var d=function(){var h=u.value,p=vc.getConnection(a,h.key,h.filters);p&&i.forEach(function(m){vc.deleteNode(p,m)})};for(l.s();!(u=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function Kw(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var hv={MutationTypes:$be,RangeOperations:Tbe,convert:Nbe},Obe=Zo,Mbe=Obe.getRequest,Lbe=qw,zbe=kl,Ube=zbe.createOperationDescriptor,Bbe=hv,jbe=Pe;function qbe(e,t){Lbe(e)||jbe(!1);var r=Mbe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,a=t.variables,s=Ube(r,a);if(i){var l=Bbe.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:s,response:o,updater:n})}var Vbe=qbe;function Kbe(e,t){e.commitUpdate(t)}var Hbe=Kbe,Wbe=Ke.default;Wbe(Wt);var Gbe=Ke.default,NT=Gbe(Sl),Jbe=Zo,Qbe=Jbe.getRequest,Ybe=Da,Xbe=Ybe.generateUniqueClientID,Zbe=qw,eye=kl,tye=eye.createOperationDescriptor,rye=hv,nye=Pe;function iye(e,t){Zbe(e)||nye(!1);var r=Qbe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");if(r.kind!=="Request")throw new Error("commitMutation: Expected mutation to be of type request");var n=t.optimisticResponse,i=t.optimisticUpdater,o=t.updater,a=t.configs,s=t.cacheConfig,l=t.onError,u=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=tye(r,d,s,Xbe());if(typeof n=="function"&&(n=n()),a){var p=rye.convert(a,r,i,o);i=p.optimisticUpdater,o=p.updater}var m=[],g=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(_){var x;Array.isArray(_)?_.forEach(function(w){w.errors&&m.push.apply(m,(0,NT.default)(w.errors))}):_.errors&&m.push.apply(m,(0,NT.default)(_.errors)),(x=t.onNext)===null||x===void 0||x.call(t)},complete:function(){var _=t.onCompleted;if(_){var x=e.lookup(h.fragment);_(x.data,m.length!==0?m:null)}},error:l,unsubscribe:u});return{dispose:g.unsubscribe}}var oye=iye,aye=typeof WeakMap=="function",hb=aye?new WeakMap:new Map;function W8(e,t){if(t!=null){var r={};return Object.assign(r,e),Object.keys(t).forEach(function(n){var i=t[n].get,o=i();if(!hb.has(i))hb.set(i,o),r[n]=o;else{var a=hb.get(i);r[n]=a}}),r}else return e}W8.tests_only_resetDebugCache=void 0;var sye=W8,DT=wl;function lye(e){return function(r,n,i,o,a){var s=e(r,n,i,o,a);return s instanceof Error?DT.create(function(l){return l.error(s)}):DT.from(s)}}var uye={convertFetch:lye},cye=sye,dye=uye,fye=dye.convertFetch,pb=Pe;function hye(e,t){var r=fye(e);function n(i,o,a,s,l){var u=cye(o,i.providedVariables);if(i.operationKind==="subscription")return t||pb(!1),s&&pb(!1),t(i,u,a);var d=a.poll;return d!=null?(s&&pb(!1),r(i,u,{force:!0}).poll(d)):r(i,u,a,s,l)}return{execute:n}}var pye={create:hye},mye=Ke.default;mye(Wt);var gye=Fu;gye.stableCopy;var vye=Ke.default,_ye=vye(Wt),bye=wl,yye=kl,xye=yye.createOperationDescriptor,Sye=ip,Eye=Sye.handlePotentialSnapshotErrors,wye=dv,kye=Zo,Cye=kye.getRequest,Rye=Pe;function Aye(e,t,r,n){var i,o=Cye(t);o.params.operationKind!=="query"&&Rye(!1);var a=(0,_ye.default)({force:!0},n?.networkCacheConfig),s=xye(o,r,a),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function u(d){return Eye(e,d.fieldErrors),d.data}switch(l){case"network-only":return FT(e,s).map(u);case"store-or-network":return e.check(s).status==="available"?bye.from(e.lookup(s.fragment)).map(u):FT(e,s).map(u);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function FT(e,t){return wye.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var $ye=Aye,Tye=kl,Nye=Tye.createOperationDescriptor,Dye=Zo,Fye=Dye.getRequest;function Iye(e,t,r,n){var i=Fye(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=Nye(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var Pye=Iye,Oye=(function(){function e(){this._preloadableQueries=new Map,this._callbacks=new Map}var t=e.prototype;return t.set=function(n,i){this._preloadableQueries.set(n,i);var o=this._callbacks.get(n);o?.forEach(function(a){try{a(i)}catch(s){setTimeout(function(){throw s},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,a=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;a.add(i);var s=function(){a.delete(i)};return this._callbacks.set(n,a),{dispose:s}},t.clear=function(){this._preloadableQueries.clear()},e})(),Mye=new Oye,Lye=Mye,zye=dv,Uye=zye.getPromiseForActiveRequest;function Bye(e,t,r){var n,i,o=[],a=Uye(e,r);if(a!=null)o=[r];else{var s,l,u=e.getOperationTracker(),d=u.getPendingOperationsAffectingOwner(r);o=(s=d?.pendingOperations)!==null&&s!==void 0?s:[],a=(l=d?.promise)!==null&&l!==void 0?l:null}if(!a)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(m){return m.node.params.name}).join(","))!==null&&n!==void 0?n:null;(f==null||f.length===0)&&(f="Unknown pending operation");var h=t.name,p=f===h?"Relay(".concat(f,")"):"Relay(".concat(f,":").concat(h,")");return a.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:a,pendingOperations:o}}var G8=Bye;function jye(e,t){return e===t&&(e===null||typeof e!="object")}var J8=jye;function qye(e,t){return nx(e,t,!0)}function nx(e,t,r){if(e===t||typeof e!="object"||!e||e.constructor!==Object&&!Array.isArray(e)||typeof t!="object"||!t||t.constructor!==Object&&!Array.isArray(t))return t;var n=!1,i=Array.isArray(e)?e:null,o=Array.isArray(t)?t:null;if(i&&o){var a=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,m){var g=i[m],v=nx(g,p,a);return v!==o[m]&&a&&(o[m]=v),h&&v===i[m]},!0)&&i.length===o.length}else if(!i&&!o){var s=e,l=t,u=Object.keys(s),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var m=s[p],g=nx(m,l[p],f);return g!==l[p]&&f&&(l[p]=g),h&&g===s[p]},!0)&&u.length===d.length}return n?e:t}var pv=qye,Q8=Ke.default,IT=Q8(Wt),Hw=Q8(ei),Vye=G8,Kye=ip,Hye=Kye.handlePotentialSnapshotErrors,Wye=J8,Gye=pv,Y8=yo,Jye=kl,Qye=Jye.createRequestDescriptor,Ww=ea,Yye=Ww.areEqualSelectors,Xye=Ww.createReaderSelector,Zye=Ww.getSelectorsFromObject,e1e=ys,PT=Pe,t1e=(function(){function e(r,n,i,o,a){var s=this;(0,Hw.default)(this,"_onChange",function(){s._stale=!0,typeof s._callback=="function"&&s._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=a,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&X8(this._resolvers[n])},t.resolve=function(){if(this._stale){var n=this._data,i;for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o],s=n[o];if(a){var l=a.resolve();(i||l!==s)&&(i=i||(0,IT.default)({},n),i[o]=l)}else{var u=this._props[o],d=u!==void 0?u:null;(i||!Wye(d,s))&&(i=i||(0,IT.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,Y8.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=Zye(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var a=i[o],s=this._resolvers[o];a==null?(s?.dispose(),s=null):a.kind==="PluralReaderSelector"?s==null?s=new OT(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof OT||PT(!1),s.setSelector(a)):s==null?s=new ix(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof ix||PT(!1),s.setSelector(a)),this._props[o]=n[o],this._resolvers[o]=s}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o];a&&a.setVariables(n,i)}this._stale=!0},e})(),ix=(function(){function e(r,n,i,o,a){var s=this;(0,Hw.default)(this,"_onChange",function(u){s._data=u.data,s._isMissingData=u.isMissingData,s._fieldErrors=u.fieldErrors,s._callback()});var l=r.lookup(i);this._callback=a,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,Y8.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?o&&(this._subscription=r.subscribe(l,this._onChange)):this._subscription=r.subscribe(l,this._onChange)}var t=e.prototype;return t.dispose=function(){this._subscription&&(this._subscription.dispose(),this._subscription=null)},t.resolve=function(){if(this._isMissingData===!0){var n=Vye(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,a=(o=n?.pendingOperations)!==null&&o!==void 0?o:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:a}),i}}return Hye(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&Yye(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=Gye(this._data,i.data),this._isMissingData=i.isMissingData,this._fieldErrors=i.fieldErrors,this._selector=n,this._subscription=this._environment.subscribe(i,this._onChange)}},t.setVariables=function(n,i){if(!e1e(n,this._selector.variables)){var o=Qye(i,n),a=Xye(this._selector.node,this._selector.dataID,n,o);this.setSelector(a)}},e})(),OT=(function(){function e(r,n,i,o,a){var s=this;(0,Hw.default)(this,"_onChange",function(l){s._stale=!0,s._callback()}),this._callback=a,this._data=[],this._environment=r,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=n,this._subscribeOnConstruction=o,this.setSelector(i)}var t=e.prototype;return t.dispose=function(){this._resolvers.forEach(X8)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var a=n[o],s=this._resolvers[o].resolve();(i||s!==a)&&(i=i||n.slice(0,o),i.push(s))}!i&&this._resolvers.length!==n.length&&(i=n.slice(0,this._resolvers.length)),this._data=i||n,this._stale=!1}return this._data},t.setSelector=function(n){for(var i=n.selectors;this._resolvers.length>i.length;){var o=this._resolvers.pop();o.dispose()}for(var a=0;a<i.length;a++)a<this._resolvers.length?this._resolvers[a].setSelector(i[a]):this._resolvers[a]=new ix(this._environment,this._rootIsQueryRenderer,i[a],this._subscribeOnConstruction,this._onChange);this._stale=!0},t.setVariables=function(n,i){this._resolvers.forEach(function(o){return o.setVariables(n,i)}),this._stale=!0},e})();function X8(e){e&&e.dispose()}var r1e=t1e,n1e=r1e;function i1e(e,t,r,n,i,o){return new n1e(e,r,n,o,i)}var o1e=i1e,a1e=Pe,mb,MT;function s1e(e){return mb||(mb=e.createContext(null),MT=e),e!==MT&&a1e(!1),mb}var l1e=s1e,u1e=Pe,gb,LT;function c1e(e){return gb||(gb=e.createContext(null),LT=e),e!==LT&&u1e(!1),gb}var d1e=c1e,Z8=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function f1e(){return Z8}function h1e(e){return e===Z8}var mv={isSuspenseSentinel:h1e,suspenseSentinel:f1e},e5={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.indexOf(o)!==-1)continue;i[o]=r[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(e5);var Ad=e5.exports,gv=Ke.default,p1e=gv(ei),zT=gv(Ad),UT=gv(YL),Js=gv(Wt),m1e=O8,t5=Da,r5=t5.generateClientObjectClientID;t5.isClientID;var g1e=mv,n5=g1e.isSuspenseSentinel,xs=dr,ox=xs.ACTOR_IDENTIFIER_KEY,An=xs.ERRORS_KEY,Gw=xs.ID_KEY,v1e=xs.INVALIDATED_AT_KEY,pl=xs.REF_KEY,Zc=xs.REFS_KEY,i5=xs.RELAY_RESOLVER_VALUE_KEY;xs.ROOT_ID;var Jw=xs.TYPENAME_KEY,vb=ys,_u=Pe;function _1e(e){return(0,Js.default)({},e)}function b1e(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==Gw&&r!==Jw&&(t[r]=e[r])}function y1e(e,t){var r={};return r[Gw]=e,r[Jw]=t,r}function x1e(e){return e}function S1e(e){return e[Gw]}function E1e(e){return An in e?Object.keys(e).filter(function(t){return t!==An}):Object.keys(e)}function w1e(e){return e[Jw]}function k1e(e,t){var r;return(r=e[An])===null||r===void 0?void 0:r[t]}function Qw(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(pl)&&!r.hasOwnProperty(Zc)||_u(!1)),r}function C1e(e,t){return t in e}function R1e(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[pl]=="string"||_u(!1),n[pl]}function A1e(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[pl]=="string"}function $1e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[Zc])||_u(!1),r[Zc])}function T1e(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[Zc])&&r[Zc].every(function(n){return typeof n=="string"})}function N1e(e){if(e==null)return null;var t=e[v1e];return typeof t!="number"?null:t}function D1e(e,t){var r,n=e[An],i=t[An],o=null;if(n==null&&i==null){var a;for(var s in t)(o||!vb(e[s],t[s]))&&(o=o!==null?o:(0,Js.default)({},e),o[s]=t[s]);return(a=o)!==null&&a!==void 0?a:e}for(var l in t)if(l!==An){var u=t[l],d=i?.[l];if(o==null){var f=e[l],h=n?.[l];if(vb(f,u)&&vb(h,d))continue;o=(0,Js.default)({},e),n!=null&&(o[An]=(0,Js.default)({},n))}a5(o,l,u),o5(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function F1e(e,t){if(An in e||An in t){var r=e[An],n=(0,zT.default)(e,[An].map(UT.default)),i=t[An],o=(0,zT.default)(t,[An].map(UT.default)),a=(0,Js.default)((0,Js.default)({},n),o);if(r==null&&i==null)return a;var s={};for(var l in r)o.hasOwnProperty(l)||(s[l]=r[l]);for(var u in i)s[u]=i[u];for(var d in s){a[An]=s;break}return a}else return(0,Js.default)((0,Js.default)({},e),t)}function I1e(e){m1e(e)}function o5(e,t,r){var n=e[An];if(r!=null&&r.length>0)n==null?e[An]=(0,p1e.default)({},t,r):n[t]=r;else if(n!=null&&delete n[t]){for(var i in n)if(n.hasOwnProperty(i))return;delete e[An]}}function a5(e,t,r){e[t]=r}function P1e(e,t,r){var n={};n[pl]=r,e[t]=n}function O1e(e,t,r){var n={};n[Zc]=r,e[t]=n}function M1e(e,t,r,n){var i={};i[pl]=n,i[ox]=r,e[t]=i}function L1e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[pl]=="string"&&r[ox]!=null||_u(!1),[r[ox],r[pl]])}function z1e(e,t){var r=Qw(e,i5);return r==null||n5(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&_u(!1),r5(t,r))}function U1e(e,t){var r=Qw(e,i5);return r==null||n5(r)?null:(Array.isArray(r)||_u(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&_u(!1),r5(t,n))}))}function B1e(e){return e}var Ki={clone:_1e,copyFields:b1e,create:y1e,freeze:I1e,fromObject:x1e,getDataID:S1e,getErrors:k1e,getFields:E1e,getInvalidationEpoch:N1e,getLinkedRecordID:R1e,getLinkedRecordIDs:$1e,getType:w1e,getValue:Qw,hasValue:C1e,hasLinkedRecordID:A1e,hasLinkedRecordIDs:T1e,merge:F1e,setErrors:o5,setValue:a5,setLinkedRecordID:P1e,setLinkedRecordIDs:O1e,update:D1e,getActorLinkedRecordID:L1e,setActorLinkedRecordID:M1e,getResolverLinkedRecordID:z1e,getResolverLinkedRecordIDs:U1e,toJSON:B1e},j1e={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},vv=j1e,q1e=Ke.default,V1e=q1e(Pr),BT=Ki,Yw=vv,K1e=Yw.EXISTENT,H1e=Yw.NONEXISTENT,W1e=Yw.UNKNOWN,G1e=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],a=BT.fromObject(o);n._records.set(i,a)})}e.create=function(n){return new e(n)};var t=e.prototype;return t.clear=function(){this._records=new Map},t.delete=function(n){this._records.set(n,null)},t.get=function(n){return this._records.get(n)},t.getRecordIDs=function(){return Array.from(this._records.keys())},t.getStatus=function(n){return this._records.has(n)?this._records.get(n)==null?H1e:K1e:W1e},t.has=function(n){return this._records.has(n)},t.remove=function(n){this._records.delete(n)},t.set=function(n,i){this._records.set(n,i)},t.size=function(){return this._records.size},t.toJSON=function(){var n={},i=(0,V1e.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a[0],l=a[1];n[s]=BT.toJSON(l)}}catch(u){i.e(u)}finally{i.f()}return n},e})(),Ou=G1e,J1e=Pe,s5="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function Q1e(e){e!==s5&&J1e(!1)}var Xw={assertInternalActorIdentifier:Q1e,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:s5},ax="actor_key",Y1e=Xw,X1e=Y1e.getActorIdentifier;function Z1e(e){if(e!=null&&typeof e=="object"&&typeof e[ax]=="string")return X1e(e[ax])}var exe={ACTOR_IDENTIFIER_FIELD_NAME:ax,getActorIdentifierFromPayload:Z1e},_v=Ke.default,jT=_v(Wt),txe=_v(Ad),l5=_v(Pr),rxe=_v(Sl),nxe=["path","locations"],sx=Symbol("$SELF");function ixe(e){if(e==null)return null;var t=new Map,r=(0,l5.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,a=i.locations,s=(0,txe.default)(i,nxe);if(o!=null){var l=o.length;if(l!==0){for(var u=l-1,d=t,f=0;f<u;f++){var h=o[f],p=d.get(h);if(p instanceof Map){d=p;continue}var m=new Map;Array.isArray(p)&&m.set(sx,p),d.set(h,m),d=m}var g=o[u],v=d.get(g);v instanceof Map&&(d=v,v=d.get(g),g=sx),Array.isArray(v)?v.push(s):d.set(g,[s])}}}}catch(_){r.e(_)}finally{r.f()}return t}function oxe(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return u5(r,n),n}function u5(e,t){var r=(0,l5.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],a=i[1],s=t.length;if(Array.isArray(a)?t.push.apply(t,(0,rxe.default)(a)):u5(a,t),o!==sx)for(var l=t.length,u=s;u<l;u++){var d=t[u];d.path==null?t[u]=(0,jT.default)((0,jT.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function axe(e,t){var r=e.get(t);return r instanceof Map?r:null}var sxe={buildErrorTrie:ixe,getNestedErrorTrieByKey:axe,getErrorsByKey:oxe},lxe="client:__type:",uxe="__TypeSchema";function cxe(e){return lxe+e}var bv={generateTypeID:cxe,TYPE_SCHEMA_TYPE:uxe},c5=Ke.default,dxe=c5(Pr),Xd=c5(Sl),d5=exe;d5.ACTOR_IDENTIFIER_FIELD_NAME;var fxe=d5.getActorIdentifierFromPayload,qT=yo,f5=Da,_b=f5.generateClientID,hxe=f5.isClientID,pxe=El,mxe=pxe.getLocalVariables,Zw=sxe,gxe=Zw.buildErrorTrie,vxe=Zw.getErrorsByKey,VT=Zw.getNestedErrorTrieByKey,gt=Ki,_xe=ea,bxe=_xe.createNormalizationSelector,Mu=dr,yxe=Mu.ROOT_ID,xxe=Mu.TYPENAME_KEY,KT=Mu.getArgumentValues,Sxe=Mu.getHandleStorageKey,Exe=Mu.getModuleComponentKey,wxe=Mu.getModuleOperationKey,bb=Mu.getStorageKey,h5=bv,yb=h5.TYPE_SCHEMA_TYPE,xb=h5.generateTypeID,ni=Pe;function kxe(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,u=new Cxe(e,l,n,o??!1);return u.normalizeResponse(s,a,r,i)}var Cxe=(function(){function e(r,n,i,o){this._actorIdentifier=i.actorIdentifier,this._getDataId=i.getDataID,this._handleFieldPayloads=[],this._treatMissingFieldsAsNull=i.treatMissingFieldsAsNull,this._incrementalPlaceholders=[],this._isClientExtension=!1,this._isUnmatchedAbstractType=!1,this._useExecTimeResolvers=o,this._followupPayloads=[],this._path=i.path?(0,Xd.default)(i.path):[],this._recordSource=r,this._variables=n,this._shouldProcessClientComponents=i.shouldProcessClientComponents,this._log=i.log}var t=e.prototype;return t.normalizeResponse=function(n,i,o,a){var s=this._recordSource.get(i);return s||ni(!1),this._assignClientAbstractTypes(n),this._errorTrie=gxe(a),this._traverseSelections(n,s,o),{errors:a,fieldPayloads:this._handleFieldPayloads,incrementalPlaceholders:this._incrementalPlaceholders,followupPayloads:this._followupPayloads,source:this._recordSource,isFinal:!1}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,dxe.default)(i[s]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=xb(d),h=this._recordSource.get(f);h==null&&(h=gt.create(f,yb),this._recordSource.set(f,h)),gt.setValue(h,s,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||ni(!1),this._variables[n]},t._getRecordType=function(n){var i=n[xxe];return i==null&&ni(!1),i},t._traverseSelections=function(n,i,o){for(var a=0;a<n.selections.length;a++){var s=n.selections[a];switch(s.kind){case"ScalarField":case"LinkedField":this._normalizeField(s,i,o);break;case"Condition":var l=!!this._getVariableValue(s.condition);l===s.passingValue&&this._traverseSelections(s,i,o);break;case"FragmentSpread":{var u=this._variables;this._variables=mxe(this._variables,s.fragment.argumentDefinitions,s.args),this._traverseSelections(s.fragment,i,o),this._variables=u;break}case"InlineFragment":{var d=s.abstractKey;if(d==null){var f=gt.getType(i);f===s.type&&this._traverseSelections(s,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=gt.getType(i),m=xb(p),g=this._recordSource.get(m);g==null&&(g=gt.create(m,yb),this._recordSource.set(m,g)),gt.setValue(g,d,h),h&&this._traverseSelections(s,i,o)}break}case"TypeDiscriminator":{var v=s.abstractKey,_=Object.prototype.hasOwnProperty.call(o,v),x=gt.getType(i),w=xb(x),E=this._recordSource.get(w);E==null&&(E=gt.create(w,yb),this._recordSource.set(w,E)),gt.setValue(E,v,_);break}case"LinkedHandle":case"ScalarHandle":var C=s.args?KT(s.args,this._variables):{},k=bb(s,this._variables),A=Sxe(s,this._variables);this._handleFieldPayloads.push({args:C,dataID:gt.getDataID(i),fieldKey:k,handle:s.handle,handleKey:A,handleArgs:s.handleArgs?KT(s.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(s,i,o);break;case"Defer":this._normalizeDefer(s,i,o);break;case"Stream":this._normalizeStream(s,i,o);break;case"ClientExtension":var $=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(s,i,o),this._isClientExtension=$;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(s.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(s,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(s,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(s.backingField,i,o);break;default:ni(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var a=n.if===null||this._getVariableValue(n.if);a===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,Xd.default)(this._path),selector:bxe(n,gt.getDataID(i),this._variables),typeName:gt.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,o){this._traverseSelections(n,i,o);var a=n.if===null||this._getVariableValue(n.if);a===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,Xd.default)(this._path),parentID:gt.getDataID(i),node:n,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeModuleImport=function(n,i,o){typeof o=="object"&&o||ni(!1);var a=gt.getType(i),s=Exe(n.documentName),l=n.componentModuleProvider||o[s];gt.setValue(i,s,l??null);var u=wxe(n.documentName),d=n.operationModuleProvider||o[u];gt.setValue(i,u,d??null),d!=null&&this._followupPayloads.push({kind:"ModuleImportPayload",args:n.args,data:o,dataID:gt.getDataID(i),operationReference:d,path:(0,Xd.default)(this._path),typeName:a,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||ni(!1);var a=n.alias||n.name,s=bb(n,this._variables),l=o[a],u=qT.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(l)&&l.length===0;if(l==null||u){if(l===void 0){var d=this._isClientExtension||this._isUnmatchedAbstractType;if(d)return;if(!this._treatMissingFieldsAsNull)return}n.kind==="ScalarField"&&this._validateConflictingFieldsWithIdenticalId(i,s,null),u?n.kind==="LinkedField"?gt.setLinkedRecordIDs(i,s,[]):gt.setValue(i,s,[]):gt.setValue(i,s,null);var f=this._errorTrie;if(f!=null){var h=vxe(f,a);h!=null&>.setErrors(i,s,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,s,l),gt.setValue(i,s,l);else if(n.kind==="LinkedField"){this._path.push(a);var p=this._errorTrie;this._errorTrie=p==null?null:VT(p,a),n.plural?this._normalizePluralLink(n,i,s,l):this._normalizeLink(n,i,s,l),this._errorTrie=p,this._path.pop()}else ni(!1)},t._normalizeActorChange=function(n,i,o){var a,s=n.linkedField;typeof o=="object"&&o||ni(!1);var l=s.alias||s.name,u=bb(s,this._variables),d=o[l];if(d==null){if(d===void 0){var f=this._isClientExtension||this._isUnmatchedAbstractType;if(f)return;if(!this._treatMissingFieldsAsNull)return}gt.setValue(i,u,null);return}var h=fxe(d);if(h==null){gt.setValue(i,u,null);return}var p=(a=s.concreteType)!==null&&a!==void 0?a:this._getRecordType(d),m=this._getDataId(d,p)||gt.getLinkedRecordID(i,u)||_b(gt.getDataID(i),u);typeof m!="string"&&ni(!1),gt.setActorLinkedRecordID(i,u,h,m),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:m,path:[].concat((0,Xd.default)(this._path),[l]),typeName:p,variables:this._variables,node:s,actorIdentifier:h})},t._normalizeLink=function(n,i,o,a){var s;typeof a=="object"&&a||ni(!1);var l=this._getDataId(a,(s=n.concreteType)!==null&&s!==void 0?s:this._getRecordType(a))||gt.getLinkedRecordID(i,o)||_b(gt.getDataID(i),o);typeof l!="string"&&ni(!1),this._validateConflictingLinkedFieldsWithIdenticalId(gt.getLinkedRecordID(i,o),l,o),gt.setLinkedRecordID(i,o,l);var u=this._recordSource.get(l);if(u)this._validateRecordType(u,n,a);else{var d=n.concreteType||this._getRecordType(a);u=gt.create(l,d),this._recordSource.set(l,u)}this._traverseSelections(n,u,a)},t._normalizePluralLink=function(n,i,o,a){var s=this;Array.isArray(a)||ni(!1);var l=gt.getLinkedRecordIDs(i,o),u=[];a.forEach(function(d,f){var h;if(d==null){u.push(d);return}s._path.push(String(f));var p=s._errorTrie;s._errorTrie=p==null?null:VT(p,f),typeof d!="object"&&ni(!1);var m=s._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:s._getRecordType(d))||l&&l[f]||_b(gt.getDataID(i),o,f);typeof m!="string"&&ni(!1),u.push(m);var g=s._recordSource.get(m);if(g)s._validateRecordType(g,n,d);else{var v=n.concreteType||s._getRecordType(d);g=gt.create(m,v),s._recordSource.set(m,g)}l&&s._validateConflictingLinkedFieldsWithIdenticalId(l[f],m,o),s._traverseSelections(n,g,d),s._errorTrie=p,s._path.pop()}),gt.setLinkedRecordIDs(i,o,u)},t._validateRecordType=function(n,i,o){if(qT.ENABLE_STORE_ID_COLLISION_LOGGING){var a,s=(a=i.concreteType)!==null&&a!==void 0?a:this._getRecordType(o),l=gt.getDataID(n),u=hxe(l)&&l!==yxe||gt.getType(n)===s;if(!u){var d={name:"idCollision.typename",previous_typename:gt.getType(n),new_typename:s};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),p5={normalize:kxe},yv=Ke.default,HT=yv(Wt),Rxe=yv(Ki),Axe=yv(Ou),$xe=yv(p5);function Txe(e,t,r,n,i){var o,a=e.data,s=e.errors,l=Axe.default.create(),u=Rxe.default.create(t.dataID,r);l.set(t.dataID,u);var d=$xe.default.normalize(l,t,a,n,s,i);return(0,HT.default)((0,HT.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var Nxe=Txe,Dxe=Zo,Fxe=Dxe.getInlineDataFragment,Ixe=dr,Pxe=Ixe.FRAGMENTS_KEY,WT=Pe;function Oxe(e,t){var r,n=Fxe(e);if(t==null)return t;typeof t!="object"&&WT(!1);var i=(r=t[Pxe])===null||r===void 0?void 0:r[n.name];return i==null&&WT(!1),i}var Mxe=Oxe,Lxe=1e5;function zxe(){return Lxe++}var m5=zxe,Uxe=m5;function Bxe(e,t){return{execute:function(n,i,o,a,s,l,u,d){var f=Uxe(),h={start:function(g){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(g){e.__log({name:"network.next",networkRequestId:f,response:g})},error:function(g){e.__log({name:"network.error",networkRequestId:f,error:g})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(g){e.__log({name:"network.info",networkRequestId:f,info:g})};return t.execute(n,i,o,a,p,l,u,d).do(h)}}}var jxe=Bxe,qxe=Ke.default,Zd=qxe(Pr),Vxe=Pe,Kxe=(function(){function e(){this._ownersToPendingOperations=new Map,this._pendingOperationsToOwners=new Map,this._ownersToPendingPromise=new Map}var t=e.prototype;return t.update=function(n,i){if(i.size!==0){var o=n.identifier,a=new Set,s=(0,Zd.default)(i),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),a.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),a.add(d))}}catch(v){s.e(v)}finally{s.f()}if(a.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,Zd.default)(a),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;this._resolveOwnerResolvers(g),h.add(g)}}catch(v){p.e(v)}finally{p.f()}this._pendingOperationsToOwners.set(o,h)}}},t.complete=function(n){var i=n.identifier,o=this._pendingOperationsToOwners.get(i);if(o!=null){var a=new Set,s=new Set,l=(0,Zd.default)(o),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=this._ownersToPendingOperations.get(d);f&&(f.delete(i),f.size>0?s.add(d):a.add(d))}}catch(x){l.e(x)}finally{l.f()}var h=(0,Zd.default)(a),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;this._resolveOwnerResolvers(m),this._ownersToPendingOperations.delete(m)}}catch(x){h.e(x)}finally{h.f()}var g=(0,Zd.default)(s),v;try{for(g.s();!(v=g.n()).done;){var _=v.value;this._resolveOwnerResolvers(_)}}catch(x){g.e(x)}finally{g.f()}this._pendingOperationsToOwners.delete(i)}},t._resolveOwnerResolvers=function(n){var i=this._ownersToPendingPromise.get(n);i?.resolve(),this._ownersToPendingPromise.delete(n)},t.getPendingOperationsAffectingOwner=function(n){var i=n.identifier,o=this._ownersToPendingOperations.get(i);if(o==null||o.size===0)return null;var a=this._ownersToPendingPromise.get(i);if(a!=null)return{promise:a.promise,pendingOperations:a.pendingOperations};var s,l=new Promise(function(d){s=d});s==null&&Vxe(!1);var u=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:s,pendingOperations:u}),{promise:l,pendingOperations:u}},e})(),Hxe=Kxe;function Wxe(e){var t=typeof em<"u"?em:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var Gxe=Wxe,Jxe=Da,Qxe=Jxe.generateClientID,Yxe=dr,Xxe=Yxe.ROOT_ID,Zxe=Qxe(Xxe,"viewer"),eSe="Viewer",e2={VIEWER_ID:Zxe,VIEWER_TYPE:eSe},g5=e2,tSe=g5.VIEWER_ID,rSe=g5.VIEWER_TYPE;function nSe(e,t){return t===rSe&&e.id==null?tSe:e.id}var v5=nSe,iSe=function(t){},oSe=iSe,_5=Du,aSe=_5.REQUEST,sSe=_5.SPLIT_OPERATION;function lSe(e){switch(e.kind){case aSe:return e.operation;case sSe:default:return e}}var t2=lSe;function GT(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];var a=0,s=r.replace(/%s/g,function(){return String(i[a++])}),l=new Error(s),u=Object.assign(l,{name:t,messageFormat:r,messageParams:i,type:e,taalOpcodes:[2,2]});if(u.stack===void 0)try{throw u}catch{}return u}var uSe={create:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return GT.apply(void 0,["error",t,r].concat(i))},createWarning:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return GT.apply(void 0,["warn",t,r].concat(i))}},Sb,Eb,cSe=typeof window<"u"&&typeof((Sb=window)===null||Sb===void 0||(Eb=Sb.performance)===null||Eb===void 0?void 0:Eb.now)=="function";function JT(){return cSe?window.performance.now():Date.now()}function dSe(e){var t=JT(),r=e();return[t,JT()-t,r]}var fSe=dSe,b5=Ke.default,ef=b5(Pr),tf=b5(Sl),wb=wl,hSe=m5,kb=t2,pSe=uSe,e0=yo,mSe=Fu,gSe=mSe.stableCopy,vSe=fSe,y5=Da,QT=y5.generateClientID,_Se=y5.generateUniqueClientID,bSe=El,ySe=bSe.getLocalVariables,t0=Ki,x5=ea,Cb=x5.createNormalizationSelector,xSe=x5.createReaderSelector,r0=Ou,r2=dr,YT=r2.ROOT_TYPE,SSe=r2.TYPENAME_KEY,ESe=r2.getStorageKey,Lr=Pe;function wSe(e){return new kSe(e)}var kSe=(function(){function e(r){var n=this,i,o,a,s=r.actorIdentifier,l=r.getDataID,u=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,m=r.operationLoader,g=r.operationTracker,v=r.optimisticConfig,_=r.scheduler,x=r.shouldProcessClientComponents,w=r.sink,E=r.source,C=r.treatMissingFieldsAsNull,k=r.updater,A=r.log,$=r.normalizeResponse;this._actorIdentifier=s,this._getDataID=l,this._treatMissingFieldsAsNull=C,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=A,this._executeId=hSe(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=m,this._operationTracker=g,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(i=(o=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&o!==void 0?o:((a=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=u,this._scheduler=_,this._sink=w,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=k,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=x,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=$;var N=this._nextSubscriptionId++;e0.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),E.subscribe({complete:function(){return n._complete(N)},error:function(P){return n._error(P)},next:function(P){try{n._next(N,P)}catch(I){w.error(I)}},start:function(P){var I;n._start(N,P),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(I=n._operation.request.cacheConfig)!==null&&I!==void 0?I:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!e0.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1)}var t=e.prototype;return t.cancel=function(){var n=this;if(this._state!=="completed"){this._state="completed",this._operationExecutions.delete(this._operation.request.identifier),this._subscriptions.size!==0&&(this._subscriptions.forEach(function(o){return o.unsubscribe()}),this._subscriptions.clear());var i=this._optimisticUpdates;i!==null&&(this._optimisticUpdates=null,i.forEach(function(o){return n._getPublishQueueAndSaveActor().revertUpdate(o)}),this._runPublishQueue()),this._incrementalResults.clear(),this._asyncStoreUpdateDisposable!=null&&(this._asyncStoreUpdateDisposable.dispose(),this._asyncStoreUpdateDisposable=null),this._completeFns=[],this._completeOperationTracker(),this._disposeRetainedData()}},t._updateActiveState=function(){var n;switch(this._state){case"started":{n="active";break}case"loading_incremental":{n="active";break}case"completed":{n="inactive";break}case"loading_final":{n=this._pendingModulePayloadsCount>0||this._useExecTimeResolvers&&!this._execTimeResolverResponseComplete?"active":"inactive";break}default:this._state,Lr(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,a=this._scheduler;if(a!=null){var s=this._nextSubscriptionId++;wb.create(function(l){var u=a.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return a.cancel(u)}}).subscribe({complete:function(){return o._complete(s)},error:function(u){return o._error(u)},start:function(u){return o._start(s,u)}})}else n()},t._complete=function(n){this._subscriptions.delete(n),this._subscriptions.size===0&&(this.cancel(),this._sink.complete(),this._log({name:"execute.complete",executeId:this._executeId}))},t._error=function(n){this.cancel(),this._sink.error(n),this._log({name:"execute.error",executeId:this._executeId,error:n})},t._start=function(n,i){this._subscriptions.set(n,i),this._updateActiveState()},t._next=function(n,i){var o=this,a=this._state==="loading_incremental"?"low":"default";this._schedule(function(){o._log({name:"execute.next.start",executeId:o._executeId,response:i,operation:o._operation}),o._handleNext(i),o._maybeCompleteSubscriptionOperationTracking(),o._log({name:"execute.next.end",executeId:o._executeId,response:i,operation:o._operation})},a)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(a){if(!(a.data===null&&a.extensions!=null&&!a.hasOwnProperty("errors")))if(a.data==null){var s=a.hasOwnProperty("errors")&&a.errors!=null?a.errors:null,l=s?s.map(function(f){var h=f.message;return h}).join(`
|
|
68
|
+
`):"(No errors)",u=pSe.create("RelayNetwork","No data returned for operation `"+i._operation.request.node.params.name+"`, got error(s):\n"+l+"\n\nSee the error `source` property for more information.");throw u.source={errors:s,operation:i._operation.request.node,variables:i._operation.request.variables},u.stack,u}else{var d=a;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(s){var l;return((l=s.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&Lr(!1),!1;var o=n[0],a=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return a&&this._state!=="started"&&Lr(!1),a?(this._processOptimisticResponse(o,null,this._treatMissingFieldsAsNull),this._sink.next(o),!0):!1},t._handleNext=function(n){if(this._state!=="completed"){this._seenActors.clear();var i=Array.isArray(n)?n:[n],o=this._handleErrorResponse(i);if(o.length===0){var a=i.some(function($){var N;return((N=$.extensions)===null||N===void 0?void 0:N.is_final)===!0});a&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var s=this._handleOptimisticResponses(o);if(!s){var l=CSe(o),u=l[0],d=l[1],f=l[2],h=u.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var m=_Se();this._operation={request:this._operation.request,fragment:xSe(this._operation.fragment.node,m,this._operation.fragment.variables,this._operation.fragment.owner),root:Cb(this._operation.root.node,m,this._operation.root.variables)}}var g=this._processResponses(u);this._processPayloadFollowups(g)}if(p)for(var v=[],_=0;_<f.length;_++){var x,w=f[_],E=new r0(w.data),a=((x=w.extensions)===null||x===void 0?void 0:x.is_final)===!0,C={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:a,source:E};this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,this._updater),v.push(C),this._execTimeResolverResponseComplete=a,a&&this._updateActiveState()}if(d.length>0){var k=this._processIncrementalResponses(d);this._processPayloadFollowups(k)}this._isSubscriptionOperation&&(o[0].extensions==null?o[0].extensions={__relay_subscription_root_id:this._operation.fragment.dataID}:o[0].extensions.__relay_subscription_root_id=this._operation.fragment.dataID);var A=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(A),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var a=this;if(this._optimisticUpdates!==null&&Lr(!1),!(n==null&&i==null)){var s=[];if(n){var l=this._normalizeResponse(n,this._operation.root,YT,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);XT(l),s.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,s)}else i&&s.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:r0.create(),isFinal:!1},updater:i});this._optimisticUpdates=s,s.forEach(function(d){return a._getPublishQueueAndSaveActor().applyUpdate(d)});var u=this._runPublishQueue();e0.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(u)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var o=n.followupPayloads,a=(0,ef.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;switch(l.kind){case"ModuleImportPayload":var u=this._expectOperationLoader(),d=u.get(l.operationReference);if(d==null)this._processAsyncOptimisticModuleImport(l);else{var f=this._processOptimisticModuleImport(d,l);i.push.apply(i,(0,tf.default)(f))}break;case"ActorPayload":break;default:Lr(!1)}}}catch(h){a.e(h)}finally{a.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=ySe(n.variables,i.argumentDefinitions,n.args):o=n.variables;var a=Cb(i,n.dataID,o),s={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(s,a,n.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:n.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers)},t._processOptimisticModuleImport=function(n,i){var o=kb(n),a=[],s=this._normalizeFollowupPayload(i,o);return XT(s),a.push({operation:this._operation,payload:s,updater:null}),this._processOptimisticFollowups(s,a),a},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var a=i._processOptimisticModuleImport(o,n);if(a.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var s;(s=i._optimisticUpdates).push.apply(s,(0,tf.default)(a)),i._runPublishQueue()}}})},t._processResponses=function(n){var i=this;return this._log({name:"execute.normalize.start",operation:this._operation}),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(o){i._getPublishQueueAndSaveActor().revertUpdate(o)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),n.map(function(o){var a=i._normalizeResponse(o,i._operation.root,YT,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,a,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),a})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var a=o.incrementalPlaceholders,s=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),s&&s.length!==0&&s.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processFollowupPayload(d),i._actorIdentifier=h}),a&&a.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",a.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processIncrementalPlaceholder(o,d),i._actorIdentifier=h}),i._isClientPayload||i._state==="loading_final")){var u=[];a.forEach(function(d){d.kind==="defer"&&u.push(i._processDeferResponse(d.label,d.path,d,{data:d.data,extensions:{is_final:!0}}))}),u.length>0&&i._processPayloadFollowups(u)}})},t._maybeCompleteSubscriptionOperationTracking=function(){!this._isSubscriptionOperation&&!(this._useExecTimeResolvers&&this._execTimeResolverResponseComplete&&this._state==="loading_final")||this._pendingModulePayloadsCount===0&&this._incrementalPayloadsPending===!1&&this._completeOperationTracker()},t._processFollowupPayload=function(n){var i=this;switch(n.kind){case"ModuleImportPayload":var o=this._expectOperationLoader(),a=o.get(n.operationReference);if(a!=null)this._processFollowupPayloadWithNormalizationNode(n,kb(a));else{var s=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},u=wb.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));wb.create(function(d){var f,h=u.subscribe({next:function(m){if(m!=null){var g=function(){try{var x=kb(m),w=e0.BATCH_ASYNC_MODULE_UPDATES_FN,E=w!=null&&i._pendingModulePayloadsCount>1,C=vSe(function(){if(i._handleFollowupPayload(n,x),E)i._scheduleAsyncStoreUpdate(w,d.complete);else{var $=i._runPublishQueue();i._updateOperationTracker($)}}),k=C[0],A=C[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:x.name,duration:A}),E||d.complete()}catch($){d.error($)}},v=i._scheduler;v==null?g():f=v.schedule(g)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(s),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(s,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:Lr(!1)}},t._processFollowupPayloadWithNormalizationNode=function(n,i){this._handleFollowupPayload(n,i),this._maybeCompleteSubscriptionOperationTracking()},t._handleFollowupPayload=function(n,i){var o=this._normalizeFollowupPayload(n,i);this._getPublishQueueAndSaveActor().commitPayload(this._operation,o),this._processPayloadFollowups([o])},t._processIncrementalPlaceholder=function(n,i){var o,a=i.label,s=i.path,l=s.map(String).join("."),u=this._incrementalResults.get(a);u==null&&(u=new Map,this._incrementalResults.set(a,u));var d=u.get(l),f=d!=null&&d.kind==="response"?d.responses:null;u.set(l,{kind:"placeholder",placeholder:i});var h;i.kind==="stream"?h=i.parentID:i.kind==="defer"?h=i.selector.dataID:Lr(!1);var p=n.source.get(h),m=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(C){var k=QT(C.dataID,C.fieldKey);return C.dataID===h||k===h});p==null&&Lr(!1);var g,v,_=this._source.get(h);if(_!=null){g=t0.update(_.record,p);var x=new Map,w=function(k){var A=RSe(k);x.set(A,k)};_.fieldPayloads.forEach(w),m.forEach(w),v=Array.from(x.values())}else g=p,v=m;if(this._source.set(h,{record:g,fieldPayloads:v}),f!=null){var E=this._processIncrementalResponses(f);this._processPayloadFollowups(E)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(a){var s=a.label,l=a.path,u=a.response,d=i._incrementalResults.get(s);if(d==null&&(d=new Map,i._incrementalResults.set(s,d)),s.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[a]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(a);return}var p=h.placeholder;p.kind!=="defer"&&Lr(!1),o.push(i._processDeferResponse(s,l,p,u))}else{var m=l.slice(0,-2).map(String).join("."),g=d.get(m);if(g==null){g={kind:"response",responses:[a]},d.set(m,g);return}else if(g.kind==="response"){g.responses.push(a);return}var v=g.placeholder;v.kind!=="stream"&&Lr(!1),o.push(i._processStreamResponse(s,l,v,u))}}),o},t._processDeferResponse=function(n,i,o,a){var s,l=o.selector.dataID,u=this._actorIdentifier;this._actorIdentifier=(s=o.actorIdentifier)!==null&&s!==void 0?s:this._actorIdentifier;var d=this._normalizeResponse(a,o.selector,o.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:o.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,d);var f=this._source.get(l);f==null&&Lr(!1);var h=f.fieldPayloads;if(h.length!==0){var p,m={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:r0.create(),isFinal:((p=a.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,m)}return this._actorIdentifier=u,d},t._processStreamResponse=function(n,i,o,a){var s=o.parentID,l=o.node,u=o.variables,d=o.actorIdentifier,f=this._actorIdentifier;this._actorIdentifier=d??this._actorIdentifier;var h=l.selections[0];h!=null&&h.kind==="LinkedField"&&h.plural===!0||Lr(!1);var p=this._normalizeStreamItem(a,s,h,u,i,o.path),m=p.fieldPayloads,g=p.itemID,v=p.itemIndex,_=p.prevIDs,x=p.relayPayload,w=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,x,function(C){var k=C.get(s);if(k!=null){var A=k.getLinkedRecords(w);if(A!=null&&!(A.length!==_.length||A.some(function(N,M){return _[M]!==(N&&N.getDataID())}))){var $=(0,tf.default)(A);$[v]=C.get(g),k.setLinkedRecords($,w)}}}),m.length!==0){var E={errors:null,fieldPayloads:m,incrementalPlaceholders:null,followupPayloads:null,source:r0.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,E)}return this._actorIdentifier=f,x},t._normalizeStreamItem=function(n,i,o,a,s,l){var u,d,f,h,p=n.data;typeof p!="object"&&Lr(!1);var m=(u=o.alias)!==null&&u!==void 0?u:o.name,g=ESe(o,a),v=this._source.get(i);v==null&&Lr(!1);var _=v.record,x=v.fieldPayloads,w=t0.getLinkedRecordIDs(_,g);w==null&&Lr(!1);var E=s[s.length-1],C=parseInt(E,10);C===E&&C>=0||Lr(!1);var k=(d=o.concreteType)!==null&&d!==void 0?d:p[SSe];typeof k!="string"&&Lr(!1);var A=(f=(h=this._getDataID(p,k))!==null&&h!==void 0?h:w?.[C])!==null&&f!==void 0?f:QT(i,g,C);typeof A!="string"&&Lr(!1);var $=Cb(o,A,a),N=t0.clone(_),M=(0,tf.default)(w);M[C]=A,t0.setLinkedRecordIDs(N,g,M),this._source.set(i,{record:N,fieldPayloads:x});var P=this._normalizeResponse(n,$,k,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,tf.default)(l),[m,String(C)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:x,itemID:A,itemIndex:C,prevIDs:w,relayPayload:P,storageKey:g}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var a=o._runPublishQueue();o._updateOperationTracker(a);var s=(0,ef.default)(o._completeFns),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;u()}}catch(d){s.e(d)}finally{s.f()}o._completeFns=[]}))},t._updateOperationTracker=function(n){n!=null&&n.length>0&&this._operationTracker.update(this._operation.request,new Set(n))},t._completeOperationTracker=function(){this._operationTracker.complete(this._operation.request)},t._getPublishQueueAndSaveActor=function(){return this._seenActors.add(this._actorIdentifier),this._getPublishQueue(this._actorIdentifier)},t._getActorsToVisit=function(){return this._seenActors.size===0?new Set([this._actorIdentifier]):this._seenActors},t._runPublishQueue=function(n){var i=new Set,o=(0,ef.default)(this._getActorsToVisit()),a;try{for(o.s();!(a=o.n()).done;){var s=a.value,l=this._getPublishQueue(s).run(n);l.forEach(function(u){return i.add(u)})}}catch(u){o.e(u)}finally{o.f()}return Array.from(i)},t._retainData=function(){var n=(0,ef.default)(this._getActorsToVisit()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;this._retainDisposables.has(o)||this._retainDisposables.set(o,this._getStore(o).retain(this._operation))}}catch(a){n.e(a)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,ef.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(a){n.e(a)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Lr(!1),n},e})();function CSe(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var a=i.label,s=i.path;(a==null||s==null)&&Lr(!1),r.push({label:a,path:s,response:i})}else((o=i.extensions)===null||o===void 0?void 0:o.is_normalized)===!0?n.push(i):t.push(i)}),[t,r,n]}function RSe(e){var t;return(t=JSON.stringify(gSe(e)))!==null&&t!==void 0?t:""}function XT(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Lr(!1)}var ASe={execute:wSe},$Se=Promise.resolve();function TSe(e){$Se.then(e).catch(NSe)}function NSe(e){setTimeout(function(){throw e},0)}var DSe=TSe,an=Ki,FSe=vv,ZT=FSe.EXISTENT,Rb=Pe,ISe=(function(){function e(r,n){this.__sources=[n,r],this._base=r,this._sink=n}var t=e.prototype;return t.unstable_getRawRecordWithChanges=function(n){var i=this._base.get(n),o=this._sink.get(n);if(o===void 0){if(i==null)return i;var a=an.clone(i);return a}else{if(o===null)return null;if(i!=null){var s=an.update(i,o);return s}else{var l=an.clone(o);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var o=this._base.get(n);o||Rb(!1),i=an.create(n,an.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),a=this._base.get(n);o||a||Rb(!1);var s=this._getSinkRecord(i);a&&an.copyFields(a,s),o&&an.copyFields(o,s)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);an.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==ZT&&this._sink.getStatus(n)!==ZT||Rb(!1);var o=an.create(n,i);this._sink.set(n,o)},t.delete=function(n){this._sink.delete(n)},t.getStatus=function(n){return this._sink.has(n)?this._sink.getStatus(n):this._base.getStatus(n)},t.getType=function(n){for(var i=0;i<this.__sources.length;i++){var o=this.__sources[i].get(n);if(o)return an.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=an.getValue(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setValue=function(n,i,o){var a=this._getSinkRecord(n);an.setValue(a,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=an.getErrors(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setErrors=function(n,i,o){var a=this._getSinkRecord(n);an.setErrors(a,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=an.getLinkedRecordID(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordID=function(n,i,o){var a=this._getSinkRecord(n);an.setLinkedRecordID(a,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=an.getLinkedRecordIDs(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var a=this._getSinkRecord(n);an.setLinkedRecordIDs(a,i,o)},e})(),S5=ISe,PSe=Ke.default,xv=PSe(Pr),OSe=dr,ed=OSe.getArgumentValues,MSe=["id","__id","__typename","js"];function LSe(e,t,r,n,i){var o={};return Ah(o,e,t,r,n,i),o}function Ah(e,t,r,n,i,o){var a,s=(0,xv.default)(n),l;try{var u=function(){var p=l.value;switch(p.kind){case"LinkedField":p.plural?Object.defineProperty(e,(d=p.alias)!==null&&d!==void 0?d:p.name,{get:BSe(p,r,t,i,o),set:zSe(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:jSe(p,r,t,i,o),set:USe(p,r,t,i)});break;case"ScalarField":var m=(a=p.alias)!==null&&a!==void 0?a:p.name;Object.defineProperty(e,m,{get:function(){var v,_=ed((v=p.args)!==null&&v!==void 0?v:[],r),x=t.getValue(p.name,_);return x==null&&(x=KSe(p,_,t,i,o)),x},set:MSe.includes(p.name)?void 0:function(g){var v,_=ed((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(g,p.name,_)}});break;case"InlineFragment":t.getType()===p.type&&Ah(e,t,r,p.selections,i,o);break;case"ClientExtension":Ah(e,t,r,p.selections,i,o);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":case"RelayLiveResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw p.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(s.s();!(l=s.n()).done;){var d,f;u()}}catch(h){s.e(h)}finally{s.f()}}function zSe(e,t,r,n){return function(o){var a,s=ed((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=o.map(function(u){if(u==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var d=u.__id;if(d==null)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var f=n.get(d);if(f==null)throw new Error("Did not find item with data id ".concat(d," in the store."));return f});r.setLinkedRecords(l,e.name,s)}}function USe(e,t,r,n){return function(o){var a,s=ed((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)r.setValue(o,e.name,s);else{var l=o.__id;if(l==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var u=n.get(l);if(u==null)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(u,e.name,s)}}}function BSe(e,t,r,n,i){return function(){var o,a=ed((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecords(e.name,a);return s===void 0&&(s=VSe(e,a,r,n,i)),s!=null?s.map(function(l){if(l!=null){var u={};return Ah(u,l,t,e.selections,n,i),u}else return l}):s}}function jSe(e,t,r,n,i){return function(){var o,a=ed((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecord(e.name,a);if(s===void 0&&(s=qSe(e,a,r,n,i)),s!=null){var l={};return Ah(l,s,t,e.selections,n,i),l}else return s}}function qSe(e,t,r,n,i){var o=(0,xv.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="linked"){var l=s.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(u){o.e(u)}finally{o.f()}}function VSe(e,t,r,n,i){var o=(0,xv.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="pluralLinked"){var l=s.handle(e,r,t,n);if(l!=null)return l.map(function(u){if(u!=null)return n.get(u)})}}}catch(u){o.e(u)}finally{o.f()}}function KSe(e,t,r,n,i){var o=(0,xv.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="scalar"){var l=s.handle(e,r,t,n);if(l!==void 0)return l}}}catch(u){o.e(u)}finally{o.f()}}var E5={createUpdatableProxy:LSe},HSe=Zo,WSe=HSe.getFragment,GSe=ea,JSe=GSe.getVariablesFromFragment,QSe=dr,YSe=QSe.ID_KEY,XSe=E5,ZSe=XSe.createUpdatableProxy,eEe=Pe;function tEe(e,t,r,n){var i=WSe(e),o=JSe(i,t),a=t[YSe],s=r.get(a);return s==null&&eEe(!1),{updatableData:ZSe(s,o,i.selections,r,n)}}var w5={readUpdatableFragment:tEe},rEe=Zo,nEe=rEe.getUpdatableQuery,iEe=E5,oEe=iEe.createUpdatableProxy;function aEe(e,t,r,n){var i=nEe(e);return{updatableData:oEe(r.getRoot(),t,i.fragment.selections,r,n)}}var k5={readUpdatableQuery:aEe},sEe=Da,lEe=sEe.generateClientID,uEe=dr,Ns=uEe.getStableStorageKey,n0=Pe,cEe=(function(){function e(r,n,i){this._dataID=i,this._mutator=n,this._source=r}var t=e.prototype;return t.copyFieldsFrom=function(n){this._mutator.copyFields(n.getDataID(),this._dataID)},t.getDataID=function(){return this._dataID},t.getType=function(){var n=this._mutator.getType(this._dataID);return n==null&&n0(!1),n},t.getValue=function(n,i){var o=Ns(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,a){return C5(n)||n0(!1),this.setValue__UNSAFE(n,i,o,a)},t.getErrors=function(n,i){var o=Ns(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,a){var s=Ns(i,o);return this._mutator.setValue(this._dataID,s,n),a!=null&&(a.length===0?this._mutator.setErrors(this._dataID,s):this._mutator.setErrors(this._dataID,s,a)),this},t.getLinkedRecord=function(n,i){var o=Ns(n,i),a=this._mutator.getLinkedRecordID(this._dataID,o);return a!=null?this._source.get(a):a},t.setLinkedRecord=function(n,i,o){n instanceof e||n0(!1);var a=Ns(i,o),s=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,a,s),this},t.getOrCreateLinkedRecord=function(n,i,o){var a=this.getLinkedRecord(n,o);if(!a){var s,l=Ns(n,o),u=lEe(this.getDataID(),l);a=(s=this._source.get(u))!==null&&s!==void 0?s:this._source.create(u,i),this.setLinkedRecord(a,n,o)}return a},t.getLinkedRecords=function(n,i){var o=this,a=Ns(n,i),s=this._mutator.getLinkedRecordIDs(this._dataID,a);return s==null?s:s.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||n0(!1);var a=Ns(i,o),s=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,a,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function C5(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(C5)}var dEe=cEe,fEe=Ki,R5=vv,Ab=R5.EXISTENT,eN=R5.NONEXISTENT,A5=dr,$b=A5.ROOT_ID,tN=A5.ROOT_TYPE,hEe=w5,pEe=hEe.readUpdatableFragment,mEe=k5,gEe=mEe.readUpdatableQuery,vEe=dEe,i0=Pe,_Ee=(function(){function e(r,n,i,o,a){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=a??function(s){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,a=n.getRecordIDs();a.forEach(function(s){var l=n.getStatus(s);if(l===Ab){var u=n.get(s);u&&(o.__mutator.getStatus(s)!==Ab&&o.create(s,fEe.getType(u)),o.__mutator.copyFieldsFromRecord(u,s))}else l===eN&&o.delete(s)}),i&&i.length&&i.forEach(function(s){var l=o._handlerProvider&&o._handlerProvider(s.handle);l||i0(!1),l.update(o,s)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var o=this.get(n);return o||i0(!1),o},t.delete=function(n){n===$b&&i0(!1),delete this._proxies[n],this.__mutator.delete(n)},t.get=function(n){if(!this._proxies.hasOwnProperty(n)){var i=this.__mutator.getStatus(n);i===Ab?this._proxies[n]=new vEe(this,this.__mutator,n):this._proxies[n]=i===eN?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get($b);return n||(n=this.create($b,tN)),n&&n.getType()===tN||i0(!1),n},t.invalidateStore=function(){this._invalidatedStore=!0},t.isStoreMarkedForInvalidation=function(){return this._invalidatedStore},t.markIDForInvalidation=function(n){this._idsMarkedForInvalidation.add(n)},t.getIDsMarkedForInvalidation=function(){return this._idsMarkedForInvalidation},t.readUpdatableQuery=function(n,i){return gEe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return pEe(n,i,this,this._missingFieldHandlers)},e})(),$5=_Ee,bEe=Du,rN=bEe.LINKED_FIELD,yEe=dr,xEe=yEe.getHandleStorageKey,SEe=ys,EEe=Pe;function wEe(e,t,r){var n=t.find(function(o){return o.kind===rN&&o.name===e.name&&o.alias===e.alias&&SEe(o.args,e.args)});n&&n.kind===rN||EEe(!1);var i=xEe(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var T5=wEe,kEe=Du,nN=kEe.SCALAR_FIELD,CEe=dr,REe=CEe.getHandleStorageKey,AEe=ys,$Ee=Pe;function TEe(e,t,r){var n=t.find(function(o){return o.kind===nN&&o.name===e.name&&o.alias===e.alias&&AEe(o.args,e.args)});n&&n.kind===nN||$Ee(!1);var i=REe(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var NEe=TEe,DEe=Ke.default,o0=DEe(Pr),FEe=S5,IEe=$5,PEe=t2,OEe=Da,MEe=OEe.isClientID,LEe=T5,zEe=NEe,UEe=El,iN=UEe.getLocalVariables,oN=Ki,N5=vv,Tb=N5.EXISTENT,BEe=N5.UNKNOWN,n2=dr,D5=bv,jEe=D5.TYPE_SCHEMA_TYPE,Nb=D5.generateTypeID,rf=Pe,qEe=n2.getModuleOperationKey,a0=n2.getStorageKey,Db=n2.getArgumentValues;function VEe(e,t,r,n,i,o,a,s,l,u){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new KEe(e,t,r,h,i,o,a,s,l,u),m=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),m}var KEe=(function(){function e(r,n,i,o,a,s,l,u,d,f){this._getSourceForActor=r,this._getTargetForActor=n,this._getDataID=l,this._source=r(i),this._mutatorRecordSourceProxyCache=new Map;var h=this._getMutatorAndRecordProxyForActor(i),p=h[0],m=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=a,this._mutator=p,this._operationLoader=s??null,this._recordSourceProxy=m,this._recordWasMissing=!1,this._variables=o,this._shouldProcessClientComponents=u,this._log=d}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(n){var i=this._mutatorRecordSourceProxyCache.get(n);if(i==null){var o=this._getTargetForActor(n),a=new FEe(this._getSourceForActor(n),o),s=new IEe(a,this._getDataID,void 0,this._handlers,this._log);i=[a,s],this._mutatorRecordSourceProxyCache.set(n,i)}return i},t.check=function(n,i){return this._assignClientAbstractTypes(n),this._traverse(n,i),this._recordWasMissing===!0?{status:"missing",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}:{status:"available",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||rf(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&MEe(i))){var o=n.args!=null?Db(n.args,this._variables):{},a=(0,o0.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="scalar"){var u=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(u!==void 0)return u}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?Db(n.args,this._variables):{},a=(0,o0.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="linked"){var u=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(u!==void 0&&(u===null||this._mutator.getStatus(u)===Tb))return u}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,a=n.args!=null?Db(n.args,this._variables):{},s=(0,o0.default)(this._handlers),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(u.kind==="pluralLinked"){var d=u.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&o._mutator.getStatus(h)===Tb});if(f)return d}else if(d===null)return null}}}catch(h){s.e(h)}finally{s.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===BEe&&this._handleMissing(),o===Tb){var a=this._source.get(i),s=oN.getInvalidationEpoch(a);s!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,s):s),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ScalarField":o._checkScalar(a,i);break;case"LinkedField":a.plural?o._checkPluralLink(a,i):o._checkLink(a,i);break;case"ActorChange":o._checkActorChange(a.linkedField,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":{var l=a.abstractKey;if(l==null){var u=o._mutator.getType(i);u===a.type&&o._traverseSelections(a.selections,i)}else{var d=o._mutator.getType(i);d==null&&rf(!1);var f=Nb(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(a.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=LEe(a,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var m=zEe(a,n,o._variables);o._checkScalar(m,i);break}case"ModuleImport":o._checkModuleImport(a,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"FragmentSpread":var g=o._variables;o._variables=iN(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=g;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(a.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var _=a.abstractKey,x=o._mutator.getType(i);x==null&&rf(!1);var w=Nb(x),E=o._mutator.getValue(w,_);E==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(a,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(a.backingField,i);break;default:rf(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&rf(!1);var a=qEe(n.documentName),s=this._mutator.getValue(i,a);if(s==null){s===void 0&&this._handleMissing();return}var l=o.get(s);if(l!=null){var u=PEe(l),d=this._variables;this._variables=iN(this._variables,u.argumentDefinitions,n.args),this._traverse(u,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=a0(n,this._variables),a=this._mutator.getValue(i,o);a===void 0&&(a=this._handleMissingScalarField(n,i),a!==void 0&&this._mutator.setValue(i,o,a))},t._checkLink=function(n,i){var o=a0(n,this._variables),a=this._mutator.getLinkedRecordID(i,o);a===void 0&&(a=this._handleMissingLinkField(n,i),a!=null?this._mutator.setLinkedRecordID(i,o,a):a===null&&this._mutator.setValue(i,o,null)),a!=null&&this._traverse(n,a)},t._checkPluralLink=function(n,i){var o=this,a=a0(n,this._variables),s=this._mutator.getLinkedRecordIDs(i,a);s===void 0&&(s=this._handleMissingPluralLinkField(n,i),s!=null?this._mutator.setLinkedRecordIDs(i,a,s):s===null&&this._mutator.setValue(i,a,null)),s&&s.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=a0(n,this._variables),a=this._source.get(i),s=a!=null?oN.getActorLinkedRecordID(a,o):a;if(s==null)s===void 0&&this._handleMissing();else{var l=s[0],u=s[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),m=p[0],g=p[1];this._source=this._getSourceForActor(l),this._mutator=m,this._recordSourceProxy=g,this._assignClientAbstractTypes(n),this._traverse(n,u),this._source=d,this._mutator=f,this._recordSourceProxy=h}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,o0.default)(i[s]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=Nb(d);this._source.get(f)==null&&this._mutator.create(f,jEe),this._mutator.getValue(f,s)==null&&this._mutator.setValue(f,s,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),HEe={check:VEe},WEe=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},GEe=Ki,JEe=dr,QEe=JEe.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,YEe=Pe;function XEe(e){var t=GEe.getValue(e,QEe);return t==null?null:(t instanceof Set||YEe(!1),t)}var F5=XEe;function ZEe(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var ewe=ZEe,twe=Ke.default,ca=twe(Pr),rwe=pv,nwe=Du,aN=nwe.RELAY_LIVE_RESOLVER,iwe=yo,sN=WEe,I5=Da,s0=I5.generateClientID,Fb=I5.generateClientObjectClientID,rt=Ki,owe=ea,awe=owe.createNormalizationSelector,l0=Ou,swe=p5,lwe=swe.normalize,Lu=dr,Ib=Lu.RELAY_RESOLVER_ERROR_KEY,lx=Lu.RELAY_RESOLVER_INVALIDATION_KEY,uwe=Lu.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,Pb=Lu.RELAY_RESOLVER_SNAPSHOT_KEY,Ob=Lu.RELAY_RESOLVER_VALUE_KEY,cwe=Lu.getReadTimeResolverStorageKey,dwe=Lu.getStorageKey,fwe=F5,hwe=ewe,pwe=mv,lN=pwe.isSuspenseSentinel,la=Pe,i2="__resolverLiveStateSubscription",u0="__resolverLiveStateValue",c0="__resolverLiveStateDirty",P5="__RELAY_RESOLVER__",mwe="__relay_model_instance";function Mb(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var gwe=(function(){function e(r,n){this._resolverIDToRecordIDs=new Map,this._recordIDToResolverIDs=new Map,this._getRecordSource=r,this._store=n,this._handlingBatch=!1,this._liveResolverBatchRecordSource=null}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){var l=this._getRecordSource(),u=If(l,n),d=cwe(i,o),f=rt.getLinkedRecordID(u,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,s)){var m;h!=null&&M5(h),f=(m=f)!==null&&m!==void 0?m:s0(n,d),h=rt.create(f,P5);var g=a();if(rt.setValue(h,Pb,g.snapshot),rt.setValue(h,Ib,g.error),i.kind===aN){if(g.resolverResult!=null){g.error!=null&&la(!1);var v=g.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,g.resolverResult,i,o);l.set(f,h);var _=If(l,n),x=rt.clone(_);if(rt.setLinkedRecordID(x,d,f),l.set(n,x),i.fragment!=null){var w,E=dwe(i.fragment,o),C=s0(n,E);Mb(this._resolverIDToRecordIDs,C,f),Mb(this._recordIDToResolverIDs,n,C);var k=(w=g.snapshot)===null||w===void 0?void 0:w.seenRecords;if(k!=null){var A=(0,ca.default)(k),$;try{for(A.s();!($=A.n()).done;){var N=$.value;Mb(this._recordIDToResolverIDs,N,C)}}catch(J){A.e(J)}finally{A.f()}}}}else if(i.kind===aN&&rt.getValue(h,c0)){var M;f=(M=f)!==null&&M!==void 0?M:s0(n,d),h=rt.clone(h);var P=rt.getValue(h,u0);hwe(P)||la(!1),p=this._setLiveResolverValue(h,P,i,o),rt.setValue(h,c0,!1),l.set(f,h)}var I=this._getResolverValue(h),U=rt.getValue(h,Pb),B=rt.getValue(h,Ib),q=null;if(lN(I)){var W;q=(W=f)!==null&&W!==void 0?W:s0(n,d)}return[I,f,B,U,q,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&la(!1);var a=rt.getValue(o,u0);return new Promise(function(s){var l=a.subscribe(function(){l(),s()})})},t._setLiveStateValue=function(n,i,o,a,s){var l=this._makeLiveStateHandler(i),u=o.subscribe(l);rt.setValue(n,u0,o);var d=this._setLiveResolverValue(n,o,a,s);return rt.setValue(n,c0,!1),rt.setValue(n,i2,u),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),a=o.get(n);if(a&&rt.hasValue(a,u0)){var s=rt.clone(a);rt.setValue(s,c0,!0),i._setLiveResolverUpdate(n,s)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=l0.create()),this._liveResolverBatchRecordSource.set(n,i);else{var o=l0.create();o.set(n,i),this._store.publish(o),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&la(!1),this._handlingBatch=!0;try{n()}finally{this._liveResolverBatchRecordSource!=null&&(this._store.publish(this._liveResolverBatchRecordSource),this._store.notify()),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1}},t._setLiveResolverValue=function(n,i,o,a){var s=null,l=null;try{s=i.read()}catch(u){l=u}return rt.setValue(n,Ib,l),this._setResolverValue(n,s,o,a)},t._setResolverValue=function(n,i,o,a){var s=o.normalizationInfo,l=null;if(i!=null&&s!=null&&!lN(i)){var u,d=fwe(n),f=new Set,h=this._getRecordSource();if(s.plural){Array.isArray(i)||la(!1),u=[];for(var p=l0.create(),m=0;m<i.length;m++){var g=i[m];if(g!=null){typeof g!="object"&&la(!1);var v=cN(s,g),_=Fb(v,rt.getDataID(n),m),x=this._normalizeOutputTypeValue(_,g,a,s,[o.path,String(m)],v),w=(0,ca.default)(x.getRecordIDs()),E;try{for(w.s();!(E=w.n()).done;){var C=E.value;p.set(C,If(x,C)),f.add(C)}}catch(I){w.e(I)}finally{w.f()}u.push(_)}}l=uN(h,p,d)}else{typeof i!="object"&&la(!1);var k=cN(s,i),A=Fb(k,rt.getDataID(n)),$=this._normalizeOutputTypeValue(A,i,a,s,[o.path],k),N=(0,ca.default)($.getRecordIDs()),M;try{for(N.s();!(M=N.n()).done;){var P=M.value;f.add(P)}}catch(I){N.e(I)}finally{N.f()}u=A,l=uN(h,$,d)}rt.setValue(n,uwe,f),sN(u),rt.setValue(n,Ob,u)}else sN(i),rt.setValue(n,Ob,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return rt.getValue(n,Ob)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,a=Array.from(n);a.length;){var s=a.pop();o.add(s),n.add(s);var l=this._recordIDToResolverIDs.get(s);if(l!=null){var u=(0,ca.default)(l),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;if(!o.has(f)){o.add(f);var h=this._resolverIDToRecordIDs.get(f);if(h==null)continue;var p=(0,ca.default)(h),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;O5(g,i),o.has(g)||(o.add(g),a.push(g))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){u.e(v)}finally{u.f()}}}},t._isInvalid=function(n,i){if(!rt.getValue(n,lx))return!1;var o=rt.getValue(n,Pb),a=o?.data,s=o?.selector;if(a==null||s==null)return!0;var l=i(s),u=l.data,d=rwe(a,u);if(d!==a)return!0;if(iwe.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=rt.clone(n);rt.setValue(f,lx,!1);var h=this._getRecordSource();h.set(rt.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,a,s,l){var u=l0.create();switch(a.kind){case"OutputType":{var d=rt.create(n,l);u.set(n,d);var f=awe(a.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(s);return lwe(u,f,i,p,void 0,h).source}case"WeakModel":{var m=rt.create(n,l);return rt.setValue(m,mwe,i),u.set(n,m),u}default:a.kind,la(!1)}},t.ensureClientRecord=function(n,i){var o=Fb(i,n),a=this._getRecordSource();if(!a.has(o)){var s=rt.create(o,i);rt.setValue(s,"id",n),a.set(o,s)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return bwe(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,ca.default)(n),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=this._getRecordSource().get(a);s!=null&&o2(s)&&this._getRecordSource().delete(a)}}catch(l){i.e(l)}finally{i.f()}}},e})();function uN(e,t,r){var n=new Set;if(r!=null){var i=(0,ca.default)(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;t.has(a)||(n.add(a),e.remove(a))}}catch(p){i.e(p)}finally{i.f()}}var s=(0,ca.default)(t.getRecordIDs()),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=If(t,u);if(e.has(u)){var f=If(e,u),h=rt.update(f,d);h!==f&&(n.add(u),e.set(u,h),_we(f,e))}else e.set(u,d)}}catch(p){s.e(p)}finally{s.f()}return n}function vwe(e){var t=new Set;return rt.getFields(e).forEach(function(r){if(rt.hasLinkedRecordID(e,r)){var n=rt.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(rt.hasLinkedRecordIDs(e,r)){var i;(i=rt.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function O5(e,t){var r=t.get(e);if(r){var n=rt.clone(r);rt.setValue(n,lx,!0),t.set(e,n)}}function _we(e,t){var r=vwe(e),n=(0,ca.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,a=t.get(o);a!=null&&o2(a)&&O5(o,t)}}catch(s){n.e(s)}finally{n.f()}}function bwe(e,t){if(t.size!==0){var r=(0,ca.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&o2(o)&&M5(o)}}catch(a){r.e(a)}finally{r.f()}}}function o2(e){return rt.getType(e)===P5}function M5(e){var t=rt.getValue(e,i2);t?.()}function If(e,t){var r=e.get(t);return r==null&&la(!1),r}function ywe(e){return e}function cN(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&la(!1),n}var xwe={LiveResolverCache:gwe,getUpdatedDataIDs:ywe,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:i2},Swe=Ke.default,Ewe=Swe(Wt),L5=Ki,dN=Ou,wwe=Pe,Lb=L5.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),z5=(function(){function e(r){this._base=r,this._sink=dN.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==Lb}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===Lb?void 0:i}else return this._base.get(n)},t.getStatus=function(n){var i=this.get(n);return i===void 0?"UNKNOWN":i===null?"NONEXISTENT":"EXISTENT"},t.clear=function(){this._base=dN.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,Lb)},t.set=function(n,i){this._sink.set(n,i)},t.getRecordIDs=function(){return Object.keys(this.toJSON())},t.size=function(){return Object.keys(this.toJSON()).length},t.toJSON=function(){var n=this,i=(0,Ewe.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var a=n.get(o);a===void 0?delete i[o]:i[o]=L5.toJSON(a)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function kwe(e){return new z5(e)}function Cwe(e){return e instanceof z5||wwe(!1),e.getOptimisticRecordIDs()}var Rwe={create:kwe,getOptimisticRecordIDs:Cwe},Awe=Du,$we=Awe.RELAY_LIVE_RESOLVER,fN=Pe,Twe=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){i.kind===$we&&fN(!1);var l=a(),u=l.resolverResult,d=l.snapshot,f=l.error;return[u,void 0,f,d,void 0,void 0]},t.invalidateDataIDs=function(n){},t.ensureClientRecord=function(n,i){fN(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),Nwe={NoopResolverCache:Twe},Sv=Ke.default,hN=Sv(Wt),Dwe=Sv(ei),Fwe=Sv(Ad),zb=Sv(Sl),Iwe=["message"],pN=yo,Pwe=mv,Owe=Pwe.isSuspenseSentinel,Mwe=El,ii=Ki,Fa=dr,mN=Fa.CLIENT_EDGE_TRAVERSAL_PATH,Lwe=Fa.FRAGMENT_OWNER_KEY,zwe=Fa.FRAGMENT_PROP_NAME_KEY,d0=Fa.FRAGMENTS_KEY,f0=Fa.ID_KEY,Uwe=Fa.MODULE_COMPONENT_KEY,Bwe=Fa.ROOT_ID,J0=Fa.getArgumentValues,jwe=Fa.getModuleComponentKey,h0=Fa.getStorageKey,qwe=Nwe,Vwe=qwe.NoopResolverCache,U5=Lw,Kwe=U5.RESOLVER_FRAGMENT_ERRORED_SENTINEL,Hwe=U5.withResolverContext,Wwe=bv,Gwe=Wwe.generateTypeID,zr=Pe;function B5(e,t,r,n){var i=new Jwe(e,t,r??new Vwe,n);return i.read()}var Jwe=(function(){function e(r,n,i,o){var a,s,l,u;this._clientEdgeTraversalPath=(a=n.clientEdgeTraversalPath)!==null&&a!==void 0&&a.length?(0,zb.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(s=(l=this._owner.node.operation.use_exec_time_resolvers)!==null&&l!==void 0?l:((u=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||u===void 0?void 0:u.get())===!0)!==null&&s!==void 0?s:!1,this._recordSource=r,this._seenRecords=new Set,this._selector=n,this._variables=n.variables,this._resolverCache=i,this._fragmentName=n.node.name,this._updatedDataIDs=new Set,this._resolverContext=o}var t=e.prototype;return t.read=function(){var n,i=this._selector,o=i.node,a=i.dataID,s=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,u=this._recordSource.get(a),d=!s;if(d&&l==null&&u!=null&&(this._recordMatchesTypeCondition(u,o.type)||(d=!1)),d&&l!=null&&u!=null){var f=this._implementsInterface(u,l);f===!1&&(d=!1)}this._isWithinUnmatchedTypeRefinement=!d;var h=this._traverse(o,a,null),p=(n=this._selector.node.metadata)===null||n===void 0?void 0:n.catchTo;return p!=null&&(h=this._catchErrors(h,p,null)),this._updatedDataIDs.size>0&&(this._resolverCache.notifyUpdatedSubscribers(this._updatedDataIDs),this._updatedDataIDs.clear()),{data:h,isMissingData:this._isMissingData&&d,missingClientEdges:this._missingClientEdges.length?this._missingClientEdges:null,missingLiveResolverFields:this._missingLiveResolverFields,seenRecords:this._seenRecords,selector:this._selector,fieldErrors:this._fieldErrors}},t._maybeAddFieldErrors=function(n,i){var o=ii.getErrors(n,i);if(o!=null){var a=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var s=0;s<o.length;s++){var l,u,d,f=o[s];this._fieldErrors.push({kind:"relay_field_payload.error",owner:a,fieldPath:((l=f.path)!==null&&l!==void 0?l:[]).join("."),error:f,shouldThrow:(u=(d=this._selector.node.metadata)===null||d===void 0?void 0:d.throwOnFieldError)!==null&&u!==void 0?u:!1,handled:!1,uiContext:void 0})}}},t._markDataAsMissing=function(n){var i,o;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var a=this._fragmentName;if(this._fieldErrors.push((i=(o=this._selector.node.metadata)===null||o===void 0?void 0:o.throwOnFieldError)!==null&&i!==void 0&&i?{kind:"missing_expected_data.throw",owner:a,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:a,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var s=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];s!==null&&this._missingClientEdges.push({request:s.readerClientEdge.operation,clientEdgeDestinationID:s.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var a=this._recordSource.get(i);if(this._seenRecords.add(i),a==null)return a===void 0&&this._markDataAsMissing("<record>"),a;var s=o||{},l=this._traverseSelections(n.selections,a,s);return l?s:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||zr(!1),this._variables[n]},t._maybeReportUnexpectedNull=function(n){if(n.action!=="NONE"){var i=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var o;if(n.field.linkedField!=null){var a;o=(a=n.field.linkedField.alias)!==null&&a!==void 0?a:n.field.linkedField.name}else{var s;o=(s=n.field.alias)!==null&&s!==void 0?s:n.field.name}switch(n.action){case"THROW":this._fieldErrors.push({kind:"missing_required_field.throw",fieldPath:o,owner:i,handled:!1,uiContext:void 0});return;case"LOG":this._fieldErrors.push({kind:"missing_required_field.log",fieldPath:o,owner:i,uiContext:void 0});return;default:n.action}}},t._handleRequiredFieldValue=function(n,i){return i==null?(this._maybeReportUnexpectedNull(n),!1):!0},t._catchErrors=function(n,i,o){var a=n;switch(i){case"RESULT":a=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(a=null);break}var s=this._fieldErrors;if(this._fieldErrors=o,s!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<s.length;l++)this._fieldErrors.push(gN(s[l]))}return a},t._asResult=function(n){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:n};var i=this._fieldErrors.map(function(o){switch(o.kind){case"relay_field_payload.error":var a=o.error;a.message;var s=(0,Fwe.default)(a,Iwe);return s;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:o.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(o.fieldPath," in ").concat(o.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(o.fieldPath,"' in '").concat(o.owner,"'.")};case"missing_required_field.log":return null;default:o.kind,zr(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var a=0;a<n.length;a++){var s=n[a];switch(s.kind){case"RequiredField":var l=this._readClientSideDirectiveField(s,i,o);if(!this._handleRequiredFieldValue(s,l))return!1;break;case"CatchField":{var u,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(s,i,o),m=(u=(d=s.field)===null||d===void 0?void 0:d.backingField)!==null&&u!==void 0?u:s.field,g=(f=m?.alias)!==null&&f!==void 0?f:m?.name;g==null&&zr(!1),o[g]=this._catchErrors(p,s.to,h);break}case"ScalarField":this._readScalar(s,i,o);break;case"LinkedField":s.plural?this._readPluralLink(s,i,o):this._readLink(s,i,o);break;case"Condition":var v=!!this._getVariableValue(s.condition);if(v===s.passingValue){var _=this._traverseSelections(s.selections,i,o);if(!_)return!1}break;case"InlineFragment":{var x=this._readInlineFragment(s,i,o,!1);if(x===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(s,i,o):this._readResolverField(s,i,o);break}case"FragmentSpread":this._createFragmentPointer(s,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(s,i,o);break}case"ModuleImport":this._readModuleImport(s,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(s,i,o);break;case"Defer":case"ClientExtension":{var w=this._isMissingData,E=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var C=this._traverseSelections(s.selections,i,o);if(this._isMissingData=w||this._missingClientEdges.length>E||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!C)return!1;break}case"Stream":{var k=this._traverseSelections(s.selections,i,o);if(!k)return!1;break}case"ActorChange":this._readActorChange(s,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(s.backingField.kind==="RelayResolver"||s.backingField.kind==="RelayLiveResolver")){var A=s.linkedField;A.plural?this._readPluralLink(A,i,o):this._readLink(A,i,o)}else this._readClientEdge(s,i,o);break;default:zr(!1)}}return!0},t._readClientSideDirectiveField=function(n,i,o){switch(n.field.kind){case"ScalarField":return this._readScalar(n.field,i,o);case"LinkedField":return n.field.plural?this._readPluralLink(n.field,i,o):this._readLink(n.field,i,o);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(n.field,i,o):this._readResolverField(n.field,i,o);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(n.field.backingField.kind==="RelayResolver"||n.field.backingField.kind==="RelayLiveResolver")){var a=n.field;return a.linkedField.plural?this._readPluralLink(a.linkedField,i,o):this._readLink(a.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,zr(!1)}},t._readResolverField=function(n,i,o){var a,s=ii.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var u=this._readResolverFieldImpl(n,s),d=(a=n.alias)!==null&&a!==void 0?a:n.name;return this._prependPreviousErrors(l,d),o[d]=u,u},t._readResolverFieldImpl=function(n,i){var o=this,a=n.fragment,s,l=function(x){return s!=null?{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors}:(s=B5(o._recordSource,x,o._resolverCache),{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors})},u=function(){if(a!=null){var x={__id:i,__fragmentOwner:o._owner,__fragments:(0,Dwe.default)({},a.name,a.args?J0(a.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(x[mN]=(0,zb.default)(o._clientEdgeTraversalPath));var w={getDataForResolverFragment:l};return Hwe(w,function(){var A=vN(n,o._variables,x,o._resolverContext),$=A[0],N=A[1];return{resolverResult:$,snapshot:s,error:N}})}else{var E=vN(n,o._variables,null,o._resolverContext),C=E[0],k=E[1];return{resolverResult:C,snapshot:void 0,error:k}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,u,l),f=d[0],h=d[1],p=d[2],m=d[3],g=d[4],v=d[5];return this._propagateResolverMetadata(n.path,m,p,h,g,v),f},t._propagateResolverMetadata=function(n,i,o,a,s,l){var u=this;if(i!=null){if(i.missingClientEdges!=null)for(var d=0;d<i.missingClientEdges.length;d++){var f=i.missingClientEdges[d];this._missingClientEdges.push(f)}if(i.missingLiveResolverFields!=null){this._isMissingData=this._isMissingData||i.missingLiveResolverFields.length>0;for(var h=0;h<i.missingLiveResolverFields.length;h++){var p=i.missingLiveResolverFields[h];this._missingLiveResolverFields.push(p)}}if(i.fieldErrors!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var m=0;m<i.fieldErrors.length;m++){var g,v=i.fieldErrors[m];((g=this._selector.node.metadata)===null||g===void 0?void 0:g.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(gN(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var _,x,w={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:o,shouldThrow:(_=(x=this._selector.node.metadata)===null||x===void 0?void 0:x.throwOnFieldError)!==null&&_!==void 0?_:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[w]:this._fieldErrors.push(w)}a!=null&&this._seenRecords.add(a),s!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(s)),l?.forEach(function(E){u._updatedDataIDs.add(E)})},t._readClientEdge=function(n,i,o){var a=this,s,l=n.backingField;l.kind==="ClientExtension"&&zr(!1);var u=(s=l.alias)!==null&&s!==void 0?s:l.name,d={};this._traverseSelections([l],i,d);var f=d[u];if(f==null||Owe(f))return o[u]=f,f;if(n.linkedField.plural){Array.isArray(f)||zr(!1);var h;n.kind!=="ClientEdgeToClientObject"&&zr(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var M,P=(M=n.concreteType)!==null&&M!==void 0?M:N.__typename;typeof P!="string"&&zr(!1);var I=Ub(N,l.path,a._owner.identifier),U=a._resolverCache.ensureClientRecord(I,P),B=n.modelResolvers;if(B!=null){var q=B[P];q===void 0&&zr(!1);var W=a._readResolverFieldImpl(q,U);return W!=null?U:null}return U}):h=f.map(function(N){return Ub(N,l.path,a._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var p=this._readLinkedIds(n.linkedField,h,i,o);return this._clientEdgeTraversalPath.pop(),o[u]=p,p}else{var m,g=Ub(f,l.path,this._owner.identifier),v,_=(m=n.concreteType)!==null&&m!==void 0?m:f.__typename,x;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof _!="string"&&zr(!1),v=this._resolverCache.ensureClientRecord(g,_),x=null):(v=g,x=null):(v=g,x={readerClientEdge:n,clientEdgeDestinationID:g});var w=n.modelResolvers;if(w!=null){typeof _!="string"&&zr(!1);var E=w[_];E===void 0&&zr(!1);var C=this._readResolverFieldImpl(E,v);if(C==null)return o[u]=null,null}this._clientEdgeTraversalPath.push(x);var k=o[u];k==null||typeof k=="object"||zr(!1);var A=this._fieldErrors;this._fieldErrors=null;var $=this._traverse(n.linkedField,v,k);return this._prependPreviousErrors(A,u),this._clientEdgeTraversalPath.pop(),o[u]=$,$}},t._readScalar=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=h0(n,this._variables),u=ii.getValue(i,l);return u===null||pN.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(u)&&u.length===0?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(s),o[s]=u,u},t._readLink=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=h0(n,this._variables),u=ii.getLinkedRecordID(i,l);if(u==null)return o[s]=u,u===null?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(s),u;var d=o[s];d==null||typeof d=="object"||zr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,u,d);return this._prependPreviousErrors(f,s),o[s]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var a=this._fieldErrors[o];a.owner===this._fragmentName&&(a.kind==="missing_expected_data.throw"||a.kind==="missing_expected_data.log"||a.kind==="missing_required_field.throw"||a.kind==="missing_required_field.log")&&(a.fieldPath="".concat(i,".").concat(a.fieldPath))}if(n!=null){for(var s=this._fieldErrors.length-1;s>=0;s--)n.push(this._fieldErrors[s]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=h0(n,this._variables),u=ii.getActorLinkedRecordID(i,l);if(u==null)return o[s]=u,u===void 0?this._markDataAsMissing(s):u===null&&this._maybeAddFieldErrors(i,l),o[s];var d=u[0],f=u[1],h={};return this._createFragmentPointer(n.fragmentSpread,ii.fromObject({__id:f}),h),o[s]={__fragmentRef:h,__viewer:d},o[s]},t._readPluralLink=function(n,i,o){var a=h0(n,this._variables),s=ii.getLinkedRecordIDs(i,a);return(s===null||pN.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(s)&&s.length===0)&&this._maybeAddFieldErrors(i,a),this._readLinkedIds(n,s,i,o)},t._readLinkedIds=function(n,i,o,a){var s=this,l,u=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return a[u]=i,i===void 0&&this._markDataAsMissing(u),i;var d=a[u];d==null||Array.isArray(d)||zr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,m){if(p==null){p===void 0&&s._markDataAsMissing(String(m)),h[m]=p;return}var g=h[m];g==null||typeof g=="object"||zr(!1);var v=s._fieldErrors;s._fieldErrors=null,h[m]=s._traverse(n,p,g),s._prependPreviousErrors(v,m)}),this._prependPreviousErrors(f,u),a[u]=h,h},t._readModuleImport=function(n,i,o){var a=jwe(n.documentName),s=ii.getValue(i,a),l=s!==void 0?s:n.componentModuleProvider;if(l==null){l===void 0&&this._markDataAsMissing("<module-import>");return}this._createFragmentPointer({kind:"FragmentSpread",name:n.fragmentName,args:n.args},i,o),o[zwe]=n.fragmentPropName,o[Uwe]=l},t._readAliasedInlineFragment=function(n,i,o){var a=this._fieldErrors;this._fieldErrors=null;var s=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(a,n.name),s===!1&&(s=null),o[n.name]=s},t._readInlineFragment=function(n,i,o,a){if(n.type==null){var s=this._traverseSelections(n.selections,i,o);return s===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var s=this._traverseSelections(n.selections,i,o);if(!s)return!1}else return null;else{var u=this._implementsInterface(i,l);if(u===!1&&a)return null;var d=this._isMissingData,f=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=f||u===!1;var h=this._traverseSelections(n.selections,i,o);if(this._isWithinUnmatchedTypeRefinement=f,u===!1)return this._isMissingData=d,null;if(u==null)return;if(h===!1)return!1}return o},t._recordMatchesTypeCondition=function(n,i){var o=ii.getType(n);return o!=null&&o===i||ii.getDataID(n)===Bwe},t._createFragmentPointer=function(n,i,o){var a=o[d0];a==null&&(a=o[d0]={}),typeof a=="object"&&a!=null||zr(!1),o[f0]==null&&(o[f0]=ii.getDataID(i)),a[n.name]=J0(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[Lwe]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[mN]=(0,zb.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var a=o[d0];a==null&&(a=o[d0]={}),typeof a=="object"&&a!=null||zr(!1),o[f0]==null&&(o[f0]=ii.getDataID(i));var s={},l=this._fragmentName;this._fragmentName=n.name;var u=this._variables,d=n.args?J0(n.args,this._variables):{};this._variables=Mwe.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,s),this._variables=u,this._fragmentName=l,a[n.name]=s},t._implementsInterface=function(n,i){var o=ii.getType(n),a=this._recordSource.get(Gwe(o)),s=a!=null?ii.getValue(a,i):null;return s==null&&this._markDataAsMissing("<abstract-type-hint>"),s},e})();function gN(e){switch(e.kind){case"missing_expected_data.throw":case"missing_required_field.throw":case"relay_field_payload.error":case"relay_resolver.error":return(0,hN.default)((0,hN.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,zr(!1)}}function vN(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,a=null;try{var s=[];e.fragment!=null&&s.push(r);var l=e.args?J0(e.args,t):void 0;s.push(l),s.push(n),o=i.apply(null,s)}catch(u){o=null,u!==Kwe&&(a=u)}return[o,a]}function Ub(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;zr(!1)}var a2={read:B5},Qwe=Ke.default,_N=Qwe(Pr),Ywe=t2,Xwe=T5,Zwe=F5,e2e=El,bN=e2e.getLocalVariables,Ua=Ki,Ev=dr,t2e=bv,yN=t2e.generateTypeID,Bb=Pe,r2e=Ev.getReadTimeResolverStorageKey,xN=Ev.getStorageKey,n2e=Ev.getModuleOperationKey;function i2e(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,u=new o2e(e,l,r,n,i,o);u.mark(s,a)}var o2e=(function(){function e(r,n,i,o,a,s){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=s??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=a}var t=e.prototype;return t.mark=function(n,i){(n.kind==="Operation"||n.kind==="SplitOperation")&&(this._operationName=n.name),this._traverse(n,i)},t._traverse=function(n,i){this._references.add(i);var o=this._recordSource.get(i);o!=null&&this._traverseSelections(n.selections,o)},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Bb(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ActorChange":o._traverseLink(a.linkedField,i);break;case"LinkedField":a.plural?o._traversePluralLink(a,i):o._traverseLink(a,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":if(a.abstractKey==null){var l=Ua.getType(i);(l!=null&&l===a.type||l===Ev.ROOT_TYPE)&&o._traverseSelections(a.selections,i)}else{var u=Ua.getType(i),d=yN(u);o._references.add(d),o._traverseSelections(a.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=bN(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=Xwe(a,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=Ua.getType(i),m=yN(p);o._references.add(m);break}case"ModuleImport":o._traverseModuleImport(a,i);break;case"ClientExtension":o._traverseSelections(a.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(a,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(a,i);break;default:Bb(!1)}})},t._traverseClientEdgeToClientObject=function(n,i){if(this._useExecTimeResolvers){this._traverseLink(n.linkedField,i);return}var o=this._traverseResolverField(n.backingField,i);if(o!=null){var a=this._recordSource.get(o);if(a!=null)if(n.backingField.isOutputType){var s=Zwe(a);if(s!=null){var l=(0,_N.default)(s),u;try{for(l.s();!(u=l.n()).done;){var d=u.value;this._references.add(d)}}catch(x){l.e(x)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=Ua.getResolverLinkedRecordIDs(a,h);if(p!=null){var m=(0,_N.default)(p),g;try{for(m.s();!(g=m.n()).done;){var v=g.value;v!=null&&this._traverse(f,v)}}catch(x){m.e(x)}finally{m.f()}}}else{var _=Ua.getResolverLinkedRecordID(a,h);_!=null&&this._traverse(f,_)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=r2e(n,this._variables),a=Ua.getLinkedRecordID(i,o);a!=null&&this._references.add(a);var s=n.fragment;return s!=null&&this._traverseSelections([s],i),a}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&Bb(!1);var a=n2e(n.documentName),s=Ua.getValue(i,a);if(s!=null){var l=o.get(s);if(l!=null){var u=Ywe(l),d=this._variables;this._variables=bN(this._variables,u.argumentDefinitions,n.args),this._traverseSelections(u.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=xN(n,this._variables),a=Ua.getLinkedRecordID(i,o);a!=null&&this._traverse(n,a)},t._traversePluralLink=function(n,i){var o=this,a=xN(n,this._variables),s=Ua.getLinkedRecordIDs(i,a);s?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),a2e={mark:i2e},s2e=Symbol.iterator;function l2e(e,t){for(var r=e[s2e](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var u2e=l2e,c2e=dr,d2e=c2e.ROOT_ID,f2e=e2,h2e=f2e.VIEWER_ID,p2e=Symbol.iterator;function m2e(e,t){for(var r=e[p2e](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==d2e&&i!==h2e)return!0;n=r.next()}return!1}var g2e=m2e,SN=pv,EN=yo,v2e=u2e,_2e=g2e,wN=a2,b2e=(function(){function e(r,n,i){this._subscriptions=new Set,this.__log=r,this._resolverCache=n,this._resolverContext=i}var t=e.prototype;return t.subscribe=function(n,i){var o=this,a={backup:null,callback:i,snapshot:n,stale:!1},s=function(){o._subscriptions.delete(a)};return this._subscriptions.add(a),{dispose:s}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var a=o.snapshot,s=wN.read(n,a.selector,i._resolverCache,i._resolverContext),l=SN(a.data,s.data);s.data=l,o.backup=s})},t.restoreSubscriptions=function(){this._subscriptions.forEach(function(n){var i=n.backup;n.backup=null,i?(i.data!==n.snapshot.data&&(n.stale=!0),n.snapshot={data:n.snapshot.data,isMissingData:i.isMissingData,missingClientEdges:i.missingClientEdges,missingLiveResolverFields:i.missingLiveResolverFields,seenRecords:i.seenRecords,selector:i.selector,fieldErrors:i.fieldErrors}):n.stale=!0})},t.updateSubscriptions=function(n,i,o,a){var s=this,l=i.size!==0;this._subscriptions.forEach(function(u){var d=s._updateSubscription(n,u,i,l,a);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,a,s){var l=i.backup,u=i.callback,d=i.snapshot,f=i.stale,h=a&&v2e(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?wN.read(n,d.selector,this._resolverCache,this._resolverContext):l,m=SN(d.data,p.data);if(p={data:m,isMissingData:p.isMissingData,missingClientEdges:p.missingClientEdges,missingLiveResolverFields:p.missingLiveResolverFields,seenRecords:p.seenRecords,selector:p.selector,fieldErrors:p.fieldErrors},i.snapshot=p,i.stale=!1,p.data!==d.data)return this.__log&&EN.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:s,snapshot:d,nextSnapshot:p}),u(p),d.selector.owner;if(EN.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||_2e(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),y2e=b2e,j5=Ke.default,kN=j5(Pr),x2e=j5(ei),q5=Xw,S2e=q5.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,CN=q5.assertInternalActorIdentifier,E2e=DSe,w2e=HEe,k2e=v5,s2=xwe,C2e=s2.LiveResolverCache,R2e=s2.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,A2e=s2.getUpdatedDataIDs,Vl=Ki,RN=Rwe,$2e=a2,T2e=a2e,N2e=y2e,D2e=dr,V5=dr,jb=V5.ROOT_ID,F2e=V5.ROOT_TYPE,qb=Pe,I2e=10,P2e=(function(){function e(r,n){var i=this,o,a,s,l,u,d,f,h;(0,x2e.default)(this,"_gcStep",function(){i._gcRun&&(i._gcRun.next().done?i._gcRun=null:i._gcScheduler(i._gcStep))}),this._currentWriteEpoch=0,this._gcHoldCounter=0,this._gcReleaseBufferSize=(o=n?.gcReleaseBufferSize)!==null&&o!==void 0?o:I2e,this._shouldRetainWithinTTL_EXPERIMENTAL=(a=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&a!==void 0?a:!1,this._gcRun=null,this._gcScheduler=(s=n?.gcScheduler)!==null&&s!==void 0?s:E2e,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:k2e,this._globalInvalidationEpoch=null,this._invalidationSubscriptions=new Set,this._invalidatedRecordIDs=new Set,this.__log=(u=n?.log)!==null&&u!==void 0?u:null,this._queryCacheExpirationTime=n?.queryCacheExpirationTime,this._operationLoader=(d=n?.operationLoader)!==null&&d!==void 0?d:null,this._optimisticSource=null,this._recordSource=r,this._releaseBuffer=[],this._roots=new Map,this._shouldScheduleGC=!1,this._resolverCache=new C2e(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new N2e(n?.log,this._resolverCache,this._resolverContext),this._updatedRecordIDs=new Set,this._shouldProcessClientComponents=(f=n?.shouldProcessClientComponents)!==null&&f!==void 0?f:!1,this._treatMissingFieldsAsNull=(h=n?.treatMissingFieldsAsNull)!==null&&h!==void 0?h:!1,this._actorIdentifier=n?.actorIdentifier,O2e(this._recordSource)}var t=e.prototype;return t.getSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getOperationLoader=function(){return this._operationLoader},t._getMutableRecordSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getLiveResolverPromise=function(n){return this._resolverCache.getLiveResolverPromise(n)},t.batchLiveStateUpdates=function(n){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});try{this._resolverCache.batchLiveStateUpdates(n)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}},t.check=function(n,i){var o,a,s,l,u,d,f,h=n.root,p=this._getMutableRecordSource(),m=this._globalInvalidationEpoch,g=(o=(a=n.request.node.operation.use_exec_time_resolvers)!==null&&a!==void 0?a:((s=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),_=v!=null?v.epoch:null;if(m!=null&&(_==null||_<=m))return{status:"stale"};var x=(l=i?.handlers)!==null&&l!==void 0?l:[],w=(u=i?.getSourceForActor)!==null&&u!==void 0?u:function(k){return CN(k),p},E=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(k){return CN(k),p},C=w2e.check(w,E,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:S2e,h,x,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,g);return L2e(C,_,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,a=!1,s=function(){if(!a){a=!0;var d=i._roots.get(o);if(d!=null&&(d.refCount--,d.refCount===0)){var f=i._queryCacheExpirationTime,h=d.fetchTime!=null&&f!=null&&d.fetchTime<=Date.now()-f;if(h)i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(o),i.scheduleGC();else if(i._releaseBuffer.push(o),i._releaseBuffer.length>i._gcReleaseBufferSize){var p=i._releaseBuffer.shift();i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(p),i.scheduleGC()}}}},l=this._roots.get(o);return l!=null?(l.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(u){return u!==o})),l.refCount+=1):this._roots.set(o,{operation:n,refCount:1,epoch:null,fetchTime:null}),{dispose:s}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),a=$2e.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),a},t.notify=function(n,i){var o=this,a=this.__log;a?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var s=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(s,this._updatedRecordIDs,l,n),this._invalidationSubscriptions.forEach(function(h){o._updateInvalidationSubscription(h,i===!0)}),n!=null){var u=n.request.identifier,d=this._roots.get(u);if(d!=null)d.epoch=this._currentWriteEpoch,d.fetchTime=Date.now();else if(n.request.node.params.operationKind==="query"&&this._gcReleaseBufferSize>0&&this._releaseBuffer.length<this._gcReleaseBufferSize){var f={operation:n,refCount:0,epoch:this._currentWriteEpoch,fetchTime:Date.now()};this._releaseBuffer.push(u),this._roots.set(u,f)}}return a?.({name:"store.notify.complete",sourceOperation:n,updatedRecordIDs:this._updatedRecordIDs,invalidatedRecordIDs:this._invalidatedRecordIDs,subscriptionsSize:this._storeSubscriptions.size(),updatedOwners:l}),this._updatedRecordIDs.clear(),this._invalidatedRecordIDs.clear(),l},t.publish=function(n,i){var o=this._getMutableRecordSource();M2e(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var a=this.__log;a?.({name:"store.publish",source:n,optimistic:o===this._optimisticSource})},t.subscribe=function(n,i){return this._storeSubscriptions.subscribe(n,i)},t.holdGC=function(){var n=this;this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._gcHoldCounter++;var i=function(){n._gcHoldCounter>0&&(n._gcHoldCounter--,n._gcHoldCounter===0&&n._shouldScheduleGC&&(n.scheduleGC(),n._shouldScheduleGC=!1))};return{dispose:i}},t.toJSON=function(){return"RelayModernStore()"},t.getEpoch=function(){return this._currentWriteEpoch},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t.lookupInvalidationState=function(n){var i=this,o=new Map;return n.forEach(function(a){var s,l=i.getSource().get(a);o.set(a,(s=Vl.getInvalidationEpoch(l))!==null&&s!==void 0?s:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,a=n.invalidations;if(o.get("global")!==a.get("global"))return!0;var s=(0,kN.default)(n.dataIDs),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(o.get(u)!==a.get(u))return!0}}catch(d){s.e(d)}finally{s.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,a={callback:i,invalidationState:n},s=function(){o._invalidationSubscriptions.delete(a)};return this._invalidationSubscriptions.add(a),{dispose:s}},t._updateInvalidationSubscription=function(n,i){var o=this,a=n.callback,s=n.invalidationState,l=s.dataIDs,u=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});u&&a()},t.snapshot=function(){this._optimisticSource!=null&&qb(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=RN.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||qb(!1);var i=this.__log;i?.({name:"store.restore"});var o=RN.getOptimisticRecordIDs(n);this._resolverCache.unsubscribeFromLiveResolverRecords(o),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(o)},t.scheduleGC=function(){if(this._gcHoldCounter>0){this._shouldScheduleGC=!0;return}this._gcRun||(this._gcRun=this._collect(),this._gcScheduler(this._gcStep))},t.__gc=function(){if(this._optimisticSource==null)for(var n=this._collect();!n.next().done;);},t._collect=function*(){if(!(this._shouldRetainWithinTTL_EXPERIMENTAL&&this._queryCacheExpirationTime==null)){var n=this.__log;e:for(;;){n?.({name:"store.gc.start"});var i=this._currentWriteEpoch,o=new Set,a=(0,kN.default)(this._roots.entries()),s;try{for(a.s();!(s=a.n()).done;){var l,u,d,f=s.value,h=f[0],p=f[1],m=p.operation,g=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var _=this._queryCacheExpirationTime;_==null&&qb(!1);var x=v==null||v<=Date.now()-_,w=x&&g===0&&!this._releaseBuffer.includes(h);if(w)continue}var E=m.root,C=(l=(u=m.request.node.operation.use_exec_time_resolvers)!==null&&u!==void 0?u:((d=m.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(T2e.mark(this._recordSource,E,o,this._operationLoader,this._shouldProcessClientComponents,C),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(P){a.e(P)}finally{a.f()}for(var k=this._recordSource.getRecordIDs(),A=0;A<k.length;A++){var $=k[A];if(!o.has($)){var N=this._recordSource.get($);if(N!=null){var M=Vl.getValue(N,R2e);M?.()}this._recordSource.remove($),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete($)}}n?.({name:"store.gc.end",references:o});return}}},t.__getNormalizationOptions=function(n){return{path:n,getDataID:this._getDataID,log:this.__log,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents,actorIdentifier:this._actorIdentifier}},t.__notifyUpdatedSubscribers=function(n){var i=A2e(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function O2e(e){if(!e.has(jb)){var t=Vl.create(jb,F2e);e.set(jb,t)}}function M2e(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),m=t.get(h);if(m!==null){var g;p!=null?g=Vl.clone(p):g=m!=null?Vl.clone(m):null,g&&(Vl.setValue(g,D2e.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,g))}});for(var a=t.getRecordIDs(),s=0;s<a.length;s++){var l=a[s],u=t.get(l),d=e.get(l);if(u&&d){var f=Vl.update(d,u);f!==d&&(i.add(l),e.set(l,f))}else u===null?(e.delete(l),d!==null&&i.add(l)):u&&(e.set(l,u),i.add(l))}}function L2e(e,t,r,n){var i=e.mostRecentlyInvalidatedAt,o=e.status;if(typeof i=="number"&&(t==null||i>t))return{status:"stale"};if(o==="missing")return{status:"missing"};if(r!=null&&n!=null){var a=r<=Date.now()-n;if(a)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var l2=P2e,K5=dr,z2e=K5.ROOT_TYPE,AN=K5.getStorageKey,U2e=w5,B2e=U2e.readUpdatableFragment,j2e=k5,q2e=j2e.readUpdatableQuery,$N=Pe,V2e=(function(){function e(r,n,i,o){this.__mutator=r,this.__recordSource=n,this._readSelector=i,this._missingFieldHandlers=o}var t=e.prototype;return t.create=function(n,i){return this.__recordSource.create(n,i)},t.delete=function(n){this.__recordSource.delete(n)},t.get=function(n){return this.__recordSource.get(n)},t.getRoot=function(){return this.__recordSource.getRoot()},t.getOperationRoot=function(){var n=this.__recordSource.get(this._readSelector.dataID);return n||(n=this.__recordSource.create(this._readSelector.dataID,z2e)),n},t._getRootField=function(n,i,o){var a=n.node.selections.find(function(s){return s.kind==="LinkedField"&&s.name===i||s.kind==="RequiredField"&&s.field.name===i});return a&&a.kind==="RequiredField"&&(a=a.field),a&&a.kind==="LinkedField"||$N(!1),a.plural!==o&&$N(!1),a},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=AN(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=AN(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return q2e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return B2e(n,i,this,this._missingFieldHandlers)},e})(),K2e=V2e,Vb,Kb,Hb=S5,Wb=$5,TN=K2e,H2e=yo,W2e=a2,NN=Ou,p0=Pe,Gb=typeof em<"u"?em:typeof window<"u"?window:void 0,Jb=(Vb=Gb==null||(Kb=Gb.ErrorUtils)===null||Kb===void 0?void 0:Kb.applyWithGuard)!==null&&Vb!==void 0?Vb:function(e,t,r,n,i){return e.apply(t,r)},G2e=(function(){function e(r,n,i,o,a){this._hasStoreSnapshot=!1,this._handlerProvider=n||null,this._pendingBackupRebase=!1,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=r,this._appliedOptimisticUpdates=new Set,this._gcHold=null,this._getDataID=i,this._missingFieldHandlers=o,this._log=a}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||p0(!1),this._pendingOptimisticUpdates.add(n)},t.revertUpdate=function(n){this._pendingOptimisticUpdates.has(n)?this._pendingOptimisticUpdates.delete(n):this._appliedOptimisticUpdates.has(n)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(n))},t.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},t.commitPayload=function(n,i,o){this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",operation:n,payload:i,updater:o})},t.commitUpdate=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"updater",updater:n})},t.commitSource=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:n})},t.run=function(n){var i=this._appliedOptimisticUpdates===0&&!!this._gcHold,o=!this._pendingBackupRebase&&this._pendingOptimisticUpdates.size===0&&!i;if(H2e.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&p0(!1),this._isRunning=!0,o)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var a=this._commitData();return(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size)&&(this._hasStoreSnapshot||(this._store.snapshot(),this._hasStoreSnapshot=!0),this._applyUpdates()),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._isRunning=!1,this._store.notify(n,a)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,a=n.operation,s=n.updater,l=o.source,u=o.fieldPayloads,d=new Hb(this._store.getSource(),l),f=new Wb(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(u&&u.length&&u.forEach(function(v){var _=i._handlerProvider&&i._handlerProvider(v.handle);_||p0(!1),_.update(f,v)}),s){var h=a.fragment;h==null&&p0(!1);var p=new TN(d,f,h,this._missingFieldHandlers),m=DN(l,h);s(p,m)}var g=f.getIDsMarkedForInvalidation();return this._store.publish(l,g),f.isStoreMarkedForInvalidation()},t._commitData=function(){var n=this;if(!this._pendingData.size)return!1;var i=!1;return this._pendingData.forEach(function(o){if(o.kind==="payload"){var a=n._publishSourceFromPayload(o);i=i||a}else if(o.kind==="source"){var s=o.source;n._store.publish(s)}else{var l=o.updater,u=NN.create(),d=new Hb(n._store.getSource(),u),f=new Wb(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);Jb(l,null,[f],null,"RelayPublishQueue:commitData"),i=i||f.isStoreMarkedForInvalidation();var h=f.getIDsMarkedForInvalidation();n._store.publish(u,h)}}),this._pendingData.clear(),i},t._applyUpdates=function(){var n=this,i=NN.create(),o=new Hb(this._store.getSource(),i),a=new Wb(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),s=function(u){if(u.storeUpdater){var d=u.storeUpdater;Jb(d,null,[a],null,"RelayPublishQueue:applyUpdates")}else{var f=u.operation,h=u.payload,p=u.updater,m=h.source,g=h.fieldPayloads;if(m&&a.publishSource(m,g),p){var v;m&&(v=DN(m,f.fragment));var _=new TN(o,a,f.fragment,n._missingFieldHandlers);Jb(p,null,[_,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(s),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){s(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function DN(e,t){var r=W2e.read(e,t).data;return r}var J2e=G2e,Q2e=Ke.default,FN=Q2e(Wt),Y2e=Cbe,H5=Xw,IN=H5.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,m0=H5.assertInternalActorIdentifier,Qb=wl,PN=jxe,X2e=Hxe,Z2e=Gxe,eke=v5,tke=oSe,rke=Nxe,nke=ASe,ike=l2,oke=J2e,ON=Ou,W5=(function(){function e(r){var n=this,i,o,a,s,l,u,d,f,h,p,m;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var g=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new ike(new ON,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:ske,this.relayFieldLogger=(a=r.relayFieldLogger)!==null&&a!==void 0?a:tke,this._defaultRenderPolicy=(s=r.UNSTABLE_defaultRenderPolicy)!==null&&s!==void 0?s:"partial",this._operationLoader=g,this._operationExecutions=new Map,this._network=PN(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:eke,this._missingFieldHandlers=(u=r.missingFieldHandlers)!==null&&u!==void 0?u:[],this._publishQueue=new oke(v,(d=r.handlerProvider)!==null&&d!==void 0?d:Y2e,this._getDataID,this._missingFieldHandlers,this.__log),this._scheduler=(f=r.scheduler)!==null&&f!==void 0?f:null,this._store=v,this.options=r.options,this._isServer=(h=r.isServer)!==null&&h!==void 0?h:!1,this._normalizeResponse=(p=r.normalizeResponse)!==null&&p!==void 0?p:rke,this.__setNet=function(_){return n._network=PN(n,_)},this._operationTracker=(m=r.operationTracker)!==null&&m!==void 0?m:new X2e,this._shouldProcessClientComponents=r.shouldProcessClientComponents,Z2e(this)}var t=e.prototype;return t.getStore=function(){return this._store},t.getNetwork=function(){return this._network},t.getOperationTracker=function(){return this._operationTracker},t.getScheduler=function(){return this._scheduler},t.isRequestActive=function(n){var i=this._operationExecutions.get(n);return i==="active"},t.UNSTABLE_getDefaultRenderPolicy=function(){return this._defaultRenderPolicy},t.applyUpdate=function(n){var i=this,o=function(){i._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})};return this._scheduleUpdates(function(){i._publishQueue.applyUpdate(n),i._publishQueue.run()}),{dispose:o}},t.revertUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})},t.replaceUpdate=function(n,i){var o=this;this._scheduleUpdates(function(){o._publishQueue.revertUpdate(n),o._publishQueue.applyUpdate(i),o._publishQueue.run()})},t.applyMutation=function(n){var i=this._execute({createSource:function(){return Qb.create(function(a){})},isClientPayload:!1,operation:n.operation,optimisticConfig:n,updater:null}).subscribe({});return{dispose:function(){return i.unsubscribe()}}},t.check=function(n){return this._missingFieldHandlers.length===0&&!ake(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return Qb.from({data:i})},isClientPayload:!0,operation:n,optimisticConfig:null,updater:null}).subscribe({})},t.commitUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.commitUpdate(n),i._publishQueue.run()})},t.lookup=function(n){return this._store.lookup(n)},t.subscribe=function(n,i){return this._store.subscribe(n,i)},t.retain=function(n){return this._store.retain(n)},t.isServer=function(){return this._isServer},t._checkSelectorAndHandleMissingFields=function(n,i){var o=this,a=ON.create(),s=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:IN,getSourceForActor:function(d){return m0(d),s},getTargetForActor:function(d){return m0(d),a}});return a.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(a),o._publishQueue.run()}),l},t._scheduleUpdates=function(n){var i=this._scheduler;i!=null?i.schedule(n):n()},t.execute=function(n){var i=this,o=n.operation;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return i.check(o)})},isClientPayload:!1,operation:o,optimisticConfig:null,updater:null})},t.executeSubscription=function(n){var i=this,o=n.operation,a=n.updater;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null)},isClientPayload:!1,operation:o,optimisticConfig:null,updater:a})},t.executeMutation=function(n){var i=this,o=n.operation,a=n.optimisticResponse,s=n.optimisticUpdater,l=n.updater,u=n.uploadables,d;return(a||s)&&(d={operation:o,response:a,updater:s}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,FN.default)((0,FN.default)({},o.request.cacheConfig),{},{force:!0}),u)},isClientPayload:!1,operation:o,optimisticConfig:d,updater:l})},t.executeWithSource=function(n){var i=n.operation,o=n.source;return this._execute({createSource:function(){return o},isClientPayload:!1,operation:i,optimisticConfig:null,updater:null})},t.toJSON=function(){var n;return"RelayModernEnvironment(".concat((n=this.configName)!==null&&n!==void 0?n:"",")")},t._execute=function(n){var i=this,o=n.createSource,a=n.isClientPayload,s=n.operation,l=n.optimisticConfig,u=n.updater,d=this._publishQueue,f=this._store;return Qb.create(function(h){var p=nke.execute({actorIdentifier:IN,getDataID:i._getDataID,isClientPayload:a,log:i.__log,operation:s,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(g){return m0(g),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(g){return m0(g),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:u,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function ake(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}W5.prototype["@@RelayModernEnvironment"]=!0;function ske(){}var lke=W5,uke=hv,cke=Zo,dke=cke.getRequest,fke=kl,hke=fke.createOperationDescriptor,pke=ea,mke=pke.createReaderSelector;function gke(e,t){var r=dke(t.subscription);if(r.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var n=t.configs,i=t.onCompleted,o=t.onError,a=t.onNext,s=t.variables,l=t.cacheConfig,u=hke(r,s,l),d=n?uke.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:u,updater:f}).subscribe({next:function(m){if(a!=null){var g=u.fragment,v;if(Array.isArray(m)){var _,x;v=(_=m[0])===null||_===void 0||(x=_.extensions)===null||x===void 0?void 0:x.__relay_subscription_root_id}else{var w;v=(w=m.extensions)===null||w===void 0?void 0:w.__relay_subscription_root_id}typeof v=="string"&&(g=mke(g.node,v,g.variables,g.owner));var E=e.lookup(g).data;a(E)}},error:o,complete:i});return{dispose:h.unsubscribe}}var vke=gke,_ke=Ke.default;_ke(Wt);var G5=dr;G5.getModuleComponentKey;G5.getModuleOperationKey;var bke=Object.prototype.hasOwnProperty;function yke(e){for(var t in e)if(bke.call(e,t))return!1;return!0}var xke=yke,u2=ea,Ske=u2.getDataIDsFromFragment,Eke=u2.getSelector,wke=u2.getVariablesFromFragment,kke=xke,nf=yo,Cke=Fu,MN=Cke.stableCopy,Rke=B8,LN=Rke.intern;function Ake(e,t){var r=Eke(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(u){return u.owner.identifier}).join(",")+"]",i=wke(e,t),o=Ske(e,t);if(nf.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var a=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return a=nf.STRING_INTERN_LEVEL<=1?a:LN(a,nf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||kke(i)?"{}":JSON.stringify(MN(i)))+"/"+a}else{var s,l=(s=JSON.stringify(o))!==null&&s!==void 0?s:"missing";return l=nf.STRING_INTERN_LEVEL<=1?l:LN(l,nf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(MN(i))+"/"+l}}var $ke=Ake,of=Pe;function Tke(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&of(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&of(!1);var o=i.operation.default?i.operation.default:i.operation,a=i.fragmentPathInResult;typeof o=="string"&&of(!1);var s=i.identifierInfo;return s!=null&&(s.identifierField==null||typeof s.identifierField=="string"||of(!1),s.identifierQueryVariableName==null||typeof s.identifierQueryVariableName=="string"||of(!1)),{fragmentRefPathInResponse:a,identifierInfo:s,refetchableRequest:o,refetchMetadata:i}}var J5=Tke,Nke=J5,Yb=Pe;function Dke(e,t){var r,n,i=Nke(e),o=i.refetchableRequest,a=i.refetchMetadata,s=a.connection;s==null&&Yb(!1);var l=s.path,u=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];u==null&&Yb(!1);var d=a.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||Yb(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:s,stream:u.stream===!0}}var Fke=Dke,Q5=Ke.default,g0=Q5(ei),Xu=Q5(Wt),zN=Pe;function Ike(e,t,r,n,i,o){var a,s=o.backward,l=o.forward;if(e==="backward"){var u;s!=null&&s.count!=null&&s.cursor!=null||zN(!1);var d=(0,Xu.default)((0,Xu.default)((0,Xu.default)({},n),i),{},(u={},(0,g0.default)(u,s.cursor,r),(0,g0.default)(u,s.count,t),u));return l&&l.cursor&&(d[l.cursor]=null),l&&l.count&&(d[l.count]=null),d}l!=null&&l.count!=null&&l.cursor!=null||zN(!1);var f=(0,Xu.default)((0,Xu.default)((0,Xu.default)({},n),i),{},(a={},(0,g0.default)(a,l.cursor,r),(0,g0.default)(a,l.count,t),a));return s&&s.cursor&&(f[s.cursor]=null),s&&s.count&&(f[s.count]=null),f}var Pke=Ike,Oke=Ke.default,Mke=Oke(Pr),UN=Pe;function Lke(e,t){var r=e,n=(0,Mke.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(r==null)return null;typeof o=="number"?(Array.isArray(r)||UN(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||UN(!1),r=r[o])}}catch(a){n.e(a)}finally{n.f()}return r}var zke=Lke,Y5=q_e;Y5.isErrorResult;Y5.isValueResult;var Uke=fv,Bke=jw,jke=Vbe,qke=Hbe,Vke=oye,BN=hv,Kke=pye,Hke=wl,Wke=$ye,Gke=Pye,v0=dv,aa=Zo,Jke=Lye,c2=Da;c2.generateClientID;c2.generateUniqueClientID;c2.isClientID;var Qke=o1e,Yke=l1e,Xke=d1e,Zke=qw,X5=mv;X5.isSuspenseSentinel;X5.suspenseSentinel;var eCe=Mxe,jN=El,tCe=lke,qN=kl,Ri=ea,rCe=l2,nCe=Ou,Wi=dr,iCe=Lw,VN=e2,oCe=vke,aCe=O8,sCe=$ke,lCe=Fke,uCe=Pke,cCe=G8,dCe=J5,fCe=M8,hCe=zke,pCe=ip,mCe=pCe.handlePotentialSnapshotErrors,gCe=A8,vCe=J8,_Ce=pv,bCe=u8,yCe=yo,xCe=T8,Z5=Fu;Z5.hasCycle;Z5.stableCopy;var SCe={Environment:tCe,Network:Kke,Observable:Hke,RecordSource:nCe,ReplaySubject:xCe,Store:rCe,areEqualSelectors:Ri.areEqualSelectors,createFragmentSpecResolver:Qke,createNormalizationSelector:Ri.createNormalizationSelector,createOperationDescriptor:qN.createOperationDescriptor,createReaderSelector:Ri.createReaderSelector,createRequestDescriptor:qN.createRequestDescriptor,getArgumentValues:Wi.getArgumentValues,getDataIDsFromFragment:Ri.getDataIDsFromFragment,getDataIDsFromObject:Ri.getDataIDsFromObject,getNode:aa.getNode,getFragment:aa.getFragment,getInlineDataFragment:aa.getInlineDataFragment,getModuleComponentKey:Wi.getModuleComponentKey,getModuleOperationKey:Wi.getModuleOperationKey,getPaginationFragment:aa.getPaginationFragment,getPluralSelector:Ri.getPluralSelector,getRefetchableFragment:aa.getRefetchableFragment,getRequest:aa.getRequest,getRequestIdentifier:fCe,getSelector:Ri.getSelector,getSelectorsFromObject:Ri.getSelectorsFromObject,getSingularSelector:Ri.getSingularSelector,getStorageKey:Wi.getStorageKey,getVariablesFromFragment:Ri.getVariablesFromFragment,getVariablesFromObject:Ri.getVariablesFromObject,getVariablesFromPluralFragment:Ri.getVariablesFromPluralFragment,getVariablesFromSingularFragment:Ri.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:mCe,graphql:aa.graphql,isFragment:aa.isFragment,isInlineDataFragment:aa.isInlineDataFragment,isRequest:aa.isRequest,readInlineData:eCe,readFragment:iCe.readFragment,MutationTypes:BN.MutationTypes,RangeOperations:BN.RangeOperations,ConnectionHandler:Uke,VIEWER_ID:VN.VIEWER_ID,VIEWER_TYPE:VN.VIEWER_TYPE,applyOptimisticMutation:jke,commitLocalUpdate:qke,commitMutation:Vke,fetchQuery:Wke,fetchQuery_DEPRECATED:Gke,isRelayModernEnvironment:Zke,requestSubscription:oCe,ConnectionInterface:Bke,PreloadableQueryRegistry:Jke,RelayFeatureFlags:yCe,DEFAULT_HANDLE_KEY:bCe.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:Wi.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:Wi.FRAGMENT_OWNER_KEY,ID_KEY:Wi.ID_KEY,REF_KEY:Wi.REF_KEY,REFS_KEY:Wi.REFS_KEY,ROOT_ID:Wi.ROOT_ID,ROOT_TYPE:Wi.ROOT_TYPE,TYPENAME_KEY:Wi.TYPENAME_KEY,deepFreeze:aCe,isPromise:gCe,isScalarAndEqual:vCe,recycleNodesInto:_Ce,getFragmentIdentifier:sCe,getRefetchMetadata:dCe,getPaginationMetadata:lCe,getPaginationVariables:uCe,getPendingOperationsForFragment:cCe,getValueAtPath:hCe,__internal:{createRelayContext:Yke,createRelayLoggingContext:Xke,getOperationVariables:jN.getOperationVariables,getLocalVariables:jN.getLocalVariables,fetchQuery:v0.fetchQuery,fetchQueryDeduped:v0.fetchQueryDeduped,getPromiseForActiveRequest:v0.getPromiseForActiveRequest,getObservableForActiveRequest:v0.getObservableForActiveRequest}},vt=SCe,ECe=l2,ez=ECe;const tz=Z7(ez),wCe=tU({__proto__:null,default:tz},[ez]);let KN={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==vt.ROOT_TYPE))return o}};function kCe(e,t,r){return new vt.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function CCe(e,t,r){return new tz(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function RCe(e,t,r){return new wCe(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let ACe={make:kCe,makeLiveStore:CCe,_makeLiveStoreCjs:RCe};function $Ce(e,t,r,n,i,o,a){return new vt.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([KN]):[KN],relayFieldLogger:o,isServer:a})}function rz(e,t,r){let n=[],i=e.getStore().getSource()._records.get(r);return i!==void 0&&Object.entries(i).forEach(o=>{if(o[0].startsWith("__"+t+"_connection")){n.push(o[1].__ref);return}}),n}function TCe(e,t,r,n){let i=n!==void 0?n:[];vt.commitLocalUpdate(e,o=>{rz(e,t,r).forEach(a=>{if(!i.includes(a))return ae(xa(o.get(a)),s=>{s.invalidateRecord()})})})}let NCe={make:$Ce,findAllConnectionIds:rz,invalidateAllOfConnection:TCe};var DCe=St,FCe=vt,ICe=FCe.__internal.createRelayContext,$d=ICe(DCe),nz={exports:{}};(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var o in i)({}).hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(nz);var wv=nz.exports,iz={exports:{}};(function(e){function t(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(iz);var kv=iz.exports,oz={exports:{}},az={exports:{}};(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(az);var PCe=az.exports;(function(e){var t=PCe;function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,t(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(oz);var Cv=oz.exports,HN=Pe;function OCe(e,t){t&&typeof t=="object"||HN(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||HN(!1)}}var MCe=OCe;function sz(e){return e.displayName||e.name||"Component"}function LCe(e){return"Relay("+sz(e)+")"}var Rv={getComponentName:sz,getContainerName:LCe},zCe=St,lz=zCe.createContext({rootIsQueryRenderer:!1}),UCe=Ke.default,BCe=UCe(wv),jCe=MCe,uz=Rv,qCe=uz.getComponentName,VCe=uz.getContainerName,KCe=$d,HCe=lz,WCe=Pe,ux=St,GCe=vt,JCe=GCe.getFragment,WN=ux.useContext;function QCe(e,t,r){var n=VCe(e);jCe(qCe(e),t);var i={};for(var o in t)i[o]=JCe(t[o]);var a=r(e,i);a.displayName=n;function s(u,d){var f,h=WN(KCe);h==null&&WCe(!1);var p=WN(HCe);return ux.createElement(a,(0,BCe.default)({},u,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:u.componentRef||d}))}s.displayName=n;var l=ux.forwardRef(s);return l}var d2=QCe;function YCe(e){return typeof e=="object"&&e!==null&&typeof e.check=="function"&&typeof e.lookup=="function"&&typeof e.retain=="function"&&typeof e.execute=="function"&&typeof e.subscribe=="function"}var XCe=YCe,ZCe=XCe,eRe=Pe;function tRe(e){return rRe(e)||eRe(!1),e}function rRe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&ZCe(e.environment)}var f2={assertRelayContext:tRe},ap=Ke.default,nRe=ap(wv),iRe=ap(Ad),oRe=ap(kv),aRe=ap(Cv),GN=ap(ei),sRe=["componentRef","__relayContext","__rootIsQueryRenderer"],lRe=d2,uRe=Rv,cRe=uRe.getContainerName,dRe=f2,JN=dRe.assertRelayContext,fRe=ys,QN=St,h2=vt,YN=h2.createFragmentSpecResolver,XN=h2.getDataIDsFromObject,hRe=h2.isScalarAndEqual;function pRe(e,t){var r,n=cRe(e);return r=(function(i){(0,aRe.default)(o,i);function o(s){var l,u;u=i.call(this,s)||this,(0,GN.default)((0,oRe.default)(u),"_handleFragmentDataUpdate",function(){var p=u.state.resolver;u.setState(function(m){return p===m.resolver?{data:m.resolver.resolve(),relayProp:_0(m.relayProp.environment)}:null})});var d=JN(s.__relayContext),f=(l=s.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=YN(d,n,t,s,f);return u.state={data:h.resolve(),prevProps:s,prevPropsContext:d,relayProp:_0(d.environment),resolver:h},u}o.getDerivedStateFromProps=function(l,u){var d,f=u.prevProps,h=JN(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,m=XN(t,f),g=XN(t,l),v=u.resolver;if(u.prevPropsContext.environment!==h.environment||!fRe(m,g))return v=YN(h,n,t,l,p),{data:v.resolve(),prevPropsContext:h,prevProps:l,relayProp:_0(h.environment),resolver:v};v.setProps(l);var _=v.resolve();return _!==u.data?{data:_,prevProps:l,prevPropsContext:h,relayProp:_0(h.environment)}:null};var a=o.prototype;return a.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.componentDidUpdate=function(l,u){this.state.resolver!==u.resolver?(u.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.componentWillUnmount=function(){this.state.resolver.dispose()},a.shouldComponentUpdate=function(l,u){if(u.data!==this.state.data)return!0;for(var d=Object.keys(l),f=0;f<d.length;f++){var h=d[f];if(h==="__relayContext"){if(u.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(h)&&!hRe(l[h],this.props[h]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();u!==f&&this.setState({data:f})},a._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();d.setCallback(this.props,this._handleFragmentDataUpdate),u!==f&&this.setState({data:f})},a.render=function(){var l=this.props,u=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,iRe.default)(l,sRe);return QN.createElement(e,(0,nRe.default)({},d,this.state.data,{ref:u,relay:this.state.relayProp}))},o})(QN.Component),(0,GN.default)(r,"displayName",n),r}function _0(e){return{environment:e}}function mRe(e,t){return lRe(e,t,pRe)}var gRe={createContainer:mRe},Av=St,p2=vt;p2.createOperationDescriptor;p2.deepFreeze;p2.getRequest;Av.useLayoutEffect;Av.useState;Av.useRef;Av.useMemo;var vRe=Ke.default,ZN=vRe(Wt),_Re=vt,bRe=_Re.getSelector;function yRe(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,a,s=e[n],l=t[n],u=bRe(s,l),d=u!=null&&u.kind==="PluralReaderSelector"?(i=(o=u.selectors[0])===null||o===void 0?void 0:o.owner.variables)!==null&&i!==void 0?i:{}:(a=u?.owner.variables)!==null&&a!==void 0?a:{};r=(0,ZN.default)((0,ZN.default)({},r),d)}),r}var cz=yRe,xRe=Ke.default,e3=xRe(ei),Xb=Pe,m2=vt,SRe=m2.__internal.fetchQuery,ERe=m2.createOperationDescriptor,wRe=m2.isRelayModernEnvironment,kRe=(function(){function e(r){(0,e3.default)(this,"_selectionReferences",[]),(0,e3.default)(this,"_didFetchFinish",!1),r!=null&&(this._cacheSelectionReference=r.cacheSelectionReference,this._selectionReferences=r.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(n,i,o){return(o==="store-and-network"||o==="store-or-network")&&n.check(i).status==="available"?(this._retainCachedOperation(n,i),n.lookup(i.fragment)):null},t.getFetchResult=function(){if(this._didFetchFinish){if(this._error!=null)return{error:this._error};if(this._snapshot!=null)return{snapshot:this._snapshot}}else return null},t.execute=function(n){var i=this,o=n.environment,a=n.operation,s=n.preservePreviousReferences,l=s===void 0?!1:s,u=o.retain(a),d=function(){i._selectionReferences=i._selectionReferences.concat(u)},f=function(){l||i.disposeSelectionReferences(),i._selectionReferences=i._selectionReferences.concat(u)},h=function(){i._selectionReferences=i._selectionReferences.concat(u)};return wRe(o)?SRe(o,a).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:a}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||Xb(!1),typeof n=="function"&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(n),this._didFetchFinish&&(this._error!=null?n({error:this._error}):this._snapshot!=null&&n({snapshot:this._snapshot})))},t.fetch=function(n,i){var o=this,a=n.environment,s=n.operation,l=n.onDataChange,u=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:a,onDataChangeCallbacks:f||[],operation:s},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?ERe(s.request.node,s.request.variables,i):s,p=this.execute({environment:a,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:u})},error:function(g){o._didFetchFinish=!0,o._error=g,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;u?v&&v.forEach(function(_){_({error:g})}):d=g}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},u=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||Xb(!1),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},n)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(n,i){this._disposeCacheSelectionReference(),this._cacheSelectionReference=n.retain(i)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(n){return n.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(n){var i=this,o=n.notifyFirstResult;this._fetchOptions||Xb(!1);var a=this._fetchOptions,s=a.environment,l=a.onDataChangeCallbacks,u=a.operation;if(!this._snapshot&&(this._snapshot=s.lookup(u.fragment),this._rootSubscription=s.subscribe(this._snapshot,function(f){if(i._fetchOptions!=null){var h=i._fetchOptions.onDataChangeCallbacks;Array.isArray(h)&&h.forEach(function(p){return p({snapshot:f})})}}),this._snapshot&&o&&Array.isArray(l))){var d=this._snapshot;l.forEach(function(f){return f({snapshot:d})})}},e})(),g2=kRe,Td=Ke.default,CRe=Td(wv),Zb=Td(Ad),af=Td(kv),RRe=Td(Cv),Dl=Td(ei),Kn=Td(Wt),ARe=["componentRef"],$Re=["componentRef","__relayContext","__rootIsQueryRenderer"],TRe=["componentRef","__relayContext","__rootIsQueryRenderer"],NRe=d2,ey=cz,dz=Rv,DRe=dz.getComponentName,FRe=dz.getContainerName,IRe=$d,PRe=g2,ORe=f2,ty=ORe.assertRelayContext,ry=ys,da=Pe,ny=St,Ss=vt,t3=Ss.ConnectionInterface,r3=Ss.Observable,b0=Ss.RelayFeatureFlags,y0=Ss.createFragmentSpecResolver,MRe=Ss.createOperationDescriptor,n3=Ss.getDataIDsFromObject,LRe=Ss.getRequest,zRe=Ss.getVariablesFromObject,URe=Ss.isScalarAndEqual,i3="forward";function BRe(e){var t=e.path;return t||da(!1),function(r){for(var n=r[e.fragmentName],i=0;i<t.length;i++){if(!n||typeof n!="object")return null;n=n[t[i]]}return n}}function jRe(e){var t=e.count;return t||da(!1),function(r,n){return(0,Kn.default)((0,Kn.default)({},r),{},(0,Dl.default)({},t,n))}}function qRe(e){var t=null,r=!1;for(var n in e){var i=e[n],o=i.metadata&&i.metadata.connection;i.metadata!==void 0&&(r=!0),o&&(o.length!==1&&da(!1),t&&da(!1),t=(0,Kn.default)((0,Kn.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||da(!1),t||{}}function o3(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function VRe(e,t,r){var n;DRe(e);var i=FRe(e),o=qRe(t),a=r.getConnectionFromProps||BRe(o),s=r.direction||o.direction;s||da(!1);var l=r.getFragmentVariables||jRe(o);return n=(function(u){(0,RRe.default)(d,u);function d(h){var p,m;m=u.call(this,h)||this,(0,Dl.default)((0,af.default)(m),"_handleFragmentDataUpdate",function(){m.setState({data:m._resolver.resolve()})}),(0,Dl.default)((0,af.default)(m),"_hasMore",function(){var _=m._getConnectionData();return!!(_&&_.hasMore&&_.cursor)}),(0,Dl.default)((0,af.default)(m),"_isLoading",function(){return!!m._refetchSubscription}),(0,Dl.default)((0,af.default)(m),"_refetchConnection",function(_,x,w){if(!m._canFetchPage("refetchConnection"))return{dispose:function(){}};m._refetchVariables=w;var E={count:_,cursor:null,totalCount:_},C=m._fetchPage(E,o3(x),{force:!0});return{dispose:C.unsubscribe}}),(0,Dl.default)((0,af.default)(m),"_loadMore",function(_,x,w){if(!m._canFetchPage("loadMore"))return{dispose:function(){}};var E=o3(x),C=m._getConnectionData();if(!C)return r3.create(function(P){return P.complete()}).subscribe(E),null;var k=C.edgeCount+_;if(w&&w.force)return m._refetchConnection(k,x);var A=t3.get();A.END_CURSOR,A.START_CURSOR;var $=C.cursor,N={count:_,cursor:$,totalCount:k},M=m._fetchPage(N,E,w);return{dispose:M.unsubscribe}});var g=ty(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return m._isARequestInFlight=!1,m._refetchSubscription=null,m._refetchVariables=null,b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?m._resolver=y0(g,i,t,h,v):m._resolver=y0(g,i,t,h,v,m._handleFragmentDataUpdate),m.state={data:m._resolver.resolve(),prevContext:g,contextForChildren:g,relayProp:m._buildRelayProp(g),resolverGeneration:0},m._isUnmounted=!1,m._hasFetched=!1,m}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,m){b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(m.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var m=this,g,v=ty(p.__relayContext),_=(g=p.__rootIsQueryRenderer)!==null&&g!==void 0?g:!1,x=n3(t,this.props),w=n3(t,p),E=ey(t,this.props),C=ey(t,p);v.environment!==this.state.prevContext.environment||!ry(E,C)||!ry(x,w)?(this._cleanup(),b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=y0(v,i,t,p,_):this._resolver=y0(v,i,t,p,_,this._handleFragmentDataUpdate),this.setState(function(A){return{prevContext:v,contextForChildren:v,relayProp:m._buildRelayProp(v),resolverGeneration:A.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var k=this._resolver.resolve();k!==this.state.data&&this.setState({data:k})},f.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},f.shouldComponentUpdate=function(p,m){if(m.data!==this.state.data||m.relayProp!==this.state.relayProp||m.resolverGeneration!==this.state.resolverGeneration)return!0;for(var g=Object.keys(p),v=0;v<g.length;v++){var _=g[v];if(_==="__relayContext"){if(m.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(_)&&!URe(p[_],this.props[_]))return!0}return!1},f._buildRelayProp=function(p){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:p.environment}},f._rerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();p!==m&&this.setState({data:m})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==m&&this.setState({data:m})},f._getConnectionData=function(){var p=this.props;p.componentRef;var m=(0,Zb.default)(p,ARe),g=(0,Kn.default)((0,Kn.default)({},m),this.state.data),v=a(g);if(v==null)return null;var _=t3.get(),x=_.EDGES,w=_.PAGE_INFO,E=_.HAS_NEXT_PAGE,C=_.HAS_PREV_PAGE,k=_.END_CURSOR,A=_.START_CURSOR;typeof v!="object"&&da(!1);var $=v[x],N=v[w];if($==null||N==null)return null;Array.isArray($)||da(!1),typeof N!="object"&&da(!1);var M=s===i3?N[E]:N[C],P=s===i3?N[k]:N[A];return typeof M!="boolean"||$.length!==0&&typeof P>"u"?null:{cursor:P,edgeCount:$.length,hasMore:M}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new PRe),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,m,g){var v=this,_=ty(this.props.__relayContext),x=_.environment,w=this.props;w.componentRef,w.__relayContext,w.__rootIsQueryRenderer;var E=(0,Zb.default)(w,$Re),C=(0,Kn.default)((0,Kn.default)({},E),this.state.data),k,A=ey(t,E);k=zRe(t,E),k=(0,Kn.default)((0,Kn.default)((0,Kn.default)({},A),k),this._refetchVariables);var $=r.getVariables(C,{count:p.count,cursor:p.cursor},k);typeof $=="object"&&$!==null||da(!1),$=(0,Kn.default)((0,Kn.default)({},$),this._refetchVariables),k=(0,Kn.default)((0,Kn.default)({},$),k);var N=g?{force:!!g.force}:void 0;N!=null&&g?.metadata!=null&&(N.metadata=g?.metadata);var M=LRe(r.query),P=MRe(M,$,N),I=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var U=function(W,J){var K=v._resolver.resolve();v._resolver.setVariables(l(k,p.totalCount),P.request.node);var G=v._resolver.resolve();ry(K,G)?J():v.setState({data:G,contextForChildren:{environment:v.props.__relayContext.environment}},J)},B=function(){v._refetchSubscription===I&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,I=this._getQueryFetcher().execute({environment:x,operation:P,preservePreviousReferences:!0}).mergeMap(function(q){return r3.create(function(W){U(q,function(){W.next(),W.complete()})})}).do({error:B,complete:B,unsubscribe:B}).subscribe(m||{}),this._refetchSubscription=this._isARequestInFlight?I:null,I},f._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},f.render=function(){var p=this.props,m=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var g=(0,Zb.default)(p,TRe);return ny.createElement(IRe.Provider,{value:this.state.contextForChildren},ny.createElement(e,(0,CRe.default)({},g,this.state.data,{ref:m,relay:this.state.relayProp})))},d})(ny.Component),(0,Dl.default)(n,"displayName",i),n}function KRe(e,t,r){return NRe(e,t,function(n,i){return VRe(n,i,r)})}var HRe={createContainer:KRe},$v=Ke.default,fz=$v(Wt),WRe=$v(kv),GRe=$v(Cv),JRe=$v(ei),QRe=$d,Qm=g2,YRe=lz,XRe=ys,iy=St,v2=vt,ZRe=v2.createOperationDescriptor;v2.deepFreeze;var _2=v2.getRequest,Ji={},eAe={rootIsQueryRenderer:!0};iy.Component;function cx(){return{error:null,props:null,retry:null}}function tAe(){return{error:null,props:{},retry:null}}function Q0(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(o){var a=r.retry(o);a&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:a}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function b2(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function a3(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=_2(r),a=b2(o.params,e.variables);i=Ji[a]?Ji[a].queryFetcher:new Qm(n)}else i=new Qm(n);return(0,fz.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},hz(e,i,t.retryCallbacks))}function hz(e,t,r,n){var i=e.environment,o=e.query,a=e.variables,s=e.cacheConfig,l=i;if(o){var u=_2(o),d=ZRe(u,a,s),f={environment:l};if(typeof n=="string"&&Ji[n]){var h=Ji[n].snapshot;return h?{error:null,relayContext:f,renderProps:Q0(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:cx(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),m=t.fetch({environment:l,onDataChange:null,operation:d}),g=m||p;return n=n||b2(u.params,e.variables),Ji[n]={queryFetcher:t,snapshot:g},g?{error:null,relayContext:f,renderProps:Q0(null,g,t,r),snapshot:g,requestCacheKey:n}:{error:null,relayContext:f,renderProps:cx(),snapshot:null,requestCacheKey:n}}catch(_){return{error:_,relayContext:f,renderProps:Q0(_,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var v={environment:l};return{error:null,relayContext:v,renderProps:tAe(),requestCacheKey:null}}}var Nd=Ke.default,rAe=Nd(wv),nAe=Nd(Ad),Zu=Nd(Wt),s3=Nd(kv),iAe=Nd(Cv),oy=Nd(ei),oAe=["componentRef","__relayContext","__rootIsQueryRenderer"],aAe=d2,ay=cz,sAe=Rv,lAe=sAe.getContainerName,uAe=$d,cAe=g2,dAe=f2,sy=dAe.assertRelayContext,l3=ys,ly=St,zu=vt,fAe=zu.Observable,u3=zu.createFragmentSpecResolver,hAe=zu.createOperationDescriptor,c3=zu.getDataIDsFromObject,pAe=zu.getRequest,mAe=zu.getVariablesFromObject,gAe=zu.isScalarAndEqual;function vAe(e,t,r){var n,i=lAe(e);return n=(function(o){(0,iAe.default)(a,o);function a(l){var u,d;d=o.call(this,l)||this,(0,oy.default)((0,s3.default)(d),"_handleFragmentDataUpdate",function(){var m=d.state.resolver;d.setState(function(g){return m===g.resolver?{data:g.resolver.resolve()}:null})}),(0,oy.default)((0,s3.default)(d),"_refetch",function(m,g,v,_){if(d._isUnmounted)return{dispose:function(){}};var x=sy(d.props.__relayContext),w=x.environment,E=ay(t,d.props),C=typeof m=="function"?m(d._getFragmentVariables()):m;C=(0,Zu.default)((0,Zu.default)({},E),C);var k=g?(0,Zu.default)((0,Zu.default)({},C),g):C,A=_?{force:!!_.force}:void 0;A!=null&&_?.metadata!=null&&(A.metadata=_?.metadata);var $=typeof v=="function"?{next:v,error:v}:v||{},N=pAe(r),M=hAe(N,C,A);d.state.localVariables=C,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var P,I=d._getQueryFetcher().lookupInStore(w,M,_?.fetchPolicy);return I!=null?(d.state.resolver.setVariables(k,M.request.node),d.setState(function(U){return{data:U.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){$.next&&$.next(),$.complete&&$.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:w,operation:M,preservePreviousReferences:!0}).mergeMap(function(U){return d.state.resolver.setVariables(k,M.request.node),fAe.create(function(B){return d.setState(function(q){return{data:q.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){B.next(),B.complete()})})}).finally(function(){d._refetchSubscription===P&&(d._refetchSubscription=null)}).subscribe((0,Zu.default)((0,Zu.default)({},$),{},{start:function(B){d._refetchSubscription=P=B,$.start&&$.start(B)}})),{dispose:function(){P&&P.unsubscribe()}})});var f=sy(l.__relayContext),h=(u=l.__rootIsQueryRenderer)!==null&&u!==void 0?u:!1;d._refetchSubscription=null;var p=u3(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:d3(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var s=a.prototype;return s.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(u,d){this.state.resolver!==d.resolver?(d.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.getDerivedStateFromProps=function(u,d){var f,h=d.prevProps,p=sy(u.__relayContext),m=(f=u.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,g=c3(t,h),v=c3(t,u),_=ay(t,h),x=ay(t,u),w=d.resolver;if(d.prevPropsContext.environment!==p.environment||!l3(_,x)||!l3(g,v))return w=u3(p,i,t,u,m),{data:w.resolve(),localVariables:null,prevProps:u,prevPropsContext:p,contextForChildren:p,relayProp:d3(p.environment,d.relayProp.refetch),resolver:w};d.localVariables||w.setProps(u);var E=w.resolve();return E!==d.data?{data:E,prevProps:u}:null},s.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},s.shouldComponentUpdate=function(u,d){if(d.data!==this.state.data||d.relayProp!==this.state.relayProp)return!0;for(var f=Object.keys(u),h=0;h<f.length;h++){var p=f[h];if(p==="__relayContext"){if(this.state.prevPropsContext.environment!==d.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(p)&&!gAe(u[p],this.props[p]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();d!==h&&this.setState({data:h})},s._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();f.setCallback(this.props,this._handleFragmentDataUpdate),d!==h&&this.setState({data:h})},s._getFragmentVariables=function(){return mAe(t,this.props)},s._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new cAe),this._queryFetcher},s.render=function(){var u=this.props,d=u.componentRef;u.__relayContext,u.__rootIsQueryRenderer;var f=(0,nAe.default)(u,oAe),h=this.state,p=h.relayProp,m=h.contextForChildren;return ly.createElement(uAe.Provider,{value:m},ly.createElement(e,(0,rAe.default)({},f,this.state.data,{ref:d,relay:p})))},a})(ly.Component),(0,oy.default)(n,"displayName",i),n}function d3(e,t){return{environment:e,refetch:t}}function _Ae(e,t,r){return aAe(e,t,function(n,i){return vAe(n,i,r)})}var bAe={createContainer:_Ae},yAe=St;yAe.createContext({wrapPrepareQueryResource:function(t){return t()}});var xAe=$d,SAe=Pe,EAe=St,wAe=EAe.useContext;function kAe(){var e=wAe(xAe);return e==null&&SAe(!1),e.environment}var pz=kAe,mz=St;mz.useContext;mz.useEffect;var CAe=Ke.default,f3=CAe(Wt),RAe=Pe,Uu=vt,h3=Uu.__internal.fetchQueryDeduped,p3=Uu.Observable,m3=Uu.PreloadableQueryRegistry,g3=Uu.ReplaySubject,v3=Uu.createOperationDescriptor,AAe=Uu.getRequest,$Ae=Uu.getRequestIdentifier,_3=100001;function TAe(e,t,r,n,i){var o;_3++;var a=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",s=(0,f3.default)((0,f3.default)({},n?.networkCacheConfig),{},{force:!0}),l,u=!1,d=function(re,oe){return u=!0,e.executeWithSource({operation:re,source:oe})},f=new g3,h=p3.create(function(G){return f.subscribe(G)}),p,m=null,g=!1,v=function(re,oe){g=!0;var _e=new g3,Re="raw-network-request-"+$Ae(re,r),Te=h3(e,Re,function(){var be=e.getNetwork();return be.execute(re,r,s,void 0,void 0,void 0,void 0,oe)}),He=Te.subscribe({error:function(mt){m=mt,_e.error(mt)},next:function(mt){_e.next(mt)},complete:function(){_e.complete()}}),ge=He.unsubscribe;return p=ge,p3.create(function(be){var mt=_e.subscribe(be);return function(){mt.unsubscribe(),p()}})},_,x=function(re,oe){g=!0;var _e=h3(e,re.request.identifier,oe).subscribe({error:function(Te){f.error(Te)},next:function(Te){f.next(Te)},complete:function(){f.complete()}});_=_e.unsubscribe},w=function(re){var oe=v3(re,r,s);if(l=e.retain(oe),a!=="store-only"){var _e=a!=="store-or-network"||e.check(oe).status!=="available";_e&&x(oe,function(){var Re=v(re.params,function(){return e.check(oe)}),Te=d(oe,Re);return Te})}},E,C,k;if(t.kind==="PreloadableConcreteRequest"){var A=t;E=A.params;var $=E;k=$.id,k===null&&RAe(!1);var N=m3.get(k);if(N!=null)w(N);else{var M=a==="store-only"?null:v(E),P=m3.onLoad(k,function(G){C();var re=v3(G,r,s);l=e.retain(re),M!=null&&x(re,function(){return d(re,M)})});C=P.dispose}}else{var I=t,U=AAe(I);E=U.params,k=E.cacheID!=null?E.cacheID:E.id,w(U)}var B=!1,q=!1,W=!1,J=function(){q||(l&&l.dispose(),q=!0)},K=function(){W||(u?_&&_():p&&p(),C&&C(),W=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){B||(J(),K(),B=!0)},releaseQuery:J,cancelNetworkRequest:K,fetchKey:_3,id:k,get isDisposed(){return B||q},get networkError(){return m},name:E.name,networkCacheConfig:s,fetchPolicy:a,source:g?h:void 0,variables:r}}var Tv={loadQuery:TAe},NAe=Tv;NAe.loadQuery;var DAe=St;DAe.useMemo;var FAe=Pe,IAe=(function(){function e(r){this._capacity=r,this._capacity>0||FAe(!1),this._map=new Map}var t=e.prototype;return t.set=function(n,i){if(this._map.delete(n),this._map.set(n,i),this._map.size>this._capacity){var o=this._map.keys().next();o.done||this._map.delete(o.value)}},t.get=function(n){var i=this._map.get(n);return i!=null&&(this._map.delete(n),this._map.set(n,i)),i},t.has=function(n){return this._map.has(n)},t.delete=function(n){this._map.delete(n)},t.size=function(){return this._map.size},t.capacity=function(){return this._capacity-this._map.size},t.clear=function(){this._map.clear()},e})();function PAe(e){return new IAe(e)}var OAe={create:PAe},MAe=Ke.default,uy=MAe(ei),LAe=300*1e3,zAe=(function(){function e(r){var n=this;(0,uy.default)(this,"_retainCount",0),(0,uy.default)(this,"_retainDisposable",null),(0,uy.default)(this,"_releaseTemporaryRetain",null),this._retain=function(i){return n._retainCount++,n._retainCount===1&&(n._retainDisposable=r(i)),{dispose:function(){n._retainCount=Math.max(0,n._retainCount-1),n._retainCount===0&&n._retainDisposable!=null&&(n._retainDisposable.dispose(),n._retainDisposable=null)}}}}var t=e.prototype;return t.temporaryRetain=function(n){var i=this,o;if(n.isServer())return{dispose:function(){}};var a=this._retain(n),s=null,l=function(){clearTimeout(s),s=null,i._releaseTemporaryRetain=null,a.dispose()};return s=setTimeout(l,LAe),(o=this._releaseTemporaryRetain)===null||o===void 0||o.call(this),this._releaseTemporaryRetain=l,{dispose:function(){var d;(d=i._releaseTemporaryRetain)===null||d===void 0||d.call(i)}}},t.permanentRetain=function(n){var i=this._retain(n);return this.releaseTemporaryRetain(),i},t.releaseTemporaryRetain=function(){var n;(n=this._releaseTemporaryRetain)===null||n===void 0||n.call(this),this._releaseTemporaryRetain=null},t.getRetainCount=function(){return this._retainCount},e})(),UAe=zAe,gz=Ke.default,x0=gz(Wt),vz=gz(ei),BAe=OAe,jAe=UAe,qAe=Pe,VAe=vt,KAe=VAe.isPromise,HAe=1e3,_z="store-or-network",bz="store-and-network",WAe=typeof WeakMap=="function";function Ym(e){return e.request.node.params.metadata.live!==void 0}function dx(e,t,r,n,i){var o=r??(Ym(t)?bz:_z),a=n??e.UNSTABLE_getDefaultRenderPolicy(),s="".concat(o,"-").concat(a,"-").concat(t.request.identifier);return i!=null?"".concat(s,"-").concat(i):s}function b3(e,t){var r={__id:e.fragment.dataID,__fragments:(0,vz.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var GAe=2e5;function cy(e,t,r,n,i,o){var a=Ym(t),s=n,l=i,u=new jAe(function(f){var h=f.retain(t);return{dispose:function(){a&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:GAe++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return s},setValue:function(h){s=h},setNetworkSubscription:function(h){a&&l!=null&&l.unsubscribe(),l=h},temporaryRetain:function(h){return u.temporaryRetain(h)},permanentRetain:function(h){return u.permanentRetain(h)},releaseTemporaryRetain:function(){u.releaseTemporaryRetain()}};return d}var JAe=(function(){function e(r){var n=this;(0,vz.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=BAe.create(HAe)}var t=e.prototype;return t.prepare=function(n,i,o,a,s,l,u){var d=dx(this._environment,n,o,a,l);return this.prepareWithIdentifier(d,n,i,o,a,s,u)},t.prepareWithIdentifier=function(n,i,o,a,s,l,u){var d=this._environment,f=a??(Ym(i)?bz:_z),h=s??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),m=null,g=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,u,(0,x0.default)((0,x0.default)({},l),{},{unsubscribe:function(x){m?.dispose();var w=l?.unsubscribe;w&&w(x)}}))),m=p.temporaryRetain(d);var v=p.getValue();if(KAe(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:g,operation:i,queryAvailability:p.operationAvailability,renderPolicy:h}),v;if(v instanceof Error)throw v;return v},t.retain=function(n,i){var o=this._environment,a=n.cacheIdentifier,s=n.operation,l=this._getOrCreateCacheEntry(a,s,null,n,null),u=l.permanentRetain(o);return o.__log({name:"queryresource.retain",profilerContext:i,resourceID:l.id}),{dispose:function(){u.dispose()}}},t.releaseTemporaryRetain=function(n){var i=this._cache.get(n.cacheIdentifier);i?.releaseTemporaryRetain()},t.TESTS_ONLY__getCacheEntry=function(n,i,o,a){var s=this._environment,l=dx(s,n,i,o,a);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,a,s){var l=this._cache.get(n);return l==null&&(l=cy(n,i,o,a,s,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,a,s,l,u){var d=this,f=this._environment,h=f.check(i),p=h.status,m=p==="available",g=m||s==="partial"&&p!=="stale",v,_,x=function(){};switch(a){case"store-only":{v=!1,_=!0;break}case"store-or-network":{v=!m,_=g;break}case"store-and-network":{v=!0,_=g;break}case"network-only":default:{v=!0,_=!1;break}}if(_){var w=b3(i,n),E=cy(n,i,h,w,null,this._clearCacheEntry);this._cache.set(n,E)}if(v){var C=b3(i,n),k;o.subscribe({start:function(I){k=I;var U=d._cache.get(n);U&&U.setNetworkSubscription(k);var B=u?.start;if(B){var q=(0,x0.default)((0,x0.default)({},I),{},{unsubscribe:function(){Ym(i)&&I.unsubscribe()}});B(q)}},next:function(){var I=d._getOrCreateCacheEntry(n,i,h,C,k);I.processedPayloadsCount+=1,I.setValue(C),x();var U=u?.next;if(U!=null){var B=f.lookup(i.fragment);U(B)}},error:function(I){var U=d._getOrCreateCacheEntry(n,i,h,I,k);U.processedPayloadsCount===0&&U.setValue(I),x(),k=null,U.setNetworkSubscription(null);var B=u?.error;B&&B(I)},complete:function(){x(),k=null;var I=d._cache.get(n);I&&I.setNetworkSubscription(null);var U=u?.complete;U&&U()},unsubscribe:u?.unsubscribe});var A=this._cache.get(n);if(!A){var $=new Promise(function(P){x=P});$.displayName="Relay("+i.fragment.node.name+")",A=cy(n,i,h,$,k,this._clearCacheEntry),this._cache.set(n,A)}}else{var N=u?.complete;N&&N()}var M=this._cache.get(n);return M==null&&qAe(!1),f.__log({name:"queryresource.fetch",resourceID:M.id,operation:i,profilerContext:l,fetchPolicy:a,renderPolicy:s,queryAvailability:h,shouldFetch:v}),M},e})();function QAe(e){return new JAe(e)}var y3=WAe?new WeakMap:new Map;function YAe(e){var t=y3.get(e);if(t)return t;var r=QAe(e);return y3.set(e,r),r}var sp={getQueryResourceForEnvironment:YAe,getQueryCacheIdentifier:dx},XAe=St;XAe.useMemo;var yz=St;yz.useCallback;yz.useEffect;var ZAe=St,e$e=vt,t$e=e$e.__internal.createRelayLoggingContext,r$e=t$e(ZAe),n$e=r$e,i$e=St,o$e=i$e.useContext;function a$e(){return o$e(n$e)}var xz=a$e,y2=Ke.default,x3=y2(Wt),ml=y2(Pr),s$e=y2(Sl),l$e=sp,Sz=l$e.getQueryResourceForEnvironment,u$e=pz,c$e=xz,Fl=Pe,lp=St;lp.useDebugValue;var dy=lp.useEffect,fy=lp.useMemo,S3=lp.useRef,S0=lp.useState,Es=vt,Ez=Es.__internal,d$e=Ez.fetchQuery,f$e=Ez.getPromiseForActiveRequest,E0=Es.RelayFeatureFlags,E3=Es.areEqualSelectors,h$e=Es.createOperationDescriptor,p$e=Es.getPendingOperationsForFragment,m$e=Es.getSelector,g$e=Es.getVariablesFromFragment,w3=Es.handlePotentialSnapshotErrors,k3=Es.recycleNodesInto;function v$e(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function _$e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,ml.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,ml.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function b$e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,ml.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,ml.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function y$e(e,t,r){if(t.kind==="singular")w3(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,ml.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;w3(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function Xm(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=k3(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=k3(u.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==u.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&Fl(!1),[a,{kind:"plural",snapshots:s,epoch:r}]}}function x$e(e,t,r,n,i){var o=g$e(t,r),a=(0,x3.default)((0,x3.default)({},o),{},{id:n.clientEdgeDestinationID}),s=h$e(n.request,a,i?.networkCacheConfig),l=Sz(e),u=l.prepare(s,d$e(e,s),i?.fetchPolicy);return[u,f$e(e,s.request)]}function S$e(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(a){r(function(s){if(s.kind!=="singular"||s.snapshot.selector!==a.selector){var l=Xm(e,s);if(l!=null){var u=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),n.current=u,u?d:s}else return s}return n.current=!0,{kind:"singular",snapshot:a,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(a,s){return e.subscribe(a,function(l){r(function(u){var d;if(u.kind!=="plural"||((d=u.snapshots[s])===null||d===void 0?void 0:d.selector)!==l.selector){var f=Xm(e,u);if(f!=null){var h=f[0],p=f[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),n.current=n.current||h,h?p:u}else return u}var m=(0,s$e.default)(u.snapshots);return m[s]=l,n.current=!0,{kind:"plural",snapshots:m,epoch:e.getStore().getEpoch()}})})});return function(){var a=(0,ml.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;l.dispose()}}catch(u){a.e(u)}finally{a.f()}}}}function C3(e,t){return t==null?{kind:"bailout"}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch()}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch()}}function E$e(e,t,r,n){var i,o,a=fy(function(){return m$e(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||Fl(!1):Array.isArray(t)&&Fl(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||Fl(!1);var l=u$e(),u;E0.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=c$e());var d=S0(function(){return C3(l,a)}),f=d[0],h=d[1],p=f,m=S0(p),g=m[0],v=m[1],_=g,x=S0(a),w=x[0],E=x[1],C=S0(l),k=C[0],A=C[1];if(!E3(a,w)||l!==k){E(a),A(l);var $=C3(l,a);h($),v($),p=$,_=$}var N=S3(!1);if(dy(function(){N.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||E0.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var M=fy(function(){var _e=_$e(p),Re,Te=[];if(_e!=null&&_e.length){Re=[];var He=(0,ml.default)(_e),ge;try{for(He.s();!(ge=He.n()).done;){var be=ge.value,mt=x$e(l,e,t,be,n),fr=mt[0],Mt=mt[1];Re.push(fr),Mt!=null&&Te.push(Mt)}}catch(Ei){He.e(Ei)}finally{He.f()}}return[Re,Te]},[p,l,e,t,n]),P=M[0],I=M[1];if(I.length)throw Promise.all(I);dy(function(){var _e=Sz(l);if(P!=null&&P.length){var Re=[],Te=(0,ml.default)(P),He;try{for(Te.s();!(He=Te.n()).done;){var ge=He.value;Re.push(_e.retain(ge))}}catch(be){Te.e(be)}finally{Te.f()}return function(){for(var be=0,mt=Re;be<mt.length;be++){var fr=mt[be];fr.dispose()}}}},[l,P])}if(v$e(p)){var U=b$e(p);if(U!=null&&U.length>0)throw Promise.all(U.map(function(_e){return l.getStore().getLiveResolverPromise(_e)}));if(E0.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==k||!N.current||!E3(N.current,a)){a==null&&Fl(!1);var B=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,q=p$e(l,e,B);if(q)throw q.promise}}y$e(l,p,u);var W=S3(!1);if(dy(function(){var _e=_,Re=Xm(l,_);if(Re!==null){var Te=Re[0],He=Re[1];Te&&h(He),_e=He}return S$e(l,_e,h,W)},[l,_]),W.current){var J=Xm(l,p);if(J!=null){var K=J[0],G=J[1];K&&(h(G),p=G)}W.current=!1}var re;if(s){var oe=t==null;re=fy(function(){return p.kind==="bailout"?oe?null:[]:(p.kind!=="plural"&&Fl(!1),p.snapshots.map(function(_e){return _e.data}))},[p,oe])}else p.kind==="bailout"?re=null:(p.kind!=="singular"&&Fl(!1),re=p.snapshot.data);return E0.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(re===void 0||Array.isArray(re)&&re.length>0&&re.every(function(_e){return _e===void 0})),re}var w$e=E$e,x2=Ke.default,R3=x2(Wt),gl=x2(Pr),k$e=x2(Sl),C$e=sp,wz=C$e.getQueryResourceForEnvironment,R$e=pz,A$e=xz,Il=Pe,up=St;up.useDebugValue;var w0=up.useEffect,hy=up.useMemo,A3=up.useRef,$$e=up.useState,ws=vt,kz=ws.__internal,T$e=kz.fetchQuery,N$e=kz.getPromiseForActiveRequest,k0=ws.RelayFeatureFlags,$3=ws.areEqualSelectors,D$e=ws.createOperationDescriptor,F$e=ws.getPendingOperationsForFragment,I$e=ws.getSelector,P$e=ws.getVariablesFromFragment,T3=ws.handlePotentialSnapshotErrors,N3=ws.recycleNodesInto;function O$e(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function M$e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,gl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,gl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function L$e(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,gl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,gl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function z$e(e,t,r){if(t.kind==="singular")T3(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,gl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;T3(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function fx(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=N3(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r,selector:t.selector,environment:t.environment}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=N3(u.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==u.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&Il(!1),[a,{kind:"plural",snapshots:s,epoch:r,selector:t.selector,environment:t.environment}]}}function U$e(e,t,r,n,i){var o=P$e(t,r),a=(0,R3.default)((0,R3.default)({},o),{},{id:n.clientEdgeDestinationID}),s=D$e(n.request,a,i?.networkCacheConfig),l=wz(e),u=l.prepare(s,T$e(e,s),i?.fetchPolicy),d=N$e(e,s.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[u,d]}function D3(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(a){var s=null;if(a.kind!=="singular"||a.snapshot.selector!==o.selector||a.environment!==e){var l=fx(a.environment,a);if(l!=null){var u=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),s=u?d:a}else s=a}else s={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return s})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,a){return e.subscribe(o,function(s){r(function(l){var u,d=null;if(l.kind!=="plural"||((u=l.snapshots[a])===null||u===void 0?void 0:u.selector)!==s.selector||l.environment!==e){var f=fx(l.environment,l);if(f!=null){var h=f[0],p=f[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),d=h?p:l}else d=l}else{var m=(0,k$e.default)(l.snapshots);m[a]=s,d={kind:"plural",snapshots:m,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,gl.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;s.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function F3(e,t){return t==null?{kind:"bailout",environment:e}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch(),selector:t,environment:e}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch(),selector:t,environment:e}}function B$e(e,t,r,n){var i,o,a=hy(function(){return I$e(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||Il(!1):Array.isArray(t)&&Il(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||Il(!1);var l=R$e(),u;k0.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=A$e());var d=$$e(function(){return F3(l,a)}),f=d[0],h=d[1],p=f,m=p.environment;if(!$3(a,p.selector)||l!==p.environment){var g=F3(l,a);h(g),p=g}var v=A3(!1);if(w0(function(){v.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||k0.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var _=hy(function(){var I=M$e(p),U,B=[];if(I!=null&&I.length){U=[];var q=(0,gl.default)(I),W;try{for(q.s();!(W=q.n()).done;){var J=W.value,K=U$e(l,e,t,J,n),G=K[0],re=K[1];U.push(G),re!=null&&B.push(re)}}catch(oe){q.e(oe)}finally{q.f()}}return[U,B]},[p,l,e,t,n]),x=_[0],w=_[1];if(w.length){var E=Promise.all(w);throw E.displayName="RelayClientEdge(".concat(w.map(function(I){return I.displayName}).join(","),")"),E}w0(function(){var I=wz(l);if(x!=null&&x.length){var U=[],B=(0,gl.default)(x),q;try{for(B.s();!(q=B.n()).done;){var W=q.value;U.push(I.retain(W))}}catch(J){B.e(J)}finally{B.f()}return function(){for(var J=0,K=U;J<K.length;J++){var G=K[J];G.dispose()}}}},[l,x])}if(O$e(p)){var C=L$e(p);if(C!=null&&C.length>0){var k=Promise.all(C.map(function(I){return l.getStore().getLiveResolverPromise(I)}));throw k.displayName="RelayLiveResolver("+e.name+")",k}if(k0.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==m||!v.current||!$3(v.current,a)){a==null&&Il(!1);var A=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,$=F$e(l,e,A);if($)throw $.promise}}z$e(l,p,u);var N=A3(null);w0(function(){var I=N.current;if(I!=null){if(p.environment===I.environment&&p.selector===I.selector)return;I.dispose()}if(p.kind!=="bailout"){var U=p,B=fx(p.environment,p);if(B!==null){var q=B[0],W=B[1];if(q){h(W);return}U=W}var J=D3(p.environment,U,h);N.current={dispose:J,selector:p.selector,environment:p.environment}}},[p]),w0(function(){if(N.current==null&&p.kind!=="bailout"){var I=D3(p.environment,p,h);N.current={dispose:I,selector:p.selector,environment:p.environment}}return function(){var U;(U=N.current)===null||U===void 0||U.dispose(),N.current=null}},[]);var M;if(s){var P=t==null;M=hy(function(){return p.kind==="bailout"?P?null:[]:(p.kind!=="plural"&&Il(!1),p.snapshots.map(function(I){return I.data}))},[p,P])}else p.kind==="bailout"?M=null:(p.kind!=="singular"&&Il(!1),M=p.snapshot.data);return k0.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(M===void 0||Array.isArray(M)&&M.length>0&&M.every(function(I){return I===void 0})),M}var j$e=B$e,Cz=Ke.default;Cz(w$e);Cz(j$e);var Rz=sp;Rz.getQueryCacheIdentifier;Rz.getQueryResourceForEnvironment;var Nv=St;Nv.useContext;Nv.useEffect;Nv.useState;Nv.useRef;var q$e=St;q$e.useState;var V$e=St,Az=vt;Az.createOperationDescriptor;Az.getRequest;V$e.useMemo;var K$e=vt;K$e.__internal.fetchQuery;var H$e=Ke.default;H$e(Wt);var $z=St;$z.useEffect;$z.useRef;var W$e=Ke.default;W$e(Pr);var Dv=St;Dv.useCallback;Dv.useEffect;Dv.useRef;Dv.useState;var G$e=St;G$e.useDebugValue;var J$e=vt;J$e.getFragment;var Q$e=Ke.default;Q$e(Wt);var Fv=St,Y$e=vt;Y$e.commitMutation;Fv.useState;Fv.useEffect;Fv.useRef;Fv.useCallback;var Tz=vt;Tz.ConnectionInterface;Tz.getValueAtPath;var S2=St,Nz=vt;Nz.__internal.getObservableForActiveRequest;Nz.getSelector;S2.useEffect;S2.useState;S2.useMemo;var X$e=Ke.default;X$e(Wt);var E2=St;E2.useCallback;E2.useRef;E2.useState;var cp=vt;cp.__internal.fetchQuery;cp.createOperationDescriptor;cp.getPaginationVariables;cp.getRefetchMetadata;cp.getSelector;var Z$e=Ke.default;Z$e(Wt);var w2=St;w2.useCallback;w2.useEffect;w2.useState;var Dd=vt;Dd.__internal.fetchQuery;Dd.RelayFeatureFlags;Dd.createOperationDescriptor;Dd.getPaginationVariables;Dd.getRefetchMetadata;Dd.getSelector;var Dz=Ke.default;Dz(Wt);Dz(Pr);var eTe=sp;eTe.getQueryResourceForEnvironment;var Bu=vt;Bu.__internal.fetchQuery;Bu.RelayFeatureFlags;Bu.createOperationDescriptor;Bu.getPendingOperationsForFragment;Bu.getSelector;Bu.getVariablesFromFragment;Bu.handlePotentialSnapshotErrors;var tTe=Ke.default;tTe(Pr);var rTe=Tv;rTe.loadQuery;var dp=St;dp.useCallback;dp.useEffect;dp.useInsertionEffect;dp.useRef;dp.useState;var nTe=vt;nTe.getRequest;var iTe=Ke.default;iTe(Pr);var oTe=Tv;oTe.loadQuery;var Iv=St;Iv.useCallback;Iv.useEffect;Iv.useRef;Iv.useState;var Fz=vt;Fz.RelayFeatureFlags;Fz.getRequest;var aTe=Ke.default;aTe(Wt);var sTe=sp;sTe.getQueryResourceForEnvironment;var k2=St;k2.useCallback;k2.useContext;k2.useReducer;var Fd=vt;Fd.__internal.fetchQuery;Fd.createOperationDescriptor;Fd.getFragmentIdentifier;Fd.getRefetchMetadata;Fd.getSelector;Fd.getValueAtPath;var lTe=Ke.default;lTe(Wt);var C2=St;C2.useCallback;C2.useDebugValue;C2.useState;var Pv=vt;Pv.RelayFeatureFlags;Pv.getFragment;Pv.getFragmentIdentifier;Pv.getPaginationMetadata;var uTe=Ke.default;uTe(Wt);var ju=St;ju.useCallback;ju.useDebugValue;ju.useEffect;ju.useLayoutEffect;ju.useMemo;ju.useRef;ju.useState;var R2=vt;R2.getFragment;R2.getFragmentIdentifier;R2.getPaginationMetadata;var Ov=vt;Ov.ConnectionInterface;Ov.RelayFeatureFlags;Ov.getSelector;Ov.getValueAtPath;var cTe=St;cTe.useDebugValue;var dTe=vt,Iz=dTe.__internal;Iz.fetchQueryDeduped;Iz.fetchQuery;var fTe=St;fTe.useDebugValue;var hTe=vt;hTe.getFragment;var Pz=St;Pz.useEffect;Pz.useRef;var pTe=St;pTe.useEffect;var mTe=vt;mTe.requestSubscription;var gTe=$d,vTe=gRe,_Te=HRe,bTe=bAe,yTe=Tv;yTe.loadQuery;var Co=vt,xTe={ConnectionHandler:Co.ConnectionHandler,MutationTypes:Co.MutationTypes,RangeOperations:Co.RangeOperations,ReactRelayContext:gTe,applyOptimisticMutation:Co.applyOptimisticMutation,commitLocalUpdate:Co.commitLocalUpdate,commitMutation:Co.commitMutation,createFragmentContainer:vTe.createContainer,createPaginationContainer:_Te.createContainer,createRefetchContainer:bTe.createContainer,fetchQuery_DEPRECATED:Co.fetchQuery_DEPRECATED,graphql:Co.graphql,readInlineData:Co.readInlineData,requestSubscription:Co.requestSubscription,fetchQuery:Co.fetchQuery},STe=xTe;function ETe(e){let t=STe.ReactRelayContext.Provider;return br(t,{value:{environment:e.environment},children:e.children})}let wTe={make:ETe},kTe={Provider:wTe};function CTe(e,t,r){let n=async(i,o,a,s)=>{let l=D(xa(i.text),""),u=l.includes("Platform")||l.includes("platform")?e.platformApiEndpoint:e.apiEndpoint,d=Object.fromEntries([["content-type","application/json"]]),f=t();f!==void 0&&(d.Authorization="Bearer "+f);let p=(await fetch(u,{method:"POST",headers:d,body:D(JSON.stringify({query:l,variables:o}),"")})).json,m=await p();return jm(m)&&r(),m};return NCe.make(vt.Network.create(n),ACe.make(new vt.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function RTe(e){let t=e.config,r=Na(),n=Bt(()=>CTe(t,()=>R(r,i=>i.getToken()),()=>ae(r,i=>i.logout())),[t,r]);return b(kTe.Provider.make,{environment:n,children:e.children})}let ATe=RTe;function $Te(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function TTe(e,t){return e+"_"+t+"EventHistory"}function NTe(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
|
|
69
|
+
`+e+`(
|
|
70
|
+
filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
|
|
71
|
+
first: $first
|
|
72
|
+
after: $after
|
|
73
|
+
) {
|
|
74
|
+
edges {
|
|
75
|
+
node {
|
|
76
|
+
position
|
|
77
|
+
eventType
|
|
78
|
+
payload
|
|
79
|
+
tags { key value }
|
|
80
|
+
meta { user time correlationId causationId }
|
|
81
|
+
recordedAt
|
|
82
|
+
}
|
|
83
|
+
cursor
|
|
84
|
+
}
|
|
85
|
+
pageInfo { hasNextPage endCursor }
|
|
86
|
+
}
|
|
87
|
+
}`}function DTe(e){return de(R(Y(e),t=>O(t,"x-reventless-audit")),!1,t=>{let r=it(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let I3={contents:[]};function P3(e){if(!I3.contents.includes(e)){I3.contents.push(e),console.error('[AutoUI] View "'+e+'" opted into an audit trail but no event log could be resolved for it — the view declares no linked write side, so there is no `…EventHistory` field to query. Remove the audit hint, or check that the read model projects an aggregate or slice.');return}}function FTe(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=$Te(e.queryField);if(r!==void 0){if(n!==void 0){let i=TTe(n,r);return{queryField:i,queryDocument:NTe(i),displayName:r}}P3(e.name);return}P3(e.name)}function Ds(e,t){return R(O(e,t),ue)}function ITe(e){let t=D(Y(e),{}),r=D(R(O(t,"meta"),Y),{}),n=ie(D(R(O(t,"tags"),_r),[]),s=>{let l=D(Y(s),{}),u=Ds(l,"key"),d=Ds(l,"value");if(u!==void 0&&d!==void 0)return[u,d]}),i=Ds(t,"position"),o=Ds(t,"eventType");if(i===void 0||o===void 0)return;let a=D(Ds(r,"time"),D(Ds(t,"recordedAt"),""));return{position:i,eventType:o,payload:D(O(t,"payload"),{}),tags:n,actor:Ds(r,"user"),time:a,recordedAt:D(Ds(t,"recordedAt"),a)}}function PTe(e,t){return ie(fE(e,t),ITe)}function OTe(e,t){let r=m4(e,t);return[r.hasNextPage,r.endCursor]}function MTe(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return yt(r).toLowerCase()}function LTe(e){return D(Q(Y(e),Qe),[]).filter(t=>t[0]!=="TAG")}function zTe(e){let t={};return e.map(r=>{let n=JSON.stringify(ut(Qe(t)),null,2);LTe(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(ut(Qe(t)),null,2);return[n,i]})}let UTe="System";function BTe(e,t){let r=zTe(e);return e.map((n,i)=>{let o=D(r[i],["",""]),a=de(n.tags[0],t,s=>t+" "+s[1]);return{id:n.position,verb:MTe(n.eventType,t),subject:a,actor:D(n.actor,UTe),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function jTe(e){let t=[];return e.forEach(r=>ae(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(jf)}function qTe(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(jf)}function Ni(e){return"var("+e+")"}let VTe=S([z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",Ni(F.lg)),c("padding",Ni(F.xxl)),Ho({NAME:"percent",VAL:100}),nI({NAME:"percent",VAL:100}),hs("center"),c("min-height","400px")]),KTe=S([c("font-size","48px"),c("line-height","1")]),HTe=S([c("color",Ni(y.textPrimary)),c("font-size",Ni(T.sizeXxl)),c("font-weight",Ni(T.weightBold)),Sn(Ce(0))]),WTe=S([c("color",Ni(y.textSecondary)),c("font-size",Ni(T.sizeLg)),c("line-height",Ni(T.lineHeightRelaxed)),c("max-width","480px"),Sn(Ce(0))]),GTe=S([c("background",Ni(y.brand)),c("color",Ni(y.textOnBrand)),c("border-radius",Ni(X.md)),c("padding","var("+F.sm+") var("+F.lg+")"),c("font-size",Ni(T.sizeMd)),c("font-weight",Ni(T.weightMedium)),c("border","none"),c("cursor","pointer"),Ca(Ce(8))]);function JTe(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:KTe}),b("h2",{children:t.title,className:HTe}),b("p",{children:de(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:WTe}),b("button",{children:"Upgrade to unlock",className:GTe})],className:VTe})}let QTe=JTe;function YTe(e){let t=e.children,r=e.definition,n=xl(),i=r.requiredAccess;return i!==void 0&&!n(i)?b(QTe,{definition:r}):t}let C0=YTe,XTe=O;function O3(e,t){let r=R(t[0],n=>O(e,n));if(r!==void 0&&t.every(n=>ze(O(e,n),r)))return r}function Zm(e,t,r){let n=O(e,t);return n!==void 0?r(n):!0}function A2(e,t,r){return ie(t,n=>{let i=O(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}function Oz(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let $2=["body","text","message","comment","content"],ZTe=["author","createdby","user","commenter","postedby"],eNe=["createdat","postedat","at","commentedat"];function Mz(e){return ie($r(e),t=>{if(Lh(t[1]))return t[0]})}function T2(e,t){return Mz(e).find(r=>t.includes(r.toLowerCase()))}function tNe(e){let t=Nn(e,void 0,void 0),r=$r(e).map(n=>n[0]).find(n=>de(O(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:T2(e,ZTe)}function rNe(e){return ie($r(e),t=>{if(Cg(t[1]))return t[0]}).find(t=>eNe.includes(t.toLowerCase()))}function Lz(e){return Mz(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function nNe(e,t){let r=Oz(t).toLowerCase();return Lz(e).find(n=>n.toLowerCase()===r+"id")}function iNe(e){let t=Lz(e);if(t.length===1)return t[0]}function oNe(e){return de(R(Y(e),t=>O(t,"x-reventless-comments")),!1,t=>{let r=it(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function M3(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=Oz(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let aNe=["addcomment","postcomment","comment","writecomment","leavecomment"];function sNe(e,t){let r=ie(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>aNe.some(i=>n.name.toLowerCase().startsWith(i)))}let L3={contents:[]};function lNe(e){if(!L3.contents.includes(e)){L3.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as comments but has no body field — no comment thread is wired. The convention expects a string field named '+$2.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function uNe(e,t){return ie(e.readModels.filter(r=>r.name!==t?oNe(r.schema)?!0:M3(r.name,t):!1),r=>{let n=nNe(r.schema,t),i=n!==void 0?n:M3(r.name,t)?iNe(r.schema):void 0,o=T2(r.schema,$2);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:tNe(r.schema),timestampField:rNe(r.schema),postCommand:sNe(r,e)}:void 0;lNe(r.name)})[0]}function ec(e,t){return R(O(e,t),ue)}function cNe(e,t,r){let n=ie(t,o=>{let a=D(Y(o),{});if(ze(ec(a,e.entityField),r))return a}),i=o=>R(R(e.timestampField,a=>ec(o,a)),Dn);return n.toSorted((o,a)=>{let s=i(o),l=i(a);return s!==void 0?l!==void 0?s-l:-1:l!==void 0?1:0}).map((o,a)=>({id:D(ec(o,"id"),"#"+a.toString()),body:D(ec(o,e.bodyField),""),author:R(e.authorField,s=>ec(o,s)),timestamp:R(e.timestampField,s=>ec(o,s))}))}function dNe(e,t,r){let n=e.postCommand,i=D(R(n,a=>a.aggregateIdField),e.entityField),o=D(R(n,a=>T2(a.schema,$2)),e.bodyField);return ut([[i,t],[o,r]])}function ya(e){return"var("+e+")"}let fNe=S([qt("fixed"),ps(Ce(0)),od(Ce(0)),bl(Ce(0)),Jx(Ce(0)),c("background","rgba(0,0,0,0.5)"),z("flex"),Z("center"),Ze("center"),c("z-index","1000"),c("backdrop-filter","blur(2px)")]),hNe=S([c("background",ya(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",ya(X.lg)),c("box-shadow",ya(_n.lg)),z("flex"),pe("column"),c("max-height","90vh"),c("max-width","90vw"),c("min-width","400px"),c("overflow","hidden")]),pNe=S([z("flex"),Z("center"),Ze("spaceBetween"),c("padding","var("+F.md+") var("+F.lg+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),vi(0)]),mNe=S([c("color",ya(y.textPrimary)),c("font-size",ya(T.sizeLg)),c("font-weight",ya(T.weightMedium)),Sn(Ce(0))]),gNe=S([c("background","none"),c("border","none"),c("cursor","pointer"),c("color",ya(y.textSecondary)),c("font-size","18px"),c("padding","0"),c("line-height","1"),Je([c("color",ya(y.textPrimary))])]),vNe=S([c("padding",ya(F.lg)),c("overflow-y","auto"),_o(1)]),_Ne=S([z("flex"),Z("center"),Ze("flexEnd"),c("gap",ya(F.sm)),c("padding","var("+F.md+") var("+F.lg+")"),c("border-top","1px solid var("+y.borderSubtle+")"),vi(0)]);function bNe(e){let t=e.onClose,r=e.isOpen;return Ae(()=>{if(!r)return;let n=i=>{if(i.key==="Escape")return t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[r]),r?b("div",{children:L("div",{children:[L("div",{children:[b("h2",{children:e.title,className:mNe}),b("button",{children:"x",className:gNe,onClick:n=>t()})],className:pNe}),b("div",{children:e.children,className:vNe}),de(e.footer,null,n=>b("div",{children:n,className:_Ne}))],className:hNe,style:de(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:fNe,onClick:n=>t()}):null}let N2=bNe;function Li(e){return"var("+e+")"}let yNe=S([z("flex"),pe("column"),c("gap",Li(F.sm))]),xNe=S([c("overflow-x","auto")]),SNe=S([c("border-collapse","collapse"),c("font-size",Li(T.sizeSm)),c("min-width","min-content")]),D2=[c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("background",Li(y.surfaceSubtle)),c("white-space","nowrap"),c("font-weight",Li(T.weightMedium))],ENe=S(D2.concat([c("text-align","left"),c("color",Li(y.textSecondary))])),wNe=S(D2.concat([c("text-align","right"),c("color",Li(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Li(T.sizeXs))])),kNe=S(D2.concat([c("text-align","left"),c("color",Li(y.textPrimary))]));function CNe(e){return S([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("white-space","nowrap"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("color",e>=.55?Li(y.textOnBrand):e<=0?Li(y.textDisabled):Li(y.textPrimary))])}let RNe=S([z("flex"),Z("center"),c("gap","6px"),c("font-size",Li(T.sizeXs)),c("color",Li(y.textSecondary))]);function ANe(e){return S([c("width","18px"),c("height","10px"),c("background","color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("border","1px solid var("+y.borderSubtle+")")])}function zz(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function $Ne(e){return ot(e,0,(t,r)=>ot(r,t,(n,i)=>i.value>n?i.value:n))}let Uz=[.12,.35,.6,.85,1];function TNe(e){let t=e.cells,r=e.colHeaders,n=$Ne(t);return L("div",{children:[b("div",{children:L("table",{children:[b("thead",{children:L("tr",{children:[b("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:ENe,scope:"col"}),r.map(i=>b("th",{children:i.label,className:wNe,scope:"col"},i.value))]})}),b("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[b("th",{children:i.label,className:kNe,scope:"row"}),r.map((a,s)=>{let l=D(R(t[o],u=>u[s]),{value:0,display:""});return b("td",{children:b("span",{children:l.display,title:i.label+" × "+a.label+": "+l.display}),className:CNe(zz(l.value,n))},i.value+":"+a.value)})]},i.value))})],className:SNe}),className:xNe}),L("div",{children:["0",Uz.map(i=>b("span",{className:ANe(i)},i.toString())),e.maxLabel],className:RNe})],className:yNe})}let NNe=TNe;function DNe(e,t){let r=a=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(a,s,l)=>{if(typeof a!="object")switch(a){case"Function":case"Lazy":s[l]=r;return;case"Class":s[l]=[r,r,r,0];return}else{if(a.TAG!=="Module"){s[l]=a._0;return}let u=a._0,d={};s[l]=d;let f=u.length;for(let h=0;h<f;++h){let p=u[h];n(p[0],d,p[1])}return}},i={},o="dummy";return n(t,i,o),i[o]}function FNe(e,t,r){let n=(i,o,a,s,l)=>{if(typeof i!="object")switch(i){case"Function":s[l]=a;return;case"Lazy":case"Class":Object.assign(o,a);return}else{if(i.TAG!=="Module")return;let u=i._0;for(let d=0,f=u.length;d<f;++d){let h=u[d],p=h[1];n(h[0],o[p],a[p],o,p)}return}};if(typeof e!="object")throw{RE_EXN_ID:"Assert_failure",_1:["Primitive_module.res",68,9],Error:new Error};{let i=e._0;for(let o=0,a=i.length;o<a;++o){let s=i[o],l=s[1];n(s[0],t[l],r[l],t,l)}return}}function hx(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function INe(e,t,r){let n=R(O(e,t),hx);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let a=o,s=i;if(a>r)return!0;let l=R(O(e,s),hx);if(l===void 0)return!1;if(l===t)return!0;o=a+1|0,i=l}}}else return!1}function PNe(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},a={contents:0};e.forEach(l=>{let u=hx(l);if(u!==void 0){if(O(t,u)!==void 0){if(INe(t,l.key,r)){a.contents=a.contents+1|0,i.push(l.key);return}let f=D(O(n,u),[]);n[u]=f.concat([l.key]);return}o.contents=o.contents+1|0,i.push(l.key);return}i.push(l.key)});let s=(l,u)=>{let d=O(t,l);if(d===void 0)return;let f=u>=r?[]:ie(D(O(n,l),[]),h=>s(h,u+1|0));return{node:d,children:f}};return{roots:ie(i,l=>s(l,0)),detached:o.contents,cycles:a.contents}}function Bz(e){return ot(e.children,e.children.length,(t,r)=>t+Bz(r)|0)}let ONe="14px";function vn(e){return"var("+e+")"}let MNe=S([z("flex"),pe("column"),c("gap",vn(F.sm))]),LNe=S([c("overflow-x","auto"),c("padding-bottom","4px")]),zNe=S([z("flex"),Z("flexStart"),Ze("center"),c("gap",vn(F.lg)),c("min-width","min-content"),c("padding","var("+F.xs+") 0")]),UNe=S([z("flex"),pe("column"),Z("center"),c("min-width","min-content")]);function BNe(e){return S([z("flex"),pe("column"),c("gap","2px"),c("min-width","132px"),c("max-width","180px"),c("padding","var("+F.xs+") var("+F.sm+")"),c("border","1px solid var("+y.borderSubtle+")"),c("border-top","3px solid "+e),c("border-radius",vn(X.md)),c("background",vn(y.surface)),c("text-align","left"),xe("pointer"),Je([c("background",vn(y.surfaceSubtle))])])}let jNe=S([c("font-size",vn(T.sizeSm)),c("font-weight",vn(T.weightMedium)),c("color",vn(y.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),qNe=S([c("font-size",vn(T.sizeXs)),c("color",vn(y.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),VNe=S([c("margin-top","2px"),c("padding","0 6px"),c("border","1px solid var("+y.border+")"),c("border-radius","10px"),c("background",vn(y.surface)),c("color",vn(y.textSecondary)),c("font-size",vn(T.sizeXs)),c("line-height","16px"),xe("pointer"),Je([c("color",vn(y.textPrimary))])]),z3=S([c("width","1px"),c("height",ONe),c("background",vn(y.border))]),KNe=S([z("flex"),Z("flexStart"),c("min-width","min-content")]),HNe=S([z("flex"),pe("column"),Z("center"),c("min-width","min-content")]),WNe=S([c("padding","0 var("+F.xs+")")]),GNe=S([z("flex"),c("width","100%"),c("height","1px")]);function U3(e){return S([c("flex","1 1 50%"),c("background",e?vn(y.border):"transparent")])}let JNe=S([c("font-size",vn(T.sizeXs)),c("color",vn(y.textDisabled))]),QNe="var("+y.brand+")",F2=DNe(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function YNe(e){let t=e.depth,r=e.tree,n=se(()=>!1),i=n[1],o=n[0],a=Bz(r),s=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[b("span",{children:r.node.title,className:jNe}),l!==void 0&&l!==""?b("span",{children:l,className:qNe}):null],className:BNe(D(r.node.accent,QNe)),title:r.node.title,onClick:u=>ae(r.node.onOpen,d=>d())}),s===0?null:L(Gr,{children:[b("button",{children:o?"+"+a.toString():"−","aria-expanded":!o,className:VNe,title:o?"Expand":"Collapse",onClick:u=>i(d=>!d)}),o?null:L(Gr,{children:[b("div",{className:z3}),b("div",{children:r.children.map((u,d)=>L("div",{children:[L("div",{children:[b("div",{className:U3(d>0)}),b("div",{className:U3(d<(s-1|0))})],className:GNe}),b("div",{className:z3}),b("div",{children:b(F2.make,{tree:u,depth:t+1|0}),className:WNe})],className:HNe},u.node.key)),className:KNe})]})]})],className:UNe})}FNe({_0:[["Function","make"]]},F2,{make:YNe});function XNe(e){let t=PNe(e.nodes);if(t.roots.length===0)return b(ad,{title:"Nothing to chart",description:"No rows in this window."});let r=ie([e.windowNote,t.detached>0?t.detached.toString()+" item(s) whose parent is outside this window":void 0,t.cycles>0?t.cycles.toString()+" item(s) in a parent loop, shown as roots":void 0],n=>n);return L("div",{children:[b("div",{children:b("div",{children:t.roots.map(n=>b(F2.make,{tree:n,depth:0},n.node.key)),className:zNe}),className:LNe}),r.length===0?null:b("span",{children:r.join(" · "),className:JNe})],className:MNe})}let ZNe=XNe;function zi(e){return"var("+e+")"}let e3e=S([qt("relative"),c("padding-left","28px"),z("flex"),pe("column"),c("gap",zi(F.md))]),t3e=S([qt("absolute"),od(Ce(7)),ps(Ce(8)),Jx(Ce(0)),c("width","2px"),c("background",zi(y.borderSubtle))]),r3e=S([qt("absolute"),od(Ce(-21)),ps(Ce(6)),c("width","10px"),c("height","10px"),c("border-radius","50%"),c("background",zi(y.brand)),c("border","2px solid var("+y.surface+")"),vi(0)]),jz=S([qt("relative"),z("flex"),pe("column"),c("gap","2px")]),n3e=Ir([jz,S([c("background","none"),c("border","none"),c("padding","0"),hs("left"),xe("pointer"),Je([c("opacity","0.85")])])]),i3e=S([z("flex"),Z("center"),c("gap",zi(F.sm))]),o3e=S([c("color",zi(y.textDisabled)),c("font-size",zi(T.sizeXs)),c("font-family",zi(T.fontFamilyMono))]),a3e=S([c("color",zi(y.textPrimary)),c("font-size",zi(T.sizeMd)),c("font-weight",zi(T.weightMedium))]),s3e=S([c("color",zi(y.textSecondary)),c("font-size",zi(T.sizeSm)),c("line-height",zi(T.lineHeightNormal)),Oh(Ce(0))]);function l3e(e){let t=e.onSelect,r=n=>L(Gr,{children:[b("div",{className:r3e,style:Q(n.accent,i=>({background:i}))}),L("div",{children:[b("span",{children:n.timestamp,className:o3e}),de(n.variant,null,i=>b(ns,{variant:i,label:n.label})),de(n.variant,b("span",{children:n.label,className:a3e}),i=>null)],className:i3e}),de(n.detail,null,i=>b("div",{children:i,className:s3e}))]});return L("div",{children:[b("div",{className:t3e}),e.entries.map(n=>t!==void 0?b("button",{children:r(n),className:n3e,type:"button",onClick:i=>t(n.id)},n.id):b("div",{children:r(n),className:jz},n.id))],className:e3e})}let u3e=l3e;function c3e(e){let t=e[0];if(t===void 0)return;let r=ot(e,t.start,(i,o)=>o.start<i?o.start:i),n=ot(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[Jn(r),ao(Jn(n),1)]}function d3e(e,t){let r=(t-e)/XI;return r<=21?"Days":r<=120?"Weeks":"Months"}function B3(e){let t=new Date(e).getMonth()|0;return D(QI[t],"").slice(0,3)}function f3e(e,t){switch(t){case"Days":return as(e);case"Weeks":return YI(e).toString()+" "+B3(e);case"Months":let r=new Date(e).getFullYear().toString();return B3(e)+" '"+r.slice(2)}}function h3e(e,t,r){let n=l=>{switch(r){case"Days":return ao(Jn(e),l);case"Weeks":return ao(Rg(e),l*7|0);case"Months":return VI(KI(e),l)}},i=[],o=0;for(;n(o)<t&&o<2e3;){let l=n(o);l>=e&&i.push(l),o=o+1|0}let a=i.length,s=a<=40?1:(a/40|0)+1|0;return DF(i,(l,u)=>{if(Bo(u,s)===0)return[l,f3e(l,r)]})}function eg(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function Pf(e){return e<0?0:e>100?100:e}function px(e,t,r){let n=Pf(eg(e.start,t,r)),o=Pf(eg(e.end_>e.start?e.end_:e.start,t,r))-n,a=o<.6?.6:o;return[n+a>100?100-a:n,a]}function qz(e){return e.map(t=>ie(t.dependsOn,r=>Q(e.find(n=>n.key===r?n.key!==t.key:!1),n=>({from:n.key,to_:t.key,violated:t.start<n.end_})))).flat()}function p3e(e){return ot(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function Vz(e){return qz(e).filter(t=>t.violated)}function m3e(e,t){return Vz(e).some(r=>r.to_===t)}let I2="184px";function Yt(e){return"var("+e+")"}let g3e=S([z("flex"),pe("column"),c("gap",Yt(F.sm))]),v3e=S([z("flex"),Z("center"),Ze("spaceBetween"),_i("wrap"),c("gap",Yt(F.sm))]),_3e=S([z("inlineFlex"),Z("center"),c("gap",Yt(F.xs))]),Kz=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Yt(X.sm)),c("padding","2px var("+F.sm+")"),c("color",Yt(y.textSecondary)),c("font-size",Yt(T.sizeSm)),xe("pointer"),Je([c("background",Yt(y.surfaceSubtle)),c("color",Yt(y.textPrimary))])]),b3e=Ir([Kz,S([c("background",Yt(y.surfaceSubtle)),c("color",Yt(y.textPrimary)),c("font-weight",Yt(T.weightMedium))])]),y3e=S([c("font-size",Yt(T.sizeMd)),c("font-weight",Yt(T.weightMedium)),c("color",Yt(y.textPrimary))]),x3e=S([c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Yt(X.md)),c("overflow","hidden")]),Hz=S([z("flex"),Z("stretch")]),S3e=Ir([Hz,S([c("background",Yt(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")")])]),E3e=S([c("flex","0 0 "+I2),c("padding","4px var("+F.sm+")"),c("font-size",Yt(T.sizeXs)),c("color",Yt(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),w3e=S([qt("relative"),c("flex","1 1 auto"),c("height","22px"),c("overflow","hidden")]),k3e=S([qt("absolute"),c("top","4px"),c("padding-left","3px"),c("border-left","1px solid var("+y.borderSubtle+")"),c("font-size",Yt(T.sizeXs)),c("color",Yt(y.textSecondary)),c("white-space","nowrap"),c("pointer-events","none")]),C3e=S([qt("relative")]),R3e=Ir([Hz,S([c("height","30px"),c("border-top","1px solid var("+y.borderSubtle+")")])]),A3e=S([c("flex","0 0 "+I2),z("flex"),Z("center"),c("gap","4px"),c("padding","0 var("+F.sm+")"),c("font-size",Yt(T.sizeSm)),c("color",Yt(y.textPrimary)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden")]),$3e=S([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),T3e=S([c("color",Yt(y.warning)),c("font-size",Yt(T.sizeXs)),c("flex","0 0 auto")]),N3e=S([qt("relative"),c("flex","1 1 auto")]),D3e=S([qt("absolute"),c("top","0"),c("bottom","0"),c("width","1px"),c("background",Yt(y.borderSubtle)),c("opacity","0.6"),c("pointer-events","none")]);function F3e(e){return S([qt("absolute"),c("top","5px"),c("height","19px"),c("border","none"),c("border-radius",Yt(X.sm)),c("background",e),c("padding","0"),xe("pointer"),Je([c("filter","brightness(1.12)")])])}let I3e=S([c("outline","2px solid var("+y.warning+")"),c("outline-offset","1px")]),P3e=S([qt("absolute"),c("top","0"),c("left",I2),c("right","0"),c("bottom","0"),c("pointer-events","none")]),O3e=S([c("display","block"),c("width","100%"),c("height","100%")]),M3e=S([c("font-size",Yt(T.sizeXs)),c("color",Yt(y.textDisabled))]),L3e="var("+y.brand+")";function Qs(e){return(Math.round(e*100)/100).toString()}function z3e(e,t){let r=ao(t,-1);return eo(e)===eo(r)?eo(e):eo(e)+" – "+eo(r)}function U3e(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=E=>n.findIndex(C=>C.key===E),a=o(i.from),s=o(i.to_),l=n[a],u=n[s];if(l===void 0||u===void 0)return null;let d=px(l,r,t),h=px(u,r,t)[0],p=d[0]+d[1],m=a*30+30/2,g=s*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,_;if(h>p){let E=Pf((p+h)/2);_=[[p,m],[E,m],[E,g],[h,g]]}else{let E=Pf(p+1.4),C=Pf(h-1.4),k=(m+g)/2;_=[[p,m],[E,m],[E,k],[C,k],[C,g],[h,g]]}let x=i.violated?"var("+y.warning+")":"var("+y.border+")",w=_.length-2|0;return b("g",{children:_.map((E,C)=>{let k=_[C+1|0];return k!==void 0?b("line",{markerEnd:C===w?"url(#"+v+")":void 0,stroke:x,strokeWidth:"1.5",x1:Qs(E[0])+"%",x2:Qs(k[0])+"%",y1:Qs(E[1]),y2:Qs(k[1])},C.toString()):null})})}function B3e(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=G7(),o=se(()=>t),a=o[1],s="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,u=c3e(n);if(u===void 0)return b(ad,{title:"Nothing scheduled",description:"No row in this window carries a start and end date."});let d=u[1],f=u[0],h=D(o[0],d3e(f,d)),p=h3e(f,d,h),m=qz(n),g=p3e(n),v=Vz(n).length,_=(E,C)=>b("button",{children:C,className:h===E?b3e:Kz,onClick:k=>a(A=>E)}),x,w=0;if(r!==void 0||g!==0||v!==0?w=1:x=null,w===1){let E=ie([r,g>0?g.toString()+" dependency link(s) outside this window":void 0,v>0?v.toString()+" start(s) before a dependency ends":void 0],C=>C);x=b("span",{children:E.join(" · "),className:M3e})}return L("div",{children:[L("div",{children:[b("span",{children:z3e(f,d),className:y3e}),L("div",{children:[_("Days","Days"),_("Weeks","Weeks"),_("Months","Months")],className:_3e})],className:v3e}),L("div",{children:[L("div",{children:[b("div",{children:"Task",className:E3e}),b("div",{children:p.map(E=>{let C=E[0];return b("span",{children:E[1],className:k3e,style:{left:Qs(eg(C,f,d))+"%"}},C.toString())}),className:w3e})],className:S3e}),L("div",{children:[n.map(E=>{let C=px(E,f,d),k=m3e(n,E.key),A=F3e(D(E.accent,L3e)),$=k?A+" "+I3e:A;return L("div",{children:[L("div",{children:[k?b("span",{children:"▲",className:T3e,title:"Starts before a dependency ends"}):null,b("span",{children:E.title,className:$3e,title:E.title})],className:A3e}),L("div",{children:[p.map(N=>{let M=N[0];return b("div",{className:D3e,style:{left:Qs(eg(M,f,d))+"%"}},M.toString())}),b("button",{className:$,style:{left:Qs(C[0])+"%",width:Qs(C[1])+"%"},title:E.title+" · "+as(E.start)+" → "+as(E.end_),onClick:N=>E.onOpen()})],className:N3e})],className:R3e},E.key)}),b("div",{children:L("svg",{children:[L("defs",{children:[b("marker",{children:b("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+y.border+")"}),id:s,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"}),b("marker",{children:b("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+y.warning+")"}),id:l,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"})]}),m.map(E=>b(U3e,{edge:E,tasks:n,from:f,to_:d,arrowId:s,arrowBadId:l},E.from+"->"+E.to_))],className:O3e}),className:P3e})],className:C3e})],className:x3e}),x],className:g3e})}let j3e=B3e;function Bn(e){return"var("+e+")"}let q3e=S([c("overflow-x","auto")]),V3e=S([c("border-collapse","collapse"),c("font-size",Bn(T.sizeSm)),c("color",Bn(y.textPrimary)),c("min-width","min-content")]),P2=[c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("white-space","nowrap")],K3e=S(P2),H3e=S(P2.concat([c("color",Bn(y.textDisabled))])),W3e=S([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","left"),c("color",Bn(y.textSecondary)),c("font-weight",Bn(T.weightMedium)),c("white-space","nowrap")]),G3e=S([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("background",Bn(y.surfaceSubtle)),c("color",Bn(y.textSecondary)),c("font-weight",Bn(T.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Bn(T.sizeXs)),c("white-space","nowrap")]),J3e=S([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","left"),c("background",Bn(y.surfaceSubtle)),c("color",Bn(y.textPrimary)),c("font-weight",Bn(T.weightMedium)),c("white-space","nowrap")]),py=S(P2.concat([c("font-weight",Bn(T.weightMedium))])),j3=S([c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("background",Bn(y.surfaceSubtle)),c("color",Bn(y.textSecondary)),c("font-weight",Bn(T.weightMedium)),c("white-space","nowrap")]),q3="Total";function Q3e(e){let t=e.colTotals,r=e.rowTotals,n=e.cells,i=e.colHeaders;return b("div",{children:L("table",{children:[b("thead",{children:L("tr",{children:[b("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:W3e,scope:"col"}),i.map(o=>b("th",{children:o.label,className:G3e,scope:"col"},o.value)),b("th",{children:q3,className:j3,scope:"col"})]})}),b("tbody",{children:e.rowHeaders.map((o,a)=>{let s=D(n[a],[]);return L("tr",{children:[b("th",{children:o.label,className:J3e,scope:"row"}),i.map((l,u)=>{let d=D(s[u],{display:"",empty:!0});return b("td",{children:d.empty?"—":d.display,className:d.empty?H3e:K3e},l.value)}),b("td",{children:D(r[a],""),className:py})]},o.value)})}),b("tfoot",{children:L("tr",{children:[b("th",{children:q3,className:j3,scope:"row"}),i.map((o,a)=>b("td",{children:D(t[a],""),className:py},o.value)),b("td",{children:e.grandTotal,className:py})]})})],className:V3e}),className:q3e})}let Y3e=Q3e;function X3e(e){let t=e.label,r=e.size;return b(I1,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let mx=X3e;function fi(e){return"var("+e+")"}let Z3e=S([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",fi(F.md))]),eDe=S([z("flex"),pe("column"),Z("stretch"),c("gap",fi(F.xs)),c("padding","0"),c("background","none"),c("border","none"),c("text-align","left"),xe("pointer"),Je([c("opacity","0.88")])]),tDe=S([c("width","100%"),c("aspect-ratio","4 / 3"),c("object-fit","cover"),c("background",fi(y.surfaceSubtle)),c("border","1px solid var("+y.border+")"),c("border-radius",fi(X.md))]),rDe=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",fi(F.sm))]),nDe=S([c("color",fi(y.textPrimary)),c("font-size",fi(T.sizeSm)),c("font-weight",fi(T.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),iDe=S([c("color",fi(y.textSecondary)),c("font-size",fi(T.sizeXs)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),oDe=S([c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",fi(X.md)),c("color","#f5f5f5"),c("padding","4px var("+F.sm+")"),c("font-size",fi(T.sizeSm)),xe("pointer"),Je([c("background","rgba(255,255,255,0.22)")])]),aDe=S([c("color",fi(y.textDisabled)),c("font-size",fi(T.sizeSm))]);function sDe(e){return ie(e,t=>Q(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function lDe(e){let t=e.onOpen,r=e.items,n=se(()=>{}),i=n[1],o=n[0],a=sDe(r);if(r.length===0)return b("span",{children:"(empty)",className:aDe});let s;if(o!==void 0){let l=R(t,u=>Q(a[o],d=>b("button",{children:"Open record →",className:oDe,type:"button",onClick:f=>{i(h=>{}),u(d.key)}})));s=b(qI,{slides:a,index:o,onIndexChange:u=>i(d=>u),onClose:()=>i(u=>{}),action:l})}else s=null;return L(Gr,{children:[b("div",{children:r.map(l=>{let u=l.src,d=l.onUpload,f=l.caption;return L("button",{children:[u!==void 0?b("img",{className:tDe,alt:l.title,src:u}):d!==void 0?b(mx,{size:"Tile",label:"Add image"}):b(mx,{size:"Tile"}),L("div",{children:[b("span",{children:l.title,className:nDe}),D(l.badge,null)],className:rDe}),f!==void 0?b("span",{children:f,className:iDe}):null],className:eDe,title:Ui(l.src)&&Ge(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,m=l.onUpload;if(p===void 0)return m!==void 0?m():ae(t,v=>v(l.key));let g=a.findIndex(v=>v.key===l.key);return g!==-1?i(v=>g):ae(t,v=>v(l.key))}},l.key)}),className:Z3e}),s]})}let uDe=lDe;const Mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Id(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function O2(e){return"nodeType"in e}function Si(e){var t,r;return e?Id(e)?e:O2(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function M2(e){const{Document:t}=Si(e);return e instanceof t}function fp(e){return Id(e)?!1:e instanceof Si(e).HTMLElement}function Wz(e){return e instanceof Si(e).SVGElement}function Pd(e){return e?Id(e)?e.document:O2(e)?M2(e)?e:fp(e)||Wz(e)?e.ownerDocument:document:document:document}const vl=Mv?$F:Ae;function L2(e){const t=We(e);return vl(()=>{t.current=e}),en(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function cDe(){const e=We(null),t=en((n,i)=>{e.current=setInterval(n,i)},[]),r=en(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function $h(e,t){t===void 0&&(t=[e]);const r=We(e);return vl(()=>{r.current!==e&&(r.current=e)},t),r}function hp(e,t){const r=We();return Bt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function tg(e){const t=L2(e),r=We(null),n=en(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function gx(e){const t=We();return Ae(()=>{t.current=e},[e]),t.current}let my={};function Lv(e,t){return Bt(()=>{if(t)return t;const r=my[e]==null?0:my[e]+1;return my[e]=r,e+"-"+r},[e,t])}function Gz(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[l,u]of s){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const Pc=Gz(1),rg=Gz(-1);function dDe(e){return"clientX"in e&&"clientY"in e}function Jz(e){if(!e)return!1;const{KeyboardEvent:t}=Si(e.target);return t&&e instanceof t}function fDe(e){if(!e)return!1;const{TouchEvent:t}=Si(e.target);return t&&e instanceof t}function vx(e){if(fDe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return dDe(e)?{x:e.clientX,y:e.clientY}:null}const V3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function hDe(e){return e.matches(V3)?e:e.querySelector(V3)}const pDe={display:"none"};function mDe(e){let{id:t,value:r}=e;return Yi.createElement("div",{id:t,style:pDe},r)}function gDe(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Yi.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function vDe(){const[e,t]=se("");return{announce:en(n=>{n!=null&&t(n)},[]),announcement:e}}const Qz=cr(null);function _De(e){const t=Pt(Qz);Ae(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function bDe(){const[e]=se(()=>new Set),t=en(n=>(e.add(n),()=>e.delete(n)),[e]);return[en(n=>{let{type:i,event:o}=n;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const yDe={draggable:`
|
|
88
|
+
To pick up a draggable item, press the space bar.
|
|
89
|
+
While dragging, use the arrow keys to move the item.
|
|
90
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
91
|
+
`},xDe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function SDe(e){let{announcements:t=xDe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=yDe}=e;const{announce:o,announcement:a}=vDe(),s=Lv("DndLiveRegion"),[l,u]=se(!1);if(Ae(()=>{u(!0)},[]),_De(Bt(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=Yi.createElement(Yi.Fragment,null,Yi.createElement(mDe,{id:n,value:i.draggable}),Yi.createElement(gDe,{id:s,announcement:a}));return r?eU(d,r):d}var Xr;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Xr||(Xr={}));function ng(){}function K3(e,t){return Bt(()=>({sensor:e,options:t??{}}),[e,t])}function EDe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Bt(()=>[...t].filter(n=>n!=null),[...t])}const Ko=Object.freeze({x:0,y:0});function wDe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function kDe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function CDe(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const l=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const RDe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const l=CDe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(wDe)};function ADe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Yz(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ko}function $De(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...r})}}const TDe=$De(1);function NDe(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function DDe(e,t,r){const n=NDe(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,l=e.left-a-(1-i)*parseFloat(r),u=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const FDe={ignoreTransform:!1};function pp(e,t){t===void 0&&(t=FDe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Si(e).getComputedStyle(e);u&&(r=DDe(r,u,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}function H3(e){return pp(e,{ignoreTransform:!0})}function IDe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function PDe(e,t){return t===void 0&&(t=Si(e).getComputedStyle(e)),t.position==="fixed"}function ODe(e,t){t===void 0&&(t=Si(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?r.test(o):!1})}function z2(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(M2(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!fp(i)||Wz(i)||r.includes(i))return r;const o=Si(e).getComputedStyle(i);return i!==e&&ODe(i,o)&&r.push(i),PDe(i,o)?r:n(i.parentNode)}return e?n(e):r}function Xz(e){const[t]=z2(e,1);return t??null}function gy(e){return!Mv||!e?null:Id(e)?e:O2(e)?M2(e)||e===Pd(e).scrollingElement?window:fp(e)?e:null:null}function Zz(e){return Id(e)?e.scrollX:e.scrollLeft}function e9(e){return Id(e)?e.scrollY:e.scrollTop}function _x(e){return{x:Zz(e),y:e9(e)}}var ln;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ln||(ln={}));function t9(e){return!Mv||!e?!1:e===document.scrollingElement}function r9(e){const t={x:0,y:0},r=t9(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const MDe={x:.2,y:.2};function LDe(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=MDe);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=r9(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(p.y=ln.Backward,m.y=n*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=ln.Forward,m.y=n*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=ln.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=ln.Backward,m.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function zDe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function n9(e){return e.reduce((t,r)=>Pc(t,_x(r)),Ko)}function UDe(e){return e.reduce((t,r)=>t+Zz(r),0)}function BDe(e){return e.reduce((t,r)=>t+e9(r),0)}function jDe(e,t){if(t===void 0&&(t=pp),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);Xz(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const qDe=[["x",["left","right"],UDe],["y",["top","bottom"],BDe]];class U2{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=z2(r),i=n9(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of qDe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(n),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Of{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function VDe(e){const{EventTarget:t}=Si(e);return e instanceof t?e:Pd(e)}function vy(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Qi;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Qi||(Qi={}));function W3(e){e.preventDefault()}function KDe(e){e.stopPropagation()}var Zt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Zt||(Zt={}));const i9={start:[Zt.Space,Zt.Enter],cancel:[Zt.Esc],end:[Zt.Space,Zt.Enter,Zt.Tab]},HDe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Zt.Right:return{...r,x:r.x+25};case Zt.Left:return{...r,x:r.x-25};case Zt.Down:return{...r,y:r.y+25};case Zt.Up:return{...r,y:r.y-25}}};class B2{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Of(Pd(r)),this.windowListeners=new Of(Si(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Qi.Resize,this.handleCancel),this.windowListeners.add(Qi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Qi.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&jDe(n),r(Ko)}handleKeyDown(t){if(Jz(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=i9,coordinateGetter:a=HDe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:Ko;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=rg(f,d),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const v=t.code,{isTop:_,isRight:x,isLeft:w,isBottom:E,maxScroll:C,minScroll:k}=r9(g),A=zDe(g),$={x:Math.min(v===Zt.Right?A.right-A.width/2:A.right,Math.max(v===Zt.Right?A.left:A.left+A.width/2,f.x)),y:Math.min(v===Zt.Down?A.bottom-A.height/2:A.bottom,Math.max(v===Zt.Down?A.top:A.top+A.height/2,f.y))},N=v===Zt.Right&&!x||v===Zt.Left&&!w,M=v===Zt.Down&&!E||v===Zt.Up&&!_;if(N&&$.x!==f.x){const P=g.scrollLeft+h.x,I=v===Zt.Right&&P<=C.x||v===Zt.Left&&P>=k.x;if(I&&!h.y){g.scrollTo({left:P,behavior:s});return}I?p.x=g.scrollLeft-P:p.x=v===Zt.Right?g.scrollLeft-C.x:g.scrollLeft-k.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(M&&$.y!==f.y){const P=g.scrollTop+h.y,I=v===Zt.Down&&P<=C.y||v===Zt.Up&&P>=k.y;if(I&&!h.x){g.scrollTo({top:P,behavior:s});return}I?p.y=g.scrollTop-P:p.y=v===Zt.Down?g.scrollTop-C.y:g.scrollTop-k.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Pc(rg(f,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}B2.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=i9,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function G3(e){return!!(e&&"distance"in e)}function J3(e){return!!(e&&"delay"in e)}class j2{constructor(t,r,n){var i;n===void 0&&(n=VDe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=Pd(a),this.documentListeners=new Of(this.document),this.listeners=new Of(n),this.windowListeners=new Of(Si(a)),this.initialCoordinates=(i=vx(o))!=null?i:Ko,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Qi.Resize,this.handleCancel),this.windowListeners.add(Qi.DragStart,W3),this.windowListeners.add(Qi.VisibilityChange,this.handleCancel),this.windowListeners.add(Qi.ContextMenu,W3),this.documentListeners.add(Qi.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(J3(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(G3(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Qi.Click,KDe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Qi.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(r=vx(t))!=null?r:Ko,u=rg(i,l);if(!n&&s){if(G3(s)){if(s.tolerance!=null&&vy(u,s.tolerance))return this.handleCancel();if(vy(u,s.distance))return this.handleStart()}if(J3(s)&&vy(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===Zt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const WDe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class q2 extends j2{constructor(t){const{event:r}=t,n=Pd(r.target);super(t,WDe,n)}}q2.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];const GDe={move:{name:"mousemove"},end:{name:"mouseup"}};var bx;(function(e){e[e.RightClick=2]="RightClick"})(bx||(bx={}));class JDe extends j2{constructor(t){super(t,GDe,Pd(t.event.target))}}JDe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===bx.RightClick?!1:(n?.({event:r}),!0)}}];const _y={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class QDe extends j2{constructor(t){super(t,_y)}static setup(){return window.addEventListener(_y.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(_y.move.name,t)};function t(){}}}QDe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n?.({event:r}),!0)}}];var Mf;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Mf||(Mf={}));var ig;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ig||(ig={}));function YDe(e){let{acceleration:t,activator:r=Mf.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=ig.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=ZDe({delta:f,disabled:!o}),[m,g]=cDe(),v=We({x:0,y:0}),_=We({x:0,y:0}),x=Bt(()=>{switch(r){case Mf.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Mf.DraggableRect:return i}},[r,i,l]),w=We(null),E=en(()=>{const k=w.current;if(!k)return;const A=v.current.x*_.current.x,$=v.current.y*_.current.y;k.scrollBy(A,$)},[]),C=Bt(()=>s===ig.TreeOrder?[...u].reverse():u,[s,u]);Ae(()=>{if(!o||!u.length||!x){g();return}for(const k of C){if(n?.(k)===!1)continue;const A=u.indexOf(k),$=d[A];if(!$)continue;const{direction:N,speed:M}=LDe(k,$,x,t,h);for(const P of["x","y"])p[P][N[P]]||(M[P]=0,N[P]=0);if(M.x>0||M.y>0){g(),w.current=k,m(E,a),v.current=M,_.current=N;return}}v.current={x:0,y:0},_.current={x:0,y:0},g()},[t,E,n,g,o,a,JSON.stringify(x),JSON.stringify(p),m,u,C,d,JSON.stringify(h)])}const XDe={x:{[ln.Backward]:!1,[ln.Forward]:!1},y:{[ln.Backward]:!1,[ln.Forward]:!1}};function ZDe(e){let{delta:t,disabled:r}=e;const n=gx(t);return hp(i=>{if(r||!n||!i)return XDe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[ln.Backward]:i.x[ln.Backward]||o.x===-1,[ln.Forward]:i.x[ln.Forward]||o.x===1},y:{[ln.Backward]:i.y[ln.Backward]||o.y===-1,[ln.Forward]:i.y[ln.Forward]||o.y===1}}},[r,t,n])}function eFe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return hp(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function tFe(e,t){return Bt(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var Th;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Th||(Th={}));var yx;(function(e){e.Optimized="optimized"})(yx||(yx={}));const Q3=new Map;function rFe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=se(null),{frequency:s,measure:l,strategy:u}=i,d=We(e),f=v(),h=$h(f),p=en(function(_){_===void 0&&(_=[]),!h.current&&a(x=>x===null?_:x.concat(_.filter(w=>!x.includes(w))))},[h]),m=We(null),g=hp(_=>{if(f&&!r)return Q3;if(!_||_===Q3||d.current!==e||o!=null){const x=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}const E=w.node.current,C=E?new U2(l(E),E):null;w.rect.current=C,C&&x.set(w.id,C)}return x}return _},[e,o,r,f,l]);return Ae(()=>{d.current=e},[e]),Ae(()=>{f||p()},[r,f]),Ae(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),Ae(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...n]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(u){case Th.Always:return!1;case Th.BeforeDragging:return r;default:return!r}}}function o9(e,t){return hp(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function nFe(e,t){return o9(e,t)}function iFe(e){let{callback:t,disabled:r}=e;const n=L2(t),i=Bt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return Ae(()=>()=>i?.disconnect(),[i]),i}function zv(e){let{callback:t,disabled:r}=e;const n=L2(t),i=Bt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return Ae(()=>()=>i?.disconnect(),[i]),i}function oFe(e){return new U2(pp(e),e)}function Y3(e,t,r){t===void 0&&(t=oFe);const[n,i]=se(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??r)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=iFe({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=zv({callback:o});return vl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),n}function aFe(e){const t=o9(e);return Yz(e,t)}const X3=[];function sFe(e){const t=We(e),r=hp(n=>e?n&&n!==X3&&e&&t.current&&e.parentNode===t.current.parentNode?n:z2(e):X3,[e]);return Ae(()=>{t.current=e},[e]),r}function lFe(e){const[t,r]=se(null),n=We(e),i=en(o=>{const a=gy(o.target);a&&r(s=>s?(s.set(a,_x(a)),new Map(s)):null)},[]);return Ae(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(l=>{const u=gy(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,_x(u)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=gy(l);u?.removeEventListener("scroll",i)})}},[i,e]),Bt(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>Pc(o,a),Ko):n9(e):Ko,[e,t])}function Z3(e,t){t===void 0&&(t=[]);const r=We(null);return Ae(()=>{r.current=null},t),Ae(()=>{const n=e!==Ko;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?rg(e,r.current):Ko}function uFe(e){Ae(()=>{if(!Mv)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function cFe(e,t){return Bt(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function a9(e){return Bt(()=>e?IDe(e):null,[e])}const eD=[];function dFe(e,t){t===void 0&&(t=pp);const[r]=e,n=a9(r?Si(r):null),[i,o]=se(eD);function a(){o(()=>e.length?e.map(l=>t9(l)?n:new U2(t(l),l)):eD)}const s=zv({callback:a});return vl(()=>{s?.disconnect(),a(),e.forEach(l=>s?.observe(l))},[e]),i}function fFe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fp(t)?t:e}function hFe(e){let{measure:t}=e;const[r,n]=se(null),i=en(u=>{for(const{target:d}of u)if(fp(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=zv({callback:i}),a=en(u=>{const d=fFe(u);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[s,l]=tg(a);return Bt(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const pFe=[{sensor:q2,options:{}},{sensor:B2,options:{}}],mFe={current:{}},Y0={draggable:{measure:H3},droppable:{measure:H3,strategy:Th.WhileDragging,frequency:yx.Optimized},dragOverlay:{measure:pp}};class Lf extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const gFe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Lf,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ng},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Y0,measureDroppableContainers:ng,windowRect:null,measuringScheduled:!1},vFe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ng,draggableNodes:new Map,over:null,measureDroppableContainers:ng},Uv=cr(vFe),_Fe=cr(gFe);function bFe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Lf}}}function yFe(e,t){switch(t.type){case Xr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Xr.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Xr.DragEnd:case Xr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Xr.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Lf(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Xr.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Lf(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Xr.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Lf(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function xFe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=Pt(Uv),o=gx(n),a=gx(r?.id);return Ae(()=>{if(!t&&!n&&o&&a!=null){if(!Jz(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=hDe(d);if(f){f.focus();break}}})}},[n,t,i,a,o]),null}function SFe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function EFe(e){return Bt(()=>({draggable:{...Y0.draggable,...e?.draggable},droppable:{...Y0.droppable,...e?.droppable},dragOverlay:{...Y0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function wFe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=We(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;vl(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const d=r(u),f=Yz(d,n);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=Xz(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,n,r])}const s9=cr({...Ko,scaleX:1,scaleY:1});var Os;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Os||(Os={}));const l9=J7(function(t){var r,n,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:d=pFe,collisionDetection:f=RDe,measuring:h,modifiers:p,...m}=t;const g=Q7(yFe,void 0,bFe),[v,_]=g,[x,w]=bDe(),[E,C]=se(Os.Uninitialized),k=E===Os.Initialized,{draggable:{active:A,nodes:$,translate:N},droppable:{containers:M}}=v,P=A!=null?$.get(A):null,I=We({initial:null,translated:null}),U=Bt(()=>{var Tt;return A!=null?{id:A,data:(Tt=P?.data)!=null?Tt:mFe,rect:I}:null},[A,P]),B=We(null),[q,W]=se(null),[J,K]=se(null),G=$h(m,Object.values(m)),re=Lv("DndDescribedBy",a),oe=Bt(()=>M.getEnabled(),[M]),_e=EFe(h),{droppableRects:Re,measureDroppableContainers:Te,measuringScheduled:He}=rFe(oe,{dragging:k,dependencies:[N.x,N.y],config:_e.droppable}),ge=eFe($,A),be=Bt(()=>J?vx(J):null,[J]),mt=ki(),fr=nFe(ge,_e.draggable.measure);wFe({activeNode:A!=null?$.get(A):null,config:mt.layoutShiftCompensation,initialRect:fr,measure:_e.draggable.measure});const Mt=Y3(ge,_e.draggable.measure,fr),Ei=Y3(ge?ge.parentElement:null),Sr=We({activatorEvent:null,active:null,activeNode:ge,collisionRect:null,collisions:null,droppableRects:Re,draggableNodes:$,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Eo=M.getNodeFor((r=Sr.current.over)==null?void 0:r.id),Er=hFe({measure:_e.dragOverlay.measure}),tn=(n=Er.nodeRef.current)!=null?n:ge,rn=k?(i=Er.rect)!=null?i:Mt:null,et=!!(Er.nodeRef.current&&Er.rect),le=aFe(et?null:Mt),$e=a9(tn?Si(tn):null),Ue=sFe(k?Eo??ge:null),Ye=dFe(Ue),j=SFe(p,{transform:{x:N.x-le.x,y:N.y-le.y,scaleX:1,scaleY:1},activatorEvent:J,active:U,activeNodeRect:Mt,containerNodeRect:Ei,draggingNodeRect:rn,over:Sr.current.over,overlayNodeRect:Er.rect,scrollableAncestors:Ue,scrollableAncestorRects:Ye,windowRect:$e}),fe=be?Pc(be,N):null,Fe=lFe(Ue),Ie=Z3(Fe),Ee=Z3(Fe,[Mt]),ye=Pc(j,Ie),st=rn?TDe(rn,j):null,Ne=U&&st?f({active:U,collisionRect:st,droppableRects:Re,droppableContainers:oe,pointerCoordinates:fe}):null,Rt=kDe(Ne,"id"),[dt,Vt]=se(null),ft=et?j:Pc(j,Ee),Tr=ADe(ft,(o=dt?.rect)!=null?o:null,Mt),ir=We(null),wo=en((Tt,Et)=>{let{sensor:wr,options:Ci}=Et;if(B.current==null)return;const Vr=$.get(B.current);if(!Vr)return;const Or=Tt.nativeEvent,Nt=new wr({active:B.current,activeNode:Vr,event:Or,options:Ci,context:Sr,onAbort(ar){if(!$.get(ar))return;const{onDragAbort:En}=G.current,Fn={id:ar};En?.(Fn),x({type:"onDragAbort",event:Fn})},onPending(ar,ti,En,Fn){if(!$.get(ar))return;const{onDragPending:ri}=G.current,_t={id:ar,constraint:ti,initialCoordinates:En,offset:Fn};ri?.(_t),x({type:"onDragPending",event:_t})},onStart(ar){const ti=B.current;if(ti==null)return;const En=$.get(ti);if(!En)return;const{onDragStart:Fn}=G.current,ta={activatorEvent:Or,active:{id:ti,data:En.data,rect:I}};xp(()=>{Fn?.(ta),C(Os.Initializing),_({type:Xr.DragStart,initialCoordinates:ar,active:ti}),x({type:"onDragStart",event:ta}),W(ir.current),K(Or)})},onMove(ar){_({type:Xr.DragMove,coordinates:ar})},onEnd:qn(Xr.DragEnd),onCancel:qn(Xr.DragCancel)});ir.current=Nt;function qn(ar){return async function(){const{active:En,collisions:Fn,over:ta,scrollAdjustedTranslate:ri}=Sr.current;let _t=null;if(En&&ri){const{cancelDrop:In}=G.current;_t={activatorEvent:Or,active:En,collisions:Fn,delta:ri,over:ta},ar===Xr.DragEnd&&typeof In=="function"&&await Promise.resolve(In(_t))&&(ar=Xr.DragCancel)}B.current=null,xp(()=>{_({type:ar}),C(Os.Uninitialized),Vt(null),W(null),K(null),ir.current=null;const In=ar===Xr.DragEnd?"onDragEnd":"onDragCancel";if(_t){const ra=G.current[In];ra?.(_t),x({type:In,event:_t})}})}}},[$]),or=en((Tt,Et)=>(wr,Ci)=>{const Vr=wr.nativeEvent,Or=$.get(Ci);if(B.current!==null||!Or||Vr.dndKit||Vr.defaultPrevented)return;const Nt={active:Or};Tt(wr,Et.options,Nt)===!0&&(Vr.dndKit={capturedBy:Et.sensor},B.current=Ci,wo(wr,Et))},[$,wo]),jn=tFe(d,or);uFe(d),vl(()=>{Mt&&E===Os.Initializing&&C(Os.Initialized)},[Mt,E]),Ae(()=>{const{onDragMove:Tt}=G.current,{active:Et,activatorEvent:wr,collisions:Ci,over:Vr}=Sr.current;if(!Et||!wr)return;const Or={active:Et,activatorEvent:wr,collisions:Ci,delta:{x:ye.x,y:ye.y},over:Vr};xp(()=>{Tt?.(Or),x({type:"onDragMove",event:Or})})},[ye.x,ye.y]),Ae(()=>{const{active:Tt,activatorEvent:Et,collisions:wr,droppableContainers:Ci,scrollAdjustedTranslate:Vr}=Sr.current;if(!Tt||B.current==null||!Et||!Vr)return;const{onDragOver:Or}=G.current,Nt=Ci.get(Rt),qn=Nt&&Nt.rect.current?{id:Nt.id,rect:Nt.rect.current,data:Nt.data,disabled:Nt.disabled}:null,ar={active:Tt,activatorEvent:Et,collisions:wr,delta:{x:Vr.x,y:Vr.y},over:qn};xp(()=>{Vt(qn),Or?.(ar),x({type:"onDragOver",event:ar})})},[Rt]),vl(()=>{Sr.current={activatorEvent:J,active:U,activeNode:ge,collisionRect:st,collisions:Ne,droppableRects:Re,draggableNodes:$,draggingNode:tn,draggingNodeRect:rn,droppableContainers:M,over:dt,scrollableAncestors:Ue,scrollAdjustedTranslate:ye},I.current={initial:rn,translated:st}},[U,ge,Ne,st,$,tn,rn,Re,M,dt,Ue,ye]),YDe({...mt,delta:N,draggingRect:st,pointerCoordinates:fe,scrollableAncestors:Ue,scrollableAncestorRects:Ye});const wi=Bt(()=>({active:U,activeNode:ge,activeNodeRect:Mt,activatorEvent:J,collisions:Ne,containerNodeRect:Ei,dragOverlay:Er,draggableNodes:$,droppableContainers:M,droppableRects:Re,over:dt,measureDroppableContainers:Te,scrollableAncestors:Ue,scrollableAncestorRects:Ye,measuringConfiguration:_e,measuringScheduled:He,windowRect:$e}),[U,ge,Mt,J,Ne,Ei,Er,$,M,Re,dt,Te,Ue,Ye,_e,He,$e]),Hi=Bt(()=>({activatorEvent:J,activators:jn,active:U,activeNodeRect:Mt,ariaDescribedById:{draggable:re},dispatch:_,draggableNodes:$,over:dt,measureDroppableContainers:Te}),[J,jn,U,Mt,_,re,$,dt,Te]);return Yi.createElement(Qz.Provider,{value:w},Yi.createElement(Uv.Provider,{value:Hi},Yi.createElement(_Fe.Provider,{value:wi},Yi.createElement(s9.Provider,{value:Tr},u)),Yi.createElement(xFe,{disabled:s?.restoreFocus===!1})),Yi.createElement(SDe,{...s,hiddenTextDescribedById:re}));function ki(){const Tt=q?.autoScrollEnabled===!1,Et=typeof l=="object"?l.enabled===!1:l===!1,wr=k&&!Tt&&!Et;return typeof l=="object"?{...l,enabled:wr}:{enabled:wr}}}),kFe=cr(null),tD="button",CFe="Draggable";function u9(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Lv(CFe),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=Pt(Uv),{role:p=tD,roleDescription:m="draggable",tabIndex:g=0}=i??{},v=l?.id===t,_=Pt(v?s9:kFe),[x,w]=tg(),[E,C]=tg(),k=cFe(a,t),A=$h(r);vl(()=>(f.set(t,{id:t,key:o,node:x,activatorNode:E,data:A}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const $=Bt(()=>({role:p,tabIndex:g,"aria-disabled":n,"aria-pressed":v&&p===tD?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[n,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:$,isDragging:v,listeners:n?void 0:k,node:x,over:h,setNodeRef:w,setActivatorNodeRef:C,transform:_}}const RFe="Droppable",AFe={timeout:25};function c9(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Lv(RFe),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=Pt(Uv),d=We({disabled:r}),f=We(!1),h=We(null),p=We(null),{disabled:m,updateMeasurementsFor:g,timeout:v}={...AFe,...i},_=$h(g??n),x=en(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(_.current)?_.current:[_.current]),p.current=null},v)},[v]),w=zv({callback:x,disabled:m||!a}),E=en(($,N)=>{w&&(N&&(w.unobserve(N),f.current=!1),$&&w.observe($))},[w]),[C,k]=tg(E),A=$h(t);return Ae(()=>{!w||!C.current||(w.disconnect(),f.current=!1,w.observe(C.current))},[C,w]),Ae(()=>(s({type:Xr.RegisterDroppable,element:{id:n,key:o,disabled:r,node:C,rect:h,data:A}}),()=>s({type:Xr.UnregisterDroppable,key:o,id:n})),[n]),Ae(()=>{r!==d.current.disabled&&(s({type:Xr.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:h,isOver:l?.id===n,node:C,over:l,setNodeRef:k}}function d9(e,t){ae(xa(e.onPointerDown),r=>r(t))}function f9(e,t){ae(xa(e.onKeyDown),r=>r(t))}function h9(e){return Q(e==null?void 0:Jt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}function Fr(e){return"var("+e+")"}let $Fe=S([z("flex"),Z("stretch"),c("gap",Fr(F.md)),c("overflow-x","auto"),c("padding-bottom",Fr(F.sm))]),by=S([z("flex"),pe("column"),c("gap",Fr(F.sm)),c("flex","0 0 240px"),c("padding",Fr(F.sm)),c("background",Fr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Fr(X.md)),c("min-height","120px")]),TFe=S([c("border-color",Fr(y.brand))]),NFe=S([Ya(.45)]),DFe=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",Fr(F.sm)),c("font-size",Fr(T.sizeSm)),c("font-weight",Fr(T.weightMedium)),c("color",Fr(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),rD=S([z("flex"),pe("column"),Z("stretch"),c("gap","4px"),c("padding",Fr(F.sm)),c("background",Fr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Fr(X.sm)),c("text-align","left"),xe("pointer"),Je([c("border-color",Fr(y.brand))])]),FFe=S([xe("grab")]),IFe=S([Ya(.85),c("z-index","10"),xe("grabbing")]),PFe=S([c("font-size",Fr(T.sizeSm)),c("font-weight",Fr(T.weightMedium)),c("color",Fr(y.textPrimary))]),OFe=S([c("font-size",Fr(T.sizeXs)),c("color",Fr(y.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),MFe=S([c("color",Fr(y.textDisabled)),c("font-size",Fr(T.sizeSm))]);function LFe(e){let t=e.onClick,r=e.draggable,n=e.card,i=u9({id:n.key,disabled:!r}),o=r?rD+" "+FFe:rD,a=i.isDragging?o+" "+IFe:o,s=h9(i.transform),l=s!==void 0?{transform:s}:void 0,u=i.listeners,d=u==null?void 0:Jt(u),f=n.meta;return L("div",{children:[b("span",{children:n.title,className:PFe}),f!==void 0?b("span",{children:f,className:OFe,title:f}):null],ref:Jt(i.setNodeRef),className:a,role:"button",style:l,tabIndex:0,onKeyDown:h=>ae(d,p=>f9(p,h)),onClick:h=>ae(t,p=>p(n.key)),onPointerDown:h=>ae(d,p=>d9(p,h))})}function zFe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,a=c9({id:i.value,disabled:!o}),s=a.isOver,l=o?s?by+" "+TFe:by:by+" "+NFe;return L("div",{children:[L("div",{children:[b("span",{children:i.label}),b(xf,{count:i.cards.length,label:""})],className:DFe}),i.cards.length===0?b("span",{children:"—",className:MFe}):i.cards.map(u=>b(LFe,{card:u,draggable:n,onClick:r},u.key))],ref:Jt(a.setNodeRef),className:l})}function UFe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=Ge(r),a=EDe(K3(q2,{activationConstraint:{distance:5}}),K3(B2,{})),s=se(()=>{}),l=s[1],u=s[0],d=h=>t!==void 0&&u!==void 0?t(u,h.value):!0,f=h=>{l(v=>{});let p=h.over;if(r===void 0||p==null)return;let m=i.find(v=>v.cards.some(_=>_.key===h.active.id));if(de(t,!0,v=>v(h.active.id,p.id))&&de(m,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return b(l9,{sensors:Jt(a),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:b("div",{children:i.map(h=>b(zFe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:$Fe})})}let BFe=UFe;function pt(e){return"var("+e+")"}let jFe=S([z("flex"),pe("column"),c("gap",pt(F.sm))]),qFe=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",pt(F.sm))]),nD=S([z("inlineFlex"),Z("center"),c("gap",pt(F.xs))]),gf=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",pt(X.sm)),c("padding","2px var("+F.sm+")"),c("color",pt(y.textSecondary)),c("font-size",pt(T.sizeSm)),xe("pointer"),Je([c("background",pt(y.surfaceSubtle)),c("color",pt(y.textPrimary))])]),VFe=Ir([gf,S([c("background",pt(y.surfaceSubtle)),c("color",pt(y.textPrimary)),c("font-weight",pt(T.weightMedium))])]),KFe=S([c("font-size",pt(T.sizeMd)),c("font-weight",pt(T.weightMedium)),c("color",pt(y.textPrimary))]),HFe=S([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px")]),WFe=S([c("font-size",pt(T.sizeXs)),c("color",pt(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("padding","2px var("+F.xs+")")]),GFe=S([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px"),c("background",pt(y.borderSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",pt(X.md)),c("overflow","hidden")]),p9=S([z("flex"),pe("column"),c("gap","2px"),c("min-height","96px"),c("padding","4px"),c("background",pt(y.surface))]),JFe=Ir([p9,S([c("opacity","0.55")])]),m9=S([c("font-size",pt(T.sizeXs)),c("color",pt(y.textSecondary))]),QFe=Ir([m9,S([c("color",pt(y.brand)),c("font-weight",pt(T.weightMedium))])]);function YFe(e){return S([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",pt(X.sm)),c("background",pt(y.surfaceSubtle)),c("color",pt(y.textPrimary)),c("font-size",pt(T.sizeXs)),c("padding","1px var("+F.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),xe("pointer"),Je([c("background",pt(y.surfaceElevated))])])}let XFe=S([c("background","none"),c("border","none"),c("padding","0"),c("text-align","left"),c("font-size",pt(T.sizeXs)),c("color",pt(y.brand)),xe("pointer"),Je([c("text-decoration","underline")])]);function ZFe(e){return S([z("grid"),c("grid-template-columns","repeat("+e.toString()+", 1fr)"),c("gap","1px"),c("background",pt(y.borderSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",pt(X.md)),c("overflow","hidden")])}let eIe=S([z("flex"),pe("column"),c("gap","2px"),c("min-height","200px"),c("padding","4px"),c("background",pt(y.surface))]),tIe=S([c("font-size",pt(T.sizeXs)),c("color",pt(y.textSecondary)),c("padding-bottom","2px"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),rIe=S([z("flex"),_i("wrap"),Z("center"),c("gap",pt(F.md)),c("font-size",pt(T.sizeXs)),c("color",pt(y.textSecondary))]);function nIe(e){return S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e),c("margin-right","4px")])}let iIe=S([c("font-size",pt(T.sizeXs)),c("color",pt(y.textDisabled))]),oIe="var("+y.brand+")";function aIe(e){return D(e.end_,e.start)}function iD(e,t){return e.filter(r=>WI(r.start,aIe(r),t)).toSorted((r,n)=>r.start-n.start)}function sIe(e,t){return JI(e.start)||!HI(e.start,t)?e.title:GI(e.start)+" "+e.title}function lIe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],a=se(()=>"Month"),s=a[1],l=a[0],u=se(()=>Jn(D(t,Date.now()))),d=u[1],f=u[0],h=Jn(Date.now()),p=E=>d(C=>{switch(l){case"Month":return VI(C,E);case"Week":return ao(C,E*7|0);case"Day":return ao(C,E)}}),m=(E,C)=>b("button",{children:sIe(E,C),className:YFe(D(E.accent,oIe)),title:E.title,onClick:k=>E.onOpen()},E.key),g=()=>{let E=PW(f);return L(Gr,{children:[b("div",{children:nS.map(C=>b("div",{children:C,className:WFe},C)),className:HFe}),b("div",{children:E.map(C=>{let k=iD(i,C),A=k.slice(0,3),$=k.length-A.length|0;return L("div",{children:[b("span",{children:YI(C).toString(),className:C===h?QFe:m9}),A.map(N=>m(N,C)),$>0?b("button",{children:"+"+$.toString()+" more",className:XFe,onClick:N=>{d(M=>C),s(M=>"Day")}}):null],className:OW(C,f)?p9:JFe},C.toString())}),className:GFe})]})},v=E=>b("div",{children:E.map(C=>L("div",{children:[b("div",{children:as(C),className:tIe}),iD(i,C).map(k=>m(k,C))],className:eIe},C.toString())),className:ZFe(E.length)}),_;switch(l){case"Month":_=g();break;case"Week":_=v(il(7,E=>ao(Rg(f),E)));break;case"Day":_=v([Jn(f)]);break}let x;switch(l){case"Month":case"Week":x=eo(f);break;case"Day":x=as(f)+" — "+eo(f);break}let w=(E,C)=>b("button",{children:C,className:l===E?VFe:gf,onClick:k=>s(A=>E)});return L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:gf,onClick:E=>p(-1)}),b("button",{children:"Today",className:gf,onClick:E=>d(C=>h)}),b("button",{children:"›",className:gf,onClick:E=>p(1)}),b("span",{children:x,className:KFe})],className:nD}),L("div",{children:[w("Month","Month"),w("Week","Week"),w("Day","Day")],className:nD})],className:qFe}),o.length!==0?b("div",{children:o.map(E=>L("span",{children:[b("span",{className:nIe(E.accent)}),E.label]},E.label)),className:rIe}):null,_,r!==void 0?b("span",{children:r,className:iIe}):null],className:jFe})}let uIe=lIe;function dn(e){return"var("+e+")"}let cIe=S([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),c("gap",dn(F.md))]),dIe=S([z("flex"),pe("column"),Z("stretch"),c("gap",dn(F.sm)),c("padding",dn(F.md)),c("background",dn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",dn(X.md)),c("text-align","left"),xe("pointer"),Je([c("border-color",dn(y.brand)),c("background",dn(y.surfaceSubtle))])]),fIe=S([c("width","100%"),c("height","96px"),c("object-fit","cover"),c("border-radius",dn(X.sm))]),hIe=S([c("width","100%"),c("height","96px")]),pIe=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",dn(F.sm))]),mIe=S([c("font-size",dn(T.sizeMd)),c("font-weight",dn(T.weightMedium)),c("color",dn(y.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),gIe=S([z("flex"),Z("baseline"),c("gap",dn(F.sm)),c("font-size",dn(T.sizeSm))]),vIe=S([c("color",dn(y.textSecondary)),c("white-space","nowrap"),vi(0)]),_Ie=S([c("color",dn(y.textPrimary)),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis")]),bIe=S([c("color",dn(y.textDisabled)),c("font-size",dn(T.sizeSm))]);function yIe(e){let t=e.cards;if(t.length===0)return b("span",{children:"(empty)",className:bIe});let r=e.onCardClick;return b("div",{children:t.map(n=>{let i=n.media,o;return o=i!==void 0?typeof i!="object"?b("span",{children:b(mx,{size:"Fill"}),className:hIe}):b("img",{className:fIe,alt:n.title,src:i._0}):null,L("button",{children:[o,L("div",{children:[b("span",{children:n.title,className:mIe,title:n.title}),D(n.badge,null)],className:pIe}),n.fields.map(a=>L("div",{children:[b("span",{children:a.label,className:vIe}),b("span",{children:a.value,className:_Ie})],className:gIe},a.label))],className:dIe,onClick:a=>ae(r,s=>s(n.key))},n.key)}),className:cIe})}let xIe=yIe;function SIe(e,t){let r=e.indexOf(t);return e.map((n,i)=>{let o=r<0?"Upcoming":i<r?"Done":i===r?"Current":"Upcoming";return[n,o]})}function EIe(e,t,r){return SIe(Wo(e,t),r).map(n=>{let i=n[0];return{key:i,label:yt(i),state:n[1]}})}function vo(e){return"var("+e+")"}let wIe=S([z("flex"),Z("flexStart"),c("gap","0"),c("width","100%")]),kIe=S([z("flex"),pe("column"),Z("center"),c("gap","4px"),c("flex","0 0 auto")]);function CIe(e){return S([c("flex","1 1 auto"),c("height","2px"),c("margin","0 6px"),c("margin-top","11px"),c("min-width","16px"),c("background",vo(e?y.brand:y.borderSubtle))])}let V2=[z("inlineFlex"),Z("center"),Ze("center"),c("width","24px"),c("height","24px"),c("border-radius","50%"),c("font-size",vo(T.sizeXs)),c("font-weight",vo(T.weightMedium)),c("box-sizing","border-box")],RIe=S(V2.concat([c("background",vo(y.brand)),c("color","#fff")])),AIe=S(V2.concat([c("background",vo(y.surface)),c("color",vo(y.brand)),c("border","2px solid var("+y.brand+")")])),$Ie=S(V2.concat([c("background",vo(y.surface)),c("color",vo(y.textDisabled)),c("border","1px solid var("+y.border+")")])),g9=[c("font-size",vo(T.sizeXs)),c("text-align","center"),c("max-width","96px")],TIe=S(g9.concat([c("color",vo(y.textPrimary))])),NIe=S(g9.concat([c("color",vo(y.textDisabled))])),DIe=S([c("display","none")]);function FIe(e){switch(e){case"Done":return RIe;case"Current":return AIe;case"Upcoming":return $Ie}}function IIe(e){switch(e){case"Done":case"Current":return TIe;case"Upcoming":return NIe}}function PIe(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function OIe(e){let t=e.compact,r=t!==void 0?t:!1;return b("div",{children:e.steps.map((n,i)=>{let o=i===0?null:b("div",{className:CIe(n.state==="Done"||n.state==="Current")},n.key+":c"),a=r?DIe:IIe(n.state);return L(Ox,{children:[o,L("div",{children:[b("span",{children:PIe(n.state,i),className:FIe(n.state)}),b("span",{children:n.label,className:a})],className:kIe,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:wIe,role:"list"})}let v9=OIe;function _9(e){switch(e.toLowerCase().replaceAll("_","").replaceAll("-","")){case"accepted":case"approve":case"approved":case"confirmed":case"granted":case"signed":return"Approved";case"awaiting":case"escalated":case"inreview":case"pending":case"submitted":case"underreview":return"Pending";case"na":case"notrequired":case"skipped":case"waived":return"Skipped";case"declined":case"denied":case"refused":case"reject":case"rejected":case"withdrawn":return"Rejected";default:return{TAG:"Other",_0:e}}}function MIe(e){if(typeof e=="object")return yt(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function LIe(e){if(typeof e=="object")return"Neutral";switch(e){case"Approved":return"Success";case"Rejected":return"Error";case"Pending":return"Info";case"Skipped":return"Neutral"}}function zIe(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function UIe(e){if(typeof e=="object")return"var("+y.border+")";switch(e){case"Approved":return"var("+y.success+")";case"Rejected":return"var("+y.error+")";case"Pending":return"var("+y.info+")";case"Skipped":return"var("+y.border+")"}}function yn(e){return"var("+e+")"}let BIe=S([z("flex"),pe("column"),c("gap",yn(F.md)),c("font-family",yn(T.fontFamily))]),jIe=S([z("flex"),pe("column")]),qIe=S([z("flex"),Z("stretch"),c("gap",yn(F.sm))]),VIe=S([z("flex"),pe("column"),Z("center"),c("flex","0 0 22px")]);function KIe(e){return S([z("inlineFlex"),Z("center"),Ze("center"),c("width","20px"),c("height","20px"),c("border-radius","50%"),c("box-sizing","border-box"),c("border","2px solid "+e),c("color",e),c("background",yn(y.surface)),c("font-size","11px"),c("line-height","1"),c("flex","0 0 auto")])}let HIe=S([c("flex","1 1 auto"),c("width","1px"),c("min-height","12px"),c("background",yn(y.borderSubtle))]),oD=S([z("flex"),pe("column"),c("gap","2px"),c("flex","1 1 auto"),c("min-width","0"),c("padding-bottom",yn(F.sm))]),WIe=S([xe("pointer"),Je([c("background",yn(y.surfaceSubtle))]),c("border-radius",yn(X.sm)),c("padding-left","4px"),c("margin-left","-4px")]),GIe=S([z("flex"),Z("center"),_i("wrap"),c("gap",yn(F.xs))]),JIe=S([c("font-size",yn(T.sizeSm)),c("font-weight",yn(T.weightMedium)),c("color",yn(y.textPrimary))]),QIe=S([z("flex"),Z("center"),c("gap","6px"),c("font-size",yn(T.sizeXs)),c("color",yn(y.textSecondary))]),YIe=S([c("font-size",yn(T.sizeSm)),c("color",yn(y.textSecondary)),c("white-space","pre-wrap")]),XIe=S([c("font-size",yn(T.sizeXs)),c("color",yn(y.textDisabled))]);function ZIe(e){let t=e.entries;if(t.length===0)return b(ad,{title:"No approvals",description:"Nothing in this window carries a decision."});let r=e.windowNote,n=e.nowMs,i=e.steps,o=t.length-1|0;return L("div",{children:[i!==void 0&&i.length>1?b(v9,{steps:i}):null,b("div",{children:t.map((a,s)=>{let l=Ge(a.onOpen),u=a.actor,d=a.at,f,h=0;u!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[u!==void 0?L(Gr,{children:[b(sd,{name:u,src:a.actorImageUrl,size:"Small"}),b("span",{children:u})]}):null,d!==void 0?b("span",{children:av(D(n,Date.now()),d),title:D(Hf(d),d)}):null],className:QIe}));let p=a.note;return L("div",{children:[L("div",{children:[b("span",{children:zIe(a.decision),className:KIe(UIe(a.decision))}),s===o?null:b("div",{className:HIe})],className:VIe}),L("div",{children:[L("div",{children:[b("span",{children:a.step,className:JIe}),b(ns,{variant:LIe(a.decision),label:MIe(a.decision)})],className:GIe}),f,p!==void 0&&p!==""?b("div",{children:p,className:YIe}):null],className:l?oD+" "+WIe:oD,onClick:m=>ae(a.onOpen,g=>g())})],className:qIe},a.key)}),className:jIe}),r!==void 0?b("span",{children:r,className:XIe}):null],className:BIe})}let ePe=ZIe;function zo(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let tPe=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],rPe=["decision","outcome","verdict","approval","approvalstatus","result"],nPe=["step","stage","level","tier","approvalstep","approvallevel","phase"],iPe=["note","notes","comment","comments","reason","remarks","justification","rationale"];function oPe(e){let t=Eu(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function aPe(e){return e.filter(t=>tPe.includes(zo(t))).length>=2}function b9(e){return ie($r(e),t=>{let r=t[1],n=t[0];if(Lh(r))return Q(oPe(r),i=>[n,i])})}function sPe(e){let t=b9(e),r=t.find(n=>rPe.includes(zo(n[0])));return r!==void 0?r:t.find(n=>aPe(n[1]))}function lPe(e,t){let r=$r(e).map(n=>n[0]).find(n=>de(O(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:$r(e).map(n=>n[0]).find(n=>de(Jc(n),!1,RI))}function y9(e,t){let r=D(t,Nn(e,void 0,void 0)),n=sPe(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],a=b9(e).find(s=>{let l=s[0];return l!==o?nPe.includes(zo(l)):!1});return{decisionField:o,dateSpan:i,stepField:Q(a,s=>s[0]),stepValues:de(a,[],s=>s[1]),actorField:lPe(e,r),noteField:ie($r(e),s=>{let l=s[0];if(Lh(s[1])&&iPe.includes(zo(l)))return l})[0]}}function uPe(e){return Ge(y9(e,void 0))}function K2(e){return e.rows.map((t,r)=>{let n=D(Y(t),{});return{key:D(R(O(n,"id"),ue),"#"+r.toString()),json:t,dict:n}})}function zl(e,t){return R(O(e,t),ue)}function aD(e,t){return R(wu(t,e),Dn)}function sD(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>zo(n)===zo(t));return r!==-1?r:e.length}function cPe(e,t,r){let n=r!==void 0?r:f=>f,a=K2(e).map(f=>{let h=R(t.stepField,m=>zl(f.dict,m)),p=zl(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?a.sort((f,h)=>sD(t.stepValues,f[1])-sD(t.stepValues,h[1])|0):a.sort((f,h)=>{let p=aD(f[0].dict,t.dateSpan),m=aD(h[0].dict,t.dateSpan);return p!==void 0?m!==void 0?p-m:-1:m!==void 0?1:0});let l=a.map(f=>{let h=f[0];return{key:h.key,step:D(Q(f[1],yt),D(R(e.semantics.labelField,p=>zl(h.dict,p)),"Decision")),decision:de(f[2],"Pending",_9),actor:Q(R(t.actorField,p=>zl(h.dict,p)),n),at:wu(t.dateSpan,h.dict),note:R(t.noteField,p=>zl(h.dict,p)),onOpen:()=>e.onOpenRow(h.key,h.json)}}),u=ie(a,f=>Q(f[1],zo)),d=t.stepValues.filter(f=>!u.includes(zo(f))).map(f=>({key:"pending:"+f,step:yt(f),decision:"Pending"}));return l.concat(d)}function dPe(e,t){let r=t.stepField;if(r===void 0)return[];let n=K2(e),i=ie(n,a=>{let s=zl(a.dict,r),l=zl(a.dict,t.decisionField);if(s===void 0||l===void 0)return;let u=_9(l);if(!(typeof u!="object"&&u==="Pending"))return zo(s)}),o=t.stepValues.find(a=>!i.includes(zo(a)));return t.stepValues.map(a=>({key:a,label:yt(a),state:i.includes(zo(a))?"Done":ze(o,a)?"Current":"Upcoming"}))}function ks(e){return e.rows.map((t,r)=>{let n=D(Y(t),{});return{key:D(R(O(n,"id"),ue),"#"+r.toString()),json:t,dict:n}})}function bu(e,t){return R(O(e,t),ue)}function qu(e,t){return D(R(e.semantics.labelField,r=>bu(t.dict,r)),t.key)}function fPe(e,t){return Q(e.semantics.imageField,r=>{let n=R(bu(t.dict,r),i=>{if(i!=="")return i});return n!==void 0?{TAG:"Picture",_0:tu(n)}:"EmptySlot"})}function x9(e,t,r){ae(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function S9(e,t,r){return b("span",{children:ep(e,t,r!==void 0?r:"item"),style:{color:"var("+y.textDisabled+")",fontSize:"var("+T.sizeXs+")"}})}function Bv(e,t,r,n){return L("div",{children:[e,S9(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+F.sm+")"}})}function hPe(e){let t=e.source,r=Ra(),n=hg(),i=ks(t),o=Do(t.schema,"List"),a=Zh(i.map(p=>p.dict),o,r),u={lookupLabel:(p,m)=>Xh(a,p,r,m),isMissing:(p,m)=>ev(a,p,r,m)},d=ie([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField,"id"],p=>p),f=o.filter(p=>!d.includes(p.key)).slice(0,4),h=i.map(p=>{let m=Q(R(t.semantics.statusField,v=>Xo(p.dict,v)),v=>b(ns,{variant:"Neutral",label:yt(v),dot:!1})),g=fPe(t,p);return{key:p.key,title:qu(t,p),media:g,badge:m,fields:f.map(v=>({label:v.label,value:Gl(v.key,v.kind,v.propSchema,O(p.dict,v.key),v.ann,r,n,u,void 0)}))}});return Bv(b(xIe,{cards:h,onCardClick:p=>x9(t,i,p)}),[t],void 0,void 0)}function pPe(e){let t=ks(e),r=D(e.semantics.statusField,""),n=Wo(e.schema,r),i=s=>D(Xo(s.dict,r),""),o=s=>s.map(l=>({value:l,label:l===""?"(no status)":yt(l),cards:t.filter(u=>i(u)===l).map(u=>{let d=ie(kg(e.schema),f=>{if(f!==r)return bu(u.dict,f)})[0];return{key:u.key,title:qu(e,u),meta:d}})})),a=ot(t.map(i).filter(s=>!n.includes(s)),[],(s,l)=>s.includes(l)?s:s.concat([l]));return o(n).concat(o(a))}function mPe(e){let t=e.source,r=ks(t),n=D(t.semantics.statusField,""),i=pPe(t),o=f=>D(R(r.find(h=>h.key===f),h=>Xo(h.dict,n)),""),a=(f,h)=>R(t.statusCommandFor,p=>p(o(f),h)),s=t.onCommand,l=s!==void 0&&Ge(t.statusCommandFor)?(f,h)=>ae(a(f,h),p=>s(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>Ge(a(f,h)):void 0;return Bv(b(BFe,{columns:i,onCardClick:f=>x9(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let td=["var("+y.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function H2(e,t){return D(e.accent,td[Bo(t,td.length)])}function gPe(e){return e.map((t,r)=>{let n=H2(t,r),i=t.semantics.dateSpan;return i!==void 0?ie(ks(t),o=>Q(R(wu(i,o.dict),Dn),a=>{let s=R(Zx(i,o.dict),Dn);return{key:r.toString()+":"+o.key,title:qu(t,o),start:a,end_:s,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function vPe(e){let t=e.sources,r=gPe(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:H2(i,o)})):[];return b(uIe,{events:r,legend:n,windowNote:ep(t,void 0,void 0)})}function _Pe(e){return e.map((r,n)=>{let i=r.semantics.dateSpan,o=H2(r,n);return ks(r).map(a=>{let s=R(i,f=>wu(f,a.dict)),l=R(s,Dn),u=s!==void 0?D(Hf(s),s):"",d=Q(R(r.semantics.statusField,f=>Xo(a.dict,f)),yt);return{entry:{id:n.toString()+":"+a.key,timestamp:u,label:qu(r,a),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(a.key,a.json)}})}).flat().toSorted((r,n)=>{let i=r.sort,o=n.sort;return i!==void 0?o!==void 0?o-i:-1:o!==void 0?1:0})}function bPe(e){let t=e.sources,r=_Pe(t),n=i=>ae(r.find(o=>o.entry.id===i),o=>o.open_());return Bv(b(u3e,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function E9(e,t){let r=O(e,t);if(r===void 0)return[];let n=ue(r);return n!==void 0?[n]:ie(D(_r(r),[]),ue)}function yPe(e,t){let r=t.map(n=>n.key);return ie($r(e.schema),n=>{let i=n[0];return Q(Jc(i),o=>i)}).filter(n=>t.some(i=>E9(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function xPe(e){let t=ks(e),r=yPe(e,t),n=Fh(e.semantics.dateSpan,kI);return n!==void 0?ie(t,i=>Q(R(wu(n,i.dict),Dn),o=>{let a=D(R(Zx(n,i.dict),Dn),o);return{key:i.key,title:qu(e,i),start:o,end_:a<o?o:a,accent:e.accent,dependsOn:r.map(s=>E9(i.dict,s)).flat(),onOpen:()=>e.onOpenRow(i.key,i.json)}})):[]}function SPe(e){let t=e.source,r=xPe(t),n=t.rows.length,i=r.length,o=ep([t],i,void 0),a=i===n?o:o+" (the rest carry no start date)";return b(j3e,{tasks:r,windowNote:a})}function EPe(e,t){let r=e.semantics.labelField,n=R(e.semantics.statusField,i=>bu(t.dict,i));return n!==void 0?n:R(kg(e.schema).find(i=>qf(i,r)?qf(i,e.semantics.parentField):!1),i=>bu(t.dict,i))}function wPe(e){let t=ks(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:qu(e,n),subtitle:EPe(e,n),parent:R(r,i=>bu(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function kPe(e){let t=e.source,r=wPe(t);return b(ZNe,{nodes:r,windowNote:ep([t],void 0,void 0)})}function CPe(e){let t=e.source,r=Ra(),n=K2(t),i=Do(t.schema,"List"),o=Zh(n.map(d=>d.dict),i,r),a=y9(t.schema,t.semantics);if(a===void 0)return null;let l=cPe(t,a,d=>{let f=R(a.actorField,Jc);return f!==void 0?D(Xh(o,f,r,d),d):d}),u=dPe(t,a);return b(ePe,{entries:l,steps:u,windowNote:ep([t],void 0,"decision")})}function RPe(e){return ie($r(e),t=>{let r=Eu(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function w9(e){let t=RPe(e),r=Nn(e,void 0,void 0).statusField,n=r!==void 0&&t.some(a=>a[0]===r)?t.filter(a=>a[0]===r).concat(t.filter(a=>a[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function APe(e){return Q(w9(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],a=o[1],s=o[0],l=ks(e),u=(_,x)=>D(Xo(_.dict,x),""),d=(_,x)=>ot(l.map(w=>u(w,_)).filter(w=>!x.includes(w)),[],(w,E)=>w.includes(E)?w:w.concat([E])),f=a.concat(d(s,a)),h=n.concat(d(i,n)),p=f.map(_=>h.map(x=>ot(l,0,(w,E)=>u(E,s)===_&&u(E,i)===x?w+1|0:w))),m=p.map(_=>ot(_,0,(x,w)=>x+w|0)),g=h.map((_,x)=>ot(p,0,(w,E)=>w+E[x]|0)),v=ot(m,0,(_,x)=>_+x|0);return{rowField:s,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:m,colTotals:g,grandTotal:v}})}function $Pe(e,t){return fI(e.toString(),xK(t))}function TPe(e){let t=e.source,r=se(()=>"Numbers"),n=r[1],i=r[0],o=APe(t);if(o===void 0)return null;let a=g=>g===""?"(none)":yt(g),s=yt(o.rowField),l=yt(o.colField),u=o.rowValues.map(g=>[g,a(g)]),d=o.colValues.map(g=>[g,a(g)]),f=ot(o.counts,0,(g,v)=>ot(v,g,(_,x)=>x>_?x:_)),h=g=>$Pe(g,pE([t])),p=(g,v)=>b("button",{children:v,style:{background:"none",backgroundColor:i===g?"var("+y.surfaceSubtle+")":"transparent",border:"1px solid var("+y.border+")",color:i===g?"var("+y.textPrimary+")":"var("+y.textSecondary+")",cursor:"pointer",fontSize:"var("+T.sizeSm+")",padding:"2px var("+F.sm+")",borderRadius:"var("+X.sm+")"},type:"button",onClick:_=>n(x=>g)}),m;return m=i==="Numbers"?b(Y3e,{rowDimLabel:s,colDimLabel:l,rowHeaders:u.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):b(NNe,{rowDimLabel:s,colDimLabel:l,rowHeaders:u.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({value:v,display:v.toString()}))),maxLabel:f.toString()}),L("div",{children:[L("div",{children:[p("Numbers","Numbers"),p("Heat","Heat")],style:{display:"inline-flex",alignSelf:"flex-end",gap:"var("+F.xs+")"}}),m,S9([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+F.sm+")"}})}function NPe(e){return e.map((t,r)=>{let n=t.semantics.imageField;return ks(t).map(i=>{let o=R(R(n,u=>bu(i.dict,u)),u=>{if(u!=="")return tu(u)}),a=Q(R(t.semantics.statusField,u=>Xo(i.dict,u)),yt),s=t.fillSlot,l=o!==void 0||s===void 0||n===void 0?void 0:s(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:qu(t,i),caption:a,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function DPe(e){let t=e.sources,r=NPe(t),n=i=>ae(r.find(o=>o.item.key===i),o=>o.open_());return Bv(b(uDe,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function Cs(e){return b("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function Od(e,t){let r=e[0];return r!==void 0?t(r):null}Yo({id:"cards",label:"Cards",icon:Cs("▤"),arity:"Single",isCapable:(e,t)=>!0,render:e=>Od(e,t=>b(hPe,{source:t})),capability:"always — richer with label/image semantics and summary fields"});Yo({id:"board",label:"Board",icon:Cs("▥"),arity:"Single",isCapable:(e,t)=>de(t.statusField,!1,r=>Wo(e,r).length!==0),render:e=>Od(e,t=>b(mPe,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});Yo({id:"calendar",label:"Calendar",icon:Cs("▣"),arity:{TAG:"Multi",min:1},isCapable:(e,t)=>Ge(t.dateSpan),render:e=>b(vPe,{sources:e}),capability:"dateSpan — a `date-range` field, a start*/end* date-time pair, or a lone non-infrastructure date field"});Yo({id:"timeline",label:"Timeline",icon:Cs("▚"),arity:{TAG:"Multi",min:2},isCapable:(e,t)=>Ge(t.dateSpan),render:e=>b(bPe,{sources:e}),capability:"dateSpan — a date field to place rows on a most-recent-first chronological stream; several sources merge into one stream, accent-coded per source"});Yo({id:"gantt",label:"Gantt",icon:Cs("▬"),arity:"Single",isCapable:(e,t)=>de(t.dateSpan,!1,kI),render:e=>Od(e,t=>b(SPe,{source:t})),capability:"dateSpan stating an end — a `date-range` field or a start*/end* date-time pair; dependency connectors come from entity-ref fields whose ids point at other loaded rows"});Yo({id:"hierarchy",label:"Hierarchy",icon:Cs("⑂"),arity:"Single",isCapable:(e,t)=>Ge(t.parentField),render:e=>Od(e,t=>b(kPe,{source:t})),capability:"parentField — a parent*/manager/reportsTo/supervisor string field (or one annotated `parent-ref`) whose values point at other rows of the same collection"});Yo({id:"approvals",label:"Approvals",icon:Cs("✓"),arity:"Single",isCapable:(e,t)=>uPe(e),render:e=>Od(e,t=>b(CPe,{source:t})),capability:"a decision enum — a small string enum named decision/outcome/verdict/approval/result, or any small enum declaring two or more approval values (approved/rejected/pending/…) — plus a date field to sequence the chain"});Yo({id:"pivot",label:"Pivot",icon:Cs("⊞"),arity:"Single",isCapable:(e,t)=>Ge(w9(e)),render:e=>Od(e,t=>b(TPe,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});Yo({id:"gallery",label:"Gallery",icon:Cs("▨"),arity:"Single",isCapable:(e,t)=>Ge(t.imageField),render:e=>b(DPe,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function lD(e,t){return e===t?0:e<t?-1:1}function FPe(e){return typeof e!="object"?e==="KBoolean"?[["true","Yes"],["false","No"]]:void 0:e.TAG==="KEnum"?e._0.map(t=>[t,t]):void 0}function vf(e,t){if(t===void 0)return"";let r=it(t),n=0;if(typeof r!="object"){if(r==="JSONNull")return"";n=2}else switch(r.TAG){case"JSONString":return r._0;case"JSONNumber":return r._0.toString();case"JSONObject":return JSON.stringify(t);default:n=2}if(n===2&&typeof e!="object")switch(e){case"KBoolean":return typeof r!="object"?r==="JSONFalse"?"No":"Yes":JSON.stringify(t);case"KArrayOfStrings":if(typeof r=="object")return ie(r._0,ue).join(", ");break}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function IPe(e,t,r){let n=a=>a!==void 0?it(a)==="JSONNull":!0,i=n(t),o=n(r);if(i)return o?0:1;if(o)return-1;if(typeof e!="object")switch(e){case"KBoolean":let a=u=>{if(u===void 0)return 0;let d=it(u);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return a(t)-a(r);case"KDate":return lD(vf(e,t),vf(e,r));case"KNumber":let s=D(R(t,Bi),0),l=D(R(r,Bi),0);return s-l}return lD(vf(e,t),vf(e,r))}function PPe(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?de(R(t,ue),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=Q(t,it);if(n===void 0||typeof n=="object")return!1;switch(n){case"JSONFalse":return r==="false";case"JSONTrue":return r==="true";default:return!1}}function OPe(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>vf(i.kind,O(e,i.key)).toLowerCase().includes(n))}function MPe(e,t,r){let n=Qe(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let a=o[0],s=t.find(l=>l.key===a);return s!==void 0?PPe(s.kind,O(i,a),o[1]):!0}))}function LPe(e,t,r){return r===""?e:e.filter(n=>OPe(n,t,r))}function zPe(e,t,r,n){if(r===void 0)return e;let i=t.find(a=>a.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((a,s)=>IPe(i.kind,O(a,r),O(s,r))*o)}function UPe(e,t){return ie(e,r=>{if(!Iie(r.kind))return;let n=FPe(r.kind);if(n===void 0)return;let i=n.map(o=>({label:o[1],value:o[0]}));return{key:r.key,label:r.label,options:i,value:D(O(t,r.key),"")}})}function To(e){return"var("+e+")"}let BPe=S([qt("relative"),z("inlineFlex"),Z("center")]),jPe=S([c("background",To(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",To(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("padding-left","32px"),c("font-size",To(T.sizeMd)),c("color",To(y.textPrimary)),c("outline","none"),c("width","240px"),ms([c("border-color",To(y.brand))]),KV([c("color",To(y.textDisabled))])]),qPe=S([qt("absolute"),od(Ce(10)),c("color",To(y.textDisabled)),c("font-size",To(T.sizeSm)),c("pointer-events","none")]),VPe=S([qt("absolute"),bl(Ce(8)),c("background","none"),c("border","none"),c("cursor","pointer"),c("color",To(y.textDisabled)),c("font-size",To(T.sizeSm)),c("padding","0"),c("line-height","1"),Je([c("color",To(y.textSecondary))])]);function KPe(e){let t=e.placeholder,r=e.onChange,n=e.value,i=t!==void 0?t:"Search...";return L("div",{children:[b("span",{children:"/",className:qPe}),b("input",{className:jPe,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?b("button",{children:"x",className:VPe,onClick:o=>r("")}):null],className:BPe})}let k9=KPe;function Us(e){return"var("+e+")"}let HPe=S([z("flex"),Z("center"),c("gap",Us(F.sm)),_i("wrap")]),WPe=S([z("flex"),Z("center"),c("gap","4px")]),GPe=S([c("color",Us(y.textSecondary)),c("font-size",Us(T.sizeSm)),c("white-space","nowrap")]),JPe=S([c("background",Us(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Us(X.sm)),c("padding","2px var("+F.sm+")"),c("font-size",Us(T.sizeSm)),c("color",Us(y.textPrimary)),c("cursor","pointer"),c("outline","none"),ms([c("border-color",Us(y.brand))])]);function QPe(e){let t=e.onChange,r=e.filter;return L("div",{children:[b("span",{children:r.label+":",className:GPe}),L("select",{children:[b("option",{children:"All",value:""}),r.options.map(n=>b("option",{children:n.label,value:n.value},n.value))],className:JPe,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:WPe})}function YPe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?b(k9,{value:r,onChange:t}):null,e.filters.map(i=>b(QPe,{filter:i,onChange:n},i.key))],className:HPe})}let C9=YPe;function fa(e){return"var("+e+")"}function R9(e){switch(e){case"Success":return y.success;case"Warning":return y.warning;case"Error":return y.error;case"Info":return y.info}}function XPe(e){return S([z("flex"),Z("flexStart"),c("gap",fa(F.sm)),c("padding","var("+F.sm+") var("+F.md+")"),c("border-radius",fa(X.md)),c("border-left","3px solid var("+R9(e)+")"),c("background",fa(y.surfaceElevated)),c("font-size",fa(T.sizeMd)),c("line-height",fa(T.lineHeightNormal))])}function ZPe(e){return S([c("color",fa(R9(e))),c("font-size","16px"),vi(0),Ca(Ce(1))])}let eOe=S([_o(1)]),tOe=S([c("font-weight",fa(T.weightMedium)),c("color",fa(y.textPrimary)),Eg(Ce(2))]),rOe=S([c("color",fa(y.textSecondary))]),nOe=S([c("background","none"),HV(Ce(0),"none",YV),xe("pointer"),c("color",fa(y.textSecondary)),c("font-size","16px"),c("line-height","1"),c("padding","0"),vi(0)]);function iOe(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function oOe(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[b("span",{children:iOe(r),className:ZPe(r)}),L("div",{children:[de(e.title,null,n=>b("div",{children:n,className:tOe})),b("div",{children:e.message,className:rOe})],className:eOe}),de(e.onDismiss,null,n=>b("button",{children:"×","aria-label":"Dismiss",className:nOe,onClick:i=>n()}))],className:XPe(r),role:"alert"})}let A9=oOe;function W2(){let e=se(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(s=>{});let a=o._0;t(s=>a)};return{element:r!==void 0?b(A9,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function uD(e){try{return decodeURIComponent(e)}catch{return e}}function aOe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function cD(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[uD(r),uD(n)]}function Ii(e){return"var("+e+")"}let sOe=S([z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",Ii(F.md)),_o(1),c("min-height","160px"),hs("center"),c("padding",Ii(F.lg))]),lOe=S([c("font-size","32px"),c("color",Ii(y.error)),c("line-height","1")]),uOe=S([c("color",Ii(y.textPrimary)),c("font-size",Ii(T.sizeLg)),c("font-weight",Ii(T.weightMedium)),Sn(Ce(0))]),cOe=S([c("color",Ii(y.textSecondary)),c("font-size",Ii(T.sizeSm)),c("line-height",Ii(T.lineHeightNormal)),Sn(Ce(0))]),dOe=S([c("background",Ii(y.brand)),c("color",Ii(y.textOnBrand)),c("border","none"),c("border-radius",Ii(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",Ii(T.sizeSm)),c("cursor","pointer"),Ca(Ce(4))]);function fOe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[b("div",{children:"X",className:lOe}),b("h3",{children:r,className:uOe}),de(e.detail,null,n=>b("p",{children:n,className:cOe})),de(e.onRetry,null,n=>b("button",{children:"Try again",className:dOe,onClick:i=>n()}))],className:sOe})}let Bs=fOe,hOe=ut([["ProductsNotAvailable",{template:"These products aren't available yet: {{missing}}.",idFields:[{field:"missing",entityStem:"product"}]}],["OrderAlreadyPlaced",{template:"This order has already been placed.",idFields:[]}],["CategoryAlreadyArchived",{template:"This category is already archived.",idFields:[]}]]);function pOe(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function dD(e,t){return de(R(Y(e),r=>O(r,t)),[],r=>{let n=it(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return ie(n._0,ue).filter(o=>o!=="");default:return[]}})}function mOe(e){return R(e,t=>{try{return JSON.parse(t)}catch{return}})}function fD(e,t){return ot(Qe(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function gOe(e,t,r,n){let i=gs(t,r);if(i===void 0)return Promise.resolve(n);let o=i.queryField,a=i.labelField,s=a==="id"?"id":"id "+a,l="query($ids: [ID!]) { "+o+"(first: "+n.length.toString()+", filter: {ids: $ids}) { edges { node { "+s+" } } } }",u={};return u.ids=n.map(d=>d),Ut(e(l,u).then(d=>{let f=g4(d,o,a);return Promise.resolve(n.map(h=>{let p=O(f,h);return p!==void 0?p:h}))}),d=>Promise.resolve(n))}function mp(e,t,r,n){let i=pOe(r,n);if(r===void 0)return Promise.resolve(i);let o=O(hOe,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let a=mOe(n);if(a===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(u=>{let d=u.field,f=dD(a,d);return f.length===0?Promise.resolve([d,""]):gOe(e,t,u.entityStem,f).then(h=>Promise.resolve([d,h.join(", ")]))});return Promise.all(l).then(u=>{let d={};return u.forEach(f=>{d[f[0]]=f[1]}),Promise.resolve(fD(o.template,d))})}let s={};return o.idFields.forEach(l=>{let u=l.field,d=dD(a,u);s[u]=d.join(", ")}),Promise.resolve(fD(o.template,s))}let vOe="The request failed — the change was not sent.",hD="This command could not be sent. See the console for details.";function _Oe(e,t,r){let n={};return Qe(D(Y(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[D(e.aggregateIdField,"id")]=t,n}function G2(e,t,r,n,i,o,a,s){let l=o!==void 0?o:[],u=a!==void 0?a:h=>{},d=s!==void 0?s:h=>{},f=t.filter(h=>h.level==="Instance");return(h,p,m)=>{let g=f.find(v=>v.name===h);if(e!==void 0)if(g!==void 0){d(p),Ut(e(g.mutationDocument,_Oe(g,p,m)).then(v=>{let _=Cd(v);if(typeof _!="object")return _==="Accepted"?(n||i(),u("Cleared"),Promise.resolve()):(n||setTimeout(()=>i(),500),u("Cleared"),Promise.resolve());{let x=_._0;return console.warn("[AutoUI] "+r+": command "+h+" rejected"+de(x.errorCode,"",w=>" ("+w+")")),i(),mp(e,l,x.errorCode,x.detail).then(w=>(u({TAG:"Failed",_0:{command:g.label,reason:w}}),Promise.resolve()))}}),v=>(console.error("[AutoUI] "+r+": command "+h+" failed to reach the server"),u({TAG:"Failed",_0:{command:g.label,reason:vOe}}),i(),Promise.resolve()));return}else return console.error("[AutoUI] "+r+': command "'+h+'" is not an instance command of this view'),u({TAG:"Failed",_0:{command:h,reason:hD}});else return console.error("[AutoUI] "+r+': command "'+h+'" not sent — no GraphQL executor in context'),u({TAG:"Failed",_0:{command:h,reason:hD}})}}let bOe=500;function ro(e){return"var("+e+")"}let yOe=S([qt("relative"),z("inlineBlock")]),xOe=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",ro(X.sm)),c("cursor","pointer"),c("color",ro(y.textSecondary)),c("padding","2px var("+F.sm+")"),c("font-size",ro(T.sizeSm)),Je([c("background",ro(y.surfaceSubtle)),c("color",ro(y.textPrimary))])]),SOe=S([qt("absolute"),bl(Ce(0)),ps({NAME:"percent",VAL:100}),Ca(Ce(4)),c("background",ro(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",ro(X.md)),c("box-shadow",ro(_n.md)),c("min-width","160px"),c("z-index","200"),c("overflow","hidden"),qV(Ce(4),Ce(0))]);function EOe(e){return S([z("block"),Ho({NAME:"percent",VAL:100}),c("background","none"),c("border","none"),c("text-align","left"),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",ro(T.sizeMd)),c("color",ro(e?y.error:y.textPrimary)),xe("pointer"),Je([c("background",ro(y.surfaceSubtle))])])}let wOe=S([c("border","none"),c("border-top","1px solid var("+y.borderSubtle+")"),MV(Ce(4),Ce(0))]);function kOe(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=se(()=>!1),i=n[1],o=n[0];return Ae(()=>{if(!o)return;let a=s=>i(l=>!1);return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[o]),L("div",{children:[b("button",{children:r,className:xOe,onClick:a=>{a.stopPropagation(),i(s=>!s)}}),o?b("div",{children:e.items.map((a,s)=>{if(typeof a!="object")return b("hr",{className:wOe},s.toString());let l=a.onClick,u=a.label;return b("button",{children:u,className:EOe(a.danger),onClick:d=>{i(f=>!1),l()}},u)}),className:SOe,onClick:a=>{a.stopPropagation()}}):null],className:yOe})}let COe=kOe;function xx(e){return"var("+e+")"}let ROe=S([z("grid"),c("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),c("gap",xx(F.lg)),c("align-items","start"),sI("(max-width: 720px)",[c("grid-template-columns","minmax(0, 1fr)")])]),$9=S([c("min-width","0"),c("overflow","auto")]),AOe=Ir([$9,S([c("border-left","1px solid var("+y.border+")"),c("padding-left",xx(F.lg)),sI("(max-width: 720px)",[c("border-left","none"),c("padding-left","0"),c("border-top","1px solid var("+y.border+")"),c("padding-top",xx(F.lg))])])]);function $Oe(e){return L("div",{children:[b("div",{children:e.master,className:$9}),b("div",{children:e.detail,className:AOe})],className:ROe})}let TOe=$Oe;function Nh(e){return"var("+e+")"}let NOe=S([z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",Nh(F.md)),_o(1),c("min-height","160px"),c("color",Nh(y.textSecondary))]),DOe=S([c("width","32px"),c("height","32px"),c("border","3px solid var("+y.borderSubtle+")"),c("border-top-color",Nh(y.brand)),c("border-radius","50%"),c("animation","rv-spin 0.7s linear infinite")]),FOe=S([c("font-size",Nh(T.sizeSm)),c("color",Nh(y.textSecondary))]);XV("@keyframes rv-spin",[Cr("from",[c("transform","rotate(0deg)")]),Cr("to",[c("transform","rotate(360deg)")])]);function IOe(e){return L("div",{children:[b("div",{className:DOe}),de(e.label,null,t=>b("span",{children:t,className:FOe}))],className:NOe})}let zf=IOe;function POe(e,t){return D(R(O(e,t),ue),"")}function OOe(e,t,r){let n={},i=[];e.forEach(a=>{let s=POe(a,t),l=O(n,s);l!==void 0?l.push(a):(n[s]=[a],i.push(s))});let o=a=>{if(a==="")return r.length+1|0;let s=r.indexOf(a);return s!==-1?s:r.length};return i.toSorted((a,s)=>{let l=o(a),u=o(s);return l!==u?l-u|0:a<s?-1:a>s?1:0}).map(a=>[a,D(O(n,a),[])])}function $t(e){return"var("+e+")"}let T9="168px",MOe=S([z("flex"),pe("column"),c("gap",$t(F.sm))]),LOe=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",$t(F.sm))]),pD=S([z("inlineFlex"),Z("center"),c("gap",$t(F.xs))]),_f=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",$t(X.sm)),c("padding","2px var("+F.sm+")"),c("color",$t(y.textSecondary)),c("font-size",$t(T.sizeSm)),xe("pointer"),Je([c("background",$t(y.surfaceSubtle)),c("color",$t(y.textPrimary))])]),zOe=Ir([_f,S([c("background",$t(y.surfaceSubtle)),c("color",$t(y.textPrimary)),c("font-weight",$t(T.weightMedium))])]),UOe=S([c("font-size",$t(T.sizeMd)),c("font-weight",$t(T.weightMedium)),c("color",$t(y.textPrimary))]),BOe=S([c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",$t(X.md)),c("overflow","hidden")]),N9=S([z("flex"),Z("stretch")]),jOe=Ir([N9,S([c("background",$t(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")")])]),qOe=Ir([N9,S([c("border-top","1px solid var("+y.borderSubtle+")")])]),VOe=S([c("flex","0 0 "+T9),c("padding","4px var("+F.sm+")"),c("font-size",$t(T.sizeXs)),c("color",$t(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),D9=S([c("flex","0 0 "+T9),c("padding","6px var("+F.sm+")"),c("font-size",$t(T.sizeSm)),c("font-weight",$t(T.weightMedium)),c("color",$t(y.textPrimary)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),KOe=Ir([D9,S([c("color",$t(y.textDisabled)),c("font-style","italic")])]);function Sx(e){return S([z("grid"),c("flex","1 1 auto"),c("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let HOe=S([c("background",$t(y.surfaceSubtle))]),WOe=S([c("padding","4px var("+F.xs+")"),c("font-size",$t(T.sizeXs)),c("color",$t(y.textSecondary)),c("border-left","1px solid var("+y.borderSubtle+")")]),F9=S([z("flex"),pe("column"),c("gap","2px"),c("min-height","48px"),c("padding","3px"),c("border-left","1px solid var("+y.borderSubtle+")")]),GOe=Ir([F9,S([c("background",$t(y.surfaceSubtle))])]);function mD(e){return S([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",$t(X.sm)),c("background",$t(y.surfaceSubtle)),c("color",$t(y.textPrimary)),c("font-size",$t(T.sizeXs)),c("padding","1px var("+F.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),xe("pointer"),Je([c("background",$t(y.surfaceElevated))])])}let JOe=S([xe("grab")]),QOe=S([Ya(.85),c("z-index","10"),xe("grabbing")]),YOe=S([c("font-size",$t(T.sizeXs)),c("color",$t(y.textDisabled))]),gD="var("+y.brand+")";function XOe(e){return D(e.end_,e.start)}function ZOe(e,t){return e.filter(r=>WI(r.start,XOe(r),t)).toSorted((r,n)=>r.start-n.start)}function e6e(e,t){return JI(e.start)||!HI(e.start,t)?e.title:GI(e.start)+" "+e.title}function t6e(e){let t=e.draggable,r=e.event,n=u9({id:r.key,disabled:!t}),i=t?mD(D(r.accent,gD))+" "+JOe:mD(D(r.accent,gD)),o=n.isDragging?i+" "+QOe:i,a=Q(h9(n.transform),u=>({transform:u})),s=n.listeners,l=s==null?void 0:Jt(s);return b("button",{children:e6e(r,e.day),ref:Jt(n.setNodeRef),className:o,style:a,title:r.title,onKeyDown:u=>ae(l,d=>f9(d,u)),onClick:u=>r.onOpen(),onPointerDown:u=>ae(l,d=>d9(d,u))})}function r6e(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,a=c9({id:o}),s=!i.unassigned&&a.isOver?Sx(n.length)+" "+HOe:Sx(n.length);return L("div",{children:[b("div",{children:i.label,className:i.unassigned?KOe:D9}),b("div",{children:n.map(l=>b("div",{children:ZOe(i.events,l).map(u=>b(t6e,{event:u,day:l,draggable:t},u.key)),className:l===r?GOe:F9},l.toString())),ref:Jt(a.setNodeRef),className:s})],className:qOe})}function n6e(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=se(()=>"Week"),a=o[1],s=o[0],l=se(()=>Jn(D(r,Date.now()))),u=l[1],d=l[0],f=Jn(Date.now()),h=Ge(t),p;p=s==="Week"?il(7,x=>ao(Rg(d),x)):[Jn(d)];let m=x=>u(w=>s==="Week"?ao(w,x*7|0):ao(w,x)),g=x=>{let w=x.over;if(t===void 0||w==null||w.id==="")return;let E=i.find(C=>C.events.some(k=>k.key===x.active.id));if(de(E,!0,C=>C.resourceId!==w.id))return t(x.active.id,w.id)},v=(x,w)=>b("button",{children:w,className:s===x?zOe:_f,onClick:E=>a(C=>x)}),_;return _=s==="Week"?eo(d):as(d)+" — "+eo(d),L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:_f,onClick:x=>m(-1)}),b("button",{children:"Today",className:_f,onClick:x=>u(w=>f)}),b("button",{children:"›",className:_f,onClick:x=>m(1)}),b("span",{children:_,className:UOe})],className:pD}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:pD})],className:LOe}),b(l9,{onDragEnd:g,children:L("div",{children:[L("div",{children:[b("div",{children:"Resource",className:VOe}),b("div",{children:p.map(x=>b("div",{children:as(x),className:WOe},x.toString())),className:Sx(p.length)})],className:jOe}),i.map(x=>b(r6e,{lane:x,days:p,today:f,draggable:h},x.unassigned?"\0unassigned":x.resourceId))],className:BOe})}),n!==void 0?b("span",{children:n,className:YOe}):null],className:MOe})}let i6e=n6e;function I9(e,t){let r=R(R(R(Y(e),o=>O(o,"properties")),Y),o=>O(o,t));if(r===void 0)return;let n=R(R(Y(r),o=>O(o,"const")),ue);if(n!==void 0)return n;let i=Eu(r);if(i!==void 0&&i.length===1)return i[0]}function P9(e){return e.filter(t=>t.level==="Instance")}function o6e(e,t,r){return t!==void 0&&Wo(e,t).length!==0?P9(r).some(n=>{let i=n.allowedStates;return i!==void 0?i.length!==0:!1}):!1}function a6e(e,t,r){let n=P9(r),i=Wo(e,t),o=l=>({commandName:l.name,label:l.label,toState:I9(l.schema,t)}),a=i.map(l=>{let u=ie(n,d=>{let f=d.allowedStates;if(f!==void 0&&f.includes(l))return o(d)});return{value:l,label:yt(l),terminal:u.length===0,outgoing:u}}),s=n.filter(l=>Ui(l.allowedStates)).map(o);return{statusField:t,states:a,anyState:s}}function ur(e){return"var("+e+")"}let s6e=S([z("flex"),pe("column"),c("gap",ur(F.md))]),l6e=S([c("font-size",ur(T.sizeLg)),c("font-weight",ur(T.weightMedium)),c("color",ur(y.textPrimary)),Sn(Ce(0))]),u6e=S([c("font-size",ur(T.sizeXs)),c("color",ur(y.textDisabled))]),c6e=S([z("flex"),c("flex-wrap","wrap"),Z("flexStart"),c("gap",ur(F.md))]),d6e=S([z("flex"),pe("column"),c("gap",ur(F.sm)),c("flex","0 1 240px"),c("padding",ur(F.md)),c("background",ur(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",ur(X.md))]),f6e=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",ur(F.sm))]),h6e=S([c("font-size",ur(T.sizeXs)),c("color",ur(y.textDisabled)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),p6e=S([z("flex"),pe("column"),c("gap","4px")]),m6e=S([z("inlineFlex"),Z("center"),c("gap","4px"),c("align-self","flex-start"),c("padding","2px var("+F.sm+")"),c("background",ur(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",ur(X.sm)),c("font-size",ur(T.sizeSm)),c("color",ur(y.textPrimary))]),g6e=S([c("color",ur(y.textSecondary))]),v6e=S([c("font-size",ur(T.sizeXs)),c("color",ur(y.textDisabled))]),_6e=S([z("flex"),pe("column"),c("gap",ur(F.sm)),c("padding-top",ur(F.sm))]),b6e=S([c("font-size",ur(T.sizeXs)),c("font-weight",ur(T.weightMedium)),c("color",ur(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),y6e=S([z("flex"),c("flex-wrap","wrap"),c("gap","6px")]);function vD(e){let t=e.toState;return L("span",{children:[e.label,t!==void 0?b("span",{children:" → "+yt(t),className:g6e}):null],className:m6e},e.commandName)}function x6e(e){let t=e.title,r=e.statusField,n=a6e(e.schema,r,e.commands);return L("div",{children:[t!==void 0?b("h3",{children:t,className:l6e}):null,b("div",{children:"Lifecycle on “"+yt(r)+"”",className:u6e}),b("div",{children:n.states.map(i=>L("div",{children:[L("div",{children:[b(ns,{variant:"Neutral",label:i.label,dot:!0}),i.terminal?b("span",{children:"end",className:h6e}):null],className:f6e}),i.terminal?b("span",{children:"No commands available",className:v6e}):b("div",{children:i.outgoing.map(vD),className:p6e})],className:d6e},i.value)),className:c6e}),n.anyState.length!==0?L("div",{children:[b("span",{children:"Any state",className:b6e}),b("div",{children:n.anyState.map(vD),className:y6e})],className:_6e}):null],className:s6e})}let S6e=x6e;function E6e(e){switch(e){case"Hints":return"hints";case"DeclaredTarget":return"declared-target";case"SchemaTarget":return"schema-target";case"StemMatch":return"stem-match";case"Setter":return"setter"}}function w6e(e,t){return e+"→"+t}function J2(e){return D(Q(R(R(Y(e),t=>O(t,"properties")),Y),t=>Object.keys(t)),[])}function Q2(e){return ie(D(R(R(Y(e),t=>O(t,"required")),_r),[]),ue).filter(t=>t!=="TAG")}function yy(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9]+/g," ").toLowerCase().split(" ").filter(t=>t.length>=3)}function k6e(e,t,r){let n=yy(e).concat(yy(t)),i=yy(r);return n.some(o=>i.some(a=>a.startsWith(o)?!0:o.startsWith(a)))}function C6e(e){return e.filter(t=>t.level==="Instance")}function xy(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function R6e(e,t,r){return J2(e.schema).includes(t)?ut([[t,r]]):{}}function A6e(e,t){let r=e.filter(n=>J2(n.schema).includes(t)?Q2(n.schema).every(i=>i===t||i==="id"?!0:ze(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function Sy(e){if(e.length===1)return e[0]}function Y2(e,t,r){let n=C6e(t),i=A6e(n,e);return(o,a)=>{let s=(h,p)=>{if(xy(h,o))return{command:h.name,patch:R6e(h,e,a),tier:p}},l=R(R(R(r,h=>h[a]),h=>n.find(p=>p.name===h)),h=>s(h,"Hints"));if(l!==void 0)return l;let u=R(Sy(n.filter(h=>xy(h,o)?ze(h.targetState,a):!1)),h=>s(h,"DeclaredTarget"));if(u!==void 0)return u;let d=R(Sy(n.filter(h=>xy(h,o)?ze(I9(h.schema,e),a):!1)),h=>s(h,"SchemaTarget"));if(d!==void 0)return d;let f=R(Sy(n.filter(h=>{let p=h.allowedStates;return p!==void 0&&p.includes(o)?k6e(h.name,h.label,a):!1})),h=>s(h,"StemMatch"));return f!==void 0?f:R(i,h=>s(h,"Setter"))}}function $6e(e,t,r,n){let i=Y2(t,r,n),o=Wo(e,t),a={};return o.forEach(s=>{o.forEach(l=>{if(s!==l)return ae(i(s,l),u=>{a[w6e(s,l)]=u})})}),a}let yu="resources",xu="events";function T6e(e){return e.find(t=>ze(t.role,yu))}function O9(e){return e.filter(t=>ze(t.role,xu))}function N6e(e,t){return e.toString()+"::"+t}function D6e(e){let t=e.indexOf("::");if(t!==-1)return Q(FF(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function sf(e,t){return R(O(e,t),ue)}function F6e(e){let t=T6e(e),r=O9(e),n=t!==void 0?t.rows.map(d=>{let f=D(Y(d),{}),h=D(sf(f,"id"),""),p=D(R(t.semantics.labelField,m=>sf(f,m)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>ie(d.rows,h=>{let p=D(Y(h),{}),m=D(sf(p,"id"),""),g=d.semantics.dateSpan;if(g!==void 0)return Q(R(wu(g,p),Dn),v=>{let _=R(Zx(g,p),Dn),x=D(R(d.semantics.labelField,$=>sf(p,$)),m),w=D(R(d.resourceRef,$=>sf(p,$)),""),E=N6e(f,m),C=d.accent;return[w,{key:E,title:x,start:v,end_:_,accent:C,onOpen:()=>d.onOpenRow(m,h)}]})})).flat(),a=d=>ie(o,f=>{if(d(f[0]))return f[1]}),s=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:a(h=>h===f)}}),l=a(d=>!i.includes(d)),u=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return s.concat(u)}function I6e(e){let t=e.sources,r=F6e(t),n=O9(t),o=n.some(l=>Ge(l.onCommand)&&Ge(l.assignCommand)?Ge(l.resourceRef):!1)?(l,u)=>ae(D6e(l),d=>{let f=d[1];ae(n[d[0]],h=>{let p=h.onCommand,m=h.assignCommand,g=h.resourceRef;if(p!==void 0&&m!==void 0&&g!==void 0)return p(m,f,ut([[g,u]]))})}):void 0,a=ot(n,0,(l,u)=>l+u.rows.length|0),s=dI(pE(t),a,void 0,"scheduled item");return b(i6e,{lanes:r,windowNote:s,onReassign:o})}let P6e=b("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),bf="scheduler";function M9(e){return Ge(Nn(e,void 0,void 0).dateSpan)?$r(e).some(t=>Ge(Jc(t[0]))):!1}function O6e(e,t,r){return r?!1:M9(t)}function L9(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>J2(i.schema).includes(t)?Q2(i.schema).every(o=>o===t||o==="id"?!0:ze(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function M6e(e,t,r){let n=r!==void 0?r:(o,a)=>{},i={};return Bm().filter(o=>{let a=o.arity;return typeof a!="object"?!1:a.TAG!=="Multi"}).forEach(o=>{let a={},s={},l=(u,d,f)=>{let h=O(u,d);h!==void 0?h.push(f):u[d]=[f]};e.forEach(u=>{let d=R(t,p=>oo(p,u.name)),f=D(R(d,p=>p.canvas),o.label),h=R(d,p=>p.role);if(h!==void 0)return h===yu?l(a,f,u):h===xu?ae(R(d,p=>p.resourceRef),p=>l(s,f,[u,p])):void 0}),Qe(s).forEach(u=>{let d=u[0],f=D(O(a,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];u[1].forEach(m=>{i[m[0].name]={resource:p,resourceRef:m[1]}})})}),i}Yo({id:bf,label:"Scheduler",icon:P6e,arity:{TAG:"Slots",_0:[{role:yu,min:1,max:1},{role:xu,min:1}]},isCapable:(e,t)=>M9(e),render:e=>b(I6e,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function rs(e){return"var("+e+")"}let R0=S([z("inlineFlex"),Z("center"),c("gap","6px"),c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",rs(X.full)),c("padding","2px var("+F.sm+")"),c("color",rs(y.textSecondary)),c("font-size",rs(T.sizeXs)),c("line-height","1.5")]),Ey=S([xe("pointer"),Je([c("background",rs(y.surfaceSubtle)),c("color",rs(y.textPrimary))])]),L6e=S([Ya(.6),xe("notAllowed")]);function X2(e){return S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let z6e=X2(rs(y.success)),U6e=X2(rs(y.border)),B6e=X2(rs(y.border)),j6e=ZV([[0,[Ya(.4)]],[50,[Ya(1)]],[100,[Ya(.4)]]]),q6e=S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",rs(y.warning)),WV(j6e),GV({NAME:"ms",VAL:1200}),JV("infinite"),QV("easeInOut")]);function V6e(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,a=n?i&&o?[R0+" "+Ey,q6e,"Reconnecting…"]:i?[R0+" "+Ey,z6e,"Live"]:[R0+" "+Ey,U6e,"Snapshot"]:[R0+" "+L6e,B6e,"Off"],s=n?u=>t():void 0,l=n?i&&o?"Live updates on — reconnecting to the server":i?"Live updates on — click for snapshot mode":"Snapshot mode — click for live updates":"Live updates disabled globally";return L("button",{children:[b("span",{className:a[1]}),a[2]],className:a[0],title:l,disabled:!n,type:"button",onClick:s})}let K6e=V6e;function lf(e){return"var("+e+")"}let H6e=S([z("inlineFlex"),Z("center"),c("gap","6px"),c("background",lf(y.brand)),c("color",lf(y.textOnBrand)),c("border","none"),c("border-radius",lf(X.full)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",lf(T.sizeSm)),c("font-weight",lf(T.weightMedium)),xe("pointer"),Je([c("opacity","0.85")])]),W6e=S([z("flex"),Z("center"),Ze("center"),c("padding","var("+F.xs+") 0")]);function G6e(e){let t=e.onClick,r=e.count,n=r===1?"1 new item — click to refresh":r.toString()+" new items — click to refresh";return b("div",{children:b("button",{children:n,className:H6e,type:"button",onClick:i=>t()}),className:W6e})}let J6e=G6e;function Q6e(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function Y6e(e){return Q6e(e)}function Z2(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function xo(e){return[e._0,Z2(e)]}function z9(e,t){return PF(t,e,(r,n)=>n(r))}function So(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}let _D=21;function U9(e,t,r){return ie(p4(e,t),n=>{let i=R(O(n,"id"),ue),o=D(R(O(n,r),ue),D(i,""));return Q(i,a=>({id:a,label:o}))})}function X6e(e,t){let r=xi(),n=se(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return Ae(()=>{let o={contents:!1};if(i(a=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let a=t==="id"?"id":"id "+t,s="query { "+e+"(first: "+_D.toString()+") { edges { node { "+a+" } } } }";Ut(r(s,{}).then(l=>{if(!o.contents){let u=U9(l,e,t),d=u.length>=_D,f=d?u.slice(0,20):u;i(h=>({loading:!1,options:f,hasMore:d}))}return Promise.resolve()}),l=>(o.contents||(console.warn("[AutoUI] RefField "+e+" fetch failed",l),i(u=>({loading:!1,options:[],hasMore:!1}))),Promise.resolve()))}else o.contents||i(a=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function Z6e(e,t,r){let n=xi(),i=se(()=>({loading:!1,options:[],error:!1})),o=i[1];return Ae(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let a={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let s=setTimeout(()=>{if(a.contents)return;if(n===void 0)return o(f=>({loading:!1,options:[],error:!1}));let l=t==="id"?"id":"id "+t,u="query($q: String!) { "+e+"(first: 20, filter: {searchPrefix: $q}) { edges { node { "+l+" } } } }",d={};d.q=r,Ut(n(u,d).then(f=>{if(!a.contents){let h=U9(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(a.contents||(console.warn("[AutoUI] RefField "+e+" searchPrefix failed; falling back to client-side filter",f),o(h=>({loading:!1,options:[],error:!0}))),Promise.resolve()))},250);return()=>{a.contents=!0,clearTimeout(s)}},[n,r,e]),i[0]}function eMe(e,t,r){let n=xi(),i=se(()=>{}),o=i[1];return Ae(()=>{let a={contents:!1},s=0;if(n!==void 0&&t!==void 0&&t!==""){let l=r==="id"?"id":"id "+r,u="query($id: ID!) { "+e+"(id: $id) { "+l+" } }",d={};d.id=t,Ut(n(u,d).then(f=>{if(!a.contents){let h=Y(f),p=D(R(R(h,_=>O(_,"data")),Y),{}),m=O(p,e),g=m!==void 0?m:R(h,_=>O(_,e)),v=R(g,Y);if(v!==void 0){let _=D(R(O(v,"id"),ue),t),x=D(R(O(v,r),ue),_);o(w=>({id:_,label:x}))}else o(_=>{})}return Promise.resolve()}),f=>Promise.resolve())}else s=1;return s===1&&o(l=>{}),()=>{a.contents=!0}},[n,t,r]),i[0]}function mr(e){return"var("+e+")"}function yf(e){if(e==="")return[];let t=_r(JSON.parse(e));return t!==void 0?ie(t,ue):[e]}let tMe=S([qt("relative"),Ho({NAME:"percent",VAL:100})]),bD=S([c("background",mr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",mr(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",mr(T.sizeMd)),c("color",mr(y.textPrimary)),c("outline","none"),Ho({NAME:"percent",VAL:100}),UV(Ce(34)),z("flex"),Z("center"),_i("wrap"),c("gap","4px"),xe("pointer"),hs("left"),ms([c("border-color",mr(y.brand))])]),rMe=S([c("border-color",mr(y.brand))]),nMe=S([c("border-color",mr(y.error))]),iMe=S([c("color",mr(y.textSecondary))]),oMe=S([z("inlineFlex"),Z("center"),c("background",mr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",mr(X.sm)),c("padding","2px 6px"),c("font-size",mr(T.sizeSm)),c("gap","4px")]),aMe=S([xe("pointer"),c("color",mr(y.textSecondary)),c("font-weight",mr(T.weightBold))]),sMe=S([c("border","none"),c("background","transparent"),c("outline","none"),c("color",mr(y.textPrimary)),c("font-size",mr(T.sizeMd)),_o(1),oI(Ce(40))]),lMe=S([qt("absolute"),ps({NAME:"percent",VAL:100}),od("zero"),bl("zero"),Ca(Ce(2)),c("background",mr(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",mr(X.sm)),c("box-shadow",mr(_n.md)),OV("none"),Sn("zero"),jV("zero"),LV(Ce(240)),BV("auto"),VV(20)]),uMe=S([c("padding","var("+F.xs+") var("+F.sm+")"),xe("pointer"),c("color",mr(y.textPrimary)),c("font-size",mr(T.sizeMd))]),cMe=S([c("background",mr(y.surfaceSubtle))]),dMe=S([c("background",mr(y.brandSubtle))]),yD=S([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",mr(y.textSecondary)),c("font-size",mr(T.sizeSm))]),fMe=(function(e,t){return e.contains(t)});function hMe(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,a=Math.max(120,Math.min(240,i?n:r));return[i,a]}function pMe(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.required,s=e.multi,l=e.labelField,u=e.queryField,d=e.fieldKey,f=n!==void 0?n:()=>{},h=r!==void 0?r:!1,p=t!==void 0?t:!1,m=X6e(u,l),g=m.options,v=m.loading,_=We(void 0),x;if(s)x="Search";else{let et=_.current;if(et!==void 0)x=et;else if(v)x="Inline";else{let le=m.hasMore?"Search":"Inline";_.current=le,x=le}}let w=se(()=>!1),E=w[1],C=w[0],k=se(()=>0),A=k[1],$=k[0],N=se(()=>""),M=N[1],P=N[0],I=se(()=>[!1,240]),U=I[1],B=I[0],q=We(null),W=We(null),J=s||o===""?!1:!g.some(et=>et.id===o),K=eMe(e.singleQueryField,J?o:void 0,l),G=et=>{let le=Q(g.find(Ue=>Ue.id===et),Ue=>Ue.label),$e=R(K,Ue=>{if(Ue.id===et)return Ue.label});return le!==void 0?le:$e!==void 0?$e:et};Ae(()=>{if(!C)return;let et=le=>{let $e=le.target,Ue=q.current;if(Ue!=null&&!fMe(Ue,$e))return E(Ye=>!1)};return document.addEventListener("mousedown",et),()=>{document.removeEventListener("mousedown",et)}},[C]),$F(()=>{if(C){let et=q.current;et!=null&&U(le=>hMe(et))}},[C]);let re=x==="Search"&&P!=="",oe=Z6e(u,l,re?P:""),_e;if(P==="")_e=g;else{let et=P.toLowerCase();_e=g.filter(le=>le.label.toLowerCase().startsWith(et))}let Re=re&&!oe.error?oe.options:_e,Te=Re.length,He=v||re&&oe.loading,ge=et=>{let le=yf(o),$e=le.some(Ye=>Ye===et)?le.filter(Ye=>Ye!==et):le.concat([et]);i(d,JSON.stringify($e.map(Ye=>Ye))),M(Ye=>""),A(Ye=>0);let Ue=W.current;if(Ue!=null){Ue.focus();return}},be=et=>{let le=Re[et];if(le!==void 0){if(s)return ge(le.id);{let $e=le.id;return i(d,$e),E(Ue=>!1),M(Ue=>"")}}},mt=et=>{switch(et.key){case"ArrowDown":return et.preventDefault(),C?A(Ye=>Te===0?0:Bo(Ye+1|0,Te)):E(Ye=>!0);case"ArrowUp":return et.preventDefault(),A(Ye=>Te===0?0:Bo((Ye-1|0)+Te|0,Te));case"Backspace":if(!(s&&P===""))return;let $e=yf(o);if($e.length===0)return;let Ue=$e.slice(0,$e.length-1|0);return i(d,JSON.stringify(Ue.map(Ye=>Ye)));case"Enter":return C?(et.preventDefault(),be($)):void 0;case"Escape":return C?E(Ye=>!1):void 0;default:return}},fr=C?bD+" "+rMe:bD,Mt=h?fr+" "+nMe:fr,Ei=()=>yf(o).map(le=>L("span",{children:[G(le),b("span",{children:"×",className:aMe,onClick:$e=>{$e.stopPropagation(),ge(le)}})],className:oMe},le)),Sr=(B[1]|0).toString()+"px",Eo=B[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:Sr,top:"auto"}:{maxHeight:Sr},Er;if(He)Er=b("li",{children:"Loading…",className:yD});else if(Te===0)Er=b("li",{children:P===""?"No options":"No matches",className:yD});else{let et=s?yf(o):o===""?[]:[o];Er=Re.map((le,$e)=>{let Ue=et.some(fe=>fe===le.id),j=$U([[uMe],$e===$?[cMe]:[],Ue?[dMe]:[]]).join(" ");return b("li",{children:le.label,"aria-selected":Ue,className:j,role:"option",onMouseDown:fe=>{fe.preventDefault(),be($e)},onMouseEnter:fe=>A(Fe=>$e)},le.id)})}let tn=b("ul",{children:Er,className:lMe,role:"listbox",style:Eo}),rn;return rn=x==="Inline"?b("button",{children:o===""?b("span",{children:a?"Select…":"—",className:iMe}):G(o),className:Mt,autoFocus:p,type:"button",onKeyDown:mt,onBlur:et=>f(),onClick:et=>E(le=>!le)}):L("div",{children:[s?Ei():null,b("input",{ref:Jt(W),className:sMe,autoFocus:p,placeholder:a?"Search…":"—",type:"text",value:s||C?P:o===""?"":G(o),onKeyDown:mt,onFocus:et=>E(le=>!0),onBlur:et=>f(),onChange:et=>{let le=et.target.value;M($e=>le)}})],className:Mt,onClick:et=>E(le=>!0)}),L("div",{children:[rn,C?tn:null],ref:Jt(q),className:tMe})}let mMe=pMe;function B9(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function gMe(e){return t=>{let r=xo(t),n=r[0];return n>=e?So(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+B9(e.toString()),tl:r[1]}}}}function vMe(e){return t=>{let r=xo(t),n=r[0];return n<=e?So(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+B9(e.toString()),tl:r[1]}}}}function _Me(e){let t=xo(e),r=t[0];return isFinite(r)&&(r|0)===r?So(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}let bMe="Must not be empty";function yMe(e){let t=xo(e),r=t[0];return r.length>0?So(e):{TAG:"Invalid",_0:r,_1:{hd:bMe,tl:t[1]}}}let xMe=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function SMe(e){let t=xo(e),r=t[0];return xMe.exec(r)!==null?So(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function EMe(e){let t=xo(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?So(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let wMe=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function kMe(e){let t=xo(e),r=t[0];return wMe.exec(r)!==null?So(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let CMe=/^c[a-z0-9]{23,24}$/;function RMe(e){let t=xo(e),r=t[0];return CMe.exec(r)!==null?So(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function AMe(e){let t=xo(e),r=t[0],n=Date.parse(r);return Number.isNaN(n)?{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid ISO 8601 date-time",tl:t[1]}}:So(e)}function $Me(e){return t=>{let r=xo(t),n=r[0];return n.length>=e?So(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function TMe(e){return t=>{let r=xo(t),n=r[0];return n.length<=e?So(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function NMe(e,t){return r=>{let n=xo(r),i=n[0];return e.exec(i)!==null?So(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function DMe(e){let t=Z2(e);if(t!==0)return t.hd}function FMe(e){switch(e){case"Email":return SMe;case"Url":return EMe;case"Uuid":return kMe;case"Cuid":return RMe;case"DateTime":return AMe}}function IMe(e,t,r){if(e==="")return t?yMe({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return ae(r.minLength,i=>{n.push($Me(i))}),ae(r.maxLength,i=>{n.push(TMe(i))}),ae(r.format,i=>{n.push(FMe(i))}),ae(r.pattern,i=>{n.push(NMe(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:z9({TAG:"Pending",_0:e},Lx(n))}function PMe(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=jo(e);if(n===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Must be a number",tl:0}};let i=[];D(r.integer,!1)&&i.push(_Me),ae(r.min,s=>{i.push(gMe(s))}),ae(r.max,s=>{i.push(vMe(s))});let o=z9({TAG:"Pending",_0:n},Lx(i)),a=Z2(o);return a!==0?{TAG:"Invalid",_0:e,_1:a}:{TAG:"Valid",_0:e}}function OMe(e,t,r){let i=yf(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return ae(r.maxItems,s=>{if(i>s){o.contents={hd:"Select at most "+s.toString()+" items",tl:o.contents};return}}),ae(r.minItems,s=>{if(i<s&&(t||i>0)){o.contents={hd:"Select at least "+s.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function xD(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function MMe(e,t){let r=e.propSchema;if(r!==void 0&&nie(e.key,r)){let i=e.fieldType,o;if(typeof i!="object")o=!1;else switch(i.TAG){case"TextField":case"NumberField":o=i.required;break;case"EnumField":o=i.required;break;case"RefField":o=i.required;break}let a=oie(e.key,r,t,o);return a!==void 0?{TAG:"Invalid",_0:t,_1:{hd:a,tl:0}}:{TAG:"Valid",_0:t}}let n=e.fieldType;if(typeof n!="object")return{TAG:"Valid",_0:t};switch(n.TAG){case"TextField":return IMe(t,n.required,n.constraints);case"NumberField":return PMe(t,n.required,n.constraints);case"EnumField":return xD(t,n.required);case"RefField":return n.multi?OMe(t,n.required,n.constraints):xD(t,n.required)}}function og(e,t){let r=Q(O(e,t),it);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function SD(e,t){let r=Q(O(e,t),it);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function ag(e,t){let r=Q(O(e,t),it);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function LMe(e){let t=ag(e,"format");if(ag(e,"x-reventless-format")==="cuid")return"Cuid";if(t!==void 0)switch(t){case"date-time":return"DateTime";case"email":return"Email";case"uri":return"Url";case"uuid":return"Uuid";default:return}}function zMe(e){let t=og(e,"minLength"),r=og(e,"maxLength"),n=Q(ag(e,"pattern"),a=>new RegExp(a)),i=LMe(e),o=ag(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function ED(e,t){let r=SD(e,"minimum"),n=SD(e,"maximum");return{min:r,max:n,integer:t}}function UMe(e){let t=og(e,"minItems"),r=og(e,"maxItems");return{minItems:t,maxItems:r}}function BMe(e,t){let r=t!==void 0?t:[],n={};r.forEach(d=>{n[d.propertyKey]=d});let i=it(e);if(typeof i!="object")return[];if(i.TAG!=="JSONObject")return[];let o=i._0,a=O(o,"required"),s;if(a!==void 0){let d=it(a);s=typeof d!="object"?[]:d.TAG==="JSONArray"?ie(d._0,f=>{let h=it(f);if(!(typeof h!="object"||h.TAG!=="JSONString"))return h._0}):[]}else s=[];let l=O(o,"properties");if(l===void 0)return[];let u=it(l);return typeof u!="object"?[]:u.TAG==="JSONObject"?ie(Qe(u._0),d=>{let f=d[1],h=d[0],p=it(f);if(typeof p!="object"||p.TAG!=="JSONObject")return;let m=p._0;if(Ge(O(m,"const")))return;let g=O(m,"type"),v;if(g!==void 0){let A=it(g);v=typeof A!="object"||A.TAG!=="JSONString"?"string":A._0}else v="string";let _=s.some(A=>A===h),x=O(n,h),w;if(x!==void 0)w=x.multi?x.entityNamePlural:x.entityName;else{let A=O(m,"title");if(A!==void 0){let $=it(A);w=typeof $!="object"||$.TAG!=="JSONString"?yt(h):$._0}else w=yt(h)}let E=O(m,"enum"),C;if(E!==void 0){let A=it(E);C=typeof A!="object"||A.TAG!=="JSONArray"?void 0:ie(A._0,$=>{let N=it($);if(!(typeof N!="object"||N.TAG!=="JSONString"))return N._0})}else C=void 0;let k;if(x!==void 0)k={TAG:"RefField",queryField:x.queryField,singleQueryField:x.singleQueryField,labelField:x.labelField,multi:x.multi,required:_,constraints:x.multi?UMe(m):{}};else if(v==="boolean")k="BoolField";else if(C!==void 0)k={TAG:"EnumField",options:C,required:_};else switch(v){case"integer":k={TAG:"NumberField",required:_,constraints:ED(m,!0)};break;case"number":k={TAG:"NumberField",required:_,constraints:ED(m,!1)};break;default:k={TAG:"TextField",required:_,constraints:zMe(m)}}return Q(k,A=>({key:h,label:w,fieldType:A,propSchema:f}))}):[]}function jMe(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;i=typeof n!="object"?"false":n.TAG==="EnumField"?D(n.options[0],""):"",t[r.key]=i}),t}function mn(e){return"var("+e+")"}let qMe=S([z("flex"),pe("column"),c("gap",mn(F.md))]),VMe=S([z("flex"),pe("column"),c("gap","4px")]),wD=S([c("color",mn(y.textSecondary)),c("font-size",mn(T.sizeSm)),c("font-weight",mn(T.weightMedium))]),KMe=S([c("color",mn(y.error)),Oh(Ce(2))]),kD=S([c("background",mn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",mn(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",mn(T.sizeMd)),c("color",mn(y.textPrimary)),c("outline","none"),Ho({NAME:"percent",VAL:100}),c("transition","border-color 120ms, box-shadow 120ms"),ms([c("border-color",mn(y.brand))])]),HMe=S([c("border-color",mn(y.error)),ms([c("border-color",mn(y.error)),c("box-shadow","0 0 0 2px color-mix(in srgb, var("+y.error+") 25%, transparent)")])]),WMe=S([c("color",mn(y.error)),c("font-size",mn(T.sizeXs)),c("min-height","1.1em"),c("line-height","1.1"),Ca(Ce(2))]),GMe=S([xe("pointer"),iI(Ce(6))]),CD=S([c("background",mn(y.brand)),c("color",mn(y.textOnBrand)),c("border","none"),c("border-radius",mn(X.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",mn(T.sizeMd)),xe("pointer"),IV("flexStart"),c("transition","opacity 120ms")]),JMe=S([Ya(.5),xe("notAllowed")]);function QMe(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,a=e.value,s=e.field,l=r!==void 0?r:!1,u=t!==void 0?t:!1,d=s.fieldType,f;if(typeof d!="object")f=!1;else switch(d.TAG){case"TextField":case"NumberField":f=d.required;break;case"EnumField":f=d.required;break;case"RefField":f=d.required;break}let h=l&&Ge(n),p=h?kD+" "+HMe:kD,m=x=>i(s.key),g=s.propSchema,v=g!==void 0?iie(s.key,g,a,x=>o(s.key,x),()=>i(s.key),f,h):void 0,_;if(v!==void 0)_=v;else{let x=s.fieldType;if(typeof x!="object")_=L("label",{children:[b("input",{className:GMe,checked:a==="true",type:"checkbox",onBlur:m,onChange:w=>o(s.key,w.target.checked?"true":"false")}),"Enabled"],className:wD});else switch(x.TAG){case"TextField":let w=x.constraints.format,E;if(w!==void 0)switch(w){case"Email":E="email";break;case"Url":E="url";break;default:E="text"}else E="text";_=b("input",{className:p,autoFocus:u,type:E,value:a,onBlur:m,onChange:C=>o(s.key,C.target.value)});break;case"NumberField":_=b("input",{className:p,autoFocus:u,type:"number",value:a,onBlur:m,onChange:C=>o(s.key,C.target.value)});break;case"EnumField":_=b("select",{children:x.options.map(C=>b("option",{children:C,value:C},C)),className:p,value:a,onBlur:m,onChange:C=>o(s.key,C.target.value)});break;case"RefField":_=b(mMe,{fieldKey:s.key,queryField:x.queryField,singleQueryField:x.singleQueryField,labelField:x.labelField,multi:x.multi,required:x.required,value:a,onChange:o,onBlur:()=>i(s.key),hasError:h,autoFocus:u});break}}return L("div",{children:[L("label",{children:[s.label,f?b("span",{children:"*",className:KMe}):null],className:wD}),_,b("div",{children:h?D(n,""):null,className:WMe})],className:VMe})}function YMe(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,a=n!==void 0?n:"Submit",s=t!==void 0?t:[],l=Bt(()=>BMe(o,s),[o,s]),u=se(()=>D(r,jMe(l))),d=u[1],f=u[0],h=se(()=>({})),p=h[1],m=h[0],g=se(()=>!1),v=g[1],_=g[0],x=Bt(()=>l.map(M=>{let P=D(O(f,M.key),"");return[M.key,MMe(M,P)]}),[l,f]),w=x.every(M=>Y6e(M[1])),E={};x.forEach(M=>{let P=DMe(M[1]);if(P!==void 0){E[M[0]]=P;return}});let C=(M,P)=>d(I=>{let U=ut(Qe(I));return U[M]=P,U}),k=M=>p(P=>{let I=ut(Qe(P));return I[M]=!0,I}),A=M=>{if(M.preventDefault(),v(P=>!0),w)return i(f)},$=_&&!w,N=$?CD+" "+JMe:CD;return L("form",{children:[l.map((M,P)=>{let I=D(O(m,M.key),!1);return b(QMe,{field:M,value:D(O(f,M.key),""),onChange:C,onBlur:k,errorMessage:O(E,M.key),showError:I||_,autoFocus:P===0},M.key)}),b("button",{children:a,className:N,disabled:$,type:"submit"})],className:qMe,noValidate:!0,onSubmit:A})}let XMe=YMe;function ZMe(e){return"var("+e+")"}let e4e=S([z("flex"),pe("column"),c("gap",ZMe(F.md))]);function t4e(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.injectNewId,o=e.aggregateIdField,a=e.aggregateId,s=e.schema,l=i!==void 0?i:!1,u=n!==void 0?n:[],d=t!==void 0?t:"Submit",f=se(()=>{}),h=f[1],p=se(()=>!1),m=p[1],v=se(()=>crypto.randomUUID())[0],_=We(cb("FormOpened")),x=Bt(()=>({armed:_}),[]),w=k=>{let A=ut(Qe(k));ae(a,$=>{A[D(o,"id")]=$}),l&&(A[D(o,"id")]=v),m($=>!0),h($=>{}),_.current=cb("SubmitStarted"),r(A).then($=>{if(m(N=>!1),typeof $=="object"){let N=$._0;_.current=cb("SubmitFailed"),h(M=>N)}return Promise.resolve()})},E=a!==void 0?o!==void 0||l?o:void 0:l?o:void 0,C=E!==void 0?D(Q(Y(s),k=>{let A=ut(Qe(k));return ae(R(O(A,"properties"),Y),$=>{let N=ut(Qe($).filter(M=>M[0]!==E));A.properties=N}),A}),s):s;return b(rge.make,{session:x,children:L("div",{children:[de(f[0],null,k=>b(A9,{variant:"Error",message:k})),p[0]?b(zf,{label:"Submitting..."}):null,b(XMe,{schema:C,onSubmit:w,submitLabel:d,refFields:u})],className:e4e})})}let ek=t4e;function r4e(e){let t={},r=e.startsWith("?")?e.slice(1):e;return r===""||r.split("&").forEach(n=>{let i=n.split("="),o=i.length;if(!(o>=3))switch(o){case 0:return;case 1:let a=i[0];if(a!==""){t[decodeURIComponent(a)]="";return}else return;case 2:let s=i[0],l=i[1];if(s!==""){t[decodeURIComponent(s)]=decodeURIComponent(l);return}else return}}),t}function n4e(e,t){return e===t?0:e<t?-1:1}function j9(e){let t=Qe(e).filter(r=>r[1]!=="").toSorted((r,n)=>n4e(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function i4e(e){if(e.path===0)return"/";let r=[];return AU(e.path,n=>{r.push(n)}),"/"+r.join("/")}function RD(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=Qe(e).filter(o=>{let a=o[0];return r.includes(a)?!1:!n.some(s=>s[0]===a)});return ut(i.concat(n))}function o4e(){let e=pU(),t=r4e(e.search),r=i4e(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let u=j9(l);Ih(r+u+n)};return{params:t,get:l=>O(t,l),set:(l,u)=>i(RD(t,[[l,u]])),setMany:l=>i(RD(t,l))}}function tk(e){return de(R(R(Y(e),t=>O(t,"properties")),Y),[],Qe)}function a4e(e,t){return Q(tk(e).find(r=>r[0]===t),r=>r[1])}function rk(e){if(e.length===1)return Jt(e[0])}function s4e(e,t){return Q2(e.schema).every(r=>r===t||r==="id"?!0:ze(r,e.aggregateIdField))}function Ex(e,t){return Q(rk(tk(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function AD(e,t,r){return rk(ie(e,n=>R(Ex(n,r),i=>{if(s4e(n,i))return{command:n,argument:i,tier:t}})))}function q9(e,t){return ze(Sa(e).storeTarget,t)}function l4e(e,t,r,n){let i=t.field;return i!==void 0?tk(e.schema).some(o=>o[0]===i)?i:void 0:nd(R(n,o=>Ex(e,(a,s)=>q9(s,o))),Ex(e,(o,a)=>o===r))}let $D={contents:[]};function TD(e,t,r){let n=e+"."+t.command+"."+D(t.field,"")+"."+r;if(!$D.contents.some(i=>i===n)){$D.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function u4e(e,t,r,n){let i=rk(e.filter(o=>o.name===t.command));if(i!==void 0){let o=l4e(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};TD(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}TD(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function V9(e,t,r){return R(a4e(e,t),n=>{let i=Sa(n),o=i.storeTarget,a=r.filter(u=>u.level==="Instance"),s=i.setter;if(s!==void 0)return u4e(a,s,t,o);let l=R(o,u=>AD(a,"StoreMatch",(d,f)=>q9(f,u)));return l!==void 0?l:AD(a,"NameMatch",(u,d)=>u===t)})}function K9(e,t){let r=e.requiredRole;return r!==void 0?t.includes(r):!0}function jv(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||Ge(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||Ge(e.index)||e.scanSort;return{filter:t,sort:r}}function ND(e){return jv(e.ann)}function H9(e){let t=Ge(hH(e)),r=kg(e).length!==0,n=Qx(e).length!==0;return{search:t||r||n}}function wx(e){let r=D(Q(R(R(Y(e),a=>O(a,"properties")),Y),Qe),[]).map(a=>jv(Sa(a[1]))),n=r.some(a=>a.filter),i=r.some(a=>a.sort),o=H9(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function DD(e,t){let r={},n={};return Qe(e).forEach(i=>{let o=i[1];if(o==="")return;let a=i[0],s=t.find(l=>l.key===a);if(s!==void 0){jv(s.ann).filter?r[a]=o:n[a]=o;return}n[a]=o}),[r,n]}function FD(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?jv(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function c4e(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),Qe(e).forEach(o=>{let a=o[1],s=o[0],l=n.find(f=>f.key===s),u=Q(l,f=>f.kind),d;if(u!==void 0&&typeof u!="object")switch(u){case"KBoolean":d=a==="true";break;case"KNumber":d=D(Q(jo(a),f=>f),a);break;default:d=a}else d=a;i[s+"Eq"]=d}),Qe(i).length!==0)return i}function d4e(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return ut([["field",e._0],["direction",t]])}function f4e(e){let t=e.resource,r=vu(t,void 0),n=t.name,i=r.rows,o=t.schema,a=e.resourceSemantics,s=om(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:a,window:s,onOpenRow:($,N)=>{},role:yu},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,m=e.eventSemantics,g=e.eventAccent,v=e.eventWindow,_=e.onOpenEvent,x=e.onCommand,w=xu,E=e.resourceRef,C=e.assignCommand,k={readModelName:f,rows:h,schema:p,semantics:m,accent:g,window:v,onOpenRow:_,onCommand:x,role:w,resourceRef:E,assignCommand:C},A=r.fetchState;return typeof A!="object"?A==="Loading"?b(zf,{}):e.mode.render([d,k]):b(Bs,{detail:A._0,onRetry:()=>r.refetch()})}let h4e=f4e,W9=cr(void 0),p4e=W9.Provider;function m4e(e){return br(p4e,{value:e.refresh,children:e.children})}let ID={make:m4e};function g4e(){return Pt(W9)}function PD(e){try{return xa(localStorage.getItem(e))}catch{return}}function OD(e,t){try{return localStorage.setItem(e,t)}catch{return}}function gr(e){return"var("+e+")"}let wy=S([z("flex"),pe("column"),c("gap",gr(F.lg))]),MD=S([z("flex"),Z("center"),Ze("spaceBetween"),c("margin-bottom",gr(F.sm))]),v4e=S([c("font-size",gr(T.sizeXl)),c("font-weight",gr(T.weightMedium)),c("color",gr(y.textPrimary)),Sn(Ce(0))]),_4e=S([z("flex"),c("gap",gr(F.sm))]),b4e=S([z("flex"),pe("column"),c("gap",gr(F.lg))]),y4e=S([z("flex"),pe("column"),c("gap",gr(F.sm))]),x4e=S([c("font-size",gr(T.sizeSm)),c("font-weight",gr(T.weightMedium)),c("color",gr(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),Sn(Ce(0))]),S4e=S([c("background",gr(y.brand)),c("color",gr(y.textOnBrand)),c("border","none"),c("border-radius",gr(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",gr(T.sizeSm)),c("cursor","pointer")]),E4e=S([z("inlineFlex"),Z("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","0"),c("color",gr(y.brand)),c("font-size",gr(T.sizeSm)),xe("pointer"),c("text-decoration","none"),Je([c("text-decoration","underline")])]),w4e=S([z("flex"),Z("center"),Ze("flexEnd"),c("gap",gr(F.xs)),c("padding-top",gr(F.sm))]),LD=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",gr(X.sm)),c("padding","2px var("+F.sm+")"),c("color",gr(y.textSecondary)),c("font-size",gr(T.sizeSm)),xe("pointer"),Je([c("background",gr(y.surfaceSubtle)),c("color",gr(y.textPrimary))]),lI([c("opacity","0.4"),xe("notAllowed")])]);function k4e(e,t,r){return t!==void 0&&t!==""?[["before",t],["last",r]]:e!==void 0?e!==""?[["first",r],["after",e]]:[["first",r]]:[["first",r]]}function C4e(e,t){let r=D(R(R(Y(e),i=>O(i,"properties")),Y),{}),n={};return Qe(t).forEach(i=>{let o=i[1],a=i[0],s=D(R(R(R(O(r,a),Y),d=>O(d,"type")),ue),"string"),l,u=0;switch(s){case"array":if(o==="")l=[];else try{l=JSON.parse(o)}catch{l=[o]}break;case"boolean":l=o==="true";break;case"integer":case"number":u=1;break;case"object":if(o==="")l=null;else try{l=JSON.parse(o)}catch{l=null}break;default:l=o}u===1&&(l=D(Q(jo(o),d=>d),o)),n[a]=l}),n}let zD={contents:[]},UD={contents:[]};function R4e(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!zD.contents.some(i=>i===n)){zD.contents.push(n),console.warn("[AutoUI] Read model "+t+' declared statusField="'+r+`" but the list-view rows don't include that field; per-row command filtering is disabled.`);return}}function A4e(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!UD.contents.some(i=>i===n)){UD.contents.push(n),console.warn("[AutoUI] Read model "+t+' statusField="'+r+'" value is neither a string nor a TAG-shaped object; per-row command filter cannot match against allowedStates.');return}}let BD={contents:[]};function $4e(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!BD.contents.some(n=>n===r)){BD.contents.push(r),console.warn("[AutoUI] Read model "+t+" produced duplicate row keys — row identity is ambiguous and row clicks may open the wrong row. Give each row a unique id, or annotate the distinguishing field with @subId.");return}}function T4e(e){let t=e.schedulerJoin,r=e.uiHints,n=e.liveDefault,i=e.sortKeyField,o=e.byIdsQueryDocument,a=e.byIdsQueryField,s=e.detailQueryDocument,l=e.singleQueryField,u=e.drillPath,d=e.openRowId,f=e.pluginId,h=e.detailView,p=e.rows,m=e.readModel,g=u!==void 0?u:[],v=n!==void 0?n:!0,_=xi(),x=se(()=>{}),w=x[1],E=se(()=>{}),C=E[1],k=E[0],A=se(()=>({})),$=A[1],N=A[0],M=se(()=>"Loaded"),P=M[1],I=M[0],U=se(()=>{}),B=U[1],q=U[0],W=ov(),J=de(W,!1,H=>H.isLive(m.queryField)),K="reventless.live."+D(f,"default")+"."+m.name,G=se(()=>{let H=PD(K);if(H===void 0)return v;switch(H){case"false":return!1;case"true":return!0;default:return v}}),re=G[1],oe=G[0],_e=()=>{let H=!oe;OD(K,H?"true":"false"),re(ce=>H)},Re=J&&oe,Te=R(r,H=>oo(H,m.name)),He=w4(m.schema,Te),ge=de(R(Te,H=>H.suppress),!1,H=>H.includes(bf)),be;if(t!==void 0&&O6e(!0,m.schema,ge)){let H=v4(bf);be=H!==void 0&&!He.some(ce=>ce.id===H.id)?He.concat([H]):He}else be=He;let mt=b4(f,m.name,void 0),fr=se(()=>mE(mt)),Mt=fr[1],Ei=H=>{_4(mt,H),Mt(ce=>H)},Sr=k4(fr[0],Te,xI(m.schema),be),Eo=t!==void 0&&Sr!==void 0?Sr.id===bf:!1,Er=Ge(h)&&!Eo,tn="reventless.layout."+D(f,"default")+"."+m.name,rn=se(()=>PD(tn)),et=rn[1],le=coe(rn[0],Te,gH(m.schema),Er),$e=W!==void 0&&Re?W.statusFor(Wm(m.queryField))!=="Open":!1,Ue=Re&&!$e,Ye=se(()=>0),j=Ye[1],fe=Ye[0],Fe=We({}),Ie=We(void 0),Ee=We(new Map),ye=H=>{Ee.current.set(H,Date.now())},st=H=>{let ce=Ee.current.get(H);return ce!==void 0?Date.now()-ce<6e4:!1},Ne=o4e(),Rt=j9(Ne.params),dt=_l(),Vt=Q(f,H=>Va(Fs(H,m.name))+Rt),ft=Yx(m.schema),Tr=H=>Q(R(O(H,"id"),ue),ce=>{let me=R(ft,ke=>R(O(H,ke),ue));return me!==void 0?aOe(ce,me):ce}),ir=H=>ft!==void 0?cD(H)[0]:H,wo=H=>{if(ft===void 0)return ut([["id",H]]);let ce=cD(H),me=ce[1],ke=ce[0];return ut(me!==void 0?[["id",ke],["subId",me]]:[["id",ke]])},or=d!==void 0?d:k,jn=H=>f!==void 0?dt(os(f,m.name,H,[])+Rt):C(ce=>H),wi=()=>Vt!==void 0?dt(Vt):C(H=>{}),Hi=wx(m.schema),ki=H9(m.schema),Tt=Hi.hasFilter||Hi.hasSort||Hi.hasSearch,Et=Do(m.schema,void 0),wr=[];Qe(Ne.params).forEach(H=>{let ce=H[1];if(ce==="")return;let me=H[0];if(me==="after"||me==="before"){wr.push(me+"="+ce);return}if(!Tt)return;if(me==="sort"||me==="dir"){wr.push(me+"="+ce);return}if(me==="q"&&ki.search){wr.push(me+"="+ce);return}if(!me.startsWith("f."))return;let ke=me.slice(2);if(de(Et.find(Be=>Be.key===ke),!1,Be=>ND(Be).filter)){wr.push(me+"="+ce);return}});let Ci=wr.toSorted((H,ce)=>H===ce?0:H<ce?-1:1).join("|"),Vr={};if(Tt){let H={};Qe(Ne.params).forEach(Yr=>{let nn=Yr[0];if(nn.startsWith("f.")){H[nn.slice(2)]=Yr[1];return}});let ce=DD(H,Et),me=D(Ne.get("q"),""),ke=c4e(ce[0],me,ki,Et),Be=Ne.get("dir")==="desc"?"Desc":"Asc",wt=FD(Ne.get("sort"),Be,Et),kr=d4e(wt);ae(ke,Yr=>{Vr.filter=Yr}),ae(kr,Yr=>{Vr.orderBy=Yr})}k4e(Ne.get("after"),Ne.get("before"),$0e).forEach(H=>{Vr[H[0]]=H[1]});let Or=NL(m,Vr,Ci,void 0,()=>$(H=>({})),void 0),Nt=Or.refetch,qn=Or.fetchState,ar=Or.pageInfo,ti=Or.setRows,En=Or.rows,Fn=H=>{if(s!==void 0&&l!==void 0&&_!==void 0){P(ce=>"Loading"),Ut(_(s,wo(H)).then(ce=>{let me=R(Y(ce),Xe=>O(Xe,l)),ke=0;return me!==void 0&&it(me)!=="JSONNull"?($(Xe=>{let Be=ut(Qe(Xe));return Be[H]=me,Be}),P(Xe=>"Loaded")):ke=1,ke===1&&($(Xe=>ut(Qe(Xe).filter(Be=>Be[0]!==H))),P(Xe=>({TAG:"Error",_0:"Detail not found"}))),Promise.resolve()}),ce=>(P(me=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}},ta=()=>{if(ae(or,Fn),!Ue)return Nt()};Ae(()=>{let H=d!==void 0?d:k;H!==void 0&&(Ui(O(N,H))?Fn(H):P(ce=>"Loaded"))},[d,k]);let ri=Ra(),_t=hg(),In=W2(),ra=de(R(Na(),H=>H.identity),[],H=>H.groups),Hv=(H,ce)=>Q(Fh(V9(m.schema,ce,m.commands),me=>K9(me.command,ra)),me=>(()=>w(ke=>({command:me.command,rowId:H})))),sk=(H,ce)=>R(R(O(H,"id"),ue),me=>Hv(me,ce)),Rs=(p!==void 0?p:En).map(H=>D(Y(H),{})),vp=Zh(Rs,Et,ri),Md={lookupLabel:(H,ce)=>Xh(vp,H,ri,ce),isMissing:(H,ce)=>ev(vp,H,ri,ce)},ck=Uie(Ne.get("after"),Ne.get("before")),Gv=Bie(ar,ck),Jv=jie(ar,ck),dk=Gv||Jv,C7=Q(f,H=>({pluginId:H,viewName:m.name})),fk=Pie(Et,ri,_t,O,!0,Md,C7,sk).map(H=>{if(!H.sortable||!dk)return H;let ce=de(Et.find(me=>me.key===H.key),!1,me=>ND(me).sort);return{key:H.key,label:H.label,render:H.render,sortable:ce,width:H.width}}),hk=Ne.get("sort"),_p=Ne.get("dir")==="desc"?"Desc":"Asc",pk=H=>ti(ce=>ce.map(me=>{let ke=R(R(Y(me),Be=>O(Be,"id")),ue);if(ke===void 0)return me;let Xe=H.find(Be=>ze(R(R(Y(Be),wt=>O(wt,"id")),ue),ke));return Xe!==void 0?Xe:me})),bp=i!==void 0?ie(En,H=>R(R(Y(H),ce=>O(ce,i)),ue)):[],R7=H=>{let ce=ar.hasNextPage,me=bp.length;if(H===void 0||i===void 0||!ce||me<=0)return!1;let ke=bp[0];if(_p==="Asc"){let Be=ot(bp,ke,(wt,kr)=>wt>kr?wt:kr);return H>Be}let Xe=ot(bp,ke,(Be,wt)=>Be<wt?Be:wt);return H<Xe},A7=()=>{let H=Object.keys(Fe.current);if(Fe.current={},Ie.current=void 0,H.length!==0){if(H.length>10)return Nt();if(a!==void 0&&o!==void 0&&_!==void 0){let ce=ut([["ids",H.map(me=>me)]]);Ut(_(o,ce).then(me=>{let ke=D(R(R(Y(me),Xe=>O(Xe,a)),_r),[]);return pk(ke),Promise.resolve()}),me=>Promise.resolve());return}if(ft!==void 0||l===void 0||s===void 0||_===void 0)return Nt();H.forEach(ce=>{let me=ut([["id",ce]]);Ut(_(s,me).then(ke=>{let Xe=R(Y(ke),Be=>O(Be,l));return Xe!==void 0&&it(Xe)!=="JSONNull"&&pk([Xe]),Promise.resolve()}),ke=>Promise.resolve())})}},mk=H=>{Fe.current[H]=!0;let ce=Ie.current;ce!==void 0&&clearTimeout(ce),Ie.current=setTimeout(A7,150)},gk=H=>{let ce=me=>R(R(Y(me),ke=>O(ke,"id")),ue);ti(me=>{let ke=me.map(wt=>{let kr=ce(wt);if(kr===void 0)return wt;let Yr=H.find(nn=>ze(ce(nn),kr));return Yr!==void 0?Yr:wt}),Xe=ie(ke,ce),Be=H.filter(wt=>{let kr=ce(wt);return kr!==void 0?!Xe.includes(kr):!1});return ke.concat(Be)})},$7=H=>{let ce=En.some(ke=>ze(R(R(Y(ke),Xe=>O(Xe,"id")),ue),H.id));switch(H.changeKind){case"Added":if(st(H.id)){if(Ee.current.delete(H.id),ce)return;{let ke=H.id;if(ft!==void 0)return Nt();if(a!==void 0&&o!==void 0&&_!==void 0){let Be=ut([["ids",[ke]]]);Ut(_(o,Be).then(wt=>{let kr=D(R(R(Y(wt),Yr=>O(Yr,a)),_r),[]);return gk(kr),Promise.resolve()}),wt=>Promise.resolve());return}if(l===void 0||s===void 0||_===void 0)return Nt();let Xe=ut([["id",ke]]);Ut(_(s,Xe).then(Be=>{let wt=R(Y(Be),kr=>O(kr,l));return wt!==void 0&&it(wt)!=="JSONNull"&&gk([wt]),Promise.resolve()}),Be=>Promise.resolve());return}}else return R7(H.sortKeyValue)?void 0:j(ke=>ke+1|0);case"Updated":return ce?mk(H.id):void 0;case"Removed":return ce?ft!==void 0?mk(H.id):ti(ke=>ke.filter(Xe=>qf(R(R(Y(Xe),Be=>O(Be,"id")),ue),H.id))):void 0;case"BulkInvalidated":return j(ke=>0),Nt()}},T7=()=>Nt();Q1(m.queryField,"All",Re,$7,T7);let N7=H=>{if(or===void 0||H.id!==ir(or))return;let ce=H.changeKind;if(ft!==void 0)switch(ce){case"Updated":case"Removed":return Fn(or);case"Added":case"BulkInvalidated":return}else switch(ce){case"Updated":return Fn(or);case"Removed":return B(me=>or);case"Added":case"BulkInvalidated":return}},D7=()=>{if(or!==void 0&&s!==void 0&&l!==void 0&&_!==void 0){Ut(_(s,wo(or)).then(H=>{let ce=R(Y(H),ke=>O(ke,l)),me=0;return ce!==void 0&&it(ce)!=="JSONNull"?($(ke=>{let Xe=ut(Qe(ke));return Xe[or]=ce,Xe}),P(ke=>"Loaded")):me=1,me===1&&B(ke=>or),Promise.resolve()}),H=>Promise.resolve());return}};Q1(m.queryField,{_0:D(Q(or,ir),"")},Re&&Ge(or),N7,D7),Ae(()=>{B(H=>{})},[D(or,"")]);let Qv=D(Ne.get("q"),""),Yv={};Qe(Ne.params).forEach(H=>{let ce=H[0];if(ce.startsWith("f.")){Yv[ce.slice(2)]=H[1];return}});let vk=UPe(Et,Yv),F7=vk.length!==0,I7=Q(hk,H=>({key:H,direction:_p==="Asc"?"Asc":"Desc"})),P7=(H,ce)=>{let me=ce==="Asc"?"asc":"desc";Ne.setMany([["sort",H],["dir",me],["after",""],["before",""]])},_k=H=>Ne.setMany([["q",H],["after",""],["before",""]]),O7=(H,ce)=>Ne.setMany([["f."+H,ce],["after",""],["before",""]]),M7=()=>ae(ar.endCursor,H=>Ne.setMany([["after",H],["before",""]])),L7=()=>ae(ar.startCursor,H=>Ne.setMany([["before",H],["after",""]])),Ld=m.commands.filter(H=>H.level==="Instance"),z7=Ld.length!==0,Vu;if(z7){let me={key:"__actions",label:"",render:ke=>{let Xe=R(O(ke,"id"),ue),Be=m.statusField;Be!==void 0&&(O(ke,Be)!==void 0?Xo(ke,Be)===void 0&&A4e(f,m.name,Be):R4e(f,m.name,Be));let kr=TL(Ld,ke,m.statusField).map(Yr=>({TAG:"Action",label:Yr.label,onClick:()=>w(nn=>({command:Yr,rowId:Xe})),danger:!1}));return b(COe,{items:kr,triggerLabel:"..."})},sortable:!1,width:"56px"};Vu=fk.concat([me])}else Vu=fk;let U7=m.commands.filter(H=>H.level==="Collection"),bk=H=>{let ce=H.map(kr=>D(Y(kr),{})),me=DD(Yv,Et),Xe=Tt&&ki.search?"":Qv,Be=FD(hk,_p,Et),wt;return wt=typeof Be!="object"||Be.TAG==="ServerSort"?[void 0,_p]:[Be._0,Be._1],zPe(LPe(MPe(ce,Et,me[1]),Et,Xe),Et,wt[0],wt[1])},yk=H=>{if(Sr!==void 0&&Sr.id!==cs){let ce=Nn(m.schema,R(r,ko=>ds(ko,m.name)),{field:m.labelField,source:m.labelFieldSource}),me=Q(ce.statusField,ko=>Y2(ko,Ld,R(Te,$s=>$s.transitions))),ke=G2(_,Ld,m.name,Re,()=>Nt(),ri,In.onNotice,ye),Xe=bk(H).map(ko=>ko),Be=bK(Jv,Gv);if(t!==void 0&&Sr.id===bf){let ko=Nn(t.resource.schema,R(r,$s=>ds($s,t.resource.name)),{field:t.resource.labelField,source:t.resource.labelFieldSource});return b(h4e,{mode:Sr,resource:t.resource,resourceSemantics:ko,resourceRef:t.resourceRef,assignCommand:L9(Ld,t.resourceRef),eventReadModelName:m.name,eventSchema:m.schema,eventRows:Xe,eventWindow:Be,eventSemantics:ce,eventAccent:R(Te,$s=>$s.accent),onOpenEvent:($s,K7)=>ae(R(Y(K7),Tr),jn),onCommand:ke})}let wt=m.name,kr=m.schema,Yr=R(Te,ko=>ko.accent),nn=Be,Ia=(ko,$s)=>ae(R(Y($s),Tr),jn),yp=Q(me,ko=>ke),e_={readModelName:wt,rows:Xe,schema:kr,semantics:ce,accent:Yr,window:nn,onOpenRow:Ia,onCommand:yp,statusCommandFor:me,fillSlot:Hv};return Sr.render([e_])}else{let ce=bk(H),me=Q(h,nn=>(Ia=>ae(Tr(Ia),jn))),ke=nn=>D(Tr(nn),JSON.stringify(nn)),Xe=(nn,Ia)=>{let yp=Ia.map(ke),Zv={};return yp.forEach(e_=>{Zv[e_]=!0}),Object.keys(Zv).length!==yp.length&&$4e(f,m.name),b(im,{columns:nn,data:Ia,keyFn:ke,sortState:I7,onSort:P7,onRowClick:me,activeKey:or})},Be=pH(m.schema);if(Be===void 0)return Xe(Vu,ce);let wt=OOe(ce,Be,Wo(m.schema,Be)),kr=wt.length;if(kr===1||kr===0)return Xe(Vu,ce);let Yr=Vu.filter(nn=>nn.key!==Be);return b("div",{children:wt.map(nn=>{let Ia=nn[0];return L("div",{children:[b("div",{children:yt(Ia),className:x4e}),Xe(Yr,nn[1])],className:y4e},Ia)}),className:b4e})}},B7=p!==void 0?yk(p):typeof qn!="object"?qn==="Loading"?b(zf,{}):yk(En):b(Bs,{detail:qn._0,onRetry:()=>Nt()}),As;if(or!==void 0&&h!==void 0){let ce=(p!==void 0?p:En).find(Xe=>ze(R(Y(Xe),Tr),or)),me=O(N,or);As=[or,h,me!==void 0?me:ce]}else As=void 0;let xk=H=>{let ce=H[2],me=H[0];if(ze(q,me))return b(Bs,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>wi()});if(ce!==void 0)return H[1](ir(me),g,nr(ce));let ke=0;if(typeof qn!="object"){if(qn==="Loading")return b(zf,{});if(typeof I=="object")return b(Bs,{detail:I._0,onRetry:()=>Nt()});if(I!=="Loading")return b(Bs,{title:"Row not found",detail:"The row data is no longer in the current page."});ke=2}else ke=2;return ke===2&&typeof I!="object"&&I==="Loading"?b(zf,{}):b(Bs,{detail:qn._0,onRetry:()=>Nt()})},j7=Er?b("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(H=>{let ce=H[1],me=H[0],ke;return ke=le==="Full"?me==="full":me==="split",L("button",{children:[b("span",{children:H[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),b("span",{children:ce})],className:ke?ff.Style.btnActive:ff.Style.btn,title:ce,onClick:Xe=>{OD(tn,me),et(Be=>me)}},me)}),"aria-label":"Layout",className:ff.Style.group,role:"group"}):null,Sk=L("div",{children:[b("h2",{children:m.name,className:v4e}),L("div",{children:[be.length>1?b(ff.make,{modes:be,activeId:de(Sr,cs,H=>H.id),onSelect:Ei}):null,j7,b(K6e,{live:oe,canBeLive:J,reconnecting:$e,onToggle:_e}),U7.map(H=>b("button",{children:"+ "+H.label,className:S4e,onClick:ce=>w(me=>({command:H,rowId:void 0}))},H.name))],className:_4e})],className:MD}),q7=L(Gr,{children:[F7?b(C9,{filters:vk,onFilterChange:O7,searchValue:Qv,onSearchChange:_k}):b(k9,{value:Qv,onChange:_k}),fe>0?b(J6e,{count:fe,onClick:()=>{j(H=>0),Ne.setMany([["after",""],["before",""]]),Nt()}}):null]}),V7=dk?L("div",{children:[b("button",{children:"‹ Prev",className:LD,disabled:!Jv,onClick:H=>L7()}),b("button",{children:"Next ›",className:LD,disabled:!Gv,onClick:H=>M7()})],className:w4e}):null,Ek=L(Gr,{children:[q7,In.element,B7,V7]}),Xv;if(le==="Full")Xv=As!==void 0?b(ID.make,{refresh:ta,children:L("div",{children:[b("div",{children:b("button",{children:"← "+m.name,className:E4e,onClick:H=>wi()}),className:MD}),xk([As[0],As[1],As[2]])],className:wy})}):L("div",{children:[Sk,Ek],className:wy});else{let H=As!==void 0?xk(As):b(ad,{title:"Select an item",description:"Choose a row on the left to see its details here."});Xv=b(ID.make,{refresh:ta,children:L("div",{children:[Sk,b(TOe,{master:Ek,detail:H})],className:wy})})}return L(Gr,{children:[Xv,de(x[0],null,H=>b(N2,{isOpen:!0,onClose:()=>w(ce=>{}),title:H.command.label,children:b(ek,{schema:H.command.schema,aggregateId:H.rowId,aggregateIdField:H.command.aggregateIdField,injectNewId:H.command.level==="Collection",refFields:H.command.refFields,onSubmit:ce=>{if(_!==void 0){let me=H.rowId;return me!==void 0?ye(me):ae(O(ce,D(H.command.aggregateIdField,"id")),ye),Ut(_(H.command.mutationDocument,C4e(H.command.schema,ce)).then(ke=>{let Xe=Cd(ke);if(typeof Xe!="object")return Xe==="Accepted"?(w(Be=>{}),Ue||Nt(),Promise.resolve("Ok")):(w(Be=>{}),Ue||setTimeout(()=>Nt(),bOe),Promise.resolve("Ok"));{let Be=Xe._0;return mp(_,ri,Be.errorCode,Be.detail).then(wt=>Promise.resolve({TAG:"Err",_0:wt}))}}),ke=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return w(me=>{}),Promise.resolve("Ok")},submitLabel:"Execute"})}))]})}let N4e=T4e;function D4e(e,t,r){if(e.length<2)return[];let n=ot(e,Number.MAX_VALUE,(s,l)=>s<l?s:l),o=ot(e,Number.MIN_VALUE,(s,l)=>s>l?s:l)-n,a=t/(e.length-1|0);return e.map((s,l)=>({x:l*a,y:o===0?r/2:r-(s-n)/o*r}))}function F4e(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function I4e(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,a=t!==void 0?t:"",s=D4e(e.values,i,o),l=a===""?"var("+y.brand+")":a;return s.length<2?null:b("svg",{children:b("polyline",{fill:"none",points:F4e(s),stroke:l,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),style:{display:"block",overflow:"visible"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let P4e=I4e;function Gn(e){return"var("+e+")"}let O4e=S([z("flex"),pe("column"),c("gap",Gn(F.xs)),c("padding",Gn(F.lg)),c("background",Gn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Gn(X.md))]),M4e=S([c("color",Gn(y.textSecondary)),c("font-size",Gn(T.sizeSm)),c("font-weight",Gn(T.weightMedium))]),L4e=S([z("flex"),Z("baseline"),c("gap",Gn(F.sm))]),z4e=S([c("color",Gn(y.textPrimary)),c("font-size",Gn(T.sizeXxl)),c("font-weight",Gn(T.weightBold)),c("line-height",Gn(T.lineHeightTight))]);function U4e(e){switch(e){case"Up":return y.success;case"Down":return y.error;case"Neutral":return y.textDisabled}}function B4e(e){return S([c("color",Gn(U4e(e))),c("font-size",Gn(T.sizeSm)),c("font-weight",Gn(T.weightMedium))])}function j4e(e){let t=e.trendLabel,r=e.trend,n;if(r!==void 0&&t!==void 0){let i;switch(r){case"Up":i="^";break;case"Down":i="v";break;case"Neutral":i="-";break}n=b("span",{children:i+" "+t,className:B4e(r)})}else n=null;return L("div",{children:[b("div",{children:e.label,className:M4e}),L("div",{children:[b("span",{children:e.value,className:z4e}),n],className:L4e}),de(e.sublabel,null,i=>b("div",{children:i,style:{color:"var("+y.textDisabled+")",fontSize:"var("+T.sizeXs+")"}})),D(e.footer,null)],className:O4e})}let q4e=j4e;function G9(e){return"var("+e+")"}let V4e=S([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",G9(F.md))]),K4e=S([xe("pointer"),c("border-radius",G9(X.md)),Je([c("filter","brightness(0.98)")])]);function H4e(e){let t=e.kpis;return t.length===0?null:b("div",{children:t.map(r=>{let n=Q(r.spark,a=>b(P4e,{values:a,width:120,height:24})),i=b(q4e,{label:r.label,value:r.value,trend:r.trend,trendLabel:r.trendLabel,sublabel:r.sublabel,footer:n}),o=r.onOpen;return o!==void 0?b("div",{children:i,className:K4e,role:"button",tabIndex:0,onKeyDown:a=>{if(a.key==="Enter")return o()},onClick:a=>o()},r.key):b("div",{children:i},r.key)}),className:V4e})}let W4e=H4e,sg=["var("+y.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function J9(e,t){return D(e.color,sg[Bo(t,sg.length)])}function G4e(e){let t=ot(e,0,(n,i)=>n+(i.value>0?i.value:0));if(t<=0)return[];let r={contents:0};return e.map(n=>{let i=r.contents,o=(n.value>0?n.value:0)/t;return r.contents=i+o,[i,i+o]})}function A0(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function Hr(e){return(Math.round(e*1e3)/1e3).toString()}function ky(e,t,r,n,i,o){let a=A0(e,t,r,i),s=a[1],l=a[0],u=A0(e,t,r,o),d=u[1],f=u[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+Hr(e)+" "+Hr(t)+" L "+Hr(l)+" "+Hr(s)+" A "+Hr(r)+" "+Hr(r)+" 0 "+h+" 1 "+Hr(f)+" "+Hr(d)+" Z";let p=A0(e,t,n,i),m=A0(e,t,n,o);return"M "+Hr(l)+" "+Hr(s)+" A "+Hr(r)+" "+Hr(r)+" 0 "+h+" 1 "+Hr(f)+" "+Hr(d)+" L "+Hr(m[0])+" "+Hr(m[1])+" A "+Hr(n)+" "+Hr(n)+" 0 "+h+" 0 "+Hr(p[0])+" "+Hr(p[1])+" Z"}function J4e(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,a=G4e(n);if(a.length===0)return null;let s=i/2,l=i/2-1,u=o>0?l*o:0;return b("svg",{children:a.map((d,f)=>{let h=d[1],p=d[0],m=n[f],g=J9(m,f),v=h-p>=.999?ky(s,s,l,u,p,p+.5)+" "+ky(s,s,l,u,p+.5,h):ky(s,s,l,u,p,h);return b("path",{children:b("title",{children:m.label}),d:v,fill:g},m.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let Q4e=J4e,Y4e=["var("+y.brand+")","var("+y.success+")"];function X4e(e){let t=e.flatMap(i=>i.values),r=ot(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=ot(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function Z4e(e){let t=e.height,r=e.width,n=e.series,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0||n.every(m=>m.values.length<2))return null;let a=X4e(n),s=a[0],l=a[1]-s,u=l===0?1:l,d=o-16,f=ot(n,0,(m,g)=>m>g.values.length?m:g.values.length),h=i/(f-1|0),p=8+d;return b("svg",{children:n.map((m,g)=>{let v=D(m.color,D(Y4e[g],"var("+y.brand+")")),x=m.values.map((C,k)=>{let A=k*h,$=8+d-(C-s)/u*d;return[A,$]}).map(C=>C[0].toString()+","+C[1].toString()).join(" "),w=(m.values.length-1|0)*h,E="0,"+p.toString()+" "+x+(" "+w.toString()+","+p.toString());return L("g",{children:[b("polygon",{fill:v,fillOpacity:"0.15",points:E,stroke:"none"}),b("polyline",{fill:"none",points:x,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},m.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let eLe=Z4e;function tLe(e){let t=e.size,r=t!==void 0?t:120;return b(Q4e,{slices:e.slices,size:r,innerRatio:.6})}let rLe=tLe;function Xl(e){return"var("+e+")"}function nLe(e){return S([z("flex"),pe("column"),Z("center"),c("gap","2px"),c("width","100%"),c("max-width",e.toString()+"px")])}let iLe=S([qt("relative"),c("width","100%"),c("line-height","0")]),oLe=S([qt("absolute"),c("left","0"),c("right","0"),c("bottom","0"),c("text-align","center"),c("line-height","1.1"),c("font-size",Xl(T.sizeXl)),c("font-weight",Xl(T.weightMedium)),c("color",Xl(y.textPrimary))]),aLe=S([z("flex"),Ze("spaceBetween"),c("width","100%"),c("font-size",Xl(T.sizeXs)),c("color",Xl(y.textDisabled))]),sLe=S([c("font-size",Xl(T.sizeSm)),c("color",Xl(y.textSecondary))]);function lLe(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function wn(e){return(Math.round(e*100)/100).toString()}function jD(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function qD(e,t,r,n,i){let o=jD(e,t,r,n),a=jD(e,t,r,i);return"M "+wn(o[0])+" "+wn(o[1])+" A "+wn(r)+" "+wn(r)+" 0 0 1 "+wn(a[0])+" "+wn(a[1])}function uLe(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,a=i!==void 0?i:0,s=t!==void 0?t:160;if(n<=a)return null;let l=lLe(o,a,n),u=s*.09,d=s/2,f=s/2-u/2,h=f+u/2,p=h+u/2;return L("div",{children:[L("div",{children:[L("svg",{children:[b("path",{d:qD(d,h,f,0,1),fill:"none",stroke:"var("+y.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:wn(u)}),l<=0?null:b("path",{d:qD(d,h,f,0,l),fill:"none",stroke:"var("+y.brand+")",strokeLinecap:"round",strokeWidth:wn(u)})],"aria-label":wn(o)+" of "+wn(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:wn(p),width:wn(s),viewBox:"0 0 "+wn(s)+" "+wn(p)}),b("div",{children:D(e.display,wn(o)),className:oLe})],className:iLe}),L("div",{children:[b("span",{children:wn(a)}),b("span",{children:wn(n)})],className:aLe}),r!==void 0?b("div",{children:r,className:sLe}):null],className:nLe(s)})}let cLe=uLe;function Uf(e){return"var("+e+")"}let dLe=S([z("flex"),pe("column"),c("gap","6px")]),fLe=S([c("overflow-x","auto")]),hLe=S([z("flex"),c("gap","4px"),Z("flexStart")]);function pLe(e){return S([z("grid"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px"),Z("center"),c("font-size",Uf(T.sizeXs)),c("color",Uf(y.textDisabled)),c("line-height","1")])}function mLe(e){return S([z("grid"),c("grid-auto-flow","column"),c("grid-auto-columns",e.toString()+"px"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px")])}function gLe(e){return S([c("border-radius","2px"),c("border","1px solid var("+y.borderSubtle+")"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let vLe=S([c("visibility","hidden")]),_Le=S([z("flex"),Z("center"),_i("wrap"),c("gap",Uf(F.md)),c("font-size",Uf(T.sizeXs)),c("color",Uf(y.textSecondary))]),bLe=S([z("flex"),Z("center"),c("gap","4px")]);function yLe(e){return S([c("width","10px"),c("height","10px"),c("border-radius","2px"),c("border","1px solid var("+y.borderSubtle+")"),c("background","color-mix(in srgb, var("+y.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function xLe(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function SLe(e){let t=e[0];if(t===void 0)return[];let r=il(xLe(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return il(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function ELe(e){return ot(e,0,(t,r)=>r.value>t?r.value:t)}function VD(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function wLe(e){return e%2===0?D(nS[e],""):""}function kLe(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=SLe(r);if(i.length===0)return null;let o=ELe(r),a=r[0],s=r[r.length-1|0],l=a!==void 0&&s!==void 0?eo(a.time)+" – "+eo(s.time):"";return L("div",{children:[b("div",{children:L("div",{children:[b("div",{children:il(7,u=>b("span",{children:wLe(u)},u.toString())),className:pLe(n)}),b("div",{children:i.map((u,d)=>u.map((f,h)=>f!==void 0?b("div",{className:gLe(zz(f.value,o)),title:as(f.time)+" "+eo(f.time)+": "+VD(f.value)},f.time.toString()):b("div",{className:vLe},"b:"+d.toString()+":"+h.toString()))),className:mLe(n)})],className:hLe}),className:fLe}),L("div",{children:[b("span",{children:l}),L("span",{children:["less",Uz.map(u=>b("span",{className:yLe(u)},u.toString())),"more (max "+VD(o)+")"],className:bLe})],className:_Le})],className:dLe})}let CLe=kLe;function gi(e){return"var("+e+")"}let RLe=S([z("flex"),pe("column"),c("gap","2px")]),ALe=S([z("flex"),pe("column"),c("gap","3px")]),$Le=S([z("flex"),Ze("spaceBetween"),Z("baseline"),c("gap",gi(F.sm)),c("font-size",gi(T.sizeSm))]),TLe=S([c("color",gi(y.textPrimary))]),NLe=S([c("color",gi(y.textPrimary)),c("font-weight",gi(T.weightMedium)),c("white-space","nowrap")]),DLe=S([c("color",gi(y.textSecondary)),c("font-weight",gi(T.weightNormal))]),FLe=S([c("background",gi(y.surfaceSubtle)),c("border-radius",gi(X.sm)),c("height","14px"),fs("hidden")]);function ILe(e,t){return S([c("background",t),c("border-radius",gi(X.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let PLe=S([c("padding","2px 0 4px"),c("font-size",gi(T.sizeXs)),c("color",gi(y.textDisabled))]),OLe=S([c("padding-top","4px"),c("font-size",gi(T.sizeXs)),c("color",gi(y.textDisabled))]);function KD(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function MLe(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function LLe(e){let t=de(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:KD(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?KD(i.value-r.value,i.value):void 0}})}function zLe(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=LLe(t),i=de(t[0],0,o=>o.value);return L("div",{children:[t.map((o,a)=>{let s=n[a],l=i<=0?0:o.value/i*100,u=R(s,d=>d.dropOff);return L("div",{children:[u!==void 0?b("div",{children:"↓ "+u.toString()+"% drop-off",className:PLe}):null,L("div",{children:[L("div",{children:[b("span",{children:o.label,className:TLe}),L("span",{children:[MLe(o.value),a===0?null:b("span",{children:" · "+de(s,0,d=>d.conversion).toString()+"%",className:DLe})],className:NLe})],className:$Le}),b("div",{children:b("div",{className:ILe(l,D(o.color,"var("+y.brand+")"))}),className:FLe})],className:ALe})]},o.label+":"+a.toString())}),r!==void 0?b("div",{children:r,className:OLe}):null],className:RLe})}let ULe=zLe;function Bf(e){return"var("+e+")"}let BLe=S([z("flex"),pe("column"),c("gap","2px")]),jLe=S([z("flex"),c("gap","4px")]),Q9=[c("font-size",Bf(T.sizeXs)),c("color",Bf(y.textDisabled)),c("white-space","nowrap")],qLe=S(Q9.concat([z("flex"),pe("column"),Ze("spaceBetween"),c("text-align","right")]));function VLe(e){return S(Q9.concat([z("flex"),Ze("spaceBetween"),c("margin-left",e.toString()+"px")]))}let KLe=S([z("flex"),Ze("spaceBetween"),c("gap",Bf(F.sm)),c("font-size",Bf(T.sizeXs)),c("color",Bf(y.textSecondary))]);function HLe(e){let t=e[0];if(t!==void 0)return ot(e,{xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y},(r,n)=>({xMin:n.x<r.xMin?n.x:r.xMin,xMax:n.x>r.xMax?n.x:r.xMax,yMin:n.y<r.yMin?n.y:r.yMin,yMax:n.y>r.yMax?n.y:r.yMax}))}function Mr(e){return(Math.round(e*100)/100).toString()}function HD(e,t,r){return r<=t?.5:(e-t)/(r-t)}function WLe(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,a=r!==void 0?r:320,s=t!==void 0?t:200,l=HLe(o);if(l===void 0)return null;let u=3.5+1,d=a-u*2,f=s-u*2,h,p=0;return i!==void 0||n!==void 0?p=1:h=null,p===1&&(h=L("div",{children:[b("span",{children:"↑ "+D(n,"y")}),b("span",{children:D(i,"x")+" →"})],className:KLe})),L("div",{children:[L("div",{children:[L("div",{children:[b("span",{children:Mr(l.yMax)}),b("span",{children:Mr(l.yMin)})],className:qLe,style:{width:"34px"}}),L("svg",{children:[b("line",{stroke:"var("+y.borderSubtle+")",strokeWidth:"1",x1:Mr(u),x2:Mr(a-u),y1:Mr(s-u),y2:Mr(s-u)}),b("line",{stroke:"var("+y.borderSubtle+")",strokeWidth:"1",x1:Mr(u),x2:Mr(u),y1:Mr(u),y2:Mr(s-u)}),o.map((m,g)=>{let v=u+HD(m.x,l.xMin,l.xMax)*d,_=u+(1-HD(m.y,l.yMin,l.yMax))*f;return b("circle",{children:b("title",{children:m.label+" — "+D(i,"x")+": "+Mr(m.x)+", "+D(n,"y")+": "+Mr(m.y)}),cx:Mr(v),cy:Mr(_),fill:D(m.color,"var("+y.brand+")"),fillOpacity:"0.75",r:Mr(3.5)},m.label+":"+g.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Mr(s),width:Mr(a),viewBox:"0 0 "+Mr(a)+" "+Mr(s)})],className:jLe}),L("div",{children:[b("span",{children:Mr(l.xMin)}),b("span",{children:Mr(l.xMax)})],className:VLe(38)}),h],className:BLe})}let GLe=WLe;function Uo(e){return"var("+e+")"}let JLe=S([z("flex"),pe("column"),c("gap","6px"),Sn(Ce(0)),c("padding","0"),c("list-style","none")]),Y9=[z("grid"),c("grid-template-columns","1.5rem 1fr auto"),Z("center"),c("gap",Uo(F.sm)),c("font-size",Uo(T.sizeSm)),c("color",Uo(y.textPrimary))],QLe=S(Y9),YLe=S(Y9.concat([xe("pointer"),c("background","transparent"),c("border","none"),c("padding","2px 0"),c("text-align","left"),c("width","100%"),c("font","inherit"),Je([c("color",Uo(y.brand))])])),XLe=S([c("align-self","start"),c("font-size",Uo(T.sizeXs)),c("color",Uo(y.textDisabled)),c("text-align","right"),c("font-variant-numeric","tabular-nums")]),ZLe=S([z("flex"),pe("column"),c("gap","3px"),oI(Ce(0))]),e8e=S([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),t8e=S([c("background",Uo(y.surfaceSubtle)),c("border-radius",Uo(X.sm)),c("height","6px"),fs("hidden")]);function r8e(e){return S([c("background",Uo(y.brand)),c("border-radius",Uo(X.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let n8e=S([c("align-self","start"),c("font-weight",Uo(T.weightMedium)),c("white-space","nowrap"),c("font-variant-numeric","tabular-nums")]);function i8e(e,t){return t<=0||e<=0?0:e/t*100}function o8e(e){let t=e.limit,r=t!==void 0?t:10,n=e.entries.slice(0,r);if(n.length===0)return null;let i=ot(n,0,(o,a)=>a.value>o?a.value:o);return b("ol",{children:n.map((o,a)=>{let s=L(Gr,{children:[b("span",{children:(a+1|0).toString(),className:XLe}),L("span",{children:[b("span",{children:o.label,className:e8e,title:o.label}),b("span",{children:b("span",{className:r8e(i8e(o.value,i))}),className:t8e})],className:ZLe}),b("span",{children:o.display,className:n8e})]}),l=o.onOpen;return b("li",{children:l!==void 0?b("button",{children:s,className:YLe,type:"button",onClick:u=>l()}):b("div",{children:s,className:QLe})},o.key)}),className:JLe})}let a8e=o8e;function s8e(e){return ot(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function l8e(e){let t=e.height,r=e.width,n=e.bars,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0)return null;let a=ot(n,0,(f,h)=>{let p=s8e(h);return f>p?f:p}),s=a===0?1:a,l=n.length,u=(i-2*(l+1|0))/l,d=o-4;return b("svg",{children:n.map((f,h)=>{let p=2+h*(u+2),m={contents:o};return b("g",{children:f.segments.map((g,v)=>{let _=g.value>0?g.value:0,x=_/s*d,w=m.contents-x;return m.contents=w,_===0?null:b("rect",{children:b("title",{children:f.label+" — "+g.key+": "+_.toString()}),height:x.toString(),width:u.toString(),fill:D(g.color,"var("+y.brand+")"),x:p.toString(),y:w.toString()},g.key+":"+v.toString())})},f.label+":"+h.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let u8e=l8e;function vr(e){return"var("+e+")"}let c8e=S([z("flex"),pe("column"),c("gap",vr(F.lg))]),d8e=S([c("font-size",vr(T.sizeXl)),c("font-weight",vr(T.weightMedium)),c("color",vr(y.textPrimary)),Sn(Ce(0))]),f8e=S([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),c("gap",vr(F.md))]),lc=S([z("flex"),pe("column"),c("gap",vr(F.sm)),c("padding",vr(F.lg)),c("background",vr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",vr(X.md))]),uc=S([c("font-size",vr(T.sizeSm)),c("font-weight",vr(T.weightMedium)),c("color",vr(y.textSecondary))]),h8e=S([z("flex"),Z("center"),c("gap",vr(F.lg))]),WD=S([z("flex"),pe("column"),c("gap","4px"),c("font-size",vr(T.sizeSm)),c("color",vr(y.textSecondary))]),GD=S([z("flex"),Z("center"),c("gap","6px")]);function JD(e){return S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let QD=S([c("font-size",vr(T.sizeXs)),c("color",vr(y.textDisabled))]),p8e=S([z("flex"),Ze("spaceBetween"),Z("center"),c("gap",vr(F.sm))]),m8e=S([z("inlineFlex"),c("gap",vr(F.xs))]);function g8e(e){return S([c("background",e?vr(y.surfaceSubtle):"transparent"),c("border","1px solid var("+y.border+")"),c("border-radius",vr(X.sm)),c("padding","2px var("+F.sm+")"),c("font-size",vr(T.sizeXs)),c("color",vr(e?y.textPrimary:y.textSecondary)),xe("pointer")])}function lg(e,t){return R(O(e,t),r=>{let n=Bi(r);return n!==void 0?n:Q(Yg(r),i=>Une(i[0],i[1]))})}function gp(e){return e.map(t=>D(Y(t),{}))}function kx(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=ie(gp(e),o=>lg(o,r)),i=ot(n,0,(o,a)=>o+a);return t==="sum"?i:n.length===0?0:i/n.length}function ug(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function v8e(e,t,r){return fI(e,r&&(t==="count"||t==="sum"))}function _8e(e,t,r,n){return r?t==="avg"?e+" · avg of the first "+n.toString()+" loaded":e+" · over the first "+n.toString()+" loaded":e}function Ba(e){let t=D(e.aggregate,"count"),r=e.label;if(r!==void 0)return r;let n=e.field;switch(t){case"avg":return n!==void 0?e.view+" — avg "+yt(n):e.view;case"sum":return n!==void 0?e.view+" — total "+yt(n):e.view;default:return e.view}}function X9(e,t,r,n){let i=il(r,o=>[]);return gp(e).forEach(o=>ae(R(wu(t,o),Dn),a=>{let s=Math.floor((n-a)/864e5)|0;if(s>=0&&s<r)return ae(i[(r-1|0)-s|0],l=>{l.push(o)})})),i}function Cx(e,t,r,n,i,o){return X9(e,t,r,n).map(a=>kx(a.map(s=>s),i,o))}function Z9(e,t){return ie(gp(e),r=>Xo(r,t))}function e7(e,t,r){let n=Wo(t,r),i=ot(e.filter(o=>!n.includes(o)),[],(o,a)=>o.includes(a)?o:o.concat([a]));return n.concat(i)}function b8e(e,t,r){let n=Z9(e,r);return ie(e7(n,t,r),i=>{let o=n.filter(a=>a===i).length;if(o!==0)return{label:yt(i),value:o}})}function t7(e){return sg[Bo(e,sg.length)]}function y8e(e,t,r,n,i,o){let a=X9(e,t,r,n),s=f=>ie(f,h=>Xo(h,o)),l=a.flatMap(s),u=e7(l,i,o).filter(f=>l.some(h=>h===f)),d=a.map((f,h)=>{let p=s(f);return{label:as(n-((r-1|0)-h|0)*864e5),segments:u.map((m,g)=>({key:yt(m),value:p.filter(v=>v===m).length,color:t7(g)}))}});return{statuses:u,bars:d}}function x8e(e,t,r){let n=Wo(t,r),i=Z9(e,r),o=ie(i,a=>{let s=n.indexOf(a);if(!(s<0))return s});return{stages:n.map((a,s)=>({label:yt(a),value:o.filter(l=>l>=s).length})),excluded:i.length-o.length|0}}function S8e(e,t){return Q($r(e).find(r=>r[0]===t),r=>r[1])}function r7(e,t){return Q(O(e.semantics,t),r=>r.semantic)}function E8e(e,t,r){let n=S8e(e,t);if(n===void 0)return;let i=Wf(n,"maximum");if(i===void 0)return ze(r7(r,t),"Percent")?{min:0,max:100}:void 0;let o=D(Wf(n,"minimum"),0);if(i>o)return{min:o,max:i}}function YD(e,t,r){let n=r7(e,t);if(n===void 0)return ug(r);switch(n){case"Percent":return r4(r);case"Bytes":return n4(r);case"Duration":return nE(r);case"Currency":case"Money":return rE(r);default:return ug(r)}}function w8e(e,t,r,n){return ie(gp(e),i=>Q(lg(i,t),o=>{let a=D(R(O(i,"id"),ue),"");return{id:a,label:D(R(O(i,r),ue),a===""?"—":a),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function k8e(e,t,r,n){return ie(gp(e),i=>{let o=lg(i,t),a=lg(i,r);if(o!==void 0&&a!==void 0)return{label:D(R(O(i,n),ue),D(R(O(i,"id"),ue),"—")),x:o,y:a}})}function C8e(e,t,r,n,i,o){return Cx(e,t,r,n,i,o).map((a,s)=>({time:Jn(n-((r-1|0)-s|0)*XI),value:a}))}function R8e(e){let t=se(()=>"Days30"),r=t[1],n=t[0],i=(a,s)=>b("button",{children:s,className:g8e(n===a),type:"button",onClick:l=>r(u=>a)}),o;return o=n==="Days30"?e.body:b(CLe,{days:e.yearDays}),L("div",{children:[L("div",{children:[b("span",{children:e.title,className:uc}),L("div",{children:[i("Days30","30 days"),i("Year","Year")],className:m8e})],className:p8e}),o],className:lc})}function A8e(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,a=e.pluginId,s=t!==void 0?t:{},l=_l(),u=xl(),d=ie(ot(o.map(I=>I.view),[],(I,U)=>I.includes(U)?I:I.concat([U])),I=>i.find(U=>U.name===I)),f=d.map(I=>{let U=Zm(s,I.name,u),B=vu(I,U&&Ui(r));return[I,U,B]}),h=I=>r!==void 0?D(O(r,I),[]):de(f.find(U=>U[0].name===I),[],U=>U[2].rows),p=I=>r!==void 0?!1:de(f.find(U=>U[0].name===I),!1,U=>U[2].canLoadMore),m=Date.now(),g=ie(o,I=>Q(d.find(U=>U.name===I.view?Zm(s,U.name,u):!1),U=>({metric:I,readModel:U,rows:h(U.name),partial:p(U.name),semantics:Nn(U.schema,R(n,B=>ds(B,U.name)),{field:U.labelField,source:U.labelFieldSource})}))),v=g.map((I,U)=>{let B=D(I.metric.aggregate,"count"),q=Q(I.semantics.dateSpan,W=>Cx(I.rows,W,14,m,B,I.metric.field));return{key:U.toString()+":"+I.readModel.name,label:Ba(I.metric),value:v8e(ug(kx(I.rows,B,I.metric.field)),B,I.partial),sublabel:_8e(I.readModel.name,B,I.partial,I.rows.length),spark:q,onOpen:()=>l(Va(Fs(a,I.readModel.name)))}}),_=I=>{let U=I.readModel.statusField;return U!==void 0?U:I.semantics.statusField},x=ie(g,I=>Q(I.semantics.dateSpan,U=>{let B=D(I.metric.aggregate,"count"),q=Ba(I.metric)+" — trend",W=_(I),J;if(B==="count"&&W!==void 0){let G=y8e(I.rows,U,30,m,I.readModel.schema,W),re=G.statuses;J=re.length===0?void 0:L(Gr,{children:[b(u8e,{bars:G.bars}),b("div",{children:re.map((oe,_e)=>L("span",{children:[b("span",{className:JD(t7(_e))}),yt(oe)],className:GD},oe)),className:WD})]})}else J=void 0;let K;if(J!==void 0)K=J;else{let G=Cx(I.rows,U,30,m,B,I.metric.field);K=b(eLe,{series:[{label:Ba(I.metric),values:G}]})}return b(R8e,{title:q,body:K,yearDays:C8e(I.rows,U,365,m,B,I.metric.field)},"trend:"+Ba(I.metric))})),w=ie(g,I=>{let U=I.metric.aggregate,B=I.metric.field;if(U==="avg"&&B!==void 0)return Q(E8e(I.readModel.schema,B,I.semantics),q=>{let W=kx(I.rows,"avg",B);return L("div",{children:[b("span",{children:Ba(I.metric),className:uc}),b(cLe,{value:W,min:q.min,max:q.max,display:YD(I.semantics,B,W),caption:I.readModel.name+" · "+yt(B)})],className:lc},"gauge:"+Ba(I.metric))})}),E=[],C=ie(g,I=>{let U=I.metric.aggregate,B=I.metric.field;if(U===void 0)return;switch(U){case"avg":case"sum":break;default:return}if(B===void 0||E.includes(I.readModel.name+":"+B))return;E.push(I.readModel.name+":"+B);let q=w8e(I.rows,B,I.readModel.labelField,10).map(W=>({key:W.id===""?W.label:W.id,label:W.label,display:YD(I.semantics,B,W.value),value:W.value,onOpen:W.id===""?void 0:()=>l(os(a,I.readModel.name,W.id,[]))}));if(q.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — top by "+yt(B),className:uc}),b(a8e,{entries:q})],className:lc},"top:"+I.readModel.name+":"+B)}),k=ie(g,I=>{let U=I.metric.viz,B=I.metric.field,q=I.metric.xField;if(U===void 0||U!=="scatter"||B===void 0||q===void 0)return;let W=k8e(I.rows,q,B,I.readModel.labelField);if(W.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — "+yt(B)+" by "+yt(q),className:uc}),b(GLe,{points:W,xLabel:yt(q),yLabel:yt(B)})],className:lc},"scatter:"+Ba(I.metric))}),A=ie(g,I=>{let U=I.metric.viz,B=_(I);if(U===void 0||U!=="funnel"||B===void 0)return;let q=x8e(I.rows,I.readModel.schema,B),W=q.stages;if(W.length===0)return;let J=q.excluded;return L("div",{children:[b("span",{children:Ba(I.metric)+" — "+yt(B)+" funnel",className:uc}),b(ULe,{stages:W,note:J===0?void 0:J.toString()+" row(s) with an unlisted "+yt(B)+" excluded"})],className:lc},"funnel:"+Ba(I.metric))}),$=ie(g,I=>{let U=D(I.metric.aggregate,"count"),B=ze(I.metric.viz,"funnel")?void 0:_(I);if(U!=="count"||B===void 0)return;let q=b8e(I.rows,I.readModel.schema,B);if(q.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — by "+yt(B),className:uc}),L("div",{children:[b(rLe,{slices:q}),b("div",{children:q.map((W,J)=>L("span",{children:[b("span",{className:JD(J9(W,J))}),W.label+" ("+ug(W.value)+")"],className:GD},W.label)),className:WD})],className:h8e})],className:lc},"status:"+I.readModel.name)}),N=(Ge(r)?[]:ie(f,I=>{let U=I[0],B=I[2].fetchState;if(I[1])return typeof B!="object"?B==="Loading"?U.name+": loading…":void 0:U.name+": "+B._0})).concat(A2(s,d.map(I=>I.name),u)),M=[A,k,w,x,C,$].flatMap(I=>I),P=ot(ie(g,I=>{if(I.partial)return I.readModel.name}),[],(I,U)=>I.includes(U)?I:I.concat([U]));return L("div",{children:[b("h2",{children:"Dashboard",className:d8e}),b(W4e,{kpis:v}),M.length!==0?b("div",{children:M,className:f8e}):null,P.length!==0?b("span",{children:"Figures cover the rows loaded for: "+P.join(", "),className:QD}):null,N.length!==0?b("span",{children:N.join(" · "),className:QD}):null],className:c8e})}let $8e=A8e,n7={actor:"",eventType:"",timeFrom:"",timeTo:""};function XD(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function gn(e){return"var("+e+")"}let T8e=S([z("flex"),pe("column"),c("gap",gn(F.sm))]),N8e=S([z("flex"),Z("center"),c("gap",gn(F.md)),_i("wrap"),c("padding-bottom",gn(F.xs)),c("border-bottom","1px solid var("+y.border+")")]),D8e=S([z("flex"),Z("center"),c("gap","4px")]),ZD=S([c("color",gn(y.textSecondary)),c("font-size",gn(T.sizeSm)),c("white-space","nowrap")]),eF=S([c("background",gn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",gn(X.sm)),c("padding","2px var("+F.sm+")"),c("font-size",gn(T.sizeSm)),c("color",gn(y.textPrimary)),c("outline","none"),ms([c("border-color",gn(y.brand))])]),F8e=S([c("background","none"),c("border","none"),c("padding","0"),c("color",gn(y.brand)),c("font-size",gn(T.sizeSm)),xe("pointer"),Je([c("text-decoration","underline")])]),I8e=S([z("flex"),Ze("center"),c("padding-top",gn(F.xs))]),P8e=S([c("background",gn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",gn(X.sm)),c("padding","4px var("+F.md+")"),c("font-size",gn(T.sizeSm)),c("color",gn(y.textPrimary)),xe("pointer"),Je([c("border-color",gn(y.brand))])]);function O8e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,a=e.filter,s=i!==void 0?i:!1,l=n!==void 0?n:!1,u=t!==void 0?t:"No recorded history for this record",d=ie([["actor","Actor",e.actors.map(h=>({label:h,value:h})),a.actor],["eventType","Event",e.eventTypes.map(h=>({label:yt(h),value:h})),a.eventType]],h=>{let p=h[2];if(p.length!==0)return{key:h[0],label:h[1],options:p,value:h[3]}});return L("div",{children:[L("div",{children:[b(C9,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:a.timeTo});case"eventType":return o({actor:a.actor,eventType:p,timeFrom:a.timeFrom,timeTo:a.timeTo});default:return}}}),L("div",{children:[b("span",{children:"From:",className:ZD}),b("input",{className:eF,type:"date",value:a.timeFrom,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:h.target.value,timeTo:a.timeTo})}),b("span",{children:"To:",className:ZD}),b("input",{className:eF,type:"date",value:a.timeTo,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:h.target.value})})],className:D8e}),XD(a)?b("button",{children:"Clear filters",className:F8e,onClick:h=>o(n7)}):null],className:N8e}),b(fme,{entries:e.entries,emptyLabel:XD(a)?"No events match these filters":u,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),s?b("div",{children:b("button",{children:l?"Loading…":"Load earlier events",className:P8e,disabled:l,onClick:h=>ae(r,p=>p())}),className:I8e}):null],className:T8e})}let M8e=O8e;function L8e(e){if(e!=="")return e+"T00:00:00.000Z"}function z8e(e){if(e!=="")return e+"T23:59:59.999Z"}function U8e(e,t,r){let n={};return n.entityId=e,n.first=50,ae(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),ae(L8e(t.timeFrom),i=>{n.timeFrom=i}),ae(z8e(t.timeTo),i=>{n.timeTo=i}),n}function B8e(e){let t=e.entityId,r=e.binding,n=xi(),i=xl(),o=de(e.requiredAccess,!1,I=>!i(I)),a=se(()=>[]),s=a[1],l=a[0],u=se(()=>n7),d=u[1],f=u[0],h=se(()=>!0),p=h[1],m=se(()=>{}),g=m[1],v=m[0],_=se(()=>!1),x=_[1],E=se(()=>{})[1],C=se(()=>0),k=C[1],A=C[0],$=We(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;Ae(()=>{if(!o)if(n!==void 0){let I=A===0,U=I?void 0:$.current;p(B=>!0),g(B=>{}),Ut(n(r.queryDocument,U8e(t,f,U)).then(B=>{let q=PTe(B,r.queryField),W=OTe(B,r.queryField),J=W[1],K=W[0];return s(G=>I?q:q.concat(G)),x(G=>K),E(G=>J),$.current=J,p(G=>!1),Promise.resolve()}),B=>(p(q=>!1),g(q=>"Could not load the history for this record."),Promise.resolve()))}else g(I=>"Not connected")},[N,A,o]);let M=I=>{$.current=void 0,k(U=>0),s(U=>[]),d(U=>I)},P=()=>k(I=>I+1|0);return o?null:v!==void 0?b(Bs,{title:"History unavailable",detail:v,onRetry:()=>k(I=>I+1|0)}):b(M8e,{entries:BTe(l,r.displayName),actors:jTe(l),eventTypes:qTe(l),filter:f,onFilterChange:M,hasMore:_[0],loading:h[0],onLoadMore:P})}let j8e=B8e;function Ln(e){return"var("+e+")"}let q8e=S([z("flex"),pe("column"),c("gap",Ln(F.lg))]),V8e=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",Ln(F.md))]),K8e=S([c("font-size",Ln(T.sizeXl)),c("font-weight",Ln(T.weightMedium)),c("color",Ln(y.textPrimary)),Sn(Ce(0))]),H8e=S([z("flex"),_i("wrap"),Z("center"),c("gap",Ln(F.md)),c("font-size",Ln(T.sizeSm)),c("color",Ln(y.textSecondary))]),W8e=S([z("inlineFlex"),Z("center"),c("gap","4px"),xe("pointer")]);function G8e(e){return S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let tF=S([c("font-size",Ln(T.sizeXs)),c("color",Ln(y.textDisabled))]),J8e=S([z("flex"),Z("center"),c("gap",Ln(F.sm))]),Q8e=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Ln(X.sm)),c("padding","2px var("+F.sm+")"),c("color",Ln(y.textSecondary)),c("font-size",Ln(T.sizeSm)),xe("pointer"),Je([c("background",Ln(y.surfaceSubtle)),c("color",Ln(y.textPrimary))])]);function Y8e(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},a=_l(),s=xl(),l=xi(),u=Ra(),d=W2(),f=se(()=>[]),h=f[1],p=f[0],m=n.map((E,C)=>{let k=Zm(o,E.name,s),A=k&&!p.includes(E.name),$=vu(E,A);return[E,C,A,k,$]}),g=(E,C)=>D(R(R(r,k=>oo(k,E.name)),k=>k.accent),td[Bo(C,td.length)]),v=ie(m,E=>{let C=E[4],k=E[0],A=R(r,P=>oo(P,k.name)),$=Nn(k.schema,R(r,P=>ds(P,k.name)),{field:k.labelField,source:k.labelFieldSource}),N=Q($.statusField,P=>Y2(P,k.commands,R(A,I=>I.transitions))),M=G2(l,k.commands,k.name,C.isLive,C.refetch,u,d.onNotice,void 0);if(E[2])return{readModelName:k.name,rows:C.rows,schema:k.schema,semantics:$,accent:g(k,E[1]),window:om(C.canLoadMore),onOpenRow:(P,I)=>a(os(i,k.name,P,[])),onCommand:Q(N,P=>M),statusCommandFor:N}}),_=ie(m,E=>{if(E[2]&&E[4].canLoadMore)return E[0].name}),x=()=>{m.forEach(E=>{let C=E[4];if(E[2]&&C.canLoadMore)return C.loadMore()})},w=ie(m,E=>{let C=E[0],k=E[4].fetchState;if(E[2])return typeof k!="object"?k==="Loading"?C.name+": loading…":void 0:C.name+": "+k._0}).concat(A2(o,n.map(E=>E.name),s));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:K8e}),className:V8e}),b("div",{children:m.filter(E=>E[3]).map(E=>{let C=E[0];return L("label",{children:[b("input",{checked:E[2],type:"checkbox",onChange:k=>{let A=C.name;h($=>$.includes(A)?$.filter(N=>N!==A):$.concat([A]))}}),b("span",{className:G8e(g(C,E[1]))}),C.name],className:W8e},C.name)}),className:H8e}),d.element,e.mode.render(v),_.length!==0?L("div",{children:[b("button",{children:"Load more",className:Q8e,onClick:E=>x()}),b("span",{children:"More rows available: "+_.join(", "),className:tF})],className:J8e}):null,w.length!==0?b("span",{children:w.join(" · "),className:tF}):null],className:q8e})}let X8e=Y8e;function Zl(e){return"var("+e+")"}let Z8e=S([z("flex"),Z("center"),c("gap",Zl(F.xs)),c("font-size",Zl(T.sizeSm)),c("color",Zl(y.textSecondary))]),e5e=S([c("color",Zl(y.brand)),c("text-decoration","none"),Je([c("text-decoration","underline")])]),t5e=S([c("color",Zl(y.textPrimary)),c("font-weight",Zl(T.weightMedium))]),r5e=S([c("color",Zl(y.textDisabled)),aI("none")]);function n5e(e){let t=e.crumbs;return b("nav",{children:t.map((r,n)=>{let i=n===(t.length-1|0);return L(Ox,{children:[n>0?b("span",{children:"/","aria-hidden":!0,className:r5e}):null,i||Ui(r.href)?b("span",{children:r.label,className:t5e}):b("a",{children:r.label,className:e5e,href:D(r.href,"#")})]},r.label)}),"aria-label":"breadcrumbs",className:Z8e})}let i5e=n5e;function bt(e){return"var("+e+")"}let o5e=S([z("flex"),pe("column"),c("gap",bt(F.lg)),c("padding","0 var("+F.md+")"),c("min-width","0")]),a5e=S([z("flex"),Z("center"),c("font-size",bt(T.sizeMd)),c("padding","var("+F.sm+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),s5e=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",bt(F.md)),c("padding-bottom",bt(F.md)),c("border-bottom","1px solid var("+y.borderSubtle+")")]),l5e=S([c("font-size",bt(T.sizeXl)),c("font-weight",bt(T.weightMedium)),c("color",bt(y.textPrimary)),Sn(Ce(0))]),u5e=S([z("flex"),_i("wrap"),c("gap",bt(F.sm)),c("padding-bottom",bt(F.sm))]),c5e=S([c("background",bt(y.surface)),c("color",bt(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",bt(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",bt(T.sizeSm)),xe("pointer"),Je([c("background",bt(y.surfaceElevated))])]),d5e=S([z("flex"),pe("column"),c("gap",bt(F.sm)),c("min-width","0")]),rF=S([z("flex"),Z("start"),c("gap",bt(F.md)),c("padding","var("+F.xs+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")"),cI([c("border-bottom","none")])]),nF=S([c("color",bt(y.textSecondary)),c("font-size",bt(T.sizeMd)),c("font-weight",bt(T.weightMedium)),c("white-space","nowrap"),c("padding-top","2px"),vi(0),c("min-width","200px")]),Cy=S([c("color",bt(y.textPrimary)),c("font-size",bt(T.sizeMd)),c("word-break","break-word"),c("min-width","0")]),f5e=S([z("flex"),Z("start"),c("gap",bt(F.md)),c("padding","var("+F.xs+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")"),cI([c("border-bottom","none")])]),h5e=S([c("color",bt(y.textSecondary)),c("font-size",bt(T.sizeMd)),c("font-weight",bt(T.weightMedium)),c("padding-top","2px"),vi(0),c("min-width","200px")]),p5e=S([z("flex"),pe("column"),c("gap",bt(F.sm)),_o(1),c("padding",bt(F.md)),c("background",bt(y.surfaceSubtle)),c("border-radius",bt(X.md)),c("border","1px solid var("+y.borderSubtle+")"),c("min-width","0")]),m5e=S([z("flex"),pe("column"),c("gap",bt(F.sm)),c("min-width","0")]),g5e=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",bt(F.md)),c("padding-bottom",bt(F.xs)),c("border-bottom","1px solid var("+y.borderSubtle+")")]),v5e=S([c("color",bt(y.textPrimary)),c("font-size",bt(T.sizeMd)),c("font-weight",bt(T.weightMedium))]),iF=S([c("overflow-x","auto"),c("max-width","100%"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",bt(X.md))]),cc=S([c("color",bt(y.textDisabled)),c("font-size",bt(T.sizeSm))]);function i7(e,t){return D(R(R(Y(e),r=>O(r,"title")),ue),yt(t))}function oF(e){return R(R(Y(e),t=>O(t,"type")),ue)}function aF(e){return R(R(Y(e),t=>O(t,"format")),ue)}function _5e(e){return R(Y(e),t=>O(t,"items"))}function sF(e){return Ge(R(R(Y(e),t=>O(t,"properties")),Y))}function b5e(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function lF(e){let t=e.toLowerCase(),r=e.length,n=a=>{let s=a.length;if(r>s&&t.endsWith(a))return e.slice(0,r-s|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function y5e(e,t){let r=Tn(t),n=oF(r);if(n!==void 0)switch(n){case"array":let o=_5e(r);if(o===void 0)return"ArrayOfScalars";let a=oF(o);if(sF(o)||ze(a,"object"))return{TAG:"ArrayOfObjects",_0:o};if(!ze(a,"string"))return"ArrayOfScalars";let s=lF(e);return s!==void 0?{TAG:"EntityRefArray",_0:s}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return sF(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!b5e(e))return{TAG:"Scalar",_0:D(n,"string"),_1:aF(r)};let i=lF(e);return i!==void 0?{TAG:"EntityRef",_0:i}:{TAG:"Scalar",_0:D(n,"string"),_1:aF(r)}}function Ry(e,t,r,n){let i=it(e);if(typeof i!="object")switch(i){case"JSONFalse":return b(ns,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return b(ns,{variant:"Success",label:"true",dot:!1});case"JSONNull":return b("span",{children:"—",className:cc})}else switch(i.TAG){case"JSONString":let o=i._0;return t==="date-time"?wg(o):D(gI(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function x5e(e){return D(Q(_r(e),t=>t.map(r=>{let n=it(r);if(typeof n!="object")switch(n){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":return n._0;case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}})),[])}function uF(e){return D(Q(_r(e),t=>ie(t,Y)),[])}function o7(e,t){let r=R(O(e,"id"),ue);if(r!==void 0)return r;let n=R(O(e,"compositeId"),ue);return n!==void 0?n:"#"+t.toString()}function cF(e){return e.map((t,r)=>({key:o7(t,r),row:t}))}function S5e(e,t,r){for(;;){let n=t,i=n[0];if(i===void 0)return e;let o=e[e.length-1|0];if(o===void 0)return;let a=Ge(Y(o.data)),s=_r(o.data),l;if(a){let u=D(Y(o.data),{}),d=R(R(Y(o.schema),p=>O(p,"properties")),Y),f=R(d,p=>O(p,i)),h=O(u,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:i7(f,i)}:void 0}else if(Ge(s)){let u=D(s,[]),d=D(R(Y(o.schema),h=>O(h,"items")),o.schema),f=u.find((h,p)=>{let m=D(Y(h),{});return o7(m,p)===i});l=f!==void 0?{data:f,schema:d,label:i}:void 0}else l=void 0;if(l===void 0)return;e.push(l),r.push(i),t=n.slice(1)}}function E5e(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,a=e.drillPath,s=e.labelField,l=e.aggregateId,u=e.statusField,d=e.commands,f=e.rootLabel,h=e.schema,p=e.data,m=d!==void 0?d:[],g=a!==void 0?a:[],v=xi(),_=Ra(),x=hg(),w=g4e(),E=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,C=_l(),k=se(()=>[]),A=k[1],$=se(()=>{}),N=$[1],M=se(()=>({})),P=M[1],I=M[0],U=Ge(o)&&Ge(i),B=U?g:k[0],q=le=>{if(o!==void 0&&i!==void 0&&l!==void 0)return C(os(o,i,l,le));A($e=>le)},W=S5e([{data:p,schema:h,label:f}],B,[]),J=D(Y(p),{}),K=Do(h,"Drill"),G=Zh([J],K,_),_e={lookupLabel:(le,$e)=>Xh(G,le,_,$e),isMissing:(le,$e)=>ev(G,le,_,$e)},Re=de(R(Na(),le=>le.identity),[],le=>le.groups),Te=le=>{if(l!==void 0)return Q(Fh(V9(h,le,m),$e=>K9($e.command,Re)),$e=>(()=>N(Ue=>$e.command)))},He=(le,$e)=>{let Ue=D(R(R(Y(le),j=>O(j,"properties")),Y),{}),Ye={};return Qe($e).forEach(j=>{let fe=j[1],Fe=j[0],Ie=D(R(R(R(O(Ue,Fe),Y),st=>O(st,"type")),ue),"string"),Ee,ye=0;switch(Ie){case"array":if(fe==="")Ee=[];else try{Ee=JSON.parse(fe)}catch{Ee=[fe]}break;case"boolean":Ee=fe==="true";break;case"integer":case"number":ye=1;break;case"object":if(fe==="")Ee=null;else try{Ee=JSON.parse(fe)}catch{Ee=null}break;default:Ee=fe}ye===1&&(Ee=D(Q(jo(fe),st=>st),fe)),Ye[Fe]=Ee}),Ye},ge=(le,$e,Ue)=>L("div",{children:[b("div",{children:$e,className:nF}),b("div",{children:Ue,className:Cy})],className:rF},le),be=(le,$e,Ue)=>{if(Um(le,_,E))return Ue;let Ye=gs(_,le);if(Ye===void 0)return Ue;let j=Ye.name.endsWith("s");return $e?j?Ye.name:Ye.name+"s":j?Ye.name.slice(0,Ye.name.length-1|0):Ye.name},mt=le=>{let $e=it(le.data);if(typeof $e!="object"){if($e==="JSONNull")return b("span",{children:"—",className:cc})}else switch($e.TAG){case"JSONObject":let Ue=D(Y(le.data),{}),Ye=Do(le.schema,"Drill");return Ye.length===0?b("span",{children:"(no fields)",className:cc}):b("div",{children:Ye.map(Ee=>{let ye=Ee.key,st=Ee.propSchema,Ne=O(Ue,ye),Rt=i7(st,ye),dt=y5e(ye,st);if(Ne===void 0)return ge(ye,Rt,D(rie(ye,st),b("span",{children:"—",className:cc})));if(typeof dt!="object")switch(dt){case"Bool":return ge(ye,Rt,Ry(Ne,void 0,ye))}else switch(dt.TAG){case"Scalar":let Vt=O1(ye,st,Ne);return Vt!==void 0?ge(ye,Rt,Vt):ge(ye,Rt,Ry(Ne,dt._1,ye));case"EntityRef":let ft=dt._0;return ge(ye,be(ft,!1,Rt),M1(ye,ft,Ne,_,x,_e,E,void 0,void 0));case"EntityRefArray":let Tr=dt._0;return ge(ye,be(Tr,!0,Rt),M1(ye,Tr,Ne,_,x,_e,E,void 0,void 0));case"NestedObject":let ir=O1(ye,st,Ne);if(ir!==void 0)return ge(ye,Rt,ir);let wo=Do(dt._0,"Drill"),or=D(R(O(Ue,ye),Y),{});return L("div",{children:[b("div",{children:Rt,className:h5e}),b("div",{children:wo.map(_t=>{let In=O(or,_t.key);return L("div",{children:[b("div",{children:_t.label,className:nF}),b("div",{children:Gl(_t.key,_t.kind,_t.propSchema,In,void 0,_,x,_e,E),className:Cy})],className:rF},_t.key)}),className:p5e})],className:f5e},ye);case"ArrayOfObjects":let jn=dt._0,wi=cF(uF(Ne)),Hi=wi.length,ki=D(i,f),Tt=ki+"."+ye,Et=R(n,_t=>oo(_t,Tt)),wr=w4(jn,Et),Ci=b4(o,ki,ye),Vr=O(I,ye),Or=Vr!==void 0?Vr:mE(Ci),Nt=k4(Or,Et,xI(jn),wr),qn=_t=>{_4(Ci,_t),P(In=>{let ra=ut(Qe(In));return ra[ye]=_t,ra})},ar=D(_r(Ne),[]),ti=_t=>{let In=Nn(jn,R(n,Rs=>ds(Rs,Tt)),void 0),ra=R(Et,Rs=>Rs.accent),lk={readModelName:Tt,rows:ar,schema:jn,semantics:In,accent:ra,window:"Complete",onOpenRow:(Rs,vp)=>{let Wv=xU(ar,Md=>Md===vp),uk=Wv!==void 0?de(wi[Wv],Rs,Md=>Md.key):Rs;q(B.concat([ye,uk]))}};return _t.render([lk])},Fn=Do(jn,"Drill").map(_t=>({key:_t.key,label:_t.label,render:In=>Gl(_t.key,_t.kind,_t.propSchema,O(In.row,_t.key),void 0,_,x,_e,E),sortable:!1,width:_t.width})),ta=Hi===0?b("span",{children:"(empty)",className:cc}):b("div",{children:b(im,{columns:Fn,data:wi,keyFn:_t=>_t.key,onRowClick:_t=>q(B.concat([ye,_t.key])),density:"Comfortable"}),className:iF}),ri=Nt!==void 0&&Nt.id!==cs?ti(Nt):ta;return L("div",{children:[L("div",{children:[b("span",{children:Rt,className:v5e}),L("span",{children:[wr.length>1?b(ff.make,{modes:wr,activeId:de(Nt,cs,_t=>_t.id),onSelect:qn}):null,b(xf,{count:Hi,label:"items",onClick:()=>q(B.concat([ye]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:g5e}),ri],className:m5e},ye)}return ge(ye,Rt,b(mI,{items:x5e(Ne)}))}),className:d5e});case"JSONArray":let j=cF(uF(le.data)),fe=D(R(Y(le.schema),Ee=>O(Ee,"items")),le.schema),Ie=Do(fe,"Drill").map(Ee=>({key:Ee.key,label:Ee.label,render:ye=>Gl(Ee.key,Ee.kind,Ee.propSchema,O(ye.row,Ee.key),void 0,_,x,_e,E),sortable:!1,width:Ee.width}));return j.length===0?b("span",{children:"(empty)",className:cc}):b("div",{children:b(im,{columns:Ie,data:j,keyFn:Ee=>Ee.key,onRowClick:Ee=>q(B.concat([Ee.key])),density:"Comfortable"}),className:iF})}return b("div",{children:Ry(le.data,void 0,void 0),className:Cy})},fr=s!==void 0&&s!=="id"?R(R(R(Y(p),le=>O(le,s)),ue),le=>{if(le!=="")return le}):void 0,Mt=D(fr,D(l,f)),Ei=le=>o!==void 0&&i!==void 0&&l!==void 0?os(o,i,l,B.slice(0,le)):"#",Sr=W!==void 0?W.map((le,$e)=>{let Ue=$e===(W.length-1|0);return{label:$e===0?Mt:le.label,href:Ue?void 0:Ei($e)}}):[{label:Mt,href:void 0}],Eo=le=>{let $e=le.target,Ue=$e.tagName,Ye=le.metaKey||le.ctrlKey||le.shiftKey||le.altKey||le.button!==0;if(Ue!=="A"||Ye)return;if(le.preventDefault(),U){let Ee=$e.pathname,ye=$e.search;return C(Ee+ye)}let Fe=$e.parentNode.querySelectorAll("a").findIndex(Ee=>Ee===$e),Ie=Fe<0?0:Fe;q(B.slice(0,Ie))},Er;if(W!==void 0){let le=W[W.length-1|0];Er=le!==void 0?mt(le):null}else Er=b(Bs,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>q([])});let tn=B.length===0,rn=tn?TL(m.filter(le=>le.level==="Instance"),J,u):[],et;if(tn&&u!==void 0){let le=EIe(h,u,D(Xo(J,u),""));et=le.length!==0?b(v9,{steps:le}):void 0}else et=void 0;return L("div",{children:[tn?L("div",{children:[b("h2",{children:Mt,className:l5e}),t!==void 0&&l!==void 0?t(l):null],className:s5e}):b("div",{children:b(i5e,{crumbs:Sr}),className:a5e,onClick:Eo}),D(et,null),rn.length!==0?b("div",{children:rn.map(le=>b("button",{children:le.label,className:c5e,onClick:$e=>N(Ue=>le)},le.name)),className:u5e}):null,tn?b(bI.make,{fill:Te,children:Er}):Er,tn&&r!==void 0&&l!==void 0?r(l):null,de($[0],null,le=>b(N2,{isOpen:!0,onClose:()=>N($e=>{}),title:le.label,children:b(ek,{schema:le.schema,aggregateId:l,aggregateIdField:le.aggregateIdField,refFields:le.refFields,onSubmit:$e=>v!==void 0?Ut(v(le.mutationDocument,He(le.schema,$e)).then(Ue=>{let Ye=Cd(Ue);if(typeof Ye!="object")return Ye==="Accepted"?(N(j=>{}),ae(w,j=>j()),Promise.resolve("Ok")):(N(j=>{}),ae(w,j=>{setTimeout(j,500)}),Promise.resolve("Ok"));{let j=Ye._0;return mp(v,_,j.errorCode,j.detail).then(fe=>Promise.resolve({TAG:"Err",_0:fe}))}}),Ue=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(N(Ue=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:o5e})}let dF=E5e;function va(e){return"var("+e+")"}let w5e=S([z("flex"),pe("column"),c("gap",va(F.md))]),k5e=S([z("flex"),Z("center"),Ze("spaceBetween"),c("padding-bottom",va(F.sm)),c("border-bottom","1px solid var("+y.border+")")]),C5e=S([c("font-size",va(T.sizeLg)),c("font-weight",va(T.weightMedium)),c("color",va(y.textPrimary)),Sn(Ce(0))]),R5e=S([z("flex"),_i("wrap"),c("gap",va(F.sm))]),A5e=S([c("background",va(y.surface)),c("color",va(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",va(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",va(T.sizeSm)),c("cursor","pointer")]);function $5e(e,t){let r=D(R(R(Y(e),i=>O(i,"properties")),Y),{}),n={};return Qe(t).forEach(i=>{let o=i[1],a=i[0],s=D(R(R(R(O(r,a),Y),d=>O(d,"type")),ue),"string"),l,u=0;switch(s){case"array":if(o==="")l=[];else try{l=JSON.parse(o)}catch{l=[o]}break;case"boolean":l=o==="true";break;case"integer":case"number":u=1;break;case"object":if(o==="")l=null;else try{l=JSON.parse(o)}catch{l=null}break;default:l=o}u===1&&(l=D(Q(jo(o),d=>d),o)),n[a]=l}),n}function T5e(e){let t=e.contextId,r=e.slice,n=xi(),i=Ra(),o=se(()=>{}),a=o[1];return L("div",{children:[b("div",{children:b("h2",{children:r.name,className:C5e}),className:k5e}),b("div",{children:r.commands.map(s=>b("button",{children:s.label,className:A5e,onClick:l=>a(u=>s)},s.name)),className:R5e}),de(o[0],null,s=>b(N2,{isOpen:!0,onClose:()=>a(l=>{}),title:s.label,children:b(ek,{schema:s.schema,aggregateId:t,aggregateIdField:s.aggregateIdField,injectNewId:s.level==="Collection",refFields:s.refFields,onSubmit:l=>n!==void 0?Ut(n(s.mutationDocument,$5e(s.schema,l)).then(u=>{let d=Cd(u);if(typeof d=="object"){let f=d._0;return mp(n,i,f.errorCode,f.detail).then(h=>Promise.resolve({TAG:"Err",_0:h}))}return a(f=>{}),Promise.resolve("Ok")}),u=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(a(u=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:w5e})}let N5e=T5e;function Ys(e){return"var("+e+")"}let D5e=S([z("flex"),pe("column"),c("gap",Ys(F.xl))]),F5e=S([c("font-size",Ys(T.sizeXl)),c("font-weight",Ys(T.weightMedium)),c("color",Ys(y.textPrimary)),Sn(Ce(0))]),I5e=S([z("flex"),pe("column"),c("gap",Ys(F.md)),c("padding",Ys(F.lg)),c("background",Ys(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Ys(X.md))]);function a7(e){return e.filter(t=>o6e(t.schema,t.statusField,t.commands))}function P5e(e){let t=a7(e.views);return L("div",{children:[b("h2",{children:"Lifecycles",className:F5e}),t.length!==0?t.map(r=>b("div",{children:b(S6e,{schema:r.schema,statusField:D(r.statusField,""),commands:r.commands,title:r.name}),className:I5e},r.name)):b(ad,{title:"No lifecycles",description:"No view in this plugin declares a status enum with state-scoped commands."})],className:D5e})}let O5e=P5e;function xt(e){return"var("+e+")"}let M5e=S([z("flex"),pe("column"),c("gap",xt(F.md)),c("font-family",xt(T.fontFamily))]),L5e=S([z("flex"),Z("center"),c("gap",xt(F.sm)),c("color",xt(y.textSecondary)),c("font-size",xt(T.sizeSm)),c("font-weight",xt(T.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),z5e=S([z("inlineFlex"),Z("center"),c("padding","0 6px"),c("border-radius",xt(X.full)),c("background",xt(y.surfaceElevated)),c("color",xt(y.textPrimary)),c("font-size",xt(T.sizeXs)),c("letter-spacing","0")]),U5e=S([z("flex"),pe("column"),c("gap",xt(F.md))]),B5e=S([z("flex"),Z("flexStart"),c("gap",xt(F.sm))]),j5e=S([z("flex"),pe("column"),c("gap","2px"),c("min-width","0"),_o(1)]),q5e=S([z("flex"),Z("baseline"),c("gap",xt(F.sm))]),V5e=S([c("color",xt(y.textPrimary)),c("font-size",xt(T.sizeSm)),c("font-weight",xt(T.weightMedium))]),K5e=S([c("color",xt(y.textDisabled)),c("font-size",xt(T.sizeXs))]),H5e=S([c("color",xt(y.textPrimary)),c("font-size",xt(T.sizeSm)),c("line-height",xt(T.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word")]),W5e=S([c("color",xt(y.textDisabled)),c("font-size",xt(T.sizeSm)),c("padding","var("+F.sm+") 0")]),G5e=S([z("flex"),pe("column"),Z("flexEnd"),c("gap",xt(F.sm))]),J5e=S([c("width","100%"),c("min-height","64px"),c("padding",xt(F.sm)),c("background",xt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",xt(X.md)),c("color",xt(y.textPrimary)),c("font-family",xt(T.fontFamily)),c("font-size",xt(T.sizeSm)),c("resize","vertical")]),Q5e=S([c("background",xt(y.brand)),c("border","none"),c("border-radius",xt(X.md)),c("color",xt(y.textOnBrand)),c("padding","4px var("+F.md+")"),c("font-size",xt(T.sizeSm)),c("font-weight",xt(T.weightMedium)),xe("pointer"),lI([c("opacity","0.5"),xe("default")])]),Y5e=S([c("color",xt(y.error)),c("font-size",xt(T.sizeXs)),c("align-self","flex-start")]);function X5e(e){let t=e.comment,r=t.timestamp;return L("div",{children:[b(sd,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[b("span",{children:D(t.author,"Unknown"),className:V5e}),r!==void 0?b("span",{children:av(e.nowMs,r),className:K5e}):null],className:q5e}),b("span",{children:t.body,className:H5e})],className:j5e})],className:B5e})}function Z5e(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,a=e.title,s=e.comments,l=a!==void 0?a:"Comments",u=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=se(()=>""),p=h[1],m=h[0],g=m.trim(),v=g!==""&&!d,_=()=>{if(v)return ae(i,x=>x(g)),p(x=>"")};return L("div",{children:[L("div",{children:[l,b("span",{children:s.length.toString(),className:z5e})],className:L5e}),s.length===0?b("div",{children:u,className:W5e}):b("div",{children:s.map(x=>b(X5e,{comment:x,nowMs:f},x.id)),className:U5e}),i!==void 0?L("div",{children:[b("textarea",{className:J5e,disabled:d,placeholder:"Write a comment…",value:m,onKeyDown:x=>{if(x.key==="Enter"&&(x.metaKey||x.ctrlKey))return x.preventDefault(),_()},onChange:x=>{let w=x.target.value;p(E=>w)}}),r!==void 0?b("span",{children:r,className:Y5e}):null,b("button",{children:d?"Posting…":"Comment",className:Q5e,disabled:!v,onClick:x=>_()})],className:G5e}):null],className:M5e})}let eze=Z5e;function tze(e){let t=e.entityId,r=e.binding,n=xi(),i=Ra(),o=xl(),a=de(e.requiredAccess,!1,v=>!o(v)),s=vu(r.readModel,!a),l=se(()=>!1),u=l[1],d=se(()=>{}),f=d[1],h=v=>{let _=r.postCommand;if(n!==void 0&&_!==void 0){u(x=>!0),f(x=>{}),Ut(n(_.mutationDocument,dNe(r,t,v)).then(x=>{u(E=>!1);let w=Cd(x);if(typeof w!="object")return s.refetch(),Promise.resolve();{let E=w._0;return mp(n,i,E.errorCode,E.detail).then(C=>(f(k=>C),Promise.resolve()))}}),x=>(u(w=>!1),f(w=>"Could not post the comment."),Promise.resolve()));return}};if(a)return null;let p=cNe(r,s.rows,t),m=r.postCommand;return b(eze,{comments:p,onPost:n!==void 0&&m!==void 0?h:void 0,posting:l[0],error:d[0]})}let rze=tze;function zn(e){return"var("+e+")"}let nze=S([z("flex"),pe("column"),c("gap",zn(F.lg))]),ize=S([z("flex"),Z("center"),Ze("spaceBetween"),c("gap",zn(F.md))]),oze=S([c("font-size",zn(T.sizeXl)),c("font-weight",zn(T.weightMedium)),c("color",zn(y.textPrimary)),Sn(Ce(0))]),aze=S([z("flex"),_i("wrap"),Z("center"),c("gap",zn(F.md)),c("font-size",zn(T.sizeSm)),c("color",zn(y.textSecondary))]),sze=S([z("inlineFlex"),Z("center"),c("gap","4px"),xe("pointer")]);function lze(e){return S([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let fF=S([c("font-size",zn(T.sizeXs)),c("color",zn(y.textDisabled))]),uze=S([z("flex"),Z("center"),c("gap",zn(F.sm))]),cze=S([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",zn(X.sm)),c("padding","2px var("+F.sm+")"),c("color",zn(y.textSecondary)),c("font-size",zn(T.sizeSm)),xe("pointer"),Je([c("background",zn(y.surfaceSubtle)),c("color",zn(y.textPrimary))])]);function dze(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,a=t!==void 0?t:{},s=_l(),l=xl(),u=xi(),d=Ra(),f=W2(),h=se(()=>[]),p=h[1],m=h[0],g=K=>Nn(K.schema,R(r,G=>ds(G,K.name)),{field:K.labelField,source:K.labelFieldSource}),v=vu(i,!0),_=i.name,x=v.rows,w=i.schema,E=g(i),C=om(v.canLoadMore),$={readModelName:_,rows:x,schema:w,semantics:E,window:C,onOpenRow:(K,G)=>s(os(o,i.name,K,[])),role:yu},N=n.map((K,G)=>{let re=Zm(a,K.readModel.name,l),oe=re&&!m.includes(K.readModel.name),_e=vu(K.readModel,oe);return[K,G,oe,re,_e]}),M=(K,G)=>D(R(R(r,re=>oo(re,K.name)),re=>re.accent),td[Bo(G,td.length)]),P=ie(N,K=>{let G=K[4],re=K[0],oe=L9(re.readModel.commands,re.resourceRef),_e=G2(u,re.readModel.commands,re.readModel.name,G.isLive,G.refetch,d,f.onNotice,void 0);if(K[2])return{readModelName:re.readModel.name,rows:G.rows,schema:re.readModel.schema,semantics:g(re.readModel),accent:M(re.readModel,K[1]),window:om(G.canLoadMore),onOpenRow:(Re,Te)=>s(os(o,re.readModel.name,Re,[])),onCommand:Q(oe,Re=>_e),role:xu,resourceRef:re.resourceRef,assignCommand:oe}}),I=[$].concat(P),U=(v.canLoadMore?[i.name]:[]).concat(ie(N,K=>{if(K[2]&&K[4].canLoadMore)return K[0].readModel.name})),B=()=>{v.canLoadMore&&v.loadMore(),N.forEach(K=>{let G=K[4];if(K[2]&&G.canLoadMore)return G.loadMore()})},q=v.fetchState,W;W=typeof q!="object"?q==="Loading"?[i.name+": loading…"]:[]:[i.name+": "+q._0];let J=W.concat(ie(N,K=>{let G=K[0],re=K[4].fetchState;if(K[2])return typeof re!="object"?re==="Loading"?G.readModel.name+": loading…":void 0:G.readModel.name+": "+re._0}).concat(A2(a,n.map(K=>K.readModel.name),l)));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:oze}),className:ize}),b("div",{children:N.filter(K=>K[3]).map(K=>{let G=K[0];return L("label",{children:[b("input",{checked:K[2],type:"checkbox",onChange:re=>{let oe=G.readModel.name;p(_e=>_e.includes(oe)?_e.filter(Re=>Re!==oe):_e.concat([oe]))}}),b("span",{className:lze(M(G.readModel,K[1]))}),G.readModel.name],className:sze},G.readModel.name)}),className:aze}),f.element,e.mode.render(I),U.length!==0?L("div",{children:[b("button",{children:"Load more",className:cze,onClick:K=>B()}),b("span",{children:"More rows available: "+U.join(", "),className:fF})],className:uze}):null,J.length!==0?b("span",{children:J.join(" · "),className:fF}):null],className:nze})}let fze=dze;function hze(e){return e}function hF(e){return e.map(t=>({name:t.name,schema:t.schema,commands:t.commands,declaredLabelField:t.labelField,declaredLabelSource:t.labelFieldSource}))}function nk(e){if(typeof e=="object")return"heuristic:"+e._0;switch(e){case"Annotation":return"annotation";case"Type":return"type";case"Hint":return"hint"}}function s7(e,t,r){return t!==void 0?Object.entries($6e(e.schema,t,e.commands,R(r,n=>n.transitions))):[]}function l7(e){return Q(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function u7(e,t){return de(Fh(e.declaredLabelSource,r=>ze(e.declaredLabelField,t)),t,r=>t+" ("+r+")")}function c7(e,t){if(t.TAG==="Pair"){let n=t.endField,i=t.startField;return n!==void 0?i+".."+n:i}let r=t._0;return de(O(e.semantics,r),r,n=>r+" ("+nk(n.provenance)+")")}function d7(e,t){if(t.TAG==="Paired")return t.latField+"/"+t.lngField;let r=t._0;return de(O(e.semantics,r),r,n=>r+" ("+nk(n.provenance)+")")}function pze(e,t,r){let n=e.name,i=e.schema,o=Nn(i,t,l7(e)),a=Qe(o.semantics).map(d=>{let f=d[1];return ut([["field",d[0]],["semantic",ld(f.semantic)],["provenance",nk(f.provenance)]])}),s=[];ae(o.geo,d=>{s.push(["geo",d7(o,d)])}),ae(o.dateSpan,d=>{s.push(["dateSpan",c7(o,d)])}),ae(o.statusField,d=>{s.push(["status",d])}),ae(o.labelField,d=>{s.push(["label",u7(e,d)])}),ae(o.imageField,d=>{s.push(["image",d])}),ae(o.parentField,d=>{s.push(["parent",d])});let l=hE(i).map(d=>d.id),u=s7(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+E6e(f.tier)+")"]});return ut([["view",n],["capableModes",l],["roles",ut(s)],["transitions",ut(u)],["fields",a]])}function f7(e,t,r,n){return ut([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(hze)],["views",t.map(o=>pze(o,R(r,a=>ds(a,o.name)),R(r,a=>oo(a,o.name))))]])}function mze(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=Nn(i,R(t,m=>ds(m,n)),l7(r)),a=hE(i).map(m=>m.id).join(", "),s=[];ae(o.geo,m=>{s.push("geo="+d7(o,m))}),ae(o.dateSpan,m=>{s.push("dateSpan="+c7(o,m))}),ae(o.statusField,m=>{s.push("status="+m)}),ae(o.labelField,m=>{s.push("label="+u7(r,m))}),ae(o.imageField,m=>{s.push("image="+m)}),ae(o.parentField,m=>{s.push("parent="+m)});let l=s.length===0?"":"; "+s.join("; "),u=Object.keys(o.semantics).length,d=s7(r,o.statusField,R(t,m=>oo(m,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"";return n+": modes "+a+l+p+"; "+u.toString()+" field semantic(s)"})}function gze(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),mze(t,r).forEach(o=>{console.log(" "+o)}),console.log(JSON.stringify(f7(e,t,r,i),null,2))}function Ay(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function vze(e,t,r){return"/"+Ay(e)+"/"+Ay(t)+"/"+Ay(r)}function _ze(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function bze(e){let t=ve.object(e);if(t===void 0)return;let r=o=>R(t[o],ve.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:D(R(t.sentAt,ve.float),0),body:D(t.body,null)}}function yze(e,t,r,n,i){let o=n!==void 0?n:!0,a=ov(),s=R(a,h=>h.clientNamespace()),l=o&&Ge(s)&&de(a,!1,h=>h.clientChannelsAvailable()),u=s!==void 0?vze(s,e,t):void 0,d=We(i);return d.current=i,Ae(()=>{let h=l?a:void 0;if(h!==void 0&&u!==void 0)return h.subscribe("Domain",u,p=>{let m=bze(p);if(m!==void 0&&m.senderId!==r)return d.current(m)})},[l,D(u,""),r]),{available:l,publish:(h,p)=>{let m=l?a:void 0;if(m===void 0||u===void 0)return;let g=Date.now(),v={kind:h,senderId:r,sentAt:g,body:p};m.publish("Domain",u,[_ze(v)]).then(_=>{_.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+u+" failed: "+_._0)})}}}let Rx="heartbeat",Ax="hello",h7="leave";function pF(e){let t=ve.object(e);if(t===void 0)return;let r=i=>R(t[i],ve.string),n=r("userId");if(n!==void 0&&n!=="")return[n,D(r("username"),n)]}function xze(e,t,r){let n=t.kind;if(n===h7){let s=pF(t.body);if(s===void 0)return e;let l=s[0];return e.filter(u=>u.userId!==l)}if(n!==Rx&&n!==Ax)return e;let i=pF(t.body);if(i===void 0)return e;let o=i[0];return e.filter(s=>s.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function Sze(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function Eze(e,t){return Object.fromEntries([["userId",e],["username",t]])}function wze(e,t,r,n,i){let o="presence",a=i!==void 0?i:!0,s=se(()=>[]),l=s[1],u=We(void 0),f=yze(o,t,r,a&&r!=="",m=>{if(l(v=>xze(v,m,Date.now())),m.kind!==Ax)return;let g=u.current;if(g!==void 0){setTimeout(()=>g(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return Ae(()=>{if(!h)return;let m=Eze(r,n),g=()=>p(Rx,m);u.current=g,p(Ax,m),p(Rx,m);let v=setInterval(g,1e4);return()=>{clearInterval(v),u.current=void 0,p(h7,m)}},[h,r,n,t]),Ae(()=>{if(!h)return;let m=setInterval(()=>l(g=>Sze(g,Date.now())),1e4);return()=>{clearInterval(m)}},[h]),h?s[0]:[]}function X0(e){return"var("+e+")"}let kze=S([z("inlineFlex"),Z("center"),c("gap",X0(F.xs))]),Cze=S([c("font-family",X0(T.fontFamily)),c("font-size",X0(T.sizeSm)),c("color",X0(y.textSecondary)),c("white-space","nowrap")]);function Rze(e){return e===1?"1 other here":e.toString()+" others here"}function Aze(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",a=r!==void 0?r:4,s=t!==void 0?t:!0;if(i.length===0)return null;let l=i.map(u=>({name:u.username,imageUrl:u.imageUrl}));return L("span",{children:[b(vI,{members:l,size:o,max:a}),s?b("span",{children:Rze(i.length),className:Cze}):null],className:kze,title:i.map(u=>u.username).join(", ")})}let $ze=Aze;function Tze(e){let t=Na(),r=R(t,s=>s.identity),n=de(r,"",s=>s.userId),i=de(r,"",s=>s.username),a=wze(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(s=>({userId:s.userId,username:s.username}));return b($ze,{people:a})}let Nze=Tze;function p7(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function qv(e){return e.endsWith("s")?e:e+"s"}function Xs(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let $x={contents:[]},Tx={contents:[]};function Nx(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!$x.contents.some(i=>i===n)){$x.contents.push(n),console.warn("[AutoUI] Entity "+n+' has labelField="id" — dropdown labels will render as raw UUIDs. Add a @displayName annotation on the source state to fix.');return}}function Dx(e,t,r,n){if(r==="id"||n.length!==0&&n.some(o=>o===r))return;let i=e+"."+t;if(!Tx.contents.some(o=>o===i)){Tx.contents.push(i),console.warn("[AutoUI] Entity "+i+' labelField="'+r+'" is not @searchable; searchPrefix will scan the table — OK at small scale, consider annotating for production.');return}}function m7(e){let t=[];return e.forEach(r=>{r.readModels.forEach(n=>{Nx(r.id,n.name,n.labelField),Dx(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Xs(n.queryField),labelField:n.labelField})}),r.stateViewSlices.forEach(n=>{Nx(r.id,n.name,n.labelField),Dx(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Xs(n.queryField),labelField:n.labelField})})}),t}function Z0(e,t){let r=e.toLowerCase(),n=o=>{let a=o.length,s=e.length;if(s>a&&r.endsWith(o))return e.slice(0,s-a|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function ik(e){return e.endsWith("s")?[Xs(e),e]:[e,qv(e)]}function rd(e,t){return e.find(r=>r.name===t)}function ok(e,t){let r=p7(t),n=qv(r),i=rd(e,n);return i!==void 0?i:rd(e,r)}function g7(e){return ie(D(R(R(Y(e),t=>O(t,"required")),_r),[]),ue)}function v7(e,t,r,n){return ie(e.references,i=>{let o=O(n,i.fieldName),a=R(o,Y),s=R(R(a,p=>O(p,"type")),ue),l=ze(s,"array"),u=i.plugin,d=u!==void 0?t.filter(p=>p.pluginId===u):t,f=rd(d,i.entity),h=f!==void 0?f:ok(d,i.entity);if(h!==void 0){let p=ik(h.name);return{propertyKey:i.fieldName,queryField:h.queryField,singleQueryField:h.singleQueryField,labelField:h.labelField,multi:l,required:r.some(m=>m===i.fieldName),entityName:p[0],entityNamePlural:p[1]}}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+': explicit @ref to "'+i.entity+'" did not resolve to a registered entity. Falling back to text input.')})}function _7(e,t,r,n,i,o){let a=[];return i!==void 0&&Qe(i).forEach(s=>{let l=s[0],u=Y(s[1]);if(Ge(R(u,w=>O(w,"const"))))return;let f=R(R(u,w=>O(w,"type")),ue),h=R(R(R(R(u,w=>O(w,"items")),Y),w=>O(w,"type")),ue),p;if(f!==void 0)switch(f){case"array":p=h==="string"?!0:void 0;break;case"string":p=!1;break;default:p=void 0}else p=void 0;if(p===void 0)return;let m=!1;if(e.level==="Collection"&&!p){let w;if(t!==void 0)if(ze(e.aggregateIdField,l))w=!0;else{let E=Z0(l,!1);w=E!==void 0?E.toLowerCase()===t.name.toLowerCase():!1}else w=ze(e.aggregateIdField,l);m=w}if(m)return;let g=e.aggregateIdField,v;if(g!==void 0&&t!==void 0&&g===l&&!p){let w=rd(r,qv(t.name));v=w!==void 0?w:rd(r,t.name)}else v=void 0;let _;if(v!==void 0)_=v;else{let w=Z0(l,p);_=w!==void 0?ok(r,w):void 0}if(_!==void 0){_.pluginId!==o&&console.warn("[AutoUI] Command "+e.name+" field "+l+' resolved cross-plugin to "'+_.name+'" in plugin "'+_.pluginId+'" via naming heuristic. Add @ref("'+_.pluginId+"."+_.name+'") to make the cross-plugin reference explicit, or @ref("<LocalEntity>") to target a same-plugin entity.');let w=ik(_.name),E=_.queryField,C=_.singleQueryField,k=_.labelField,A=n.some(P=>P===l),$=w[0],N=w[1],M={propertyKey:l,queryField:E,singleQueryField:C,labelField:k,multi:p,required:A,entityName:$,entityNamePlural:N};a.push(M);return}if(Z0(l,p)!==void 0){console.warn("[AutoUI] Command "+e.name+" field "+l+" looks like a reference but no matching entity was registered. Falling back to text input.");return}}),a}function b7(e,t,r,n){let i=g7(e.schema),o=R(R(Y(e.schema),s=>O(s,"properties")),Y);if(e.references.length===0)return _7(e,t,r,i,o,n);let a=D(o,{});return v7(e,r,i,a)}function y7(e,t){let r=(n,i)=>({name:n.name,label:n.label,schema:n.schema,mutationDocument:n.mutationDocument,requiredRole:n.requiredRole,level:n.level,aggregateIdField:n.aggregateIdField,refFields:b7(n,i,t,e.id),references:n.references,allowedStates:n.allowedStates,targetState:n.targetState});return{id:e.id,name:e.name,readModels:e.readModels.map(n=>{let i={...n};return i.commands=n.commands.map(o=>r(o,void 0)),i}),aggregates:e.aggregates.map(n=>({name:n.name,schema:n.schema,commands:n.commands.map(i=>r(i,n)),linkedViews:n.linkedViews})),stateViewSlices:e.stateViewSlices,stateChangeSlices:e.stateChangeSlices.map(n=>({name:n.name,commands:n.commands.map(i=>r(i,void 0)),linkedViews:n.linkedViews,consistencyRead:n.consistencyRead}))}}let Dze={capitalize:p7,pluralize:qv,singularize:Xs,warnedIdLabel:$x,warnedUnsearchable:Tx,warnIfIdLabel:Nx,warnIfUnsearchable:Dx,buildRegistry:m7,stemFromKey:Z0,entityDisplayNames:ik,findByName:rd,findByStem:ok,requiredSet:g7,resolveExplicitRefs:v7,resolveByHeuristic:_7,resolveForCommand:b7,enrichPlugin:y7};function Vv(e){let t=ve.object(e);if(t===void 0)return;let r=R(t.properties,ve.object);if(r!==void 0)return r;let n=R(R(R(t.items,ve.object),i=>i.properties),ve.object);return n!==void 0?n:ot(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:R(R(t[o],ve.array),a=>ot(a,void 0,(s,l)=>s!==void 0?s:Vv(l))))}function x7(e,t,r){let n=t!==void 0?t:3,i=r!==void 0?r:!0,o=Object.keys(e);return(i&&!o.includes("id")?["id"].concat(o):o).map(s=>{if(n<=0)return s;let l=R(e[s],Vv);return l!==void 0?s+" { "+x7(l,n-1|0,!1)+" }":s}).join(" ")}function Fze(e,t){return Object.keys(e).filter(i=>{let o=e[i];return o!==void 0?Ui(Vv(o)):!0}).join(" ")}function S7(e,t,r){let n=Object.keys(e),i=n.includes("id")?n:["id"].concat(n);return ie(i,o=>{let a=e[o];if(a===void 0)return o;let s=Vv(a);if(s===void 0)return o;let l=Fze(s);if(l!=="")return o+" { "+l+" }"}).join(" ")}function Kv(e){return D(R(R(ve.object(e),t=>t.properties),ve.object),{})}function mF(e,t,r,n,i,o){let a=n!==void 0?n:!1,s=i!==void 0?i:!1,l=o!==void 0?o:!1,u=S7(Kv(t)),d=a||l,f=["$first: Int","$after: String","$last: Int","$before: String"],h=["first: $first","after: $after","last: $last","before: $before"],p;if(r!==void 0){let v=d?["$filter: "+r+"Filter"].concat(f):f,_=d?["filter: $filter"].concat(h):h,x=s?v.concat(["$orderBy: "+r+"OrderBy"]):v,w=s?_.concat(["orderBy: $orderBy"]):_;p=[x,w]}else p=[f,h];let m=p[0].join(", "),g=p[1].join(", ");return"query("+m+") { "+e+"("+g+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+u+" } } } }"}function gF(e,t){let r=x7(Kv(t),void 0,void 0),n=Yx(t);return n!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+n+": $subId) { "+r+" } }":"query($id: ID!) { "+e+"(id: $id) { "+r+" } }"}function Ize(e,t){let r=S7(Kv(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function Pze(e){return Qx(e).length===0?Ui(Yx(e)):!1}function Oze(e){let t=Object.keys(Kv(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function Mze(e,t,r,n,i,o,a,s,l,u,d,f){let h=[],p=i!==void 0?i:[],m=o!==void 0?o:[],g=a!==void 0?a:[],v={},_={},x={},w=de(d,[],j=>uoe(j,e)),E=p.length===0?[e]:p,C=m7(E),k=y7(e,C),A={},$=(j,fe)=>{let Fe=O(A,j);Fe!==void 0?A[j]=Fe.concat(fe):A[j]=fe};k.aggregates.forEach(j=>{j.linkedViews.forEach(fe=>$(fe,j.commands))}),k.stateChangeSlices.forEach(j=>{let fe=j.commands.filter(Ie=>Ie.level==="Collection"),Fe=j.commands.filter(Ie=>Ie.level==="Instance");j.linkedViews.forEach(Ie=>$(Ie,fe)),ae(j.consistencyRead,Ie=>$(Ie,Fe))});let N=[],M=eu(),P=k.id,I=(j,fe,Fe,Ie,Ee,ye)=>{let st=Pze(j.schema),Ne=st?j.queryField+"ByIds":void 0,Rt=st?Ize(j.queryField,j.schema):void 0,dt=Oze(j.schema),Vt=D(mH(j.schema),!0),ft=j.name,Tr=Va(Fs(P,ft)),ir=O(_,ft),wo=Fe+ft,or={label:ft,icon:void 0,group:k.name,sortOrder:j.sortIndex},wi={fragmentId:wo,title:ft,menuEntry:or,requiredAccess:ir,url:Tr},Hi=P+"."+ft,ki=(Tt,Et)=>b(N4e,{readModel:j,detailView:fe,pluginId:P,openRowId:Tt,drillPath:Et,singleQueryField:Ie,detailQueryDocument:Ee,byIdsQueryField:Ne,byIdsQueryDocument:Rt,sortKeyField:dt,liveDefault:Vt,uiHints:d,schedulerJoin:ye},Hi);return N.push(tc(nc(P,ft),Tt=>{let Et=BH(Tt);return b(C0,{definition:wi,children:ki(Et[0],Et[1])})})),GU(M,P,ft,Fs(P,ft)),wi},U=k.readModels.filter(j=>!m.includes(j.name)).map(j=>{let fe=D(O(A,j.name),j.commands),Fe=Xs(j.queryField),Ie=wx(j.schema);if(j.queryDocument===""){let ye={...j};return ye.commands=fe,ye.queryDocument=mF(j.queryField,j.schema,Fe,Ie.hasFilter,Ie.hasSort,Ie.hasSearch),ye}let Ee={...j};return Ee.commands=fe,Ee}),B=k.stateViewSlices.filter(j=>!m.includes(j.name)).map(j=>{let fe=D(O(A,j.name),[]),Fe=Xs(j.queryField),Ie=wx(j.schema),Ee=mF(j.queryField,j.schema,Fe,Ie.hasFilter,Ie.hasSort,Ie.hasSearch);return{name:j.name,schema:j.schema,queryDocument:Ee,queryField:j.queryField,sortIndex:j.sortIndex,commands:fe,linkedWriteSide:j.linkedWriteSide,labelField:j.labelField,labelFieldSource:j.labelFieldSource,searchableFields:j.searchableFields,statusField:j.statusField}}),q=M6e(U.concat(B),d,(j,fe)=>{console.warn("[AutoUI] "+k.id+': scheduler canvas "'+j+'" has '+fe.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),W=k.aggregates,J={readModels:U,aggregates:W},K=j=>Q(uNe(J,j),fe=>{let Fe=O(_,fe.readModel.name);return Ie=>b(rze,{binding:fe,entityId:Ie,requiredAccess:Fe})}),G=j=>{let fe=D(d,L1),Fe=doe(oo(fe,j.name),DTe(j.schema));return Q(FTe(j,Fe),Ie=>{let Ee=O(_,j.name);return ye=>b(j8e,{binding:Ie,entityId:ye,requiredAccess:Ee})})},re=j=>{let fe=D(d,L1);if(foe(oo(fe,j.name)))return Fe=>b(Nze,{readModel:j.name,entityId:Fe})},oe=j=>{let fe=K(j.name),Fe=G(j);if(!(fe===void 0&&Fe===void 0))return Ie=>L(Gr,{children:[de(fe,null,Ee=>Ee(Ie)),de(Fe,null,Ee=>Ee(Ie))]})},_e=U.map(j=>{let fe=Xs(j.queryField),Fe=gF(fe,j.schema),Ie=D(Q(ie(j.linkedWriteSide,st=>k.aggregates.find(Ne=>Ne.name===st))[0],st=>st.commands),j.commands),Ee=O(v,j.name);return I(j,Ee!==void 0?Ee:(st,Ne,Rt)=>b(dF,{data:Rt,schema:j.schema,rootLabel:j.name,commands:Ie,statusField:j.statusField,aggregateId:st,labelField:j.labelField,drillPath:Ne,pluginId:k.id,viewName:j.name,uiHints:d,entityPanel:oe(j),headerAccessory:re(j)}),k.id+".",fe,Fe,O(q,j.name))}),Re=B.map(j=>{let fe=Xs(j.queryField),Fe=gF(fe,j.schema),Ie=O(v,j.name);return I(j,Ie!==void 0?Ie:(ye,st,Ne)=>b(dF,{data:Ne,schema:j.schema,rootLabel:j.name,commands:j.commands,statusField:j.statusField,aggregateId:ye,labelField:j.labelField,drillPath:st,pluginId:k.id,viewName:j.name,uiHints:d,entityPanel:oe(j),headerAccessory:re(j)}),k.id+".slice.",fe,Fe,O(q,j.name))}),Te=k.stateChangeSlices.filter(j=>!g.includes(j.name)).map(j=>({fragmentId:k.id+".commands."+j.name,title:j.name,description:"Auto-generated command panel for "+j.name,extensionPackage:k.id,positions:h,component:fe=>b(N5e,{slice:j,contextId:fe.contextId}),requiredAccess:O(x,j.name),minWidth:void 0})),He=U.concat(B).toSorted((j,fe)=>j.sortIndex===fe.sortIndex?jf(j.name,fe.name):Mx(j.sortIndex,fe.sortIndex));Ge(mE("autoui.inferenceReport"))&&gze(k.id,hF(He),d,w),ae(f,j=>j(f7(k.id,hF(He),d,w)));let ge=He.map(j=>[j,Nn(j.schema,void 0,void 0)]),be=ie(Bm(),j=>{let fe=j.arity;if(!(typeof fe!="object"||fe.TAG!=="Multi"))return[j,fe.min]}).flatMap(j=>{let fe=j[1],Fe=j[0],Ie={};return ge.forEach(Ee=>{let ye=Ee[0],st=R(d,Vt=>oo(Vt,ye.name)),Ne=de(R(st,Vt=>Vt.suppress),!1,Vt=>Vt.includes(Fe.id));if(!(Fe.isCapable(ye.schema,Ee[1])&&!Ne))return;let Rt=D(R(st,Vt=>Vt.canvas),Fe.label),dt=O(Ie,Rt);dt!==void 0?dt.push(ye):Ie[Rt]=[ye]}),ie(Qe(Ie),Ee=>{let ye=Ee[1];if(ye.length>=fe)return[Fe,Ee[0],ye]})}),mt=(j,fe)=>be.some(Fe=>Fe[1]===fe?Fe[0].id!==j.id:!1)?fe+" — "+j.label:fe,fr=be.map(j=>{let fe=j[2],Fe=j[0],Ie=mt(Fe,j[1]),Ee=k.id+".canvas."+Ie,ye={label:Ie,icon:void 0,group:k.name,sortOrder:900},st=O3(_,fe.map(dt=>dt.name)),Ne=Va(Fs(P,Ie)),Rt={fragmentId:Ee,title:Ie,menuEntry:ye,requiredAccess:st,url:Ne};return N.push(tc(nc(P,Ie),dt=>b(C0,{definition:Rt,children:b(X8e,{pluginId:P,mode:Fe,canvasName:Ie,readModels:fe,uiHints:d,viewAccess:_})}))),Rt}),Mt=ie(Bm(),j=>{let fe=j.arity;if(!(typeof fe!="object"||fe.TAG==="Multi"))return[j,fe._0]}).flatMap(j=>{let fe=j[1],Fe=j[0],Ie={},Ee={},ye=(dt,Vt,ft)=>{let Tr=O(dt,Vt);Tr!==void 0?Tr.push(ft):dt[Vt]=[ft]};He.forEach(dt=>{let Vt=R(d,ir=>oo(ir,dt.name)),ft=D(R(Vt,ir=>ir.canvas),Fe.label),Tr=R(Vt,ir=>ir.role);if(Tr!==void 0)return Tr===yu?ye(Ie,ft,dt):Tr===xu?ae(R(Vt,ir=>ir.resourceRef),ir=>ye(Ee,ft,[dt,ir])):void 0});let st=(dt,Vt)=>de(fe.find(ft=>ft.role===dt),Vt,ft=>ft.min),Ne=st(yu,1),Rt=st(xu,1);return ie(Qe(Ie),dt=>{let Vt=dt[1],ft=dt[0],Tr=D(O(Ee,ft),[]),ir=Vt[0];if(ir===void 0||!(Vt.length>=Ne&&Tr.length>=Rt))return;let wo=Tr.map(Tt=>({readModel:Tt[0],resourceRef:Tt[1]})),or=k.id+".scheduler."+ft,jn={label:ft,icon:void 0,group:k.name,sortOrder:910},wi=XTe(_,ir.name),Hi=Va(Fs(P,ft)),ki={fragmentId:or,title:ft,menuEntry:jn,requiredAccess:wi,url:Hi};return N.push(tc(nc(P,ft),Tt=>b(C0,{definition:ki,children:b(fze,{pluginId:P,canvasName:ft,mode:Fe,resource:ir,events:wo,uiHints:d,viewAccess:_})}))),ki})}),Ei=U.concat(B).flatMap(j=>fH(j.schema).map(fe=>({view:j.name,label:fe[2],field:fe[0],aggregate:fe[1]}))),Sr=U.concat(B).flatMap(j=>FH(j.schema,R(d,fe=>ds(fe,j.name))).map(fe=>({view:j.name,field:fe,aggregate:"sum"}))),Eo=D(R(d,j=>j.dashboard),[]),Er=Eo.map(j=>[j.view,D(j.field,"")]),tn=(j,fe)=>!j.some(Fe=>Fe[0]===fe.view?Fe[1]===D(fe.field,""):!1),rn=Ei.filter(j=>tn(Er,j)),et=Er.concat(rn.map(j=>[j.view,D(j.field,"")])),le=Eo.concat(rn).concat(Sr.filter(j=>tn(et,j))),$e;if(le.length!==0){let j="Dashboard",fe=U.concat(B),Fe=k.id+".dashboard",Ie={label:j,icon:void 0,group:k.name,sortOrder:-100},Ee=O3(_,ot(le.map(Ne=>Ne.view),[],(Ne,Rt)=>Ne.includes(Rt)?Ne:Ne.concat([Rt])).filter(Ne=>fe.some(Rt=>Rt.name===Ne))),ye=Va(Fs(P,j)),st={fragmentId:Fe,title:j,menuEntry:Ie,requiredAccess:Ee,url:ye};N.push(tc(nc(P,j),Ne=>b(C0,{definition:st,children:b($8e,{pluginId:P,metrics:le,readModels:fe,uiHints:d,viewAccess:_})}))),$e=[st]}else $e=[];let Ue=a7(U.concat(B)),Ye;if(Ue.length!==0){let j="Lifecycles",fe=k.id+".lifecycles",Fe={label:j,icon:void 0,group:k.name,sortOrder:-50},Ie=Va(Fs(P,j)),Ee={fragmentId:fe,title:j,menuEntry:Fe,requiredAccess:void 0,url:Ie};N.push(tc(nc(P,j),ye=>b(O5e,{views:Ue}))),Ye=[Ee]}else Ye=[];return{pages:$e.concat(Ye.concat(_e.concat(Re.concat(fr.concat(Mt))))),panels:Te,routes:N,publicLinks:M}}let vF=new Map;function Lze(e,t){let r=vF.get(e);if(!(r!==void 0?r===t:!1)){AF.registerRemotes([{name:e,entry:t}]),vF.set(e,t);return}}async function zze(e,t,r){Lze(e,r);try{let n=await AF.loadRemote(e+"/"+t);return n==null?{TAG:"Error",_0:"Module Federation returned null for "+e+"/"+t+" — the plugin's vite federation config probably doesn't expose this fragment."}:{TAG:"Ok",_0:n.default}}catch(n){let i=Su(n);if(i.RE_EXN_ID!==cg)return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r};let o=D(i._1.message,"unknown error");return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r+": "+o}}}const Uze=cr(null),$y={didCatch:!1,error:null};class Bze extends Y7{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=$y}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState($y)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&jze(t.resetKeys,i)){var o,a;(o=(a=this.props).onReset)===null||o===void 0||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState($y)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:a}=this.state;let s=t;if(o){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(l);else if(n)s=br(n,l);else if(i!==void 0)s=i;else throw a}return br(Uze.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function jze(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}function qze(e){let t=D(e.error.message,"unknown error");return b("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function Vze(e,t){console.error("Fragment crashed:",e)}function Kze(e){let t=e.fallbackComponent;return br(Bze,{FallbackComponent:t!==void 0?t:qze,onError:Vze,children:e.children})}let Hze=Kze;function Wze(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=se(()=>"Loading"),o=i[1],a=i[0];return Ae(()=>{o(l=>"Loading");let s={contents:!1};return zze(n,r,t).then(l=>{if(s.contents)return;if(l.TAG==="Ok"){let d=l._0;return o(f=>({TAG:"Loaded",_0:d}))}let u=l._0;o(d=>({TAG:"Failed",_0:u}))}),()=>{s.contents=!0}},[n,r,t]),typeof a!="object"?b("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):a.TAG==="Loaded"?b(Hze,{children:br(a._0,e.panelProps)}):b("div",{children:"Panel error: "+a._0,style:{color:"#a00",padding:"0.75rem"}})}let Gze=Wze;function oi(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Pl(e){return oi(e)==="object"}function Jze(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function _F(e,t){return e.length<124?e:t}const Qze="graphql-transport-ws";var Ai;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(Ai||(Ai={}));var Ur;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(Ur||(Ur={}));function E7(e){if(!Pl(e))throw new Error(`Message is expected to be an object, but got ${oi(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${oi(e.type)}`);switch(e.type){case Ur.ConnectionInit:case Ur.ConnectionAck:case Ur.Ping:case Ur.Pong:{if(e.payload!=null&&!Pl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case Ur.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${oi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Pl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${oi(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${oi(e.payload.query)}`);if(e.payload.variables!=null&&!Pl(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${oi(e.payload.variables)}`);if(e.payload.operationName!=null&&oi(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${oi(e.payload.operationName)}`);if(e.payload.extensions!=null&&!Pl(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${oi(e.payload.extensions)}`);break}case Ur.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${oi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Pl(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${oi(e.payload)}`);break}case Ur.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${oi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Jze(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case Ur.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${oi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function Yze(e,t){return E7(typeof e=="string"?JSON.parse(e,t):e)}function uf(e,t){return E7(e),JSON.stringify(e,t)}var Oc=function(e){return this instanceof Oc?(this.v=e,this):new Oc(e)},Xze=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(m){return Promise.resolve(m).then(p,f)}}function s(p,m){n[p]&&(i[p]=function(g){return new Promise(function(v,_){o.push([p,g,v,_])>1||l(p,g)})},m&&(i[p]=m(i[p])))}function l(p,m){try{u(n[p](m))}catch(g){h(o[0][3],g)}}function u(p){p.value instanceof Oc?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,m){p(m),o.shift(),o.length&&l(o[0][0],o[0][1])}};function Zze(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:a=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(W){let J=1e3;for(let K=0;K<W;K++)J*=2;await new Promise(K=>setTimeout(K,J+Math.floor(Math.random()*2700+300)))},shouldRetry:f=Ty,isFatalConnectionProblem:h,on:p,webSocketImpl:m,generateID:g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,W=>{const J=Math.random()*16|0;return(W=="x"?J:J&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:_}=e;let x;if(m){if(!t9e(m))throw new Error("Invalid WebSocket implementation provided");x=m}else typeof WebSocket<"u"?x=WebSocket:typeof global<"u"?x=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(x=window.WebSocket||window.MozWebSocket);if(!x)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const w=x,E=(()=>{const q=(()=>{const J={};return{on(K,G){return J[K]=G,()=>{delete J[K]}},emit(K){var G;"id"in K&&((G=J[K.id])===null||G===void 0||G.call(J,K))}}})(),W={connecting:p?.connecting?[p.connecting]:[],opened:p?.opened?[p.opened]:[],connected:p?.connected?[p.connected]:[],ping:p?.ping?[p.ping]:[],pong:p?.pong?[p.pong]:[],message:p?.message?[q.emit,p.message]:[q.emit],closed:p?.closed?[p.closed]:[],error:p?.error?[p.error]:[]};return{onMessage:q.on,on(J,K){const G=W[J];return G.push(K),()=>{G.splice(G.indexOf(K),1)}},emit(J,...K){for(const G of[...W[J]])G(...K)}}})();function C(q){const W=[E.on("error",J=>{W.forEach(K=>K()),q(J)}),E.on("closed",J=>{W.forEach(K=>K()),q(J)})]}let k,A=0,$,N=!1,M=0,P=!1;async function I(){clearTimeout($);const[q,W]=await(k??(k=new Promise((G,re)=>(async()=>{if(N){if(await d(M),!A)return k=void 0,re({code:1e3,reason:"All Subscriptions Gone"});M++}E.emit("connecting",N);const oe=new w(typeof t=="function"?await t():t,Qze);let _e,Re;function Te(){isFinite(a)&&a>0&&(clearTimeout(Re),Re=setTimeout(()=>{oe.readyState===w.OPEN&&(oe.send(uf({type:Ur.Ping})),E.emit("ping",!1,void 0))},a))}C(ge=>{k=void 0,clearTimeout(_e),clearTimeout(Re),re(ge),ge instanceof bF&&(oe.close(4499,"Terminated"),oe.onerror=null,oe.onclose=null)}),oe.onerror=ge=>E.emit("error",ge),oe.onclose=ge=>E.emit("closed",ge),oe.onopen=async()=>{try{E.emit("opened",oe);const ge=typeof r=="function"?await r():r;if(oe.readyState!==w.OPEN)return;oe.send(uf(ge?{type:Ur.ConnectionInit,payload:ge}:{type:Ur.ConnectionInit},v)),isFinite(l)&&l>0&&(_e=setTimeout(()=>{oe.close(Ai.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Te()}catch(ge){E.emit("error",ge),oe.close(Ai.InternalClientError,_F(ge instanceof Error?ge.message:new Error(ge).message,"Internal client error"))}};let He=!1;oe.onmessage=({data:ge})=>{try{const be=Yze(ge,_);if(E.emit("message",be),be.type==="ping"||be.type==="pong"){E.emit(be.type,!0,be.payload),be.type==="pong"?Te():s||(oe.send(uf(be.payload?{type:Ur.Pong,payload:be.payload}:{type:Ur.Pong})),E.emit("pong",!1,be.payload));return}if(He)return;if(be.type!==Ur.ConnectionAck)throw new Error(`First message cannot be of type ${be.type}`);clearTimeout(_e),He=!0,E.emit("connected",oe,be.payload,N),N=!1,M=0,G([oe,new Promise((mt,fr)=>C(fr))])}catch(be){oe.onmessage=null,E.emit("error",be),oe.close(Ai.BadResponse,_F(be instanceof Error?be.message:new Error(be).message,"Bad response"))}}})())));q.readyState===w.CLOSING&&await W;let J=()=>{};const K=new Promise(G=>J=G);return[q,J,Promise.race([K.then(()=>{if(!A){const G=()=>q.close(1e3,"Normal Closure");isFinite(o)&&o>0?$=setTimeout(()=>{q.readyState===w.OPEN&&G()},o):G()}}),W])]}function U(q){if(Ty(q)&&(e9e(q.code)||[Ai.InternalServerError,Ai.InternalClientError,Ai.BadRequest,Ai.BadResponse,Ai.Unauthorized,Ai.SubprotocolNotAcceptable,Ai.SubscriberAlreadyExists,Ai.TooManyInitialisationRequests].includes(q.code)))throw q;if(P)return!1;if(Ty(q)&&q.code===1e3)return A>0;if(!u||M>=u||!f(q)||h?.(q))throw q;return N=!0}n||(async()=>{for(A++;;)try{const[,,q]=await I();await q}catch(q){try{if(!U(q))return}catch(W){return i?.(W)}}})();function B(q,W){const J=g(q);let K=!1,G=!1,re=()=>{A--,K=!0};return(async()=>{for(A++;;)try{const[oe,_e,Re]=await I();if(K)return _e();const Te=E.onMessage(J,He=>{switch(He.type){case Ur.Next:{W.next(He.payload);return}case Ur.Error:{G=!0,K=!0,W.error(He.payload),re();return}case Ur.Complete:{K=!0,re();return}}});oe.send(uf({id:J,type:Ur.Subscribe,payload:q},v)),re=()=>{!K&&oe.readyState===w.OPEN&&oe.send(uf({id:J,type:Ur.Complete},v)),A--,K=!0,_e()},await Re.finally(Te);return}catch(oe){if(!U(oe))return}})().then(()=>{G||W.complete()}).catch(oe=>{W.error(oe)}),()=>{K||re()}}return{on:E.on,subscribe:B,iterate(q){const W=[],J={done:!1,error:null,resolve:()=>{}},K=B(q,{next(re){W.push(re),J.resolve()},error(re){J.done=!0,J.error=re,J.resolve()},complete(){J.done=!0,J.resolve()}}),G=(function(){return Xze(this,arguments,function*(){for(;;){for(W.length||(yield Oc(new Promise(_e=>J.resolve=_e)));W.length;)yield yield Oc(W.shift());if(J.error)throw J.error;if(J.done)return yield Oc(void 0)}})})();return G.throw=async re=>(J.done||(J.done=!0,J.error=re,J.resolve()),{done:!0,value:void 0}),G.return=async()=>(K(),{done:!0,value:void 0}),G},async dispose(){if(P=!0,k){const[q]=await k;q.close(1e3,"Normal Closure")}},terminate(){k&&E.emit("closed",new bF)}}}class bF extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function Ty(e){return Pl(e)&&"code"in e&&"reason"in e}function e9e(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function t9e(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function r9e(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return Zze({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function Dh(e,t){return R(e[t],ve.string)}function Oo(e,t){return D(Dh(e,t),"")}function n9e(e,t){return Q(R(e[t],ve.float),r=>r|0)}function i9e(e,t){return ie(D(R(e[t],ve.array),[]),ve.string)}function o9e(e){let t=ve.object(e);return t!==void 0?{label:Oo(t,"label"),icon:Dh(t,"icon"),group:Dh(t,"group"),sortOrder:D(n9e(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function a9e(e){return Q(ve.object(e),t=>({fragmentId:Oo(t,"fragmentId"),title:Oo(t,"title"),description:Oo(t,"description"),positions:i9e(t,"positions"),requiredAccess:Dh(t,"requiredAccess")}))}function s9e(e){return Q(ve.object(e),t=>({fragmentId:Oo(t,"fragmentId"),title:Oo(t,"title"),menuEntry:D(Q(t.menuEntry,o9e),{label:Oo(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:Dh(t,"requiredAccess")}))}function l9e(e){return Q(ve.object(e),t=>({pluginId:Oo(t,"pluginId"),remoteEntryUrl:Oo(t,"remoteEntryUrl"),panels:ie(D(R(t.panels,ve.array),[]),a9e),pages:ie(D(R(t.pages,ve.array),[]),s9e),registeredAt:Oo(t,"registeredAt"),updatedAt:Oo(t,"updatedAt")}))}function u9e(e){return ie(D(R(R(R(R(ve.object(e),t=>t.data),ve.object),t=>t.Platform_UIFragments),ve.array),[]),l9e)}let c9e=`{
|
|
92
|
+
Platform_UIFragments {
|
|
93
|
+
pluginId
|
|
94
|
+
remoteEntryUrl
|
|
95
|
+
panels { fragmentId title description positions requiredAccess }
|
|
96
|
+
pages {
|
|
97
|
+
fragmentId
|
|
98
|
+
title
|
|
99
|
+
menuEntry { label icon group sortOrder }
|
|
100
|
+
requiredAccess
|
|
101
|
+
}
|
|
102
|
+
registeredAt
|
|
103
|
+
updatedAt
|
|
104
|
+
}
|
|
105
|
+
}`;function d9e(e,t){return ae(R(R(Y(t),r=>O(r,"properties")),Y),r=>{Ux(r).forEach(n=>ae(R(R(Y(n),i=>O(i,"x-reventless-semantic-target")),Y),i=>{let o=O(i,"store"),a=O(i,"plugin");if(o!==void 0&&a===void 0){i.plugin=e;return}}))}),t}function Fx(e,t){let r=ue(t);return d9e(e,r!==void 0?JSON.parse(r):t)}function yF(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function xF(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function f9e(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function h9e(e,t){let r=D(R(O(t,"type"),ue),"string");return r!=="array"?xF(e)&&r==="string"?"ID":yF(r):"["+D(Q(R(R(R(O(t,"items"),Y),i=>O(i,"type")),ue),i=>i==="string"&&(f9e(e)||xF(e))?"ID":yF(i)),"String")+"!]"}function p9e(e,t,r){let n=D(Q(R(R(Y(t),u=>O(u,"properties")),Y),u=>Object.keys(u).filter(d=>d!=="TAG").map(d=>{let f=D(Q(R(O(u,d),Y),h=>h9e(d,h)),"String");return[d,f]})),[]),o=(r!==void 0?[]:[["id","ID"]]).concat(n),a="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(o.length===0)return"mutation { "+e+" { "+a+" } }";let s=o.map(u=>"$"+u[0]+": "+u[1]+"!").join(", "),l=o.map(u=>{let d=u[0];return d+": $"+d}).join(", ");return"mutation "+e+"("+s+") { "+e+"("+l+") { "+a+" } }"}function m9e(e){let t=e.split(".");return D(t[t.length-1|0],e)}function g9e(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function v9e(e){return ie(D(_r(e),[]),t=>Q(Y(t),r=>{let n=i=>D(R(O(r,i),ue),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:R(O(r,"plugin"),ue)}}))}function SF(e,t){return ie(D(_r(t),[]),r=>Q(R(Y(r),n=>{let i=R(O(n,"apiExposed"),Bx);if(!ze(i,!1))return n}),n=>{let i=m=>D(R(O(n,m),ue),""),o=i("name"),s=i("level")==="Instance"?"Instance":"Collection",l=D(Q(O(n,"schema"),m=>Fx(e,m)),null),u=i("mutationField"),d=R(O(n,"aggregateIdField"),ue),f=D(Q(O(n,"references"),v9e),[]),h=Q(R(O(n,"allowedStates"),_r),m=>ie(m,ue)),p=R(O(n,"targetState"),ue);return{name:o,label:g9e(m9e(o)),schema:l,mutationDocument:p9e(u,l,d),requiredRole:void 0,level:s,aggregateIdField:d,refFields:[],references:f,allowedStates:h,targetState:p}}))}function _9e(e){return ie(D(_r(e),[]),t=>Q(Y(t),r=>{let n=f=>D(R(O(r,f),ue),""),i=f=>D(R(O(r,f),_r),[]),o=(f,h)=>ie(D(R(O(f,h),_r),[]),ue),a=n("pluginId"),s=ie(i("readModels"),f=>Q(Y(f),h=>{let p=m=>D(R(O(h,m),ue),"");return{name:p("name"),schema:D(Q(O(h,"schema"),m=>Fx(a,m)),null),queryDocument:"",queryField:p("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(h,"linkedWriteSide"),labelField:p("labelField"),labelFieldSource:R(O(h,"labelFieldSource"),ue),searchableFields:o(h,"searchableFields"),statusField:R(O(h,"statusField"),ue)}})),l=ie(i("aggregates"),f=>Q(Y(f),h=>({name:(m=>D(R(O(h,m),ue),""))("name"),schema:null,commands:SF(a,D(O(h,"commands"),[])),linkedViews:o(h,"linkedViews")}))),u=ie(i("stateViewSlices"),f=>Q(Y(f),h=>{let p=m=>D(R(O(h,m),ue),"");return{name:p("name"),schema:D(Q(O(h,"schema"),m=>Fx(a,m)),null),queryField:p("queryField"),sortIndex:0,linkedWriteSide:o(h,"linkedWriteSide"),labelField:p("labelField"),labelFieldSource:R(O(h,"labelFieldSource"),ue),searchableFields:o(h,"searchableFields"),statusField:R(O(h,"statusField"),ue)}})),d=ie(i("stateChangeSlices"),f=>Q(Y(f),h=>({name:(m=>D(R(O(h,m),ue),""))("name"),commands:SF(a,D(O(h,"commands"),[])),linkedViews:o(h,"linkedViews"),consistencyRead:R(O(h,"consistencyRead"),ue)})));return{id:a,name:a,readModels:s,aggregates:l,stateViewSlices:u,stateChangeSlices:d}}))}function b9e(e){return D(Q(R(R(R(ve.object(e),t=>t.data),ve.object),t=>t.Platform_ComponentDefinitions),_9e),[])}let y9e=`{
|
|
106
|
+
Platform_ComponentDefinitions {
|
|
107
|
+
pluginId
|
|
108
|
+
readModels { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField }
|
|
109
|
+
aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed } linkedViews }
|
|
110
|
+
stateViewSlices { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields statusField }
|
|
111
|
+
stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed } linkedViews consistencyRead }
|
|
112
|
+
}
|
|
113
|
+
}`;function Ix(e,t){return e+"/"+t}function x9e(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(Ix(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(Ix(r.pluginId,i.fragmentId),n)});return}}),t}function S9e(e,t,r){return e.get(Ix(t,r))}function E9e(e,t,r){return e.map(n=>{let i=S9e(r,t,n.fragmentId);return i!==void 0?{fragmentId:n.fragmentId,title:n.title,description:n.description,extensionPackage:n.extensionPackage,positions:n.positions,component:o=>b(Gze,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function EF(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(Q([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function w9e(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>EF(n.fragmentId,e)),r.panels.map(n=>EF(n.fragmentId,e))]:[[],[]]}function wF(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),Ut(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function k9e(e,t,r,n,i,o,a,s){let l=x9e(a);n(Dze.buildRegistry(o)),i(ie(o,p=>Q(z0e(p),m=>({pluginId:p.id,binding:m}))));let u=[],d=[],f=[],h={contents:eu()};o.forEach(p=>{let m=w9e(p.id,a),g=Mze(p,void 0,void 0,void 0,o,m[0],m[1],void 0,void 0,void 0,s[p.id],void 0),v=E9e(g.panels,p.id,l);g.pages.forEach(_=>{u.push(_)}),v.forEach(_=>{d.push(_)}),g.routes.forEach(_=>{f.push(_)}),h.contents=Py(h.contents,g.publicLinks)}),ae(e,p=>p.setPluginPages(u)),ae(t,p=>p.setPluginPanels(d)),ae(r,p=>p.setPluginRoutes(f,h.contents)),a.forEach(p=>{})}function kF(e,t,r,n,i,o,a,s,l){let u=wF(e.platformApiEndpoint,y9e,t),d=wF(e.platformApiEndpoint,c9e,t);return Promise.all([u,d]).then(f=>{let h=f[1],p=f[0];(jm(p)||jm(h))&&r();let m=b9e(p),g=u9e(h);k9e(n,i,o,a,s,m,g,l)})}let C9e=`subscription OnPluginStatusChange {
|
|
114
|
+
onPluginStatusChange { pluginId status }
|
|
115
|
+
}`,R9e=`subscription OnUIFragmentChange {
|
|
116
|
+
onUIFragmentChange { pluginId changeKind }
|
|
117
|
+
}`;function A9e(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=Pt(tp),o=Pt(rp),a=Dw(),s=LH(),l=Ime(),u=Na(),d=R(u,f=>f.getToken());return Ae(()=>{kF(r,d,()=>ae(u,f=>f.logout()),i,o,a,s,l,n)},[d]),Ae(()=>{try{let f=r9e(r.platformApiSubscriptionEndpoint,d),h=()=>{kF(r,d,()=>ae(u,g=>g.logout()),i,o,a,s,l,n)},p=f.subscribe({query:C9e,variables:void 0},{next:g=>h(),error:g=>{},complete:()=>{}}),m=f.subscribe({query:R9e,variables:void 0},{next:g=>h(),error:g=>{},complete:()=>{}});return()=>{p(),m(),f.dispose()}}catch{return}},[d]),null}let $9e=A9e;function Pi(e){return"var("+e+")"}let T9e=S([c("background",Pi(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",Pi(X.md)),c("padding",Pi(F.lg)),z("flex"),pe("column"),Z("center"),Ze("center"),c("gap",Pi(F.sm)),c("min-height","160px"),hs("center"),Ho({NAME:"percent",VAL:100}),c("box-sizing","border-box")]),N9e=S([c("font-size","32px"),c("line-height","1"),Eg(Ce(4))]),D9e=S([c("color",Pi(y.textPrimary)),c("font-size",Pi(T.sizeMd)),c("font-weight",Pi(T.weightMedium)),Eg(Ce(4))]),F9e=S([c("color",Pi(y.textSecondary)),c("font-size",Pi(T.sizeSm)),c("line-height",Pi(T.lineHeightNormal))]),I9e=S([c("color",Pi(y.textDisabled)),c("font-size",Pi(T.sizeXs)),c("font-family",Pi(T.fontFamilyMono)),Ca(Ce(8))]);function P9e(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:N9e}),b("div",{children:t.title,className:D9e}),b("div",{children:t.description,className:F9e}),b("div",{children:t.extensionPackage,className:I9e})],className:T9e})}let O9e=P9e,M9e=S([z("flex"),Z("center"),Ze("center"),c("min-height","160px"),c("color","var("+y.textSecondary+")"),c("font-size","var("+T.sizeSm+")")]);function L9e(e){return b("div",{children:"Loading…",className:M9e})}S([z("flex"),Z("center"),Ze("center"),c("min-height","160px"),c("color","var("+y.error+")"),c("font-size","var("+T.sizeSm+")")]);function z9e(e){let t=xl(),r=Ppe(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?b(O9e,{definition:r}):b(X7,{children:r.component(e.props),fallback:b(L9e,{})})}let U9e=z9e;function B9e(e){let t=Ipe(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?b("div",{children:t.map(o=>b(U9e,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let j9e=B9e;function q9e(e){return L("div",{children:[L("header",{children:[b("h1",{children:"Platform overview",style:{margin:"0"}}),b("p",{children:"Summary panels contributed by connected plugins appear below.",style:{color:"#666",margin:"0.25rem 0 0"}})]}),b(j9e,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let V9e=q9e,K9e="host.home",H9e="/",W9e={label:"Home",icon:void 0,group:void 0,sortOrder:0},G9e=H9e,J9e={fragmentId:K9e,title:"Home",menuEntry:W9e,requiredAccess:void 0,url:G9e};function Q9e(e){let t=e.config,r=Pt(tp),n=Dw(),i=vL(),o=fg(void 0);return Ae(()=>{t.autoRedirectFirstPage||(ae(r,a=>a.register([J9e])),ae(n,a=>a.register([tc(zF(s=>s),b(V9e,{}))],eu())))},[]),Ae(()=>{if(t.autoRedirectFirstPage&&(o===""||o==="/")){let a=i.find(s=>Ge(s.url));if(a!==void 0){let s=a.url;s!==void 0&&Ih(s)}}},[i.length,o]),null}let Y9e=Q9e,X9e=`mutation UploadPresign($store: ID!, $fileName: String!, $contentType: String) {
|
|
118
|
+
Upload_Presign(store: $store, fileName: $fileName, contentType: $contentType) {
|
|
119
|
+
uploadUrl
|
|
120
|
+
storageRef
|
|
121
|
+
}
|
|
122
|
+
}`,Z9e=`mutation UploadRelease($store: ID!, $storageRef: String!) {
|
|
123
|
+
Upload_Release(store: $store, storageRef: $storageRef) {
|
|
124
|
+
released
|
|
125
|
+
reason
|
|
126
|
+
}
|
|
127
|
+
}`;function w7(e,t){return R(R(Y(e),r=>O(r,t)),Y)}function e7e(e){return R(w7(e,"Upload_Presign"),t=>{let r=R(O(t,"uploadUrl"),ue),n=R(O(t,"storageRef"),ue);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function t7e(e){let t=w7(e,"Upload_Release");return t!==void 0?ze(R(O(t,"released"),Bx),!0)?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:D(R(O(t,"reason"),ue),"Could not release the uploaded file")}:{TAG:"Error",_0:"Could not release the uploaded file"}}function r7e(e,t,r,n,i){return new Promise((o,a)=>{let s=new XMLHttpRequest;s.open("PUT",e),s.setRequestHeader("Content-Type",n),s.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},s.onload=()=>{let l=s.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},s.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),s.send(r)})}function n7e(e,t){return{upload:(r,n)=>{let i=r.type;return Ut(e()(X9e,ut([["store",t],["fileName",r.name],["contentType",i]])).then(o=>{let a=e7e(o);return a!==void 0?r7e(a.uploadUrl,a.storageRef,r,i,n):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})}),o=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))},remove:r=>Ut(e()(Z9e,ut([["store",t],["storageRef",r]])).then(t7e),n=>Promise.resolve({TAG:"Error",_0:"Release request failed"}))}}let i7e=[],o7e=[],a7e=[],s7e={pages:i7e,panels:o7e,routes:a7e};function k7(e){return L("div",{children:[b("h1",{children:"Shell failed to boot"}),b("pre",{children:e.message})],style:{color:"#a00",fontFamily:"system-ui",padding:"2rem"}})}function ak(e){return b("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function l7e(e){let t=e.extensions,r=Pt(tp),n=Pt(rp),i=Dw();return Ae(()=>{t.pages.length!==0&&ae(r,o=>o.register(t.pages)),t.panels.length!==0&&ae(n,o=>o.register(t.panels)),t.routes.length!==0&&ae(i,o=>o.register(t.routes,eu()))},[]),null}function Px(e){let t=e.config,r=Jpe(),n=Gpe(),i=L("div",{children:[b(zme,{}),b(e0e,{}),b(Nhe,{})],style:{borderBottom:"1px solid var("+y.borderSubtle+")",display:"flex",padding:"0.5rem 1rem",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem"}});return L(Gr,{children:[b(Y9e,{config:t}),b($9e,{config:t,uiHints:e.uiHints}),b(l7e,{extensions:e.extensions}),b(vpe,{appName:"Reventless",router:r,headerSlot:i,routesReady:n,loading:b(ak,{})})]})}function u7e(e){let t=e.discoverPlatforms,r=fg(void 0),n=SL(r);if(n===void 0)return t!==void 0?b(k0e,{discover:t}):b(k7,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return b(EL.make,{scope:i,children:b(vU,{value:{prefix:Nw(i),path:n[1]},children:b(Px,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function CF(e){let t=e.access;return b(Jhe,{access:t,children:b(qhe.make,{children:b(Fpe.make,{access:t,children:b(Wpe.make,{children:b(MH.make,{children:b(Dme.make,{children:e.children})})})})})})}function c7e(e){let t=e.uiHints,r=e.extensions,n=e.config,i=Na(),o=n.mode,a;if(o==="Single"){let u=n.environment,d=n.platformName;a=u!==void 0&&d!==void 0?b(EL.make,{scope:{environment:u,platformName:d},children:b(Px,{config:n,extensions:r,uiHints:t})}):b(Px,{config:n,extensions:r,uiHints:t})}else a=b(u7e,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return b(CF,{access:n.accessTiers,children:a});if(i===void 0)return b(oT,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?b(CF,{access:l.groups.concat(n.accessTiers),children:a}):b(oT,{})}function d7e(e){let t=e.config,r=Na();XU(t.assetOrigins);let n=fg(void 0),i=t.mode,o;o=i==="Single"?void 0:Q(SL(n),d=>d[0]);let a=de(o,"",d=>d.environment+"|"+d.platformName),s=Bt(()=>{let d=yoe(t.apiEndpoint,t.platformApiEndpoint,()=>R(r,f=>f.getToken()),()=>ae(r,f=>f.logout()));return o!==void 0?y0e(o)(d):d},[t,r,a]),l=()=>R(r,d=>d.getToken()),u=We(s);return u.current=s,Oie.contents=s,Ae(()=>{let d={},f=h=>{let p=d[h];if(p!==void 0)return p;let m=n7e(()=>u.current,h);return d[h]=m,m};hge(h=>f(h),void 0,void 0)},[]),b(zie.make,{execute:s,children:b(ATe,{config:t,children:b(m0e.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,getToken:l,children:b(Tpe.make,{initialPreset:"Light",children:b(c7e,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})})})})}function f7e(e,t){let r=se(()=>{}),n=r[1];return Ae(()=>{_oe(e.uiHintsUrl).then(i=>n(o=>i))},[e.uiHintsUrl]),Q(r[0],i=>ioe(i,D(t.uiHints,{})))}function h7e(e){let t=e.extensions,r=e.config,n=f7e(r,t);return b(Ehe.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:n!==void 0?b(d7e,{config:r,extensions:t,uiHints:n,discoverPlatforms:e.discoverPlatforms}):b(ak,{})})}function p7e(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:s7e,i=se(()=>"LoadingConfig"),o=i[1],a=i[0];return Ae(()=>{boe().then(s=>{if(s.TAG==="Ok"){let u=s._0;return t!==void 0?Ut(t(u).then(()=>o(d=>({TAG:"Ready",_0:u}))),d=>(console.error("[ShellApp] optional view modes failed to register — continuing without them: "+String(d)),o(f=>({TAG:"Ready",_0:u})),Promise.resolve())):(o(d=>({TAG:"Ready",_0:u})),Promise.resolve())}let l=s._0;return o(u=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof a!="object"?b(ak,{}):a.TAG==="Ready"?b(h7e,{config:a._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):b(k7,{message:a._0})}let m7e={make:p7e},RF=document.querySelector("#root");RF!=null&&H7(RF).render(b(m7e.make,{registerModes:aU}));export{Ut as $,xa as A,Ge as B,y as C,Bi as D,xr as E,Oie as F,bE as G,Yc as H,X as R,F as S,T,Sa as a,$r as b,kie as c,ue as d,D as e,ie as f,O as g,yt as h,R as i,_r as j,ut as k,ae as l,de as m,Jt as n,Bo as o,ks as p,x9 as q,ot as r,bu as s,qu as t,Rpe as u,nr as v,ep as w,Yo as x,C7e as y,Y as z};
|