@reventlessdev/reventless-host-shell 3.0.0-alpha.49 → 3.0.0-alpha.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +49 -0
- package/README.md +125 -0
- package/dist/assets/{Geocoder.res-p3AUOmOW.js → Geocoder.res-Dm3-2yhE.js} +1 -1
- package/dist/assets/{GraphMode.res-C5hfkBfg.js → GraphMode.res-DEnv8B0Y.js} +1 -1
- package/dist/assets/{MapMode.res-DwpJCYUp.js → MapMode.res-BWRtOfiH.js} +2 -2
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__reventless_host_shell-Cku7ny5H.js → _virtual_mf-localSharedImportMap___mfe_internal__reventless_host_shell-B7ZtbgoZ.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuHP-S1B.js → _virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js} +1 -1
- package/dist/assets/{hostInit-pu7ux4YL.js → hostInit-CfvTZuUO.js} +1 -1
- package/dist/assets/{index-BLVhdQNl.js → index-BegL3iwB.js} +1 -1
- package/dist/assets/index-C8Huy8vm.js +117 -0
- package/dist/assets/{remoteEntry-n7UDZlm9.js → remoteEntry-hIn3mRcI.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-dsc9aHJC.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-TJtk2Lkb.js} +1 -1
- package/dist/mf-entry-bootstrap-0.js +2 -2
- package/package.json +16 -16
- package/dist/assets/index-ttdQLNPH.js +0 -117
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-DEnv8B0Y.js","assets/MapMode.res-BWRtOfiH.js","assets/Geocoder.res-Dm3-2yhE.js","assets/index-BegL3iwB.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import"./virtualExposes-DN39MDG_.js";import{d as SF}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-TJtk2Lkb.js";import{_ as T0}from"./preload-helper-BlTxHScW.js";import{_ as O7}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 Hr}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 ae,b as Ae,c as dr,d as Ar,e as M7,f as zt,g as Yr,h as Je,i as jt,j as Px,k as L7,l as EF,m as Qi,n as z7,o as U7,p as B7,q as j7}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js";import{c as eg,_ as xt}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function q7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{a as xp,b as V7}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 K7(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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).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 Wt(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 ys(e){if(e!=null)return Wt(e)}function rr(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 cm="JsExn";function H7(e){if(e.RE_EXN_ID===cm)return Wt(e._1)}function W7(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function Su(e){return W7(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let G7=["map","graph"];async function J7(e,t){switch(e){case"graph":return(await T0(()=>import("./GraphMode.res-DEnv8B0Y.js"),__vite__mapDeps([0])).then(s=>s.init))(t.graphLayout,void 0);case"map":let n=await T0(()=>import("./MapMode.res-BWRtOfiH.js"),__vite__mapDeps([1])).then(s=>s.init),i=t.geocoderEndpoint,o;return i!==void 0?o=(await T0(()=>import("./Geocoder.res-Dm3-2yhE.js"),__vite__mapDeps([2])).then(a=>a.fromEndpoint))(i):o=void 0,n(t.mapStyle,o,void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+G7.join(", "));return}}async function Q7(e){await Promise.all(e.viewModes.map(async t=>{try{return await J7(t,e)}catch(r){let n=Su(r);if(n.RE_EXN_ID===cm){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function Nh(e,t){if(e!==void 0&&t(rr(e)))return e}function se(e,t){if(e!==void 0)return t(rr(e))}function fe(e,t,r){return e!==void 0?r(rr(e)):t}function W(e,t){if(e!==void 0)return Wt(t(rr(e)))}function R(e,t){if(e!==void 0)return t(rr(e))}function D(e,t){return e!==void 0?rr(e):t}function $h(e,t){return e!==void 0?e:t}function Be(e){return e!==void 0}function Ui(e){return e===void 0}function Y7(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function xk(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),s=(i.length!==2?n:i[0]).split("/").filter(u=>u.length!==0),a=s.length-1|0,l=0;for(;;){let u=l,d=a;if(d<0)return u;l={hd:s[d],tl:u},a=d-1|0}}}function X7(e,t){let r=globalThis.window;return e!==void 0?xk(e):r!==void 0?xk(rr(r).location.pathname):0}function Z7(){let e=globalThis.window;if(e===void 0)return"";let t=rr(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function Sk(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function eU(e,t){let r=globalThis.window;return e!==void 0?Sk(e):r!==void 0?Sk(rr(r).location.search):""}function Dh(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){rr(t).pushState(null,"",e),rr(r).dispatchEvent(Y7("popstate"));return}}function tU(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:X7(e),hash:Z7(),search:eU(e)}}function rU(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(Ny(void 0));return rr(t).addEventListener("popstate",r),r}function nU(e){let t=globalThis.window;if(t!==void 0){rr(t).removeEventListener("popstate",e);return}}function iU(e,t){let r=ae(()=>Ny(void 0)),n=r[1],i=r[0];return Ae(()=>{let o=rU(a=>n(l=>a)),s=Ny(void 0);return tU(s,i)&&n(a=>s),()=>nU(o)},[]),i}let dm=dr({prefix:"",path:""});function wF(e,t){return e===""||t.startsWith(e)?t:e+t}let oU=dm.Provider;function sU(e){return Ar(oU,{value:e.value,children:e.children})}let aU=sU,Ek="popstate";function lU(){let e=globalThis.window;return e!==void 0?rr(e).location.pathname:""}function uU(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=rr(t);return r.addEventListener(Ek,e),()=>{r.removeEventListener(Ek,e)}}function fm(e,t){return M7(uU,lU,()=>D(e,""))}function _l(){let t=zt(dm).prefix;return r=>Dh(wF(t,r))}function cU(){let t=zt(dm).path,r=fm(void 0);return t===""?r:t}function Gt(e,t){return e.catch(r=>t(Su(r)))}function Ox(e,t){return e<t?-1:e===t?0:1}function Uo(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function kF(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 st(e,t,r){return e.reduce(r,t)}function dU(e,t){let r=e.findIndex(t);if(r!==-1)return r}function ne(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let s=e[o],a=t(s);a!==void 0&&(n[i]=rr(a),i=i+1|0)}return n.length=i,n}function CF(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let s=e[o],a=t(s,o);a!==void 0&&(n[i]=rr(a),i=i+1|0)}return n.length=i,n}function fU(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 RF(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function hU(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 pU(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return hU(e.tl,r).tl=t,r}function gU(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 mU(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 Mx(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 Lx(e){let t=gU(e),r=new Array(t);return mU(r,0,e),r}function vU(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function AF(e){return vU(e,0)}function _U(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function TF(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function bU(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 s=0,a=o.length;s<a;++s)n[r]=o[s],r=r+1|0}return n}function yU(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let NF=yU;function dc(e){return e!==void 0?e.h:0}function rs(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 xU(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function SU(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function wk(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)?rs(l,e.k,e.v,rs(u,t,r,n)):rs(rs(l,e.k,e.v,u.l),u.k,u.v,rs(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 s=n.l,a=n.r;return dc(a)>=dc(s)?rs(rs(e,t,r,s),n.k,n.v,a):rs(rs(e,t,r,s.l),s.k,s.v,rs(s.r,n.k,n.v,a))}function zf(e,t){return e===t?0:e<t?-1:1}function EU(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Wt(r.v);e=t<n?r.l:r.r}}function $y(e,t,r){if(e===void 0)return xU(t,r);let n=e.k;if(t===n)return SU(e,r);let i=e.v;return t<n?wk($y(e.l,t,r),n,i,e.r):wk(e.l,n,i,$y(e.r,t,r))}let $F=EU;function DF(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=Mx(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 Dy={parsers:0,children:void 0,capture:void 0,wildcard:!1};function wU(e,t){let r=e,n=t;for(;;){let i=n,o=r,s=o.parsers,a=0;if(s!==0)a=1;else{if(i===0)return 0;a=1}if(a===1){let l=o.capture,u=0;if(i===0)return s;if(i.hd===""){if(i.tl===0)return s;u=2}else u=2;if(u===2){if(o.wildcard)return s;let d=i.tl,f=$F(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 kU(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 s=o.capture,a=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,s!==void 0?s:Dy);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=u._0,f=$F(a,d),p=n(l,f!==void 0?f:Dy);return{parsers:o.parsers,children:$y(a,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function CU(e){return{prefix:0,matched:DF(e)}}function RU(e){return Lx({hd:"",tl:e.matched}).join("/")}function AU(e){return Lx({hd:"",tl:e.prefix}).join("/")}function TU(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function tg(e,t){return{TAG:"Match",_0:e,_1:t}}function Fy(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:Fy(e._1)}:{hd:"Capture",tl:Fy(e._1)}}function NU(e,t){let r=i=>e("/"+Lx(i).join("/")),n=(i,o)=>{for(;;){let s=o,a=i;if(typeof s!="object")return s==="End"?a(0):d=>a(pU(d.matched,0));if(s.TAG==="Match"){let d=s._0;o=s._1,i=f=>a({hd:d,tl:f});continue}let l=s._1,u=s._0.to_;return d=>n(f=>a({hd:u(d),tl:f}),l)}};return n(r,t)}function $U(e){return NU(t=>t,e)}function DU(e,t,r){let n=e,i=t,o=0,s=r;for(;;){let a=s,l=o,u=i,d=n;if(typeof d!="object")return d==="End"?a!==0?a.hd===""&&a.tl===0?{TAG:"MatchWithTrailingSlash",_0:u}:"NoMatch":{TAG:"FullMatch",_0:u}:{TAG:"FullMatch",_0:u({prefix:AF(l),matched:a})};if(d.TAG==="Match"){if(a===0)return"NoMatch";let p=a.hd;if(d._0!==p)return"NoMatch";s=a.tl,o={hd:p,tl:l},n=d._1;continue}if(a===0)return"NoMatch";let f=a.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";s=a.tl,o={hd:f,tl:l},i=u(rr(h)),n=d._1}}function FU(e){let t=AF(e);return TF(t,Dy,(r,n)=>{let i=Fy(n._0);return kU(i,n,r)})}function IU(e,t){let r=DF(t),i=wU(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let s=o.hd,a=s._2,l=DU(s._0,s._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:a(l._0)}:{TAG:"MatchWithTrailingSlash",_0:a(l._0)};i=o.tl}}function PU(e,t){let r=IU(e,t);if(typeof r=="object")return Wt(r._0)}function FF(e){return e("End")}let IF={prefix:AU,wildcard_match:RU,of_parts:CU},OU="Wildcard",Vs=$U,tc=TU;function eu(){return{}}let PF=dr({});function MU(e,t){return e+("."+t)}function LU(e,t,r,n){return e[MU(t,r)]=Vs(n),e}function Iy(e,t){return Object.assign(Object.assign({},e),t)}function hm(){return zt(PF)}let zU=PF.Provider;function UU(e){return Ar(zU,{value:e.registry,children:e.children})}let BU={make:UU},OF={contents:{}};function jU(e){OF.contents=e}function qU(e){let t=e.startsWith("/")?e.slice(1):e,r=t.indexOf("/");if(r!==-1)return t.slice(0,r)}function tu(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=qU(e);if(t===void 0)return e;let r=OF.contents[t];if(r===void 0)return e;let n=e.startsWith("/")?e:"/"+e;return(r.endsWith("/")?r.slice(0,r.length-1|0):r)+n}function VU(e){if(typeof e=="boolean")return e}function KU(e){if(e===null)return null}function HU(e){if(typeof e=="string")return e}function WU(e){if(typeof e=="number")return e}function GU(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function JU(e){if(Array.isArray(e))return e}let me={bool:VU,$$null:KU,string:HU,float:WU,object:GU,array:JU};function O(e,t){if(t in e)return Wt(e[t])}function Ge(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 zx(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 dt(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 ce(e){if(typeof e=="string")return e}function Bo(e){if(typeof e=="number")return e}function Q(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function br(e){if(Array.isArray(e))return e}function MF(e){if(typeof e=="boolean")return e}let kk=(function(e,t){for(var r in e)t(r)});function Ue(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 s=e.length|0,a=t.length|0;if(s===a)if(Array.isArray(e)){let l=0;for(;;){let u=l;if(u===s)return!0;if(!Ue(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)||!Ue(t[f],e[f])){l.contents=!1;return}};return kk(e,u),l.contents&&kk(t,d),l.contents}}else return!1}function Uf(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!Ue(e,t)}function Qn(e){let t=Q(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(W(st(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:R(R(O(t,o),br),s=>s.find(a=>Uf(R(R(Q(a),l=>O(l,"type")),ce),"null")))),Qn),e)}function QU(e,t){return t.startsWith(e)}function YU(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let Zr={initial:"initial",inherit_:"inherit_",unset:"unset",toString:YU};function XU(e){return{NAME:"var",VAL:e}}function ZU(e,t){return{NAME:"varDefault",VAL:[e,t]}}function Ck(e){return QU("--",e)?e:"--"+e}function pm(e){if(e.NAME==="var")return"var("+Ck(e.VAL)+")";let t=e.VAL;return"var("+Ck(t[0])+","+t[1]+")"}function eB(e){return{NAME:"s",VAL:e}}function tB(e){return{NAME:"ms",VAL:e}}function rB(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let nB={s:eB,ms:tB,toString:rB};function Ux(e){return e.VAL.toString()+"%"}function iB(e){return{NAME:"ch",VAL:e}}function oB(e){return{NAME:"em",VAL:e}}function sB(e){return{NAME:"ex",VAL:e}}function aB(e){return{NAME:"rem",VAL:e}}function lB(e){return{NAME:"vh",VAL:e}}function uB(e){return{NAME:"vw",VAL:e}}function cB(e){return{NAME:"vmin",VAL:e}}function dB(e){return{NAME:"vmax",VAL:e}}function fB(e){return{NAME:"px",VAL:e}}function hB(e){return{NAME:"pxFloat",VAL:e}}function pB(e){return{NAME:"cm",VAL:e}}function gB(e){return{NAME:"mm",VAL:e}}function mB(e){return{NAME:"inch",VAL:e}}function vB(e){return{NAME:"pc",VAL:e}}function _B(e){return{NAME:"pt",VAL:e}}function Py(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 LF={ch:iB,em:oB,ex:sB,rem:aB,vh:lB,vw:uB,vmin:cB,vmax:dB,px:fB,pxFloat:hB,cm:pB,mm:gB,inch:mB,pc:vB,pt:_B,zero:"zero",toString:Py};function bB(e,t){return{NAME:"min",VAL:[e,t]}}function yB(e,t){return{NAME:"max",VAL:[e,t]}}function Co(e){if(typeof e!="object")return Py(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+Co(n[0])+" - "+Co(n[1])+")"}if(t==="percent")return Ux(e);if(t==="add"){let n=e.VAL;return"calc("+Co(n[0])+" + "+Co(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+Co(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+Co(n[0])+", "+Co(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+Co(n[0])+", "+Co(n[1])+")"}if(t!=="mul")return Py(e);let r=e.VAL;return"calc("+Co(r[0])+" * "+r[1].toString()+")"}let Xr={min:bB,max:yB,toString:Co};function xB(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 SB(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let EB={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:SB};function wB(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let zF={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:wB};function kB(e){return"auto"}let CB={auto:"auto",toString:kB};function RB(e,t){return{NAME:"steps",VAL:[e,t]}}function AB(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function TB(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 NB(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 $B={toString:NB};function DB(e){return typeof e=="object"?e.VAL.toString():"infinite"}let FB={toString:DB};function IB(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 PB={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:IB};function OB(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function MB(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function LB(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function zB(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function UB(e){return{NAME:"hex",VAL:e}}function Rk(e){let t=e.NAME;return t==="var"||t==="varDefault"?pm(e):xB(e)}function Ak(e){let t=e.NAME;return t==="percent"?Ux(e):t==="num"?e.VAL.toString():pm(e)}function Sp(e){return e.NAME==="percent"?Ux(e):pm(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()+", "+Ak(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+Rk(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("+Rk(r[0])+", "+Sp(r[1])+", "+Sp(r[2])+", "+Ak(r[3])+")"}function BB(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 jB(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 qB={toString:jB};function VB(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let KB={toString:VB};function HB(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let WB={toString:HB};function GB(e){return"list-item"}let JB={toString:GB};function QB(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 YB={toString:QB};function XB(e){return e==="contents"?"contents":"none"}let ZB={toString:XB};function ej(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let tj={toString:ej};function rj(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 Bx={toString:rj};function nj(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let UF={toString:nj};function ij(e){return"normal"}let oj={toString:ij};function sj(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let aj={toString:sj};function lj(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let uj={toString:lj};function cj(e){return e==="normal"?"normal":"stretch"}let dj={toString:cj};function fj(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let hj={toString:fj};function pj(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let gj={toString:pj};function mj(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let vj={toString:mj};function _j(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let bj={toString:_j};function yj(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let jx={toString:yj};function xj(e){return"none"}let gm={toString:xj};function Sj(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let qx={toString:Sj},Gr={$$var:XU,varDefault:ZU,toString:pm},Ej={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:RB,cubicBezier:AB,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:TB},Oy={rgb:OB,rgba:MB,hsl:LB,hsla:zB,hex:UB,transparent:"transparent",currentColor:"currentColor",toString:BB},wj=gm,kj=gm,Cj=gm,Rj=gm,Aj=Oy.transparent;function Tj(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 NF(e,{},Tj)}function Nj(e){let t=p=>e.injectRaw(p),r=(p,g)=>e.renderRaw(p,g),n=(p,g)=>e.injectRules(p,Ul(g)),i=(p,g,m)=>e.renderRules(p,g,Ul(m)),o=p=>e.make(Ul(p)),s=p=>e.mergeStyles(p),a=(p,g)=>e.mergeStyles([p,g]),l=(p,g,m)=>e.mergeStyles([p,g,m]),u=(p,g,m,v)=>e.mergeStyles([p,g,m,v]),d=p=>NF(p,{},(g,m)=>(g[m[0].toString()+"%"]=Ul(m[1]),g));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:s,merge2:a,merge3:l,merge4:u,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,g)=>e.renderKeyframes(p,d(g))}}function mm(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?Gr.toString(e):Xr.toString(e)}function $j(e){if(typeof e!="object")return Oy.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Gr.toString(e):Oy.toString(e)}function Dj(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?UF.toString(e):e==="normal"||e==="stretch"?dj.toString(e):Bx.toString(e)}}function Fj(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?Gr.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?Bx.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?UF.toString(e):hj.toString(e)}}function Ij(e){return{TAG:"D",_0:"animationDuration",_1:nB.toString(e)}}function Pj(e){return{TAG:"D",_0:"animationIterationCount",_1:FB.toString(e)}}function Oj(e){return{TAG:"D",_0:"animationTimingFunction",_1:Ej.toString(e)}}function Mj(e){return{TAG:"D",_0:"bottom",_1:mm(e)}}function Lj(e){return{TAG:"D",_0:"cursor",_1:PB.toString(e)}}function zj(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?Gr.toString(e):e==="table"||e==="grid"||e==="flex"?WB.toString(e):e==="contents"||e==="none"?ZB.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?tj.toString(e):e==="block"||e==="inline"||e==="runIn"?KB.toString(e):e==="listItem"?JB.toString(e):YB.toString(e)}}function Uj(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):vj.toString(e)}}function Bj(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function jj(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function qj(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?Gr.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?gj.toString(e):Zr.toString(e)}}function Vj(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Gr.toString(e):Xr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):qx.toString(e);return{TAG:"D",_0:"height",_1:t}}function Kj(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?Gr.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?aj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="normal"?oj.toString(e):Bx.toString(e)}}function Hj(e){return{TAG:"D",_0:"left",_1:mm(e)}}function Wj(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):$B.toString(e)}}function ru(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):CB.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Gr.toString(e):Xr.toString(e)}function Gj(e){return{TAG:"D",_0:"margin",_1:ru(e)}}function Jj(e,t){return{TAG:"D",_0:"margin",_1:ru(e)+(" "+ru(t))}}function Qj(e){return{TAG:"D",_0:"marginLeft",_1:ru(e)}}function Yj(e){return{TAG:"D",_0:"marginRight",_1:ru(e)}}function Xj(e){return{TAG:"D",_0:"marginTop",_1:ru(e)}}function Zj(e){return{TAG:"D",_0:"marginBottom",_1:ru(e)}}function eq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Gr.toString(e):Xr.toString(e)}else t=e==="none"?Cj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):qx.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function tq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Gr.toString(e):Xr.toString(e)}else t=e==="none"?wj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):jx.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function rq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Gr.toString(e):Xr.toString(e)}else t=e==="none"?Rj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):qx.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function nq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Gr.toString(e):Xr.toString(e)}else t=e==="none"?kj.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):jx.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function iq(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function oq(e){return{TAG:"D",_0:"overflow",_1:zF.toString(e)}}function sq(e){return{TAG:"D",_0:"overflowY",_1:zF.toString(e)}}function aq(e){return{TAG:"D",_0:"padding",_1:Xr.toString(e)}}function lq(e,t){return{TAG:"D",_0:"padding",_1:Xr.toString(e)+(" "+Xr.toString(t))}}function uq(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):EB.toString(e)}}function cq(e){return{TAG:"D",_0:"right",_1:mm(e)}}function dq(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):uj.toString(e)}}function fq(e){return{TAG:"D",_0:"top",_1:mm(e)}}function hq(e,t){return{TAG:"D",_0:e,_1:t}}function pq(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):bj.toString(e)}}function gq(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Gr.toString(e):Xr.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):e==="zero"?Xr.toString(e):jx.toString(e);return{TAG:"D",_0:"width",_1:t}}function mq(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function vq(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function _q(e,t){return{TAG:"S",_0:e,_1:t}}function bq(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function yq(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function xq(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function Sq(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function Eq(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function wq(e){return{TAG:"S",_0:"::placeholder",_1:e}}let kq=LF.px;function Cq(e){return typeof e=="object"?Gr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Zr.toString(e):qB.toString(e)}function Rq(e,t,r){return{TAG:"D",_0:"border",_1:LF.toString(e)+" "+Cq(t)+" "+$j(r)}}function Aq(e){return{TAG:"D",_0:"animationName",_1:e}}function Tq(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 Nq(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 $q=(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(Nq(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Tq(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-",rg="-moz-",Ot="-webkit-",BF="comm",Vx="rule",Kx="decl",Dq="@import",jF="@keyframes",Fq="@layer",Iq=Math.abs,vm=String.fromCharCode,Pq=Object.assign;function Oq(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 qF(e){return e.trim()}function Mq(e,t){return(e=t.exec(e))?e[0]:e}function Mt(e,t,r){return e.replace(t,r)}function My(e,t){return e.indexOf(t)}function Rn(e,t){return e.charCodeAt(t)|0}function Bf(e,t,r){return e.slice(t,r)}function ls(e){return e.length}function Hx(e){return e.length}function wp(e,t){return t.push(e),e}function Lq(e,t){return e.map(t).join("")}var _m=1,Mc=1,VF=0,pi=0,Kr=0,rd="";function bm(e,t,r,n,i,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:_m,column:Mc,length:s,return:""}}function Od(e,t){return Pq(bm("",null,null,"",null,null,0),e,{length:-e.length},t)}function zq(){return Kr}function Uq(){return Kr=pi>0?Rn(rd,--pi):0,Mc--,Kr===10&&(Mc=1,_m--),Kr}function Oi(){return Kr=pi<VF?Rn(rd,pi++):0,Mc++,Kr===10&&(Mc=1,_m++),Kr}function vs(){return Rn(rd,pi)}function N0(){return pi}function Fh(e,t){return Bf(rd,e,t)}function jf(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 KF(e){return _m=Mc=1,VF=ls(rd=e),pi=0,[]}function HF(e){return rd="",e}function $0(e){return qF(Fh(pi-1,Ly(e===91?e+2:e===40?e+1:e)))}function Bq(e){for(;(Kr=vs())&&Kr<33;)Oi();return jf(e)>2||jf(Kr)>3?"":" "}function jq(e,t){for(;--t&&Oi()&&!(Kr<48||Kr>102||Kr>57&&Kr<65||Kr>70&&Kr<97););return Fh(e,N0()+(t<6&&vs()==32&&Oi()==32))}function Ly(e){for(;Oi();)switch(Kr){case e:return pi;case 34:case 39:e!==34&&e!==39&&Ly(Kr);break;case 40:e===41&&Ly(e);break;case 92:Oi();break}return pi}function qq(e,t){for(;Oi()&&e+Kr!==57;)if(e+Kr===84&&vs()===47)break;return"/*"+Fh(t,pi-1)+"*"+vm(e===47?e:Oi())}function Vq(e){for(;!jf(vs());)Oi();return Fh(e,pi)}function Kq(e){return HF(D0("",null,null,null,[""],e=KF(e),0,[0],e))}function D0(e,t,r,n,i,o,s,a,l){for(var u=0,d=0,f=s,h=0,p=0,g=0,m=1,v=1,_=1,x=0,E="",S=i,C=o,k=n,N=E;v;)switch(g=x,x=Oi()){case 40:if(g!=108&&Rn(N,f-1)==58){My(N+=Mt($0(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:N+=$0(x);break;case 9:case 10:case 13:case 32:N+=Bq(g);break;case 92:N+=jq(N0()-1,7);continue;case 47:switch(vs()){case 42:case 47:wp(Hq(qq(Oi(),N0()),t,r),l);break;default:N+="/"}break;case 123*m:a[u++]=ls(N)*_;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+d:_==-1&&(N=Mt(N,/\f/g,"")),p>0&&ls(N)-f&&wp(p>32?Nk(N+";",n,r,f-1):Nk(Mt(N," ","")+";",n,r,f-2),l);break;case 59:N+=";";default:if(wp(k=Tk(N,t,r,u,d,i,a,E,S=[],C=[],f),o),x===123)if(d===0)D0(N,t,k,k,S,o,f,a,C);else switch(h===99&&Rn(N,3)===110?100:h){case 100:case 108:case 109:case 115:D0(e,k,k,n&&wp(Tk(e,k,k,0,0,i,a,E,i,S=[],f),C),i,C,f,a,n?S:C);break;default:D0(N,k,k,k,[""],C,0,a,C)}}u=d=p=0,m=_=1,E=N="",f=s;break;case 58:f=1+ls(N),p=g;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Uq()==125)continue}switch(N+=vm(x),x*m){case 38:_=d>0?1:(N+="\f",-1);break;case 44:a[u++]=(ls(N)-1)*_,_=1;break;case 64:vs()===45&&(N+=$0(Oi())),h=vs(),d=f=ls(E=N+=Vq(N0())),x++;break;case 45:g===45&&ls(N)==2&&(m=0)}}return o}function Tk(e,t,r,n,i,o,s,a,l,u,d){for(var f=i-1,h=i===0?o:[""],p=Hx(h),g=0,m=0,v=0;g<n;++g)for(var _=0,x=Bf(e,f+1,f=Iq(m=s[g])),E=e;_<p;++_)(E=qF(m>0?h[_]+" "+x:Mt(x,/&\f/g,h[_])))&&(l[v++]=E);return bm(e,t,r,i===0?Vx:a,l,u,d)}function Hq(e,t,r){return bm(e,t,r,BF,vm(zq()),Bf(e,2,-2),0)}function Nk(e,t,r,n){return bm(e,t,r,Kx,Bf(e,0,n),Bf(e,n+1,-1),n)}function _c(e,t){for(var r="",n=Hx(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Wq(e,t,r,n){switch(e.type){case Fq:if(e.children.length)break;case Dq:case Kx:return e.return=e.return||e.value;case BF:return"";case jF:return e.return=e.value+"{"+_c(e.children,n)+"}";case Vx:e.value=e.props.join(",")}return ls(r=_c(e.children,n))?e.return=e.value+"{"+r+"}":""}function Gq(e){var t=Hx(e);return function(r,n,i,o){for(var s="",a=0;a<t;a++)s+=e[a](r,n,i,o)||"";return s}}function Jq(e){return function(t){t.root||(t=t.return)&&e(t)}}function Qq(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Yq=function(t,r,n){for(var i=0,o=0;i=o,o=vs(),i===38&&o===12&&(r[n]=1),!jf(o);)Oi();return Fh(t,pi)},Xq=function(t,r){var n=-1,i=44;do switch(jf(i)){case 0:i===38&&vs()===12&&(r[n]=1),t[n]+=Yq(pi-1,r,n);break;case 2:t[n]+=$0(i);break;case 4:if(i===44){t[++n]=vs()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=vm(i)}while(i=Oi());return t},Zq=function(t,r){return HF(Xq(KF(t),r))},$k=new WeakMap,eV=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&&!$k.get(n))&&!i){$k.set(t,!0);for(var o=[],s=Zq(r,o),a=n.props,l=0,u=0;l<s.length;l++)for(var d=0;d<a.length;d++,u++)t.props[u]=o[l]?s[l].replace(/&\f/g,a[d]):a[d]+" "+s[l]}}},tV=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function WF(e,t){switch(Oq(e,t)){case 5103:return Ot+"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 Ot+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ot+e+rg+e+On+e+e;case 6828:case 4268:return Ot+e+On+e+e;case 6165:return Ot+e+On+"flex-"+e+e;case 5187:return Ot+e+Mt(e,/(\w+).+(:[^]+)/,Ot+"box-$1$2"+On+"flex-$1$2")+e;case 5443:return Ot+e+On+"flex-item-"+Mt(e,/flex-|-self/,"")+e;case 4675:return Ot+e+On+"flex-line-pack"+Mt(e,/align-content|flex-|-self/,"")+e;case 5548:return Ot+e+On+Mt(e,"shrink","negative")+e;case 5292:return Ot+e+On+Mt(e,"basis","preferred-size")+e;case 6060:return Ot+"box-"+Mt(e,"-grow","")+Ot+e+On+Mt(e,"grow","positive")+e;case 4554:return Ot+Mt(e,/([^-])(transform)/g,"$1"+Ot+"$2")+e;case 6187:return Mt(Mt(Mt(e,/(zoom-|grab)/,Ot+"$1"),/(image-set)/,Ot+"$1"),e,"")+e;case 5495:case 3959:return Mt(e,/(image-set\([^]*)/,Ot+"$1$`$1");case 4968:return Mt(Mt(e,/(.+:)(flex-)?(.*)/,Ot+"box-pack:$3"+On+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ot+e+e;case 4095:case 3583:case 4068:case 2532:return Mt(e,/(.+)-inline(.+)/,Ot+"$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(ls(e)-1-t>6)switch(Rn(e,t+1)){case 109:if(Rn(e,t+4)!==45)break;case 102:return Mt(e,/(.+:)(.+)-([^]+)/,"$1"+Ot+"$2-$3$1"+rg+(Rn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~My(e,"stretch")?WF(Mt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Rn(e,t+1)!==115)break;case 6444:switch(Rn(e,ls(e)-3-(~My(e,"!important")&&10))){case 107:return Mt(e,":",":"+Ot)+e;case 101:return Mt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ot+(Rn(e,14)===45?"inline-":"")+"box$3$1"+Ot+"$2$3$1"+On+"$2box$3")+e}break;case 5936:switch(Rn(e,t+11)){case 114:return Ot+e+On+Mt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ot+e+On+Mt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ot+e+On+Mt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ot+e+On+e+e}return e}var rV=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Kx:t.return=WF(t.value,t.length);break;case jF:return _c([Od(t,{value:Mt(t.value,"@","@"+Ot)})],i);case Vx:if(t.length)return Lq(t.props,function(o){switch(Mq(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _c([Od(t,{props:[Mt(o,/:(read-\w+)/,":"+rg+"$1")]})],i);case"::placeholder":return _c([Od(t,{props:[Mt(o,/:(plac\w+)/,":"+Ot+"input-$1")]}),Od(t,{props:[Mt(o,/:(plac\w+)/,":"+rg+"$1")]}),Od(t,{props:[Mt(o,/:(plac\w+)/,On+"input-$1")]})],i)}return""})}},nV=[rV],iV=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(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||nV,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;a.push(m)});var l,u=[eV,tV];{var d,f=[Wq,Jq(function(m){d.insert(m)})],h=Gq(u.concat(i,f)),p=function(v){return _c(Kq(v),h)};l=function(v,_,x,E){d=x,p(v?v+"{"+_.styles+"}":_.styles),E&&(g.inserted[_.name]=!0)}}var g={key:r,sheet:new $q({key:r,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g};function oV(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 sV={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},aV=/[A-Z]|^ms/g,lV=/_EMO_([^_]+?)_([^]*?)_EMO_/g,GF=function(t){return t.charCodeAt(1)===45},Dk=function(t){return t!=null&&typeof t!="boolean"},t_=Qq(function(e){return GF(e)?e:e.replace(aV,"-$&").toLowerCase()}),Fk=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(lV,function(n,i,o){return ja={name:i,styles:o,next:ja},i})}return sV[t]!==1&&!GF(t)&&typeof r=="number"&&r!==0?r+"px":r};function ng(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 ja={name:i.name,styles:i.styles,next:ja},i.name;var o=r;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)ja={name:s.name,styles:s.styles,next:ja},s=s.next;var a=o.styles+";";return a}return uV(e,t,r)}}var l=r;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function uV(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ng(e,t,r[i])+";";else for(var o in r){var s=r[o];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?n+=o+"{"+t[a]+"}":Dk(a)&&(n+=t_(o)+":"+Fk(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var l=0;l<s.length;l++)Dk(s[l])&&(n+=t_(o)+":"+Fk(o,s[l])+";");else{var u=ng(e,t,s);switch(o){case"animation":case"animationName":{n+=t_(o)+":"+u+";";break}default:n+=o+"{"+u+"}"}}}return n}var Ik=/label:\s*([^\s;{]+)\s*(;|$)/g,ja;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="";ja=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=ng(r,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=ng(r,t,e[a]),n){var l=o;i+=l[a]}Ik.lastIndex=0;for(var u="",d;(d=Ik.exec(i))!==null;)u+="-"+d[1];var f=oV(i)+u;return{name:f,styles:i,next:ja}}function JF(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var cV=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},dV=function(t,r,n){cV(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 Pk(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Ok(e,t,r){var n=[],i=JF(e,n,r);return n.length<2?r:i+t(n)}var fV=function(t){var r=iV(t);r.sheet.speedy=function(a){this.isSpeedy=a},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 dV(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 Pk(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);Pk(r,f)},s=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return Ok(r.registered,n,hV(u))};return{css:n,cx:s,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:JF.bind(null,r.registered),merge:Ok.bind(null,r.registered,n)}},hV=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 s in i)i[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},ym=fV({key:"css"}),pV=ym.cx,xm=ym.injectGlobal,QF=ym.keyframes,gV=ym.css;function mV(e,t){xm(t)}function vV(e,t){xm(dt([[e,t]]))}function _V(e,t,r){xm(dt([[t,r]]))}function bV(e){return QF(e)}function yV(e,t){return QF(t)}let Sm=Nj({injectRaw:e=>{xm(e)},renderRaw:mV,injectRules:vV,renderRules:_V,make:e=>gV(e),mergeStyles:e=>pV(e),makeKeyframes:bV,renderKeyframes:yV}),c=hq,Z=Dj,xV=Fj,Wx=Mj,ye=Lj,z=zj,pe=Uj,vo=Bj,_i=jj,bi=qj,YF=Vj,Xe=Kj,nd=Hj,SV=Wj,yn=Gj,EV=Jj,Ih=Qj,XF=Yj,Cs=Xj,Em=Zj,wV=eq,kV=tq,CV=rq,ZF=nq,Ys=iq,fa=oq,RV=sq,AV=aq,TV=lq,Ut=uq,bl=cq,ha=dq,pa=fq,eI=pq,Ko=gq,NV=mq,kr=_q,tI=vq,rI=bq,ga=yq,nI=xq,We=Sq,iI=Eq,$V=wq,Ce=kq,DV=Rq,FV=Aq,IV=Ij,PV=Pj,OV=Oj,MV=Aj,LV=Sm.global,w=Sm.style,Fr=Sm.merge,zV=Sm.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"},A={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"},mn={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function ro(e){return"var("+e+")"}let UV=w([z("flex"),pe("column"),Z("center"),Xe("center"),c("gap",ro(F.md)),vo(1),c("min-height","200px"),ha("center"),c("padding",ro(F.xxl))]),BV=w([c("font-size","40px"),c("color",ro(y.textDisabled)),c("line-height","1")]),jV=w([c("color",ro(y.textPrimary)),c("font-size",ro(A.sizeLg)),c("font-weight",ro(A.weightMedium)),yn(Ce(0))]),qV=w([c("color",ro(y.textSecondary)),c("font-size",ro(A.sizeMd)),c("max-width","360px"),yn(Ce(0))]),VV=w([c("background",ro(y.brand)),c("color",ro(y.textOnBrand)),c("border","none"),c("border-radius",ro(X.md)),c("padding","var("+F.sm+") var("+F.lg+")"),c("font-size",ro(A.sizeMd)),c("cursor","pointer"),Cs(Ce(8))]);function KV(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[b("div",{children:"( )",className:BV}),b("h3",{children:r,className:jV}),fe(e.description,null,n=>b("p",{children:n,className:qV})),fe(e.action,null,n=>{let i=n[1];return b("button",{children:n[0],className:VV,onClick:o=>i()})})],className:UV})}let id=KV;function ci(e){return"var("+e+")"}let HV=w([Ko({NAME:"percent",VAL:100}),c("border-collapse","collapse"),c("font-size",ci(A.sizeMd))]),WV=w([c("background",ci(y.surfaceSubtle)),c("border-bottom","2px solid var("+y.border+")")]),Mk=w([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",ci(y.textSecondary)),c("font-weight",ci(A.weightMedium)),c("font-size",ci(A.sizeSm)),c("text-align","left"),c("white-space","nowrap"),c("user-select","none")]),GV=w([c("padding","var("+F.sm+") var("+F.md+")"),c("font-size",ci(A.sizeMd))]),JV=w([ye("pointer"),We([c("color",ci(y.textPrimary))])]),QV=w([c("color",ci(y.textPrimary))]),YV=w([Ih(Ce(4)),c("font-size",ci(A.sizeXs)),c("color",ci(y.brand))]),Lk=w([c("border-bottom","1px solid var("+y.borderSubtle+")"),We([c("background",ci(y.surfaceSubtle))])]),XV=w([c("min-height","44px")]),ZV=w([ye("pointer")]),eK=w([c("background",ci(y.surfaceSubtle)),c("box-shadow","inset 3px 0 0 0 var("+y.brand+")")]),zk=w([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",ci(y.textPrimary)),c("vertical-align","middle")]),tK=w([c("padding","var("+F.sm+") var("+F.md+")")]),rK=w([ha("center"),c("padding",ci(F.xxl))]);function nK(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?Mk+" "+GV:Mk;return b("thead",{children:b("tr",{children:e.columns.map(i=>{let o=fe(r,!1,l=>l.key===i.key),s=fe(r,"Asc",l=>l.direction),a=i.sortable?n+" "+JV+(o?" "+QV:""):n;return L("th",{children:[i.label,o?b("span",{children:s==="Asc"?"^":"v",className:YV}):null],className:a,style:fe(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return se(t,u=>{let d=o&&s==="Asc"?"Desc":"Asc";u(i.key,d)})}},i.key)})}),className:WV})}function iK(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,s=e.columns,a=r!==void 0?r:"Compact",l=a==="Comfortable"?zk+" "+tK:zk,u=a==="Comfortable"?Lk+" "+XV:Lk;return L("table",{children:[b(nK,{columns:s,sortState:e.sortState,onSort:e.onSort,density:a}),b("tbody",{children:o.length===0?b("tr",{children:b("td",{children:D(e.emptyView,b(id,{title:"No data"})),className:l+" "+rK,colSpan:s.length})}):o.map(d=>{let f=i(d),h=fe(n,u,g=>u+" "+ZV),p=Ue(t,f)?h+" "+eK:h;return b("tr",{children:s.map(g=>b("td",{children:g.render(d),className:l},g.key)),className:p,onClick:g=>se(n,m=>m(d))},f)})})],className:HV})}let ig=iK;function og(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function oK(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function sK(e){let t=ne(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 Uk(e,t){return e.toString()+" "+t+(e===1?"":"s")}function oI(e,t,r,n){let i=n!==void 0?n:"item",o=D(r,t),s=o===t?Uk(o,i):o.toString()+" of "+Uk(t,i);if(e===void 0)return"Showing the "+s+" loaded";if(typeof e!="object")return"Showing all "+s;switch(e._0){case"FromStart":return"Showing the first "+s+" — more available";case"Between":return"Showing "+s+" — more before and after";case"ToEnd":return"Showing the last "+s+" — more before"}}function sI(e,t){return t?e+"+":e}function aK(e){return typeof e=="object"}function aI(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let lI=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function lK(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}),Uo(t.contents,lI.length)}function uK(e){let t=ne(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 cK=w([z("inlineFlex"),Z("center"),Xe("center"),c("border-radius",n_(X.full)),c("color","#ffffff"),c("font-family",n_(A.fontFamily)),c("font-weight",n_(A.weightMedium)),c("flex-shrink","0"),c("user-select","none"),c("vertical-align","middle"),c("overflow","hidden")]),dK=w([c("width","100%"),c("height","100%"),c("object-fit","cover")]);function fK(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=ae(()=>!1),s=o[1],a=aI(i),l=a.toString()+"px",u=r!==void 0?r!==""&&!o[0]:!1,d={background:u?"transparent":lI[lK(n)],fontSize:((a/2|0)-1|0).toString()+"px",height:l,width:l};return b("span",{children:u?b("img",{className:dK,alt:n,src:D(r,""),onError:f=>s(h=>!0)}):uK(n),"aria-label":n,className:cK,role:"img",style:d,title:n})}let od=fK;function Ma(e){return"var("+e+")"}let hK=w([z("flex"),bi("wrap"),c("gap",Ma(F.xs)),Z("center")]),pK=w([z("inlineFlex"),Z("center"),c("padding","2px 8px"),c("border-radius",Ma(X.full)),c("background",Ma(y.surfaceElevated)),c("color",Ma(y.textSecondary)),c("font-size",Ma(A.sizeXs)),c("font-weight",Ma(A.weightMedium)),c("line-height","1.5"),c("white-space","nowrap")]),gK=w([c("color",Ma(y.textDisabled)),c("font-size",Ma(A.sizeSm))]);function mK(e){let t=e.items;return t.length===0?b("span",{children:"—",className:gK}):b("div",{children:t.map((r,n)=>b("span",{children:r,className:pK},n.toString()+":"+r)),className:hK})}let uI=mK,vK=[["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"]],_K=dt(vK);function i_(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function o_(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function bK(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 yK(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 s=e.charAt(o);if(s==="_"||s==="-"||s===" ")i();else if(i_(s)){let a=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));(a||u&&l)&&i(),n.contents=n.contents+s}else if(bK(s)){let a=!1;if(o>0){let l=e.charAt(o-1|0);a=i_(l)||o_(l)}a&&i(),n.contents=n.contents+s}else n.contents=n.contents+s}return i(),r}function xK(e){let t=e.toLowerCase(),r=O(_K,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function bt(e){let t=yK(e);return t.length!==0?t.map(xK).join(" "):e}function Ol(e){return"var("+e+")"}let Bk=w([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(A.sizeXs)),c("line-height","1"),ye("pointer"),We([c("background",Ol(y.surfaceElevated)),c("color",Ol(y.textPrimary))])]),SK=w([c("color",Ol(y.success)),c("border-color",Ol(y.success))]);function EK(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=ae(()=>!1),o=i[1],s=i[0],a=u=>{u.stopPropagation(),u.preventDefault(),Gt(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=s?Bk+" "+SK:Bk;return b("button",{children:s?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:a})}let wK=EK;function sg(e){return"var("+e+")"}let kK=w([z("inlineFlex"),Z("center"),c("gap",sg(F.xs)),c("min-width","0")]),CK=w([c("color",sg(y.brand)),c("text-decoration","none"),c("max-width","260px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),We([c("text-decoration","underline")])]),RK=w([c("color",sg(y.textPrimary)),c("font-family","var(--rv-font-mono, ui-monospace, monospace)"),c("font-size",sg(A.sizeSm)),c("max-width","200px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]);function AK(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function TK(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,s=_l();return L("span",{children:[i!==void 0?b("a",{children:n,className:CK,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(),s(i)}}):b("span",{children:AK(n,18),className:RK,title:r}),o?b(wK,{value:r}):null],className:kK})}let NK=TK;function Ks(e){return"var("+e+")"}let jk=w([z("inlineFlex"),Z("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",Ks(X.full)),c("background",Ks(y.surfaceElevated)),c("color",Ks(y.textSecondary)),c("font-size",Ks(A.sizeXs)),c("font-weight",Ks(A.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("border","none")]),$K=w([ye("pointer"),We([c("background",Ks(y.surface)),c("color",Ks(y.textPrimary))])]),DK=w([c("font-weight",Ks(A.weightBold)),c("color",Ks(y.textPrimary))]);function FK(e){let t=e.onClick,r=fe(t,jk,i=>jk+" "+$K),n=L(Hr,{children:[b("span",{children:e.count.toString(),className:DK})," "+e.label,fe(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 _f=FK;function Md(e){let t=e.toString();return t.length<2?"0"+t:t}function wm(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,s=t.getHours()|0,a=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+Md(i)+"-"+Md(o)+" "+Md(s)+":"+Md(a)+":"+Md(l)}let IK=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function qf(e){if(IK.test(e))return wm(e)}function PK(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function cI(e,t){if(!fe(e,!1,PK))return qf(t)}function OK(e,t){return e>t?e-t|0:0}function rc(e){return"var("+e+")"}let MK=w([z("inlineFlex"),Z("center"),c("vertical-align","middle")]),qk=w([z("inlineFlex"),c("border-radius",rc(X.full)),c("box-shadow","0 0 0 2px var("+y.surface+")")]),LK=w([z("inlineFlex"),Z("center"),Xe("center"),c("border-radius",rc(X.full)),c("background",rc(y.surfaceElevated)),c("color",rc(y.textSecondary)),c("font-family",rc(A.fontFamily)),c("font-weight",rc(A.weightMedium)),c("flex-shrink","0"),c("user-select","none")]);function zK(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,s=OK(n.length,o),a=s>0?n.slice(0,o):n,l=s>0?n.slice(o):[],u=aI(i),d=(-u|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((a.length+1|0)-h|0).toString()});return L("span",{children:[a.map((h,p)=>b("span",{children:b(od,{name:h.name,src:h.imageUrl,size:i}),className:qk,style:f(p)},p.toString())),s>0?b("span",{children:"+"+s.toString(),className:qk+" "+LK,style:{fontSize:((u/2|0)-2|0).toString()+"px",height:u.toString()+"px",marginLeft:d.toString()+"px",width:u.toString()+"px",zIndex:(a.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:MK})}let dI=zK;function s_(e){return"var("+e+")"}function UK(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 BK(e,t){return w([z("inlineFlex"),Z("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",s_(X.full)),c("font-size",s_(A.sizeXs)),c("font-weight",s_(A.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 jK(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=UK(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:BK(o[0],o[1])})}let na=jK,fI=dr(void 0),qK=fI.Provider;function VK(e){return Ar(qK,{value:e.fill,children:e.children})}let hI={make:VK};function KK(e){return R(zt(fI),t=>t(e))}function HK(e){return W(e.plugin,t=>t+"."+e.store)}let pI={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 ns(e,t){let r=W(O(e,t),it);return r==="JSONTrue"&&typeof r!="object"}function Ld(e,t){return R(O(e,t),ce)}function WK(e){return R(R(O(e,"x-reventless-semantic-target"),Q),t=>W(R(O(t,"store"),ce),r=>({plugin:R(O(t,"plugin"),ce),store:r})))}function GK(e){return R(R(O(e,"x-reventless-setter"),Q),t=>W(R(O(t,"command"),ce),r=>({command:r,field:R(O(t,"field"),ce)})))}function JK(e){let t=W(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 QK(e){let t=Q(e);if(t===void 0)return;let r=Q(Qn(e));if(r===void 0||r===t)return t;let n=dt(Ge(r));return Ge(t).forEach(i=>{n[i[0]]=i[1]}),n}function xs(e){let t=QK(e);return t!==void 0?{isId:ns(t,"x-reventless-id"),isCompositeId:ns(t,"x-reventless-compositeId"),isSubId:ns(t,"x-reventless-subId"),isCompositeSubId:ns(t,"x-reventless-compositeSubId"),index:JK(t),hidden:ns(t,"x-reventless-hidden"),summary:ns(t,"x-reventless-summary"),groupBy:ns(t,"x-reventless-group-by"),drillTarget:W(Ld(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:Ld(t,"x-reventless-drillTargetKey")})),collapsed:ns(t,"x-reventless-collapsed"),scan:ns(t,"x-reventless-scan"),scanSort:ns(t,"x-reventless-scanSort"),semantic:Ld(t,"x-reventless-semantic"),semanticFromType:Ue(Ld(t,"x-reventless-semantic-source"),"type"),storeTarget:WK(t),channel:Ld(t,"x-reventless-channel"),setter:GK(t)}:pI}function Ph(e,t){return D(W(R(R(Q(e),r=>O(r,"properties")),Q),r=>ne(Ge(r),n=>{if(t(xs(n[1])))return n[0]})),[])}function YK(e){return D(W(R(R(Q(e),t=>O(t,"properties")),Q),t=>ne(Ge(t),r=>{let n=r[0];return R(R(R(Q(r[1]),i=>O(i,"x-reventless-metric")),Q),i=>{let o=R(O(i,"aggregate"),ce),s=R(O(i,"label"),ce);return W(o,a=>[n,a,s])})})),[])}function km(e){return Ph(e,t=>t.summary)}function XK(e){return Ph(e,t=>t.isId)[0]}function ZK(e){return Ph(e,t=>t.groupBy)[0]}function Gx(e){return Ph(e,t=>t.isCompositeId)}function Jx(e){return Ph(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function eH(e){return R(R(Q(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 gI(e){return R(R(Q(e),t=>O(t,"x-reventless-viewmode")),ce)}function tH(e){return R(R(Q(e),t=>O(t,"x-reventless-layout")),ce)}function Eu(e){return R(W(R(R(Q(Qn(e)),t=>O(t,"enum")),br),t=>ne(t,ce)),t=>{if(t.length!==0)return t})}function Ho(e,t){return D(R(R(R(R(Q(e),r=>O(r,"properties")),Q),r=>O(r,t)),Eu),[])}function Oh(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 rH=["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"],nH="storageRef";function Qx(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":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 mI(e){switch(e){case"Money":return["Measure"];case"DateRange":return["Schedulable"];default:return[]}}function vI(e,t){return R(R(O(e,t),ce),r=>{if(r!=="")return r})}function _I(e,t,r){return R(R(R(R(O(e,t),Q),n=>O(n,r)),ce),n=>{if(n!=="")return n})}function wu(e,t){return e.TAG==="Pair"?vI(t,e.startField):_I(t,e._0,"start")}function Yx(e,t){if(e.TAG!=="Pair")return _I(t,e._0,"end");let r=e.endField;if(r!==void 0)return vI(t,r)}function bI(e){return e.TAG==="Pair"?e.endField!==void 0:!0}function Tr(e){return D(W(R(R(Q(Qn(e)),t=>O(t,"properties")),Q),Ge),[]).map(t=>[t[0],Qn(t[1])])}function $r(e,t){return R(R(Q(Qn(e)),r=>O(r,t)),ce)}function iH(e){return $r(e,"type")}function ia(e){let t=$r(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function Mh(e){return Ue($r(e,"type"),"string")}function Cm(e){let t=$r(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let yI=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function xI(e){return yI.includes(e.toLowerCase())}function ag(e,t){return t.some(r=>e.endsWith(r))}function oH(e){return ag(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function sH(e){let t=$r(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 Vk(e){return fe(Eu(e),0,t=>t.length)}function Vf(e,t){return R(R(Q(Qn(e)),r=>O(r,t)),Bo)}function aH(e,t){if(!ia(t))return;let r=Vf(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 lH=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function uH(e){let t=Tr(e),r=(n,i)=>t.some(o=>o[0].toLowerCase()===n?i(o[1]):!1);return r("amount",ia)?r("currency",Mh):!1}function cH(e){let t=Tr(e),r=n=>t.some(i=>{let o=i[1];return i[0].toLowerCase()===n&&Ue($r(o,"type"),"string")?Cm(o):!1});return r("start")?r("end"):!1}function dH(e){let t=Tr(e);return lH.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let fH=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function hH(e){return fH.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function pH(e,t){let r=e.toLowerCase(),n=aH(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&Vk(t)>0?Vk(t)<=8?["Status","name:status-enum"]:void 0:Ue($r(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:ia(t)&&ag(r,["price","amount","total"])?["Currency","name:currency"]:Ue($r(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:Ue($r(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:Ue($r(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:Ue($r(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||ag(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:ia(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:Ue($r(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:Ue($r(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:Ue($r(t,"type"),"string")&&hH(r)?["ParentRef","name:parent-ref"]:Ue($r(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:Ue($r(t,"type"),"string")&&yI.includes(r)?["UserRef","name:user"]:void 0}function SI(e){return["lat","latitude"].includes(e)}function EI(e){return["lng","lon","long","longitude"].includes(e)}function gH(e){let t=Tr(e),r=t.some(i=>SI(i[0].toLowerCase())?ia(i[1]):!1),n=t.some(i=>EI(i[0].toLowerCase())?ia(i[1]):!1);return r?n:!1}function mH(e){return["createdat","updatedat","deletedat"].includes(e)}let Kk={contents:[]};function wI(e,t,r){let n=e+"."+t+"."+r;if(Kk.contents.some(o=>o===n))return;Kk.contents.push(n);let i=rH.map(Oh).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function Rm(e,t){let r=Qn(t),n=xs(r),i=n.semanticFromType?"Type":"Annotation",o=Ue(n.semantic,nH),s=R(n.semantic,d=>{if(o)return;let f=Qx(d);if(f!==void 0)return{semantic:f,provenance:i};wI("x-reventless-semantic",e,d)});if(s!==void 0)return s;let a=e.toLowerCase(),l=Ue($r(r,"type"),"object")&&uH(r)?["Money","shape:money"]:Ue($r(r,"type"),"object")&&cH(r)?["DateRange","shape:date-range"]:Ue($r(r,"type"),"object")&&dH(r)?["Address","shape:address"]:Ue($r(r,"type"),"object")&&gH(r)?["GeoPoint","shape:geo-point"]:SI(a)&&ia(r)?["GeoLat","name:geo-pair"]:EI(a)&&ia(r)?["GeoLng","name:geo-pair"]:void 0,u;if(l!==void 0)u=l;else if(Ue($r(r,"type"),"string")&&oH(a))u=["FileUrl","name:file-url"];else{let d=sH(r);u=d!==void 0?d:pH(e,r)}return $h(W(u,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function Br(e,t,r){let n=Tr(e),i={};n.forEach(E=>{let S=E[0],C=R(R(t,k=>O(k,S)),k=>{let N=Qx(k);if(N!==void 0)return{semantic:N,provenance:"Hint"};wI("uiHints.fields",S,k)});if(C!==void 0){i[S]=C;return}else return se(Rm(S,E[1]),k=>{i[S]=k})});let o=E=>n.map(S=>S[0]).find(S=>fe(O(i,S),!1,C=>C.semantic===E)),s=R(Nh(r,E=>E.field!=="id"),E=>W(n.find(S=>S[0]===E.field?Ue($r(S[1],"type"),"string"):!1),S=>S[0])),a=fe(r,!1,E=>Ue(E.source,"annotation")),l=n.map(E=>E[0]).find(E=>fe(O(i,E),!1,S=>S.semantic==="Label"?S.provenance==="Hint":!1)),u;if(l!==void 0)u=l;else{let E=0;if(s!==void 0&&a?u=s:E=1,E===1){let S=o("Label");u=S!==void 0?S:s}}if(u!==void 0&&s!==void 0&&u===s){let S={semantic:"Label",provenance:a?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},C=O(i,u);if(C!==void 0){let k=0,N=C.provenance;(typeof N=="object"||N!=="Hint")&&(k=1),k===1&&C.semantic==="Label"&&(i[u]=S)}else i[u]=S}let d=o("GeoLat"),f=o("GeoLng"),h=d!==void 0&&f!==void 0?{latField:d,lngField:f}:void 0,p=n.map(E=>E[0]).find(E=>fe(O(i,E),!1,S=>mI(S.semantic).includes("Schedulable"))),g=ne(n,E=>{let S=E[0];if(fe(O(i,S),!1,C=>C.semantic==="DateTime")||Cm(E[1]))return S}),m=g.find(E=>E.toLowerCase().startsWith("start")),v=g.find(E=>E.toLowerCase().startsWith("end")),_=m!==void 0?v!==void 0?{TAG:"Pair",startField:m,endField:v}:{TAG:"Pair",startField:m}:W(g.find(E=>{let S=E.toLowerCase();return mH(S)?!1:ag(S,["at","date"])?!0:S==="date"}),E=>({TAG:"Pair",startField:E}));return{semantics:i,geo:h,dateSpan:p!==void 0?{TAG:"Ranged",_0:p}:_,statusField:o("Status"),labelField:u,imageField:o("Image"),parentField:o("ParentRef")}}function vH(e,t){let n=Br(e,t,void 0).semantics;return ne(Tr(e),i=>{let o=i[0];return R(O(n,o),s=>{if(mI(s.semantic).includes("Measure"))return o})})}let kI=dr([]),CI=dr(e=>{}),_H=kI.Provider,bH=CI.Provider;function yH(e){let t=e.initial,r=t!==void 0?t:[],n=ae(()=>r),i=n[1],o=Yr(s=>i(a=>s),[]);return Ar(bH,{value:o,children:Ar(_H,{value:n[0],children:e.children})})}let xH={make:yH};function Rs(){return zt(kI)}function SH(){return zt(CI)}function EH(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function wH(e){return e.endsWith("s")?e:e+"s"}function ma(e,t){let r=EH(t),n=wH(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function Fa(e,t){return FF(r=>tg(e,tg(encodeURIComponent(t),r)))}function nc(e,t){return tg(e,tg(encodeURIComponent(t),OU))}function oa(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return Vs(nc(e,t))(IF.of_parts(i.join("/")))}function kH(e){let r=IF.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=W(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}function Ss(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}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 CH=[0,1],RI=[1,0],AI=[2,3],TI=[3,2],RH={L:CH,M:RI,Q:AI,H:TI},AH=/^\d*$/,TH=/^[A-Z0-9 $%*+./:-]*$/,a_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Xx=1,Zx=40,Hk=3,NH=3,kp=40,$H=10,NI=[[-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]],$I=[[-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 DH=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<Xx||t>Zx)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 a=0;a<this.size;a++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),i===-1){let a=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u<a&&(i=l,a=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,Ps(i,o));this.setFunctionModule(8,7,Ps(i,6)),this.setFunctionModule(8,8,Ps(i,7)),this.setFunctionModule(7,8,Ps(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,Ps(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,Ps(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,Ps(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=Ps(r,n),o=this.size-11+n%3,s=Math.floor(n/3);this.setFunctionModule(o,s,i),this.setFunctionModule(s,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)),s=t+i,a=r+n;s>=0&&s<this.size&&a>=0&&a<this.size&&this.setFunctionModule(s,a,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=$I[n[0]][r],o=NI[n[0]][r],s=Math.floor(zy(r)/8),a=i-s%i,l=Math.floor(s/i),u=[],d=BH(o);for(let h=0,p=0;h<i;h++){const g=t.slice(p,p+l-o+(h<a?0:1));p+=g.length;const m=jH(g,d);h<a&&g.push(0),u.push(g.concat(m))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,g)=>{(h!==l-o||g>=a)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(zy(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 s=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][s]&&r<t.length*8&&(this.modules[l][s]=Ps(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 s=!1,a=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[o][u]===s?(a++,a===5?t+=Hk:a>5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*kp),s=this.modules[o][u],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*kp}for(let o=0;o<this.size;o++){let s=!1,a=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][o]===s?(a++,a===5?t+=Hk:a>5&&t++):(this.finderPenaltyAddHistory(a,l),s||(t+=this.finderPenaltyCountPatterns(l)*kp),s=this.modules[u][o],a=1);t+=this.finderPenaltyTerminateAndCount(s,a,l)*kp}for(let o=0;o<this.size-1;o++)for(let s=0;s<this.size-1;s++){const a=this.modules[o][s];a===this.modules[o][s+1]&&a===this.modules[o+1][s]&&a===this.modules[o+1][s+1]&&(t+=NH)}let r=0;for(const o of this.modules)r=o.reduce((s,a)=>s+(a?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*$H,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 Hs(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 Ps(e,t){return(e>>>t&1)!==0}class eS{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 FH=[1,10,12,14],IH=[2,9,11,13],PH=[4,8,16,16];function DI(e,t){return e[Math.floor((t+7)/17)+1]}function FI(e){const t=[];for(const r of e)Hs(r,8,t);return new eS(PH,e.length,t)}function OH(e){if(!II(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);Hs(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new eS(FH,e.length,t)}function MH(e){if(!PI(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=a_.indexOf(e.charAt(r))*45;n+=a_.indexOf(e.charAt(r+1)),Hs(n,11,t)}return r<e.length&&Hs(a_.indexOf(e.charAt(r)),6,t),new eS(IH,e.length,t)}function LH(e){return e===""?[]:II(e)?[OH(e)]:PI(e)?[MH(e)]:[FI(UH(e))]}function II(e){return AH.test(e)}function PI(e){return TH.test(e)}function zH(e,t){let r=0;for(const n of e){const i=DI(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function UH(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 zy(e){if(e<Xx||e>Zx)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(zy(e)/8)-NI[t[0]][e]*$I[t[0]][e]}function BH(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]=Uy(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=Uy(r,2)}return t}function jH(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,s)=>r[s]^=Uy(o,i))}return r}function Uy(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 qH(e,t,r=1,n=40,i=-1,o=!0){if(!(Xx<=r&&r<=n&&n<=Zx)||i<-1||i>7)throw new RangeError("Invalid value");let s,a;for(s=r;;s++){const f=F0(s,t)*8,h=zH(e,s);if(h<=f){a=h;break}if(s>=n)throw new RangeError("Data too long")}for(const f of[RI,AI,TI])o&&a<=F0(s,f)*8&&(t=f);const l=[];for(const f of e){Hs(f.mode[0],4,l),Hs(f.numChars,DI(f.mode,s),l);for(const h of f.getData())l.push(h)}const u=F0(s,t)*8;Hs(0,Math.min(4,u-l.length),l),Hs(0,(8-l.length%8)%8,l);for(let f=236;l.length<u;f^=253)Hs(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 DH(s,t,d,i)}function VH(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:s=-1,border:a=1}=t||{},l=typeof e=="string"?LH(e):Array.isArray(e)?[FI(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=qH(l,RH[r],i,o,s,n),d=KH({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},a);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function KH(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let s=0;s<t;s++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},s=>!1)),e.data.push(Array.from({length:n},s=>!1));const i=Ml.Border;e.types.forEach(o=>{for(let s=0;s<t;s++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},s=>i)),e.types.push(Array.from({length:n},s=>i));return e}function HH(e){return"var("+e+")"}let WH=w([z("inlineBlock"),c("background","#ffffff"),c("padding","6px"),c("border-radius",HH(X.md)),c("border","1px solid var("+y.borderSubtle+")"),c("line-height","0")]),GH=w([c("color","#000000"),c("display","block")]);function JH(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function QH(e){if(e.trim()!=="")try{return VH(e,{ecc:"M",border:4})}catch{return}}function YH(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=QH(r);if(i===void 0)return null;let o=i.size.toString();return b("span",{children:b("svg",{children:b("path",{d:JH(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:GH,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:WH})}let XH=YH,ZH=["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 Wk(e){return e>="0"?e<="9":!1}function eW(e){let t=[],r=0,n=e.length;for(;r<n;)if(Wk(D(e[r],""))){let i=r;for(;r<n&&Wk(D(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function tW(e){let t={};return eW(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,s=n-o|0;if(s<=0)return;let a=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(s/2|0)|0)+(a?0:1)|0)<n){t[(i+o|0).toString()]=s;return}}),t}function rW(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=tW(e),i=[],o=Be(n[0]);i.push(o?105:104);let s=o?"C":"B",a=0;for(;a<t;){let l=n[a.toString()];if(l!==void 0){s!=="C"&&(i.push(99),s="C");for(let u=0,d=l/2|0;u<d;++u){let f=e.substring(a+(u<<1)|0,(a+(u<<1)|0)+2|0);i.push(D(RF(f),0))}a=a+l|0}else s==="C"&&(i.push(100),s="B"),i.push(D(e.codePointAt(a),32)-32|0),a=a+1|0}return i}function nW(e){return W(rW(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=>ZH[n]).join("")})}function iW(e,t,r){let n=r.toString(),i=[],o=0,s=e.length;for(;o<s;)if(Ue(e[o],"1")){let a=o;for(;o<s&&Ue(e[o],"1");)o=o+1|0;let l=(o-a|0).toString();i.push("M"+(a+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function oW(e){return"var("+e+")"}let sW=w([z("inlineBlock"),kV({NAME:"percent",VAL:100}),c("overflow-x","auto"),c("background","#ffffff"),c("padding","6px"),c("border-radius",oW(X.md)),c("border","1px solid var("+y.borderSubtle+")"),c("line-height","0")]),aW=w([c("color","#000000"),c("display","block")]);function lW(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,s=nW(n);if(s===void 0)return null;let a=s.length+20|0;return b("span",{children:b("svg",{children:b("path",{d:iW(s,10,40),fill:"currentColor"}),"aria-label":D(e.title,"Barcode for "+n),className:aW,role:"img",height:i.toString(),width:(a*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+a.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:sW})}let uW=lW;function Bi(e){return"var("+e+")"}let cW=w([Ut("fixed"),pa(Ce(0)),nd(Ce(0)),bl(Ce(0)),Wx(Ce(0)),c("background","rgba(0,0,0,0.82)"),z("flex"),pe("column"),Z("center"),Xe("center"),c("gap",Bi(F.md)),c("padding",Bi(F.lg)),c("z-index","1100")]),dW=w([c("max-width","min(92vw, 1400px)"),c("max-height","78vh"),c("object-fit","contain"),c("border-radius",Bi(X.sm)),c("box-shadow",Bi(mn.lg))]),fW=w([z("flex"),Z("center"),c("gap",Bi(F.md)),c("max-width","100%")]),hW=w([z("flex"),Z("center"),c("gap",Bi(F.md)),c("max-width","92vw"),c("color","#f5f5f5"),c("font-size",Bi(A.sizeSm))]),pW=w([c("font-size",Bi(A.sizeMd)),c("font-weight",Bi(A.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),gW=w([c("color","#c8c8c8")]),mW=w([c("font-family",Bi(A.fontFamilyMono)),c("color","#c8c8c8")]),OI=w([z("inlineFlex"),Z("center"),Xe("center"),c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",Bi(X.md)),c("color","#f5f5f5"),c("padding","4px var("+F.sm+")"),c("font-size",Bi(A.sizeSm)),ye("pointer"),We([c("background","rgba(255,255,255,0.22)")])]),Gk=Fr([OI,w([c("width","40px"),c("height","40px"),c("border-radius","50%"),c("font-size",Bi(A.sizeLg)),_i(0)])]),vW=Fr([OI,w([Ut("absolute"),pa(Ce(16)),bl(Ce(16)),c("width","32px")])]);function Ku(e,t,r){return t===0?0:Uo(Uo(e+r|0,t)+t|0,t)}function _W(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,s=o>1;Ae(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return s?r(Ku(n,o,-1)):void 0;case"ArrowRight":return s?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 a=i[Ku(n,o,0)];if(a===void 0)return null;let l=a.title,u=a.caption;return L("div",{children:[b("button",{children:"✕",className:vW,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[s?b("button",{children:"‹",className:Gk,title:"Previous",type:"button",onClick:d=>r(Ku(n,o,-1))}):null,b("img",{className:dW,alt:D(a.title,""),src:a.src}),s?b("button",{children:"›",className:Gk,title:"Next",type:"button",onClick:d=>r(Ku(n,o,1))}):null],className:fW,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?b("span",{children:l,className:pW,title:l}):null,u!==void 0?b("span",{children:u,className:gW}):null,s?b("span",{children:(Ku(n,o,0)+1|0).toString()+" / "+o.toString(),className:mW}):null,D(e.action,null)],className:hW,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:cW,role:"dialog",onClick:d=>t()})}let MI=_W;function Gn(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function oo(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function LI(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function Am(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return oo(Gn(e),-r|0)}function zI(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function bW(e){let t=Am(zI(e));return il(42,r=>oo(t,r))}function UI(e,t){return Gn(e)===Gn(t)}function yW(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function BI(e,t,r){let n=Gn(r),i=n+864e5;return e<i?t>=n:!1}function Jk(e){let t=e.toString();return t.length<2?"0"+t:t}function jI(e){let t=new Date(e);return Jk(t.getHours()|0)+":"+Jk(t.getMinutes()|0)}function qI(e){return e===Gn(e)}let VI=["January","February","March","April","May","June","July","August","September","October","November","December"];function Zi(e){let t=new Date(e),r=t.getMonth()|0;return D(VI[r],"")+" "+t.getFullYear().toString()}let tS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function KI(e){return new Date(e).getDate()|0}function sa(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(tS[n],"")+" "+(new Date(e).getDate()|0).toString()}function $n(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let HI=864e5;function Bl(e){return"var("+e+")"}function xW(e){return w([c("width","100%"),c("height",e),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Bl(X.md)),c("background",Bl(y.surfaceSubtle)),fa("hidden")])}let SW=w([z("flex"),pe("column"),Z("center"),Xe("center"),c("gap",Bl(F.sm)),c("height","100%"),c("padding",Bl(F.lg)),c("color",Bl(y.textSecondary)),c("font-size",Bl(A.sizeSm)),c("text-align","center")]),EW=w([c("color",Bl(y.brand)),c("text-decoration","none"),We([c("text-decoration","underline")])]);function wW(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function kW(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:EW,href:n,rel:"noopener noreferrer",target:"_blank"})],className:SW}),"aria-label":i,className:xW(o),data:n,type:"application/pdf"})}let CW=kW;function WI(e){return e==="Small"?"13px":"18px"}let GI="★";function RW(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function nu(e){return"var("+e+")"}function AW(e){return w([z("inlineFlex"),Ut("relative"),c("font-size",WI(e)),c("line-height","1"),c("letter-spacing","1px"),c("white-space","nowrap"),c("vertical-align","-1px")])}let TW=w([c("color",nu(y.borderSubtle))]);function NW(e){return w([Ut("absolute"),c("top","0"),c("left","0"),c("width",(e*100).toString()+"%"),fa("hidden"),c("white-space","nowrap"),c("color",nu(y.warning)),c("pointer-events","none")])}let Qk=w([z("inlineFlex"),c("gap","2px"),Z("center")]);function $W(e,t){return w([c("background","none"),c("border","none"),c("padding","0 1px"),c("font-size",WI(t)),c("line-height","1"),ye("pointer"),c("color",nu(e?y.warning:y.borderSubtle)),c("transition","color 120ms, transform 120ms"),We([c("transform","scale(1.15)")]),kr("&:focus-visible",[c("outline","2px solid var("+y.brand+")"),c("outline-offset","1px"),c("border-radius","2px")])])}let Yk=w([c("color",nu(y.textSecondary)),c("font-size",nu(A.sizeSm))]),DW=w([z("inlineFlex"),Z("center"),c("gap","6px")]),FW=w([c("border","1px solid var("+y.error+")"),c("border-radius",nu(X.sm)),c("padding","2px 4px")]);function IW(e){return kF(e<=0?0:e,GI).join("")}function PW(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,s=e.max,a=e.value,l=s!==void 0?s: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=IW(h),g=D(e.label,(Math.round(a*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[il(h,m=>m+1|0).map(m=>{let v=m<=a;return b("button",{children:GI,"aria-label":m.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:$W(v,u),title:m.toString()+" of "+h.toString(),type:"button",onBlur:_=>se(r,x=>x()),onClick:_=>{_.stopPropagation(),n(m===a?0:m)}},m.toString())}),d?b("span",{children:a<=0?"—":a.toString(),className:Yk}):null],"aria-label":g,className:f?Qk+" "+FW:Qk,role:"group"}):L("span",{children:[L("span",{children:[b("span",{children:p,className:TW}),b("span",{children:p,className:NW(RW(a,h))})],"aria-label":g,className:AW(u),role:"img",title:g}),d?b("span",{children:(Math.round(a*10)/10).toString()+" / "+h.toString(),className:Yk}):null],className:DW})}let l_=PW;function iu(e){return"var("+e+")"}let OW=w([z("flex"),pe("column"),c("gap","4px")]),MW=w([z("flex"),Xe("spaceBetween"),c("font-size",iu(A.sizeSm))]),LW=w([c("color",iu(y.textSecondary))]),zW=w([c("color",iu(y.textPrimary)),c("font-weight",iu(A.weightMedium))]),UW=w([c("background",iu(y.surfaceSubtle)),c("border-radius",iu(X.full)),c("height","8px"),fa("hidden")]);function BW(e,t){return w([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 jW(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,s=o<0?0:o;return L("div",{children:[Be(r)||i?L("div",{children:[fe(r,null,a=>b("span",{children:a,className:LW})),i?b("span",{children:Math.round(s).toString()+"%",className:zW}):null],className:MW}):null,b("div",{children:b("div",{className:BW(s,e.color)}),className:UW})],className:OW})}let JI=jW,Tm={};function QI(e){Tm[e.id]=e}function YI(e){return O(Tm,e)}let XI={};function qW(e){return fe(O(Tm,e),XI,t=>t.constraints)}let Xk={contents:[]};function VW(e,t){if(Xk.contents.some(n=>n===e))return;Xk.contents.push(e);let r=zx(Tm).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 ZI="#111111";function No(e){return"var("+e+")"}let Zk=w([z("flex"),pe("column"),c("gap",No(F.xs))]);function KW(e){return w([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"),ye("crosshair"),c("display","block")])}let HW=w([c("fill","#9ca3af"),c("font-size","13px"),c("pointer-events","none"),c("user-select","none")]),WW=w([c("stroke","#e5e7eb"),c("stroke-width","1")]),eC=w([z("flex"),Z("center"),c("gap",No(F.sm)),c("font-size",No(A.sizeXs)),c("color",No(y.textSecondary))]),tC=w([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(A.sizeXs)),c("padding","2px 8px"),ye("pointer"),We([c("border-color",No(y.brand)),c("color",No(y.brand))])]),GW=w([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")]),JW=w([c("display","block"),c("max-width","100%"),c("height","auto")]);function ai(e){return(Math.round(e*10)/10).toString()}function eP(e){return e.map(t=>ai(t.x)+","+ai(t.y)).join(" ")}function QW(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let s=o.length===1?o.concat(o):o;return'<polyline points="'+eP(s)+'"/>'}).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="'+ZI+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function rC(e){return e.trim().startsWith("<svg")}function tP(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function YW(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function XW(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,s=e.value,a=n!==void 0?n:480,l=r!==void 0?r:160,u=t!==void 0?t:!1,d=Je(null),f=ae(()=>[]),h=f[1],p=f[0],g=ae(()=>!1),m=g[1],v=Je(!1),_=T=>W(ys(d.current),$=>{let P=$.getBoundingClientRect(),M=P.width===0?1:a/P.width,I=P.height===0?1:l/P.height;return{x:(T.clientX-P.left)*M,y:(T.clientY-P.top)*I}}),x=T=>o(QW(T,a,l)),E=T=>{T.preventDefault();let $=_(T);if($!==void 0)return v.current=!0,se(ys(d.current),P=>{P.setPointerCapture(T.pointerId)}),h(P=>P.concat([[$]]))},S=T=>{if(!v.current)return;let $=_(T);if($!==void 0)return h(P=>{let M=P[P.length-1|0];if(M===void 0)return P;let I=M[M.length-1|0];return I!==void 0&&!YW($,I)?P:P.slice(0,P.length-1|0).concat([M.concat([$])])})},C=T=>{if(v.current)return v.current=!1,x(p),se(i,$=>$())},k=()=>{h(T=>[]),m(T=>!0),o("")},N=p.length!==0;return s.trim().startsWith("<svg")&&!N&&!g[0]?L("div",{children:[b("span",{children:b("img",{className:JW,alt:"Signature",src:tP(s)}),className:GW}),b("div",{children:b("button",{children:"Sign again",className:tC,type:"button",onClick:T=>k()}),className:eC})],className:Zk}):L("div",{children:[L("svg",{children:[b("line",{className:WW,x1:ai(a*.06),x2:ai(a*.94),y1:ai(l*.78),y2:ai(l*.78)}),N?null:b("text",{children:"Sign here",className:HW,textAnchor:"middle",x:ai(a/2),y:ai(l*.7)}),b("g",{children:p.map((T,$)=>b("polyline",{points:eP(T.length===1?T.concat(T):T)},$.toString())),fill:"none",stroke:ZI,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Wt(d),"aria-label":"Signature pad",className:KW(u),role:"img",onPointerDown:E,onPointerMove:S,onPointerUp:C,onPointerCancel:C,viewBox:"0 0 "+ai(a)+" "+ai(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[N?b("button",{children:"Clear",className:tC,type:"button",onClick:T=>k()}):null,b("span",{children:"Draw your signature above"})],className:eC})],className:Zk})}let ZW=XW;function eG(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function no(e){return"var("+e+")"}let tG=w([z("flex"),pe("column"),c("gap",no(F.sm))]),rG=w([z("flex"),c("gap","4px")]),nC=w([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(A.sizeXs)),c("padding","2px 8px"),ye("pointer")]),nG=w([c("background",no(y.brandSubtle)),c("border-color",no(y.brand)),c("color",no(y.textPrimary))]),iG=w([Ko({NAME:"percent",VAL:100}),c("min-height","220px"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",no(X.sm)),c("background","#ffffff")]),oG=w([c("margin","0"),c("font-family",no(A.fontFamilyMono)),c("font-size",no(A.sizeXs)),c("line-height",no(A.lineHeightRelaxed)),c("color",no(y.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]);function sG(e){let t=e.textAlternative,r=ae(()=>!1),n=r[1],i=r[0],o=(l,u,d)=>b("button",{children:l,className:u?nC+" "+nG:nC,type:"button",onClick:d}),s,a=0;return i&&t!==void 0?s=b("pre",{children:t,className:oG}):a=1,a===1&&(s=b("iframe",{className:iG,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:rG}):null,s],className:tG})}function aG(e,t){return b(sG,{html:e.body,textAlternative:e.textAlternative})}function lG(){QI({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:aG})}const iC={};function uG(e){let t=iC[e];if(t)return t;t=iC[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 Lc(e,t){typeof t!="string"&&(t=Lc.defaultChars);const r=uG(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,s=n.length;o<s;o+=3){const a=parseInt(n.slice(o+1,o+3),16);if(a<128){i+=r[a];continue}if((a&224)===192&&o+3<s){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const u=a<<6&1984|l&63;u<128?i+="��":i+=String.fromCharCode(u),o+=3;continue}}if((a&240)===224&&o+6<s){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=a<<12&61440|l<<6&4032|u&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((a&248)===240&&o+9<s){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=a<<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})}Lc.defaultChars=";/?:@&=+$,#";Lc.componentChars="";const oC={};function cG(e){let t=oC[e];if(t)return t;t=oC[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 Lh(e,t,r){typeof t!="string"&&(r=t,t=Lh.defaultChars),typeof r>"u"&&(r=!0);const n=cG(t);let i="";for(let o=0,s=e.length;o<s;o++){const a=e.charCodeAt(o);if(r&&a===37&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(a<128){i+=n[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s){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}Lh.defaultChars=";/?:@&=+$,-_.!~*'()#";Lh.componentChars="-_.!~*'()";function rS(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 lg(){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 dG=/^([a-z0-9.+-]+:)/i,fG=/:[0-9]*$/,hG=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,pG=["<",">",'"',"`"," ","\r",`
|
|
3
|
+
`," "],gG=["{","}","|","\\","^","`"].concat(pG),mG=["'"].concat(gG),sC=["%","/","?",";","#"].concat(mG),aC=["/","?","#"],vG=255,lC=/^[+a-z0-9A-Z_-]{0,63}$/,_G=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,uC={javascript:!0,"javascript:":!0},cC={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function nS(e,t){if(e&&e instanceof lg)return e;const r=new lg;return r.parse(e,t),r}lg.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=hG.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=dG.exec(o);if(s&&(s=s[0],r=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(s&&uC[s])&&(o=o.substr(2),this.slashes=!0)),!uC[s]&&(i||s&&!cC[s])){let u=-1;for(let g=0;g<aC.length;g++)n=o.indexOf(aC[g]),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 g=0;g<sC.length;g++)n=o.indexOf(sC[g]),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 g=this.hostname.split(/\./);for(let m=0,v=g.length;m<v;m++){const _=g[m];if(_&&!_.match(lC)){let x="";for(let E=0,S=_.length;E<S;E++)_.charCodeAt(E)>127?x+="x":x+=_[E];if(!x.match(lC)){const E=g.slice(0,m),S=g.slice(m+1),C=_.match(_G);C&&(E.push(C[1]),S.unshift(C[2])),S.length&&(o=S.join(".")+o),this.hostname=E.join(".");break}}}}this.hostname.length>vG&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=o.indexOf("#");a!==-1&&(this.hash=o.substr(a),o=o.slice(0,a));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),cC[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};lg.prototype.parseHost=function(e){let t=fG.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 bG=Object.freeze(Object.defineProperty({__proto__:null,decode:Lc,encode:Lh,format:rS,parse:nS},Symbol.toStringTag,{value:"Module"})),rP=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,nP=/[\0-\x1F\x7F-\x9F]/,yG=/[\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]/,iS=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,iP=/[\$\+<->\^`\|~\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]/,oP=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,xG=Object.freeze(Object.defineProperty({__proto__:null,Any:rP,Cc:nP,Cf:yG,P:iS,S:iP,Z:oP},Symbol.toStringTag,{value:"Module"})),SG=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))),EG=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var u_;const wG=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]]),kG=(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 CG(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=wG.get(e))!==null&&t!==void 0?t:e}var cn;(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"})(cn||(cn={}));const RG=32;var qa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qa||(qa={}));function By(e){return e>=cn.ZERO&&e<=cn.NINE}function AG(e){return e>=cn.UPPER_A&&e<=cn.UPPER_F||e>=cn.LOWER_A&&e<=cn.LOWER_F}function TG(e){return e>=cn.UPPER_A&&e<=cn.UPPER_Z||e>=cn.LOWER_A&&e<=cn.LOWER_Z||By(e)}function NG(e){return e===cn.EQUALS||TG(e)}var on;(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"})(on||(on={}));var Ws;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ws||(Ws={}));class $G{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=on.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ws.Strict}startEntity(t){this.decodeMode=t,this.state=on.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case on.EntityStart:return t.charCodeAt(r)===cn.NUM?(this.state=on.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=on.NamedEntity,this.stateNamedEntity(t,r));case on.NumericStart:return this.stateNumericStart(t,r);case on.NumericDecimal:return this.stateNumericDecimal(t,r);case on.NumericHex:return this.stateNumericHex(t,r);case on.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|RG)===cn.LOWER_X?(this.state=on.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=on.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(By(i)||AG(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(By(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===cn.SEMI)this.consumed+=1;else if(this.decodeMode===Ws.Strict)return 0;return this.emitCodePoint(CG(this.result),this.consumed),this.errors&&(t!==cn.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&qa.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const s=t.charCodeAt(r);if(this.treeIndex=DG(n,i,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ws.Attribute&&(o===0||NG(s))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&qa.VALUE_LENGTH)>>14,o!==0){if(s===cn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Ws.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]&qa.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]&~qa.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case on.NamedEntity:return this.result!==0&&(this.decodeMode!==Ws.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case on.NumericDecimal:return this.emitNumericEntity(0,2);case on.NumericHex:return this.emitNumericEntity(0,3);case on.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case on.EntityStart:return 0}}}function sP(e){let t="";const r=new $G(e,n=>t+=kG(n));return function(i,o){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),r.startEntity(o);const u=r.write(i,a+1);if(u<0){s=a+r.end();break}s=a+u,a=u===0?s+1:s}const l=t+i.slice(s);return t="",l}}function DG(e,t,r,n){const i=(t&qa.BRANCH_LENGTH)>>7,o=t&qa.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 s=r,a=s+i-1;for(;s<=a;){const l=s+a>>>1,u=e[l];if(u<n)s=l+1;else if(u>n)a=l-1;else return e[l+i]}return-1}const aP=sP(SG);sP(EG);function FG(e,t=Ws.Legacy){return aP(e,t)}function IG(e){return aP(e,Ws.Strict)}function PG(e){return Object.prototype.toString.call(e)}function oS(e){return PG(e)==="[object String]"}const OG=Object.prototype.hasOwnProperty;function MG(e,t){return OG.call(e,t)}function Nm(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 lP(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function sS(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 Kf(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 uP=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,LG=/&([a-z#][a-z0-9]{1,31});/gi,zG=new RegExp(uP.source+"|"+LG.source,"gi"),UG=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function BG(e,t){if(t.charCodeAt(0)===35&&UG.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return sS(n)?Kf(n):e}const r=FG(e);return r!==e?r:e}function jG(e){return e.indexOf("\\")<0?e:e.replace(uP,"$1")}function zc(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(zG,function(t,r,n){return r||BG(t,n)})}const qG=/[&<>"]/,VG=/[&<>"]/g,KG={"&":"&","<":"<",">":">",'"':"""};function HG(e){return KG[e]}function ol(e){return qG.test(e)?e.replace(VG,HG):e}const WG=/[.?*+^$[\]\\(){}|-]/g;function GG(e){return e.replace(WG,"\\$&")}function sr(e){switch(e){case 9:case 32:return!0}return!1}function Hf(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 cP(e){return iS.test(e)||iP.test(e)}function Wf(e){return cP(Kf(e))}function Gf(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 $m(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function dC(e){return e===32||e===9||e===10||e===13}function Dm(e){let t=0;for(;t<e.length&&dC(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&dC(e.charCodeAt(r));r--);return e.slice(t,r+1)}const JG={mdurl:bG,ucmicro:xG},QG=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:lP,asciiTrim:Dm,assign:Nm,escapeHtml:ol,escapeRE:GG,fromCodePoint:Kf,has:MG,isMdAsciiPunct:Gf,isPunctChar:cP,isPunctCharCode:Wf,isSpace:sr,isString:oS,isValidEntityCode:sS,isWhiteSpace:Hf,lib:JG,normalizeReference:$m,unescapeAll:zc,unescapeMd:jG},Symbol.toStringTag,{value:"Module"}));function YG(e,t,r){let n,i,o,s;const a=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(s=e.pos,e.md.inline.skipToken(e),o===91){if(s===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 XG(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=zc(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let s=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&&(s++,s>32))return o;if(n===41){if(s===0)break;s--}i++}return t===i||s!==0||(o.str=zc(e.slice(t,i)),o.pos=i,o.ok=!0),o}function ZG(e,t,r,n){let i,o=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)s.str=n.str,s.marker=n.marker;else{if(o>=r)return s;let a=e.charCodeAt(o);if(a!==34&&a!==39&&a!==40)return s;t++,o++,a===40&&(a=41),s.marker=a}for(;o<r;){if(i=e.charCodeAt(o),i===s.marker)return s.pos=o+1,s.str+=zc(e.slice(t,o)),s.ok=!0,s;if(i===40&&s.marker===41)return s;i===92&&o+1<r&&o++,o++}return s.can_continue=!0,s.str+=zc(e.slice(t,o)),s}const eJ=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:XG,parseLinkLabel:YG,parseLinkTitle:ZG},Symbol.toStringTag,{value:"Module"})),As={};As.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+ol(o.content)+"</code>"};As.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
|
+
`};As.fence=function(e,t,r,n,i){const o=e[t],s=o.info?zc(o.info).trim():"";let a="",l="";if(s){const d=s.split(/(\s+)/g);a=d[0],l=d.slice(2).join("")}let u;if(r.highlight?u=r.highlight(o.content,a,l)||ol(o.content):u=ol(o.content),u.indexOf("<pre")===0)return u+`
|
|
5
|
+
`;if(s){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+a]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+a);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${u}</code></pre>
|
|
6
|
+
`}return`<pre><code${i.renderAttrs(o)}>${u}</code></pre>
|
|
7
|
+
`};As.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)};As.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
+
`:`<br>
|
|
9
|
+
`};As.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
+
`:`<br>
|
|
11
|
+
`:`
|
|
12
|
+
`};As.text=function(e,t){return ol(e[t].content)};As.html_block=function(e,t){return e[t].content};As.html_inline=function(e,t){return e[t].content};function sd(){this.rules=Nm({},As)}sd.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};sd.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 s=!1;if(i.block&&(s=!0,i.nesting===1&&r+1<t.length)){const a=t[r+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(s=!1)}return o+=s?`>
|
|
14
|
+
`:">",o};sd.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const a=e[o].type;typeof i[a]<"u"?n+=i[a](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};sd.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};sd.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const a=e[o].type;a==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[a]<"u"?n+=i[a](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function gi(){this.__rules__=[],this.__cache__=null}gi.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};gi.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))})})};gi.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};gi.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};gi.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};gi.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};gi.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};gi.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};gi.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};gi.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Wo(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}Wo.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};Wo.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Wo.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};Wo.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};Wo.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 dP(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}dP.prototype.Token=Wo;const tJ=/\r\n?|\n/g,rJ=/\0/g;function nJ(e){let t;t=e.src.replace(tJ,`
|
|
16
|
+
`),t=t.replace(rJ,"�"),e.src=t}function iJ(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 oJ(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 aJ(e){return/^<\/a\s*>/i.test(e)}function lJ(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 s=i.length-1;s>=0;s--){const a=i[s];if(a.type==="link_close"){for(s--;i[s].level!==a.level&&i[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(sJ(a.content)&&o>0&&o--,aJ(a.content)&&o++),!(o>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const l=a.content;let u=e.md.linkify.match(l);const d=[];let f=a.level,h=0;u.length>0&&u[0].index===0&&s>0&&i[s-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const g=u[p].url,m=e.md.normalizeLink(g);if(!e.md.validateLink(m))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",m]],x.level=f++,x.markup="linkify",x.info="auto",d.push(x);const E=new e.Token("text","",0);E.content=v,E.level=f,d.push(E);const S=new e.Token("link_close","a",-1);S.level=--f,S.markup="linkify",S.info="auto",d.push(S),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=lP(i,s,d)}}}}const fP=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,uJ=/\((c|tm|r)\)/i,cJ=/\((c|tm|r)\)/ig,dJ={c:"©",r:"®",tm:"™"};function fJ(e,t){return dJ[t.toLowerCase()]}function hJ(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,fJ)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function pJ(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&fP.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 gJ(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(uJ.test(e.tokens[t].content)&&hJ(e.tokens[t].children),fP.test(e.tokens[t].content)&&pJ(e.tokens[t].children))}const mJ=/['"]/,fC=/['"]/g,hC="’";function Cp(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function vJ(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 _J(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const s=e[o],a=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=a);r--);if(n.length=r+1,s.type!=="text")continue;const l=s.content;let u=0;const d=l.length;e:for(;u<d;){fC.lastIndex=u;const f=fC.exec(l);if(!f)break;let h=!0,p=!0;u=f.index+1;const g=f[0]==="'";let m=32;if(f.index-1>=0)m=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){m=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 _=Gf(m)||Wf(m),x=Gf(v)||Wf(v),E=Hf(m),S=Hf(v);if(S?h=!1:x&&(E||_||(h=!1)),E?p=!1:_&&(S||x||(p=!1)),v===34&&f[0]==='"'&&m>=48&&m<=57&&(p=h=!1),h&&p&&(h=_,p=x),!h&&!p){g&&Cp(i,o,f.index,hC);continue}if(p)for(r=n.length-1;r>=0;r--){let C=n[r];if(n[r].level<a)break;if(C.single===g&&n[r].level===a){C=n[r];let k,N;g?(k=t.md.options.quotes[2],N=t.md.options.quotes[3]):(k=t.md.options.quotes[0],N=t.md.options.quotes[1]),Cp(i,o,f.index,N),Cp(i,C.token,C.pos,k),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:g,level:a}):p&&g&&Cp(i,o,f.index,hC)}}Object.keys(i).forEach(function(o){e[o].content=vJ(e[o].content,i[o])})}function bJ(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!mJ.test(e.tokens[t].content)||_J(e.tokens[t].children,e)}function yJ(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 s=n[o].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=r=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==r&&(s[r]=s[t]),r++);t!==r&&(s.length=r)}}const c_=[["normalize",nJ],["block",iJ],["inline",oJ],["linkify",lJ],["replacements",gJ],["smartquotes",bJ],["text_join",yJ]];function aS(){this.ruler=new gi;for(let e=0;e<c_.length;e++)this.ruler.push(c_[e][0],c_[e][1])}aS.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};aS.prototype.State=dP;function Ts(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,s=0,a=0,l=0,u=i.length,d=!1;s<u;s++){const f=i.charCodeAt(s);if(!d)if(sr(f)){a++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||s===u-1)&&(f!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,o=s+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}Ts.prototype.push=function(e,t,r){const n=new Wo(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};Ts.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ts.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Ts.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!sr(n))break}return t};Ts.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!sr(this.src.charCodeAt(--t)))return t+1;return t};Ts.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};Ts.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};Ts.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let s=0,a=t;a<r;a++,s++){let l=0;const u=this.bMarks[a];let d=u,f;for(a+1<r||i?f=this.eMarks[a]+1:f=this.eMarks[a];d<f&&l<n;){const h=this.src.charCodeAt(d);if(sr(h))h===9?l+=4-(l+this.bsCount[a])%4:l++;else if(d-u<this.tShift[a])l++;else break;d++}l>n?o[s]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[s]=this.src.slice(d,f)}return o.join("")};Ts.prototype.Token=Wo;const xJ=65536;function d_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function pC(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,s=0,a="";for(;n<r;)i===124&&(o?(a+=e.substring(s,n-1),s=n):(t.push(a+e.substring(s,n)),a="",s=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(a+e.substring(s)),t}function SJ(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 s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!sr(a)||s===45&&sr(a))return!1;for(;o<e.eMarks[i];){const S=e.src.charCodeAt(o);if(S!==124&&S!==45&&S!==58&&!sr(S))return!1;o++}let l=d_(e,t+1),u=l.split("|");const d=[];for(let S=0;S<u.length;S++){const C=u[S].trim();if(!C){if(S===0||S===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=pC(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"),g=e.push("table_open","table",1),m=[t,0];g.map=m;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 S=0;S<u.length;S++){const C=e.push("th_open","th",1);d[S]&&(C.attrs=[["style","text-align:"+d[S]]]);const k=e.push("inline","",0);k.content=u[S].trim(),k.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let x,E=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let S=!1;for(let k=0,N=p.length;k<N;k++)if(p[k](e,i,r,!0)){S=!0;break}if(S||(l=d_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(u=pC(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),E+=f-u.length,E>xJ))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 N=e.push("td_open","td",1);d[k]&&(N.attrs=[["style","text-align:"+d[k]]]);const T=e.push("inline","",0);T.content=u[k]?u[k].trim():"",T.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),m[1]=i,e.parentType=h,e.line=i,!0}function EJ(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 wJ(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 s=e.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let a=i;i=e.skipChars(i,s);let l=i-a;if(l<3)return!1;const u=e.src.slice(a,i),d=e.src.slice(i,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=a=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,s),!(i-a<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 kJ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const a=[],l=[],u=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,g;for(g=t;g<r;g++){const E=e.sCount[g]<e.blkIndent;if(i=e.bMarks[g]+e.tShift[g],o=e.eMarks[g],i>=o)break;if(e.src.charCodeAt(i++)===62&&!E){let C=e.sCount[g]+1,k,N;e.src.charCodeAt(i)===32?(i++,C++,N=!1,k=!0):e.src.charCodeAt(i)===9?(k=!0,(e.bsCount[g]+C)%4===3?(i++,C++,N=!1):N=!0):k=!1;let T=C;for(a.push(e.bMarks[g]),e.bMarks[g]=i;i<o;){const $=e.src.charCodeAt(i);if(sr($))$===9?T+=4-(T+e.bsCount[g]+(N?1:0))%4:T++;else break;i++}p=i>=o,l.push(e.bsCount[g]),e.bsCount[g]=e.sCount[g]+1+(k?1:0),u.push(e.sCount[g]),e.sCount[g]=T-C,d.push(e.tShift[g]),e.tShift[g]=i-e.bMarks[g];continue}if(p)break;let S=!1;for(let C=0,k=f.length;C<k;C++)if(f[C](e,g,r,!0)){S=!0;break}if(S){e.lineMax=g,e.blkIndent!==0&&(a.push(e.bMarks[g]),l.push(e.bsCount[g]),d.push(e.tShift[g]),u.push(e.sCount[g]),e.sCount[g]-=e.blkIndent);break}a.push(e.bMarks[g]),l.push(e.bsCount[g]),d.push(e.tShift[g]),u.push(e.sCount[g]),e.sCount[g]=-1}const m=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,g);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=s,e.parentType=h,_[1]=e.line;for(let E=0;E<d.length;E++)e.bMarks[E+t]=a[E],e.tShift[E+t]=d[E],e.sCount[E+t]=u[E],e.bsCount[E+t]=l[E];return e.blkIndent=m,!0}function CJ(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 s=e.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<i;){const u=e.src.charCodeAt(o++);if(u!==s&&!sr(u))return!1;u===s&&a++}if(a<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(a+1).join(String.fromCharCode(s)),!0}function gC(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(!sr(o))return-1}return n}function mC(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),!sr(o))?-1:i}function RJ(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 AJ(e,t,r,n){let i,o,s,a,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=mC(e,l))>=0){if(f=!0,s=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(s,p-1)),d&&h!==1)return!1}else if((p=gC(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const g=e.src.charCodeAt(p-1),m=e.tokens.length;f?(a=e.push("ordered_list_open","ol",1),h!==1&&(a.attrs=[["start",h]])):a=e.push("bullet_list_open","ul",1);const v=[l,0];a.map=v,a.markup=String.fromCharCode(g);let _=!1;const x=e.md.block.ruler.getRules("list"),E=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const S=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let C=S;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 N;k>=i?N=1:N=C-S,N>4&&(N=1);const T=S+N;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(g);const $=[l,0];a.map=$,f&&(a.info=e.src.slice(s,p-1));const P=e.tight,M=e.tShift[l],I=e.sCount[l],U=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,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]=M,e.sCount[l]=I,e.tight=P,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(g),l=e.line,$[1]=l,l>=r||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let B=!1;for(let q=0,J=x.length;q<J;q++)if(x[q](e,l,r,!0)){B=!0;break}if(B)break;if(f){if(p=mC(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=gC(e,l),p<0)break;if(g!==e.src.charCodeAt(p-1))break}return f?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(g),v[1]=l,e.line=l,e.parentType=E,u&&RJ(e,m),!0}function TJ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function a(x){const E=e.lineMax;if(x>=E||e.isEmpty(x))return null;let S=!1;if(e.sCount[x]-e.blkIndent>3&&(S=!0),e.sCount[x]<0&&(S=!0),!S){const N=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let $=!1;for(let P=0,M=N.length;P<M;P++)if(N[P](e,x,E,!0)){$=!0;break}if(e.parentType=T,$)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 E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(x===92&&(i++,i<o&&l.charCodeAt(i)===10)){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}}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 E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(!sr(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=s,g=i;for(;i<o;i++){const x=l.charCodeAt(i);if(x===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(!sr(x))break}let m=e.md.helpers.parseLinkTitle(l,i,o);for(;m.can_continue;){const x=a(s);if(x===null)break;l+=x,i=o,o=l.length,s++,m=e.md.helpers.parseLinkTitle(l,i,o,m)}let v;for(i<o&&g!==i&&m.ok?(v=m.str,i=m.pos):(v="",i=h,s=p);i<o;){const x=l.charCodeAt(i);if(!sr(x))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,s=p;i<o;){const x=l.charCodeAt(i);if(!sr(x))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const _=$m(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=s),!0):!1}const NJ=["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"],$J="[a-zA-Z_:][a-zA-Z0-9:._-]*",DJ="[^\"'=<>`\\x00-\\x20]+",FJ="'[^']*'",IJ='"[^"]*"',PJ="(?:"+DJ+"|"+FJ+"|"+IJ+")",OJ="(?:\\s+"+$J+"(?:\\s*=\\s*"+PJ+")?)",hP="<[A-Za-z][A-Za-z0-9\\-]*"+OJ+"*\\s*\\/?>",pP="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",MJ="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",LJ="<[?][\\s\\S]*?[?]>",zJ="<![A-Za-z][^>]*>",UJ="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",BJ=new RegExp("^(?:"+hP+"|"+pP+"|"+MJ+"|"+LJ+"|"+zJ+"|"+UJ+")"),jJ=new RegExp("^(?:"+hP+"|"+pP+")"),Cl=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+NJ.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(jJ.source+"\\s*$"),/^$/,!1]];function qJ(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 s=e.src.slice(i,o),a=0;for(;a<Cl.length&&!Cl[a][0].test(s);a++);if(a===Cl.length)return!1;if(n)return Cl[a][2];let l=t+1;const u=Cl[a][1].test("");if(!Cl[a][1].test(s)){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],s=e.src.slice(i,o),Cl[a][1].test(s)){s.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 VJ(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 s=e.src.charCodeAt(i);if(s!==35||i>=o)return!1;let a=1;for(s=e.src.charCodeAt(++i);s===35&&i<o&&a<=6;)a++,s=e.src.charCodeAt(++i);if(a>6||i<o&&!sr(s))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&sr(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const u=e.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[t,e.line];const d=e.push("inline","",0);d.content=Dm(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function KJ(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,s,a=t+1;for(;a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a];const g=e.eMarks[a];if(p<g&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=g))){o=s===61?1:2;break}}if(e.sCount[a]<0)continue;let h=!1;for(let p=0,g=n.length;p<g;p++)if(n[p](e,a,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=Dm(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),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(s),e.parentType=i,!0}function HJ(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 s=Dm(e.getLines(t,o,e.blkIndent,!1));e.line=o;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const Rp=[["table",SJ,["paragraph","reference"]],["code",EJ],["fence",wJ,["paragraph","reference","blockquote","list"]],["blockquote",kJ,["paragraph","reference","blockquote","list"]],["hr",CJ,["paragraph","reference","blockquote","list"]],["list",AJ,["paragraph","reference","blockquote"]],["reference",TJ],["html_block",qJ,["paragraph","reference","blockquote"]],["heading",VJ,["paragraph","reference","blockquote"]],["lheading",KJ],["paragraph",HJ]];function Fm(){this.ruler=new gi;for(let e=0;e<Rp.length;e++)this.ruler.push(Rp[e][0],Rp[e][1],{alt:(Rp[e][2]||[]).slice()})}Fm.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let s=t,a=!1;for(;s<r&&(e.line=s=e.skipEmptyLines(s),!(s>=r||e.sCount[s]<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,s,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=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<r&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};Fm.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)};Fm.prototype.State=Ts;function zh(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}zh.prototype.pushPending=function(){const e=new Wo("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};zh.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new Wo(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};zh.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 s=o-e;let a=o<r?this.src.charCodeAt(o):32;if((a&64512)===55296){const v=this.src.charCodeAt(o+1);a=(v&64512)===56320?65536+(a-55296<<10)+(v-56320):65533}else(a&64512)===56320&&(a=65533);const l=Gf(i)||Wf(i),u=Gf(a)||Wf(a),d=Hf(i),f=Hf(a),h=!f&&(!u||d||l),p=!d&&(!l||f||u);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||u),length:s}};zh.prototype.Token=Wo;function WJ(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 GJ(e,t){let r=e.pos;for(;r<e.posMax&&!WJ(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const JJ=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function QJ(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(JJ);if(!i)return!1;const o=i[1],s=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;let l=a.length;for(;l>0&&a.charCodeAt(l-1)===42;)l--;l!==a.length&&(a=a.slice(0,l));const u=e.md.normalizeLink(a);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(a);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=a.length-o.length,!0}function YJ(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&&sr(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const lS=[];for(let e=0;e<256;e++)lS.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){lS[e.charCodeAt(0)]=1});function XJ(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),!!sr(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const a=e.src.charCodeAt(r+1);a>=56320&&a<=57343&&(o+=e.src[r+1],r++)}const s="\\"+o;if(!t){const a=e.push("text_special","",0);i<256&&lS[i]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return e.pos=r+1,!0}function ZJ(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 s=e.src.slice(i,r),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=i)return t||(e.pending+=s),e.pos+=a,!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===a){if(!t){const f=e.push("code_inline","code",0);f.markup=s,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+=s),e.pos+=a,!0}function eQ(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 s=String.fromCharCode(n);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=e.push("text","",0),a.content=s+s,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 vC(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const s=t[o];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];r=e.tokens[s.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[a.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&n.push(a.token-1)}for(;n.length;){const o=n.pop();let s=o+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,o!==s&&(r=e.tokens[s],e.tokens[s]=e.tokens[o],e.tokens[o]=r)}}function tQ(e){const t=e.tokens_meta,r=e.tokens_meta.length;vC(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&vC(e,t[n].delimiters)}const gP={tokenize:eQ,postProcess:tQ};function rQ(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 s=e.push("text","",0);s.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 _C(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],s=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,a=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const u=e.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function nQ(e){const t=e.tokens_meta,r=e.tokens_meta.length;_C(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&_C(e,t[n].delimiters)}const mP={tokenize:rQ,postProcess:nQ};function iQ(e,t){let r,n,i,o,s="",a="",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 g=p+1;if(g<f&&e.src.charCodeAt(g)===40){for(u=!1,g++;g<f&&(r=e.src.charCodeAt(g),!(!sr(r)&&r!==10));g++);if(g>=f)return!1;if(l=g,i=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?g=i.pos:s="",l=g;g<f&&(r=e.src.charCodeAt(g),!(!sr(r)&&r!==10));g++);if(i=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<f&&l!==g&&i.ok)for(a=i.str,g=i.pos;g<f&&(r=e.src.charCodeAt(g),!(!sr(r)&&r!==10));g++);}(g>=f||e.src.charCodeAt(g)!==41)&&(u=!0),g++}if(u){if(typeof e.env.references>"u")return!1;if(g<f&&e.src.charCodeAt(g)===91?(l=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?n=e.src.slice(l,g++):g=p+1):g=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[$m(n)],!o)return e.pos=d,!1;s=o.href,a=o.title}if(!t){e.pos=h,e.posMax=p;const m=e.push("link_open","a",1),v=[["href",s]];m.attrs=v,a&&v.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=f,!0}function oQ(e,t){let r,n,i,o,s,a,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,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!sr(r)&&r!==10));o++);if(o>=h)return!1;for(u=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(d=e.md.normalizeLink(a.str),e.md.validateLink(d)?o=a.pos:d=""),u=o;o<h&&(r=e.src.charCodeAt(o),!(!sr(r)&&r!==10));o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<h&&(r=e.src.charCodeAt(o),!(!sr(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=g+1):o=g+1,i||(i=e.src.slice(p,g)),s=e.env.references[$m(i)],!s)return e.pos=f,!1;d=s.href,l=s.title}if(!t){n=e.src.slice(p,g);const m=[];e.md.inline.parse(n,e.md,e.env,m);const v=e.push("image","img",0),_=[["src",d],["alt",""]];v.attrs=_,v.children=m,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])?)*)$/,aQ=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function lQ(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 s=e.src.charCodeAt(r);if(s===60)return!1;if(s===62)break}const o=e.src.slice(n+1,r);if(aQ.test(o)){const s=e.md.normalizeLink(o);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.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 s=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.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 uQ(e){return/^<a[>\s]/i.test(e)}function cQ(e){return/^<\/a\s*>/i.test(e)}function dQ(e){const t=e|32;return t>=97&&t<=122}function fQ(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&&!dQ(i))return!1;const o=e.src.slice(n).match(BJ);if(!o)return!1;if(!t){const s=e.push("html_inline","",0);s.content=o[0],uQ(s.content)&&e.linkLevel++,cQ(s.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const hQ=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,pQ=/^&([a-z][a-z0-9]{1,31});/i;function gQ(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(hQ);if(o){if(!t){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=e.push("text_special","",0);a.content=sS(s)?Kf(s):Kf(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(pQ);if(o){const s=IG(o[0]);if(s!==o[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function bC(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let s=0;s<r;s++){const a=e[s];if(o.push(0),(e[n].marker!==a.marker||i!==a.token-1)&&(n=s),i=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[a.marker][(a.open?3:0)+a.length%3];let u=n-o[n]-1,d=u;for(;u>l;u-=o[u]+1){const f=e[u];if(f.marker===a.marker&&f.open&&f.end<0){let h=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(h=!0),!h){const p=u>0&&!e[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,f.end=s,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function mQ(e){const t=e.tokens_meta,r=e.tokens_meta.length;bC(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&bC(t[n].delimiters)}function vQ(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",GJ],["linkify",QJ],["newline",YJ],["escape",XJ],["backticks",ZJ],["strikethrough",gP.tokenize],["emphasis",mP.tokenize],["link",iQ],["image",oQ],["autolink",lQ],["html_inline",fQ],["entity",gQ]],h_=[["balance_pairs",mQ],["strikethrough",gP.postProcess],["emphasis",mP.postProcess],["fragments_join",vQ]];function Uh(){this.ruler=new gi;for(let e=0;e<f_.length;e++)this.ruler.push(f_[e][0],f_[e][1]);this.ruler2=new gi;for(let e=0;e<h_.length;e++)this.ruler2.push(h_[e][0],h_[e][1])}Uh.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 s=!1;if(e.level<i){for(let a=0;a<n;a++)if(e.level++,s=r[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos};Uh.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 s=!1;if(e.level<i){for(let a=0;a<r;a++)if(s=t[a](e,!1),s){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Uh.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](i)};Uh.prototype.State=zh;function _Q(e){const t={};e=e||{},t.src_Any=rP.source,t.src_Cc=nP.source,t.src_Z=oP.source,t.src_P=iS.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 jy(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function Im(e){return Object.prototype.toString.call(e)}function bQ(e){return Im(e)==="[object String]"}function yQ(e){return Im(e)==="[object Object]"}function xQ(e){return Im(e)==="[object RegExp]"}function yC(e){return Im(e)==="[object Function]"}function SQ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const vP={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function EQ(e){return Object.keys(e||{}).reduce(function(t,r){return t||vP.hasOwnProperty(r)},!1)}const wQ={"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}}},kQ="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]",CQ="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function RQ(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function xC(){return function(e,t){t.normalize(e)}}function ug(e){const t=e.re=_Q(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(kQ),r.push(t.src_xn),t.src_tlds=r.join("|");function n(a){return a.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(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){const l=e.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(e.__compiled__[a]=u,yQ(l)){xQ(l.validate)?u.validate=RQ(l.validate):yC(l.validate)?u.validate=l.validate:o(a,l),yC(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=xC();return}if(bQ(l)){i.push(a);return}o(a,l)}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:xC()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(SQ).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","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 _P(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 ji(e,t){if(!(this instanceof ji))return new ji(e,t);t||EQ(e)&&(t=e,e={}),this.__opts__=jy({},vP,t),this.__schemas__=jy({},wQ,e),this.__compiled__={},this.__tlds__=CQ,this.__tlds_replaced__=!1,this.re={},ug(this)}ji.prototype.add=function(t,r){return this.__schemas__[t]=r,ug(this),this};ji.prototype.set=function(t){return this.__opts__=jy(this.__opts__,t),this};ji.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)};ji.prototype.pretest=function(t){return this.re.pretest.test(t)};ji.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};ji.prototype.match=function(t){const r=[],n=[],i=[],o=[];let s,a,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;(s=l.exec(t))!==null;)a=this.testSchemaAt(t,s[2],l.lastIndex),a&&n.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});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;(s=l.exec(t))!==null;)i.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(t))!==null;)o.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[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 g=new _P(t,p.schema,p.index,p.lastIndex);this.__compiled__[g.schema].normalize(g,this),r.push(g),f=p.lastIndex}return r.length?r:null};ji.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 _P(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};ji.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(),ug(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,ug(this),this)};ji.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};ji.prototype.onCompile=function(){};const bc=2147483647,fs=36,uS=1,Jf=26,AQ=38,TQ=700,bP=72,yP=128,xP="-",NQ=/^xn--/,$Q=/[^\0-\x7F]/,DQ=/[\x2E\u3002\uFF0E\uFF61]/g,FQ={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p_=fs-uS,hs=Math.floor,g_=String.fromCharCode;function Ia(e){throw new RangeError(FQ[e])}function IQ(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function SP(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(DQ,".");const i=e.split("."),o=IQ(i,t).join(".");return n+o}function EP(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 PQ=e=>String.fromCodePoint(...e),OQ=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:fs},SC=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},wP=function(e,t,r){let n=0;for(e=r?hs(e/TQ):e>>1,e+=hs(e/t);e>p_*Jf>>1;n+=fs)e=hs(e/p_);return hs(n+(p_+1)*e/(e+AQ))},kP=function(e){const t=[],r=e.length;let n=0,i=yP,o=bP,s=e.lastIndexOf(xP);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Ia("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<r;){const l=n;for(let d=1,f=fs;;f+=fs){a>=r&&Ia("invalid-input");const h=OQ(e.charCodeAt(a++));h>=fs&&Ia("invalid-input"),h>hs((bc-n)/d)&&Ia("overflow"),n+=h*d;const p=f<=o?uS:f>=o+Jf?Jf:f-o;if(h<p)break;const g=fs-p;d>hs(bc/g)&&Ia("overflow"),d*=g}const u=t.length+1;o=wP(n-l,u,l==0),hs(n/u)>bc-i&&Ia("overflow"),i+=hs(n/u),n%=u,t.splice(n++,0,i)}return String.fromCodePoint(...t)},CP=function(e){const t=[];e=EP(e);const r=e.length;let n=yP,i=0,o=bP;for(const l of e)l<128&&t.push(g_(l));const s=t.length;let a=s;for(s&&t.push(xP);a<r;){let l=bc;for(const d of e)d>=n&&d<l&&(l=d);const u=a+1;l-n>hs((bc-i)/u)&&Ia("overflow"),i+=(l-n)*u,n=l;for(const d of e)if(d<n&&++i>bc&&Ia("overflow"),d===n){let f=i;for(let h=fs;;h+=fs){const p=h<=o?uS:h>=o+Jf?Jf:h-o;if(f<p)break;const g=f-p,m=fs-p;t.push(g_(SC(p+g%m,0))),f=hs(g/m)}t.push(g_(SC(f,0))),o=wP(i,u,a===s),i=0,++a}++i,++n}return t.join("")},MQ=function(e){return SP(e,function(t){return NQ.test(t)?kP(t.slice(4).toLowerCase()):t})},LQ=function(e){return SP(e,function(t){return $Q.test(t)?"xn--"+CP(t):t})},RP={version:"2.3.1",ucs2:{decode:EP,encode:PQ},decode:kP,encode:CP,toASCII:LQ,toUnicode:MQ},zQ={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},UQ={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"]}}},BQ={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"]}}},jQ={default:zQ,zero:UQ,commonmark:BQ},qQ=/^(vbscript|javascript|file|data):/,VQ=/^data:image\/(gif|png|jpeg|webp);/;function KQ(e){const t=e.trim().toLowerCase();return qQ.test(t)?VQ.test(t):!0}const AP=["http:","https:","mailto:"];function HQ(e){const t=nS(e,!0);if(t.hostname&&(!t.protocol||AP.indexOf(t.protocol)>=0))try{t.hostname=RP.toASCII(t.hostname)}catch{}return Lh(rS(t))}function WQ(e){const t=nS(e,!0);if(t.hostname&&(!t.protocol||AP.indexOf(t.protocol)>=0))try{t.hostname=RP.toUnicode(t.hostname)}catch{}return Lc(rS(t),Lc.defaultChars+"%")}function co(e,t){if(!(this instanceof co))return new co(e,t);t||oS(e)||(t=e||{},e="default"),this.inline=new Uh,this.block=new Fm,this.core=new aS,this.renderer=new sd,this.linkify=new ji,this.validateLink=KQ,this.normalizeLink=HQ,this.normalizeLinkText=WQ,this.utils=QG,this.helpers=Nm({},eJ),this.options={},this.configure(e),t&&this.set(t)}co.prototype.set=function(e){return Nm(this.options,e),this};co.prototype.configure=function(e){const t=this;if(oS(e)){const r=e;if(e=jQ[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};co.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};co.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};co.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};co.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};co.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};co.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};co.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function qr(e){return"var("+e+")"}let GQ=w([c("color",qr(y.textPrimary)),c("font-size",qr(A.sizeSm)),c("line-height",qr(A.lineHeightRelaxed)),c("word-break","break-word"),kr("& > :first-child",[c("margin-top","0")]),kr("& > :last-child",[c("margin-bottom","0")]),kr("& h1, & h2, & h3, & h4, & h5, & h6",[c("margin","var("+F.md+") 0 var("+F.sm+")"),c("line-height",qr(A.lineHeightTight)),c("font-weight",qr(A.weightBold))]),kr("& h1",[c("font-size",qr(A.sizeXl))]),kr("& h2",[c("font-size",qr(A.sizeLg))]),kr("& h3, & h4, & h5, & h6",[c("font-size",qr(A.sizeMd))]),kr("& p",[c("margin","var("+F.sm+") 0")]),kr("& a",[c("color",qr(y.brand)),c("text-decoration","none")]),kr("& a:hover",[c("text-decoration","underline")]),kr("& ul, & ol",[c("margin","var("+F.sm+") 0"),c("padding-left","1.5em")]),kr("& li",[c("margin","var("+F.xs+") 0")]),kr("& code",[c("font-family",qr(A.fontFamilyMono)),c("font-size","0.9em"),c("background",qr(y.surfaceSubtle)),c("padding","1px 4px"),c("border-radius",qr(X.sm))]),kr("& pre",[c("background",qr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",qr(X.md)),c("padding",qr(F.md)),c("overflow","auto"),c("margin","var("+F.sm+") 0")]),kr("& pre code",[c("background","none"),c("padding","0")]),kr("& blockquote",[c("margin","var("+F.sm+") 0"),c("padding-left",qr(F.md)),c("border-left","3px solid var("+y.border+")"),c("color",qr(y.textSecondary))]),kr("& table",[c("border-collapse","collapse"),c("margin","var("+F.sm+") 0")]),kr("& th, & td",[c("border","1px solid var("+y.borderSubtle+")"),c("padding","var("+F.xs+") var("+F.sm+")"),c("text-align","left")]),kr("& th",[c("background",qr(y.surfaceSubtle)),c("font-weight",qr(A.weightMedium))]),kr("& img",[c("max-width","100%"),c("border-radius",qr(X.sm))]),kr("& hr",[c("border","none"),c("border-top","1px solid var("+y.borderSubtle+")"),c("margin","var("+F.md+") 0")])]),JQ=new co({html:!1,linkify:!0});function QQ(e){let t=e.source,r=jt(()=>JQ.render(t),[t]),n=Je(null);return Ae(()=>{se(ys(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),b("div",{ref:Wt(n),className:GQ,dangerouslySetInnerHTML:{__html:r}})}let TP=QQ;function YQ(e,t){return b(TP,{source:e.body})}function XQ(){QI({id:"markdown",label:"Markdown",constraints:{},preview:YQ})}function yc(e){return Array.from(e).length}function cS(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 NP(e,t){return R(t,r=>{let i=cS(e,r)[1];if(i!=="")return i})}function gr(e){return"var("+e+")"}let ZQ=w([z("flex"),pe("column"),c("gap","4px")]),EC=w([c("background",gr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",gr(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-family","inherit"),c("font-size",gr(A.sizeMd)),c("line-height",gr(A.lineHeightNormal)),c("color",gr(y.textPrimary)),c("outline","none"),c("resize","vertical"),Ko({NAME:"percent",VAL:100}),c("box-sizing","border-box"),c("transition","border-color 120ms"),ga([c("border-color",gr(y.brand))])]),eY=w([c("border-color",gr(y.error)),ga([c("border-color",gr(y.error))])]),tY=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",gr(F.sm)),c("font-size",gr(A.sizeXs)),c("color",gr(y.textSecondary))]),rY=w([z("inlineFlex"),Z("center"),c("gap","4px"),c("color",gr(y.textSecondary))]),wC=w([c("font-variant-numeric","tabular-nums")]),nY=w([c("color",gr(y.error)),c("font-weight",gr(A.weightMedium))]),iY=w([c("background",gr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-left","3px solid var("+y.error+")"),c("border-radius",gr(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",gr(A.sizeXs)),c("line-height",gr(A.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word"),c("max-height","8em"),c("overflow","auto")]),oY=w([c("color",gr(y.textSecondary)),c("font-size",gr(A.sizeXs)),Em(Ce(2))]),sY=w([c("color",gr(y.textPrimary))]),aY=w([c("color",gr(y.error)),c("font-weight",gr(A.weightMedium))]),lY=w([c("color",gr(y.textDisabled)),c("text-decoration","line-through")]);function $P(e){return e.toString()+" character"+(e===1?"":"s")}function DP(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 uY(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,s=e.onBlur,a=e.onChange,l=e.value,u=s!==void 0?s:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=NP(l,o),g=Be(p),m=f||g?EC+" "+eY:EC,v;if(p!==void 0&&o!==void 0){let _=cS(l,o);v=L("div",{children:[b("div",{children:"Sent as:",className:oY}),L("div",{children:[b("span",{children:_[0],className:sY}),b("span",{children:"✂",className:aY}),b("span",{children:p,className:lY})],className:iY})]})}else v=null;return L("div",{children:[b("textarea",{className:m,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:_=>u(),onChange:_=>a(_.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?Be(i)?" · "+t:t:null],className:rY}),b("span",{children:DP(h,o),className:g?wC+" "+nY:wC})],className:tY}),v],className:ZQ})}let cY=uY;lG();XQ();function qt(e){return"var("+e+")"}let dY=w([z("flex"),pe("column"),c("gap",qt(F.sm)),c("background",qt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",qt(X.md)),c("padding",qt(F.md))]),fY=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",qt(F.sm))]),hY=w([c("font-size",qt(A.sizeSm)),c("font-weight",qt(A.weightMedium)),c("color",qt(y.textPrimary))]),pY=w([c("font-size",qt(A.sizeXs)),c("color",qt(y.textSecondary))]),Ap=w([c("font-size",qt(A.sizeXs)),c("color",qt(y.textSecondary)),c("font-variant-numeric","tabular-nums"),c("white-space","nowrap")]),kC=w([c("color",qt(y.error)),c("font-weight",qt(A.weightMedium))]),gY=w([z("flex"),Z("baseline"),Xe("spaceBetween"),c("gap",qt(F.sm)),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("padding-bottom",qt(F.xs))]),mY=w([c("font-size",qt(A.sizeMd)),c("font-weight",qt(A.weightMedium)),c("color",qt(y.textPrimary)),c("word-break","break-word")]),vY=w([c("color",qt(y.textDisabled)),c("text-decoration","line-through")]),_Y=w([c("color",qt(y.error)),c("font-weight",qt(A.weightMedium))]),bY=w([c("margin","0"),c("font-family","inherit"),c("font-size",qt(A.sizeSm)),c("line-height",qt(A.lineHeightRelaxed)),c("color",qt(y.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]),yY=w([c("max-width","100%"),c("border-radius",qt(X.sm)),c("border","1px solid var("+y.borderSubtle+")"),c("object-fit","cover")]),xY=w([c("font-size",qt(A.sizeXs)),c("color",qt(y.error)),c("background",qt(y.surfaceSubtle)),c("border-left","3px solid var("+y.error+")"),c("border-radius",qt(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")")]);function CC(e,t){let r=cS(e,t),n=r[1];return n===""?e:L(Hr,{children:[r[0],b("span",{children:"✂",className:_Y}),b("span",{children:n,className:vY})]})}function SY(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=YI(n);Ae(()=>{Ui(o)&&VW(n,"ChannelPreview")},[n]);let s=fe(o,n,_=>_.label),a=fe(o,XI,_=>_.constraints),l=yc(r.body),u=NP(r.body,a.maxLength),d=r.subject,f;if(d!==void 0){let _=a.subjectMaxLength,x=yc(d),E=fe(_,!1,S=>x>S);f=L("div",{children:[b("span",{children:_!==void 0?CC(d,_):d,className:mY}),_!==void 0?b("span",{children:x.toString()+" / "+_.toString(),className:E?Ap+" "+kC:Ap}):null],className:gY})}else f=null;let h=R(o,_=>_.preview),p;if(h!==void 0)p=h(r,a);else{let _=a.maxLength;p=b("pre",{children:_!==void 0?CC(r.body,_):r.body,className:bY})}let g=r.imageUrl,m;if(g!==void 0){let _=a.mediaAspect;m=b("img",{className:yY,style:_!==void 0?eG({},"aspectRatio",_):{},alt:"Message media",src:tu(g)})}else m=null;let v=a.note;return L("div",{children:[i?L("div",{children:[b("span",{children:s,className:hY}),b("span",{children:DP(l,a.maxLength),className:Be(u)?Ap+" "+kC:Ap})],className:fY}):null,f,p,u!==void 0?b("div",{children:$P(yc(u))+" past the limit — "+s+" will cut the tail.",className:xY}):null,m,v!==void 0?b("span",{children:v,className:pY}):null],className:dY})}let EY=SY;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 FP(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 Go=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,wY=Go&&"documentMode"in document?document.documentMode:null,Ro=Go&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),sl=Go&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Uc=!(!Go||!("InputEvent"in window)||wY)&&"getTargetRanges"in new window.InputEvent("input"),al=Go&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,IP=Go&&/Android/.test(navigator.userAgent),Bh=Go&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!IP,PP=Go&&/^(?=.*Chrome).*/i.test(navigator.userAgent),cg=Go&&IP&&PP,jh=Go&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ro&&!PP,kY=0,CY=1,RY=2,RC=1,AC=2,TC=4,NC=8,AY=16,m_=32,v_=64,dS=128,TY=1,NY=2,$Y=3,DY=4,FY=5,IY=6,Qf=Bh||al||jh?" ":"",jl=`
|
|
18
|
+
|
|
19
|
+
`,fS=sl?" ":Qf,aa={bold:1,capitalize:1024,code:16,highlight:dS,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},PY={directionless:1,unmergeable:2},dg={center:2,end:6,justify:4,left:1,right:3,start:5},OY={[NY]:"center",[IY]:"end",[DY]:"justify",[TY]:"left",[$Y]:"right",[FY]:"start"},MY={normal:0,segmented:2,token:1},LY={[kY]:"normal",[RY]:"segmented",[CY]:"token"},$C="$config";function DC(){return yr()._blockCursorElement}function zY(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let OP=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=FC(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 s=FC(t,r);if(s===null)return"after";const a=Array.prototype.indexOf.call(t.childNodes,s);return a>=0&&a<=o?"before":"after"}getInsertionAnchor(){return this.before}};function FC(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class xc extends OP{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(;zY(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===DC()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(jh||al||Bh);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=tr().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const s=tr().createElement("img");s.setAttribute("data-lexical-managed-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",n.insertBefore(s,o),n.__lexicalLineBreak=s}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=DC(),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=IC(r,n);o.push(i);const s=IC(r,this.element);let a=t.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=o[l],d=s[l];if(u===void 0||u<d)break;if(u>d){a+=1;break}}return[t.getParentOrThrow(),a]}}function IC(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 MP;try{MP="0.48.0+prod.esm"}catch{}const LP=MP??'"<unknown>+source"';let zd=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 zP(e,t=1e3){return e instanceof qy?e.clone():e.size<t?new Map(e):new qy().init(new Map(e),void 0,e.size)}let qy=class UP{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new UP().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 fg(e,t,r,n,i,o){if(V(e)){let s=e.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===t&&((V(s)||Xs(s)&&s.__slots!==null)&&fg(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a)),s=s.getNextSibling()}}for(const s of Xs(e)&&e.__slots!==null?e.__slots.values():[]){const a=n.get(s);a!==void 0&&du(a)&&a.__slotHost===t&&((V(a)||Xs(a)&&a.__slots!==null)&&fg(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s))}}let Vy=!1,hS=0;function UY(e){hS=e.timeStamp}function __(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&pd(e,r)!==void 0}function BY(e,t,r){const n=Zn(xi(r)),i=n&&fo(n,r._rootElement);let o=null,s=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,s=i.focusOffset);const a=e.nodeValue;a!==null&&TS(t,a,o,s,!1)}function jY(e,t,r){if(te(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return yi(t)&&r.isAttached()}function qY(e,t,r){for(let n=e;n&&!y6(n);n=Ru(n)){const i=pd(n,t);if(i!==void 0){const o=er(i,r);if(o)return ut(o)||!Ze(n)?void 0:[n,o]}}}function BP(e,t,r){Vy=!0;const n=performance.now()-hS>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,s=e._editorState,a=e._blockCursorElement;let l=!1,u="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,g=h.target,m=qY(g,e,s);if(!m)continue;const[v,_]=m;if(p==="characterData")n&&re(_)&&yi(g)&&jY(i,g,_)&&BY(g,_,e);else if(p==="childList"){l=!0;const x=h.addedNodes;for(let C=0;C<x.length;C++){const k=x[C],N=s6(k),T=k.parentNode;if(!(T==null||k===a||N!==null||__(k,T,e)||e._slotsUsed&&Ze(k)&&k.hasAttribute("data-lexical-slot")||y6(k))){if(sl){const $=(Ze(k)?k.innerText:null)||k.nodeValue;$&&(u+=$)}T.removeChild(k)}}const E=h.removedNodes,S=E.length;if(S>0){let C=0;for(let k=0;k<S;k++){const N=E[k];(__(N,g,e)||a===N)&&(g.appendChild(N),C++)}S!==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,g=h.target;for(let m=0;m<p.length;m++){const v=p[m],_=v.parentNode;_==null||v.nodeName!=="BR"||__(v,g,e)||_.removeChild(v)}}r.takeRecords()}i!==null&&(l&&vn(i),sl&&f6(e)&&i.insertRawText(u))})}finally{Vy=!1}}function jP(e){const t=e._observer;t!==null&&BP(e,t.takeRecords(),t)}function qP(e){(function(t){hS===0&&xi(t).addEventListener("textInput",UY,!0)})(e),e._observer=new MutationObserver((t,r)=>{BP(e,t,r)})}const PC="latest";let VY=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||WY).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function qh(e,t){return new VY(e,t)}function Vh(e,t,r=PC){const n=(r===PC?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function Sc(e,t,r){let n;if(an(),typeof r=="function"){const o=e.getLatest(),s=Vh(o,t);if(n=r(s),t.isEqual(s,n))return o}else n=r;const i=e.getWritable();return KP(i).updateFromKnown(t,n),i}function KY(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of IS(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 OC=new Set(["__proto__","constructor","prototype"]);let HY=class VP{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:s}=this.sharedNodeState,a=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})(s,n,i);this.size=a}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 MC(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 VP(t,r,(function(o,s,a){let l;if(a)for(const[u,d]of Object.entries(a)){if(OC.has(u))continue;const f=o.get(u);f?s.has(f)||s.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=MC(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(OC.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 KP(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new HY(t,HP(t));return t.__state=r,r}function HP(e){return e.__state?e.__state.sharedNodeState:n6(yr(),e.getType()).sharedNodeState}function MC(e){if(e)for(const t in e)return e}function WY(e){return e}function LC(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 zC(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,s]of Object.entries(n))if(!e.has(o)&&(e.add(o),s!==(i?i[o]:void 0)))return!0}return!1}function UC(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function BC(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,s=t.__format,a=t.__style,l=e.__state,u=t.__state;return(r===null||r===o)&&(n===null||n===s)&&(i===null||i===a)&&(e.__state===null||l===u||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&LC(h,d,f)||f&&LC(h,f,d)||d&&zC(h,d,f)||f&&zC(h,f,d))})(l,u))}function jC(e,t){const r=e.mergeWithSibling(t),n=Ft()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function qC(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&re(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(BC(t,n)){n=jC(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&re(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(BC(n,r)){n=jC(n,r);break}break}r.remove()}}else n.remove()}function Va(e){return VC(e.anchor),VC(e.focus),e}function VC(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),re(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 Yf=Symbol.for("@lexical/CachedTextSize");function KC(e,t){return Hy.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=Do.get(n);if(o===void 0&&ee(345,n),V(o)){const s=pr.get(n);if(s!==void 0&&V(s)&&s.__parent!==o.__parent)r+=o.getTextContentSize();else{const a=ou.get(n),l=a&&a.__lexicalTextContent;typeof l!="string"&&ee(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const s=o[Yf];s===void 0&&ee(347,o.getType(),n),r+=s}n=o.__next}return r},{editor:kt})}function WP(e){V(e)||e[Yf]===void 0&&(e[Yf]=re(e)?e.__text.length:e.getTextContentSize())}const GY=4;let Xf,kt,Zf,ft="",Nr=null,Mn=null,kn=null;function ps(){return{firstTextKey:kn,format:Nr,style:Mn}}function Yi(e){e.firstTextKey!==null&&(Nr=e.format,Mn=e.style,kn=e.firstTextKey)}function Ky(e){if(kn!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&ee(348),t===null)return;const r=pr.get(t);re(r)&&(Nr=r.getFormat(),Mn=r.getStyle(),kn=t)}let Pm,bf,yf,Do,Hy,pr,ou,Wy,eh,su,Gs=!1,hg=!1;function Za(e,t){const r=Do.get(e),n=pr.has(e);if(t!==null){const i=Xy(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(kt._keyToDOMMap.delete(e),V(r)){const i=Ng(r,Do);Gy(i,0,i.length-1,null)}if(r!==void 0){for(const i of Ni(r).values()){const o=Qy(i);Za(i,null),o!==null&&o.remove()}NS(eh,Zf,Pm,r,"destroyed")}}}function Gy(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&Za(o,n)}}function Al(e,t){e.setProperty("text-align",t)}const JY="40px";function GP(e,t){const r=Xf.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, ${JY}))`)}function JP(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 Jy(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(Rr(n))return null;const o=n.getParent();return o===null||or(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function QP(e){const t=tr().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function YP(e,t,r){t||e.contentEditable==="false"?fZ(r,kt):r.removeAttribute("contenteditable")}function HC(e,t,r){const n=ft,i=ps();ft="";let o="";const s=ut(e);for(const[a,l]of r){const u=QP(a);YP(t,s,u),t.appendChild(u),ft="";const d=ps();el(l,ho(e,u,kt)),Yi(d),XP(e,a,t,u),o+=ft}return Yi(i),ft=n,o}function Ni(e){return Xs(e)&&e.__slots!==null?e.__slots:E6}function XP(e,t,r,n){const i=su.$getSlotTargetElement(e,t,r,kt);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function Qy(e){const t=ou.get(e);return t!==void 0?t.parentElement:null}function WC(e,t,r){const n=Ni(e),i=Ni(t);for(const[d,f]of n)if(!i.has(d)){const h=Qy(f);Za(f,null),h!==null&&h.remove()}const o=ft,s=ps();let a="",l=null;const u=ut(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?Qy(h):null;ft="";const g=ps();if(p===null){p=QP(d);let m=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){m=v;break}r.insertBefore(p,m),el(f,ho(t,p,kt))}else h===f?qs(f,p):(h!==void 0&&Za(h,p),el(f,ho(t,p,kt)));if(Yi(g),YP(r,u,p),XP(t,d,r,p),a+=ft,p.parentElement===r){const m=l===null?r.firstChild:l.nextSibling;m!==p&&r.insertBefore(p,m),l=p}}return Yi(s),ft=o,a}function el(e,t){const r=pr.get(e);if(r===void 0&&ee(60),t!==null){const i=Do.get(e);if(i!==void 0){const o=ou.get(e);if(o!==void 0){const s=du(i)?i.__slotHost:null,a=du(r)?r.__slotHost:null,l=i.__parent!==r.__parent||s!==a,u=a!==null&&o.parentElement!==t.element;if(l||u)return t.insertChild(o),qs(e,t.element)}}}const n=su.$createDOM(r,kt);if((function(i,o,s){const a=s._keyToDOMMap;a6(o,s,i),a.set(i,o)})(e,n,kt),re(r)?n.setAttribute("data-lexical-text","true"):ut(r)&&(n.setAttribute("data-lexical-decorator","true"),dZ(n,{captureSelection:!0})),V(r)){const i=r.__indent,o=r.__size;Jy(n,r),i!==0&&GP(n,i);const s=Ni(r),a=s.size>0?HC(r,n,s):"";if(o===0)n.__lexicalTextContent=a,n.__lexicalFirstTextKey=null,ft+=a,s.size>0&&(n.__lexicalSlotTextLength=a.length);else{const u=ft,d=o-1;if(Yy(Ng(r,pr),r,0,d,ho(r,n,kt)),a!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=a+f,ft=u+a+f}s.size>0&&(n.__lexicalSlotTextLength=a.length)}const l=r.__format;l!==0&&JP(n,l),r.isInline()||ZP(null,r,n)}else{const i=r.getTextContent();if(ut(r)){const o=r.decorate(kt,Xf);o!==null&&eO(e,o),n.contentEditable="false";const s=Ni(r);s.size>0&&HC(r,n,s)}ft+=i}return t!==null&&t.insertChild(n),su.$decorateDOM(r,null,n,kt),WP(r),NS(eh,Zf,Pm,r,"created"),n}function Yy(e,t,r,n,i){const o=ft,s=ps();ft="",Nr=null,Mn=null,kn=null;let a=r;for(;a<=n;++a){const u=ps();el(e[a],i);const d=pr.get(e[a]);d!==null&&re(d)?Nr===null&&(Nr=d.getFormat(),Mn=d.getStyle(),kn=d.__key):V(d)&&a<n&&!d.isInline()&&(ft+=jl),Yi(u)}const l=kt._keyToDOMMap.get(t.__key);l===void 0&&ee(349,t.__key),l.__lexicalTextContent=ft,l.__lexicalFirstTextKey=kn,ft=o+ft,Yi(s)}function ZP(e,t,r){const n=ho(t,r,kt),i=n.element.__lexicalLastChildKind??null,o=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return Yn(u)?"line-break":ut(u)&&u.isInline()?"decorator":null}return Ni(s).size>0?null:"empty"}return null})(t,pr);i!==o&&n.setManagedLineBreak(o)}function QY(e,t,r){var n;Nr=null,Mn=null,kn=null,(function(i,o,s){const a=ft,l=i.__size,u=o.__size;ft="";const d=s.element,f=kt._keyToDOMMap.get(o.__key);f===void 0&&ee(351,o.__key);const h=u-l;if(!Gs&&Math.abs(h)<=1&&l>=GY&&i.__first===o.__first&&(h!==0||!kt._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,g=Wy.get(i.__key);if(!Gs&&typeof p=="string"&&g!==void 0){const m=(function(v,_){const x=_.size;if(x===0||x>=v.__size)return null;let E=v.__last,S=null,C=0;for(;E!==null&&C<x;){if(!_.has(E))return null;S=E;const k=pr.get(E);if(k===void 0)return null;E=k.__prev,C++}return C!==x||E!==null&&_.has(E)?null:S})(o,g);if(m!==null){const v=g.size;if(h===0){const _=KC(m,v);let x=m,E=0;for(;x!==null&&E<v;){const T=pr.get(x);if(T===void 0)break;const $=ps();qs(x,d),re(T)&&Nr===null&&(Nr=T.getFormat(),Mn=T.getStyle(),kn=T.__key),Yi($),x=T.__next,E++}let S="";for(x=m,E=0;x!==null&&E<v;){const T=pr.get(x);if(T===void 0)break;let $;if(V(T)){const P=kt._keyToDOMMap.get(x),M=P&&P.__lexicalTextContent;typeof M!="string"&&ee(352,T.getType()),$=M}else $=T.getTextContent();S+=$,E<v-1&&V(T)&&!T.isInline()&&(S+=jl),x=T.__next,E++}const C=f.__lexicalSlotTextLength||0,k=C>0?p.slice(C):p,N=k.slice(0,k.length-_)+S;return f.__lexicalTextContent=N,ft=a+N,void GC(o,f,g)}if((function(_,x,E,S,C,k,N,T){if(T!==1&&T!==-1||N!==(T===1?2:1))return!1;const P=N-T;let M=_.__last;for(let ve=0;ve<P-1;ve++){if(M===null)return!1;const xe=Do.get(M);if(xe===void 0)return!1;M=xe.__prev}if(M===null)return!1;const I=pr.get(k),U=Do.get(M);if(I===void 0||U===void 0||I.__prev!==U.__prev)return!1;const B=[];let q=k;for(let ve=0;ve<N;ve++){if(q===null)return!1;B.push(q);const xe=pr.get(q);q=xe?xe.__next:null}const J=[];q=M;for(let ve=0;ve<P;ve++){if(q===null)return!1;J.push(q);const xe=Do.get(q);q=xe?xe.__next:null}const Y=new Set(J),K=new Set(B),G=[];let ie=0,oe=0;for(;ie<P&&oe<N;)if(B[oe]===J[ie])G.push({key:B[oe],kind:"reconcile"}),ie++,oe++;else if(K.has(J[ie])){if(Y.has(B[oe]))return!1;G.push({key:B[oe],kind:"create",nextIndex:oe}),oe++}else G.push({key:J[ie],kind:"destroy"}),ie++;for(;ie<P;)G.push({key:J[ie++],kind:"destroy"});for(;oe<N;)G.push({key:B[oe],kind:"create",nextIndex:oe}),oe++;const _e=KC(M,P);for(const ve of G){const xe=ps();if(ve.kind==="reconcile")qs(ve.key,E.element);else if(ve.kind==="destroy")Za(ve.key,E.element);else{let pt=null;for(let ur=ve.nextIndex+1;ur<N;ur++){const It=kt._keyToDOMMap.get(B[ur]);if(It!==void 0){pt=It;break}}el(ve.key,E.withBefore(pt??E.before))}if(ve.kind!=="destroy"){const pt=pr.get(ve.key);pt&&re(pt)&&Nr===null&&(Nr=pt.getFormat(),Mn=pt.getStyle(),kn=pt.__key)}Yi(xe)}let Re="";for(let ve=0;ve<N;ve++){const xe=pr.get(B[ve]);if(xe===void 0)return!1;let pt;if(V(xe)){const ur=kt._keyToDOMMap.get(B[ve]),It=ur&&ur.__lexicalTextContent;typeof It!="string"&&ee(350,xe.getType()),pt=It}else pt=xe.getTextContent();Re+=pt,ve<N-1&&V(xe)&&!xe.isInline()&&(Re+=jl)}const Pe=S.__lexicalSlotTextLength||0,at=Pe>0?C.slice(Pe):C;return S.__lexicalTextContent=at.slice(0,at.length-_e)+Re,!0})(i,0,s,f,p,m,v,h)){const _=f.__lexicalTextContent;return typeof _!="string"&&ee(353),ft=a+_,void GC(o,f,g)}}}if(h===0){let m=i.__first,v=0;for(;m!==null;){const _=pr.get(m);if(_===void 0)break;const x=Gs||yf.has(m)||bf.has(m),E=ps();if(x)qs(m,d);else{let S,C;if(V(_)){C=ou.get(m);const k=C&&C.__lexicalTextContent;typeof k!="string"&&ee(354,_.getType()),S=k}else S=_.getTextContent();ft+=S,C!==void 0&&Ky(C)}re(_)?Nr===null&&(Nr=_.getFormat(),Mn=_.getStyle(),kn=_.__key):V(_)&&v<u-1&&!_.isInline()&&(ft+=jl),Yi(E),m=_.__next,v++}return f.__lexicalTextContent=ft,f.__lexicalFirstTextKey=kn,void(ft=a+ft)}}if(l===1&&u===1){const p=i.__first,g=o.__first;if(p===g)qs(p,d);else{const v=Xy(p),_=el(g,null);try{v.parentNode===d?d.replaceChild(_,v):s.insertChild(_)}catch(x){if(typeof x=="object"&&x!=null){const E=`${x.toString()} Parent: ${d.tagName}, new child: {tag: ${_.tagName} key: ${g}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(E)}throw x}Za(p,null)}const m=pr.get(g);re(m)&&Nr===null&&(Nr=m.getFormat(),Mn=m.getStyle(),kn=m.__key)}else{const p=Ng(i,Do),g=Ng(o,pr);if(p.length!==l&&ee(227),g.length!==u&&ee(228),l===0)u!==0&&Yy(g,o,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&Ni(o).size===0&&s.element.__lexicalLineBreak==null;Gy(p,0,l-1,m?null:d),m&&(d.textContent="")}}else(function(m,v,_,x,E,S){const C=x-1,k=E-1;let N,T,$=S.getFirstChild(),P=0,M=0;for(;P<=C&&M<=k;){const B=v[P],q=_[M],J=ps();if(B===q)$=b_(qs(q,S.element)),P++,M++;else{if(T===void 0&&(T=JC(_,M)),N===void 0)N=JC(v,P);else if(!N.has(B)){P++,Yi(J);continue}if(!T.has(B)){$=b_(Xy(B)),Za(B,S.element),P++,N.delete(B),Yi(J);continue}if(N.has(q)){const K=Vc(kt,q);K!==$&&S.withBefore($??S.before).insertChild(K),$=b_(qs(q,S.element)),P++,M++}else el(q,S.withBefore($??S.before)),M++}const Y=pr.get(q);Y!==null&&re(Y)?Nr===null&&(Nr=Y.getFormat(),Mn=Y.getStyle(),kn=Y.__key):V(Y)&&M<=k&&!Y.isInline()&&(ft+=jl),Yi(J)}const I=P>C,U=M>k;if(I&&!U){const B=_[k+1],q=B===void 0?null:kt.getElementByKey(B);Yy(_,m,M,k,S.withBefore(q??S.before))}else U&&!I&&Gy(v,P,C,S.element)})(o,p,g,l,u,s)}f.__lexicalTextContent=ft,f.__lexicalFirstTextKey=kn,ft=a+ft})(e,t,ho(t,r,kt)),or(t)||(n=t,Nr==null||Nr===n.__textFormat||hg||n.setTextFormat(Nr),(function(i){Mn==null||Mn===i.__textStyle||hg||i.setTextStyle(Mn)})(t))}function GC(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const s=pr.get(o);if(s===void 0){o=null;break}if(s.__parent===i)break;o=s.__parent}if(o!==null&&!r.has(o)){const s=pr.get(n);if(re(s))return Nr=s.getFormat(),void(Mn=s.getStyle())}}t.__lexicalFirstTextKey=kn}function qs(e,t){const r=Do.get(e);let n=pr.get(e);r!==void 0&&n!==void 0||ee(61);const i=Gs||yf.has(e)||bf.has(e),o=Vc(kt,e);if(r===n&&!i){let s;if(V(r)){const a=o.__lexicalTextContent;typeof a!="string"&&ee(355,r.getType()),s=a,Ky(o)}else s=r.getTextContent();return ft+=s,o}if(r!==n&&i&&NS(eh,Zf,Pm,n,"updated"),su.$updateDOM(n,r,o,kt)){const s=el(e,null);return t===null&&ee(62),t.replaceChild(s,o),Za(e,null),s}if(V(r)){V(n)||ee(334,e);const s=n.__indent;(Gs||s!==r.__indent)&&GP(o,s);const a=n.__format;(Gs||a!==r.__format)&&JP(o,a);const l=i&&(Ni(n).size>0||Ni(r).size>0)?WC(r,n,o):"";if(i){const u=ft;if(QY(r,n,o),Rr(n)||n.isInline()||ZP(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,ft=u+l+d,o.__lexicalSlotTextLength=l.length}else(Ni(n).size>0||Ni(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&ee(356,r.getType()),ft+=u,Ky(o)}if((Gs||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(Jy(o,n),Rr(n)&&!Gs))for(const u of n.getChildren())V(u)&&Jy(Vc(kt,u.getKey()),u)}else{const s=n.getTextContent();if(ut(n)){const a=n.decorate(kt,Xf);a!==null&&eO(e,a),i&&(Ni(n).size>0||Ni(r).size>0)&&WC(r,n,o)}ft+=s}if(!hg&&Rr(n)){const s=n.getLatest();if(s.__cachedText!==ft){const a=s.getWritable();a.__cachedText=ft,n=a}}return su.$decorateDOM(n,r,o,kt),WP(n),o}function eO(e,t){let r=kt._pendingDecorators;const n=kt._decorators;if(r===null){if(n[e]===t)return;r=l6(kt)}r[e]=t}function b_(e){let t=e.nextSibling;return t!==null&&t===kt._blockCursorElement&&(t=t.nextSibling),t}function JC(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function YY(e,t,r,n,i,o){ft="",Nr=null,Mn=null,kn=null,Gs=n===2,kt=r,Xf=r._config,su=r._config.dom||kg,Zf=r._nodes,Pm=kt._listeners.mutation,bf=i,yf=o,Do=e._nodeMap,Hy=e,pr=t._nodeMap,hg=t._readOnly,ou=zP(r._keyToDOMMap),Wy=(function(){const a=new Map,l=u=>{for(const d of u){const f=pr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=a.get(h);p===void 0&&(p=new Set,a.set(h,p)),p.add(d)}};return l(bf.keys()),l(yf),a})();const s=new Map;return eh=s,qs("root",null),kt=void 0,Zf=void 0,bf=void 0,yf=void 0,Do=void 0,Hy=void 0,pr=void 0,Xf=void 0,ou=void 0,Wy=void 0,eh=void 0,su=kg,s}function Xy(e){const t=ou.get(e);return t===void 0&&ee(75,e),t}function je(e){return{type:e}}const tO=je("SELECTION_CHANGE_COMMAND"),XY=je("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),rO=je("CLICK_COMMAND"),nO=je("BEFORE_INPUT_COMMAND"),iO=je("INPUT_COMMAND"),oO=je("COMPOSITION_START_COMMAND"),sO=je("COMPOSITION_END_COMMAND"),Kl=je("DELETE_CHARACTER_COMMAND"),Ec=je("INSERT_LINE_BREAK_COMMAND"),th=je("INSERT_PARAGRAPH_COMMAND"),wc=je("CONTROLLED_TEXT_INSERTION_COMMAND"),pS=je("PASTE_COMMAND"),P0=je("REMOVE_TEXT_COMMAND"),rh=je("DELETE_WORD_COMMAND"),nh=je("DELETE_LINE_COMMAND"),Fo=je("FORMAT_TEXT_COMMAND"),ZY=je("SET_TEXT_FORMAT_COMMAND"),Om=je("UNDO_COMMAND"),Mm=je("REDO_COMMAND"),aO=je("KEYDOWN_COMMAND"),lO=je("KEY_ARROW_RIGHT_COMMAND"),uO=je("MOVE_TO_END"),cO=je("KEY_ARROW_LEFT_COMMAND"),dO=je("MOVE_TO_START"),fO=je("KEY_ARROW_UP_COMMAND"),hO=je("KEY_ARROW_DOWN_COMMAND"),ih=je("KEY_ENTER_COMMAND"),pO=je("KEY_SPACE_COMMAND"),gS=je("KEY_BACKSPACE_COMMAND"),gO=je("KEY_ESCAPE_COMMAND"),mO=je("KEY_DELETE_COMMAND"),vO=je("KEY_TAB_COMMAND"),eX=je("INSERT_TAB_COMMAND"),tX=je("INDENT_CONTENT_COMMAND"),QC=je("OUTDENT_CONTENT_COMMAND"),_O=je("DROP_COMMAND"),rX=je("FORMAT_ELEMENT_COMMAND"),bO=je("DRAGSTART_COMMAND"),yO=je("DRAGOVER_COMMAND"),nX=je("DRAGEND_COMMAND"),Lm=je("COPY_COMMAND"),mS=je("CUT_COMMAND"),xO=je("SELECT_ALL_COMMAND"),iX=je("CLEAR_EDITOR_COMMAND"),oX=je("CLEAR_HISTORY_COMMAND"),Tp=je("CAN_REDO_COMMAND"),Np=je("CAN_UNDO_COMMAND"),sX=je("FOCUS_COMMAND"),aX=je("BLUR_COMMAND"),lX=je("KEY_MODIFIER_COMMAND");function uX(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 s=t.get(r);s&&s.holders.delete(o)&&s.holders.size===0&&(t.delete(r),s.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 Os=Object.freeze({}),Zy=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&oh(r),!t.isComposing()&&be(t,aO,e)}],["pointerdown",function(e,t){const r=v6(e),n=e.pointerType;gd(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&so(t,()=>{Tg(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){be(t,oO,e)}],["compositionend",function(e,t){const r=t._inputState;sl?r.compositionPhase="ending-firefox":al||!Bh&&!jh?be(t,sO,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;oh(r),so(t,()=>{kO(e,t)||t.dispatchCommand(iO,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){so(t,()=>{const r=he(),n=Zn(xi(t)),i=ud();if(n){if(te(r)){const o=r.anchor,s=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!Rr(s)&&Wr().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=fo(n,t._rootElement).anchorNode;(Ze(o)||yi(o))&&vn(bS(i,n,t,e))}}be(t,rO,e)})}],["cut",Os],["copy",Os],["dragstart",Os],["dragover",Os],["dragend",Os],["paste",Os],["focus",Os],["blur",Os],["drop",Os]];Uc&&Zy.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||sl&&f6(n)||i!=="insertCompositionText"&&so(n,()=>{kO(r,n)||be(n,nO,r)},{event:r})})(e,t)]);const e1=new WeakMap,pg=new WeakMap,dX=uX(e=>(e.addEventListener("selectionchange",tR),()=>e.removeEventListener("selectionchange",tR)));function SO(e,t,r,n,i,o){const s=e.anchor,a=e.focus,l=s.getNode(),u=Ft();let d;if(o!==void 0)d=o;else{const m=Zn(xi(u));d=m!==null?fo(m,u._rootElement):null}const f=d!==null?d.anchorNode:null,h=s.key,p=u.getElementByKey(h),g=r.length;return h!==a.key||!re(l)||(!i&&(!Uc||u._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&g<2||u6(r))&&s.offset!==a.offset&&!l.isComposing()||Di(l)||l.isDirty()&&g>1||(i||!Uc)&&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(m,v){if(v.isSegmented())return!0;if(!m.isCollapsed())return!1;const _=m.anchor.offset,x=v.getParentOrThrow(),E=Hl(v);return _===0?!v.canInsertTextBefore()||!x.canInsertTextBefore()&&!v.isComposing()||E||(function(S){const C=S.getPreviousSibling();return(re(C)||V(C)&&C.isInline())&&!C.canInsertTextAfter()})(v):_===v.getTextContentSize()&&(!v.canInsertTextAfter()||!x.canInsertTextAfter()&&!v.isComposing()||E)})(e,l)}function YC(e,t){return yi(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function XC(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:s}=fo(e,t._rootElement),a=t._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,YC(n,i)&&YC(o,s)&&!a.postDeleteSelectionToRestore)||so(t,()=>{if(!r)return void vn(null);if(!Hh(t,n,o))return;let l=he();if(a.postDeleteSelectionToRestore&&te(l)&&l.isCollapsed()){const u=l.anchor,d=a.postDeleteSelectionToRestore.anchor;(u.key===d.key&&u.offset===d.offset+1||u.offset===1&&d.getNode().is(u.getNode().getPreviousSibling()))&&(l=a.postDeleteSelectionToRestore.clone(),vn(l))}if(a.postDeleteSelectionToRestore=null,te(l)){const u=l.anchor,d=u.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=xi(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:g,offset:m,key:v,timeStamp:_}=a.collapsedSelectionFormat,x=Wr(),E=t.isComposing()===!1&&x.getTextContent()==="";if(h<_+200&&u.offset===m&&u.key===v)O0(l,p,g);else if(u.type==="text")re(d)||ee(141),EO(l,d);else if(u.type==="element"&&!E){V(d)||ee(259);const S=u.getNode();S.isEmpty()?(function(C,k){const N=k.getTextFormat(),T=k.getTextStyle();O0(C,N,T)})(l,S):O0(l,l.format,"")}}else{const f=u.key,h=l.focus.key,p=l.getNodes(),g=p.length,m=l.isBackward(),v=m?s:i,_=m?i:s,x=m?h:f,E=m?f:h;let S=2047,C=!1;for(let k=0;k<g;k++){const N=p[k],T=N.getTextContentSize();if(re(N)&&T!==0&&!(k===0&&N.__key===x&&v===T||k===g-1&&N.__key===E&&_===0)&&(C=!0,S&=N.getFormat(),S===0))break}l.format=C?S:0}}be(t,tO,void 0)})}function O0(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function EO(e,t){O0(e,t.getFormat(),t.getStyle())}function wO(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function ZC(e){const{lastKeyCode:t}=Ft()._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(!re(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const s=i.getNextSibling();if(r===`
|
|
21
|
+
`){if(Yn(s))s.selectEnd();else if(!s){const a=Jt(i,Bc),l=a&&a.getNextSibling();V(l)&&l.selectStart()}}else r===" "?au(s)&&s.selectEnd():re(s)&&s.getTextContent()[0]===r&&s.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function oh(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function eR(e){oh(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>oh(e),0)}function kO(e,t){const r=v6(e);if(Ze(r)&&Tg(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=lh(n.ownerDocument);return i!==null&&n.contains(i)&&Tg(i,t)}function fX(e){const t=e.inputType,r=wO(e),n=Ft(),i=n._inputState,o=he();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(oh(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=ud();if(!te(f))return!0;vn(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(ln(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{so(n,()=>{ln(null)})},30),te(o)){const h=o.anchor.getNode();h.markDirty(),re(h)||ee(142),EO(o,h)}}else{if(ln(null),al&&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(),g=h.canInsertTextAfter(),m=o.anchor.offset===0&&o.focus.offset===p.length;let v=cg&&f&&!m&&g;if(v&&o.isCollapsed()&&(v=!ut(QX(o.anchor,!0))),!v){be(n,Kl,!0);const _=he();cg&&te(_)&&_.isCollapsed()&&(i.postDeleteSelectionToRestore=_,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!te(o))return!0;const s=e.data;i.unprocessedBeforeInputData!==null&&AS(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Rr(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const a=o.anchor,l=o.focus,u=a.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(s===`
|
|
22
|
+
`)e.preventDefault(),be(n,Ec,!1);else if(s===jl)e.preventDefault(),be(n,th,void 0);else if(s==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else s!=null&&SO(o,r,s,e.timeStamp,!0)?(e.preventDefault(),be(n,wc,s),ZC(s)):i.unprocessedBeforeInputData=s;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":be(n,wc,e),ZC((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;ln(null),f||be(n,wc,e),M0(h);break}case"insertLineBreak":ln(null),be(n,Ec,!1);break;case"insertParagraph":ln(null),i.isInsertLineBreak&&!al?(i.isInsertLineBreak=!1,be(n,Ec,!1)):be(n,th,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":be(n,pS,e);break;case"deleteByComposition":(function(f,h){return f!==h||V(f)||V(h)||!Hl(f)||!Hl(h)})(u,d)&&be(n,P0,e);break;case"deleteByDrag":cu(r1),be(n,P0,e);break;case"deleteByCut":be(n,P0,e);break;case"deleteContent":be(n,Kl,!1);break;case"deleteWordBackward":be(n,rh,!0);break;case"deleteWordForward":be(n,rh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":be(n,nh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":be(n,nh,!1);break;case"formatStrikeThrough":be(n,Fo,"strikethrough");break;case"formatBold":be(n,Fo,"bold");break;case"formatItalic":be(n,Fo,"italic");break;case"formatUnderline":be(n,Fo,"underline");break;case"historyUndo":be(n,Om,void 0);break;case"historyRedo":be(n,Mm,void 0)}return!0}function hX(e){const t=Ft(),r=t._inputState,n=he(),i=e.data,o=wO(e);let s=!1;if(i!=null&&te(n)){const a=Zn(xi(t)),l=a!==null?fo(a,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()&&re(d)&&Di(d);if(!u&&!f&&SO(n,o,i,e.timeStamp,!1,l)){if(s=!0,r.compositionPhase==="ending-firefox"){const _=gg(t,i);if(r.compositionPhase="idle",_)return cu(sh),CR(),!0}const h=n.anchor.getNode();if(a===null||l===null)return!0;const p=n.isBackward(),g=p?n.anchor.offset:n.focus.offset,m=p?n.focus.offset:n.anchor.offset;Uc&&!n.isCollapsed()&&re(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,g)+i+h.getTextContent().slice(g+m)===d6(l.anchorNode)||be(t,wc,i);const v=i.length;sl&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),cg&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,ln(null))}}return s||(AS(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(gg(t,i||void 0),cu(sh),r.compositionPhase="idle")),CR(),!0}function pX(e){const t=Ft(),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(ln(i.key),cu(FO),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!cg&&(o.getFormat()!==n.format||re(o)&&o.getStyle()!==n.style)||re(o)&&(Di(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){be(t,wc,fS);const s=he();te(s)&&ln(s.anchor.key)}}return!0}function gX(e){const t=Ft();return t._inputState.compositionPhase="idle",gg(t,e.data),cu(sh),!0}function M0(e){if(e===null)return;const t=er(e);if(!re(t)||t.getType()==="text"||Di(t)||!t.isAttached())return;const r=he(),n=te(r)&&r.anchor.key===e?r.anchor.offset:null,i=Cr(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 gg(e,t){const r=e._compositionKey;if(ln(null),r!==null&&t!=null){if(t===""){const i=er(r),o=e.getElementByKey(r),s=o!==null&&re(i)?tl(i,o,e):null;if(s!==null&&s.nodeValue!==null&&re(i)){const a=Zn(xi(e)),l=a&&fo(a,e._rootElement);let u=null,d=null;l!==null&&l.anchorNode===s&&(u=l.anchorOffset,d=l.focusOffset),TS(i,s.nodeValue,u,d,!0)}return M0(r),!1}if(t[t.length-1]===`
|
|
23
|
+
`){const i=he();if(te(i)||Yt(i)){if(te(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return be(e,ih,null),M0(r),!1}}const n=er(r);if(n!==null&&re(n)&&Di(n)){n.markDirty();const i=he(),o=n.getTextContentSize(),s=te(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(s,s).insertText(t),!0}}return AS(!0,e,t),M0(r),!1}function mX(e){const t=Ft(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=AR(e);if(n&&so(t,()=>{gg(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return Ht(n,"ArrowRight",{shiftKey:"any"})})(e))be(t,lO,e);else if((function(n){return Ht(n,"ArrowRight",{...Ls,shiftKey:"any"})})(e))be(t,uO,e);else if((function(n){return Ht(n,"ArrowLeft",{shiftKey:"any"})})(e))be(t,cO,e);else if((function(n){return Ht(n,"ArrowLeft",{...Ls,shiftKey:"any"})})(e))be(t,dO,e);else if((function(n){return Ht(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))be(t,fO,e);else if((function(n){return Ht(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))be(t,hO,e);else if((function(n){return Ht(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,be(t,ih,e);else if((function(n){return n.key===" "})(e))be(t,pO,e);else if((function(n){return Ro&&Ht(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,be(t,Ec,!0);else if((function(n){return Ht(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,be(t,ih,e);else if((function(n){return Ht(n,"Backspace",{shiftKey:"any"})||Ro&&Ht(n,"h",{ctrlKey:!0})})(e))AR(e)?be(t,gS,e)&&eR(r):(e.preventDefault(),be(t,Kl,!0));else if((function(n){return n.key==="Escape"})(e))be(t,gO,e);else if((function(n){return Ht(n,"Delete",{})||Ro&&Ht(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?be(t,mO,e):(e.preventDefault(),be(t,Kl,!1));else if((function(n){return Ht(n,"Backspace",RR)})(e))e.preventDefault(),be(t,rh,!0);else if((function(n){return Ht(n,"Delete",RR)})(e))e.preventDefault(),be(t,rh,!1);else if((function(n){return Ro&&Ht(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),be(t,nh,!0);else if((function(n){return Ro&&(Ht(n,"Delete",{metaKey:!0})||Ht(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),be(t,nh,!1);else if((function(n){return Ht(n,"b",Ls)})(e))e.preventDefault(),be(t,Fo,"bold");else if((function(n){return Ht(n,"u",Ls)})(e))e.preventDefault(),be(t,Fo,"underline");else if((function(n){return Ht(n,"i",Ls)})(e))e.preventDefault(),be(t,Fo,"italic");else if((function(n){return Ht(n,"Tab",{shiftKey:"any"})})(e))be(t,vO,e);else if((function(n){return Ht(n,"z",Ls)})(e))e.preventDefault(),be(t,Om,void 0);else if((function(n){return Ro?Ht(n,"z",{metaKey:!0,shiftKey:!0}):Ht(n,"y",{ctrlKey:!0})||Ht(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),be(t,Mm,void 0);else{const n=t._editorState._selection;(function(i){return Ht(i,"a",Ls)})(e)?(e.preventDefault(),be(t,xO,e)&&eR(r)):n===null||te(n)||((function(i){return Ht(i,"c",Ls)})(e)?(e.preventDefault(),be(t,Lm,e)):(function(i){return Ht(i,"x",Ls)})(e)&&(e.preventDefault(),be(t,mS,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(lX,e),!0}function CO(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const kc=new Map;function tR(e){const t=eZ(e.target);if(t===null)return;const r=$S(e.target);let n=null,i=null;const o=r!==null?pg.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&&la(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,g=null;for(const m of f){const v=m._rootElement;if(v===null)continue;const _=fo(t,v).anchorNode;if(_!==null&&Rc(_)===m){if(la(v.getRootNode())){n=m,i=_;break}p===null&&(p=m,g=_)}}n===null&&p!==null&&(n=p,i=g)}else{const p=t.anchorNode;p===null||Ze(p)&&p.shadowRoot!==null||(n=Rc(p),n!==null&&(i=p))}}if(n===null){const f=lh(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=ud(),h=i??fo(t,n._rootElement).anchorNode;(Ze(h)||yi(h))&&vn(bS(f,t,n,e))})}const s=RS(n),a=s[s.length-1],l=a._key,u=kc.get(l),d=u||a;d!==n&&XC(t,d,!1),XC(t,n,!0),n!==a?kc.set(l,n):u&&kc.delete(l)}function rR(e){e._lexicalHandled=!0}function nR(e){return e._lexicalHandled===!0}function vX(e){const t=e1.get(e);if(t===void 0)return;const r=pg.get(t);if(r===void 0)return;e1.delete(e);const n=Wh(e);Bm(n)?((function(o){if(o._parentEditor!==null){const s=RS(o),a=s[s.length-1]._key;kc.get(a)===o&&kc.delete(a)}else kc.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&ee(198);const i=CO(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function t1(e,t,r){an();const n=e.__key,i=e.getParent();if(i===null)return void(Nn(e)!==null&&ee(367,n,String(Nn(e))));const o=(function(a){const l=he();if(!te(l)||!V(a))return l;const{anchor:u,focus:d}=l,f=u.getNode(),h=d.getNode();return Kc(f,a)&&u.set(a.__key,0,"element"),Kc(h,a)&&d.set(a.__key,0,"element"),l})(e);let s=!1;if(te(o)&&t){const a=o.anchor,l=o.focus;a.key===n&&(yg(a,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),l.key===n&&(yg(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else Yt(o)&&t&&e.isSelected()&&e.selectPrevious();if(te(o)&&t&&!s){const a=e.getIndexWithinParent();Js(e),Ll(o,i,a,-1)}else Js(e);r||or(i)||i.canBeEmpty()||!i.isEmpty()||t1(i,t),t&&o&&Rr(i)&&i.isEmpty()&&i.selectEnd()}const RO=Symbol.for("ephemeral");function mg(e){return e[RO]||!1}const iR={configurable:!0,enumerable:!1,value:void 0,writable:!0};class Mi{__type;__key;__parent;__prev;__next;__state;[Yf];static getType(){const{ownNodeType:t}=FS(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||S6(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",iR),Object.defineProperty(this,Yf,iR),o6(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=er(t);if(r===null)break;t=r.__parent!==null?r.__parent:Nn(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(re(this))return n;if(te(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(ut(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:er(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(or(r)||Nn(t)!==null)return V(t)||t===this&&ut(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:er(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:er(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?f1(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=f1(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?A6(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&ee(279),!1)))}isParentOf(t){return Kc(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const s=o.__key;if(i.has(s)||(i.add(s),n.push(o)),o===t)break;const a=V(o)?r?o.getFirstChild():o.getLastChild():null;if(a!==null){o=a;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=Ft()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(mg(this))return this;const t=er(this.__key);return t===null&&ee(113),t}getWritable(){if(mg(this))return this;an();const t=_a(),r=Ft(),n=t._nodeMap,i=this.__key,o=this.getLatest(),s=r._cloneNotNeeded,a=he();if(a!==null&&a.setCachedNodes(null),s.has(i))return Cg(o),o;const l=b6(o);return s.add(i),Cg(l),n.set(i,l),l}getTextContent(){return w6(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){ee(70)}updateDOM(t,r,n){ee(71)}getDOMSlot(t){return new OP(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 s=o;for(const a of HP(i).flatKeys)a in n&&(s!==void 0&&s!==o||(s={...o}),s[a]=n[a]);return(i.__state||s)&&KP(r).updateFromJSON(s),i})(this,t)}static transform(){return null}remove(t){t1(this,!0,t)}replace(t,r){an();let n=he();n!==null&&(n=n.clone()),A_(this,t);const i=this.getLatest(),o=this.__key,s=t.__key,a=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,d=a.getParent(),f=d!==null?a.getIndexWithinParent():-1;Js(a),d!==null&&te(n)&&Ll(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),g=i.__prev,m=i.__next,v=i.__parent;t1(i,!1,!0),h===null?l.__first=s:h.getWritable().__next=s,a.__prev=g,p===null?l.__last=s:p.getWritable().__prev=s,a.__next=m,a.__parent=v,l.__size=u;let _=0;r&&(V(this)&&V(a)||ee(139),_=a.getChildrenSize(),a.splice(_,0,this.getChildren()));const x=ao(this);if(x.length>0){Xs(this)&&Xs(a)||ee(368,this.__key,a.__key);for(const E of x){const S=fu(this,E);S!==null&&(_Z(this,E),k6(a,E,S))}}if(te(n)){vn(n);const E=n.anchor,S=n.focus;E.key===o&&(r&&E.type==="element"?E.set(a.__key,_+E.offset,"element"):lR(E,a)),S.key===o&&(r&&S.type==="element"?S.set(a.__key,_+S.offset,"element"):lR(S,a))}return Qs()===o&&ln(s),a}insertAfter(t,r=!0){an(),A_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),s=he();let a=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(te(s)){const g=o.__key,m=s.anchor,v=s.focus;a=m.type==="element"&&m.key===g&&m.offset===p+1,l=v.type==="element"&&v.key===g&&v.offset===p+1}Js(i),r&&te(s)&&Ll(s,o,p,-1)}else Js(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(s)){const p=this.getIndexWithinParent();Ll(s,d,p+1);const g=d.__key;a&&s.anchor.set(g,p+2,"element"),l&&s.focus.set(g,p+2,"element")}return t}insertBefore(t,r=!0){an(),A_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,s=he(),a=i.getParent(),l=a!==null?i.getIndexWithinParent():-1;Js(i),a!==null&&r&&te(s)&&Ll(s,a,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(s)&&Ll(s,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return Lt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){an();const n=Io(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(!re(i)){const s=i.getIndexWithinParent()+1;return o.select(s,s)}return i.select(t,r)}selectNext(t,r){an();const n=Io(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(!re(i)){const s=i.getIndexWithinParent();return o.select(s,s)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function AO(e){return e instanceof Mi}const vg="historic",TO="history-push",xf="history-merge",NO="paste",$O="cut",DO="collaboration",_X="skip-scroll-into-view",bX="skip-dom-selection",r1="skip-selection-focus",FO="composition-start",sh="composition-end",yX="!important";function _g(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,s=!1,a=!1,l=0;const u=e.length;let d=-1;for(let p=0;p<u;p++){const g=e[p];if(o)g==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(s)d===-1&&(d=p),s=!1;else if(i===null)if(g!=="/"||e[p+1]!=="*")if(g!=='"'&&g!=="'")if(g!=="(")if(g!==")")if(a||g!==":"||l!==0){if(g===";"&&l===0){d!==-1&&(a?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const m=r.trim(),v=n.trim();m!==""&&v!==""&&(t[m]=v),r="",n="",a=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),a=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=g;else d!==-1&&(a?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),g==="\\"?s=!0:g===i&&(i=null)}d!==-1&&(a?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 xX(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===yX?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function Cc(e,t,r=""){if(t===r)return;const n=_g(r),i=_g(t);for(const o in i)delete n[o],xX(e,o,i[o]);for(const o in n)e.removeProperty(o)}function y_(e,t){return 16&t?"code":t&dS?"mark":32&t?"sub":64&t?"sup":null}function x_(e,t){return 1&t?"strong":2&t?"em":"span"}function IO(e,t,r,n,i){const o=n.classList;let s=Ac(i,"base");s!==void 0&&o.add(...s),s=Ac(i,"underlineStrikethrough");let a=!1;const l=8&t&&4&t;s!==void 0&&(8&r&&4&r?(a=!0,l||o.add(...s)):l&&o.remove(...s));for(const u in aa){const d=aa[u];if(s=Ac(i,u),s!==void 0)if(r&d){if(a&&(u==="underline"||u==="strikethrough")){t&d&&o.remove(...s);continue}((t&d)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...s)}else t&d&&o.remove(...s)}}function PO(e,t,r){const n=r.isComposing(),i=e+(n?Qf:""),o=yr(),s=qm(o).$getDOMSlot(r,t,o),a=s.getFirstChild();if(a===null||a.nodeType!==Node.TEXT_NODE)return void s.insertChild(tr().createTextNode(i));const l=a,u=l.nodeValue;if(u!==i)if(n||sl){const[d,f,h]=(function(p,g){const m=p.length,v=g.length;let _=0,x=0;for(;_<m&&_<v&&p[_]===g[_];)_++;for(;x+_<m&&x+_<v&&p[m-x-1]===g[v-x-1];)x++;return[_,m-_-x,g.slice(_,v-x)]})(u,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function oR(e,t,r,n,i,o){PO(i,e,t);const s=o.theme.text;s!==void 0&&IO(0,0,n,e,s)}function $p(e,t){const r=tr().createElement(t);return r.appendChild(e),r}function n1(e){return e!=null&&e.__isInlineFormattable===!0}class va extends Mi{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new va(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 LY[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Qs()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=aa[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),s=i===null?o:i,a=tr().createElement(s);let l=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),i!==null&&(l=tr().createElement(o),a.appendChild(l)),oR(l,this,0,n,this.__text,t);const u=this.__style;return u!==""&&Cc(a.style,u),a}updateDOM(t,r,n){const i=this.__text,o=t.__format,s=this.__format,a=y_(0,o),l=y_(0,s),u=x_(0,o),d=x_(0,s);if((a===null?u:a)!==(l===null?d:l))return!0;if(a===l&&u!==d){const m=r.firstChild;m==null&&ee(48);const v=tr().createElement(d);return oR(v,this,0,s,i,n),r.replaceChild(v,m),!1}let f=r;l!==null&&a!==null&&(f=r.firstChild,f==null&&ee(49)),PO(i,f,this);const h=n.theme.text;h!==void 0&&o!==s&&IO(0,o,s,f,h);const p=t.__style,g=this.__style;return p!==g&&Cc(r.style,g,p),!1}static importDOM(){return{"#text":()=>({conversion:kX,priority:0}),b:()=>({conversion:EX,priority:0}),code:()=>({conversion:Ms,priority:0}),em:()=>({conversion:Ms,priority:0}),i:()=>({conversion:Ms,priority:0}),mark:()=>({conversion:Ms,priority:0}),s:()=>({conversion:Ms,priority:0}),span:()=>({conversion:SX,priority:0}),strong:()=>({conversion:Ms,priority:0}),sub:()=>({conversion:Ms,priority:0}),sup:()=>({conversion:Ms,priority:0}),u:()=>({conversion:Ms,priority:0})}}static importJSON(t){return Cr().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 Ze(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=$p(r,"b")),this.hasFormat("italic")&&(r=$p(r,"i")),this.hasFormat("strikethrough")&&(r=$p(r,"s")),this.hasFormat("underline")&&(r=$p(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"?aa[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?PY[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=MY[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){an();let n=t,i=r;const o=he(),s=this.getTextContent(),a=this.__key;if(typeof s=="string"){const l=s.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!te(o))return HO(a,n,a,i,"text","text");{const l=Qs();l!==o.anchor.key&&l!==o.focus.key||ln(a),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(),s=o.__text,a=n.length;let l=t;l<0&&(l=a+l,l<0&&(l=0));const u=he();if(i&&te(u)){const f=t+a;u.setTextNodeRange(o,f,o,f)}const d=s.slice(0,l)+n+s.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){an();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=Qs(),s=n.length;t.sort((T,$)=>T-$),t.push(s);const a=[],l=t.length;for(let T=0,$=0;T<s&&$<=l;$++){const P=t[$];P>T&&(a.push(n.slice(T,P)),T=P)}const u=a.length;if(u===1)return[r];const d=a[0],f=r.getParent();let h;const p=r.getFormat(),g=r.getStyle(),m=r.__detail;let v=!1,_=null,x=null;const E=he();if(te(E)){const[T,$]=E.isBackward()?[E.focus,E.anchor]:[E.anchor,E.focus];T.type==="text"&&T.key===i&&(_=T),$.type==="text"&&$.key===i&&(x=$)}r.isSegmented()?(h=Cr(d),h.__format=p,h.__style=g,h.__detail=m,h.__state=UC(r,h),v=!0):h=r.setTextContent(d);const S=[h];for(let T=1;T<u;T++){const $=Cr(a[T]);$.__format=p,$.__style=g,$.__detail=m,$.__state=UC(r,$);const P=$.__key;o===i&&ln(P),S.push($)}const C=_?_.offset:null,k=x?x.offset:null;let N=0;for(const T of S){if(!_&&!x)break;const $=N+T.getTextContentSize();if(_!==null&&C!==null&&C<=$&&C>=N&&(_.set(T.getKey(),C-N,"text"),C<$&&(_=null)),x!==null&&k!==null&&k<=$&&k>=N){x.set(T.getKey(),k-N,"text");break}N=$}if(f!==null){(function(P){const M=P.getPreviousSibling(),I=P.getNextSibling();M!==null&&Cg(M),I!==null&&Cg(I)})(this);const T=f.getWritable(),$=this.getIndexWithinParent();v?(T.splice($,0,S),this.remove()):T.splice($,1,S),te(E)&&Ll(E,f,$,u-1)}return S}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||ee(50);const n=this.__key,i=t.__key,o=this.__text,s=o.length;Qs()===i&&ln(n);const a=he();if(te(a)){const f=a.anchor,h=a.focus;f!==null&&f.key===i&&gR(f,r,n,t,s),h!==null&&h.key===i&&gR(h,r,n,t,s)}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 SX(e){return{forChild:vS(e.style),node:null}}function EX(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:vS(t.style,r?void 0:"bold"),node:null}}const sR=new WeakMap;function wX(e){if(!Ze(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function kX(e){const t=e;e.parentElement===null&&ee(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const s=[n];for(;o!==null&&(i=sR.get(o))===void 0&&!wX(o);)s.push(o),o=o.parentNode;const a=i===void 0?o:i;for(let l=0;l<s.length;l++)sR.set(s[l],a);return a})(t)!==null)return{node:ah(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=aR(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=aR(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:Cr(r)}}function aR(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,Ze(r)){const o=r.style.display;if(o===""&&!Ag(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(yi(r))return r;if(r.nodeName==="BR")return null}}const CX={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ms(e){const t=CX[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:vS(e.style,t),node:null}}function Cr(e=""){return Jo(new va(e))}function re(e){return e instanceof va}function vS(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),s=e.fontStyle==="italic",a=n.includes("underline"),l=e.verticalAlign;return u=>((re(u)||n1(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!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 ad extends va{static getType(){return"tab"}static clone(t){return new ad(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 ld().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 ld(){return Jo(new ad)}function au(e){return e instanceof ad}class RX{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:ch(Fi(fi(this,"next")),Fi(fi(t,"next")))<0}getNode(){const t=er(this.key);return t===null&&ee(20),t}set(t,r,n,i){const o=this._selection,s=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,jc()||(Qs()===s&&ln(t),o!==null&&(o.setCachedNodes(null),te(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function Es(e,t,r){return new RX(e,t,r)}function S_(e,t){let r=t.__key,n=e.offset,i="element";if(re(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!V(t)){const o=t.getNextSibling();if(re(o))r=o.__key,n=0,i="text";else{const s=t.getParent();s&&(r=s.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function lR(e,t){if(V(t)){const r=t.getLastDescendant();V(r)||re(r)?S_(e,r):S_(e,t)}else S_(e,t)}class zm{_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(!Yt(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 zm(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(s=>Nn(s)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(re(i))o=i.select();else{const s=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(s,s)}o.insertNodes(t);for(let s=0;s<n;s++)r[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=er(i);o!==null&&n.push(o)}return jc()||(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=>Nn(r)===null);if((he()||ud())===this&&t[0]){const r=Dt(t[0],"next");dh(Oo(r,r))}for(const r of t)r.remove();OO()}}function OO(){const e=Wr();if(e.isEmpty()){const t=Lt();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,s]=n.getTextSlices();o&&i.push(o.caret.origin);const a=new Set,l=new Set;for(const u of n)if(uo(u)){const{origin:d}=u;i.length===0?a.add(d):(l.add(d),i.push(d))}else{const{origin:d}=u;V(d)&&l.has(d)||i.push(d)}if(s&&i.push(s.caret.origin),ll(n.focus)&&V(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let u=po(n.focus.origin,"previous");uo(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=MS(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!V(u)||l.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&n.isCollapsed()){const u=Fi(n.anchor),d=Fi(n.anchor.getFlipped()),f=p=>lo(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(n.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(US(h1(this),"next"));return jc()||(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,s=i.isBefore(o),[a,l]=i1(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 g of ao(h)){const m=fu(h,g);m!==null&&(p+=m.getTextContent())}p!==""?(u+=p,d=!1):d=!h.isEmpty()}else if(d=!1,re(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=a<l?p.slice(a,l):p.slice(l,a)):p=s?p.slice(a):p.slice(l):h===n&&(p=s?p.slice(0,l):p.slice(0,a)),u+=p}else!ut(h)&&!Yn(h)||h===n&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const r=Ft(),n=r.getEditorState()._selection,i=KO(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,s,a]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(s.key,s.offset,s.type,!0),a&&(this.dirty=!0),Va(this)}clone(){const t=this.anchor,r=this.focus;return new ku(Es(t.key,t.offset,t.type),Es(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=aa[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(ah(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let s=r,a=n;!this.isCollapsed()&&n.isBefore(r)&&(s=n,a=r),s.type==="element"&&(function(v,_,x,E){const S=v.getNode(),C=S.getChildAtIndex(v.offset),k=Cr();if(k.setFormat(x),k.setStyle(E),hd(C))C.splice(0,0,[k]);else if(C!==null){const N=or(S)?Lt().append(k):k;C.insertBefore(N)}else if(or(S)){const N=S.getLastChild();V(N)&&!N.isInline()&&N.isEmpty()?N.append(k):S.append(Lt().append(k))}else S.append(k);v.is(_)&&_.set(k.__key,0,"text"),v.set(k.__key,0,"text")})(s,a,i,o),a.type==="element"&&gu(a,Fi(fi(a,"next")));const l=s.offset;let u=a.offset;const d=this.getNodes(),f=d.length;let h=d[0];re(h)||ee(26);const p=h.getTextContent().length,g=h.getParentOrThrow();let m=d[f-1];if(f===1&&a.type==="element"&&(u=p,a.set(s.key,u,"text")),this.isCollapsed()&&l===p&&(Di(h)||!h.canInsertTextAfter()||!g.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let _;if(re(v)&&v.canInsertTextBefore()&&!Di(v)?_=v:(_=Cr(),_.setFormat(i),_.setStyle(o),g.canInsertTextAfter()?h.insertAfter(_):g.insertAfter(_)),_.select(0,0),h=_,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Di(h)||!h.canInsertTextBefore()||!g.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let _;if(!re(v)||Di(v)?(_=Cr(),_.setFormat(i),g.canInsertTextBefore()?h.insertBefore(_):g.insertBefore(_)):_=v,_.select(),h=_,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(Qs()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=Cr(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=m.getParent();if(!g.canInsertTextBefore()||!g.canInsertTextAfter()||V(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),jO(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(Hl(h)){const E=Cr(t);return E.select(),void h.replace(E)}const v=h.getFormat(),_=h.getStyle();if(l!==u||v===i&&_===o){if(au(h)){const E=Cr(t);return E.setFormat(i),E.setStyle(o),E.select(),void h.replace(E)}}else{if(h.getTextContent()!==""){const E=Cr(t);if(E.setFormat(i),E.setStyle(o),E.select(),l===0)h.insertBefore(E,!1);else{const[S]=h.splitText(l);S.insertAfter(E,!1)}return void(E.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(),...m.getParentKeys()]),_=V(h)?h:h.getParentOrThrow();let x=V(m)?m:m.getParentOrThrow(),E=m;if(!_.is(x)&&x.isInline())do E=x,x=x.getParentOrThrow();while(x.isInline());if(a.type==="text"&&(u!==0||m.getTextContent()==="")||a.type==="element"&&m.getIndexWithinParent()<u)if(re(m)&&!Hl(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const T=Cr(m.getTextContent());m.replace(T),m=T}Rr(a.getNode())||a.type!=="text"||(re(m)||ee(395),m=m.spliceText(0,u,"")),v.add(m.__key)}else{const T=m.getParentOrThrow();T.canBeEmpty()||T.getChildrenSize()!==1?m.remove():T.remove()}else v.add(m.__key);const S=x.getChildren(),C=new Set(d),k=_.is(x),N=_.isInline()&&h.getNextSibling()===null?_:h;for(let T=S.length-1;T>=0;T--){const $=S[T];if($.is(h)||V($)&&$.isParentOf(h))break;$.isAttached()&&(!C.has($)||$.is(E)?k||N.insertAfter($,!1):$.remove())}if(!k){let T=x,$=null;for(;T!==null;){const P=T.getChildren(),M=P.length;(M===0||P[M-1].is($))&&(v.delete(T.__key),$=T),T=T.getParent()}}if(Hl(h))if(l===p)h.select();else{const T=Cr(t);T.select(),h.replace(T)}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 T=1;T<f;T++){const $=d[T],P=$.__key;v.has(P)||$.remove()}}}removeText(){const t=he()===this;B0(this,CZ(h1(this))),t&&he()!==this&&vn(this)}formatText(t,r=null){LO(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)&&Nn(r)!==null){let m=r.isShadowRoot()?r.getFirstChild()??r.append(Lt()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&m!==null&&!V(m)){const v=Lt();m.insertBefore(v),m=v}if(m!==null){m.selectStart();const v=he();return te(v)||ee(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&or(r)){const m=w_(t),v=m.getLastDescendant();return r.splice(this.anchor.offset,0,m.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=Jt(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 m=Ud(this);i.splice(m,0,t),o.selectEnd()}return}if(!t.some(m=>(V(m)||ut(m))&&!m.isInline())){V(i)||ee(211,n.constructor.name,n.getType());const m=Ud(this);return i.splice(m,0,t),void o.selectEnd()}if(V(i)&&Nn(i)!==null){const m=Ud(this),v=s1(t);i.splice(m,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(m,m))}if(i===null){const m=w_(t),v=m.getLastDescendant();let _=fi(this.anchor,"next");for(const x of m.getChildren())_=N6(x,_);return void(v!==null&&v.selectEnd())}if(V(i)&&!i.isParentRequired()&&!or(i.getParentOrThrow())){const m=Ud(this),v=s1(t);i.splice(m,0,v);const _=v[v.length-1];return void(_!==void 0?_.selectEnd():i.select(m,m))}const s=w_(t),a=s.getLastDescendant(),l=s.getChildren(),u=!V(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(n=this.anchor.getNode(),i=Jt(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(m,v){const _=v.getParentOrThrow().getLastChild();let x=v;const E=[v];for(;x!==_;)x.getNextSibling()||ee(140),x=x.getNextSibling(),E.push(x);let S=m;for(const C of E)S=S.insertAfter(C)})(i,f));const p=Jt(a,Cn);u&&V(p)&&(u.canMergeWhenEmpty()||Cn(d))&&(p.append(...u.getChildren()),u.remove()),V(i)&&i.isEmpty()&&i.remove(),a.selectEnd();const g=V(i)?i.getLastChild():null;Yn(g)&&p!==i&&g.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&or(t)){const a=Lt();return t.splice(this.anchor.offset,0,[a]),a.select(),a}const r=Ud(this),n=Jt(this.anchor.getNode(),Cn);if(n!==null&&Nn(n)!==null)return null;V(n)||ee(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],s=n.insertNewAfter(this,!1);return s?(s.append(...o),s.selectStart(),s):null}insertLineBreak(t){const r=jo();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,s]=i1(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=a?[s,o]:[o,s];if(r===0)return[];if(r===1){if(re(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(re(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),re(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(Sg(this,t,r,n))return;const i=t==="move",o=Ft(),s=Zn(xi(o));if(!s)return;const a=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();l===null||a===null||!V(u)||u.isInline()||u.canBeEmpty()||Rg(a,o,l);const d=Vc(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=re(u)?tl(u,d,o):null),this.dirty){const h=Vc(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const g=this.anchor.getNode();p=re(g)?tl(g,h,o):null}p&&f&&xg(s,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&re(u)&&u.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const h=Dt(u,r?"previous":"next").getNodeAtCaret();if(re(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()),g=p?tl(h,p,o):null;if(g){const m=r?g.length:0;xg(s,g,m,g,m)}}}}if(UO(s,t,r?"backward":"forward",n),s.rangeCount>0){const h=jm(s,o._rootElement),p=h||s.getRangeAt(0),g=this.anchor.getNode(),m=Rr(g)?g:h6(g);this.applyDOMRange(p),this.dirty=!0,!i&&(BO(this,r,m),(h?s.direction!=="backward":s.anchorNode===p.startContainer&&s.anchorOffset===p.startOffset)||zO(this))}n==="lineboundary"&&Sg(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=Hm(fi(n,t?"previous":"next"));if(o.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(uo(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(V(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Fi(l);B0(this,Oo(u,u)),o.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(ll(l)){if(V(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(ut(l.origin)){if(!l.origin.isIsolated())if(ao(l.origin).length>0){if(V(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=bg();u.add(l.origin.getKey()),vn(u)}}else if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&V(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=bg();u.add(l.origin.getKey()),vn(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return ao(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(B0(this,Oo(!l.origin.isEmpty()&&u.isEmpty()?Tu(Dt(u,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if(Nn(l)!==null)return;if(V(l)&&l.isShadowRoot())break;l=l.getParent()}}const s=this.focus;if(E_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&cR(this,n.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(i=n.type==="text"?n.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,u=a.getTextContentSize();if(a.is(i)||t&&l!==u||!t&&l!==0)return void dR(a,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,u=i.getTextContentSize();if(i.is(a)||t&&l!==0||!t&&l!==u)return void dR(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 g=d.offset,m=f.offset,v=g<m,_=v?g:m,x=v?m:g,E=x-1;_!==E&&(function(S){return!(u6(S)||TX(S))})(h.getTextContent().slice(_,x))&&(u?f.set(f.key,E,f.type):d.set(d.key,E,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()&&Rr(n.getParent())&&n.getPreviousSibling()===null&&cR(this,n),OO()}}deleteLine(t){const r=o1(this.anchor);if(r!==null&&ut(Io(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):Jt(this.anchor.getNode(),Cn)!==Jt(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 jc()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function Yt(e){return e instanceof zm}function MO(e,t){if(Yt(e)){for(const _ of e.getNodes())n1(_)&&_.setFormat(t(_.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void ln(null);const r=[];for(const _ of e.getNodes())re(_)?r.push(_):V(_)?_.setTextFormat(t(_.getTextFormat())):n1(_)&&_.setFormat(t(_.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void ln(null);const i=e.anchor,o=e.focus,s=e.isBackward(),a=s?o:i,l=s?i:o;let u=0,d=r[0],f=a.type==="element"?0:a.offset;if(a.type==="text"&&f===d.getTextContentSize()&&(u=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const g=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===g)return;const _=t(d.getFormat());if(Di(d)||f===0&&g===d.getTextContentSize())d.setFormat(_);else{const x=d.splitText(f,g),E=f===0?x[0]:x[1];E.setFormat(_),a.type==="text"&&a.set(E.__key,0,"text"),l.type==="text"&&l.set(E.__key,g-f,"text")}return void(e.format=_)}f===0||Di(d)||([,d]=d.splitText(f),f=0);const m=t(d.getFormat());d.setFormat(m);const v=t(p.getFormat());g>0&&(g===p.getTextContentSize()||Di(p)||([p]=p.splitText(g)),p.setFormat(v));for(let _=u+1;_<h;_++){const x=r[_];x.setFormat(t(x.getFormat()))}a.type==="text"&&a.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,g,"text"),e.format=m|v}function AX(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&MO(e,n=>{for(const[i,o]of r)n=lu(n,i,o?aa[i]:0);return n})}function LO(e,t,r=null){const n=r===null&&te(e)?lu(e.format,t,null):r;MO(e,i=>lu(i,t,n))}function uR(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function i1(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]:[uR(r),uR(n)]}function cR(e,t){for(let r=t;r;r=r.getParent()){if(V(r)){if(r.collapseAtStart(e))return!0;if(or(r))break}if(r.getPreviousSibling())break}return!1}function zO(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 UO(e,t,r,n){e.modify(t,r,n)}function BO(e,t,r){const n=e.getNodes(),i=n.filter(a=>Kc(a,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],s=V(o)?o:o.getParentOrThrow();return t?s.selectStart():s.selectEnd(),!0}function E_(e,t,r){if(Sg(e,"extend",t,r))return;const n=Ft(),i=Zn(xi(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,s=n._rootElement,a=e.anchor,l=e.focus.getNode();s===null||o===null||!V(l)||l.isInline()||l.canBeEmpty()||Rg(o,n,s);const u=$=>{const P=$.getNode(),M=n.getElementByKey($.key);return M!==null&&$.type==="text"&&re(P)?tl(P,M,n):M},d=a.getNode(),f=u(a);if(f===null)return;const h=a.offset,p=e.isCollapsed(),g=e.focus,m=p?f:u(g);if(m===null)return;const v=g.offset;if(xg(i,m,v,m,v),UO(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const _=jm(i,s)||i.getRangeAt(0),x=_.startContainer,E=_.startOffset;if(p&&r==="character"&&a.type==="text"&&re(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const $=Dt(d,t?"previous":"next").getNodeAtCaret();if(re($)){const P=t?$.getTextContentSize()-1:1;return e.focus.set($.__key,P,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&a.type==="text"){const $=t?0:d.getTextContentSize(),P=x===f?E:h!==$?$:-1;if(P>=0)return void(P!==h&&(e.focus.set(a.key,P,"text"),e.dirty=!0))}const[S,C,k,N]=t?[x,E,f,h]:[f,h,x,E],T=Rr(d)?d:h6(d);e.applyDOMRange({collapsed:!1,endContainer:k,endOffset:N,startContainer:S,startOffset:C}),e.dirty=!0,!BO(e,t,T)&&t&&zO(e),r==="lineboundary"&&Sg(e,"extend",t,r,"decorators")}const TX=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function dR(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let s=0,a=0;for(let u=0;u<o;u++){const d=u===o-1;if(a=s,s+=i[u].length,t&&s===r||s>r||d){i.splice(u,1),d&&(a=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(a,a))}function fR(e,t,r,n){let i,o=t,s=!1;if(Ze(e)){let a=!1;const l=e.childNodes,u=l.length,d=n._blockCursorElement;o===u&&u>0&&(a=!0,o=u-1),pd(e,n)!==void 0||Tg(e,n)||(s=!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),re(i))o=_s(i,a?"next":"previous");else{let p=fc(e);if(p===null)return null;if(V(p)){const g=n.getElementByKey(p.getKey());g===null&&ee(214),[p,o]=ho(p,g,n).resolveChildIndex(p,g,e,t),V(p)||ee(215),a&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(V(v)&&(function(_,x,E){const S=_.getParent();return E===null||S===null||!S.canBeEmpty()||S!==E.getNode()})(v,0,r)){const _=a?v.getLastDescendant():v.getFirstDescendant();_===null?p=v:(v=_,p=V(v)?v:v.getParentOrThrow()),o=0}re(v)?(i=v,p=null,o=_s(v,a?"next":"previous")):v!==p&&a&&!h&&(V(p)||ee(216),o=Math.min(p.getChildrenSize(),o+1))}else{const g=Io(p),m=g!==null?g:p,v=m.getIndexWithinParent(),_=n.getElementByKey(p.getKey());let x="after";if(_!==null&&fc(e)===p){const E=ho(p,_,n);E.element!==_?x=E.resolveLeafPosition(_,e,t):t===0&&ut(p)&&(x="before")}o=x==="before"?v:v+1,p=m.getParentOrThrow()}if(V(p))return[Es(p.__key,o,"element"),s]}}else i=fc(e);return re(i)?[Es(i.__key,_s(i,o,"clamp"),"text"),s]:null}function hR(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),s=i.getParent();if(t){if((r||!t)&&o===null&&V(s)&&s.isInline()){const a=s.getPreviousSibling();re(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else V(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):re(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),s=i.getParent();if(t&&V(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&V(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const a=s.getNextSibling();re(a)&&e.set(a.__key,0,"text")}}}function jO(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);hR(e,n,i),hR(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function o1(e){const t=er(e.key);return t===null?null:Vm(t)}function qO(e,t,r){const n=o1(e),i=o1(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 s=Io(i);if(s===null)return!1;const a=s.getParent();if(a===null)return!1;const l=s.getIndexWithinParent();return t.set(a.getKey(),o?l+1:l,"element"),!0}function VO(e){const t=qO(e.anchor,e.focus,(r,n)=>(function(i,o,s,a){if(s!==null&&a!==null){const d=Io(s),f=Io(a);if(d!==null&&d.is(f)){for(const h of Km(d).values()){if(h===s.getKey())return!0;if(h===a.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(s!==null){const d=Io(s),f=er(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=Io(a),u=er(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 KO(e,t,r,n,i,o){if(e===null||r===null||!Hh(i,e,r))return null;const s=fR(e,t,te(o)?o.anchor:null,i);if(s===null)return null;const a=fR(r,n,te(o)?o.focus:null,i);if(a===null)return null;const[l,u]=s,[d,f]=a;if(l.type==="element"&&d.type==="element"){const p=fc(e),g=fc(r);if(ut(p)&&ut(g))return null}const h=i._slotsUsed&&qO(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return jO(l,d),[l,d,u||f||h]}function Bc(e){return V(e)&&!e.isInline()}function HO(e,t,r,n,i,o){const s=_a(),a=new ku(Es(e,t,i),Es(r,n,o),0,"");return a.dirty=!0,s._selection=a,a}function _S(){const e=Es("root",0,"element"),t=Es("root",0,"element");return new ku(e,t,0,"")}function bg(){return new zm(new Set)}function bS(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,s=o?o.type:void 0,a=s==="selectionchange",l=!Vy&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&o&&o.detail===3||s==="drop"||s===void 0);let u,d,f,h;if(te(e)&&!l)return e.clone();{if(t===null)return null;const S=fo(t,r._rootElement);if(u=S.anchorNode,d=S.focusNode,f=S.anchorOffset,h=S.focusOffset,(a||s===void 0)&&te(e)&&!Hh(r,u,d))return e.clone()}const p=KO(u,f,d,h,r,e);if(p===null)return null;const[g,m,v]=p;let _=0,x="";if(te(e)){const S=e.anchor;if(g.key===S.key)_=e.format,x=e.style;else{const C=g.getNode();re(C)?(_=C.getFormat(),x=C.getStyle()):V(C)&&(_=C.getTextFormat(),x=C.getTextStyle())}}const E=new ku(g,m,_,x);return v&&(E.dirty=!0),E}function he(){return _a()._selection}function ud(){return Ft()._editorState._selection}function Ll(e,t,r,n=1){const i=e.anchor,o=e.focus,s=i.getNode(),a=o.getNode();if(!t.is(s)&&!t.is(a))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"),pR(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 g=d.offset;(r<=g&&n>0||r<g&&n<0)&&d.set(l,Math.max(0,g+n),"element")}if(t.is(p)){const g=h.offset;(r<=g&&n>0||r<g&&n<0)&&h.set(l,Math.max(0,g+n),"element")}}pR(e)}function pR(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),s=n.getNode();if(e.isCollapsed()){if(!V(o))return;const a=o.getChildrenSize(),l=r>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(r);if(re(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 a=o.getChildrenSize(),l=r>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(r);if(re(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(V(s)){const a=s.getChildrenSize(),l=i>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(i);if(re(u)){let d=0;l&&(d=u.getTextContentSize()),n.set(u.__key,d,"text")}}}function yg(e,t,r,n,i){let o=null,s=0,a=null;n!==null?(o=n.__key,re(n)?(s=n.getTextContentSize(),a="text"):V(n)&&(s=n.getChildrenSize(),a="element")):i!==null&&(o=i.__key,re(i)?a="text":V(i)&&(a="element")),o!==null&&a!==null?e.set(o,s,a):(s=t.getIndexWithinParent(),s===-1&&(s=r.getChildrenSize()),e.set(r.__key,s,"element"))}function gR(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 xg(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function mR(e,t,r){const n=Vc(e,t.getKey());if(V(t)){const i=ho(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function NX(e,t,r,n,i,o){const s=o.getRootNode(),a=Cu(s)||la(s)?lh(s):null;if(i.has(DO)&&a!==o||a!==null&&CS(a,a))return;const l=fo(n,o);let u;if(!te(t))return void(e!==null&&Hh(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[g,m]=mR(r,h,d.offset),[v,_]=mR(r,p,f.offset),x=t.format,E=t.style,S=t.isCollapsed();let C=g,k=v,N=!1;if(d.type==="text"?(C=re(h)?tl(h,g,r):null,N=h.getFormat()!==x||h.getStyle()!==E):te(e)&&e.anchor.type==="text"&&(N=!0),f.type==="text"&&(k=re(p)?tl(p,v,r):null),C!==null&&k!==null){if(S&&(e===null||N||te(e)&&(e.format!==x||e.style!==E))&&(function(T,$,P,M,I,U){T._inputState.collapsedSelectionFormat={format:$,key:I,offset:M,style:P,timeStamp:U}})(r,x,E,m,d.key,performance.now()),(n.type!=="Range"||!S)&&l.anchorOffset===m&&l.focusOffset===_&&l.anchorNode===C&&l.focusNode===k){if(a===null||!o.contains(a)){const T=a!==null?Rc(a):null;T!==null&&T!==r||i.has(r1)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(xg(n,C,m,k,_),sl&&t.isCollapsed()&&o!==null&&!i.has(r1)){const T=u1(o);if(T===null||!o.contains(T)){const $=lh(o.ownerDocument),P=$!==null?Rc($):null;P!==null&&P!==r||o.focus({preventScroll:!0})}}if(!i.has(_X)&&t.isCollapsed()&&o!==null&&o===u1(o)){const T=te(t)&&t.anchor.type==="element"?C.childNodes[m]||null:(u===void 0&&(u=rZ(n,o)),u);if(T!==null){let $;if(yi(T)){const P=T.ownerDocument.createRange();P.selectNode(T),$=P.getBoundingClientRect()}else $=T.getBoundingClientRect();(function(P,M,I){const U=$S(I),B=DS(U);if(U===null||B===null)return;const q=I.getBoundingClientRect();if(M.bottom<q.top)return;let{top:J,bottom:Y}=M,K=0,G=0,ie=I;for(;ie!==null;){const oe=ie===U.body;if(oe){const Re=B.visualViewport;if(Re){const xe=Re.offsetTop;K=xe,G=xe+Re.height}else K=0,G=xi(P).innerHeight;const Pe=B.getComputedStyle(U.documentElement),at=parseFloat(Pe.scrollPaddingTop),ve=parseFloat(Pe.scrollPaddingBottom);isFinite(at)&&(K+=at),isFinite(ve)&&(G-=ve)}else{const Re=ie===I?q:ie.getBoundingClientRect();K=Re.top,G=Re.bottom}let _e=0;if(J<K?_e=-(K-J):Y>G&&(_e=Y-G),_e!==0)if(oe)B.scrollBy(0,_e);else{const Re=ie.scrollTop;ie.scrollTop+=_e;const Pe=ie.scrollTop-Re;J-=Pe,Y-=Pe}if(oe)break;ie=Ru(ie)}})(r,$,o)}}(function(T){T._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function $X(e){let t=he()||ud();t===null&&(t=Wr().selectEnd()),t.insertNodes(e)}function WO(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 ah(e){const t=[];return WO(e,{linebreak:()=>t.push(jo()),tab:()=>t.push(ld()),text:r=>t.push(Cr(r))}),t}function s1(e){const t=[];for(const r of e)Yn(r)||(!V(r)&&!ut(r)||r.isInline()?t.push(r):V(r)&&t.push(...s1(r.getChildren())));return t}function Ud(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)&&Nn(i)===null;){const s=i;if([i,o]=DX(i,o),s.is(i))break}return o}function DX(e,t){const r=e.getParent();if(!r){const i=Lt();return Wr().append(i),i.select(),[Wr(),0]}if(re(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(Es(e.__key,t,"element"),Es(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function vR(e){return Yn(e)||XX(e)||re(e)||e.isParentRequired()}function w_(e){const t=Lt();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(vR(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(Yn(i)&&(o===void 0||!vR(o)))continue}r.append(i)}else t.append(i),r=null}return t}function Sg(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=fi(e.focus,r?"previous":"next"),s=n==="lineboundary",a=t==="move";let l=o,u=i==="decorators-and-blocks";if(!zS(l)){for(const d of l){u=!1;const{origin:f}=d;if(!ut(f)||f.isIsolated()||(l=d,!s||!f.isInline()))break}if(u)for(const d of Hm(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(uo(d))d.origin.isInline()||(l=d);else{if(V(d.origin))continue;ut(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(a&&!s&&ut(l.origin)&&l.origin.isKeyboardSelectable()){const d=bg();return d.add(l.origin.getKey()),vn(d),!0}return l=Fi(l),a&&gu(e.anchor,l),gu(e.focus,l),u||!s}let dn=null,Ur=null,di=!1,k_=!1,L0=!1;const C_=new Set;let z0=0;const _R={characterData:!0,childList:!0,subtree:!0};function jc(){return di||dn!==null&&dn._readOnly}function an(){di&&ee(13)}function GO(){z0>99&&ee(14)}function _a(){return dn===null&&ee(195,JO()),dn}function FX(e){_a()!==null&&Ur===null&&(Ur=e),Ur!==e&&FP(378)}function Ft(){return Ur===null&&ee(337,JO()),Ur}function IX(){Ft()._dirtyType=2}function JO(){let e=0;const t=new Set,r=qc.version;if(typeof window<"u")for(const i of g6(document)){const o=Wh(i);if(Bm(o))e++;else if(o){let s=String(o.constructor.version||"<0.17.1");s===r&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}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 QO(){return Ur}function bR(e,t,r){const n=t.__type,i=n6(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const s=o.length;for(let a=0;a<s&&(o[a](t),t.isAttached());a++);}function yR(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function YO(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 PX(e){return Eg(e,Ft()._nodes)}function Eg(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),s=e.children;if(V(o)&&Array.isArray(s))for(let l=0;l<s.length;l++){const u=Eg(s[l],t);o.append(u)}const a=e.$slots;if(a){Xs(o)||ee(379,i.name);for(const l in a)k6(o,l,Eg(a[l],t))}return o}function xR(e,t,r){const n=dn,i=di,o=Ur;dn=t,di=!0,Ur=e;try{return r()}finally{dn=n,di=i,Ur=o}}function Ka(e,t){const r=L0;L0=!0;try{(function(n,i){const o=n._pendingEditorState,s=n._rootElement,a=n._headless||s===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&SR(n,n._deferred));const l=n._editorState,u=l._selection,d=o._selection,f=n._dirtyType!==0,h=dn,p=di,g=Ur,m=n._updating,v=n._observer;let _=null;if(n._pendingEditorState=null,n._editorState=o,!a&&f&&v!==null){Ur=n,dn=o,di=!1,n._updating=!0;try{const T=n._dirtyType,$=n._dirtyElements,P=n._dirtyLeaves;v.disconnect(),_=YY(l,o,n,T,$,P)}catch(T){if(T instanceof Error&&n._onError(T),k_)throw T;return r6(n,null,s,o),qP(n),n._dirtyType=2,k_=!0,Ka(n,l),void(k_=!1)}finally{v.observe(s,_R),n._updating=m,dn=h,di=p,Ur=g}}o._readOnly||(o._readOnly=!0);const x=n._dirtyLeaves,E=n._dirtyElements,S=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(T,$){const P=T._decorators;let M=T._pendingDecorators||P;const I=$._nodeMap;let U;for(U in M)I.has(U)||(M===P&&(M=l6(T)),delete M[U])})(n,o);const k=a?null:Zn(xi(n));if(n._editable&&k!==null&&(f||d===null||d.dirty||!d.is(u))&&s!==null&&!C.has(bX)){Ur=n,dn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const T=n._blockCursorElement;T!==null&&Rg(T,n,s),NX(u,d,n,k,C,s)}(function(T,$,P){let M=T._blockCursorElement;if(te(P)&&P.isCollapsed()&&P.anchor.type==="element"&&$.contains(u1($))){const I=P.anchor,U=I.getNode(),B=I.offset;let q=!1,J=null;if(B===U.getChildrenSize())U0(U.getChildAtIndex(B-1))&&(q=!0);else{const Y=U.getChildAtIndex(B);if(Y!==null&&U0(Y)){const K=Y.getPreviousSibling();(K===null||U0(K))&&(q=!0,J=T.getElementByKey(Y.__key))}}if(q){const Y=ho(U,T.getElementByKey(U.__key),T).element;return M===null&&(T._blockCursorElement=M=(function(K){const G=K.theme,ie=tr().createElement("div");ie.contentEditable="false",ie.setAttribute("data-lexical-cursor","true");let oe=G.blockCursor;if(oe!==void 0){if(typeof oe=="string"){const _e=Zs(oe);oe=G.blockCursor=_e}oe!==void 0&&ie.classList.add(...oe)}return ie})(T._config)),$.style.caretColor="transparent",void(J===null?Y.appendChild(M):Y.insertBefore(M,J))}}M!==null&&Rg(M,T,$)})(n,s,d)}finally{v!==null&&v.observe(s,_R),Ur=g,dn=h}}_!==null&&(function(T,$,P,M,I){const U=Array.from(T._listeners.mutation),B=U.length;for(let q=0;q<B;q++){const[J,Y]=U[q];for(const K of Y){const G=$.get(K);G!==void 0&&J(G,{dirtyLeaves:M,prevEditorState:I,updateTags:P})}}})(n,_,C,x,l),te(d)||d===null||u!==null&&u.is(d)||n.dispatchCommand(tO,void 0);const N=n._pendingDecorators;N!==null&&(n._decorators=N,n._pendingDecorators=null,Sf("decorator",n,!0,N)),(function(T,$,P){const M=kR($),I=kR(P);M!==I&&Sf("textcontent",T,!0,I)})(n,i||l,o),Sf("update",n,!0,{dirtyElements:E,dirtyLeaves:x,editorState:o,mutatedNodes:_,normalizedNodes:S,prevEditorState:i||l,tags:C}),!m&&SR(n,n._deferred),(function(T){const $=T._updates;if($.length===0)return void(T._cascadeCount=0);if((function(M){C_.has(M)||(C_.add(M),setTimeout(()=>{C_.delete(M),M._cascadeCount=0},0))})(T),T._cascadeCount++>99)return T._updates=[],T._cascadeCount=0,void T._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: ${T._config.namespace}`));const P=$.shift();if(P){const[M,I]=P;Um(T,M,I)}})(n)})(e,t)}finally{L0=r}}function Sf(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],s=Array.from(o);for(const[a,l]of s){l&&l();const u=a(...n);o.has(a)?o.set(a,u):u&&u()}}finally{t._updating=i}}function XO(e,t,r,n){const i=RS(e);let o;if(!L0)for(let s=0;s<i.length;s++)i[s]._updating||(i[s]._cascadeCount=0);for(let s=4;s>=0;s--)for(let a=0;a<i.length;a++){const l=i[a];if(a>0&&l._updating){o=l;break}const u=l._commands.get(t);if(u!==void 0){const d=u[s];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(()=>{XO(o,t,r,n)}),!1}function SR(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 ER(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,s]=i,a=e._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(n=!0),s.discrete&&(a===null&&ee(191),a._flushSync=!0),l&&e._deferred.push(l),YO(e,s.tag)),a==null?Um(e,o,s):o()}}return n}function Um(e,t,r){const n=e._updateTags;let i,o=!1,s=!1;r!==void 0&&(i=r.onUpdate,YO(e,r.tag),o=r.skipTransforms||!1,s=r.discrete||!1),i&&e._deferred.push(i);const a=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=ZO(l||a),u=!0),l._flushSync=s;const d=dn,f=di,h=Ur,p=e._updating;dn=l,di=!1,e._updating=!0,Ur=e;const g=e._headless||e.getRootElement()===null;wS(null);try{u&&(g?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(x,E){const S=x.getEditorState()._selection,C=Zn(xi(x));return te(S)||S==null?bS(S,C,x,E):S.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=ER(e,o),(function(x,E){const S=E.getEditorState()._selection,C=x._selection;if(te(C)){const k=C.anchor,N=C.focus;let T;if(k.type==="text"&&(T=k.getNode(),T.selectionTransform(S,C)),N.type==="text"){const $=N.getNode();T!==$&&$.selectionTransform(S,C)}}})(l,e),e._dirtyType!==0&&(o?(function(x,E){const S=E._dirtyLeaves,C=x._nodeMap;for(const k of S){const N=C.get(k);re(N)&&N.isAttached()&&N.isSimpleText()&&!N.isUnmergeable()&&qC(N)}})(l,e):(function(x,E){const S=E._dirtyLeaves,C=E._dirtyElements,k=x._nodeMap,N=Qs(),T=new Map;let $=S,P=$.size,M=C,I=M.size;for(;P>0||I>0;){if(P>0){E._dirtyLeaves=new Set;for(const U of $){const B=k.get(U);re(B)&&B.isAttached()&&B.isSimpleText()&&!B.isUnmergeable()&&qC(B),B!==void 0&&yR(B,N)&&bR(E,B,T),S.add(U)}if($=E._dirtyLeaves,P=$.size,P>0){z0++;continue}}E._dirtyLeaves=new Set,E._dirtyElements=new Map,M.delete("root")&&M.set("root",!0);for(const U of M){const B=U[0],q=U[1];if(C.set(B,q),!q)continue;const J=k.get(B);J!==void 0&&yR(J,N)&&bR(E,J,T)}$=E._dirtyLeaves,P=$.size,M=E._dirtyElements,I=M.size,z0++}E._dirtyLeaves=S,E._dirtyElements=C})(l,e),ER(e),(function(x,E,S,C){const k=x._nodeMap,N=E._nodeMap,T=[];for(const[M]of C){const I=N.get(M);I!==void 0&&(I.isAttached()||(V(I)&&fg(I,M,k,N,T,C),k.has(M)||C.delete(M),T.push(M)))}for(const M of S){const I=N.get(M);I===void 0||I.isAttached()||(Xs(I)&&I.__slots!==null&&fg(I,M,k,N,T,S),k.has(M)||S.delete(M),T.push(M))}for(const M of T)N.delete(M);const $=Ft(),P=$._compositionKey;P===null||N.has(P)||($._compositionKey=null)})(a,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const _=l._selection;if(te(_)){e._slotsUsed&&VO(_);const x=l._nodeMap,E=_.anchor.key,S=_.focus.key;x.get(E)!==void 0&&x.get(S)!==void 0||ee(19)}else Yt(_)&&_._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Ka(e)}finally{dn=d,di=f,Ur=h,e._updating=p,z0=0}e._dirtyType!==0||e._deferred.length>0||(function(v,_){const x=_.getEditorState()._selection,E=v._selection;if(E!==null){if(E.dirty||!E.is(x))return!0}else if(x!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,Ka(e)):u&&HX(()=>{Ka(e)}):(l._flushSync=!1,u&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function so(e,t,r){Ur===e&&r===void 0?t():Um(e,t,r)}function OX(e){if(or(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:OX,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 OY[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&&ao(this).length===0}isDirty(){const t=Ft()._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 ao(this)){const i=fu(this,n);V(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(re(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:er(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&ee(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:er(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=w6(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 s of ao(i)){const a=fu(i,s);a!==null&&(o+=a.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=dg[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=aa[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return lu(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){an();const n=he();let i=t,o=r;const s=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(re(l)||V(l))return l.select(0,0)}else if(!(t!==void 0&&t!==s||r!==void 0&&r!==s)){const l=this.getLastChild();if(re(l)||V(l))return l.select()}}i===void 0&&(i=s),o===void 0&&(o=s);const a=this.__key;return te(n)?(n.anchor.set(a,i,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):HO(a,i,a,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!==""&&dg[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){mg(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 s=o.__key,a=[],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 g=0;g<r;g++){p===null&&ee(100);const m=p.getNextSibling(),v=p.__key;Js(p.getWritable()),l.push(v),p=m}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===s&&f--,Js(g);const m=p.__key;if(h===null)o.__first=m,g.__prev=null;else{const v=h.getWritable();v.__next=m,g.__prev=v.__key}p.__key===s&&ee(76),g.__parent=s,a.push(m),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 g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=he();if(te(p)){const g=new Set(l),m=new Set(a),{anchor:v,focus:_}=p;wR(v,g,m)&&yg(v,v.getNode(),this,d,u),wR(_,g,m)&&yg(_,_.getNode(),this,d,u),f!==0||this.canBeEmpty()||or(this)||this.remove()}}return o}getDOMSlot(t){return new xc(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(Ze(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===""||or(this)||this.getChildren().some(re)||(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=ho(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const s=r.getElementByKey(o.getKey());s!==null&&(i==null?(n.insertChild(s),i=s):i!==s&&n.replaceChild(s,i),i=i.nextSibling)}}}function V(e){return e instanceof mi}function wR(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 yS 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 ut(e){return e instanceof yS}class cd extends mi{__cachedText;static getType(){return"root"}static clone(){return new cd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){ee(51)}getTextContent(){const t=this.__cachedText;return t===null||!jc()&&Ft()._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)||ut(i)||ee(282);return super.splice(t,r,n)}static importJSON(t){return Wr().updateFromJSON(t)}collapseAtStart(){return!0}}function Rr(e){return e instanceof cd}function ZO(e){return new Kh(zP(e._nodeMap),null,e._slotsUsed)}function xS(){return new Kh(new Map([["root",new cd]]),null,!1)}function a1(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 s=0;s<o.length;s++){const a=a1(o[s]);i.push(a)}}const n=ao(e);if(n.length>0){const i={};for(const o of n){const s=fu(e,o);s===null&&ee(366,r.name,o),i[o]=a1(s)}t.$slots=i}return t}function MX(e){return e instanceof Kh}class Kh{_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 xR(r&&r.editor||null,this,t)}clone(t){const r=new Kh(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return xR(null,this,()=>({root:a1(Wr())}))}}class SS extends mi{static getType(){return"artificial"}createDOM(t){return tr().createElement("div")}}class dd extends Mi{static getType(){return"linebreak"}static clone(t){return new dd(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
27
|
+
`}createDOM(){return tr().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>e6(t)||t6(t)?null:{conversion:LX,priority:0}}}static importJSON(t){return jo().updateFromJSON(t)}}function LX(e){return{node:jo()}}function jo(){return Jo(new dd)}function Yn(e){return e instanceof dd}function e6(e){const t=e.parentElement;if(t!==null&&Hc(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&wg(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&wg(n))return!0}}return!1}function t6(e){const t=e.parentElement;if(t!==null&&Hc(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&wg(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&wg(n))return!0}return!1}function wg(e){return yi(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class fd extends mi{static getType(){return"paragraph"}static clone(t){return new fd(t.__key)}createDOM(t){const r=tr().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:zX,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(Ze(r)){this.isEmpty()&&r.append(tr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return Lt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(re);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=Lt();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||re(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 zX(e){const t=Lt();if(Ns(t,e),Au(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in dg&&t.setFormat(r)}return _o(t,e),{node:t}}function Lt(){return Jo(new fd)}function hd(e){return e instanceof fd}function UX(e){console.warn(e)}const lt=0,ic=1,BX=4,jX=-8;function r6(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=xS(),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 s=e._observer;s!==null&&(s.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(a,l){const u=`__lexicalKey_${l._key}`;delete a[u]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),a6(r,e,"root"))}function qX(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of IS(e)){const o=n.transform;if(!r.has(o)){r.add(o);const s=n.transform();s&&t.add(s)}if(i){const s=i.$transform;s&&t.add(s)}}return t}const kg={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=kS(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 ES(e){const t=e||{},r=QO(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,s=xS(),a=t.namespace||(i!==null?i._config.namespace:c6()),l=t.editorState,u=[cd,va,dd,ad,fd,SS,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let g;if(e===void 0&&r!==null)g=r._nodes;else{g=new Map;for(let v=0;v<u.length;v++){let _=u[v],x=null,E=null;if(_&&typeof _=="object"){const k=_;_=k.replace,x=k.with,E=k.withKlass||null}if(typeof _!="function"||!_.prototype||!(_===Mi||_.prototype instanceof Mi)){let k="<unknown>";try{k=JSON.parse(LP)}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))}FS(_);const S=_.getType(),C=qX(_);g.set(S,{exportDOM:h&&h.export?h.export.get(_):void 0,klass:_,replace:x,replaceWithKlass:E,sharedNodeState:KY(u[v]),transforms:C})}}const m=new qc(s,i,g,{disableEvents:o,dom:{...kg,...e&&e.dom},namespace:a,theme:n},d||console.error,f||UX,(function(v,_){const x=new Map,E=new Set,S=C=>{Object.keys(C).forEach(k=>{let N=x.get(k);N===void 0&&(N=[],x.set(k,N)),N.push(C[k])})};return v.forEach(C=>{const k=C.klass.importDOM;if(k==null||E.has(k))return;E.add(k);const N=k.call(C.klass);N!==null&&S(N)}),_&&S(_),x})(g,h?h.import:void 0),p,e);return l!==void 0&&(m._pendingEditorState=l,m._dirtyType=2),(function(v){v.registerCommand(nO,fX,lt),v.registerCommand(iO,hX,lt),v.registerCommand(oO,pX,lt),v.registerCommand(sO,gX,lt),v.registerCommand(aO,mX,lt)})(m),m}function VX(e,t){const r=e.get(t);e.delete(t),r&&r()}function Bd(e,t,r){return e.set(t,r),VX.bind(null,e,t)}class qc{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,s,a,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 qy,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=c6(),this._onError=o,this._onWarn=s,this._htmlConversions=a,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 Bd(this._listeners.update,t)}registerEditableListener(t){return Bd(this._listeners.editable,t)}registerDecoratorListener(t){return Bd(this._listeners.decorator,t)}registerTextContentListener(t){return Bd(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return cl(Bd(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const s=n.get(i);s&&s(),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 zd,new zd,new zd,new zd,new zd]);const o=i.get(t);o===void 0&&ee(36,String(t));const s=(function(l){return 7&l})(n),a=o[s];return s!==n?a.addFront(r):a.addBack(r),()=>{a.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 s=o.get(r);s===void 0&&(s=new Set,o.set(r,s)),s.add(i);const a=n&&n.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(r,i),()=>{s.delete(i),s.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=$R(n).get(r.getType());if(!i)return;const o=new Map;for(const s of i.keys())o.set(s,"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 s=this.registerNodeTransformToKlass(o,r);i.push(s)}return(function(s,a){const l=$R(s.getEditorState()),u=[];for(const d of a){const f=l.get(d);f&&u.push(f)}u.length!==0&&s.update(()=>{for(const d of u)for(const f of d.keys()){const h=er(f);h&&h.markDirty()}},s._pendingEditorState===null?{tag:xf}:void 0)})(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return be(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,r6(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||vX(r),n!=null&&r.classList.remove(...n)),t!==null){const o=DS(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,qP(this),this._updateTags.add(xf),Ka(this),this._config.disableEvents||(function(a,l){const u=a.ownerDocument;e1.set(a,u);let d=pg.get(u);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},pg.set(u,d)),d.editors.add(l),d.hasShadowEditor=void 0,a.__lexicalEditor=l;const f=CO(a);f.push(dX.register(u));for(let h=0;h<Zy.length;h++){const[p,g]=Zy[h],m=typeof g=="function"?v=>{nR(v)||(rR(v),(l.isEditable()||p==="click")&&g(v,l))}:v=>{if(nR(v))return;rR(v);const _=l.isEditable();switch(p){case"cut":return _&&be(l,mS,v);case"copy":return be(l,Lm,v);case"paste":return _&&be(l,pS,v);case"dragstart":return _&&be(l,bO,v);case"dragover":return _&&be(l,yO,v);case"dragend":return _&&be(l,nX,v);case"focus":return _&&be(l,sX,v);case"blur":return _&&be(l,aX,v);case"drop":return _&&be(l,_O,v)}};f.push(cX(a,p,m))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(xf),Ka(this);Sf("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=ZO(t),n._selection=t._selection?t._selection.clone():null),jP(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),Ka(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[s,a]of n._nodeMap.entries())V(a)?this._dirtyElements.set(s,!0):this._dirtyLeaves.add(s)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const s=xS(),a=dn,l=di,u=Ur,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,dn=s,di=!1,Ur=i,wS(null);try{const g=i._nodes;Eg(n.root,g),o&&o(),s._readOnly=!0,s._parsed=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,dn=a,di=l,Ur=u}return s})(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"&&Ka(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]):Um(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=Wr();i!==null?i.dirty||vn(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),cu("focus"),YX(()=>{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,Sf("editable",this,!0,t),this._slotsUsed&&this.update(()=>IX()))}toJSON(){return{editorState:this._editorState.toJSON()}}}qc.version=LP;let l1=null;function wS(e){l1=e}let KX=1;function n6(e,t){const r=kS(e,t);return r===void 0&&ee(30,t),r}function kS(e,t){return e._nodes.get(t)}const HX=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function CS(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return Cu(o)||la(o)?lh(o):null})();if(!Ze(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=uu(r),i=r.nodeName;return AO(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&Wh(r)==null)}function Hh(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",()=>!CS(t))}function Bm(e){return e instanceof qc}function Rc(e){let t=e;for(;t!=null;){const r=Wh(t);if(Bm(r))return r;t=Ru(t)}return null}function Wh(e){return e?e.__lexicalEditor:null}function Hl(e){return au(e)||e.isToken()}function Di(e){return Hl(e)||e.isSegmented()}function yi(e){return gd(e)&&e.nodeType===3}function Cu(e){return gd(e)&&e.nodeType===9}function WX(e){let t=e;for(;t!=null;){if(yi(t))return t;t=t.firstChild}return null}function lu(e,t,r){const n=aa[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 i6(e){return re(e)||Yn(e)||ut(e)}function o6(e,t){const r=(function(){const s=l1;return l1=null,s})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);an(),GO();const n=Ft(),i=_a(),o=""+KX++;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 Js(e){Nn(e)!==null&&ee(380,e.__key,String(Nn(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),s=o!==null?o.__key:null,a=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(n.__first=s),o===null&&(n.__last=a),l!==null&&(l.__next=s),u!==null&&(u.__prev=a),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function Cg(e){GO(),mg(e)&&ee(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:du(t)?t.__slotHost:null,n=_a(),i=Ft(),o=n._nodeMap,s=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,s);const a=t.__key;i._dirtyType===0&&(i._dirtyType=1),V(e)?s.set(a,!0):i._dirtyLeaves.add(a)}function ln(e){an();const t=Ft(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=er(r);n!==null&&n.getWritable()}if(e!==null){const n=er(e);n!==null&&n.getWritable()}}}function Qs(){return jc()?null:Ft()._compositionKey}function er(e,t){const r=(t||_a())._nodeMap.get(e);return r===void 0?null:r}function s6(e,t){const r=pd(e,Ft());return r!==void 0?er(r,t):null}function a6(e,t,r){e[`__lexicalKey_${t._key}`]=r}function pd(e,t){return e[`__lexicalKey_${t._key}`]}function uu(e,t){let r=e;for(;r!=null;){const n=s6(r,t);if(n!==null)return n;r=Ru(r)}return null}function l6(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function kR(e){return e.read(()=>Wr().getTextContent())}function Wr(){return _a()._nodeMap.get("root")}function vn(e){an();const t=_a();e!==null&&(e.dirty=!0,e.setCachedNodes(null),te(e)&&Ft()._slotsUsed&&VO(e)),t._selection=e}function CR(){an(),jP(Ft())}function fc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=pd(i,n);if(o!==void 0)return o;i=Ru(i)}return null})(e,Ft());return t===null?null:er(t)}function u6(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function RS(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function c6(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function d6(e){return yi(e)?e.nodeValue:null}function AS(e,t,r){const n=Zn(xi(t));if(n===null)return;const i=fo(n,t._rootElement),o=i.anchorNode;let{anchorOffset:s,focusOffset:a}=i;if(o!==null){let l=d6(o);const u=uu(o);if(l!==null&&re(u)){if((l===Qf||l===fS)&&r){const d=r.length;l=r,s=d,a=d}l!==null&&TS(u,l,s,a,e)}}}function TS(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const s=o.isComposing();if(o.isToken()&&s)return;let a=t;if((s||i)&&(t.endsWith(Qf)&&(a=t.slice(0,-Qf.length)),i)){const u=fS;let d;for(;(d=a.indexOf(u))!==-1;)a=a.slice(0,d)+a.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||a!==l){const u=he();if(a===""){if(ln(null),Bh||al||jh)o.remove();else{const m=Ft();R_(o,"",u),setTimeout(()=>{m.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=ud(),h=o.getTextContentSize(),p=Qs(),g=o.getKey();if(o.isToken()&&!s||p!==null&&g===p&&!s||te(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!s||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!s))return void o.markDirty();if(!te(u)||r===null||n===null)return void R_(o,a,u);if(u.setTextNodeRange(o,r,o,n),o.isSegmented()){const m=Cr(o.getTextContent());o.replace(m),o=m}R_(o,a,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 s=r[o];s.type==="text"&&s.key===n&&(s.offset=_s(e,s.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 GX(e,t){return Dp(e,t,"altKey")&&Dp(e,t,"ctrlKey")&&Dp(e,t,"shiftKey")&&Dp(e,t,"metaKey")}function Ht(e,t,r){if(!GX(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 Ls={ctrlKey:!Ro,metaKey:Ro},RR={altKey:Ro,ctrlKey:!Ro};function AR(e){return e.key==="Backspace"}function JX(e){const t=Wr();if(te(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(Rr(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Va(e),e;const o=i.getTopLevelElementOrThrow(),s=o.getParent();if(s===null)return V(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Va(e)),e;const a=s;return r.set(a.getKey(),0,"element"),n.set(a.getKey(),a.getChildrenSize(),"element"),Va(e),e}{const r=t.select(0,t.getChildrenSize());return vn(Va(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=Zs(i);return r[t]=o,o}return i}function NS(e,t,r,n,i){if(r.size===0)return;const o=n.__type,s=n.__key,a=t.get(o);a===void 0&&ee(33,o);const l=a.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const d=u.get(s),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(s,f?"updated":i)}function TR(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 QX(e,t){const r=e.offset;if(e.type==="element")return TR(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?TR(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function f6(e){const t=xi(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function be(e,t,r){return XO(e,t,r,e)}function Vc(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 la(r)?r.host:null}function $S(e){return Cu(e)?e:Ze(e)?e.ownerDocument:null}function cu(e){an(),Ft()._updateTags.add(e)}function YX(e){an(),Ft()._deferred.push(e)}function Kc(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function DS(e){const t=$S(e);return t?t.defaultView:null}function xi(e){const t=e._window;return t===null&&ee(78),t}function XX(e){return V(e)&&e.isInline()||ut(e)&&e.isInline()}function h6(e){let t=e.getLatest();for(;t!==null;){if(Nn(t)!==null&&V(t))return t;const r=t.getParentOrThrow();if(or(r))return r;t=r}return t}function Tc(e){return V(e)&&e.isShadowRoot()}function or(e){return Rr(e)||Tc(e)}function Un(e,t=!1){const r=e.constructor.clone(e);return o6(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function Jo(e){const t=Ft(),r=e.getType(),n=kS(t,r);n===void 0&&ee(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const s=i(e),a=s.constructor;return o!==null?s instanceof o||ee(201,o.name,o.getType(),a.name,a.getType(),e.constructor.name,r):s instanceof e.constructor&&a!==e.constructor||ee(202,a.name,a.getType(),e.constructor.name,r),s.__key===e.__key&&ee(203,e.constructor.name,r,a.name,a.getType()),s}return e}function A_(e,t){!Rr(e.getParent())||V(t)||ut(t)||ee(99)}function ZX(e){const t=er(e);return t===null&&ee(63,e),t}function U0(e){if(!e||e.isInline())return!1;if(ut(e))return!0;if(V(e)){if(e.isShadowRoot()){const t=e.getParent();return!(V(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function Rg(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function Zn(e){return Go?(e||window).getSelection():null}function eZ(e){const t=DS(e);return t?t.getSelection():null}function la(e){return c1(e)&&"host"in e}const tZ=[];function p6(e){const t=e.getRootNode();if(t===e||!la(t))return tZ;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!la(i))break;r.push(i),n=i.host}return r}function*g6(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 m6(e){return e!==null?e.ownerDocument:document}function tr(){const e=QO();return m6(e!==null?e._rootElement:null)}function jm(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=p6(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 rZ(e,t){const r=jm(e,t);if(r!==null){const n=nZ(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function fo(e,t){const r=jm(e,t);return r===null?e:iZ(r,oZ(e))}function nZ(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 iZ(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 oZ(e){return e.direction}function u1(e){const t=e.getRootNode();return Cu(t)||la(t)?t.activeElement:null}function lh(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 v6(e){const t=e.target;if(t!==null&&Ze(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function _6(e){return Ze(e)&&e.tagName==="A"}function Ze(e){return gd(e)&&e.nodeType===1}function gd(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function c1(e){return gd(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 Ag(e){return!(!Ze(e)||!e.style.display.startsWith("inline"))||sZ.test(e.nodeName)}const aZ=/^(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 Hc(e){return(!Ze(e)||!e.style.display.startsWith("inline"))&&aZ.test(e.nodeName)}function Cn(e){if(ut(e)&&!e.isInline())return!0;if(!V(e)||or(e))return!1;const t=e.getFirstChild(),r=t===null||Yn(t)||re(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function yr(){return Ft()}function qm(e=yr()){return e._config.dom||kg}function ho(e,t,r=yr()){const n=qm(r).$getDOMSlot(e,t,r);return V(e)&&(lZ(n)||ee(344,e.getKey(),e.getType())),n}function lZ(e){return e instanceof xc}function tl(e,t,r=yr()){return WX(ho(e,t,r).element)}const NR=new WeakMap,uZ=new Map;function $R(e){if(!e._readOnly&&e.isEmpty())return uZ;e._readOnly||ee(192);let t=NR.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const s=o.__type;let a=n.get(s);a||(a=new Map,n.set(s,a)),a.set(i,o)}return n})(e),NR.set(e,t)),t}function b6(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function cZ(e){return(t=b6(e))[RO]=!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 _o(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function Ns(e,t){const r=t.style.textAlign;return r&&r in dg?e.setFormat(r):e}function dZ(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function y6(e){return e.__lexicalUnmanaged===!0}function fZ(e,t=yr()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function Tg(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(Ze(r)&&r.hasAttribute("data-lexical-slot")||pd(r,t)!==void 0)return!1;r=Ru(r)}return!1}function jd(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==Mi[t]}const DR=new WeakMap;function FS(e){const t=DR.get(e);if(t)return t;const r=e.prototype!=null&&$C in e.prototype?e.prototype[$C]():void 0,n=(function(l){if(!(l===Mi||l.prototype instanceof Mi)){let u="<unknown>",d="<unknown>";try{u=l.getType()}catch{}try{qc.version&&(d=JSON.parse(qc.version))}catch{}ee(290,l.name,u,d)}return l===yS||l===mi||l===Mi})(e),i=!n&&jd(e,"getType")?e.getType():void 0;let o,s=i;if(r)if(i)o=r[i];else{for(const[l,u]of Object.entries(r))s=l,o=u;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const u=r[l];if(u){o=u;break}}}if(!n&&s&&(jd(e,"getType")||(e.getType=()=>s),jd(e,"clone")||(e.clone=l=>(wS(l),new e)),jd(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!jd(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const a={klass:e,ownNodeConfig:o,ownNodeType:s};return DR.set(e,a),a}function*IS(e){for(let t=e;t&&(t===Mi||AO(t.prototype));){const r=FS(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||S6(t)}}function x6(e){const t=yr();return an(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const Jt=(e,t)=>{let r=e;for(;r!=null&&!Rr(r);){if(t(r))return r;r=r.getParent()}return null};function Ng(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?er(n):t.get(n);i==null&&ee(174),r.push(n),n=i.__next}return r}function S6(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 E6=new Map;function Xs(e){return V(e)||ut(e)}function du(e){return V(e)||ut(e)}function Nn(e){const t=e.getLatest();return du(t)?t.__slotHost:null}function Io(e){const t=Nn(e);if(t===null)return null;const r=er(t);return V(r)||ut(r)||ee(370),r}function hZ(e){const t=Io(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of Km(t))if(i===r)return n;return null}function Vm(e){let t=e.getLatest();for(;t!==null;){if(Nn(t)!==null)return t;t=t.getParent()}return null}function Km(e){const t=e.getLatest();return Xs(t)&&t.__slots!==null?t.__slots:E6}function ao(e){return Array.from(Km(e).keys())}function fu(e,t){const r=Km(e).get(t);return r===void 0?null:er(r)}const pZ=["__proto__","constructor","prototype"],FR=Symbol("slotMapOwner");function d1(e){let t=e.__slots;return t!==null&&t[FR]===e||(t=new Map(t),t[FR]=e,e.__slots=t),t}const IR=new WeakMap,gZ=[];function mZ(e){for(const{ownNodeConfig:t}of IS(e)){const r=t&&t.slots;if(r)return r}return gZ}function w6(e){let t="";for(const r of ao(e)){const n=fu(e,r);n!==null&&(t+=n.getTextContent())}return t}function PR(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 vZ(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(s){let a=IR.get(s);if(a===void 0){const l=mZ(s),u=new Map;for(const d of l)pZ.includes(d)&&ee(371,s.name,d),u.has(d)&&ee(372,s.name,d),u.set(d,u.size);a=u,IR.set(s,a)}return a})(e.constructor);let n=null,i=!0;for(const s of t.keys()){if(n!==null&&PR(n,s,r)>0){i=!1;break}n=s}if(i)return;const o=Array.from(t).sort(([s],[a])=>PR(s,a,r));t.clear();for(const[s,a]of o)t.set(s,a)}function k6(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)&&!ut(r)||r.isInline())&&ee(374,r.__key);const i=e.getWritable(),o=d1(i),s=o.get(t);s!==void 0&&C6(s);const a=r.getWritable(),l=Io(a);if(l!==null){const u=hZ(a);u!==null&&d1(l.getWritable()).delete(u),a.__slotHost=null}return Js(a),a.__slotHost=i.__key,o.set(t,a.__key),vZ(i),(function(){const u=yr();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}function _Z(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(C6(n),d1(r).delete(t)),r}function C6(e){const t=er(e);if(t===null)return;const r=t.getWritable();du(r)||ee(377,e),r.__slotHost=null,r.remove()}const bZ={next:"previous",previous:"next"};class PS{origin;constructor(t){this.origin=t}[Symbol.iterator](){return R6({hasNext:ll,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Dt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Dt(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 s=this.getParentAtCaret(),a=new Map;for(let l=o.getAdjacentCaret();l!==null&&a.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of i){if(a.size>0){const u=o.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(s)&&l.remove(),u.replace(l)}}else u===null&&ee(263,Array.from(a).join(" "))}else o.insert(l);o=Dt(l,this.direction)}for(const l of a.values())l.remove();return this}}class uh extends PS{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:po(t,this.direction)}getParentCaret(t="root"){return Dt(OS(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=yl(this.direction);return Dt(this.getNodeAtCaret(),t)||po(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof uh&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const yZ={root:Rr,shadowRoot:or};function yl(e){return bZ[e]}function OS(e,t="root"){return e===null||yZ[t](e)?null:Nn(e)===null?e:null}class hu extends PS{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Dt(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return V(this.origin)?po(this.origin,this.direction):null}getParentCaret(t="root"){return Dt(OS(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=yl(this.direction);return Dt(this.getNodeAtCaret(),t)||po(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 PS{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 Dt(OS(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 Dt(this.origin,this.direction)}}function lo(e){return e instanceof pu}function ll(e){return e instanceof hu}function uo(e){return e instanceof uh}const xZ={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}}},SZ={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}}},EZ={next:class extends uh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends uh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Dt(e,t){return e?new SZ[t](e):null}function ul(e,t,r){return e?new xZ[t](e,_s(e,r)):null}function _s(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&FP(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function OR(e,t){return new kZ(e,t)}function po(e,t){return V(e)?new EZ[t](e):null}function wZ(e){return e&&e.getChildCaret()||e}function MS(e){return e&&wZ(e.getAdjacentCaret())}class LS{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 LS(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return lo(o)?(function(s,a){const{direction:l,origin:u}=s,d=_s(u,a==="focus"?yl(l):l);return OR(s,d-s.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[OR(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=lo(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=lo(n),o=s=>s.isSameNodeCaret(n)?null:MS(s)||s.getParentCaret(t);return R6({hasNext:s=>s!==null&&!(i&&n.isSameNodeCaret(s)),initial:r.isSameNodeCaret(n)?null:o(r),map:s=>s,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class kZ{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 Hm(e){return Oo(e,Dt(Wr(),e.direction))}function Wm(e){return Oo(e,e)}function Oo(e,t){return e.direction!==t.direction&&ee(265),new LS(e,t,e.direction)}function R6(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 s={done:!1,value:i(o)};return o=n(o),s}}}function ch(e,t){const r=f1(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,s){return Math.sign(o-s)})(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 A6(r)}}function A6(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,s=r;for(;o&&s;o=o.getNextSibling(),s=s.getNextSibling()){if(o.__key===i)return-1;if(s.__key===n)return 1}return o===null?1:-1}function Fp(e,t){return t.is(e)}function MR(e){return V(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function f1(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=MR(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=MR(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 fi(e,t){const{type:r,key:n,offset:i}=e,o=ZX(e.key);return r==="text"?(re(o)||ee(266,o.getType(),n),ul(o,t,i)):(V(o)||ee(267,o.getType(),n),p1(o,e.offset,t))}function gu(e,t){const{origin:r,direction:n}=t,i=n==="next";lo(t)?e.set(r.getKey(),t.offset,"text"):ll(t)?re(r)?e.set(r.getKey(),_s(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(uo(t)&&V(r)||ee(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function dh(e){const t=he(),r=te(t)?t:_S();return B0(r,e),vn(r),r}function B0(e,t){gu(e.anchor,t.anchor),gu(e.focus,t.focus)}function h1(e){const{anchor:t,focus:r}=e,n=fi(t,"next"),i=fi(r,"next"),o=ch(n,i)<=0?"next":"previous";return Oo(ua(n,o),ua(i,o))}function Tu(e){const{direction:t,origin:r}=e,n=Dt(r,yl(t)).getNodeAtCaret();return n?Dt(n,t):po(r.getParentOrThrow(),t)}function LR(e,t="root"){const r=[e];for(let n=uo(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push(Tu(n));return r}function T_(e){return!!e&&e.origin.isAttached()}function CZ(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=US(e,n),s=LR(o.anchor,r),a=LR(o.focus.getFlipped(),r),l=new Set,u=[];for(const g of o.iterNodeCarets(r))if(uo(g))l.add(g.origin.getKey());else if(ll(g)){const{origin:m}=g;V(m)&&!l.has(m.getKey())||u.push(m)}for(const g of u)g.remove();for(const g of o.getTextSlices()){if(!g)continue;const{origin:m}=g.caret,v=m.getTextContentSize(),_=Tu(Dt(m,n)),x=m.getMode();if(Math.abs(g.distance)===v&&i==="removeEmptySlices"||x==="token"&&g.distance!==0)_.remove();else if(g.distance!==0){i="removeEmptySlices";let E=g.removeTextSlice();const S=g.caret.origin;if(x==="segmented"){const C=E.origin,k=Cr(C.getTextContent()).setStyle(C.getStyle()).setFormat(C.getFormat());_.replaceOrInsert(k),E=ul(k,n,E.offset)}S.is(s[0].origin)&&(s[0]=E),S.is(a[0].origin)&&(a[0]=E.getFlipped())}}let d,f;for(const g of s)if(T_(g)){d=Fi(g);break}for(const g of a)if(T_(g)){f=Fi(g);break}const h=(function(g,m,v){if(!g||!m)return null;const _=g.getParentAtCaret(),x=m.getParentAtCaret();if(!_||!x)return null;const E=_.getParents().reverse();E.push(_);const S=x.getParents().reverse();S.push(x);const C=Math.min(E.length,S.length);let k;for(k=0;k<C&&E[k]===S[k];k++);const N=(P,M)=>{let I;for(let U=k;U<P.length;U++){const B=P[U];if(or(B))return;!I&&M(B)&&(I=B)}return I},T=N(E,Cn),$=T&&N(S,P=>v.has(P.getKey())&&Cn(P));return $&&ao($).length>0?null:T&&$?[T,$]:null})(d,f,l);if(h){const[g,m]=h;po(g,"previous").splice(0,m.getChildren());let v=m.getParent();for(m.remove(!0);v&&v.isEmpty();){const _=v;v=v.getParent(),_.remove(!0)}}else if(f){const g=(function(_){if(uo(_)){const x=_.origin;if(Cn(x))return x}else{const x=_.getParentAtCaret();if(x&&Cn(x))return x}return null})(f),m=g&&g.getParent(),v=g&&g.getParents().findLast(Tc);if(g&&m&&!Rr(m)&&g.isEmpty()&&l.has(g.getKey())&&ao(g).length===0&&(!v||l.has(v.getKey()))){g.remove(!0);let _=m;for(;_&&!Rr(_)&&_.isEmpty();){const x=_.getParent();if(x&&Rr(x)&&x.getChildrenSize()<=1)break;const E=_;_=x,E.remove(!0)}}}const p=[d,f,...s,...a].find(T_);if(p)return Wm(ua(Fi(p),e.direction));ee(269,JSON.stringify(s.map(g=>g.origin.__key)))}function Fi(e){const t=(function(i){let o=i;for(;uo(o);){const s=MS(o);if(!uo(s))break;o=s}return o})(e.getLatest()),{direction:r}=t;if(re(t.origin))return lo(t)?t:ul(t.origin,r,r);const n=t.getAdjacentCaret();return ll(n)&&re(n.origin)?ul(n.origin,r,yl(r)):t}function zS(e){return lo(e)&&e.offset!==_s(e.origin,e.direction)}function ua(e,t){return e.direction===t?e:e.getFlipped()}function US(e,t){return e.direction===t?e:Oo(ua(e.focus,t),ua(e.anchor,t))}function p1(e,t,r){let n=po(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return ua(n,r)}function RZ(e){const{origin:t,offset:r,direction:n}=e;if(r===_s(t,n))return e.getSiblingCaret();if(r===_s(t,yl(n)))return Tu(e.getSiblingCaret());const[i]=t.splitText(r);return re(i)||ee(281),ua(Dt(i,"next"),n)}function AZ(e,t){return!0}function T6(e,{$copyElementNode:t=Un,$splitTextPointCaretNext:r=RZ,rootMode:n="shadowRoot",$shouldSplit:i=AZ,removeEmptyDestination:o=!1}={}){if(lo(e))return r(e);const s=e.getParentCaret(n);if(s){const{origin:a}=s;if(uo(e)){const u=Tu(s);if(o&&a.isEmpty())return a.remove(),u;if(!a.canBeEmpty()||!i(a,"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&&a.canBeEmpty()&&i(a,"last"))&&s.insert(t(a).splice(0,0,l))}return s}function N6(e,t,r){let n=ua(t,"next");lo(n)&&(n.offset===0?n=Dt(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=Dt(n.origin,"next"))),n.origin.is(e)&&(ll(n)||ee(342,e.getKey(),e.getType()),n=Tu(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=T6(i,r))n=i;return lo(n)&&ee(283),n.insert(e.isInline()?Lt().append(e):e),ua(Dt(e.getLatest(),"next"),t.direction)}function BS(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function Zs(...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 ws(e,...t){const r=Zs(...t);r.length>0&&e.classList.add(...r)}function jS(e,...t){const r=Zs(...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 $6(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 D6(e){return $6(Rr(e)?e:e.getParentOrThrow())}function Ip(e){const t=D6(e);return t!==null&&t.direction==="rtl"}function F6(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!Di(t)&&n!==null){const[i,o]=n,s=e.isBackward(),a=i.getNode(),l=o.getNode(),u=t.is(a),d=t.is(l);if(u||d){const[f,h]=i1(e),p=a.is(l),g=t.is(s?l:a),m=t.is(s?a:l);let v,_=0;p?(_=f>h?h:f,v=f>h?f:h):g?(_=s?h:f,v=void 0):m&&(_=0,v=s?f:h);const x=t.__text.slice(_,v);x!==t.__text&&(r==="clone"&&(t=cZ(t)),t.__text=x)}}return t}function TZ(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function NZ(e,t,r){let n=fi(e,r);if(zS(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 $Z(e,t,r=TZ){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const s=new Map;if(n){const[a,l]=n,u=Jt(a.getNode(),Cn);o=Jt(l.getNode(),Cn);const d=e.isBackward()?"previous":"next";i=V(o)&&!o.is(u)&&(function(f,h,p){const g=f.getNode();return(!V(g)||!g.isEmpty())&&NZ(f,h,p)})(l,o,yl(d)),V(u)&&s.set(u.getKey(),u),V(o)&&!i&&s.set(o.getKey(),o)}for(const a of e.getNodes())if(V(a)&&Cn(a)){if(i&&a.is(o))continue;s.set(a.getKey(),a)}else if(!n){const l=Jt(a,Cn);V(l)&&s.set(l.getKey(),l)}for(const a of s.values()){const l=t();r(a,l),a.replace(l,!0)}}function I6(e){const t=P6(e);return t!==null&&t.writingMode==="vertical-rl"}function P6(e){const t=e.anchor.getNode();return V(t)?$6(t):D6(t)}function zR(e,t){let r=I6(e)?!t:t;O6(e)&&(r=!r);const n=fi(e.focus,r?"previous":"next");if(zS(n))return!1;if(lo(n)&&!au(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(re(i)&&!au(i))return!0}for(const i of Hm(n)){if(uo(i))return!i.origin.isInline();if(!V(i.origin)){if(ut(i.origin))return!0;break}}return!1}function DZ(e,t,r,n){e.modify(t?"extend":"move",r,n)}function O6(e){const t=P6(e);return t!==null&&t.direction==="rtl"}function UR(e,t,r){const n=O6(e);let i;i=I6(e)||n?!r:r,DZ(e,t,i,"character")}function FZ(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 IZ(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function PZ(e){const t=Jt(e,r=>V(r)&&!r.isInline());return V(t)||FZ(4,e.__key),t}function Ha(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Pp(e){let t=null;if(Ha(e,DragEvent)?t=e.dataTransfer:Ha(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 BR(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],s=o.getKey();if(r.has(s))continue;const a=Jt(o,u=>V(u)&&!u.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!r.has(l)&&(r.add(l),e(a))}return r.size>0}const OZ=Symbol.for("preact-signals");function qS(){if(Wl>1)return void Wl--;let e,t=!1;for(!(function(){let r=$g;for($g=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();Ef!==void 0;){let r=Ef;for(Ef=void 0,Dg++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&M6(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Dg=0,Wl--,t)throw e}let Bt,Ef;function jR(e){const t=Bt;Bt=void 0;try{return e()}finally{Bt=t}}let $g,Wl=0,Dg=0,qR=0,j0=0;function VR(e){if(Bt===void 0)return;let t=e.n;return t===void 0||t.t!==Bt?(t={i:0,S:e,p:Bt.s,n:void 0,t:Bt,e:void 0,x:void 0,r:t},Bt.s!==void 0&&(Bt.s.n=t),Bt.s=t,e.n=t,32&Bt.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=Bt.s,t.n=void 0,Bt.s.n=t,Bt.s=t),t):void 0}function qn(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 MZ(e,t){return new qn(e,t)}function M6(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 KR(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 L6(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){qn.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 z6(e){const t=e.m;if(e.m=void 0,typeof t=="function"){Wl++;const r=Bt;Bt=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,VS(e),n}finally{Bt=r,qS()}}}function VS(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,z6(e)}function LZ(e){if(Bt!==this)throw new Error("Out-of-order effect");L6(this),Bt=e,this.f&=-2,8&this.f&&VS(this),qS()}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 zZ(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}qn.prototype.brand=OZ,qn.prototype.h=function(){return!0},qn.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:jR(()=>{var r;(r=this.W)==null||r.call(this)}))},qn.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&&jR(()=>{var n;(n=this.Z)==null||n.call(this)}))}},qn.prototype.subscribe=function(e){return zZ(()=>{const t=this.value,r=Bt;Bt=void 0;try{e(t)}finally{Bt=r}},{name:"sub"})},qn.prototype.valueOf=function(){return this.value},qn.prototype.toString=function(){return this.value+""},qn.prototype.toJSON=function(){return this.value},qn.prototype.peek=function(){const e=Bt;Bt=void 0;try{return this.value}finally{Bt=e}},Object.defineProperty(qn.prototype,"value",{get(){const e=VR(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Dg>100)throw new Error("Cycle detected");(function(t){Wl!==0&&Dg===0&&t.l!==qR&&(t.l=qR,$g={S:t,v:t.v,i:t.i,o:$g})})(this),this.v=e,this.i++,j0++,Wl++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{qS()}}}}),Hu.prototype=new qn,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&&!M6(this))return this.f&=-2,!0;const e=Bt;try{KR(this),Bt=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 Bt=e,L6(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)}qn.prototype.S.call(this,e)},Hu.prototype.U=function(e){if(this.t!==void 0&&(qn.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=VR(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,z6(this),KR(this),Wl++;const e=Bt;return Bt=this,LZ.bind(this,e)},oc.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ef,Ef=this)},oc.prototype.d=function(){this.f|=8,1&this.f||VS(this)},oc.prototype.dispose=function(){this.d()};function UZ(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function Zt(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 U6;try{U6="0.48.0+prod.esm"}catch{}const BZ=U6??'"<unknown>+source"',jZ=new Set(["__proto__","constructor","prototype"]);function B6(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!jZ.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=B6(r[i],n[i]));return e}return t}const KS=0,g1=1,j6=2,N_=3,Op=4,Wu=5,$_=6,qd=7;function D_(e){return e.id===KS}function q6(e){return e.id===j6}function qZ(e){return(function(t){return t.id===g1})(e)||Zt(305,String(e.id),String(g1)),Object.assign(e,{id:j6})}const VZ=new Set;let KZ=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:KS}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):BS;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;q6(r)||Zt(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(a,l,u){return Object.assign(a,{config:l,id:N_,registerState:u})})(r,this.mergeConfigs(),n);let s;this.state=o,this.extension.init&&(s=this.extension.init(t,o.config,n)),this.state=(function(a,l,u){return Object.assign(a,{id:Op,initResult:l,registerState:u})})(o,s,i)}build(t){const r=this.state;let n;r.id!==Op&&Zt(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,s,a){return Object.assign(o,{id:Wu,output:s,registerState:a})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==Wu&&Zt(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),()=>{const o=this.state;o.id!==qd&&Zt(309,String(n.id),String(qd)),this.state=(function(s){return Object.assign(s,{id:Wu})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==$_&&Zt(310,String(r.id),String($_)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:qd})})(r),n}getSignal(){return this._signal===void 0&&Zt(311),this._signal}getInitResult(){this.extension.init===void 0&&Zt(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Op})(t)||Zt(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>=N_})(t)||Zt(314,String(t.id),String(N_)),{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&&Zt(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&Zt(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=qd})(t)||Zt(316,String(t.id),String(qd)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||VZ}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)||Zt(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const HR={tag:xf};function HZ(){const e=Wr();e.isEmpty()&&e.append(Lt())}const WZ={config:{setOptions:HR,updateOptions:HR},init:({$initialEditorState:e=HZ})=>({$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(MX(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 s=e.parseEditorState(o);e.setEditorState(s,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[cd,va,dd,ad,fd]},WR=Symbol.for("@lexical/extension/LexicalBuilder");function GR(){}function GZ(e){throw e}function Mp(e){return Array.isArray(e)?e:[e]}const F_=BZ;class wf{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(WZ)];for(const n of t)r.push(Mp(n));return new wf(r)}static maybeFromEditor(t){const r=t[WR];return r&&(r.PACKAGE_VERSION!==F_&&Zt(292,r.PACKAGE_VERSION,F_),r instanceof wf||Zt(293)),r}static fromEditor(t){const r=wf.maybeFromEditor(t);return r===void 0&&Zt(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(ES({...i,...r?{onError:s=>{r(s,o)}}:{},...n?{onWarn:s=>{n(s,o)}}:{}}),{[WR]:this});for(const s of this.sortedExtensionReps())s.build(o);return o}buildEditor(){let t=GR;function r(){try{t()}finally{t=GR}}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&&Zt(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&&Zt(296);const r=Mp(t),[n]=r;typeof n.name!="string"&&Zt(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&Zt(298,n.name),!i){i=new KZ(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&Zt(299,n.name,o);for(const s of n.conflictsWith||[])this.extensionNameMap.has(s)&&Zt(299,n.name,s),this.conflicts.set(s,n.name);for(const s of n.dependencies||[]){const a=Mp(s);this.addEdge(n.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[s,a]of n.peerDependencies||[])this.addEdge(n.name,s,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(q6(o))return;const s=n.extension.name;var a;D_(o)||Zt(300,s,i||"[unknown]"),D_(a=o)||Zt(304,String(a.id),String(KS)),o=Object.assign(a,{id:g1}),n.state=o;const l=this.outgoingConfigEdges.get(s);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&r(d,s)}o=qZ(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 s=this.extensionNameMap.get(i);if(s)for(const a of o)s.configs.add(a)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&Zt(301,n.name);for(const s of i)o.configs.add(s)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const s of r){const a=s.register(t,o);a&&i.push(a)}for(const s of r){const a=s.afterRegistration(t);a&&i.push(a)}return cl(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},s={},a=this.sortedExtensionReps();for(const d of a){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 UZ(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&Zt(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&&B6(s,f.theme)}Object.keys(s).length>0&&(t.theme=s),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 a)d.init(t);return t.onError||(t.onError=GZ),t}}function Gh(e,t){const r=wf.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function JZ(e){return Gh(yr(),e)}class Gm extends yS{static getType(){return"horizontalrule"}static clone(t){return new Gm(t.__key)}static importJSON(t){return HS().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:QZ,priority:0})}}exportDOM(){return{element:tr().createElement("hr")}}createDOM(t){const r=tr().createElement("hr");return ws(r,t.theme.hr),r}getTextContent(){return`
|
|
28
|
+
`}isInline(){return!1}updateDOM(){return!1}}function QZ(){return{node:HS()}}function HS(){return x6(Gm)}function md(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 Nc;function V6(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function K6(e){return Nc&&Nc.editor===e?Nc:void 0}function YZ(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n(V6(e,r))]}return t}function XZ(e,t){let r=t;for(const n of e){const[i,o]=YZ(r,n),s=i.key;if(r===t&&V6(r,i)===o)continue;const a=r===t||r===void 0?ZZ(t):r;a[s]=o,r=a}return r}function ZZ(e){return Object.create(e||null)}function H6(e,t){return[e,t]}function eee(e,t,r,n=yr()){const i=Nc,o=K6(n);try{return Nc={...o,editor:n,[e]:t},r()}finally{Nc=i}}function tee(e,t=()=>{}){return(r,n=yr())=>i=>{const o=K6(n),s=o&&o[e],a=XZ(r,s||t(n));return a&&a!==s?eee(e,a,i,n):i()}}function W6(e,t,r,n){return Object.assign(qh(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function ree(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 s=0;s<i.style.length;s++)o.add(i.style[s]);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 s of Array.from(o)){if(!Ha(s,CSSStyleRule))continue;let a;try{a=t.querySelectorAll(s.selectorText)}catch{continue}for(const l of Array.from(a)){if(!Ze(l))continue;const u=n(l);for(let d=0;d<s.style.length;d++){const f=s.style[d];u.has(f)||l.style.setProperty(f,s.style.getPropertyValue(f),s.style.getPropertyPriority(f))}}}}}catch{}}const G6="@lexical/html/DOM",J6=Symbol.for("@lexical/html/DOMExportContext"),nee=Symbol.for("@lexical/html/DOMImportContext");function iee(e,t,r){return W6(J6,e,t,r)}const oee=iee("isExport",Boolean);function see(e){const t=Gh(e,G6);return t?t.output.defaults:void 0}function aee(e){const t=Gh(e,G6);return t?t.output.runtime:void 0}function lee(e=yr()){const t=aee(e);return t?t.getSessionConfig():qm(e)}const uee=tee(J6,see),Jm=Symbol.for("@lexical/html/SelectorImpl");function fh(e,t){const r={kind:"element",predicate:(n=t,n.length===0?Ze:n.length===1?n[0]:(o,s)=>{for(const a of n)if(!a(o,s))return!1;return!0}),tags:e};var n;const i=o=>fh(e,[...t,o]);return{[Jm]:r,attr:(o,s,a)=>i(m1(o,s,a)),classAll:(...o)=>i(Y6(o)),classAny:(...o)=>i((function(s){const a=Q6(s);return a.length===0?()=>!1:l=>{if(!Ze(l))return!1;const u=l.classList;for(const d of a)if(u.contains(d))return!0;return!1}})(o)),styleAny:(o,s,a)=>i((function(l,u,d){if(typeof u=="string")return f=>Ze(f)&&f.style.getPropertyValue(l)===u;if(u instanceof RegExp){const f=d&&d.capture,h=u;return(p,g)=>{if(!Ze(p))return!1;const m=p.style.getPropertyValue(l);if(!m)return!1;const v=m.match(h);return v!==null&&(f!==void 0&&(g[f]=v),!0)}}md(362,JSON.stringify(l))})(o,s,a))}}function Q6(e){const t=[];for(const r of e)r&&t.push(r);return t}function Y6(e){const t=Q6(e);return t.length===0?()=>!0:r=>{if(!Ze(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function m1(e,t,r){if(t===!0)return n=>Ze(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>Ze(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,s)=>{if(!Ze(o))return!1;const a=o.getAttribute(e);if(a==null)return!1;const l=a.match(i);return l!==null&&(n!==void 0&&(s[n]=l),!0)}}md(361,JSON.stringify(e))}const cee={kind:"text",predicate:yi,tags:new Set},dee={[Jm]:cee},fee={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},hee={[Jm]:fee},hc={any:()=>fh(new Set,[]),comment:()=>hee,tag(...e){e.length>0||md(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return fh(t,[])},text:()=>dee};function X6(e,t){return Ze(e)&&e.nodeName===t.toUpperCase()}const Z6=/[A-Za-z0-9_-]/;let pee=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()&&Z6.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||md(364,String(this.pos+1),r,this.source)}};function gee(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(Z6.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(m1("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let s=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const a=e.peek();a==='"'||a==="'"?s=e.readQuoted():(s=e.readIdent(),e.assert(s!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(m1(o,s))}}}return n.length>0&&r.push(Y6(n)),{predicates:r,tags:t}}function mee(e){const t=new pee(e,0),r=[];for(;;){const i=gee(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 fh(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 fh(n,[(i,o)=>{for(const s of r){const a=i.nodeName;if(s.tags.size>0&&!s.tags.has(a))continue;let l=!0;for(const u of s.predicates)if(!u(i,o)){l=!1;break}if(l)return!0}return!1}])}function WS(e,t,r){return W6(nee,e,t,r)}const v1=WS("textFormat",()=>0),vee=WS("textStyle",()=>({}));function _ee(e){if(!Ze(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function bee(e){if(yi(e))return!0;if(!Ze(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Hc(e)&&Ag(e)}const yee=WS("whitespaceConfig",()=>({isInline:bee,preservesWhitespace:_ee}));function GS(e){return Bc(e)||ut(e)&&!e.isInline()}function eM(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(GS(o)){if(i(),V(o)){const s=eM(o.getChildren(),t);o.splice(0,o.getChildrenSize(),s)}r.push(o)}else n.push(o);return i(),r}function tM(e,t){if(!Ze(t))return e;const r=t.style.textAlign;if(!JS(r))return e;for(const n of e)Bc(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function xee(e,t,r){e.length===1&&Yn(e[0])&&(e=[]);const n=Lt();if(Ze(r)){const i=r.style.textAlign;JS(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const rM={$accepts:GS,$packageRun:xee,name:"BlockSchema"},Nu=hc,See=new Set(["center","end","justify","left","right","start"]);function JS(e){return See.has(e)}const Eee={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"}},wee={CODE:AY,MARK:dS},kee=new Set(["font-weight","font-style","text-decoration","vertical-align"]),Cee={$import:(e,t)=>{const r=e.get(v1),n=Eee[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?(s=n,{fontStyle:(a=i).fontStyle||s.fontStyle,fontWeight:a.fontWeight||s.fontWeight,textDecoration:a.textDecoration||s.textDecoration,verticalAlign:a.verticalAlign||s.verticalAlign}):i;var s,a;let l=(u=r,d=(function(h){let p=0,g=0;const{fontWeight:m,fontStyle:v,textDecoration:_,verticalAlign:x}=h;if(m==="700"||m==="bold"?p|=RC:m!=="normal"&&m!=="400"||(g|=RC),v==="italic"?p|=AC:v==="normal"&&(g|=AC),_){const E=_.split(" ");E.includes("underline")&&(p|=NC),E.includes("line-through")&&(p|=TC),E.includes("none")&&(g|=NC|TC)}return x==="sub"?(p|=m_,g|=v_):x==="super"?(p|=v_,g|=m_):x==="baseline"&&(g|=m_|v_),{clear:g,set:p}})(o),u&~d.clear|d.set);var u,d;const f=wee[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[H6(v1,l)]})},match:Nu.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function JR(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const s=n.parentNode;if(s===null)return null;n=s}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(yi(n))return n;if(n.nodeName==="BR")return null}}function QR(e,t){return t!==0&&re(e)?e.setFormat(t):e}function YR(e,t){if(re(e)){const r=(function(n){let i="";for(const o in n)kee.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const Ree={$import:(e,t)=>{const r=e.get(v1),n=e.get(vee),i=e.get(yee);if((function(a,l){let u=a.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(t,i)){const a=ah(t.textContent||"");for(const l of a)QR(l,r),YR(l,n);return a}const o=(function(a,l){let u=(a.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let d=a,f=!0;for(;d!==null&&(d=JR(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=a,f=!0;for(;d!==null&&(d=JR(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 s=Cr(o);return QR(s,r),YR(s,n),[s]},match:Nu.text(),name:"@lexical/html/#text"},Aee={$import:()=>[],match:Nu.tag("script","style"),name:"@lexical/html/script-style-ignore"},Tee={$import:(e,t)=>e6(t)||t6(t)?[]:[jo()],match:Nu.tag("br"),name:"@lexical/html/br"},Nee={$import:(e,t)=>{const r=Lt();if(Ns(r,t),Au(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&JS(n)&&r.setFormat(n)}return _o(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Nu.tag("p"),name:"@lexical/html/p"},$ee={$import:(e,t,r)=>yr().hasNode(Gm)?[HS()]:r(),match:Nu.tag("hr"),name:"@lexical/html/hr"};Nu.any();function Dee(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 Fee(e){const t=[],r=new Map,n=[],i=[],o=[],s=new Set;e.forEach((l,u)=>{const d=(function(h){const p=h[Jm];return p===void 0&&md(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&&s.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 a=new Map;if(n.length===0)for(const[l,u]of r)a.set(l,u);else for(const[l,u]of r)a.set(l,Dee(u,n));return{byTag:a,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function Iee(e){const t=[];for(const r of e)if(Pee(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function Pee(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function nM(e){const t=Iee(e);return{__type:"CompiledOverlayRules",dispatch:Fee(t),rules:t}}hc.any();const bn={any:hc.any,comment:hc.comment,css:mee,tag:hc.tag,text:hc.text},iM=new Set(["STYLE","SCRIPT"]);function Oee(e,t){ree(t);const r=Cu(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!iM.has(o.nodeName)){const s=sM(o,e,i,!1);if(s!==null)for(const a of s)n.push(a)}return(function(o){for(const s of o)s.getParent()&&s.getNextSibling()instanceof SS&&s.insertAfter(jo());for(const s of o){const a=s.getParent();a&&a.splice(s.getIndexWithinParent(),1,s.getChildren())}})(i),n}function Mee(e,t=null,r=yr()){return uee([H6(oee,!0)],r)(()=>{const n=Wr(),i=lee(r),o=te(t)?Vm(t.anchor.getNode()):null,s=e.append.bind(e);for(const a of(V(o)?o:n).getChildren())oM(r,a,s,t,i);return e})}function Lee(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&md(338),FX(e),Mee(tr().createElement("div"),t,e).innerHTML}function oM(e,t,r,n=null,i=qm(e)){let o=i.$shouldInclude(t,n,e);const s=i.$shouldExclude(t,n,e);let a=t;n!==null&&re(t)&&(a=F6(n,t,"clone"));const l=i.$exportDOM(a,e),{element:u,after:d,append:f,$getChildNodes:h}=l;if(!u)return!1;const p=tr().createDocumentFragment(),g=h?h():V(a)?a.getChildren():[],m=o&&Yt(n)&&V(t)?null:n,v=p.append.bind(p);for(const _ of g){const x=oM(e,_,v,m,i);!o&&x&&i.$extractWithChild(t,_,n,"html",e)&&(o=!0)}if(o&&!s){if((Ze(u)||c1(u))&&(f?f(p):u.append(p)),r(u),d){const _=d.call(a,u);_&&(c1(u)?u.replaceChildren(_):u.replaceWith(_))}}else r(p);return o}function sM(e,t,r,n,i=new Map,o){const s=[];if(iM.has(e.nodeName))return s;let a=null;const l=(function(g,m){const{nodeName:v}=g,_=m._htmlConversions.get(v.toLowerCase());let x=null;if(_!==void 0)for(const E of _){const S=E(g);S!==null&&(x===null||(x.priority||0)<=(S.priority||0))&&(x=S)}return x!==null?x.conversion:null})(e,t),u=l?l(e):null;let d=null;if(u!==null){d=u.after;const g=u.node;if(a=Array.isArray(g)?g[g.length-1]:g,a!==null){for(const[,m]of i)if(a=m(a,o),!a)break;a&&s.push(...Array.isArray(g)?g:[a])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const f=e.childNodes;let h=[];const p=(a==null||!or(a))&&(a!=null&&Bc(a)||n);for(let g=0;g<f.length;g++)h.push(...sM(f[g],t,r,p,new Map(i),a));if(d!=null&&(h=d(h)),Hc(e)&&(h=zee(e,h,p?()=>{const g=new SS;return r.push(g),g}:Lt)),a==null)if(h.length>0)for(const g of h)s.push(g);else Hc(e)&&(function(g){return g.nextSibling==null||g.previousSibling==null?!1:Ag(g.nextSibling)&&Ag(g.previousSibling)})(e)&&s.push(jo());else V(a)&&a.append(...h);return s}function zee(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let s=0;s<t.length;s++){const a=t[s];if(Bc(a))n&&!a.getFormat()&&a.setFormat(n),i.push(a);else if(o.push(a),s===t.length-1||s<t.length-1&&Bc(t[s+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function La(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 Uee(e){let t=1,r=e.getParent();for(;r!=null;){if(Rt(r)){const n=r.getParent();if(ot(n)){t++,r=n.getParent();continue}La(40)}return t}return t}function _1(e){const t=e.getParent();ot(t)||La(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),ot(n)&&(r=n);return r}function aM(e){let t=[];const r=e.getChildren().filter(Rt);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();ot(o)?t=t.concat(aM(o)):t.push(i)}return t}function eo(e){return Rt(e)&&ot(e.getFirstChild())}function lM(e,t){return Rt(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function XR(e){const t=he();if(t!==null){let r=t.getNodes();if(te(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),s=o.getParent();if(or(o)){const a=o.getFirstChild();if(a)r=a.selectStart().getNodes();else{const l=Lt();o.append(l),r=l.select().getNodes()}}else if(lM(o,r)){const a=Mo(e);if(or(s)){o.replace(a);const l=ks();V(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),a.append(l)}else if(Rt(o)){const l=o.getParentOrThrow();mu(a,l.getChildren()),l.replace(a)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(V(o)&&o.isEmpty()&&!Rt(o)&&!n.has(o.getKey())){ZR(o,e);continue}let s=i6(o)?o.getParent():Rt(o)&&o.isEmpty()?o:null;for(;s!=null;){const a=s.getKey();if(ot(s)){if(!n.has(a)){const l=Mo(e);mu(l,s.getChildren()),s.replace(l),n.add(a)}break}{const l=s.getParent();if(or(l)&&!n.has(a)){n.add(a),ZR(s,e);break}s=l}}}}}function mu(e,t){e.splice(e.getChildrenSize(),0,t)}function ZR(e,t){if(ot(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=ks();let o;if(mu(i,e.getChildren()),ot(r)&&t===r.getListType())r.append(i),ot(n)&&t===n.getListType()&&(mu(r,n.getChildren()),n.remove()),o=r;else if(ot(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const a=Mo(t);a.append(i),e.replace(a),o=a}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const s=he();return te(s)&&(o.getKey()===s.anchor.key&&s.anchor.set(i.getKey(),s.anchor.offset,"element"),o.getKey()===s.focus.key&&s.focus.set(i.getKey(),s.focus.offset,"element")),e.remove(),o}function QS(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&eo(r)&&eo(n)&&(QS(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function Bee(){const e=he();if(te(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(lM(n,r))t.add(_1(n));else for(let i=0;i<r.length;i++){const o=r[i];if(i6(o)){const s=IZ(o,$u);s!=null&&t.add(_1(s))}}for(const i of t){let o=i;const s=aM(i);for(const a of s){const l=Lt().setTextStyle(e.style).setTextFormat(e.format);mu(l,a.getChildren()),o.insertAfter(l),o=l,a.__key===e.anchor.key&&gu(e.anchor,Fi(po(l,"next"))),a.__key===e.focus.key&&gu(e.focus,Fi(po(l,"next"))),a.remove()}i.remove()}}}function uM(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())Rt(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),ot(n.getFirstChild())||r++)}function jee(e){const t=new Set;if(eo(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(eo(n)&&eo(i)){const o=i.getFirstChild();if(ot(o)){o.append(e);const s=n.getFirstChild();ot(s)&&(mu(o,s.getChildren()),n.remove(),t.add(n.getKey()))}}else if(eo(n)){const o=n.getFirstChild();if(ot(o)){const s=o.getFirstChild();s!==null&&s.insertBefore(e)}}else if(eo(i)){const o=i.getFirstChild();ot(o)&&o.append(e)}else if(ot(r)){const o=Un(e),s=Un(r);o.append(s),s.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function eA(e){if(eo(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(ot(r?r.getParent():void 0)&&Rt(r)&&ot(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),s=Un(t);o.append(s),e.getPreviousSiblings().forEach(u=>s.append(u));const a=Un(e),l=Un(t);a.append(l),mu(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(a),r.replace(e)}}}function qee(e=!1){const t=he();if(!te(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(Rt(r)&&r.getChildrenSize()===0)n=r;else if(re(r)){const u=r.getParent();Rt(u)&&u.getChildren().every(d=>re(d)&&d.getTextContent().trim()==="")&&(n=u)}if(n===null)return!1;const i=_1(n),o=n.getParent();ot(o)||La(40);const s=o.getParent();let a;if(or(s))a=Lt(),i.insertAfter(a);else{if(!Rt(s))return!1;a=Un(s),s.insertAfter(a)}a.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(Rt(a)){const f=Un(a);f.append(d),a.insertAfter(f)}else a.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||!Rt(f)&&!ot(f))break;d=f}d.remove()})(n),!0}let $u=class extends mi{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(ot(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();ot(n)||La(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:s}of Dt(t,o)){if(!Rt(s))break;i.push(s)}}t.insertBefore(n),n.splice(0,0,i),or(r)||(N6(n,Tu(Dt(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:mi,importDOM:{li:()=>({conversion:Vee,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=tr().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(s,a){const l=a.getParent();!ot(l)||l.getListType()!=="check"||ot(a.getFirstChild())?(s.removeAttribute("role"),s.removeAttribute("tabIndex"),s.removeAttribute("aria-checked")):(s.setAttribute("role","checkbox"),s.setAttribute("tabIndex","-1"),s.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(s,a,l){const u=a.list;if(!u)return;const d=u.listitem,f=u.nested&&u.nested.listitem,h=l.getParent(),p=ot(h)&&h.getListType()==="check",g=l.getChecked(),m=l.getChildren().some(x=>ot(x)),v=[];u.listitemChecked!==void 0&&v.push(u.listitemChecked),u.listitemUnchecked!==void 0&&v.push(u.listitemUnchecked),f!==void 0&&v.push(...Zs(f)),v.length>0&&jS(s,...v);const _=[];if(d!==void 0&&_.push(...Zs(d)),p){const x=g?u.listitemChecked:u.listitemUnchecked;x!==void 0&&_.push(x)}f!==void 0&&m&&_.push(...Zs(f)),_.length>0&&ws(s,..._)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&Cc(r.style,o,i),(function(s,a,l){const u=a.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===u)return;const f=_g(u);for(const h in f)s.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in _g(d))h in f||s.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),eo(this)?{after(o){if(Ze(o)){const s=o.previousElementSibling;if(Ze(s)&&s.nodeName==="LI"){for(;o.firstChild;)s.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(Rt(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!ot(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const s=Un(n);let a=this.getNextSibling();for(;a;){const l=a;a=a.getNextSibling(),s.append(l)}n.insertAfter(t),t.insertAfter(s)}const i=this.__key;let o=0;if(r&&(V(t)||La(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&V(t)){const s=he();if(te(s))for(const a of s.getStartEndPoints())a.key===i&&a.type==="element"&&a.set(t.getKey(),o+a.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(ot(n)||La(39),Rt(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=Un(n);i.forEach(s=>o.append(s)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&eo(r)&&eo(n)&&(QS(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(eo(this))return!1;const r=this.getParentOrThrow();if(Rt(r.getParentOrThrow()))return eA(this),!0;const n=Lt().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 ot(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(;Rt(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&La(117),(t=Math.floor(t))>=0||La(199);let r=this.getIndent();for(;r!==t;)r<t?(jee(this),r++):(eA(this),r--);return this}canInsertAfter(t){return Rt(t)}canReplaceWith(t){return Rt(t)}canMergeWith(t){return Rt(t)||hd(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 Mo("bullet")}canMergeWhenEmpty(){return!0}};function Vee(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return tA(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 tA(n.children[0])}const t=e.getAttribute("aria-checked"),r=ks(t==="true"||t!=="false"&&void 0);return Ns(r,e),{after:cM.bind(null,r),node:_o(r,e)}}function tA(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=ks(e.hasAttribute("checked"));return{after:cM.bind(null,t),node:t}}function cM(e,t){const r=t[0];return t.length===1&&hd(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function ks(e){return Jo(new $u(void 0,e))}function Rt(e){return e instanceof $u}let Jh=class extends mi{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();ot(n)&&r.getListType()===n.getListType()&&QS(r,n)})(t),uM(t)},extends:mi,importDOM:{ol:()=>({conversion:nA,priority:0}),ul:()=>({conversion:nA,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=Kee[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=tr().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,rA(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(rA(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 Ze(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 s=n[o];Rt(s)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!V(s)||ot(s)||s.isInline()?s:Cr(s.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return Rt(t)}createListItemNode(){return ks()}};function rA(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const s=o[`${r.__tag}Depth`]||[],a=Uee(r)-1,l=a%s.length,u=s[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(...Zs(u));for(let g=0;g<s.length;g++)g!==l&&i.push(r.__tag+g)}if(f!==void 0){const g=Zs(f);a>1?n.push(...g):i.push(...g)}}i.length>0&&jS(e,...i),n.length>0&&ws(e,...n)}function nA(e){let t;if((function(r){return Ze(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=Mo("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(Ze(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?Mo("check"):Mo("bullet");return _o(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),s=[];for(let a=0;a<n.length;a++){const l=n[a];if(Rt(l)){s.push(l);const u=l.getChildren();u.length>1&&u.forEach(d=>{ot(d)&&s.push(o().append(d))})}else s.push(o().append(l))}return s})(r,t),node:t}}const Kee={ol:"number",ul:"bullet"};function Mo(e="number",t=1){return Jo(new Jh(e,t))}function ot(e){return e instanceof Jh}function Hee(e){const t=[];for(const r of e)if(Rt(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)ot(i)&&t.push(ks().append(i))}else t.push(ks().append(r));return t}const Wee={$import:(e,t)=>{let r;var n;return X6(t,"ol")?r=Mo("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?Mo("check"):Mo("bullet"),_o(r,t),[r.splice(0,0,tM(Hee(e.$importChildren(t)),t))]},match:bn.tag("ol","ul"),name:"@lexical/list/list"};function dM(e,t){if(t.length!==1)return t;const r=t[0];return hd(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function fM(e){const t=s=>GS(s)&&!ot(s);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const s of e)t(s)?(i(),r.push(V(s)?s.getChildren():[s])):n.push(s);i();const o=[];for(const s of r)o.length>0&&o.push(jo()),o.push(...s);return o}const Gee={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=ks(r==="true"||r!=="false"&&void 0);return Ns(n,t),_o(n,t),[n.splice(0,0,fM(dM(n,e.$importChildren(t))))]},match:bn.tag("li"),name:"@lexical/list/li"};function iA(e,t,r){const n=X6(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=ks(n.hasAttribute("checked"));return Ns(i,t),_o(i,t),[i.splice(0,0,fM(dM(i,e.$importChildren(t))))]}bn.tag("li").classAll("task-list-item"),bn.tag("li").classAll("joplin-checkbox");const Jee=je("UPDATE_LIST_START_COMMAND"),hM=je("INSERT_UNORDERED_LIST_COMMAND"),pM=je("INSERT_ORDERED_LIST_COMMAND"),Qee=je("REMOVE_LIST_COMMAND");function Yee(e,t){return cl(e.registerCommand(pM,()=>(XR("number"),!0),ic),e.registerCommand(Jee,r=>{const{listNodeKey:n,newStart:i}=r,o=er(n);return!!ot(o)&&(o.getListType()==="number"&&(o.setStart(i),uM(o)),!0)},ic),e.registerCommand(hM,()=>(XR("bullet"),!0),ic),e.registerCommand(Qee,()=>(Bee(),!0),ic),e.registerCommand(th,()=>qee(!1),ic),e.registerCommand(gS,r=>{if((function(){const s=he();if(!te(s)||!s.isCollapsed()||s.anchor.offset!==0)return!1;const a=s.anchor.getNode(),l=Jt(a,Rt);if(!Rt(l))return!1;const u=l.getFirstDescendant();if(u===null||!l.is(a)&&!u.is(a))return!1;const d=l.getParent();if(!ot(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!ut(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Lt().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(;!Rt(o);){if(o.getPreviousSibling()!==null)return!1;const s=o.getParent();if(s===null)return!1;o=s}return!(!Rt(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},jX),e.registerNodeTransform($u,r=>{const n=r.getFirstChild();if(n){if(re(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(va,r=>{const n=r.getParent();if(Rt(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function Xee(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,s=e._selection;if(i)return 1;if(!(te(o)&&te(s)&&s.isCollapsed()&&o.isCollapsed()))return 0;const a=(function(_,x,E){const S=_._nodeMap,C=[];for(const k of x){const N=S.get(k);N!==void 0&&C.push(N)}for(const[k,N]of E){if(!N)continue;const T=S.get(k);T===void 0||Rr(T)||C.push(T)}return C})(t,r,n);if(a.length===0)return 0;if(a.length>1){const _=t._nodeMap,x=_.get(o.anchor.key),E=_.get(s.anchor.key);return x&&E&&!e._nodeMap.has(x.__key)&&re(x)&&x.__text.length===1&&o.anchor.offset===1?2:0}const l=a[0],u=e._nodeMap.get(l.__key);if(!re(u)||!re(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=s.anchor;if(h.key!==p.key||h.type!=="text")return 0;const g=h.offset,m=p.offset,v=f.length-d.length;return v===1&&m===g-1?2:v===-1&&m===g+1?3:v===-1&&m===g?4:0}function Zee(e,t,r){let n=r(),i=0,o=n,s=0,a=null;return(l,u,d,f,h,p)=>{const g=r();if(p.has(FO)&&(o=n,s=i,a=l),p.has(vg))return i=0,n=g,2;p.has(sh)&&a&&(n=o,i=s,l=a);const m=p.has(NO)||p.has($O)?0:Xee(l,u,f,h,e.isComposing()),v=(()=>{const _=d===null||d.editor===e,x=p.has(TO);if(!x&&_&&p.has(xf))return 0;if(m===1)return 2;if(l===null)return 1;const E=u._selection;return f.size>0||h.size>0?x===!1&&m!==0&&m===i&&g<n+t&&_||f.size===1&&(function(C,k,N){const T=k._nodeMap.get(C),$=N._nodeMap.get(C),P=k._selection,M=N._selection;return!(te(P)&&te(M)&&P.anchor.type==="element"&&P.focus.type==="element"&&M.anchor.type==="text"&&M.focus.type==="text"||!re(T)||!re($)||T.__parent!==$.__parent)&&JSON.stringify(k.read(()=>T.exportJSON()))===JSON.stringify(N.read(()=>$.exportJSON()))})(Array.from(f)[0],l,u)?0:1:E!==null?0:2})();return n=g,i=m,v}}function oA(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function ete(e,t,r,n=Date.now,i,o=null){const s=Zee(e,r,n);return cl(e.registerCommand(Om,()=>((function(a,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),a.dispatchCommand(Tp,!0)),f.length===0&&a.dispatchCommand(Np,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:vg})}})(e,t),!0),lt),e.registerCommand(Mm,()=>((function(a,l,u){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),a.dispatchCommand(Np,!0));const p=d.pop();d.length===0&&a.dispatchCommand(Tp,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:vg})}})(e,t),!0),lt),e.registerCommand(iX,()=>(oA(t),!1),lt),e.registerCommand(oX,()=>(oA(t),e.dispatchCommand(Tp,!1),e.dispatchCommand(Np,!1),!0),lt),e.registerUpdateListener(({editorState:a,prevEditorState:l,dirtyLeaves:u,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,g=t.undoStack,m=h===null?null:h.editorState;if(h!==null&&a===m)return;const v=s(l,a,h,u,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(Tp,!1)),h!==null){g.push({...h});const _=typeof o=="number"||o===null?o:o.peek();_!==null&&g.length>_&&g.splice(0,g.length-_),e.dispatchCommand(Np,!0)}}else if(v===2)return;t.current={editor:e,editorState:a}}))}function tte(){return{current:null,redoStack:[],undoStack:[]}}function rte(e,t){let r=e;for(let n=Dt(e,t);n&&(vM(n.origin)||au(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function nte(e){return rte(e,"previous")}function gM(e,t){for(const r of e.childNodes)if(Ze(r)&&r.tagName===t||gM(r,t))return!0;return!1}const af="data-language",Vd="data-highlight-language",Lp="data-theme";class vd extends mi{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new vd(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=tr().createElement("code");ws(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(af,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Vd,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(af,i):o&&r.removeAttribute(af);const s=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?s&&i?i!==o&&r.setAttribute(Vd,i):r.removeAttribute(Vd):s&&i&&r.setAttribute(Vd,i);const a=this.__theme,l=t.__theme;a?a!==l&&r.setAttribute(Lp,a):l&&r.removeAttribute(Lp);const u=this.__style,d=t.__style;return u!==d&&Cc(r.style,u,d),!1}exportDOM(t){const r=tr().createElement("pre");ws(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(af,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Vd,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)||gM(t,"BR"))?{conversion:sA,priority:1}:null,div:()=>({conversion:ite,priority:1}),pre:()=>({conversion:sA,priority:0}),table:t=>I_(t)?{conversion:ote,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&I_(n)?{conversion:aA,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&I_(r)?{conversion:aA,priority:3}:null}}}static importJSON(t){return Hn().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(!Gh(yr(),"@lexical/code")){const s=ste(t);if(s)return s}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(re(o)){let s=nte(o);const a=[];for(;;)if(au(s))a.push(ld()),s=s.getNextSibling();else{if(!vM(s))break;{let g=0;const m=s.getTextContent(),v=s.getTextContentSize();for(;g<v&&m[g]===" ";)g++;if(g!==0&&a.push(mM(" ".repeat(g))),g!==v)break;s=s.getNextSibling()}}const l=o.splitText(n.offset)[0],u=n.offset===0?0:1,d=l.getIndexWithinParent()+u,f=o.getParentOrThrow(),h=[jo(),...a];f.splice(d,0,h);const p=a[a.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(hh(o)){const{offset:s}=t.anchor;o.splice(s,0,[jo()]),o.select(s+1,s+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Lt();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 Hn(e,t){return x6(vd).setLanguage(e).setTheme(t)}function hh(e){return e instanceof vd}function sA(e){return{node:Hn(e.getAttribute(af))}}function ite(e){const t=e,r=lA(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(lA(i))return!0;i=i.parentElement}return!1})(t)?{node:r?Hn():null}:{node:null}}function ote(){return{node:Hn()}}function aA(){return{node:null}}function lA(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(hh(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(Yn(i)&&Yn(i.getPreviousSibling())){const o=Lt();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class Qm extends va{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new Qm(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 ws(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=P_(n.theme,t.__highlightType),s=P_(n.theme,this.__highlightType);return o!==s&&(o&&jS(r,o),s&&ws(r,s)),i}static importJSON(t){return mM().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 Hn()}}function P_(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function mM(e="",t){return Jo(new Qm(e,t))}function vM(e){return e instanceof Qm}const _M="data-language";function bM(e){return e.style.fontFamily.match("monospace")!==null}function b1(e){let t=e.parentElement;for(;t!==null;){if(bM(t))return!0;t=t.parentElement}return!1}const ate=nM([{$import:(e,t)=>e.$importChildren(t),match:bn.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),lte={$import:(e,t)=>[Hn(t.getAttribute(_M)).splice(0,0,e.$importChildren(t))],match:bn.tag("pre"),name:"@lexical/code/pre"},ute={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[Hn(t.getAttribute(_M)).splice(0,0,e.$importChildren(t))]:r()},match:bn.tag("code"),name:"@lexical/code/code-multiline"};function zp(e){if(!Ze(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 s of Array.from(e.childNodes))if(Ze(s))s.tagName==="DIV"?(o(),r.push(s.textContent||""),t=!0):s.tagName==="BR"?(o(),r.push(""),t=!0):(n+=s.textContent||"",i=!0);else if(yi(s)){const a=s.textContent||"";a.length>0&&(n+=a,i=!0)}return o(),t?r:null}bn.tag("div"),bn.tag("div","br");const dte={$import:(e,t,r)=>bM(t)?[Hn().splice(0,0,e.$importChildren(t))]:b1(t)?e.$importChildren(t):r(),match:bn.tag("div"),name:"@lexical/code/div"};bn.tag("table").classAll("js-file-line-container"),bn.tag("td").classAll("js-file-line");const uA=new Set(["http:","https:","mailto:","sms:","tel:"]);let Qh=class yM extends mi{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new yM(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:s=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=s}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=tr().createElement("a");return this.updateLinkDOM(null,r,t),ws(r,t.theme.link),r}updateLinkDOM(t,r,n){if(_6(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,s=this[o];t&&t[o]===s||(s?r[i]=s:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:fte,priority:1})}}static importJSON(t){return Wc().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=fA(t);try{const n=new URL(fA(t));if(!uA.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&&!uA.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 fte(e){let t=null;if(_6(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=Wc(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Wc(e="",t){return Jo(new Qh(e,t))}function ss(e){return e instanceof Qh}let xM=class SM extends Qh{__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 SM(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?tr().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return cA().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=cA(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function cA(e="",t){return Jo(new xM(e,t))}function sc(e){return e instanceof xM}function dA(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"),s=new URLSearchParams;s.append("code",n);for(const a of i)s.append("v",a);throw o.search=s.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 hte(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,s=he();if(s===null||!te(s)&&!Yt(s))return;if(Yt(s)){const d=s.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=Jt(f,p=>!sc(p)&&ss(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=Jt(f,p=>!sc(p)&&ss(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=Wc(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(s.isCollapsed()&&r===null)for(const d of s.getNodes()){const f=Jt(d,h=>!sc(h)&&ss(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const a=s.extract();if(r===null){const d=new Set;return void a.forEach(f=>{const h=Jt(f,p=>!sc(p)&&ss(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(g,m){const v=new Set(m.filter(T=>g.isParentOf(T)).map(T=>T.getKey())),_=g.getChildren(),x=T=>v.has(T.getKey())||V(T)&&m.some($=>g.isParentOf($)&&T.isParentOf($)),E=_.filter(x);if(E.length===_.length)return _.forEach(T=>g.insertBefore(T)),void g.remove();const S=_.findIndex(x),C=_.findLastIndex(x),k=S===0,N=C===_.length-1;if(k)E.forEach(T=>g.insertBefore(T));else if(N)for(let T=E.length-1;T>=0;T--)g.insertAfter(E[T]);else{for(let $=E.length-1;$>=0;$--)g.insertAfter(E[$]);const T=_.slice(C+1);if(T.length>0){const $=Un(g);E[E.length-1].insertAfter($),T.forEach(P=>$.append(P))}}})(h,a),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(a.length===1){const d=a[0],f=Jt(d,ss);if(f!==null)return u(f)}(function(d){const f=he();if(!te(f))return d();const h=Va(f),p=h.isBackward(),g=dA(h.anchor,p?-1:0),m=dA(h.focus,p?0:-1);if(d(),g||m){const v=he();if(te(v)){const _=v.clone();if(g){const x=g.getParent();x&&_.anchor.set(x.getKey(),g.getIndexWithinParent()+(p?1:0),"element")}if(m){const x=m.getParent();x&&_.focus.set(x.getKey(),m.getIndexWithinParent()+(p?0:1),"element")}vn(Va(_))}}})(()=>{let d=null;for(const f of a){if(!f.isAttached())continue;const h=Jt(f,ss);if(h){u(h);continue}if(V(f)){if(!f.isInline())continue;if(ss(f)){if(!(sc(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const g of f.getChildren())f.insertBefore(g);f.remove();continue}}const p=f.getPreviousSibling();ss(p)&&p.is(d)?p.append(f):(d=Wc(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const pte=/^\+?[0-9\s()-]{5,}$/;function fA(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:pte.test(e)?`tel:${e}`:`https://${e}`}bn.tag("a");function Fg(e,t,r=null){const n=m6(r),i=r?p6(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const s=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(s!==null&&(function(a,l){for(let u=a;u!==null;){if(u===l)return!0;u=Ru(u)}return!1})(s.offsetNode,r))return{node:s.offsetNode,offset:s.offset}}if(o){const s=r.getRootNode();if(la(s)){const a=s.elementFromPoint(e,t);if(a!==null&&r.contains(a)){const l=(function(u,d,f,h){const p=h.createRange(),g=N=>d<N.top?N.top-d:d>N.bottom?d-N.bottom:0,m=N=>u<N.left?N.left-u:u>N.right?u-N.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let _=null,x=1/0,E=1/0;for(let N=v.nextNode();N;N=v.nextNode()){p.selectNodeContents(N);for(const T of p.getClientRects()){const $=g(T),P=m(T);($<x||$===x&&P<E)&&(x=$,E=P,_=N)}}if(_===null)return null;let S=0,C=1/0,k=1/0;for(let N=0;N<=_.length;N++){p.setStart(_,N),p.collapse(!0);const T=p.getBoundingClientRect(),$=g(T),P=Math.abs(u-T.left);($<C||$===C&&P<k)&&(C=$,k=P,S=N)}return{node:_,offset:S}})(e,t,a,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const s=n.caretRangeFromPoint(e,t);return s===null?null:{node:s.startContainer,offset:s.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const s=n.caretPositionFromPoint(e,t);return s===null?null:{node:s.offsetNode,offset:s.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 y1={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function gte(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const hA=(e,t)=>{if(!te(t))return t.insertRawText(e),!0;const r=n=>{const i=he();te(i)&&n(i)};return WO(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([ld()])),text:n=>r(i=>i.insertText(n))}),!0},x1={"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 pA(n,Ete(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=yr(),i=new DOMParser().parseFromString(gte(e),"text/html");return pA(n,Oee(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[hA],"text/uri-list":[hA]};function mte(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 EM(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(s=>o.$importMimeType[s]!==void 0).sort((s,a)=>{const l=o.priority[s],u=o.priority[a];return l===void 0&&u===void 0?s<a?-1:s>a?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)&&mte(e.$importMimeType[i],o,r,t))return!0}return!1}const vte={$importMimeType:x1,$insertDataTransfer:(e,t)=>EM({$importMimeType:x1,priority:y1},e,t),priority:y1},_te={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>EM(t,r,n),priority:t.priority}),config:{$importMimeType:x1,priority:y1},mergeConfig(e,t){const r=BS(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const s=n[i];n[i]=s?[...s,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function wM(e,t=he()){return t==null&&pc(166),te(t)&&t.isCollapsed()||t.getNodes().length===0?"":Lee(e,t)}function kM(e,t=he()){return t==null&&pc(166),te(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Ste(e,t))}function S1(e,t,r){(function(){const n=JZ(_te.name);return n?n.output:vte})().$insertDataTransfer(e,t)}const CM="application/x-lexical-drag";function bte(e,t){const r={editorKey:t.getKey()};e.setData(CM,JSON.stringify(r))}function yte(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(u){const d=u.getData(CM);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=Fg(u.clientX,u.clientY,d.getRootElement());if(f===null)return null;const h=uu(f.node);if(h===null)return null;if(re(h))return ul(h,"next",f.offset);if(V(h))return p1(h,f.offset,"next");const p=h.getParent();return p===null?null:p1(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const s=T6(o);if(s===null)return!1;const a=i.editorKey===t.getKey(),l=he();if(a){if(!te(l)||l.isCollapsed())return!1;if((function(u,d){const{anchor:f,focus:h}=US(h1(d),"next");return ch(f,u)<0&&ch(u,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!s.origin.isAttached())return e.preventDefault(),!0;if(r(n,dh(Wm(s)),t),!a){const u=t.getRootElement(),d=u?u.ownerDocument:null,f=d?(function(h,p){for(const g of g6(p)){const m=Wh(g);if(Bm(m)&&m.getKey()===h&&Ze(g))return g}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function xte(e,t){return yte(e,t,S1)}function pA(e,t,r){e.dispatchCommand(XY,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(te(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const s=fi(i,"previous");if(s)if(lo(s))o=s.origin;else{const a=Oo(s,po(Wr(),"next").getFlipped());for(const l of a){if(re(l.origin)){o=l.origin;break}if(V(l.origin)&&!l.origin.isInline())break}}if(o&&re(o)){const a=o.getFormat(),l=o.getStyle();n.format===a&&n.style===l||(n.format=a,n.style=l,n.dirty=!0)}}})(r))}function E1(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=V(r)&&r.excludeFromCopy("html");let s=r;t!==null&&re(s)&&(s=F6(t,s,"clone"));const a=V(s)?s.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})(s);re(s)&&s.getTextContentSize()===0&&(i=!1);const u=i&&Yt(t)&&V(r)?null:t;for(let d=0;d<a.length;d++){const f=a[d],h=E1(e,u,f,l.children);!i&&V(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=ao(s);if(d.length>0){const f={};for(const h of d){const p=fu(s,h);p===null&&pc(366,s.constructor.name,h);const g=[];E1(e,null,p,g),g.length===1&&g[0].type===p.getType()||pc(385,h,s.constructor.name,String(g.length),String(g.length>0?g[0].type:"none")),f[h]=g[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 Ste(e,t){const r=[],n=Wr(),i=te(t)?t.anchor.getNode():Yt(t)?t.getNodes()[0]??null:null,o=i!==null?Vm(i):null,s=(V(o)?o:n).getChildren();for(let a=0;a<s.length;a++)E1(e,t,s[a],r);return{namespace:e._config.namespace,nodes:r}}function Ete(e){const t=[];for(const r of e)t.push(PX(r));return t}let Gu=null;async function gA(e,t,r){if(Gu!==null)return!1;if(t!==null)return new Promise((u,d)=>{e.update(()=>{u(mA(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,s=Zn(i);if(n===null||s===null)return!1;const a=o.createElement("span");a.style.position="fixed",a.style.top="-1000px",a.append(o.createTextNode("#")),n.append(a);const l=o.createRange();return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((u,d)=>{const f=e.registerCommand(Lm,h=>(Ha(h,ClipboardEvent)&&(f(),Gu!==null&&(i.clearTimeout(Gu),Gu=null),u(mA(e,h,r))),!0),BX);Gu=i.setTimeout(()=>{f(),Gu=null,u(!1)},50),o.execCommand("copy"),a.remove()})}function mA(e,t,r){if(r===void 0){const i=Zn(e._window),o=he();if(!o||o.isCollapsed()||!i)return!1;const s=fo(i,e.getRootElement()),a=s.anchorNode,l=s.focusNode;if(a!==null&&l!==null&&!Hh(e,a,l))return!1;r=RM(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(AM(n,r),!0)}const wte=[["text/html",wM],["application/x-lexical-editor",kM]];function RM(e=he()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const s=Cte(o,r);s!==null&&(n[i]=s)}return n})(kte(),e)}function AM(e,t){for(const[r]of wte)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function kte(e=yr()){const t=Gh(e,Rte.name);return t?t.output:TM}const TM={"application/x-lexical-editor":[(e,t)=>e?kM(yr(),e):t()],"text/html":[(e,t)=>e?wM(yr(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function Cte(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const Rte={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:TM},mergeConfig(e,t){const r=BS(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const s=n[i];n[i]=s?[...s,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},Ate={$import:(e,t)=>{const r=ea(t.nodeName.toLowerCase());return Au(t,r),Ns(r,t),_o(r,t),[r.splice(0,0,e.$importChildren(t))]},match:bn.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},Tte={$import:(e,t)=>{const r=bd();return Ns(r,t),Au(t,r),_o(r,t),[r.splice(0,0,e.$importChildren(t))]},match:bn.tag("blockquote"),name:"@lexical/rich-text/blockquote"};bn.tag("blockquote");bn.tag("p"),bn.tag("span");const vA=je("DRAG_DROP_PASTE_FILE"),O_=qh("shadowRoot",{parse:Boolean});class _d extends mi{static getType(){return"quote"}static clone(t){return new _d(t.__key)}$config(){return this.config("quote",{extends:mi,stateConfigs:[{flat:!0,stateConfig:O_}]})}isShadowRoot(){return Vh(this,O_)}setIsShadowRoot(t){return Sc(this,O_,t)}createDOM(t){const r=tr().createElement("blockquote");return ws(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:Nte,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(Ze(r)){this.isEmpty()&&r.append(tr().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 bd().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=Lt(),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=Lt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function bd(e){const t=Jo(new _d);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function w1(e){return e instanceof _d}let Ym=class NM extends mi{__tag;static getType(){return"heading"}static clone(t){return new NM(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=tr().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];ws(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&&_A(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>_A(t)?{conversion:r=>({node:ea("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(Ze(r)){this.isEmpty()&&r.append(tr().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 ea(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?Lt():ea(this.getTag()),s=this.getDirection();if(o.setDirection(s),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const a=Lt();a.select(),this.replace(a,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Lt();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function _A(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=ea(t),Au(e,r),Ns(r,e),_o(r,e)),{node:r}}function Nte(e){const t=bd();return Ns(t,e),Au(e,t),_o(t,e),{node:t}}function ea(e="h1"){return Jo(new Ym(e))}function $te(e){return e instanceof Ym}function bA(e){const t=uu(e);return ut(t)}function Qu(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const a=e.anchor.getNode();if(re(a)){o=a;const l=e.anchor.offset,u=l===a.getTextContentSize()&&a.getNextSibling()===null,d=l===0&&a.getPreviousSibling()===null;i=r==="end"&&u||r==="start"&&d||r==="both"&&(u||d)}}let s=!1;for(const[a,l]of Object.entries(n)){if(l==null||!l[t])continue;const u=a;if(l.onlyAtBoundary){if(!(i&&o&&re(o)&&o.hasFormat(u)))continue;s=!0}e.hasFormat(u)&&e.toggleFormat(u)}s&&e.setStyle("")}const Dte={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=fi(r.focus,n),o=Jt(i.origin,Tc);if(!o)return!1;const s=r.focus.getNode();if(!o.is(s)&&!Kc(s,o))return!1;const a=Oo(i,Dt(o,n));if(a.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=Oo(a.anchor.getSiblingCaret(),a.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 Hm(Dt(o,n))){if(!f.origin.is(d.getParent())){if(U0(f.origin)){const h=Dt(d,n);return dh(Oo(h,h)),!0}break}if(!Tc(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=fi(r.anchor,n).getNodeAtCaret();return!(!Tc(i)||i.isInline()||(dh(Wm(Fi(po(i,n)))),0))})(e,t)}function yA(e){return ut(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function Bp(e){const t=bg();t.add(e),vn(t)}function xA(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=fi(r,i);if(r.type==="element"&&V(n)&&(Rr(n)||Tc(n))){const _=o.getNodeAtCaret();return!(_===null||!yA(_))&&(Bp(_.__key),!0)}const s=Jt(V(n)?n:n.getParentOrThrow(),_=>V(_)&&!_.isInline()&&or(_.getParent()));if(s===null)return!1;const a=Dt(s,i).getNodeAtCaret();if(a===null||!yA(a))return!1;if(s.getTextContentSize()===0)return Bp(a.__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 g=u.anchorNode,m=u.anchorOffset;if(g===null)return SA(u,d,f,h,p),!1;const v=uu(g);return SA(u,d,f,h,p),v===null?!1:(g===d&&m===f||!v.is(s)&&!Kc(v,s))&&(Bp(a.__key),!0)}function SA(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function EA(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=Jt(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 s=o.ownerDocument.defaultView;if(s===null)return!1;let a=!1;for(const v of n.getChildren())if(V(v)&&v.isInline()){const _=i.getElementByKey(v.getKey());if(_!==null){const x=s.getComputedStyle(_).display;if(x==="inline-grid"||x==="inline-flex"){a=!0;break}}}if(!a)return!1;const l=Dt(n,t?"previous":"next").getNodeAtCaret();if(l===null||!V(l)){if(t){const v=n.getFirstDescendant();re(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(re(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(s);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=u.getBoundingClientRect(),g=p.top+p.height/2;if(h.height>0){const v=Fg(h.left,g,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 m=t?l.getLastDescendant():l.getFirstDescendant();if(re(m)){const v=t?m.getTextContentSize():0;m.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function jp(e,t){const r=Dt(e,t),n=r.getAdjacentCaret();n!==null&&V(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?dh(Wm(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function wA(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>Dt(l,"next")).sort(ch),o=(t?i[0]:i[i.length-1]).origin,s=Jt(o,l=>l!==o&&V(l)&&!l.isInline())??Wr(),a=t?0:s.getChildrenSize();return s.select(a,a),!0}function Fte(e,t=MZ(Dte)){return cl(e.registerCommand(rO,()=>{const r=he();return Yt(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):!!Yt(n)&&(n.deleteNodes(),!0)},lt),e.registerCommand(rh,r=>{const n=he();return!!te(n)&&(n.deleteWord(r),!0)},lt),e.registerCommand(nh,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)S1(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(Fo,r=>{const n=he();return!(!te(n)&&!Yt(n))&&(LO(n,r),!0)},lt),e.registerCommand(ZY,r=>{const n=he();return!(!te(n)&&!Yt(n))&&(AX(n,r),!0)},lt),e.registerCommand(rX,r=>{const n=he();if(!te(n)&&!Yt(n))return!1;const i=n.getNodes();for(const o of i){const s=Jt(o,a=>V(a)&&!a.isInline());s!==null&&s.setFormat(r)}return!0},lt),e.registerCommand(Ec,r=>{const n=he();return!!te(n)&&(n.insertLineBreak(r),!0)},lt),e.registerCommand(th,()=>{const r=he();return!!te(r)&&(r.insertParagraph(),!0)},lt),e.registerCommand(eX,()=>{const r=ld(),n=he();return te(n)&&(r.setFormat(n.format),r.setStyle(n.style)),$X([r]),!0},lt),e.registerCommand(tX,()=>BR(r=>{const n=r.getIndent();r.setIndent(n+1)}),lt),e.registerCommand(QC,()=>BR(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),lt),e.registerCommand(fO,r=>{const n=he();if(Yt(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&&xA(n,!0)||!r.shiftKey&&EA(n,!0)))return r.preventDefault(),!0;return!1},lt),e.registerCommand(hO,r=>{const n=he();if(Yt(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===Wr().getChildrenSize()})(n)||!r.shiftKey&&Up(n,"next")||!r.shiftKey&&xA(n,!1)||!r.shiftKey&&EA(n,!1)))return r.preventDefault(),!0;return!1},lt),e.registerCommand(cO,r=>{const n=he();if(Yt(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()),zR(n,!0)){const i=r.shiftKey;return r.preventDefault(),UR(n,i,!0),!0}return!1},lt),e.registerCommand(lO,r=>{const n=he();if(Yt(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()),zR(n,!1)){const i=r.shiftKey;return r.preventDefault(),UR(n,i,!1),!0}return!1},lt),e.registerCommand(gS,r=>{const n=he();if(!Yt(n)&&bA(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 s=o.getNode();if(Rr(s))return!1;const a=PZ(s);return a.getIndent()>0&&(a.is(s)||s.is(a.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(QC,void 0);if(al&&Uc)return!1}else if(!Yt(n))return!1;return r.preventDefault(),e.dispatchCommand(Kl,!0)},lt),e.registerCommand(mO,r=>{const n=he();return!(!Yt(n)&&bA(r.target))&&!(!te(n)&&!Yt(n))&&(r.preventDefault(),e.dispatchCommand(Kl,!1))},lt),e.registerCommand(ih,r=>{let n=he();if(Yt(n)){const i=n.getNodes();i.length===1&&ut(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!te(n))return!1;if(Qu(n,"enter","both",t.peek()),r!==null){if((al||Bh||jh)&&Uc)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(Ec,!1)}return e.dispatchCommand(th,void 0)},lt),e.registerCommand(gO,()=>{const r=he();return!!te(r)&&(e.blur(),!0)},lt),e.registerCommand(_O,r=>{const[,n]=Pp(r);if(n.length>0){const i=r.clientX,o=r.clientY,s=Fg(i,o,e.getRootElement());if(s!==null){const{offset:a,node:l}=s,u=uu(l);if(u!==null){const d=_S();if(re(u))d.anchor.set(u.getKey(),a,"text"),d.focus.set(u.getKey(),a,"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=Va(d);vn(f)}e.dispatchCommand(vA,n)}return r.preventDefault(),!0}return xte(r,e)},lt),e.registerCommand(bO,r=>{const[n]=Pp(r),i=he();return!(n&&!te(i))&&(te(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(AM(r.dataTransfer,RM(i)),bte(r.dataTransfer,e)),!0)},lt),e.registerCommand(yO,r=>{const[n]=Pp(r),i=he();if(n&&!te(i))return!1;const o=r.clientX,s=r.clientY,a=Fg(o,s,e.getRootElement());if(a!==null){const l=uu(a.node);ut(l)&&r.preventDefault()}return!0},lt),e.registerCommand(xO,()=>{const r=he();return JX(te(r)&&Vm(r.anchor.getNode())!==null?r:null),!0},lt),e.registerCommand(Lm,r=>(gA(e,Ha(r,ClipboardEvent)?r:null),!0),lt),e.registerCommand(mS,r=>((async function(n,i){await gA(i,Ha(n,ClipboardEvent)?n:null),i.update(()=>{const o=he();te(o)?o.removeText():Yt(o)&&o.getNodes().forEach(s=>s.remove())},{tag:$O})})(r,e),!0),lt),e.registerCommand(pS,r=>{const[,n,i]=Pp(r);return n.length>0&&!i?(e.dispatchCommand(vA,n),!0):gd(r.target)&&CS(r.target)?!1:he()!==null&&((function(o,s){o.preventDefault(),s.update(()=>{const a=he(),l=Ha(o,InputEvent)||Ha(o,KeyboardEvent)?null:o.clipboardData;l!=null&&a!==null&&S1(l,a)},{tag:NO})})(r,e),!0)},lt),e.registerCommand(pO,()=>{const r=he();return te(r)&&Qu(r,"space","both",t.peek()),!1},lt),e.registerCommand(vO,()=>{const r=he();return te(r)&&Qu(r,"tab","both",t.peek()),!1},lt),e.registerCommand(uO,r=>{const n=he();if(Yt(n))return wA(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 s=o.getFirstChild();if(!ut(s)||!s.isInline())return!1;const a=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(a,0,"element"),r.preventDefault(),r.stopPropagation(),!0},lt),e.registerCommand(dO,r=>{const n=he();if(Yt(n))return wA(n,!0,r);if(!te(n))return!1;const{anchor:i,focus:o}=n,s=Jt(o.getNode(),u=>V(u)&&!u.isInline());if(s===null)return!1;const a=s.getFirstChild();if(!ut(a)||!a.isInline()||Jt(i.getNode(),u=>V(u)&&!u.isInline())!==s)return!1;const l=s.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 k1(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 YS(e){const t=k1(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const kA=/[!-/:-@[-`{-~\s]/,CA=/\s/,C1=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Ite=/^\s{0,3}$/;function R1(e){if(!hd(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&re(t)&&Ite.test(t.getTextContent())}function A1(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const $M=/^(\s*)(\d{1,})\.\s/,DM=/^(\s*)[-*+]\s/,Pte=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,T1=/^(#{1,6})\s/,FM=/^>\s/,IM=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,N1=/^[ \t]*`{3,}$/,Ote=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,Mte=/^(?:\|)(.+)(?:\|)\s?$/;function Lte(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 RA=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,AA=/^<\/[a-z_][\w-]*\s*>/i,TA=e=>new RegExp(`(?:${e.source})$`,e.flags),lf=qh("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),NA=qh("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),PM=qh("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function $1(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function zte(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!re(n))return null;const i=n.getTextContent(),o=$1(i);if(o!==null){const[s,a]=o;return n.setTextContent(s),a}return/^ {2,}$/.test(i)&&(function(s,a){for(let l=a-1;l>=0;l--){if(Yn(s[l]))return!1;if(/\S/.test(s[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function OM(e){const t=jo(),r=zte(e);return r!==null&&Sc(t,PM,r),t}const MM=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},LM=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),s=t.getNextSibling(),a=ks(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],u=e!=="bullet"&&e!=="check"||l!==lf.parse(l)?void 0:l;if(ot(s)&&s.getListType()===e){u&&Sc(s,lf,u);const f=s.getFirstChild();f!==null?f.insertBefore(a):s.append(a),e==="number"&&s.setStart(Number(n[2])),t.remove()}else if(ot(o)&&o.getListType()===e)u&&Sc(o,lf,u),o.append(a),t.remove();else{const f=Mo(e,e==="number"?Number(n[2]):void 0);u&&Sc(f,lf,u),f.append(a),t.replace(f)}a.append(...r),i||a.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let g=0;return h&&(g+=h.length),p&&(g+=Math.floor(p.length/4)),g})(n[1]);d&&a.setIndent(d)},XS=(e,t,r,n)=>{const i=[],o=e.getChildren();let s=0;for(const a of o)if(Rt(a)){if(a.getChildrenSize()===1){const p=a.getFirstChild();if(ot(p)){const g=XS(p,t,r+1,n);g&&i.push(g);continue}}if(n&&!a.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),u=e.getListType(),d=Vh(e,lf),f=u==="number"?`${e.getStart()+s}. `:u==="check"?`${d} [${a.getChecked()?"x":" "}] `:d+" ";let h=t(a);u!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),s++}return i.join(`
|
|
29
|
+
`)},Ute={dependencies:[Ym],export:(e,t)=>{if(!$te(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:T1,replace:MM(e=>{const t="h"+e[1].length;return ea(t)}),triggerOnEnter:!0,type:"element"},Bte={dependencies:[_d],export:(e,t)=>{if(!w1(e))return null;const r=t(e).split(`
|
|
30
|
+
`),n=[];for(const i of r)n.push("> "+i);return n.join(`
|
|
31
|
+
`)},regExp:FM,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(w1(o))return o.splice(o.getChildrenSize(),0,[OM(o),...t]),void e.remove()}const i=bd();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},q0={dependencies:[vd],export:e=>{if(!hh(e))return null;const t=e.getTextContent();let r=Vh(e,NA);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,s=e[r],a=n.index+i.length,l=s.slice(a),u=new RegExp(`\`{${o},}$`);if(u.test(l)){const p=l.match(u),g=l.slice(0,l.lastIndexOf(p[0])),m=[...n];return m[2]="",q0.replace(t,null,m,p,[g],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const g=e[p];if(d.test(g)){const m=g.match(d),v=e.slice(r+1,p),_=s.slice(n[0].length);return _.length>0&&v.unshift(_),q0.replace(t,null,n,m,v,!0),[!0,p]}}const f=e.slice(r+1),h=s.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:IM,replace:(e,t,r,n,i,o)=>{let s,a;const l=r[1]?r[1].trim():"```",u=r[2]||void 0;if(!t&&i){if(i.length===1)n?(s=Hn(u),a=i[0]):(s=Hn(u),a=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(s=Hn(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();a=i.join(`
|
|
34
|
+
`)}Sc(s,NA,l);const d=Cr(a);s.append(d),e.append(s)}else t&&MM(d=>Hn(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},jte={dependencies:[Jh,$u],export:(e,t,r)=>ot(e)?XS(e,t,0,r):null,regExp:DM,replace:LM("bullet"),triggerOnEnter:!0,type:"element"},qte={dependencies:[Jh,$u],export:(e,t,r)=>ot(e)?XS(e,t,0,r):null,regExp:$M,replace:LM("number"),triggerOnEnter:!0,type:"element"},Vte={format:["code"],tag:"`",type:"text-format"},Kte={format:["highlight"],tag:"==",type:"text-format"},Hte={format:["bold","italic"],tag:"***",type:"text-format"},Wte={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Gte={format:["bold"],tag:"**",type:"text-format"},Jte={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Qte={format:["strikethrough"],tag:"~~",type:"text-format"},Yte={format:["italic"],tag:"*",type:"text-format"},Xte={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Zte={dependencies:[Qh],export:(e,t,r)=>{if(!ss(e)||sc(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(Jt(e,ss))return;const[,r,n,i]=t,o=n!=null?A1(n):void 0,s=i!=null?A1(i):void 0,a=Wc(o,{title:s}),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=Cr(d);return h.setFormat(e.getFormat()),a.append(h),e.replace(a),f&&a.insertBefore(Cr(f)),h},trigger:")",type:"text-match"},ere=[Ute,Bte,jte,qte],tre=[q0],rre=[Vte,Hte,Wte,Gte,Jte,Kte,Yte,Xte,Qte],nre=[Zte],rl=[...ere,...tre,...rre,...nre];function ire(e,t=!1){const r=e.split(`
|
|
35
|
+
`);let n=0;const i=[];for(let o=0;o<r.length;o++){const s=r[o],a=s.trimEnd(),l=i[i.length-1],u=o<r.length-1?$1(s):null,d=l!==void 0&&$1(l)!==null;if(Ote.test(a))i.push(a);else if(n===0){{const f=a.match(IM);if(f){n=f[1].trim().length,i.push(a);continue}}a===""||l===""||!l||T1.test(l)||T1.test(a)||FM.test(a)||$M.test(a)||DM.test(a)||Pte.test(a)||Mte.test(a)||Lte(a)||d||!t||RA.test(a)||AA.test(a)||TA(AA).test(l)||TA(RA).test(l)||N1.test(l)?i.push(!t&&a!==""||u!==null?s:a):i[i.length-1]=l+" "+(u===null?a:s).trimStart()}else{if(N1.test(a)&&a.trim().length>=n){n=0,i.push(a);continue}i.push(s)}}return i.join(`
|
|
36
|
+
`)}function ore(e,t,r,n,i){for(const o of t){if(!o.export)continue;const s=o.export(e,a=>Ig(a,r,n,void 0,void 0,i));if(s!=null)return s}return V(e)?Ig(e,r,n,void 0,void 0,i):ut(e)?e.getTextContent():null}function Ig(e,t,r,n,i,o=!1){const s=[],a=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of a){for(const u of r){if(!u.export)continue;const d=u.export(l,f=>Ig(f,t,r,n,[...i,...n],o),(f,h)=>$A(f,h,t,n,i,o));if(d!=null){s.push(d);continue e}}Yn(l)?s.push(sre(l)):re(l)?s.push($A(l,l.getTextContent(),t,n,i,o)):V(l)?s.push(Ig(l,t,r,n,i,o)):ut(l)&&s.push(l.getTextContent())}return s.join("")}function sre(e){return Vh(e,PM)+`
|
|
37
|
+
`}function $A(e,t,r,n,i,o=!1){const s=e.hasFormat("code");let a,l,u,d,f=t;if(s||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),s){const{fence:x,padded:E}=(function(S){const C=S.match(/`+/g),k=C?Math.max(...C.map(N=>N.length)):0;return{fence:"`".repeat(k+1),padded:S.length===0||S.includes("`")||/^\s/.test(S)&&/\s$/.test(S)?` ${S} `:S}})(t);a="",u="",l=x+E+x,d=!1}else{const x=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];a=x[1],l=x[2],u=x[3],d=l===""}let h="",p="",g="";const m=DA(e,!0),v=DA(e,!1),_=new Set;for(const x of r){const E=x.format[0],S=x.tag;E!=="code"&&FA(e,E)&&!_.has(E)&&(_.add(E),FA(m,E)&&n.find(C=>C.tag===S)||(n.push({format:E,tag:S}),h+=S))}for(let x=0;x<n.length;x++){const E=D1(e,n[x].format),S=D1(v,n[x].format);if(E&&S)continue;const C=[...n];for(;C.length>x;){const k=C.pop();i&&k&&i.find(N=>N.tag===k.tag)||(k&&typeof k.tag=="string"&&(E?S||(g+=k.tag):p+=k.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+a+h+l+g+u}function DA(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return re(r)?r:null}function D1(e,t){return re(e)&&e.hasFormat(t)}function FA(e,t){return!!D1(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function are(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=x=>{let E=0;for(let S=x-1;S>=0&&h[S]==="\\";S--)E++;return E%2==1},g=[];let m=0;for(;m<h.length;)if(h[m]==="`"){let x=1;for(;m+x<h.length&&h[m+x]==="`";)x++;g.push({index:m,length:x}),m+=x}else m++;const v=[];let _=0;for(;_<g.length;){const x=g[_];if(p(x.index)){_++;continue}let E=-1;for(let k=_+1;k<g.length;k++)if(g[k].length===x.length){E=k;break}if(E===-1){_++;continue}const S=g[E];let C=h.slice(x.index+x.length,S.index);C.length>=2&&C.startsWith(" ")&&C.endsWith(" ")&&/[^ ]/.test(C)&&(C=C.slice(1,-1)),v.push({content:C,endIndex:S.index+S.length,startIndex:x.index}),_=E+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 s=(function(f,h,p=[]){const g=[],m=new Set(Object.keys(h.transformersByTag).filter(E=>E[0]!=="`").map(E=>E[0])),v=E=>{let S=0;for(let C=E-1;C>=0&&f[C]==="\\";C--)S++;return S%2==1},_=E=>p.some(S=>E>=S.start&&E<S.end);let x=0;for(;x<f.length;){const E=f[x];if(!m.has(E)||v(x)||_(x)){x++;continue}let S=1;for(;x+S<f.length&&f[x+S]===E;)S++;const C=IA(E,f,x,S,!0),k=IA(E,f,x,S,!1);(C||k)&&g.push({active:!0,canClose:k,canOpen:C,char:E,index:x,length:S}),x+=S}return g})(r,t,i),a=s.length>0?(function(f,h,p){const g={};let m=0,v=null;for(;m<h.length;){const _=h[m];if(!_.active||!_.canClose||_.length===0){m++;continue}const x=`${_.char}${_.canOpen}${_.length%3}`,E=g[x]??-1;let S=!1;for(let C=m-1;C>E;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 N=Math.min(k.length,_.length),T=Object.keys(p.transformersByTag).filter(M=>M[0]===k.char&&M.length<=N).sort((M,I)=>I.length-M.length)[0];if(!T)continue;S=!0;const $=T.length,P={content:f.slice(k.index+k.length,_.index),endIndex:_.index+$,startIndex:k.index+(k.length-$),tag:T};(!v||P.startIndex<v.startIndex||P.startIndex===v.startIndex&&P.endIndex>v.endIndex)&&(v=P);for(let M=C+1;M<m;M++)h[M].active=!1;k.length-=$,_.length-=$,k.active=k.length>0,_.length>0?_.index+=$:(_.active=!1,m++);break}S||(g[x]=m-1,_.canOpen||(_.active=!1),m++)}return v})(r,s,t):null;let l=null,u=null;if(o&&a?a.startIndex<=o.startIndex&&a.endIndex>=o.endIndex?(l=a,u=t.transformersByTag[a.tag]):(l=o,u=n):o?(l=o,u=n):a&&(l=a,u=t.transformersByTag[a.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 IA(e,t,r,n,i){if(!PA(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!PA(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&C1.test(o)}return!0}function PA(e,t,r,n){const i=e[t-1],o=e[t+r],[s,a]=n?[o,i]:[i,o];return s!==void 0&&!CA.test(s)&&(!C1.test(s)||a===void 0||CA.test(a)||C1.test(a))}function Pa(e){return re(e)&&!e.hasFormat("code")}function $l(e,t,r){let n=are(e,t),i=(function(s,a){const l=s;let u,d,f,h;for(const p of a){if(!p.replace||!p.importRegExp)continue;const g=l.getTextContent().match(p.importRegExp);if(!g)continue;const m=g.index||0,v=p.getEndIndex?p.getEndIndex(l,g):m+g[0].length;v!==!1&&(u===void 0||d===void 0||m<u&&(v>d||v<=u))&&(u=m,d=v,f=p,h=g)}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 s=(function(a,l,u,d,f){const h=a.getTextContent();let p,g,m;if(f[0]===h?p=a:l===0?[p,g]=a.splitText(u):[m,p,g]=a.splitText(l,u),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:g,nodeBefore:m,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);Pa(s.nodeAfter)&&$l(s.nodeAfter,t,r),Pa(s.nodeBefore)&&$l(s.nodeBefore,t,r),Pa(s.transformedNode)&&$l(s.transformedNode,t,r)}else if(i){const s=(function(a,l,u,d,f){let h,p,g;return l===0?[h,p]=a.splitText(u):[g,h,p]=a.splitText(l,u),d.replace?{nodeAfter:p,nodeBefore:g,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!s)return;Pa(s.nodeAfter)&&$l(s.nodeAfter,t,r),Pa(s.nodeBefore)&&$l(s.nodeBefore,t,r),Pa(s.transformedNode)&&$l(s.transformedNode,t,r)}const o=A1(e.getTextContent());e.setTextContent(o)}function lre(e,t,r,n=!1){const i=YS(r),o=(function(u){const d={},f={},h=[];for(const p of u){const{tag:g}=p;d[g]=p;const m=g.replace(/(\*|\^|\+)/g,"\\$1");h.push(m),g.length===1?f[g]=g==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${m}])(${m})((\\\\${m})?.*?[^${m}\\s](\\\\${m})?)(${m})(?![\\\\${m}])`):f[g]=new RegExp(`(^|[^\\\\])(${m})((\\\\${m})?.*?[^\\s](\\\\${m})?)(${m})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),s=e.split(`
|
|
38
|
+
`),a=s.length;for(let u=0;u<a;u++){const d=s[u],[f,h]=ure(s,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&&R1(u)&&t.getChildrenSize()>1)u.remove();else if(V(u))for(const d of u.getAllTextNodes())dre(d)}function ure(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:s,regExpStart:a,replace:l}=i,u=e[t].match(a);if(!u)continue;if(o){const g=o({lines:e,rootNode:n,startLineIndex:t,startMatch:u,transformer:i});if(g===null)continue;if(g)return g}const d=typeof s=="object"&&"regExp"in s?s.regExp:s,f=s&&typeof s=="object"&&"optional"in s?s.optional:!s;let h=t;const p=e.length;for(;h<p;){const g=d?e[h].match(d):null;if(!g&&(!f||f&&h<p-1)){h++;continue}if(g&&t===h&&g.index===u.index){h++;continue}const m=[];if(g&&t===h)m.push(e[t].slice(u[0].length,-g[0].length));else for(let v=t;v<=h;v++)if(v===t){const _=e[v].slice(u[0].length);m.push(_)}else if(v===h&&g){const _=e[v].slice(0,-g[0].length);m.push(_)}else m.push(e[v]);if(l(n,null,u,g,m,!0)!==!1)return[!0,h];break}}return[!1,t]}function cre(e,t,r,n,i,o){const s=Cr(e),a=Lt();a.append(s),t.append(a);for(const{regExp:l,replace:u}of r){const d=e.match(l);if(d&&(s.setTextContent(e.slice(d[0].length)),u(a,[s],d,!0)!==!1))break}if($l(s,n,i),a.getParent()!==null&&e.length>0){const l=a.getPreviousSibling();if(!o&&(hd(l)||w1(l)||ot(l))){let u=l;if(ot(l)){const d=l.getLastDescendant();u=d==null?null:Jt(d,Rt)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[OM(u),...a.getChildren()]),a.remove())}}}function dre(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(ld())})}function fre(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 OA(e,t,r,n,i){const o=e.getParent();if(!or(o)||e.getFirstChild()!==t)return!1;const s=t.getTextContent();if(!i&&s[r-1]!==" ")return!1;for(const{regExp:a,replace:l}of n){const u=s.match(a),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 MA(e,t,r,n,i){const o=e.getParent();if(!or(o)||e.getFirstChild()!==t)return!1;const s=t.getTextContent();if(!i&&s[r-1]!==" ")return!1;for(const{regExpStart:a,replace:l,regExpEnd:u}of n){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const d=s.match(a);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,g]=t.splitText(r);if(l(e,g?[g,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function hre(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function LA(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(zM(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function zM(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function pre(e,t=rl){const r=YS(t),n=r.element.filter(l=>l.triggerOnEnter),i=k1(r.textFormat,({tag:l})=>l[l.length-1]),o=k1(r.textMatch,({trigger:l})=>l),s=new Set([" "]);for(const l of r.textFormat)s.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&s.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)||fre(173,f.getType())}}const a=(l,u,d)=>!!OA(l,u,d,r.element)||!!MA(l,u,d,r.multilineElement)||!!(function(f,h,p){let g=f.getTextContent();const m=p[g[h-1]];if(m==null)return!1;h<g.length&&(g=g.slice(0,h));for(const v of m){if(!v.replace||!v.regExp)continue;const _=g.match(v.regExp);if(_===null)continue;const x=_.index||0,E=x+_[0].length;let S;return x===0?[S]=f.splitText(E):[,S]=f.splitText(x,E),S.selectNext(0,0),v.replace(S,_),!0}return!1})(u,d,o)||!!(function(f,h,p){const g=f.getTextContent(),m=h-1,v=g[m],_=p[v];if(!_)return!1;for(const x of _){const{tag:E}=x,S=E.length,C=m-S+1;if(S>1&&!zM(g,C,E,0,S)||g[C-1]===" ")continue;const k=g[m+1];if(x.intraword===!1&&k&&!kA.test(k))continue;const N=f;let T=N,$=LA(g,C,E),P=T;for(;$<0&&(P=P.getPreviousSibling())&&!Yn(P);)if(re(P)){if(P.hasFormat("code"))continue;const G=P.getTextContent();T=P,$=LA(G,G.length,E)}if($<0||T===N&&$+S===C)continue;const M=T.getTextContent();if($>0&&M[$-1]===v)continue;const I=M[$-1];if(x.intraword===!1&&I&&!kA.test(I)||!x.format.includes("code")&&hre(T,$))continue;const U=N.getTextContent(),B=U.slice(0,C)+U.slice(m+1);N.setTextContent(B);const q=T===N?B:M;T.setTextContent(q.slice(0,$)+q.slice($+S));const J=he(),Y=_S();vn(Y);const K=m-S*(T===N?2:1)+1;Y.anchor.set(T.__key,$,"text"),Y.focus.set(N.__key,K,"text");for(const G of x.format)Y.formatText(G,aa[G]);Y.anchor.set(Y.focus.key,Y.focus.offset,Y.focus.type);for(const G of x.format)Y.hasFormat(G)&&Y.toggleFormat(G);return te(J)&&(Y.format=J.format),!0}return!1})(u,d,i);return cl(e.registerUpdateListener(({tags:l,dirtyLeaves:u,editorState:d,prevEditorState:f})=>{if(l.has(DO)||l.has(vg)||e.isComposing())return;const h=l.has(sh),p=d.read(he),g=f.read(he);if(!te(g)||!te(p)||!p.isCollapsed()||p.is(g)&&!h)return;const m=p.anchor.key,v=p.anchor.offset,_=d._nodeMap.get(m);if(re(_)&&u.has(m)&&(h||v===1||!(v>g.anchor.offset+1))){if(h){const x=d.read(()=>_.getTextContent())[v-1];if(!s.has(x))return}e.update(()=>{if(!Pa(_))return;const x=_.getParent();x===null||hh(x)||a(x,_,p.anchor.offset)&&cu(TO)})}}),e.registerCommand(ih,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(!re(f)||!Pa(f))return!1;const h=f.getParent();return h===null||hh(h)?!1:d===f.getTextContent().length&&!(!MA(h,f,d,r.multilineElement,!0)&&!OA(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},ic))}function UM(e,t=rl,r,n=!1,i=!1){const o=n?e:ire(e,i),s=Wr();s.clear(),lre(o,s,t,n),he()!==null&&s.selectStart()}function BM(e=rl,t,r=!1){return(function(i,o=!1){const s=YS(i),a=[...s.multilineElement,...s.element],l=!o,u=s.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||Wr()).getChildren();for(let p=0;p<h.length;p++){const g=h[p],m=ore(g,a,u,s.textMatch,o);m!=null&&f.push(l&&p>0&&!R1(g)&&!R1(h[p-1])?`
|
|
39
|
+
`.concat(m):m)}return f.join(`
|
|
40
|
+
`)}})(e,r)(t)}let jM=[Ym,_d,Jh,$u,Qh,vd];function ui(e){return"var("+e+")"}let gre=w([z("flex"),bi("wrap"),Z("center"),c("gap","2px"),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),M_=w([c("background","none"),c("border","1px solid transparent"),c("border-radius",ui(X.sm)),c("color",ui(y.textSecondary)),c("font-family","inherit"),c("font-size",ui(A.sizeSm)),c("line-height","1"),c("min-width","26px"),c("padding","5px 6px"),ye("pointer"),We([c("background",ui(y.surfaceSubtle))])]),mre=w([c("background",ui(y.surfaceSubtle)),c("border-color",ui(y.border)),c("color",ui(y.textPrimary))]),vre=w([Ys(.4),ye("notAllowed")]),L_=w([c("width","1px"),c("align-self","stretch"),c("background",ui(y.borderSubtle)),c("margin","2px 4px")]),_re=w([z("flex"),Z("center"),c("gap",ui(F.xs)),c("padding","var("+F.xs+")"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),bre=w([vo(1),c("background",ui(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",ui(X.sm)),c("color",ui(y.textPrimary)),c("font-family","inherit"),c("font-size",ui(A.sizeSm)),c("padding","3px 6px"),c("outline","none"),ga([c("border-color",ui(y.brand))])]);function yre(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=ae(()=>{}),s=o[1],a=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},u=h=>{n.update(()=>{let p=he();if(p!=null&&te(p)){$Z(p,h);return}})},d=(h,p,g,m)=>{let v=g!==void 0?g:!1,_=i?M_+" "+vre:v?M_+" "+mre:M_;return b("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:_,title:p,disabled:i,type:"button",onClick:x=>m(),onMouseDown:x=>{x.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{hte(p===""?null:p)}),s(g=>{})};return L(Hr,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(Fo,"bold")),d("I","Italic",r.italic,()=>l(Fo,"italic")),d("</>","Inline code",r.code,()=>l(Fo,"code")),b("span",{className:L_}),d("H1","Heading 1",void 0,()=>u(()=>ea("h1"))),d("H2","Heading 2",void 0,()=>u(()=>ea("h2"))),d("¶","Paragraph",void 0,()=>u(()=>Lt())),b("span",{className:L_}),d("•","Bulleted list",void 0,()=>l(hM,void 0)),d("1.","Numbered list",void 0,()=>l(pM,void 0)),d("“","Quote",void 0,()=>u(()=>bd())),d("🔗","Link",void 0,()=>s(h=>{if(!Be(h))return""})),b("span",{className:L_}),d("↩","Undo",void 0,()=>l(Om,void 0)),d("↪","Redo",void 0,()=>l(Mm,void 0))],"aria-label":"Formatting",className:gre,role:"toolbar"}),a!==void 0?L("div",{children:[b("input",{"aria-label":"Link URL",className:bre,autoFocus:!0,placeholder:"https://…",type:"url",value:a,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(a);case"Escape":return s(g=>{});default:return}},onChange:h=>{let p=h.target.value;s(g=>p)}}),d("Apply","Apply link",void 0,()=>f(a)),d("Remove","Remove link",void 0,()=>f(""))],className:_re}):null]})}let zA={bold:!1,italic:!1,code:!1},xre=yre;function Sre(e){return e.trim()===""}let UA={contents:void 0};function Ere(){let e=UA.contents;if(e!==void 0)return rr(e);let t=ES({namespace:"reventless-rich-text-probe",nodes:jM,onError:r=>{}});return UA.contents=Wt(t),t}function wre(e){let t=Ere(),r={contents:""};return t.update(()=>{UM(e,rl)},{discrete:!0}),t.read(()=>{r.contents=BM(rl)}),r.contents}function kre(e){return e.trim()!==""?e.trimEnd()!==wre(e).trimEnd():!1}function rt(e){return"var("+e+")"}let BA=w([z("flex"),pe("column"),c("background",rt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",rt(X.sm)),c("box-sizing","border-box"),c("transition","border-color 120ms"),Ko({NAME:"percent",VAL:100}),fa("hidden"),nI([c("border-color",rt(y.brand))])]),Cre=w([c("border-color",rt(y.error)),nI([c("border-color",rt(y.error))])]),Rre=w([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 Are(e){return w([c("background",e?rt(y.surfaceSubtle):"transparent"),c("border","1px solid "+(e?rt(y.border):"transparent")),c("border-radius",rt(X.sm)),c("color",rt(e?y.textPrimary:y.textSecondary)),c("font-family","inherit"),c("font-size",rt(A.sizeXs)),c("padding","2px var("+F.sm+")"),ye("pointer")])}let Tre=w([c("background",rt(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",rt(y.textSecondary)),c("font-size",rt(A.sizeXs)),c("line-height",rt(A.lineHeightNormal)),c("padding","var("+F.xs+") var("+F.sm+")")]),Nre=w([Ut("relative"),z("flex"),pe("column")]),$re=w([Ut("absolute"),c("top","var("+F.sm+")"),c("left","var("+F.sm+")"),c("color",rt(y.textDisabled)),c("font-size",rt(A.sizeSm)),c("pointer-events","none"),c("user-select","none")]);function Dre(e){return w([c("color",rt(y.textPrimary)),c("font-size",rt(A.sizeSm)),c("line-height",rt(A.lineHeightRelaxed)),c("min-height",e),c("outline","none"),c("padding",rt(F.sm)),c("word-break","break-word"),c("overflow-y","auto"),c("tab-size","4")])}let Fre=w([c("margin","0 0 var("+F.sm+")")]),Ire=w([c("font-size",rt(A.sizeXl)),c("font-weight",rt(A.weightBold)),c("line-height",rt(A.lineHeightTight)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),Pre=w([c("font-size",rt(A.sizeLg)),c("font-weight",rt(A.weightBold)),c("line-height",rt(A.lineHeightTight)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),Ore=w([c("font-size",rt(A.sizeMd)),c("font-weight",rt(A.weightBold)),c("margin","var("+F.sm+") 0 var("+F.xs+")")]),Mre=w([c("border-left","3px solid var("+y.border+")"),c("color",rt(y.textSecondary)),c("margin","var("+F.xs+") 0"),c("padding-left",rt(F.md))]),jA=w([c("margin","var("+F.xs+") 0"),c("padding-left","1.5em")]),Lre=w([c("margin","2px 0")]),zre=w([c("color",rt(y.brand)),c("text-decoration","underline")]),Ure=w([c("font-weight",rt(A.weightBold))]),Bre=w([c("font-style","italic")]),jre=w([c("text-decoration","line-through")]),qre=w([c("background",rt(y.surfaceSubtle)),c("border-radius",rt(X.sm)),c("font-family",rt(A.fontFamilyMono)),c("font-size","0.9em"),c("padding","1px 4px")]),Vre=w([c("background",rt(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",rt(X.md)),c("display","block"),c("font-family",rt(A.fontFamilyMono)),c("font-size","0.9em"),c("margin","var("+F.xs+") 0"),c("padding",rt(F.sm)),c("white-space","pre-wrap")]);function Kre(e){return w([c("background","transparent"),c("border","none"),c("color",rt(y.textPrimary)),c("font-family",rt(A.fontFamilyMono)),c("font-size",rt(A.sizeSm)),c("line-height",rt(A.lineHeightNormal)),c("min-height",e),c("outline","none"),c("padding",rt(F.sm)),c("resize","vertical"),c("box-sizing","border-box"),Ko({NAME:"percent",VAL:100})])}let Hre=Object.fromEntries([["paragraph",Fre],["quote",Mre],["link",zre],["code",Vre],["heading",Object.fromEntries([["h1",Ire],["h2",Pre],["h3",Ore]])],["list",Object.fromEntries([["ul",jA],["ol",jA],["listitem",Lre]])],["text",Object.fromEntries([["bold",Ure],["italic",Bre],["strikethrough",jre],["code",qre]])]]);function Wre(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,s=e.onChange,a=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=ae(()=>"Rich"),g=p[1],m=p[0],v=ae(()=>zA),_=v[1],x=ae(()=>a.trim()===""),E=x[1],S=ae(()=>!1),C=S[1],k=Je(null),N=Je(a),T=Je(a),$=Je(!1),P=Je(s);P.current=s;let M=jt(()=>ES({namespace:"reventless-rich-text",nodes:jM,onError:K=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",K)},theme:Hre}),[]),I=()=>{let K={contents:""};return M.read(()=>{K.contents=BM(rl)}),K.contents},U=K=>{T.current=K,N.current=K,$.current=!0,C(G=>kre(K)),M.update(()=>{UM(K,rl)})},B=()=>{let K=I();if(E(G=>K.trim()===""),_(G=>{let ie={contents:zA};return M.read(()=>{let oe=he();if(oe!=null&&te(oe)){ie.contents={bold:oe.hasFormat("bold"),italic:oe.hasFormat("italic"),code:oe.hasFormat("code")};return}}),ie.contents}),$.current){$.current=!1,N.current=K;return}else return K!==N.current?(N.current=K,P.current(K)):void 0},q=m==="Rich";Ae(()=>{if(!q)return;M.setRootElement(k.current);let K=cl(Fte(M),Yee(M),ete(M,tte(),300),pre(M,rl),M.registerUpdateListener(G=>B()));return U(a),()=>{K(),M.setRootElement(null)}},[q]),Ae(()=>{q&&a!==N.current&&a!==T.current&&U(a)},[a]),Ae(()=>{M.setEditable(!h)},[h]);let J=(K,G)=>b("button",{children:G,"aria-pressed":m===K?"true":"false",className:Are(m===K),type:"button",onClick:ie=>{if(g(oe=>K),K==="Source")return C(oe=>!1)}}),Y;return Y=m==="Rich"?L("div",{children:[b("div",{ref:Wt(k),"aria-label":"Rich text editor","aria-multiline":!0,className:Dre(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:K=>l(),suppressContentEditableWarning:!0}),x[0]&&!h?b("div",{children:u,className:$re}):null],className:Nre}):b("textarea",{"aria-label":"Markdown source",className:Kre(d),spellCheck:!1,placeholder:u,readOnly:h,value:a,onBlur:K=>l(),onChange:K=>{let G=K.target.value;N.current=G,T.current=G,s(G)}}),L("div",{children:[L("div",{children:[J("Rich","Rich text"),J("Source","Markdown")],className:Rre}),!h&&q?b(xre,{editor:M,formats:v[0]}):null,S[0]&&q?b("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:Tre}):null,Y],className:f?BA+" "+Cre:BA})}let Gre=Wre;function dl(e){return"var("+e+")"}let qM=w([z("inlineFlex"),Z("center"),Xe("center"),c("background",dl(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("color",dl(y.textDisabled))]),qA=Fr([qM,w([c("width","24px"),c("height","24px"),c("border-radius",dl(X.sm)),c("font-size",dl(A.sizeSm)),c("vertical-align","middle")])]),VM=Fr([qM,w([c("border-radius",dl(X.md)),c("font-size",dl(A.sizeSm))])]),Jre=Fr([VM,w([pe("column"),c("gap",dl(F.xs)),c("aspect-ratio","4 / 3")])]),Qre=Fr([VM,w([pe("row"),c("gap",dl(F.sm)),c("padding","var("+F.sm+") var("+F.md+")")])]),Yre=w([c("width","240px"),c("max-width","100%")]),Xre=w([c("width","100%")]),Zre=w([c("width","100%"),c("height","100%"),c("aspect-ratio","auto")]),VA=w([c("font-size","20px"),c("line-height","1")]),ene=w([c("position","absolute"),c("width","1px"),c("height","1px"),c("padding","0"),c("margin","-1px"),fa("hidden"),c("clip","rect(0, 0, 0, 0)"),c("white-space","nowrap"),c("border","0")]);function qp(e){return e==="Media"?"⬚":"▤"}function tne(e){return e==="Media"?"No image":"No file"}function KA(e){switch(e){case"Thumb":case"Detail":return Yre;case"Tile":return Xre;case"Fill":return Zre}}function rne(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=D(e.label,tne(n)),s;return s=n==="Media"?Jre:Qre,n==="Media"?i==="Thumb"?b("span",{children:qp(n),"aria-label":o,className:qA,role:"img",title:o}):L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0,className:VA}),o],"aria-label":o,className:Fr([s,KA(i)]),role:"img"}):i==="Thumb"?L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0}),b("span",{children:o,className:ene})],className:qA,title:o}):L("span",{children:[b("span",{children:qp(n),"aria-hidden":!0,className:VA}),o],className:Fr([s,KA(i)])})}let F1=rne;function Ct(e){return"var("+e+")"}let I1=w([c("color",Ct(y.brand)),c("text-decoration","none"),We([c("text-decoration","underline")])]),nne=w([z("inlineBlock"),c("width","12px"),c("height","12px"),c("border-radius","3px"),c("border","1px solid var("+y.border+")"),c("vertical-align","-1px")]),yd=w([z("inlineFlex"),Z("center"),c("gap","6px")]),ine=w([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")]),one=w([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+")"),ye("zoomIn")]),sne=w([c("color",Ct(y.error)),c("font-size",Ct(A.sizeXs)),c("font-weight",Ct(A.weightMedium)),c("white-space","nowrap"),Ih(Ce(6))]),ane=w([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(A.sizeXs)),c("font-weight",Ct(A.weightMedium)),c("letter-spacing","0.03em"),c("padding","1px 4px"),c("line-height","1.2")]),lne=w([z("inlineBlock"),c("background",Ct(y.surfaceSubtle)),c("border-radius",Ct(X.full)),c("width","64px"),c("height","6px"),fa("hidden")]);function une(e){return w([c("background",Ct(y.brand)),c("border-radius",Ct(X.full)),c("height","100%"),c("width",e.toString()+"%")])}let ZS=w([c("color",Ct(y.textSecondary)),c("font-size",Ct(A.sizeXs)),c("font-variant-numeric","tabular-nums")]),cne=w([c("width","220px"),c("max-width","100%")]),dne=w([z("flex"),pe("column"),c("gap","1px"),c("line-height","1.35")]),fne=w([c("background","none"),c("border","none"),c("padding","0"),ye("zoomIn")]),hne=w([z("inlineFlex"),c("background","none"),c("border","none"),c("padding","0"),c("line-height","0"),c("max-width","100%"),ye("pointer"),We([c("opacity","0.75")])]),pne=w([z("flex"),pe("column"),c("gap",Ct(F.xs)),c("width","100%")]),gne=w([c("background","none"),c("border","none"),c("padding","0"),c("color",Ct(y.textSecondary)),c("font-size",Ct(A.sizeXs)),c("text-decoration","underline"),ye("pointer"),We([c("color",Ct(y.brand))])]),KM=w([z("flex"),pe("column"),Z("flexStart"),c("gap","6px")]),HM=w([c("color",Ct(y.textSecondary)),c("font-family",Ct(A.fontFamilyMono)),c("font-size",Ct(A.sizeXs))]),mne=w([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")]),vne=w([c("display","block"),c("max-width","260px"),c("height","auto")]),_ne=w([z("flex"),Z("center"),c("gap",Ct(F.xs))]);function kf(e){return w([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(A.sizeSm)),c("padding","6px 8px")])}let HA=w([c("flex","1 1 auto"),c("min-width","0")]),WA=w([c("flex","0 0 auto")]),bne=w([c("color",Ct(y.textSecondary)),c("font-size",Ct(A.sizeXs)),c("font-variant-numeric","tabular-nums")]),yne=w([z("inlineFlex"),Z("center"),c("gap","6px")]);function WM(e){return w([c("color",Ct(e?y.error:y.textSecondary)),c("font-size",Ct(A.sizeXs)),c("font-variant-numeric","tabular-nums")])}let xne=w([z("flex"),pe("column"),c("gap","4px")]),Sne=w([z("flex"),Z("center"),c("gap",Ct(F.xs))]);function xd(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function eE(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),o=D(n[1],"00"),s=a=>{let l=a.length;return l<=3?a:s(a.slice(0,l-3|0))+","+a.slice(l-3|0)};return(t?"-":"")+s(i)+"."+o}function Ene(e){return/^[A-Z]{3}$/.test(e)}function GM(e){if(Ene(e))try{return Wt(new Intl.NumberFormat("en-US",{style:"currency",currency:e}))}catch{return}}function JM(e,t){let r=GM(t);if(r===void 0)return eE(e)+" "+t;let n=rr(r),i=n.resolvedOptions().maximumFractionDigits;return n.format(e/Math.pow(10,i))}function Xm(e){return R(Q(e),t=>{let r=R(O(t,"amount"),Bo),n=R(O(t,"currency"),ce);if(r!==void 0&&n!==void 0)return[r,n]})}function wne(e,t){let r=GM(t);return r!==void 0?e/Math.pow(10,rr(r).resolvedOptions().maximumFractionDigits):e}function QM(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function YM(e){let t=["B","KB","MB","GB","TB","PB"],n=((a,l)=>{for(;;){let u=l,d=a;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,a=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 tE(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 rE(e){return R(Q(e),t=>{let r=o=>R(R(O(t,o),ce),s=>{if(s!=="")return s}),n=r("start"),i=r("end");if(n!==void 0&&i!==void 0)return[n,i]})}function nE(e,t){let r=$n(e),n=$n(t);return r!==void 0&&n!==void 0?n<r?"Ends before it starts":void 0:"Not a date-time"}function XM(e,t){let r=$n(e),n=$n(t);if(r!==void 0&&n!==void 0&&n>=r)return tE((n-r)/1e3)}function kne(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 Cne(e,t){return st(t,e,(r,n)=>D(r.split(n)[0],r))}function Pg(e){let r=Cne(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 Rne(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 iE(e){return/^[A-Za-z]{2}$/.test(e)}function ZM(e){if(iE(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let GA={contents:void 0};function Ane(){let e=GA.contents;if(e!==void 0)return rr(e);let t;try{t=Wt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return GA.contents=Wt(t),t}function oE(e){if(!iE(e))return e;let t=Ane();if(t===void 0)return e;try{let r=rr(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let Tne=["street","streetaddress","line1","addressline1","address1"],Nne=["line2","addressline2","address2","apartment","unit","suite"],$ne=["postalcode","zip","zipcode","postcode"],Dne=["city","town","locality"],Fne=["state","region","province","county"],Ine=["country","countrycode"];function Pne(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 e4(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=Ge(t._0),i=u=>R(n.find(d=>u.includes(d[0].toLowerCase())),d=>Pne(d[1])),o=i($ne),s=i(Dne),a=o!==void 0?s!==void 0?o+" "+s:o:s!==void 0?s:void 0,l=ne([i(Tne),i(Nne),a,i(Fne),i(Ine)],u=>u).map(u=>u.trim()).filter(u=>u!=="");return l.length===0?void 0:l;default:return}}function One(e){return W(e4(e),t=>t.map(r=>iE(r)?oE(r):r).join(", "))}function Mne(e){let t=ZM(e);return t!==void 0?t+" "+oE(e):e}function Vp(e){return fe(W(Vf(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function JA(e,t){let r=Vf(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let sE={};function xr(e,t){sE[Oh(e)]=t}function Lne(e){return O(sE,Oh(e))}function Yh(e,t){return R(Rm(e,t),r=>O(sE,Oh(r.semantic)))}function t4(e,t,r){return R(Yh(e,t),n=>n.cell(e,t,r))}function P1(e,t,r){return R(Yh(e,t),n=>n.detail(e,t,r))}function zne(e,t){return t4(e,t,null)}function Une(e,t){return P1(e,t,null)}function Bne(e,t){return fe(Yh(e,t),!1,r=>Be(r.input))}function jne(e,t,r,n,i,o,s){return W(R(Yh(e,t),a=>a.input),a=>a(e,t,r,n,i,o,s))}function qne(e,t,r,n){return R(R(Yh(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function Og(e){e.stopPropagation()}function Mg(e,t,r){return r?b("a",{children:t,className:I1,href:e,rel:"noopener noreferrer",target:"_blank",onClick:Og}):b("a",{children:t,className:I1,href:e,onClick:Og})}function Xn(e){return R(ce(e),t=>{if(t!=="")return t})}function aE(e){let t=(r,n,i)=>W(Xn(i),e);return{cell:t,detail:t}}function Zm(e){let t=(r,n,i)=>W(Bo(i),o=>e(o));return{cell:t,detail:t}}xr("Email",aE(e=>Mg("mailto:"+e,e,!1)));xr("Phone",aE(e=>Mg("tel:"+e,e,!1)));xr("Url",{cell:(e,t,r)=>W(Xn(r),n=>Mg(n,xd(n,40),!0)),detail:(e,t,r)=>W(Xn(r),n=>Mg(n,n,!0))});xr("Currency",Zm(eE));xr("Percent",Zm(QM));xr("Bytes",Zm(YM));xr("Duration",Zm(tE));xr("Color",aE(e=>L("span",{children:[b("span",{className:nne,style:{background:e}}),e],className:yd})));function Vne(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function Lg(e){let t=e.size,r=e.kind,n=KK(e.field);if(n===void 0)return b(F1,{kind:r,size:t});let i=Vne(r);return b("button",{children:b(F1,{kind:r,size:t,label:i[1]}),className:hne,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function Kne(e){let t=e.alt,r=e.src,n=ae(()=>!1);if(r===void 0)return b(Lg,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(Hr,{children:[b("button",{children:b("img",{className:one,alt:t,src:r}),className:fne,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(s=>!0)}}),n[0]?b(MI,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function zg(e){let t=it(e);if(typeof t!="object")return t==="JSONNull"?Wt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Wt(r===""?void 0:r)}xr("Image",{cell:(e,t,r)=>W(zg(r),n=>n!==void 0?b("img",{className:ine,alt:e,src:tu(n),onClick:Og}):b(Lg,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>W(zg(r),n=>b(Kne,{src:W(n,tu),alt:e,field:e}))});function Hne(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 Wne(e){return L("span",{children:[b(od,{name:e,size:"Small"}),e],className:yd})}function QA(e,t,r){return R(Xn(r),n=>{if(!Hne(n))return Wne(n)})}xr("UserRef",{cell:QA,detail:QA});xr("Markdown",{cell:(e,t,r)=>W(Xn(r),n=>xd(kne(n),80)),detail:(e,t,r)=>W(Xn(r),n=>b(TP,{source:n})),input:(e,t,r,n,i,o,s)=>b(Gre,{value:r,onChange:n,onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(n&&Sre(r))return"Required"}});xr("Rating",{cell:(e,t,r)=>W(Bo(r),n=>b(l_,{value:n,max:Vp(t)})),detail:(e,t,r)=>W(Bo(r),n=>b(l_,{value:n,max:Vp(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,s)=>b(l_,{value:D(Ss(r),0),max:Vp(t),size:"Medium",showValue:!0,onChange:a=>n(a<=0?"":a.toString()),onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=Ss(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 Gne(e){return e<0?0:e>100?100:e}xr("Progress",{cell:(e,t,r)=>W(Bo(r),n=>{let i=Gne(JA(t,n));return L("span",{children:[b("span",{children:b("span",{className:une(i)}),className:lne}),b("span",{children:Math.round(i).toString()+"%",className:ZS})],className:yd})}),detail:(e,t,r)=>W(Bo(r),n=>b("div",{children:b(JI,{value:JA(t,n)}),className:cne}))});function lE(e,t){let r=tu(e),n=Rne(t);return L("span",{children:[n!==void 0?b("span",{children:n,className:ane}):null,b("a",{children:t,className:I1,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:Og})],className:yd})}function r4(e){let t=e.name,r=e.href,n=ae(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[lE(r,t),wW(r)?b("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:gne,type:"button",onClick:s=>{s.stopPropagation(),i(a=>!a)}}):null],className:yd}),o?b(CW,{src:tu(r),title:t,height:"60vh"}):null],className:pne})}xr("FileUrl",{cell:(e,t,r)=>W(Xn(r),n=>lE(n,xd(Pg(n),40))),detail:(e,t,r)=>W(Xn(r),n=>b(r4,{href:n,name:Pg(n)}))});xr("File",{cell:(e,t,r)=>W(zg(r),n=>n!==void 0?lE(n,xd(Pg(n),40)):b(Lg,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>W(zg(r),n=>n!==void 0?b(r4,{href:n,name:Pg(n)}):b(Lg,{field:e,kind:"Document",size:"Detail"}))});function Jne(e){return D(R(Tr(e).find(t=>t[0].toLowerCase()==="currency"),t=>Eu(t[1])),[])}function Qne(e,t){return b("span",{children:JM(e,t),className:ZS})}function YA(e,t,r){return W(Xm(r),n=>Qne(n[0],n[1]))}function Yne(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o=Jne(e.propSchema),s;if(i==="")s=void 0;else try{s=Xm(JSON.parse(i))}catch{s=void 0}let a=s!==void 0?[s[0].toString(),s[1]]:["",D(o[0],"")],l=a[1],u=a[0],d=(h,p)=>{let g=Ss(h);n(g!==void 0&&p!==""?JSON.stringify(dt([["amount",g],["currency",p]])):"")},f=Ss(u);return L("span",{children:[L("span",{children:[b("input",{"aria-label":"Amount in minor units",className:kf(t)+" "+HA,step:1,type:"number",value:u,onBlur:h=>r(),onChange:h=>d(h.target.value,l)}),b("span",{children:f!==void 0&&l!==""?"= "+JM(f,l):"minor units",className:bne})],className:HA}),o.length===0?b("input",{"aria-label":"Currency",className:kf(t)+" "+WA,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:kf(t)+" "+WA,value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)})],className:_ne})}xr("Money",{cell:YA,detail:YA,input:(e,t,r,n,i,o,s)=>b(Yne,{propSchema:t,value:r,onChange:n,onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=Xm(i);if(o===void 0)return"Invalid amount";let s=o[0];if(s!==Math.trunc(s))return"An amount is a whole number of minor units"}});function Xne(e,t){let r=nE(e,t),n=XM(e,t),i=r!==void 0?r:n!==void 0?n:"";return L("span",{children:[D(qf(e),e)+" → "+D(qf(t),t),i===""?null:b("span",{children:i,className:WM(Be(r))})],className:yne})}function XA(e,t,r){return W(rE(r),n=>Xne(n[0],n[1]))}function Kp(e){if(e==="")return;let t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toISOString()}function ZA(e){let t=wm(e);return t===e?"":t.slice(0,10)+"T"+t.slice(11,16)}function Zne(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o;if(i==="")o=void 0;else try{o=rE(JSON.parse(i))}catch{o=void 0}let s=o!==void 0?[ZA(o[0]),ZA(o[1])]:["",""],a=s[1],l=s[0],u=(p,g)=>{let m=Kp(p),v=Kp(g);n(m!==void 0&&v!==void 0?JSON.stringify(dt([["start",m],["end",v]])):"")},d=Kp(l),f=Kp(a),h;if(d!==void 0&&f!==void 0){let p=nE(d,f);h=p!==void 0?[p,!0]:[D(XM(d,f),""),!1]}else h=["start and end",!1];return L("span",{children:[L("span",{children:[b("input",{"aria-label":"Start",className:kf(t),type:"datetime-local",value:l,onBlur:p=>r(),onChange:p=>u(p.target.value,a)}),b("span",{children:"→","aria-hidden":!0}),b("input",{"aria-label":"End",className:kf(t),type:"datetime-local",value:a,onBlur:p=>r(),onChange:p=>u(l,p.target.value)})],className:Sne}),b("span",{children:h[0],className:WM(h[1])})],className:xne})}xr("DateRange",{cell:XA,detail:XA,input:(e,t,r,n,i,o,s)=>b(Zne,{value:r,onChange:n,onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=rE(i);return o!==void 0?nE(o[0],o[1]):"Invalid range"}});function eie(e){let t=ZM(e);return t!==void 0?L("span",{children:[b("span",{children:t,"aria-hidden":!0}),oE(e)],className:yd}):e}function eT(e,t,r){return W(Xn(r),eie)}xr("Country",{cell:eT,detail:eT});xr("Address",{cell:(e,t,r)=>W(One(r),n=>xd(n,60)),detail:(e,t,r)=>W(e4(r),n=>b("span",{children:n.map((i,o)=>b("span",{children:Mne(i)},o.toString())),className:dne}))});function tie(e){return W(R(R(Q(e),t=>O(t,"maxLength")),Bo),t=>t|0)}function z_(e){let t=R(xs(e).channel,n=>qW(n).maxLength),r=tie(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}xr("ChannelText",{cell:(e,t,r)=>W(Xn(r),n=>{let i=R(z_(t),o=>{if(yc(n)>o)return yc(n)-o|0});return L("span",{children:[xd(n,80),i!==void 0?b("span",{children:i.toString()+" over",className:sne}):null]})}),detail:(e,t,r)=>{let n=Xn(r),i=xs(t).channel;if(n!==void 0&&i!==void 0)return b(EY,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,s)=>{let a=R(xs(t).channel,YI);return b(cY,{value:r,onChange:n,onBlur:i,maxLength:z_(t),channelLabel:W(a,l=>l.label),hasError:s,note:R(a,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 $P(o-i|0)+" over the "+i.toString()+"-character limit"})});xr("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>W(Xn(r),n=>L("span",{children:[b(XH,{value:n}),b("span",{children:n,className:HM})],className:KM}))});xr("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>W(Xn(r),n=>L("span",{children:[b(uW,{value:n}),b("span",{children:n,className:HM})],className:KM}))});xr("Signature",{cell:(e,t,r)=>R(Xn(r),n=>{if(rC(n))return b("span",{children:"✓ Signed",className:ZS})}),detail:(e,t,r)=>R(Xn(r),n=>{if(rC(n))return b("span",{children:b("img",{className:vne,alt:"Signature",src:tP(n)}),className:mne})}),input:(e,t,r,n,i,o,s)=>b(ZW,{value:r,onChange:n,onBlur:i,hasError:s}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function ph(e){return"var("+e+")"}let rie=w([z("inlineFlex"),Z("center"),bi("wrap"),c("gap","4px"),c("font-size",ph(A.sizeSm)),c("min-width","0")]),nie=w([c("color",ph(y.textDisabled)),c("font-size",ph(A.sizeXs))]),iie=w([c("color",ph(y.brand)),c("text-decoration","none"),We([c("text-decoration","underline")])]),oie=w([c("color",ph(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),s=n.href;return L(Px,{children:[s!==void 0?b("a",{children:n.label,className:iie,href:s,onClick:a=>{if(!(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.button!==0))return a.preventDefault(),a.stopPropagation(),r(s)}}):b("span",{children:n.label,className:oie}),o?null:b("span",{children:" › ",className:nie})]},i.toString()+":"+n.label)}),className:rie})}let aie=sie;function tT(e){return R(R(Q(e),t=>O(t,"type")),ce)}function uE(e){return R(R(Q(e),t=>O(t,"format")),ce)}function lie(e){return R(Q(e),t=>O(t,"items"))}function rT(e){return Be(R(R(Q(e),t=>O(t,"properties")),Q))}function Gc(e){let t=e.toLowerCase(),r=e.length,n=o=>{let s=o.length;if(r>s&&t.endsWith(o))return e.slice(0,r-s|0)},i=n("ids");return i!==void 0?i:n("id")}function uie(e,t,r){let n=Qn(t);if(e==="compositeId")return"KCompositeId";let i=Eu(n);if(i!==void 0)return{TAG:"KEnum",_0:i};let o=tT(n),s=0;if(o!==void 0)switch(o){case"array":let a=lie(n);if(a===void 0)return"KArrayOfStrings";if(rT(a)||Ue(tT(a),"object"))return{TAG:"KArrayOfObjects",_0:a};let l=Gc(e);return l!==void 0?{TAG:"KArrayOfEntityIds",_0:l}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return rT(n)?{TAG:"KNestedObject",_0:n}:"KString";default:s=1}else s=1;if(s===1){let a=uE(n),l=0;if(a!==void 0)switch(a){case"date":case"date-time":return"KDate";default:l=2}else l=2;if(l===2){if(r.isId)return"KString";let u=Gc(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 die(e,t,r){return t.isCompositeId?!0:r.includes(e)}function fie(e,t,r,n,i){return t.hidden||cie(e)||n&&die(e,t,i)?!1:r?t.summary||t.isId||e==="compositeId"?!0:n?!1:e==="id":!(n&&e==="id")}function hie(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 pie(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 $o(e,t){let r=t!==void 0?t:"List",n=D(W(R(R(Q(e),u=>O(u,"properties")),Q),Ge),[]),i=km(e),o=r==="List"&&i.length!==0,s=Gx(e),a=s.length!==0||n.some(u=>u[0]==="compositeId");return ne(n,u=>{let d=u[1],f=u[0],h=xs(d);if(!fie(f,h,o,a,s))return;let p=uie(f,d,h),g=D(R(R(Q(d),m=>O(m,"title")),ce),bt(f));return{key:f,label:g,kind:p,ann:h,propSchema:d,priority:hie(f,p,h),width:pie(p,f)}}).toSorted((u,d)=>u.priority-d.priority|0)}function gie(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function n4(e){return b(na,{variant:"Neutral",label:e,dot:!1})}function nT(e,t,r,n,i){let o=ma(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[oa(o.pluginId,o.name,t,[]),t]}function iT(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 Ug(e,t,r){let n=ma(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function O1(e,t,r,n,i,o,s,a,l){let u=l!==void 0?l:!1,d=Ug(t,n,s),f=D(a,xI(t)),h=m=>{let v=nT(t,m,n,i,s),_=v[1],x=d?[_,!1]:iT(t,_,o),E=x[0],S=b(NK,{href:v[0],label:E,rawValue:_}),C=f&&E!==_?L("span",{children:[b(od,{name:E,size:"Small"}),S],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):S;return x[1]?b("span",{children:C,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+_+")"}):C},p=m=>{let v=ne(m,_=>{let E=nT(t,_,n,i,s)[1],C=iT(t,E,o)[0];if(C!==E)return{name:C}});if(u&&f&&!d&&m.length>=2&&v.length===m.length)return b(dI,{members:v,size:"Small"})},g=it(r);if(typeof g!="object")return JSON.stringify(r);switch(g.TAG){case"JSONString":return h(g._0);case"JSONArray":let m=g._0,v=ne(m,ce),_=v.length===m.length?p(v):void 0;return _!==void 0?_:b("span",{children:m.map((x,E)=>{let S=it(x);return typeof S!="object"||S.TAG!=="JSONString"?null:L("span",{children:[h(S._0),E<(m.length-1|0)?", ":null]},E.toString())})});default:return JSON.stringify(r)}}function mie(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(aie,{segments:r})}function Ao(e,t,r){let n=it(r);if(typeof n!="object")switch(n){case"JSONFalse":return b(na,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return b(na,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=cI(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return wm(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function oT(e,t){let r=Q(t);if(r===void 0)return;let n=O(r,"name");if(n!==void 0&&it(n)!=="JSONNull")return Ao("name",void 0,n);let i=$o(e,"Drill"),o=ne(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 g=it(p);if(!(typeof g!="object"&&g==="JSONNull"))return[d,p]});if(o.length===0)return;let s=o.slice(0,2),a=i.length-s.length|0,l=s.map((d,f)=>{let h=d[1],p=d[0],g=p.kind,m;if(typeof g!="object")m=g==="KDate"?Ao(p.key,uE(p.propSchema),h):Ao(p.key,void 0,h);else if(g.TAG==="KEnum"){let v=it(h);m=typeof v!="object"||v.TAG!=="JSONString"?Ao(p.key,void 0,h):n4(v._0)}else m=Ao(p.key,void 0,h);return L("span",{children:[f>0?" · ":null,m]},f.toString())}),u=a>0?b("span",{children:"+"+a.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,s,a,l){let u=i!==void 0?i:pI;if(n===void 0)return D(zne(e,r),"—");let d=t4(e,r,n);if(d!==void 0)return d;if(typeof t!="object")switch(t){case"KCompositeId":return mie(n);case"KDate":return Ao(e,uE(r),n);case"KBoolean":case"KNumber":return Ao(e,void 0,n);case"KString":let h=it(n);if(typeof h!="object"||h.TAG!=="JSONString")return Ao(e,void 0,n);let p=h._0;return p.length>60?b("span",{children:gie(p,60),title:p}):Ao(e,void 0,n);case"KArrayOfStrings":let g=D(W(br(n),m=>ne(m,ce)),[]);return b(uI,{items:g})}else switch(t.TAG){case"KEnum":let h=it(n);return typeof h!="object"||h.TAG!=="JSONString"?Ao(e,void 0,n):n4(h._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let p=t._0,g=D(br(n),[]),m=g.length;if(u.collapsed){let S=g[0];return S!==void 0?sT(p,S,o,s,a,l):b(_f,{count:m,label:"items"})}let v=R(g[0],S=>oT(p,S));return v!==void 0?L("span",{children:[v,m>1?b("span",{children:"+"+(m-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):b(_f,{count:m,label:"items"});case"KNestedObject":let _=t._0;if(u.collapsed)return sT(_,n,o,s,a,l);let x=oT(_,n);if(x!==void 0)return x;let E=D(W(Q(n),S=>Object.keys(S).length),0);return b(_f,{count:E,label:"fields"})}let f=fe(Rm(e,r),!1,h=>h.semantic==="UserRef");return O1(e,t._0,n,o,s,a,l,f?!0:void 0,!0)}function sT(e,t,r,n,i,o){let s=D(Q(t),{}),a=$o(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:a.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(s,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 vie(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}}function _ie(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function aT(e,t,r,n){let i=ma(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 bie(e,t,r,n,i,o,s,a){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=Ug(h,t,s)?l.label:aT(h,!1,t,l.label);break;case"KArrayOfEntityIds":let p=u._0;d=Ug(p,t,s)?l.label:aT(p,!0,t,l.label);break;default:d=l.label}let f=fe(Rm(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,s);return a!==void 0&&f?b(hI.make,{fill:g=>a(h,g),children:p}):p},sortable:vie(l.kind),width:l.width}})}let i4=dr(void 0),yie=i4.Provider;function xie(e){return Ar(yie,{value:e.execute,children:e.children})}let Sie={make:xie};function Si(){return zt(i4)}let o4={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function s4(e,t){let r=Q(e),n=R(R(R(r,i=>O(i,"data")),Q),i=>O(i,t));return n!==void 0?n:R(r,i=>O(i,t))}function cE(e,t){let r=s4(e,t),n=R(r,br);return n!==void 0?n:ne(D(R(R(R(r,Q),i=>O(i,"edges")),br),[]),i=>R(Q(i),o=>O(o,"node")))}function a4(e,t){return ne(cE(e,t),Q)}function l4(e,t){let r=(i,o)=>D(R(O(i,o),MF),!1),n=(i,o)=>R(O(i,o),ce);return fe(R(R(R(s4(e,t),Q),i=>O(i,"pageInfo")),Q),o4,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function Eie(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function wie(e,t){return e.hasNextPage?!0:t==="Backward"}function kie(e,t){return e.hasPreviousPage?!0:t==="Forward"}let Cie={};function Xh(e,t,r,n){return R(ma(r,t),i=>R(O(e,i.queryField),o=>O(o.labels,n)))}function ev(e,t,r,n){let i=ma(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 Rie(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 ne(t._0,ce).filter(n=>n!=="");default:return[]}}function Aie(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 s=ma(r,o._0);if(s===void 0)return;let a=s.queryField,u={contents:D(O(n,a),[])};e.forEach(d=>{let f=O(d,i.key);if(f!==void 0){Rie(f).forEach(h=>{if(!u.contents.some(p=>p===h)){u.contents.push(h);return}});return}}),n[a]=u.contents}),n}function Tie(e){return Ge(e).toSorted((r,n)=>zf(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(zf).join(",")).join("|")}function Nie(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 u4(e,t,r){let n={};return a4(e,t).forEach(i=>{let o=R(O(i,"id"),ce),s=D(R(O(i,r),ce),"");if(o===void 0)return;let a=Nie(o),l=r==="id"?a!==void 0?a:o:s===""?o:s;if(n[o]=l,a!==void 0){n[a]=l;return}}),n}function Zh(e,t,r){let n=Si(),i=ae(()=>Cie),o=i[1],s=Aie(e,t,r),a=Tie(s);return Ae(()=>{let l={contents:!1};return a!==""&&n!==void 0&&Ge(s).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,g=p==="id"?"id":"id "+p,m="query($ids: [ID!]) { "+f+"(first: "+d.length.toString()+", filter: {ids: $ids}) { edges { node { "+g+" } } } }",v={};v.ids=d.map(_=>_),Gt(n(m,v).then(_=>{if(!l.contents){let x=u4(_,f,p);o(E=>{let S=dt(Ge(E));return S[f]={loaded:!0,labels:x},S})}return Promise.resolve()}),_=>(l.contents||(console.warn("[AutoUI] RefLabel batch "+f+" failed; cells fall back to raw ids",_),o(x=>{let E=dt(Ge(x));return E[f]={loaded:!0,labels:{}},E})),Promise.resolve()))}),()=>{l.contents=!0}},[a,n]),i[0]}let ca="table",za={contents:[]};function Qo(e){za.contents.some(t=>t.id===e.id)?za.contents=za.contents.map(t=>t.id===e.id?e:t):za.contents=za.contents.concat([e])}function c4(e){return za.contents.find(t=>t.id===e)}function Bg(){return za.contents}function dE(e){let t=za.contents.filter(r=>{let n=r.arity;return typeof n!="object"||n.TAG==="Multi"?r.isCapable(e):!1});return t.filter(r=>r.id===ca).concat(t.filter(r=>r.id!==ca))}function fE(e){return sK(e.map(t=>t.window))}function $ie(e){return st(e,0,(t,r)=>t+r.rows.length|0)}function ep(e,t,r){let n=r!==void 0?r:"item";return oI(fE(e),$ie(e),t,n)}function hE(e){try{return ys(localStorage.getItem(e))}catch{return}}function d4(e,t){try{return localStorage.setItem(e,t)}catch{return}}function f4(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+fe(r,"",n=>"."+n)}function Wa(e){return"var("+e+")"}let h4=w([z("inlineFlex"),Z("center"),c("border","1px solid var("+y.border+")"),c("border-radius",Wa(X.md)),c("overflow","hidden")]),pE=w([z("inlineFlex"),Z("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","2px var("+F.sm+")"),c("color",Wa(y.textSecondary)),c("font-size",Wa(A.sizeSm)),ye("pointer"),We([c("background",Wa(y.surfaceSubtle)),c("color",Wa(y.textPrimary))])]),p4=Fr([pE,w([c("background",Wa(y.surfaceSubtle)),c("color",Wa(y.textPrimary)),c("font-weight",Wa(A.weightMedium))])]),Die={group:h4,btn:pE,btnActive:p4};function Fie(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?p4:pE,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:h4,role:"group"})}let uf={Style:Die,make:Fie};function Iie(e){let t=e.source,r=Rs(),n=hm(),i=$o(t.schema,"List"),o=t.rows.map((f,h)=>{let p=D(Q(f),{});return{rowKey:D(R(O(p,"id"),ce),"#"+h.toString()),json:f,dict:p}}),s=Zh(o.map(f=>f.dict),i,r),u={lookupLabel:(f,h)=>Xh(s,f,r,h),isMissing:(f,h)=>ev(s,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(ig,{columns:d,data:o,keyFn:f=>f.rowKey,onRowClick:f=>t.onOpenRow(f.rowKey,f.json)})}let Pie=b("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});Qo({id:ca,label:"Table",icon:Pie,arity:"Single",isCapable:e=>!0,render:e=>{let t=e[0];return t!==void 0?b(Iie,{source:t}):null},capability:"always — the universal default"});let lT=["resources","events"],uT=["split","full"],cT=["funnel","scatter"],M1={};function io(e,t){return R(e.views,r=>O(r,t))}function da(e,t){return R(e.fields,r=>O(r,t))}function go(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function Xi(e,t,r){let n=e[t];if(n===void 0)return;let i=me.string(n);if(i!==void 0)return i;go(r+"."+t,"expected a string — dropped")}function dT(e,t,r){let n=e[t];if(n===void 0)return;let i=me.bool(n);if(i!==void 0)return i;go(r+"."+t,"expected a boolean — dropped")}function Oie(e,t,r){let n=e[t];if(n===void 0)return;let i=me.array(n);if(i!==void 0)return ne(i,me.string);go(r+"."+t,"expected an array of strings — dropped")}function fT(e,t,r,n){let i=e[t];if(i===void 0)return;let o=me.object(i);if(o!==void 0){let s={};return Object.entries(o).forEach(a=>{let l=a[0];se(n(a[1],r+"."+t+'["'+l+'"]'),u=>{s[l]=u})}),s}go(r+"."+t,"expected an object — dropped")}function g4(e,t){let r=me.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],s=me.string(i[1]);if(s!==void 0){n[o]=s;return}else return go(t+"."+o,"expected a string — dropped")}),n}go(t,"expected an object of string values — dropped")}function Mie(e,t){let r=me.object(e);if(r!==void 0){let n=r.transitions;return{mode:Xi(r,"mode",t),layout:Xi(r,"layout",t),canvas:Xi(r,"canvas",t),role:Xi(r,"role",t),resourceRef:Xi(r,"resourceRef",t),accent:Xi(r,"accent",t),audit:dT(r,"audit",t),presence:dT(r,"presence",t),suppress:Oie(r,"suppress",t),transitions:n!==void 0?g4(n,t+".transitions"):void 0}}go(t,"expected an object — dropped")}function Lie(e,t){let r=me.object(e);if(r!==void 0){let n=Xi(r,"view",t);if(n!==void 0)return{view:n,label:Xi(r,"label",t),field:Xi(r,"field",t),aggregate:Xi(r,"aggregate",t),viz:Xi(r,"viz",t),xField:Xi(r,"xField",t)};go(t,"metric without a `view` — dropped");return}go(t,"expected an object — dropped")}function zie(e,t){let r=e!==void 0?e:"ui-hints",n=me.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let s=me.array(i);s!==void 0?o=CF(s,(a,l)=>Lie(a,r+".dashboard["+l.toString()+"]")):(go(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:fT(n,"views",r,Mie),fields:fT(n,"fields",r,g4),dashboard:o}}return go(r,"expected an object — no hints applied"),M1}function Uie(e){let t=me.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=zie('ui-hints["'+i+'"]',n[1])}),r}return go("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function Bie(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];Be(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function ac(e){return D(W(R(R(Q(Qn(e)),t=>O(t,"properties")),Q),t=>Object.keys(t)),[])}function jie(e,t){return R(R(W(R(R(R(Q(Qn(e)),r=>O(r,"properties")),Q),r=>O(r,t)),Qn),Q),r=>O(r,"items"))}function U_(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(s=>s.name===n),o=i!==void 0?i.schema:W(e.stateViewSlices.find(s=>s.name===n),s=>s.schema);return o!==void 0?st(r.slice(1),{TAG:"Ok",_0:{schema:o}},(s,a)=>{if(s.TAG!=="Ok")return s;let l=s._0.schema,u=jie(l,a);return u!==void 0?{TAG:"Ok",_0:{schema:u}}:ac(l).includes(a)?fe(R(R(R(Q(Qn(l)),d=>O(d,"properties")),Q),d=>O(d,a)),{TAG:"Error",_0:'unresolvable path segment "'+a+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+a+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(s=>s.name).concat(e.stateViewSlices.map(s=>s.name)).join(", ")}}function qie(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 m4(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 Vie(e,t,r){let n=$h(m4(e,t),Br(r,void 0,void 0).statusField);return n!==void 0?Ho(r,n):[]}function Kie(e){return Tr(e).filter(t=>ia(t[1])).map(t=>t[0])}function hT(e,t){if(c4(e)!==void 0)return;let n=Bg().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function Hie(e,t){let r=[],n=i=>{r.push("[AutoUI] uiHints ("+t.id+"): "+i)};return se(e.views,i=>{Ge(i).forEach(o=>{let s=o[1],a=o[0],l=U_(t,a);l.TAG!=="Ok"&&n('views["'+a+'"]: '+l._0),se(s.role,u=>{if(!lT.includes(u))return n('views["'+a+'"].role: unknown role "'+u+'" — expected '+lT.join(" or "));if(u!=="events")return;let d=s.resourceRef;return d!==void 0?l.TAG==="Ok"&&!ac(l._0.schema).includes(d)?n('views["'+a+'"].resourceRef: unknown field "'+d+'"'):void 0:n('views["'+a+'"]: role "events" requires a resourceRef field')}),se(s.resourceRef,u=>{if(Uf(s.role,"events"))return n('views["'+a+'"].resourceRef: only meaningful with role "events"')}),se(s.transitions,u=>{let d=qie(t),f=m4(t,a),h;h=l.TAG==="Ok"?f!==void 0?Ho(l._0.schema,f):[]:[],h.length===0&&n('views["'+a+'"].transitions: the view declares no status enum, so no transition can apply'),Ge(u).forEach(p=>{let g=p[1],m=p[0];if(d.includes(g)||n('views["'+a+'"].transitions["'+m+'"]: unknown command "'+g+'" — known commands: '+d.join(", ")),h.length!==0&&!h.includes(m))return n('views["'+a+'"].transitions: unknown target state "'+m+'" — known states: '+h.join(", "))})}),se(s.mode,u=>se(hT(u,'views["'+a+'"].mode'),n)),se(s.layout,u=>{if(!uT.includes(u))return n('views["'+a+'"].layout: unknown layout "'+u+'" — expected '+uT.join(" or "))}),se(s.suppress,u=>{u.forEach(d=>{if(se(hT(d,'views["'+a+'"].suppress'),n),d===ca)return n('views["'+a+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),se(e.fields,i=>{Ge(i).forEach(o=>{let s=o[0],a=U_(t,s);if(a.TAG!=="Ok")return n('fields["'+s+'"]: '+a._0);let l=ac(a._0.schema);Ge(o[1]).forEach(u=>{let d=u[1],f=u[0];if(l.includes(f)||n('fields["'+s+'"]: unknown field "'+f+'"'),Ui(Qx(d)))return n('fields["'+s+'"].'+f+': unknown semantic "'+d+'"')})})}),se(e.dashboard,i=>{i.forEach(o=>{let s=D(o.aggregate,"count");["count","sum","avg"].includes(s)?s!=="count"&&Ui(o.field)&&n('dashboard metric on "'+o.view+'": aggregate "'+s+'" requires a field'):n('dashboard metric on "'+o.view+'": unknown aggregate "'+s+'" — expected count, sum, or avg');let a=U_(t,o.view);if(a.TAG!=="Ok")return n("dashboard metric: "+a._0);let l=a._0.schema;se(o.field,u=>{if(!ac(l).includes(u))return n('dashboard metric on "'+o.view+'": unknown field "'+u+'"')}),se(o.xField,u=>{if(!ac(l).includes(u))return n('dashboard metric on "'+o.view+'": unknown xField "'+u+'"')}),se(o.viz,u=>{if(!cT.includes(u))return n('dashboard metric on "'+o.view+'": unknown viz "'+u+'" — expected '+cT.join(", "));if(u==="funnel"&&Vie(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=ac(l),p=Kie(l);[["field",d],["xField",f]].forEach(g=>{let m=g[1];if(h.includes(m)&&!p.includes(m))return n('dashboard metric on "'+o.view+'": viz "scatter" '+g[0]+' "'+m+'" 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 v4(e,t){let r=dE(e),n=R(t,i=>i.suppress);return n!==void 0?r.filter(i=>i.id===ca?!0:!n.includes(i.id)):r}function _4(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 s=i(R(t,l=>l.mode));if(s!==void 0)return s;let a=i(r);return a!==void 0?a:n[0]}function B_(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function Wie(e,t,r,n){if(!n)return"Full";let i=R(e,B_);if(i!==void 0)return i;let o=R(R(t,s=>s.layout),B_);return o!==void 0?o:D(R(r,B_),"Full")}function Gie(e,t){return D(R(e,r=>r.audit),!1)?!0:t}function Jie(e){return D(R(e,t=>t.presence),!1)}function Qie(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 Yie="/ui-hints.json";function Xie(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function Zie(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function eoe(e){let t=me.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=a=>R(t[a],me.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=a=>R(t[a],me.bool),s=a=>D(W(R(t[a],me.object),l=>Object.fromEntries(ne(Object.entries(l),u=>{let d=u[0];return W(me.string(u[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),Qie(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(W(r("authMode"),Zie),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:D(o("autoRedirectFirstPage"),!1),mode:D(W(r("mode"),Xie),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:ne(D(R(t.accessTiers,me.array),[]),me.string),viewModes:ne(D(R(t.viewModes,me.array),[]),me.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),geocoderEndpoint:r("geocoderEndpoint"),uploadEndpoint:r("uploadEndpoint"),uploadEndpoints:s("uploadEndpoints"),assetOrigins:s("assetOrigins"),uiHintsUrl:D(r("uiHintsUrl"),Yie)}}}function toe(e){return Gt(fetch(e).then(t=>t.ok?t.json().then(Uie):(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 roe(){return Gt(fetch("/config.json").then(e=>e.ok?e.json().then(eoe):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 jg(e){return D(R(R(me.object(e),t=>t.errors),me.array),[]).some(t=>D(W(R(R(R(R(me.object(t),r=>r.extensions),me.object),r=>r.code),me.string),r=>r==="UNAUTHORIZED"),!1))}function noe(e,t,r,n){return(i,o)=>{let s=i.includes("Platform")||i.includes("platform")?t:e,a=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(a.Authorization="Bearer "+l),fetch(s,{method:"POST",headers:a,body:D(JSON.stringify({query:i,variables:o}),"")}).then(u=>(u.status===401&&n(),u.json())).then(u=>(jg(u)&&n(),Promise.resolve(D(R(me.object(u),d=>d.data),null))))}}class cf extends Error{}cf.prototype.name="InvalidTokenError";function ioe(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 ooe(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 ioe(t)}catch{return atob(t)}}function soe(e,t){if(typeof e!="string")throw new cf("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 cf(`Invalid token specified: missing part #${r+1}`);let i;try{i=ooe(n)}catch(o){throw new cf(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new cf(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let aoe=(function(e){return e&&e.name?String(e.name):"UnknownError"}),loe=(function(e){return e&&e.message?String(e.message):""});function gE(e){return{name:aoe(e),message:loe(e)}}function mE(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 uoe=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),coe=e=>({httpHandler:e.httpHandler()});var gh;(function(e){e.HTTP="http",e.HTTPS="https"})(gh||(gh={}));var mh;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(mh||(mh={}));const L1="__smithy_context";class qi{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 qi({...t,headers:{...t.headers}});return r.query&&(r.query=doe(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 qi.clone(this)}}function doe(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class Jc{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 foe=e=>t=>async r=>{if(!qi.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)},hoe={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},poe=e=>({applyToStack:t=>{t.add(foe(e),hoe)}}),goe=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=a,d=l??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return s?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:l}=a,u=l??t.inputFilterSensitiveLog;throw s?.error?.({clientName:i,commandName:o,input:u(r.input),error:n,metadata:n.$metadata}),n}},moe={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},voe=e=>({applyToStack:t=>{t.add(goe(),moe)}}),_oe={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},boe=()=>e=>async t=>e(t),yoe=e=>({applyToStack:t=>{t.add(boe(),_oe)}}),Sd=e=>e[L1]||(e[L1]={}),ta=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},xoe=(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 Soe(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const Eoe=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),s=e.authSchemePreference?await e.authSchemePreference():[],a=xoe(o,s),l=Soe(e.httpAuthSchemes),u=Sd(n),d=[];for(const f of a){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:g={},signingProperties:m={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},g),f.signingProperties=Object.assign(f.signingProperties||{},m),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)},woe={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},koe=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Eoe(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),woe)}}),Coe=e=>t=>{throw t},Roe=(e,t)=>{},Aoe=e=>(t,r)=>async n=>{if(!qi.isInstance(n.request))return t(n);const o=Sd(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:a,signer:l}=o,u=await t({...n,request:await l.sign(n.request,a,s)}).catch((l.errorHandler||Coe)(s));return(l.successHandler||Roe)(u.response,s),u},Toe={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Noe=e=>({applyToStack:t=>{t.addRelativeTo(Aoe(),Toe)}}),Cf=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},b4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pT=Object.entries(b4).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),$oe=b4.split(""),$c=6,Rf=8,Doe=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,s=0;for(let u=i,d=i+3;u<=d;u++)if(e[u]!=="="){if(!(e[u]in pT))throw new TypeError(`Invalid character ${e[u]} in base64 string.`);o|=pT[e[u]]<<(d-u)*$c,s+=$c}else o>>=$c;const a=i/4*3;o>>=s%Rf;const l=Math.floor(s/Rf);for(let u=0;u<l;u++){const d=(l-u-1)*Rf;n.setUint8(a+u,(o&255<<d)>>d)}}return new Uint8Array(r)},Qc=e=>new TextEncoder().encode(e),vh=e=>typeof e=="string"?Qc(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),vE=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 qg(e){let t;typeof e=="string"?t=Qc(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 s=0,a=0;for(let u=o,d=Math.min(o+3,t.length);u<d;u++)s|=t[u]<<(d-u-1)*Rf,a+=Rf;const l=Math.ceil(a/$c);s<<=l*$c-a;for(let u=1;u<=l;u++){const d=(l-u)*$c;i+=$oe[(s&Doe<<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(Qc(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"?qg(this):vE(this)}}const Ql=e=>encodeURIComponent(e).replace(/[!'()*]/g,Foe),Foe=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Ioe(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 gT(e,t){return new Request(e,t)}function Poe(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 _E{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new _E(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 gT("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,s=this.config.credentials;if(r?.aborted){const x=mT(r);return Promise.reject(x)}let a=t.path;const l=Ioe(t.query||{});l&&(a+=`?${l}`),t.fragment&&(a+=`#${t.fragment}`);let u="";if(t.username!=null||t.password!=null){const x=t.username??"",E=t.password??"";u=`${x}:${E}@`}const{port:d,method:f}=t,h=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${a}`,p=f==="GET"||f==="HEAD"?void 0:t.body,g={body:p,headers:new Headers(t.headers),method:f,credentials:s};this.config?.cache&&(g.cache=this.config.cache),p&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=r),j_.supported&&(g.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(t));let m=()=>{};const v=gT(h,g),_=[fetch(v).then(x=>{const E=x.headers,S={};for(const k of E.entries())S[k[0]]=k[1];return x.body!=null?{response:new Jc({headers:S,reason:x.statusText,statusCode:x.status,body:x.body})}:x.blob().then(k=>({response:new Jc({headers:S,reason:x.statusText,statusCode:x.status,body:k})}))}),Poe(i)];return r&&_.push(new Promise((x,E)=>{const S=()=>{const C=mT(r);E(C)};if(typeof r.addEventListener=="function"){const C=r;C.addEventListener("abort",S,{once:!0}),m=()=>C.removeEventListener("abort",S)}else r.onabort=S})),Promise.race(_).finally(m)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function mT(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 Ooe=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):Moe(e):Loe(e);async function Moe(e){const t=await zoe(e),r=tv(t);return new Uint8Array(r)}async function Loe(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:a,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=a}const o=new Uint8Array(i);let s=0;for(const a of t)o.set(a,s),s+=a.length;return o}function zoe(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(","),s=o>-1?o+1:i.length;t(i.substring(s))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const y4={},z1={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),y4[e]=t,z1[t]=e}function Uoe(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 z1)t[r/2]=z1[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+=y4[e[r]];return t}const U1=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,x4=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),Boe=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=Sd(r),[,s,a,l,u,d]=o??[];try{const f=await e.protocol.deserializeResponse(x4(s,a,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(Jc.isInstance(i)){const{headers:p={}}=i,g=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:q_(/^x-[\w-]+-request-?id$/,g),extendedRequestId:q_(/^x-[\w-]+-id-2$/,g),cfId:q_(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw f}},q_=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function joe(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 Yc=e=>{if(typeof e=="string")return Yc(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let s;return o&&(s=joe(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:s}},qoe=e=>{if(typeof e=="object"){if("url"in e){const t=Yc(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 Yc(e)},Voe=e=>(t,r)=>async n=>{const{operationSchema:i}=Sd(r),[,o,s,a,l,u]=i??[],d=r.endpointV2?async()=>qoe(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(x4(o,s,a,l,u),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},Koe={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Hoe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Woe(e){return{applyToStack:t=>{t.add(Voe(e),Hoe),t.add(Boe(e),Koe),e.protocol.setSerdeContext(e)}}}const V_=[];function df(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 Kd={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},K_=[],H_={};class fn{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=fn.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 s=n.length-1;s>=0;--s){const a=n[s];Object.assign(this.memberTraits,df(a))}}else this.memberTraits=0;if(o instanceof fn){const s=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},s,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=V0(o),Goe(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[Kd.ns])return t[Kd.ns];const n=V0(t);if(n instanceof fn)return n;if(W_(n)){const[o,s]=n;if(o instanceof fn)return Object.assign(o.getMergedTraits(),df(s)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new fn(n);return r?t[Kd.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 df(this.memberTraits)}getOwnTraits(){return df(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 Hd([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 Hd([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 Hd(W_(i)?i:[i,0],t)}if(this.isDocumentSchema())return Hd([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[Kd.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],s=Hd([t[5][i],0],o);yield n[i]=[o,s]}t[Kd.it]=n}}function Hd(e,t){if(e instanceof fn)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=fn;return new r(e,t)}const W_=e=>Array.isArray(e)&&e.length===2,Goe=e=>Array.isArray(e)&&e.length>=5;class Ti{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 Ti.registries.has(t)||Ti.registries.set(t,new Ti(t)),Ti.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,Ti.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,Ti.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):Ti.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 B1=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&nse.warn(rse(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Joe=Math.ceil(2**127*(2-2**-23)),vT=e=>{const t=B1(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Joe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Qoe=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},_T=e=>S4(e,16),bT=e=>S4(e,8),S4=(e,t)=>{const r=Qoe(e);if(r!==void 0&&Yoe(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Yoe=(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]}},Xoe=e=>B1(typeof e=="string"?rv(e):e),Zoe=e=>vT(typeof e=="string"?rv(e):e),ese=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,rv=e=>{const t=e.match(ese);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},Vg=e=>_T(typeof e=="string"?rv(e):e),tse=e=>bT(typeof e=="string"?rv(e):e),rse=e=>String(new TypeError(e).stack||e).split(`
|
|
44
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
45
|
+
`),nse={warn:console.warn},ise=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],bE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ose(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,f=a<10?`0${a}`:`${a}`;return`${ise[n]}, ${l} ${bE[r]} ${t} ${u}:${d}:${f} GMT`}const sse=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ase=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=sse.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,s,a,l,u,d]=t,f=Vg(_h(n)),h=nl(i,"month",1,12),p=nl(o,"day",1,31),g=K0(f,h,p,{hours:s,minutes:a,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&g.setTime(g.getTime()-bse(d)),g},lse=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$/),use=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$/),cse=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})$/),E4=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=lse.exec(e);if(t){const[r,n,i,o,s,a,l,u]=t;return K0(Vg(_h(o)),G_(i),nl(n,"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:u})}if(t=use.exec(e),t){const[r,n,i,o,s,a,l,u]=t;return pse(K0(fse(o),G_(i),nl(n,"day",1,31),{hours:s,minutes:a,seconds:l,fractionalMilliseconds:u}))}if(t=cse.exec(e),t){const[r,n,i,o,s,a,l,u]=t;return K0(Vg(_h(u)),G_(n),nl(i.trimLeft(),"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},dse=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=Xoe(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 mse(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),_se(n.fractionalMilliseconds)))},fse=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Vg(_h(e));return r<t?r+100:r},hse=50*365*24*60*60*1e3,pse=e=>e.getTime()-new Date().getTime()>hse?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,G_=e=>{const t=bE.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},gse=[31,28,31,30,31,30,31,31,30,31,30,31],mse=(e,t,r)=>{let n=gse[t];if(t===1&&vse(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${bE[t]} in ${e}: ${r}`)},vse=e=>e%4===0&&(e%100!==0||e%400===0),nl=(e,t,r,n)=>{const i=tse(_h(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},_se=e=>e==null?0:Zoe("0."+e)*1e3,bse=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},_h=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},yT=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),w4=()=>{if(yT)return yT();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]]},Ga=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Ga.from=e=>e&&typeof e=="object"&&(e instanceof Ga||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Ga(String(e)):Ga(JSON.stringify(e));Ga.fromObject=Ga.from;const xT=/^-?\d*(\.\d+)?$/;class gs{string;type;constructor(t,r){if(this.string=t,this.type=r,!xT.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 gs.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&xT.test(r.string)}}class yse{serdeContext;setSerdeContext(t){this.serdeContext=t}}class xse extends yse{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=Ti.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return qi}getResponseType(){return Jc}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=fn.of(r.input),o=df(r.traits??{});if(o.endpoint){let s=o.endpoint?.[0];if(typeof s=="string"){for(const[a,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const u=n[a];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${a} in input must be a string as hostLabel.`);s=s.replace(`{${a}}`,u)}t.hostname=s+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 T0(async()=>{const{EventStreamSerde:r}=await import("./index-BegL3iwB.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 Sse extends xse{async serializeRequest(t,r,n){const i=this.serializer,o={},s={},a=await n.endpoint(),l=fn.of(t?.input),u=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new qi({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:s,body:void 0});if(a&&(this.updateServiceEndpoint(h,a),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const g={};for(const[m,v]of l.structIterator())m!==p&&f[m]&&(i.write(v,f[m]),g[m]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:g})}}else i.write(u,f),d=i.flush()}return h.headers=Object.assign(h.headers,s),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=fn.of(t.output),s={};if(n.statusCode>=300){const l=await U1(n.body,r);throw l.byteLength>0&&Object.assign(s,await i.read(15,l)),await this.handleError(t,r,n,s,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 a=o.getEventStreamMember();if(a)s[a]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:s});else{const l=await U1(n.body,r);l.byteLength>0&&Object.assign(s,await i.read(o,l))}return s.$metadata=this.deserializeMetadata(n),s}}function k4(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 Ese(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 wse{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 kse{async sign(t,r,n){return t}}const Cse=e=>function(r){return C4(r)&&r.expiration.getTime()-Date.now()<e},Rse=3e5,Ase=Cse(Rse),C4=e=>e.expiration!==void 0,Tse=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const l=async u=>{o||(o=n(u));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return t===void 0?async u=>((!s||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!s||u?.forceRefresh)&&(i=await l(u)),a?i:r(i)?(t(i)&&await l(u),i):(a=!0,i))},Nse=void 0;function $se(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Dse(e){const t=Cf(e.userAgentAppId??Nse),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!$se(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 yE{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 yE(t,r,n,i)}}class Fse{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:s,done:a}=i.next();if(this.data.delete(s),a||++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 qo extends Error{constructor(t){super(t),this.name="EndpointError"}}const Ise="endpoints";function Kg(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Kg(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Kg).join(", ")})`:JSON.stringify(e,null,2)}const xE={},Pse=(e,t)=>e===t;function Ose(...e){for(const t of e)if(t!=null)return t}const Mse=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 qo(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new qo(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},R4=(e,t)=>Mse(t).reduce((r,n)=>{if(typeof r!="object")throw new qo(`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),Lse=e=>e!=null,zse=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),nv=(e,t=!1)=>{if(!t)return zse.test(e);const r=e.split(".");for(const n of r)if(!nv(n))return!1;return!0};function Use(e,t,r){return e?t:r}const Bse=e=>!e,jse=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}$"),A4=e=>jse.test(e)||e.startsWith("[")&&e.endsWith("]"),J_={[gh.HTTP]:80,[gh.HTTPS]:443},qse=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:g="",path:m="",query:v={}}=e,_=new URL(`${g}//${h}${p?`:${p}`:""}${m}`);return _.search=Object.entries(v).map(([x,E])=>`${x}=${E}`).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:s,search:a}=t;if(a)return null;const l=s.slice(0,-1);if(!Object.values(gh).includes(l))return null;const u=A4(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 Vse(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 Kse=(e,t)=>e===t,Hse=(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),Wse=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Gse={booleanEquals:Pse,coalesce:Ose,getAttr:R4,isSet:Lse,isValidHostLabel:nv,ite:Use,not:Bse,parseURL:qse,split:Vse,stringEquals:Kse,substring:Hse,uriEncode:Wse},T4=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const s=e.indexOf("{",o);if(s===-1){r.push(e.slice(o));break}r.push(e.slice(o,s));const a=e.indexOf("}",s);if(a===-1){r.push(e.slice(s));break}e[s+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(s+1,a)),o=a+2);const l=e.substring(s+1,a);if(l.includes("#")){const[u,d]=l.split("#");r.push(R4(n[u]??i[u],d))}else r.push(n[l]??i[l]);o=a+1}return r.join("")},Jse=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],iv=(e,t,r)=>{if(typeof e=="string")return T4(e,r);if(e.fn)return $4.callFunction(e,r);if(e.ref)return Jse(e,r);throw new qo(`'${t}': ${String(e)} is not a string, function or reference.`)},N4=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let s=0;s<n.length;++s){const a=t[s];typeof a=="boolean"||typeof a=="number"?n[s]=a:n[s]=$4.evaluateExpression(a,"arg",r)}const i=e.indexOf(".");if(i!==-1){const a=xE[e.slice(0,i)]?.[e.slice(i+1)];if(typeof a=="function")return a(...n)}const o=Gse[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},$4={evaluateExpression:iv,callFunction:N4},Qse=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new qo(`'${r}' is already defined in Reference Record.`);const n=N4(e,t);t.logger?.debug?.(`${Ise} evaluateCondition: ${Kg(e)} = ${Kg(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},Yse=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const s=iv(o,"Header value entry",t);if(typeof s!="string")throw new qo(`Header '${n}' value '${s}' is not a string`);return s}),r),{}),D4=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=I4.getEndpointProperty(i,t),r),{}),F4=(e,t)=>{if(Array.isArray(e))return e.map(r=>F4(r,t));switch(typeof e){case"string":return T4(e,t);case"object":if(e===null)throw new qo(`Unexpected endpoint property: ${e}`);return I4.getEndpointProperties(e,t);case"boolean":return e;default:throw new qo(`Unexpected endpoint property type: ${typeof e}`)}},I4={getEndpointProperty:F4,getEndpointProperties:D4},Xse=(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 qo(`Endpoint URL must be a string, got ${typeof r}`)},Q_=1e8,Zse=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let s=n;const a={},l={referenceRecord:a,endpointParams:t.endpointParams,logger:t.logger};for(;s!==1&&s!==-1&&s<Q_;){const u=3*(Math.abs(s)-1),[d,f,h]=[r[u],r[u+1],r[u+2]],[p,g,m]=o[d],v=Qse({fn:p,assign:m,argv:g},l);if(v.toAssign){const{name:_,value:x}=v.toAssign;a[_]=x}s=s>=0===v.result?f:h}if(s>=Q_){const u=i[s-Q_];if(u[0]===-1){const[,p]=u;throw new qo(iv(p,"Error",l))}const[d,f,h]=u;return{url:Xse(d,l),properties:D4(f,l),headers:Yse(h??{},l)}}throw new qo("No matching endpoint.")},P4=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!P4(r))return!1;return!0}return!(!nv(e)||e.length<3||e.length>63||e!==e.toLowerCase()||A4(e))},ST=":",eae="/",tae=e=>{const t=e.split(ST);if(t.length<6)return null;const[r,n,i,o,s,...a]=t;if(r!=="arn"||n===""||i===""||a.join(ST)==="")return null;const l=a.map(u=>u.split(eae)).flat();return{partition:n,service:i,region:o,accountId:s,resourceId:l}},rae=[{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)"}}}],nae={partitions:rae};let iae=nae;const oae=e=>{const{partitions:t}=iae;for(const n of t){const{regions:i,outputs:o}=n;for(const[s,a]of Object.entries(i))if(s===e)return{...o,...a}}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}},O4={isVirtualHostableS3Bucket:P4,parseArn:tae,partition:oae};xE.aws=O4;function sae(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function zs(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 Af=3,aae=fl.STANDARD,lae=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],uae=["TimeoutError","RequestTimeout","RequestTimeoutException"],cae=[500,502,503,504],dae=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],fae=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],hae=e=>e?.$retryable!==void 0,pae=e=>e.$metadata?.clockSkewCorrected,gae=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},M4=e=>e.$metadata?.httpStatusCode===429||lae.includes(e.name)||e.$retryable?.throttling==!0,SE=(e,t=0)=>hae(e)||pae(e)||uae.includes(e.name)||dae.includes(e?.code||"")||fae.includes(e?.code||"")||cae.includes(e.$metadata?.httpStatusCode||0)||gae(e)||vae(e)||e.cause!==void 0&&t<=10&&SE(e.cause,t+1),mae=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!SE(e)}return!1};function vae(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class EE{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"||M4(n?.error??t)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),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=>EE.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 L4=20*1e3,ET=500,_ae=1,bae="amz-sdk-invocation-id",yae="amz-sdk-request";var xae={};class Kn{static v2026=typeof process<"u"&&xae?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Kn.v2026?50:100}static throttlingDelay(){return Kn.v2026?1e3:500}static cost(){return Kn.v2026?14:5}static throttlingCost(){return Kn.v2026?5:10}static modifiedCostType(){return Kn.v2026?"THROTTLING":"TRANSIENT"}}class Sae{x=Kn.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,L4);return Math.floor(i)}setDelayBase(t){this.x=t}}class wT{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(L4,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class j1{mode=fl.STANDARD;capacity=ET;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()=>Af,this.baseDelay??=Kn.delay(),this.retryBackoffStrategy??=new Sae}async acquireInitialRetryToken(t){return new wT(Kn.delay(),0,void 0,Kn.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"?Kn.throttlingDelay():this.baseDelay);const s=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let a=s;if(r.retryAfterHint instanceof Date&&(a=Math.max(s,Math.min(r.retryAfterHint.getTime()-Date.now(),s+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new wT(a,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:Kn.v2026?a:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(ET,this.capacity+(t.getRetryCost()??_ae))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Af}`),Af}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===Kn.modifiedCostType()?Kn.throttlingCost():Kn.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class Eae{mode=fl.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new EE,this.standardRetryStrategy=r?new j1({maxAttempts:typeof t=="number"?t:3,...r}):new j1(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 wae=/\d{12}\.ddb/;async function kae(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&zs(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:zs(e,"RETRY_MODE_ADAPTIVE","F");break;case fl.STANDARD:zs(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(wae)&&zs(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":zs(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":zs(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":zs(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&zs(e,"RESOLVED_ACCOUNT_ID","T");for(const[s,a]of Object.entries(o.$source??{}))zs(e,s,a)}}const kT="user-agent",Y_="x-amz-user-agent",CT=" ",X_="/",Cae=/[^!$%&'*+\-.^_`|~\w]/g,Rae=/[^!$%&'*+\-.^_`|~\w#]/g,RT="-",Aae=1024;function Tae(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Aae){t.length?t+=","+n:t+=n;continue}break}return t}const Nae=e=>(t,r)=>async n=>{const{request:i}=n;if(!qi.isInstance(i))return t(n);const{headers:o}=i,s=r?.userAgent?.map(Hp)||[],a=(await e.defaultUserAgentProvider()).map(Hp);await kae(r,e,n);const l=r;a.push(`m/${Tae(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Hp)||[],d=await e.userAgentAppId();d&&a.push(Hp(["app",`${d}`]));const f=[].concat([...a,...s,...u]).join(CT),h=[...a.filter(p=>p.startsWith("aws-sdk-")),...u].join(CT);return e.runtime!=="browser"?(h&&(o[Y_]=o[Y_]?`${o[kT]} ${h}`:h),o[kT]=f):o[Y_]=f,t({...n,request:i})},Hp=e=>{const t=e[0].split(X_).map(s=>s.replace(Cae,RT)).join(X_),r=e[1]?.replace(Rae,RT),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(s=>s&&s.length>0).reduce((s,a,l)=>{switch(l){case 0:return a;case 1:return`${s}/${a}`;default:return`${s}#${a}`}},"")},$ae={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Dae=e=>({applyToStack:t=>{t.add(Nae(e),$ae)}}),Fae=!1,Iae=!1,AT=new Set,Pae=(e,t=nv)=>{if(!AT.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 AT.add(e)},z4=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Oae=e=>z4(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Mae=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=Oae(n);return Pae(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return z4(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},TT="content-length";function Lae(e){return t=>async r=>{const n=r.request;if(qi.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(s=>s.toLowerCase()).indexOf(TT)===-1)try{const s=e(i);n.headers={...n.headers,[TT]:String(s)}}catch{}}return t({...r,request:n})}}const zae={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Uae=e=>({applyToStack:t=>{t.add(Lae(e.bodyLengthChecker),zae)}}),Bae=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Hae(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Kae(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},jae=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,qae=/(\d+\.){3}\d+/,Vae=/\.\./,Kae=e=>jae.test(e)&&!qae.test(e)&&!Vae.test(e),Hae=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,s=!!(o&&r&&n&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},Wae=(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:s,hostname:a,port:l,path:u}=o;return`${s}//${a}${l?":"+l:""}${u}`}}return o}:i},U4=async e=>{},B4=e=>{if(typeof e=="object"){if("url"in e){const t=Yc(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 Yc(e)},Gae=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let s;r.serviceConfiguredEndpoint?s=await r.serviceConfiguredEndpoint():s=await U4(r.serviceId),s&&(r.endpoint=()=>Promise.resolve(B4(s)),r.isCustomEndpoint=!0)}const i=await Jae(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 s=await r.endpoint();if(s?.headers){o.headers??={};for(const[a,l]of Object.entries(s.headers))o.headers[a]=Array.isArray(l)?l:[l]}}return o},Jae=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,s]of Object.entries(i))switch(s.type){case"staticContextParams":n[o]=s.value;break;case"contextParams":n[o]=e[s.name];break;case"clientContextParams":case"builtInParams":n[o]=await Wae(s.name,o,r,s.type!=="builtInParams")();break;case"operationContextParams":n[o]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Bae(n),n},Qae=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&Ese(n,"ENDPOINT_OVERRIDE","N");const o=await Gae(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const s=n.authSchemes?.[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;const l=Sd(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return r({...i})},Yae={name:"serializerMiddleware"},Xae={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Yae.name},Zae=(e,t)=>({applyToStack:r=>{r.addRelativeTo(Qae({config:e,instructions:t}),Xae)}}),ele=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>B4(await ta(r)()):void 0,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:ta(n??!1),useFipsEndpoint:ta(i??!1)});let l;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=U4(e.serviceId)),l),a},tle=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}`),rle=e=>{const{retryStrategy:t,retryMode:r}=e,n=ta(e.maxAttempts??Af);let i=t?Promise.resolve(t):void 0;const o=async()=>await ta(r)()===fl.ADAPTIVE?new Eae(n):new j1(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},Tl=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},Na=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Hg=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>NT[p.step]-NT[h.step]||$T[p.priority||"normal"]-$T[h.priority||"normal"]),o=f=>{let h=!1;const p=g=>{const m=Tl(g.name,g.aliases);if(m.includes(f)){h=!0;for(const v of m)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>{let h=!1;const p=g=>{if(g.middleware===f){h=!0;for(const m of Tl(g.name,g.aliases))n.delete(m);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=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=[],g={};return e.forEach(v=>{const _={...v,before:[],after:[]};for(const x of Tl(_.name,_.aliases))g[x]=_;h.push(_)}),t.forEach(v=>{const _={...v,before:[],after:[]};for(const x of Tl(_.name,_.aliases))g[x]=_;p.push(_)}),p.forEach(v=>{if(v.toMiddleware){const _=g[v.toMiddleware];if(_===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${Na(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:g,aliases:m}=h,v={step:"initialize",priority:"normal",middleware:f,...h},_=Tl(p,m);if(_.length>0){if(_.some(x=>n.has(x))){if(!g)throw new Error(`Duplicate middleware name '${Na(p,m)}'`);for(const x of _){const E=e.findIndex(C=>C.name===x||C.aliases?.some(k=>k===x));if(E===-1)continue;const S=e[E];if(S.step!==v.step||v.priority!==S.priority)throw new Error(`"${Na(S.name,S.aliases)}" middleware with ${S.priority} priority in ${S.step} step cannot be overridden by "${Na(p,m)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(E,1)}}for(const x of _)n.add(x)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:g,aliases:m}=h,v={middleware:f,...h},_=Tl(p,m);if(_.length>0){if(_.some(x=>n.has(x))){if(!g)throw new Error(`Duplicate middleware name '${Na(p,m)}'`);for(const x of _){const E=t.findIndex(C=>C.name===x||C.aliases?.some(k=>k===x));if(E===-1)continue;const S=t[E];if(S.toMiddleware!==v.toMiddleware||S.relation!==v.relation)throw new Error(`"${Na(S.name,S.aliases)}" middleware ${S.relation} "${S.toMiddleware}" middleware cannot be overridden by "${Na(p,m)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(E,1)}}for(const x of _)n.add(x)}t.push(v)},clone:()=>a(Hg()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):s(f),removeByTag:f=>{let h=!1;const p=g=>{const{tags:m,name:v,aliases:_}=g;if(m&&m.includes(f)){const x=Tl(v,_);for(const E of x)n.delete(E);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=a(Hg());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:a,identify:()=>u(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return Na(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of u().map(g=>g.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},NT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},$T={high:3,normal:2,low:1};class nle{config;middlewareStack=Hg();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,s=i===void 0&&this.config.cacheMiddleware===!0;let a;if(s){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?a=l.get(t.constructor):(a=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,a))}else delete this.handlers,a=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)a(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return a(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Z_="***SensitiveInformation***";function q1(e,t){if(t==null)return t;const r=fn.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,s]of r.structIterator())n[o]!=null&&(i[o]=q1(s,n[o]));return i}return t}class j4{middlewareStack=Hg();schema;static classBuilder(){return new ile}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:s,inputFilterSensitiveLog:a,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,g={logger:p,clientName:o,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:l,[L1]:{commandInstance:this,...u},...d},{requestHandler:m}=r;let v=n??{};return u.eventStream&&(v={isEventStream:!0,...v}),h.resolve(_=>m.handle(_.request,v),g)}}class ile{_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 s=t._operationSchema,a=s?.[4]??s?.input,l=s?.[5]??s?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(s?q1.bind(null,a):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(s?q1.bind(null,l):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class gc 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 gc.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===gc?gc.isInstance(t):gc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const DT=(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},ole=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(mh),sle=e=>{const t=[];for(const r in mh){const n=mh[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}}},ale=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();q4.includes(n)&&(t[n]=r.checksumConstructor())}),t},lle=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),ule=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},cle=e=>Object.assign(sle(e),lle(e)),dle=e=>Object.assign(ale(e),ule(e));class V4{trace(){}debug(){}info(){}warn(){}error(){}}const fle=e=>e?.body instanceof ReadableStream;function hle(e,t){if(Jc.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=(E4(i).getTime()-Date.now())/1e3}catch(s){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(s)}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 ple=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(gle(i)){i=i;let s=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),a=new Error,l=0,u=0;const{request:d}=n,f=qi.isInstance(d);for(f&&(d.headers[bae]=w4());;)try{f&&(d.headers[yae]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(s),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=mle(h,e.logger);if(a=tle(h),f&&fle(d))throw(r.logger instanceof V4?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{s=await i.refreshRetryTokenForRetry(s,p)}catch(m){throw typeof m.$backoff=="number"&&await FT(m.$backoff),a.$metadata||(a.$metadata={}),a.$metadata.attempts=l+1,a.$metadata.totalRetryDelay=u,a}l=s.getRetryCount();const g=s.getRetryDelay();u+=g,await FT(g)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},FT=e=>new Promise(t=>setTimeout(t,e)),gle=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",mle=(e,t)=>{const r={error:e,errorType:vle(e)},n=hle(e.$response,t);return n&&(r.retryAfterHint=n),r},vle=e=>M4(e)?"THROTTLING":SE(e)?"TRANSIENT":mae(e)?"SERVER_ERROR":"CLIENT_ERROR",_le={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ble=e=>({applyToStack:t=>{t.add(ple(e),_le)}}),IT=e=>Jc.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,K4=e=>new Date(Date.now()+e),yle=(e,t)=>Math.abs(K4(t).getTime()-e)>=3e5,PT=(e,t)=>{const r=Date.parse(e);return yle(r,t)?r-Date.now():t},Tf=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},xle=async e=>{const t=Tf("context",e.context),r=Tf("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await Tf("signer",r.signer)(n),s=e?.signingRegion,a=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:s,signingRegionSet:a,signingName:l}};class Sle{async sign(t,r,n){if(!qi.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await xle(n),{config:o,signer:s}=i;let{signingRegion:a,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[f,h]=u.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(a=h?.signingRegion??a,l=h?.signingName??l)}return await s.sign(t,{signingDate:K4(o.systemClockOffset),signingRegion:a,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??IT(r.$response);if(n){const i=Tf("config",t.config),o=i.systemClockOffset;i.systemClockOffset=PT(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=IT(t);if(n){const i=Tf("config",r.config);i.systemClockOffset=PT(n,i.systemClockOffset)}}}const Ele=(e,t,r)=>{let n,i,o,s=!1;const a=async()=>{i||(i=e());try{n=await i,o=!0,s=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await a()),n)},wle="X-Amz-Algorithm",kle="X-Amz-Credential",H4="X-Amz-Date",Cle="X-Amz-SignedHeaders",Rle="X-Amz-Expires",W4="X-Amz-Signature",G4="X-Amz-Security-Token",J4="authorization",Q4=H4.toLowerCase(),Ale="date",Tle=[J4,Q4,Ale],Nle=W4.toLowerCase(),V1="x-amz-content-sha256",$le=G4.toLowerCase(),Dle={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},Fle=/^proxy-/,Ile=/^sec-/,eb="AWS4-HMAC-SHA256",Ple="AWS4-HMAC-SHA256-PAYLOAD",Ole="UNSIGNED-PAYLOAD",Mle=50,Y4="aws4_request",Lle=3600*24*7,Wp={},tb=[],rb=(e,t,r)=>`${e}/${t}/${r}/${Y4}`,zle=async(e,t,r,n,i)=>{const o=await OT(e,t.secretAccessKey,t.accessKeyId),s=`${r}:${n}:${i}:${Yl(o)}:${t.sessionToken}`;if(s in Wp)return Wp[s];for(tb.push(s);tb.length>Mle;)delete Wp[tb.shift()];let a=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,Y4])a=await OT(e,a,l);return Wp[s]=a},OT=(e,t,r)=>{const n=new e(t);return n.update(vh(r)),n.digest()},MT=({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 Dle||t?.has(o)||Fle.test(o)||Ile.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},Ule=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()===V1)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Ule(t)){const n=new r;return n.update(vh(t)),Yl(await n.digest())}return Ole};class Ble{format(t){const r=[];for(const o of Object.keys(t)){const s=Qc(o);r.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,s)=>o+s.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 s=new Uint8Array(o.buffer);return s.set(t.value,3),s;case"string":const a=Qc(t.value),l=new DataView(new ArrayBuffer(3+a.byteLength));l.setUint8(0,7),l.setUint16(1,a.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(a,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(wE.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!jle.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Uoe(t.value.replace(/\-/g,"")),1),f}}}var LT;(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"})(LT||(LT={}));const jle=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class wE{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&&zT(r),new wE(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&zT(t),parseInt(Yl(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function zT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const qle=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},Vle=(e,t={})=>{const{headers:r,query:n={}}=qi.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}},UT=e=>{e=qi.clone(e);for(const t of Object.keys(e.headers))Tle.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Kle=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===Nle)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((s,a)=>s.concat([`${i}=${Ql(a)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},Hle=e=>Wle(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Wle=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Gle{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s=!0}){this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ta(n),this.credentialProvider=ta(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
46
|
+
${this.getCanonicalPath(t)}
|
|
47
|
+
${Kle(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(vh(n));const s=await o.digest();return`${i}
|
|
53
|
+
${t}
|
|
54
|
+
${r}
|
|
55
|
+
${Yl(s)}`}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=Hle(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class BT extends Gle{headerFormatter=new Ble;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:s,signableHeaders:a,hoistableHeaders:l,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=u??await this.regionProvider(),{longDate:p,shortDate:g}=this.formatDate(n);if(i>Lle)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=rb(g,h,d??this.service),v=Vle(UT(t),{unhoistableHeaders:s,hoistableHeaders:l});f.sessionToken&&(v.query[G4]=f.sessionToken),v.query[wle]=eb,v.query[kle]=`${f.accessKeyId}/${m}`,v.query[H4]=p,v.query[Rle]=i.toString(10);const _=MT(v,o,a);return v.query[Cle]=this.getCanonicalHeaderList(_),v.query[W4]=await this.getSignature(p,m,this.getSigningKey(f,h,g,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:s,eventStreamCredentials:a}){const l=o??await this.regionProvider(),{shortDate:u,longDate:d}=this.formatDate(n),f=rb(u,l,s??this.service),h=await nb({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const g=Yl(await p.digest()),m=[Ple,d,f,i,g,h].join(`
|
|
56
|
+
`);return this.signString(m,{signingDate:n,signingRegion:l,signingService:s,eventStreamCredentials:a})}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(a=>({message:t.message,signature:a}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const s=o??await this.credentialProvider();this.validateResolvedCredentials(s);const a=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(s,a,l,i));return u.update(vh(t)),Yl(await u.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:s}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const l=o??await this.regionProvider(),u=UT(t),{longDate:d,shortDate:f}=this.formatDate(r),h=rb(f,l,s??this.service);u.headers[Q4]=d,a.sessionToken&&(u.headers[$le]=a.sessionToken);const p=await nb(u,this.sha256);!qle(V1,u.headers)&&this.applyChecksum&&(u.headers[V1]=p);const g=MT(u,i,n),m=await this.getSignature(d,h,this.getSigningKey(a,l,f,s),this.createCanonicalRequest(u,g,p));return u.headers[J4]=`${eb} Credential=${a.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${m}`,u}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,eb),s=new this.sha256(await n);return s.update(vh(o)),Yl(await s.digest())}getSigningKey(t,r,n,i){return zle(this.sha256,t,n,r,i||this.service)}}const Jle=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=Qle(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=Yle(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const m=await f(p);return h&&(!m.$source||Object.keys(m.$source).length===0)?sae(m,"CREDENTIALS_CODE","e"):m},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:s}=e;let a;return e.signer?a=Cf(e.signer):e.regionInfoProvider?a=()=>Cf(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:s,uriEscapePath:i},g=e.signerConstructor||BT;return new g(p)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Cf(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:s,uriEscapePath:i},p=e.signerConstructor||BT;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};function Qle(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=Tse(t,Ase,C4):r?n=Cf(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 Yle(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 Xle=async(e,t,r)=>({operation:Sd(t).operation,region:await ta(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Zle(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Nt(e){return{schemeId:"smithy.api#noAuth"}}const eue=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(Nt());break}case"ChangePassword":{t.push(Nt());break}case"CompleteWebAuthnRegistration":{t.push(Nt());break}case"ConfirmDevice":{t.push(Nt());break}case"ConfirmForgotPassword":{t.push(Nt());break}case"ConfirmSignUp":{t.push(Nt());break}case"DeleteUser":{t.push(Nt());break}case"DeleteUserAttributes":{t.push(Nt());break}case"DeleteWebAuthnCredential":{t.push(Nt());break}case"ForgetDevice":{t.push(Nt());break}case"ForgotPassword":{t.push(Nt());break}case"GetDevice":{t.push(Nt());break}case"GetTokensFromRefreshToken":{t.push(Nt());break}case"GetUser":{t.push(Nt());break}case"GetUserAttributeVerificationCode":{t.push(Nt());break}case"GetUserAuthFactors":{t.push(Nt());break}case"GlobalSignOut":{t.push(Nt());break}case"InitiateAuth":{t.push(Nt());break}case"ListDevices":{t.push(Nt());break}case"ListWebAuthnCredentials":{t.push(Nt());break}case"ResendConfirmationCode":{t.push(Nt());break}case"RespondToAuthChallenge":{t.push(Nt());break}case"RevokeToken":{t.push(Nt());break}case"SetUserMFAPreference":{t.push(Nt());break}case"SetUserSettings":{t.push(Nt());break}case"SignUp":{t.push(Nt());break}case"StartWebAuthnRegistration":{t.push(Nt());break}case"UpdateAuthEventFeedback":{t.push(Nt());break}case"UpdateDeviceStatus":{t.push(Nt());break}case"UpdateUserAttributes":{t.push(Nt());break}case"VerifySoftwareToken":{t.push(Nt());break}case"VerifyUserAttribute":{t.push(Nt());break}default:t.push(Zle(e))}return t},tue=e=>{const t=Jle(e);return Object.assign(t,{authSchemePreference:ta(e.authSchemePreference??[])})},rue=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),nue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},iue="3.1033.0",oue={version:iue},sue=e=>new TextEncoder().encode(e);var aue=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:sue;function bh(e){return e instanceof Uint8Array?e:typeof e=="string"?aue(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function K1(e){return typeof e=="string"?e.length===0:e.byteLength===0}var X4={name:"SHA-256"},jT={name:"HMAC",hash:X4},lue=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 uue={};function H0(){return typeof window<"u"?window:typeof self<"u"?self:uue}var cue=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!K1(t)){var r=bh(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(jT,r,t.toHash).then(function(n){return new Uint8Array(n)})}):K1(this.toHash)?Promise.resolve(lue):Promise.resolve().then(function(){return H0().crypto.subtle.digest(X4,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",bh(t.secret),jT,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function due(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(d){try{u(n.next(d))}catch(f){s(f)}}function l(d){try{u(n.throw(d))}catch(f){s(f)}}function u(d){d.done?o(d.value):i(d.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}function fue(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=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 Wi=64,hue=32,pue=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]),gue=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],mue=Math.pow(2,53)-1,W0=(function(){function e(){this.state=Int32Array.from(gue),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>mue)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===Wi&&(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%Wi>=Wi-8){for(var i=this.bufferLength;i<Wi;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<Wi-8;i++)r.setUint8(i,0);r.setUint32(Wi-8,Math.floor(t/4294967296),!0),r.setUint32(Wi-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(hue),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],s=n[2],a=n[3],l=n[4],u=n[5],d=n[6],f=n[7],h=0;h<Wi;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],g=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var m=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(g+this.temp[h-7]|0)+(m+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+(pue[h]+this.temp[h]|0)|0)|0,_=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&s^o&s)|0;f=d,d=u,u=l,l=a+v|0,a=s,s=o,o=i,i=v+_|0}n[0]+=i,n[1]+=o,n[2]+=s,n[3]+=a,n[4]+=l,n[5]+=u,n[6]+=d,n[7]+=f},e})(),vue=(function(){function e(t){this.secret=t,this.hash=new W0,this.reset()}return e.prototype.update=function(t){if(!(K1(t)||this.error))try{this.hash.update(bh(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 due(this,void 0,void 0,function(){return fue(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new W0,this.secret){this.outer=new W0;var t=_ue(this.secret),r=new Uint8Array(Wi);r.set(t);for(var n=0;n<Wi;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 _ue(e){var t=bh(e);if(t.byteLength>Wi){var r=new W0;r.update(t),t=r.digest()}var n=new Uint8Array(Wi);return n.set(t),n}var bue=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function yue(e){if(xue(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return Sue(t)}return!1}function xue(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function Sue(e){return e&&bue.every(function(t){return typeof e[t]=="function"})}var Eue=(function(){function e(t){yue(H0())?this.hash=new cue(t):this.hash=new vue(t)}return e.prototype.update=function(t,r){this.hash.update(bh(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const wue=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??qT.os(i)??"other",s=void 0,a=n?.userAgentData?.brands??[],l=a[a.length-1],u=l?.brand??qT.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,s],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},qT={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"}},kue=e=>()=>Promise.reject(e),VT=typeof TextEncoder=="function"?new TextEncoder:null,Cue=e=>{if(typeof e=="string"){if(VT)return VT.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}`)},Rue=["in-region","cross-region","mobile","standard","legacy"],Aue=({defaultsMode:e}={})=>Ele(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Tue()?"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 ${Rue.join(", ")}, got ${t}`)}}),Tue=()=>{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 Nue{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(s=>{const{httpQuery:a,httpQueryParams:l,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=s.getMergedTraits();return!a&&!l&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,s){let a=t;t.includes("#")&&([,a]=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:s?.(this.errorRegistry,a)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const g=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new g({name:a}),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:a},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=Ti.for(i),s=Ti.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(s),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=DT(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 s=i.$metadata.requestId;return s&&(i.RequestId=s),i}return DT(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),s=Object.keys(t),a={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<s.length;l++){const u=s[l];a[u==="message"?"Message":u]=t[u]}delete a.__type,t.Error=a}}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=>fn.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class kE{serdeContext;setSerdeContext(t){this.serdeContext=t}}class $ue{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 Due(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 gs(n,"bigDecimal"):BigInt(n)}return t}const Fue=(e,t)=>U1(e,t).then(r=>(t?.utf8Encoder??vE)(r)),Iue=(e,t)=>Fue(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{}}),KT=(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},Pue=(e,t)=>{const r=KT(e.headers,"x-amzn-errortype");if(r!==void 0)return ib(e.headers[r]);if(t&&typeof t=="object"){const n=KT(t,"code");if(n&&t[n]!==void 0)return ib(t[n]);if(t.__type!==void 0)return ib(t.__type)}};class Oue extends kE{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,Due):await Iue(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=fn.of(t);if(n){if(i.isStructSchema()){const s=r,a=i.isUnionSchema(),l={};let u;const{jsonName:d}=this.settings;d&&(u={});let f;a&&(f=new $ue(s,l));for(const[h,p]of i.structIterator()){let g=h;d&&(g=p.getMergedTraits().jsonName??g,u[g]=h),a&&f.mark(g),s[g]!=null&&(l[h]=this._read(p,s[g]))}if(a)f.writeUnknown();else if(typeof s.__type=="string")for(const h in s){const p=s[h],g=d?u[h]??h:h;g in l||(l[g]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const s=i.getValueSchema(),a=[];for(const l of r)a.push(this._read(s,l));return a}if(i.isMapSchema()){const s=i.getValueSchema(),a={};for(const l in r)a[l]=this._read(s,r[l]);return a}}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")?Ga.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(k4(i,this.settings)){case 5:return ase(r);case 6:return E4(r);case 7:return dse(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 gs)return r;const s=r;return s.type==="bigDecimal"&&"string"in s?new gs(s.string,s.type):new gs(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 s=Array.isArray(r)?[]:{};for(const a in r){const l=r[a];l instanceof gs?s[a]=l:s[a]=this._read(i,l)}return s}else return structuredClone(r);return r}}const HT="Ν";class Mue{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 gs){const n=`${HT+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${HT+"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 Lue extends kE{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=fn.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 Mue;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=fn.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=fn.of(t);if(i){if(o.isStructSchema()){const s=r,a={},{jsonName:l}=this.settings;let u;l&&(u={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,s[f],o);if(p!==void 0){let g=f;l&&(g=h.getMergedTraits().jsonName??f,u[f]=g),a[g]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=s;if(Array.isArray(f)){const[h,p]=f;a[h]=this._write(15,p)}}else if(typeof s.__type=="string")for(const f in s){const h=s[f],p=l?u[f]??f:f;p in a||(a[p]=this._write(15,h))}return a}if(Array.isArray(r)&&o.isListSchema()){const s=o.getValueSchema(),a=[],l=!!o.getMergedTraits().sparse;for(const u of r)(l||u!=null)&&a.push(this._write(s,u));return a}if(o.isMapSchema()){const s=o.getValueSchema(),a={},l=!!o.getMergedTraits().sparse;for(const u in r){const d=r[u];(l||d!=null)&&(a[u]=this._write(s,d))}return a}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??qg)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(k4(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return ose(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof gs&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return w4();const s=o.getMergedTraits().mediaType;return r!=null&&s&&(s==="application/json"||s.endsWith("+json"))?Ga.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??qg)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const s=Array.isArray(r)?[]:{};for(const a in r){const l=r[a];l instanceof gs?(this.useReplacer=!0,s[a]=l):s[a]=this._write(o,l)}return s}else return structuredClone(r);return r}}}class zue extends kE{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Lue(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Oue(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Uue extends Sse{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 zue({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new Nue(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 s=Pue(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);const{errorSchema:a,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=fn.of(a),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(a)??Error,h=new f(d),p={},g=this.codec.createDeserializer();for(const[m,v]of u.structIterator())i[m]!=null&&(p[m]=g.readObject(v,i[m]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:u.getMergedTraits().error,message:d},p),i)}}class Bue extends Uue{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 yh="ref",Nl=-1,Gp=!0,WT="isSet",Z4="PartitionResult",Jp="booleanEquals",ob="getAttr",Wd="stringEquals",GT={[yh]:"Endpoint"},sb={[yh]:Z4},ff={[yh]:"Region"},is={},JT=[ff],QT={conditions:[[WT,[GT]],[WT,JT],["aws.partition",JT,Z4],[Jp,[{[yh]:"UseFIPS"},Gp]],[Jp,[{fn:ob,argv:[sb,"supportsFIPS"]},Gp]],[Jp,[{[yh]:"UseDualStack"},Gp]],[Jp,[{fn:ob,argv:[sb,"supportsDualStack"]},Gp]],[Wd,[{fn:ob,argv:[sb,"name"]},"aws"]],[Wd,[ff,"us-east-1"]],[Wd,[ff,"us-east-2"]],[Wd,[ff,"us-west-1"]],[Wd,[ff,"us-west-2"]]],results:[[Nl],[Nl,"Invalid Configuration: FIPS and custom endpoint are not supported"],[Nl,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[GT,is],["https://cognito-idp-fips.us-east-1.amazonaws.com",is],["https://cognito-idp-fips.us-east-2.amazonaws.com",is],["https://cognito-idp-fips.us-west-1.amazonaws.com",is],["https://cognito-idp-fips.us-west-2.amazonaws.com",is],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",is],[Nl,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",is],[Nl,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",is],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",is],[Nl,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",is],[Nl,"Invalid Configuration: Missing Region"]]},jue=2,rn=1e8,que=new Int32Array([-1,1,-1,0,17,3,1,4,rn+16,2,5,rn+16,3,9,6,5,7,rn+15,6,8,rn+14,7,rn+12,rn+13,4,11,10,5,rn+9,rn+11,5,12,rn+10,6,13,rn+9,8,rn+4,14,9,rn+5,15,10,rn+6,16,11,rn+7,rn+8,3,rn+1,18,5,rn+2,rn+3]),Vue=yE.from(que,jue,QT.conditions,QT.results),Kue=new Fse({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Hue=(e,t={})=>Kue.get(e,()=>Zse(Vue,{endpointParams:e,logger:t.logger}));xE.aws=O4;class De extends gc{constructor(t){super(t),Object.setPrototypeOf(this,De.prototype)}}class CE extends De{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,CE.prototype)}}class RE extends De{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,RE.prototype)}}class AE extends De{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,AE.prototype),this.reasonCode=t.reasonCode}}class TE extends De{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,TE.prototype)}}class NE extends De{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,NE.prototype)}}class $E extends De{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,$E.prototype)}}class DE extends De{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,DE.prototype)}}class FE extends De{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,FE.prototype)}}class IE extends De{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,IE.prototype)}}class PE extends De{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,PE.prototype)}}class OE extends De{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,OE.prototype)}}class ME extends De{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,ME.prototype)}}class LE extends De{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,LE.prototype)}}class zE extends De{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,zE.prototype)}}class UE extends De{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,UE.prototype)}}class BE extends De{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,BE.prototype)}}class jE extends De{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,jE.prototype)}}class qE extends De{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,qE.prototype)}}class VE extends De{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,VE.prototype)}}class KE extends De{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,KE.prototype)}}class HE extends De{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,HE.prototype)}}class WE extends De{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,WE.prototype)}}class GE extends De{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,GE.prototype)}}class JE extends De{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,JE.prototype)}}class QE extends De{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,QE.prototype)}}class YE extends De{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,YE.prototype)}}class XE extends De{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,XE.prototype)}}class ZE extends De{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,ZE.prototype)}}class ew extends De{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,ew.prototype)}}class tw extends De{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,tw.prototype)}}class rw extends De{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,rw.prototype)}}class nw extends De{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,nw.prototype)}}class iw extends De{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,iw.prototype)}}class ow extends De{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,ow.prototype)}}class sw extends De{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,sw.prototype)}}class aw extends De{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,aw.prototype)}}class lw extends De{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,lw.prototype)}}class uw extends De{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,uw.prototype)}}class cw extends De{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,cw.prototype)}}class dw extends De{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,dw.prototype)}}class fw extends De{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,fw.prototype)}}class hw extends De{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,hw.prototype)}}class pw extends De{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,pw.prototype)}}class gw extends De{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,gw.prototype)}}class mw extends De{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,mw.prototype)}}class vw extends De{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,vw.prototype)}}class _w extends De{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,_w.prototype)}}class bw extends De{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,bw.prototype)}}class yw extends De{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,yw.prototype)}}class xw extends De{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,xw.prototype)}}class Sw extends De{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,Sw.prototype)}}class Ew extends De{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,Ew.prototype)}}class ww extends De{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,ww.prototype)}}class kw extends De{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,kw.prototype)}}class Cw extends De{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,Cw.prototype)}}class Rw extends De{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,Rw.prototype)}}class Aw extends De{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,Aw.prototype)}}const Wue="AvailableChallenges",Gue="AccessDeniedException",Jue="AliasExistsException",Que="AnalyticsEndpointId",Yue="AuthFlow",Xue="AnalyticsMetadata",Zue="AnalyticsMetadataType",ece="AuthParameters",tce="AuthParametersType",rce="AuthenticationResult",nce="AuthenticationResultType",ice="AccessToken",oce="CodeDeliveryFailureException",sce="ClientId",ace="ClientIdType",lce="ClientMetadata",uce="CodeMismatchException",cce="ConcurrentModificationException",dce="ChallengeName",fce="ChallengeParameters",hce="DeviceGroupKey",pce="DeviceKey",gce="DeviceKeyExistsException",mce="DuplicateProviderException",vce="ExpiredCodeException",_ce="EncodedData",bce="ExpiresIn",yce="EnableSoftwareTokenMFAException",xce="ForbiddenException",Sce="FeatureUnavailableInTierException",Ece="GroupExistsException",wce="IpAddress",kce="InitiateAuthRequest",Cce="InitiateAuthResponse",Rce="InitiateAuth",Ace="InternalErrorException",Tce="InvalidEmailRoleAccessPolicyException",Nce="InvalidLambdaResponseException",$ce="InvalidOAuthFlowException",Dce="InvalidParameterException",Fce="InvalidPasswordException",Ice="InternalServerException",Pce="InvalidSmsRoleAccessPolicyException",Oce="InvalidSmsRoleTrustRelationshipException",Mce="IdToken",Lce="InvalidUserPoolConfigurationException",zce="LimitExceededException",Uce="MFAMethodNotFoundException",Bce="ManagedLoginBrandingExistsException",jce="NotAuthorizedException",qce="NewDeviceMetadata",Vce="NewDeviceMetadataType",Kce="PasswordHistoryPolicyViolationException",Hce="PreconditionNotMetException",Wce="PasswordResetRequiredException",Gce="ResourceNotFoundException",Jce="RefreshToken",Qce="RefreshTokenReuseException",eL="Session",Yce="ScopeDoesNotExistException",Xce="SessionType",Zce="SoftwareTokenMFANotFoundException",ede="TierChangeNotAllowedException",tde="TermsExistsException",rde="TooManyFailedAttemptsException",nde="TooManyRequestsException",ide="TokenModelType",ode="TokenType",sde="UserContextDataType",ade="UserContextData",lde="UnauthorizedException",ude="UsernameExistsException",cde="UserImportInProgressException",dde="UnsupportedIdentityProviderException",fde="UnexpectedLambdaException",hde="UserLambdaValidationException",pde="UserNotConfirmedException",gde="UserNotFoundException",mde="UnsupportedOperationException",vde="UserPoolAddOnNotEnabledException",_de="UserPoolTaggingException",bde="UnsupportedTokenTypeException",yde="UnsupportedUserStateException",xde="WebAuthnClientMismatchException",Sde="WebAuthnConfigurationMissingException",Ede="WebAuthnChallengeNotFoundException",wde="WebAuthnCredentialNotSupportedException",kde="WebAuthnNotEnabledException",Cde="WebAuthnOriginNotAllowedException",Rde="WebAuthnRelyingPartyMismatchException",qe="client",Oe="error",Ve="httpError",Me="message",Ade="reasonCode",tL="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",rL="server",Ee="com.amazonaws.cognitoidentityprovider",nL=Ti.for(tL);var Tde=[-3,tL,"CognitoIdentityProviderServiceException",0,[],[]];nL.registerError(Tde,De);const Ie=Ti.for(Ee);var Nde=[-3,Ee,Gue,{[Oe]:qe,[Ve]:403},[Me],[0]];Ie.registerError(Nde,CE);var $de=[-3,Ee,Jue,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError($de,WE);var Dde=[-3,Ee,oce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Dde,UE);var Fde=[-3,Ee,uce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Fde,tw);var Ide=[-3,Ee,cce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Ide,ow);var Pde=[-3,Ee,gce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Pde,hw);var Ode=[-3,Ee,mce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Ode,gw);var Mde=[-3,Ee,yce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Mde,Aw);var Lde=[-3,Ee,vce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Lde,rw);var zde=[-3,Ee,Sce,{[Oe]:qe,[Ve]:403},[Me],[0]];Ie.registerError(zde,_w);var Ude=[-3,Ee,xce,{[Oe]:qe,[Ve]:403},[Me],[0]];Ie.registerError(Ude,sw);var Bde=[-3,Ee,Ece,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Bde,pw);var jde=[-3,Ee,Ace,{[Oe]:rL},[Me],[0]];Ie.registerError(jde,RE);var qde=[-3,Ee,Ice,{[Oe]:rL},[Me],[0]];Ie.registerError(qde,FE);var Vde=[-3,Ee,Tce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Vde,JE);var Kde=[-3,Ee,Nce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Kde,OE);var Hde=[-3,Ee,$ce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Hde,xw);var Wde=[-3,Ee,Dce,{[Oe]:qe,[Ve]:400},[Me,Ade],[0,0]];Ie.registerError(Wde,AE);var Gde=[-3,Ee,Fce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Gde,BE);var Jde=[-3,Ee,Pce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Jde,jE);var Qde=[-3,Ee,Oce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Qde,qE);var Yde=[-3,Ee,Lce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Yde,GE);var Xde=[-3,Ee,zce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Xde,IE);var Zde=[-3,Ee,Bce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Zde,mw);var efe=[-3,Ee,Uce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(efe,QE);var tfe=[-3,Ee,jce,{[Oe]:qe,[Ve]:403},[Me],[0]];Ie.registerError(tfe,TE);var rfe=[-3,Ee,Kce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(rfe,nw);var nfe=[-3,Ee,Wce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(nfe,YE);var ife=[-3,Ee,Hce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(ife,VE);var ofe=[-3,Ee,Qce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(ofe,ww);var sfe=[-3,Ee,Gce,{[Oe]:qe,[Ve]:404},[Me],[0]];Ie.registerError(sfe,NE);var afe=[-3,Ee,Yce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(afe,Sw);var lfe=[-3,Ee,Zce,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(lfe,iw);var ufe=[-3,Ee,tde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(ufe,vw);var cfe=[-3,Ee,ede,{[Oe]:qe,[Ve]:403},[Me],[0]];Ie.registerError(cfe,bw);var dfe=[-3,Ee,rde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(dfe,ME);var ffe=[-3,Ee,nde,{[Oe]:qe,[Ve]:429},[Me],[0]];Ie.registerError(ffe,$E);var hfe=[-3,Ee,lde,{[Oe]:qe,[Ve]:401},[Me],[0]];Ie.registerError(hfe,kw);var pfe=[-3,Ee,fde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(pfe,LE);var gfe=[-3,Ee,dde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(gfe,Ew);var mfe=[-3,Ee,mde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(mfe,XE);var vfe=[-3,Ee,bde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(vfe,Cw);var _fe=[-3,Ee,yde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(_fe,KE);var bfe=[-3,Ee,cde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(bfe,DE);var yfe=[-3,Ee,hde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(yfe,zE);var xfe=[-3,Ee,ude,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(xfe,HE);var Sfe=[-3,Ee,pde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Sfe,ZE);var Efe=[-3,Ee,gde,{[Oe]:qe,[Ve]:404},[Me],[0]];Ie.registerError(Efe,PE);var wfe=[-3,Ee,vde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(wfe,ew);var kfe=[-3,Ee,_de,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(kfe,yw);var Cfe=[-3,Ee,Ede,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Cfe,aw);var Rfe=[-3,Ee,xde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Rfe,lw);var Afe=[-3,Ee,Sde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Afe,Rw);var Tfe=[-3,Ee,wde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Tfe,uw);var Nfe=[-3,Ee,kde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Nfe,cw);var $fe=[-3,Ee,Cde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError($fe,dw);var Dfe=[-3,Ee,Rde,{[Oe]:qe,[Ve]:400},[Me],[0]];Ie.registerError(Dfe,fw);const Ffe=[nL,Ie];var Ife=[0,Ee,ace,8,0],iL=[0,Ee,Xce,8,0],ab=[0,Ee,ide,8,0],Pfe=[3,Ee,Zue,0,[Que],[0]],Ofe=[3,Ee,nce,0,[ice,bce,ode,Jce,Mce,qce],[[()=>ab,0],1,0,[()=>ab,0],[()=>ab,0],()=>zfe]],Mfe=[3,Ee,kce,0,[Yue,sce,ece,lce,Xue,ade,eL],[0,[()=>Ife,0],[()=>Bfe,0],128,()=>Pfe,[()=>Ufe,0],[()=>iL,0]],2],Lfe=[3,Ee,Cce,0,[dce,eL,fce,rce,Wue],[0,[()=>iL,0],128,[()=>Ofe,0],64]],zfe=[3,Ee,Vce,0,[pce,hce],[0,0]],Ufe=[3,Ee,sde,8,[wce,_ce],[0,0]],Bfe=[2,Ee,tce,8,0,0],jfe=[9,Ee,Rce,0,()=>Mfe,()=>Lfe];const qfe=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??tv,base64Encoder:e?.base64Encoder??qg,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Hue,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??eue,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Sle},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new kse}],logger:e?.logger??new V4,protocol:e?.protocol??Bue,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:Ffe,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??Yc,utf8Decoder:e?.utf8Decoder??Qc,utf8Encoder:e?.utf8Encoder??vE}),Vfe=e=>{const t=Aue(e),r=()=>t().then(ole),n=qfe(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Cue,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??wue({serviceId:n.serviceId,clientVersion:oue.version}),maxAttempts:e?.maxAttempts??Af,region:e?.region??kue("Region is missing"),requestHandler:_E.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||aae),sha256:e?.sha256??Eue,streamCollector:e?.streamCollector??Ooe,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Fae)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Iae))}},Kfe=e=>({setRegion(t){e.region=t},region(){return e.region}}),Hfe=e=>({region:e.region()}),Wfe=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(s=>s.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}}},Gfe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Jfe=(e,t)=>{const r=Object.assign(Kfe(e),cle(e),uoe(e),Wfe(e));return t.forEach(n=>n.configure(r)),Object.assign(e,Hfe(r),dle(r),coe(r),Gfe(r))};class oL extends nle{config;constructor(...[t]){const r=Vfe(t||{});super(r),this.initConfig=r;const n=rue(r),i=Dse(n),o=rle(i),s=Mae(o),a=s,l=ele(a),u=tue(l),d=Jfe(u,t?.extensions||[]);this.config=d,this.middlewareStack.use(Woe(this.config)),this.middlewareStack.use(Dae(this.config)),this.middlewareStack.use(ble(this.config)),this.middlewareStack.use(Uae(this.config)),this.middlewareStack.use(poe(this.config)),this.middlewareStack.use(voe(this.config)),this.middlewareStack.use(yoe(this.config)),this.middlewareStack.use(koe(this.config,{httpAuthSchemeParametersProvider:Xle,identityProviderConfigProvider:async f=>new wse({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Noe(this.config))}destroy(){super.destroy()}}class sL extends j4.classBuilder().ep(nue).m(function(t,r,n,i){return[Zae(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(jfe).build(){}let Qfe="reventless.auth.v1",Yfe=300*1e3;function Xfe(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=me.object(r);if(n===void 0)return;let i=R(n.token,me.string),o=n.identity,s=R(n.refreshToken,me.string),a=R(n.expiresAt,me.float);return i!==void 0&&o!==void 0?W(me.object(o),l=>{let u=f=>R(l[f],me.string),d=ne(D(R(l.groups,me.array),[]),me.string);return{token:i,identity:{userId:D(u("userId"),""),username:D(u("username"),""),groups:d,provider:D(u("provider"),"InMemory")},refreshToken:s,expiresAt:a}}):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,s=o!==void 0?i.concat([["refreshToken",o]]):i,a=t.expiresAt,l=a!==void 0?s.concat([["expiresAt",a]]):s,u=JSON.stringify(Object.fromEntries(l));localStorage.setItem(e,u)}function Zfe(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function ehe(e){let t=n=>D(R(e[n],me.string),""),r=ne(D(R(e.groups,me.array),[]),me.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider")}}function aL(e){let t=n=>R(e[n],me.string),r=ne(D(R(e["cognito:groups"],me.array),[]),me.string);return{userId:D(t("sub"),""),username:D($h(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito"}}function lL(e){try{return soe(e)}catch{return}}function the(e){let t=e.IdToken;if(t===void 0)return;let r=lL(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:aL(r),refreshToken:e.RefreshToken,expiresAt:i}}async function rhe(e,t,r,n){try{let i=new oL({region:t}),o=new sL({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),s=await i.send(o),a=R(s.AuthenticationResult,the);return a!==void 0?{TAG:"Ok",_0:a}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=Su(i);return{TAG:"Error",_0:mE(gE(o))}}}async function nhe(e,t,r,n){try{let i=new oL({region:t}),o=new sL({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),a=(await i.send(o)).AuthenticationResult;if(a===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=a.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let u=lL(l),d=D(W(u,aL),n),f=a.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=a.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:mE(gE(o))}}}let uL=dr(void 0),ihe=uL.Provider;function ohe(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,s=t!==void 0?t:Qfe,a=ae(()=>Xfe(s)),l=a[1],u=a[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 E=Math.max(0,_-Date.now()-Yfe),S=setTimeout(()=>{nhe(n,r,v,x).then(C=>{if(C.TAG==="Ok"){let k=C._0;return lb(s,k),l(N=>k)}localStorage.removeItem(s),l(k=>{})})},E);return()=>{clearTimeout(S)}}},[u,o,n,r]);let d=W(u,v=>v.identity),f=Be(u);return Ar(ihe,{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 E=await rhe(n,r,v,_);if(E.TAG!=="Ok")return{TAG:"LoginErr",_0:E._0};let S=E._0;return lb(s,S),l(C=>S),"LoginOk"}if(x===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let E=await fetch(Zfe(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:v,password:_}),"")}),S=await E.json();if(E.ok){let k=me.object(S);if(k===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=R(k.token,me.string),T=R(k.identity,me.object);if(N===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(T===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let $=ehe(T),P={token:N,identity:$,refreshToken:void 0,expiresAt:void 0};return lb(s,P),l(M=>P),"LoginOk"}return{TAG:"LoginErr",_0:D(R(R(me.object(S),k=>k.error),me.string),"Login failed")}}}catch(x){let E=Su(x);return{TAG:"LoginErr",_0:mE(gE(E))}}},logout:()=>{localStorage.removeItem(s),l(v=>{})},getToken:()=>W(u,v=>v.token)},children:e.children})}let she={make:ohe};function $s(){return zt(uL)}let ahe={background:"var("+y.surface+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+A.fontFamily+")",fontSize:"var("+A.sizeSm+")",fontWeight:"var("+A.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+X.md+")",alignItems:"center",gap:"0.375rem"},lhe={color:"var("+y.textSecondary+")",fontSize:"0.625rem"},uhe={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+A.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+X.md+")",boxShadow:"var("+mn.md+")"},che={background:"var("+y.brandSubtle+")",color:"var("+y.brand+")",display:"inline-block",fontSize:"var("+A.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+X.full+")"},dhe={border:"none",borderTop:"1px solid var("+y.borderSubtle+")",margin:"0.5rem 0"},fhe={background:"transparent",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",fontSize:"var("+A.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+X.sm+")"};function hhe(e){let t=$s(),r=ae(()=>!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:lhe})],"aria-label":"Signed in as "+o.username,style:ahe,onClick:s=>n(a=>!a)}),i?L("div",{children:[b("div",{children:o.username,style:{fontSize:"var("+A.sizeMd+")",fontWeight:"var("+A.weightMedium+")",marginBottom:"0.25rem"}}),o.groups.length!==0?b("div",{children:o.groups.map(s=>b("span",{children:s,style:che},s)),style:{marginBottom:"0.25rem"}}):null,b("hr",{style:dhe}),b("button",{children:"Sign out",style:fhe,onClick:s=>{n(a=>!1),t.logout()}})],style:uhe}):null],style:{position:"relative"}}):null}let phe=hhe,ghe={background:"var("+y.surface+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+A.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+X.md+")"},YT={color:"var("+y.textSecondary+")",display:"block",fontSize:"var("+A.sizeSm+")",marginBottom:"0.25rem"},XT={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",fontSize:"var("+A.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+X.sm+")",boxSizing:"border-box"};function mhe(e){return{background:e?"var("+y.textDisabled+")":"var("+y.brand+")",border:"none",color:"var("+y.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+A.sizeMd+")",fontWeight:"var("+A.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+X.sm+")"}}let vhe={color:"var("+y.error+")",fontSize:"var("+A.sizeSm+")",marginBottom:"0.75rem"};function _he(e){let t=$s(),r=ae(()=>""),n=r[1],i=r[0],o=ae(()=>""),s=o[1],a=o[0],l=ae(()=>{}),u=l[1],d=l[0],f=ae(()=>!1),h=f[1],p=f[0],g=m=>{m.preventDefault(),u(v=>{}),h(v=>!0),t!==void 0?Gt(t.login(i,a).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("+A.sizeXl+")",fontWeight:"var("+A.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[b("label",{children:"Username",style:YT}),b("input",{style:XT,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:m=>{let v=m.target.value;n(_=>v)}}),b("label",{children:"Password",style:YT}),b("input",{style:XT,autoComplete:"current-password",type:"password",value:a,onChange:m=>{let v=m.target.value;s(_=>v)}}),d!==void 0?b("div",{children:d,style:vhe}):null,b("button",{children:p?"Signing in…":"Sign in",style:mhe(p),disabled:p,type:"submit"})],onSubmit:g})],style:ghe})}let ZT=_he;function bhe(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(PU(e.routes,n),i)}let yhe=bhe;function xhe(e){return e.button===0&&!e.altKey&&!e.ctrlKey&&!e.metaKey?!e.shiftKey:!1}function She(e){let t=zt(dm),r=wF(t.prefix,e.route),n=i=>{if(!i.defaultPrevented&&xhe(i))return i.preventDefault(),Dh(r)};return b("a",{children:e.children,href:r,onClick:n})}let Ehe=She,tp=dr(void 0),whe=tp.Provider;function khe(e){let t=e.initialPages,r=t!==void 0?t:[],n=ae(()=>r),i=n[1],o=ae(()=>[]),s=o[1],a=n[0].concat(o[0]);return Ar(whe,{value:{register:g=>i(m=>m.concat(g)),deregister:g=>i(m=>m.filter(v=>v.fragmentId!==g)),setPluginPages:g=>s(m=>g),getPages:()=>a,getPage:g=>a.find(m=>m.fragmentId===g)},children:e.children})}let Che={make:khe};function cL(){let e=zt(tp);return e!==void 0?e.getPages():[]}let Rhe=[];function Ahe(e){return!1}let The={activeAccess:Rhe,hasAccess:Ahe},dL=dr(The),Nhe=dL.Provider;function $he(e){let t=e.access;return Ar(Nhe,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function xl(){return zt(dL).hasAccess}let Dhe=$he;function Dc(e){return"var("+e+")"}let Fhe=w([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(A.sizeSm)),ye("notAllowed"),eI("none")]),Ihe=w([c("font-size","14px"),_i(0)]),Phe=w([vo(1),c("font-weight",Dc(A.weightMedium))]),Ohe=w([c("font-size",Dc(A.sizeXs)),c("color",Dc(y.brand)),ye("pointer"),c("text-decoration","none"),_i(0)]);function Mhe(e){return L("div",{children:[b("span",{children:"[locked]",className:Ihe}),b("span",{children:e.label,className:Phe}),b("span",{children:"Upgrade",className:Ohe})],className:Fhe})}let Lhe=Mhe;function zhe(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function li(e){return"var("+e+")"}let Uhe=w([z("flex"),pe("column"),c("gap",li(F.xs)),c("padding","var("+F.sm+") 0")]),Bhe=w([c("color",li(y.textDisabled)),c("font-size",li(A.sizeXs)),c("font-weight",li(A.weightBold)),c("letter-spacing","0.08em"),c("text-transform","uppercase"),c("padding","var("+F.xs+") var("+F.md+")"),Cs(Ce(8))]),eN=w([z("flex"),Z("center"),c("gap",li(F.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("color",li(y.textSecondary)),c("font-size",li(A.sizeMd)),ye("pointer"),c("border-radius",li(X.sm)),c("text-decoration","none"),We([c("background",li(y.surfaceSubtle)),c("color",li(y.textPrimary))])]),jhe=w([c("background",li(y.surfaceSubtle)),c("color",li(y.textPrimary)),c("font-weight",li(A.weightMedium))]),qhe=w([c("font-size","12px"),c("color",li(y.textDisabled)),Ih("auto")]);function Vhe(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function Khe(e){let t=e.hasAccess,r=e.page,n=fe(r.requiredAccess,!1,a=>!t(a)),i=e.isActive?eN+" "+jhe:eN,o=L(Hr,{children:[fe(r.menuEntry.icon,null,a=>b("span",{children:a})),b("span",{children:r.menuEntry.label}),n?b("span",{children:"[locked]",className:qhe}):null]}),s=r.url;return!n&&s!==void 0?b(Ehe,{route:s,children:b("span",{children:o,className:i})}):b("div",{children:o,className:i,role:"button"})}function tN(e){let t=e.hasAccess,r=e.currentUrl,n=e.pages.toSorted((i,o)=>Ox(i.menuEntry.sortOrder,o.menuEntry.sortOrder));return L(Hr,{children:[fe(e.label,null,i=>b("div",{children:i,className:Bhe})),n.map(i=>b(Khe,{page:i,isActive:Vhe(i,r),hasAccess:t},i.fragmentId))]})}function Hhe(e){let t=e.currentUrl,r=cL(),n=xl(),i={};r.forEach(a=>{let l=D(a.menuEntry.group,""),u=D(i[l],[]);i[l]=u.concat([a])});let o=D(i[""],[]),s=Object.entries(i).filter(a=>a[0]!=="").toSorted((a,l)=>{let u=st(a[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder),d=st(l[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder);return Ox(u,d)});return L("nav",{children:[o.length!==0?b(tN,{label:void 0,pages:o,currentUrl:t,hasAccess:n}):null,s.map(a=>{let l=a[1],u=a[0];switch(zhe(l,n)){case"Active":return b(tN,{label:u,pages:l,currentUrl:t,hasAccess:n},u);case"Locked":return b(Lhe,{label:u},u);case"Absent":return null}})],"aria-label":"primary navigation",className:Uhe})}let Whe=Hhe;function Fc(e){return"var("+e+")"}let Ghe=w([z("flex"),pe("row"),YF({NAME:"vh",VAL:100}),c("overflow","hidden"),c("background",Fc(y.background))]),Jhe=w([z("flex"),pe("column"),c("width","240px"),_i(0),c("background",Fc(y.surface)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow-y","auto")]),Qhe=w([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(A.sizeLg)),c("font-weight",Fc(A.weightBold)),_i(0)]),Yhe=w([z("flex"),pe("column"),vo(1),c("overflow","hidden")]),Xhe=w([z("flex"),pe("column"),vo(1),c("overflow","auto"),c("background",Fc(y.background))]);function Zhe(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",s=n!==void 0?n:"404 — Page not found",a=r!==void 0?r:!0,l=t!==void 0?t:null,u=cU();return L("div",{children:[L("aside",{children:[L("div",{children:[fe(e.logoUrl,null,d=>b("img",{style:{height:"24px",marginRight:"8px"},alt:o,src:d})),o],className:Qhe}),b(Whe,{currentUrl:u})],className:Jhe}),L("main",{children:[D(e.headerSlot,null),b("div",{children:a?b(yhe,{url:u,routes:e.router,children:s}):l,className:Xhe})],className:Yhe})],className:Ghe})}let epe=Zhe,tpe=[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(A.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(A.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(A.sizeXs,"11px"),c(A.sizeSm,"12px"),c(A.sizeMd,"14px"),c(A.sizeLg,"16px"),c(A.sizeXl,"20px"),c(A.sizeXxl,"24px"),c(A.weightNormal,"400"),c(A.weightMedium,"500"),c(A.weightBold,"600"),c(A.lineHeightTight,"1.25"),c(A.lineHeightNormal,"1.5"),c(A.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(mn.sm,"0 1px 3px rgba(0,0,0,0.4)"),c(mn.md,"0 4px 12px rgba(0,0,0,0.5)"),c(mn.lg,"0 8px 24px rgba(0,0,0,0.6)")],rpe=[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(A.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(A.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(A.sizeXs,"11px"),c(A.sizeSm,"12px"),c(A.sizeMd,"14px"),c(A.sizeLg,"16px"),c(A.sizeXl,"20px"),c(A.sizeXxl,"24px"),c(A.weightNormal,"400"),c(A.weightMedium,"500"),c(A.weightBold,"600"),c(A.lineHeightTight,"1.25"),c(A.lineHeightNormal,"1.5"),c(A.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(mn.sm,"0 1px 3px rgba(0,0,0,0.08)"),c(mn.md,"0 4px 12px rgba(0,0,0,0.12)"),c(mn.lg,"0 8px 24px rgba(0,0,0,0.16)")],npe=[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(A.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(A.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(A.sizeXs,"11px"),c(A.sizeSm,"12px"),c(A.sizeMd,"14px"),c(A.sizeLg,"16px"),c(A.sizeXl,"20px"),c(A.sizeXxl,"24px"),c(A.weightNormal,"400"),c(A.weightMedium,"500"),c(A.weightBold,"600"),c(A.lineHeightTight,"1.25"),c(A.lineHeightNormal,"1.5"),c(A.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(mn.sm,"0 1px 3px rgba(0,0,0,0.12)"),c(mn.md,"0 4px 12px rgba(0,0,0,0.14)"),c(mn.lg,"0 8px 24px rgba(0,0,0,0.18)")],ipe=[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(A.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c(A.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c(A.sizeXs,"11px"),c(A.sizeSm,"12px"),c(A.sizeMd,"14px"),c(A.sizeLg,"16px"),c(A.sizeXl,"20px"),c(A.sizeXxl,"24px"),c(A.weightNormal,"400"),c(A.weightMedium,"500"),c(A.weightBold,"600"),c(A.lineHeightTight,"1.25"),c(A.lineHeightNormal,"1.5"),c(A.lineHeightRelaxed,"1.75"),c(X.sm,"4px"),c(X.md,"6px"),c(X.lg,"12px"),c(X.full,"9999px"),c(mn.sm,"0 1px 3px rgba(255,255,255,0.1)"),c(mn.md,"0 4px 12px rgba(255,255,255,0.15)"),c(mn.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 w(e.concat(r))}function ope(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=Qp(tpe,t.brand);break;case"Light":n=Qp(rpe,t.brand);break;case"Neutral":n=Qp(npe,t.brand);break;case"HighContrast":n=Qp(ipe,t.brand);break}return b("div",{children:e.children,className:n})}let spe=ope;function ape(e){}let lpe={preset:"Light",setPreset:ape},fL=dr(lpe),upe=fL.Provider;function cpe(){return zt(fL)}let hL="reventless-ui:theme";function pL(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function H1(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function dpe(e){let t=localStorage.getItem(hL);return t==null?e:pL(t)}function fpe(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=ae(()=>dpe(r)),i=n[1],o=n[0],s=Yr(l=>{localStorage.setItem(hL,H1(l)),i(u=>l)},[]),a=jt(()=>({preset:o,setPreset:s}),[o,s]);return b(upe,{value:a,children:b(spe,{theme:{preset:o,brand:e.brand},children:e.children})})}let hpe={make:fpe},rp=dr(void 0),ppe=rp.Provider;function gpe(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=ae(()=>n),s=o[1],a=ae(()=>[]),l=a[1],u=o[0].concat(a[0]);return Ar(ppe,{value:{register:_=>s(x=>x.concat(_)),deregister:_=>s(x=>x.filter(E=>E.extensionPackage!==_)),setPluginPanels:_=>l(x=>_),getPanel:_=>u.find(x=>x.fragmentId===_),getPanelsForPosition:_=>u.filter(x=>x.positions.some(E=>E===_)),hasAccess:_=>i.some(x=>x===_)},children:e.children})}let mpe={make:gpe};function vpe(e){let t=zt(rp);return t!==void 0?t.getPanelsForPosition(e):[]}function _pe(e){let t=zt(rp);if(t!==void 0)return t.getPanel(e)}function Tw(e){return"/"+e.environment+"/"+e.platformName}function gL(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},s=Tw(o),a=t.startsWith(s)?t.slice(s.length):"/";return[o,a===""?"/":a]}let bpe=dr(void 0),ype=bpe.Provider;function xpe(e){return Ar(ype,{value:e.scope,children:e.children})}let mL={make:xpe};function Spe(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 vL=dr(void 0),_L=dr({routes:[],publicLinks:eu()}),bL=dr(!1),Epe=vL.Provider;function wpe(e){return Ar(Epe,{value:e.value,children:e.children})}let kpe=_L.Provider;function Cpe(e){return Ar(kpe,{value:e.value,children:e.children})}let Rpe=bL.Provider;function Ape(e){return Ar(Rpe,{value:e.value,children:e.children})}function Tpe(e){let t=ae(()=>({routes:[],publicLinks:eu()})),r=t[1],n=t[0],i=ae(()=>({routes:[],publicLinks:eu()})),o=i[1],s=i[0],a=ae(()=>!1),l=a[1],u=n.routes.concat(s.routes),d=Iy(n.publicLinks,s.publicLinks),f={routes:u,publicLinks:d};return b(wpe,{value:{register:(m,v)=>r(_=>({routes:_.routes.concat(m),publicLinks:Iy(_.publicLinks,v)})),setPluginRoutes:(m,v)=>{o(_=>({routes:m,publicLinks:v})),l(_=>!0)}},children:b(Ape,{value:a[0],children:b(Cpe,{value:f,children:b(BU.make,{registry:d,children:e.children})})})})}let Npe={make:Tpe};function Nw(){return zt(vL)}function $pe(){return zt(bL)}function Dpe(){let e=zt(_L).routes;return jt(()=>FU(Spe(e.toReversed())),[e])}function Gd(e){return"var("+e+")"}let Fpe=w([c("background",Gd(y.surface)),c("color",Gd(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",Gd(X.sm)),c("padding","4px 8px"),c("font-size",Gd(A.sizeSm)),c("font-family",Gd(A.fontFamily)),ye("pointer")]);function Ipe(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}let Ppe=["Light","Dark","Neutral","HighContrast"];function Ope(e){let t=cpe(),r=t.setPreset,n=i=>{let o=i.target.value;r(pL(o))};return b("select",{children:Ppe.map(i=>{let o=H1(i);return b("option",{children:Ipe(i),value:o},o)}),className:Fpe,value:H1(t.preset),onChange:n})}let Mpe=Ope;function yL(e){return e.startsWith("/")?!e.startsWith("//"):!1}function Lpe(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):yL(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 zpe(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):yL(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function Upe(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Bpe(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+Upe(r)}function W1(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,se(e.onReconnect,s=>s(o))}break}if(n===1)switch(r){case"Closed":case"Connecting":break;case"Open":e.disconnectedSince=Date.now();break}se(e.onStateChange,i=>i(t))}function jpe(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 qpe='{"type":"connection_init"}';function G1(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{rr(r).send(o);return}catch{return}}function Vpe(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{rr(r).send(n);return}catch{return}}function Kpe(e){e.subscriptions.forEach(t=>G1(e,t))}function Hpe(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=R(r,me.object);if(n===void 0)return;let i=R(n.type,me.string);if(i!==void 0)switch(i){case"connection_ack":W1(e,"Open"),e.reconnectAttempts=0;let o=e.pendingPostAck;return e.pendingPostAck=[],o.forEach(h=>h()),Kpe(e);case"data":let s=R(n.id,me.string),a=D(n.event,null),l=h=>{let p=me.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},u=me.array(a),d=u!==void 0?u.map(l):[l(a)],f=R(s,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function xL(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([Bpe(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Wt(i),W1(e,"Connecting"),i.onopen=()=>{try{i.send(qpe);return}catch{return}},i.onmessage=o=>Hpe(e,o.data),i.onclose=()=>{if(e.ws=void 0,W1(e,"Closed"),e.disposed)return;let o=e.reconnectAttempts+1|0;e.reconnectAttempts=o,e.reconnectTimer=setTimeout(()=>xL(e),jpe(o))},i.onerror=o=>{}}function Wpe(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 xL(o),o}function Gpe(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};e.subscriptions.set(n,i);let o=e.state,s=0;switch(o){case"Closed":case"Connecting":s=1;break;case"Open":G1(e,i);break}return s===1&&e.pendingPostAck.push(()=>G1(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),Vpe(e,n)}}function rN(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{rr(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function Jpe(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(s=>JSON.stringify(s))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let s=await fetch(e,{method:"POST",headers:o,body:i});return s.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+s.status.toString()}}catch(s){let a=Su(s);return a.RE_EXN_ID===cm?{TAG:"Error",_0:D(a._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function Wg(e){return e.startsWith("Platform_")||e.startsWith("platform_")?"Platform":"Domain"}let SL=dr(void 0);function ov(){return zt(SL)}function nN(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[]}}let Qpe=SL.Provider;function Ype(e){let t=e.getToken,r=e.clientEventsNamespace,n=e.liveReconnectRefetch,i=e.liveUpdates,o=e.platformEventsEndpoint,s=e.domainEventsEndpoint,a=n!==void 0?n:!0,l=Je(t);Ae(()=>{l.current=t},[t]);let u=()=>l.current(),d=Je(nN()),f=Je(nN()),h=ae(()=>"Closed"),p=h[1],g=h[0],m=ae(()=>"Closed"),v=m[1],_=m[0],x=U=>U==="Domain"?d:f,E=U=>U==="Domain"?s:o,S=U=>{let B=x(U).current,q=B.client;if(q!==void 0)return q;let J=E(U);if(J===void 0)return;let Y=Lpe(J),K=zpe(J),G=Wpe(Y,K,u,ie=>U==="Domain"?p(oe=>ie):v(oe=>ie),ie=>{let oe=x(U).current;if(!(a&&ie>=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 J=x(U).current;if(!i||Ui(E(U)))return()=>{};C(U),J.refcount=J.refcount+1|0;let Y=J.registry.get(B),K;if(Y!==void 0){let G=Y.drainTimer;G!==void 0&&(clearTimeout(G),Y.drainTimer=void 0),K=Y}else{let G={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};J.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=S(U);if(G!==void 0){let ie=Gpe(G,B,oe=>{K.callbacks.forEach(_e=>_e(oe))});K.underlyingUnsub=ie}}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,J.registry.delete(B)},5e3)),J.refcount=J.refcount-1|0,J.refcount===0){let G=x(U).current,ie=G.idleTimer;ie!==void 0&&clearTimeout(ie),G.idleTimer=setTimeout(()=>{let oe=G.client;oe!==void 0&&(rN(oe),G.client=void 0),G.idleTimer=void 0},3e4);return}}},N=U=>i?Be(E(Wg(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(Y=>{let K=Y.drainTimer;if(K!==void 0){clearTimeout(K),Y.drainTimer=void 0;return}});let J=B.client;J!==void 0&&rN(J),B.client=void 0})}),[]);let T=U=>U==="Domain"?g:_,$=(U,B)=>{let q=x(U).current;return q.reconnectListeners.push(B),()=>{q.reconnectListeners=q.reconnectListeners.filter(J=>J!==B)}},P=()=>i&&Be(r)?Be(s):!1,M=async(U,B,q)=>{let J=E(U);return J!==void 0?await Jpe(J,l.current(),B,q):{TAG:"Error",_0:"no events endpoint configured"}},I=jt(()=>({subscribe:k,isLive:N,apiForReadModel:Wg,statusFor:T,registerReconnect:$,publish:M,clientChannelsAvailable:P,clientNamespace:()=>r}),[i,s,o,g,_,r]);return Ar(Qpe,{value:I,children:e.children})}let Xpe={make:Ype};function iN(e){return Object.fromEntries([["eq",e]])}function Zpe(e,t){let r=me.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=R(n.filter,me.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=iN(t.environment),o.platformName=iN(t.platformName),n.filter=o,n}let e0e=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,t0e=/\$filter\s*:/,oN={};function r0e(e){if(oN[e]===void 0){oN[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 n0e(e){return t=>((r,n)=>e0e.test(r)?t(r,Zpe(n,e)):(t0e.test(r)&&r0e(r),t(r,n)))}let i0e={background:"var("+y.surface+")",border:"1px solid var("+y.borderSubtle+")",color:"var("+y.textPrimary+")",fontFamily:"var("+A.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+X.md+")"},o0e={background:"var("+y.surfaceElevated+")",border:"1px solid var("+y.border+")",color:"var("+y.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+A.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+X.sm+")",alignItems:"center",justifyContent:"space-between"},s0e={background:"var("+y.brandSubtle+")",color:"var("+y.brand+")",fontSize:"var("+A.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+X.full+")"};function a0e(e){let t=e.discover,r=Si(),n=ae(()=>"Loading"),i=n[1],o=n[0];Ae(()=>{r!==void 0?(i(a=>"Loading"),Gt(t(r).then(a=>i(l=>({TAG:"Loaded",_0:a}))),a=>{let l=D(R(H7(a),u=>u.message),"Platform discovery failed");return i(u=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(a=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[Be(r)]);let s;if(typeof o!="object")s=b("div",{children:"Discovering platforms…",style:{color:"var("+y.textSecondary+")"}});else if(o.TAG==="Loaded"){let a=o._0;s=a.length!==0?a.map(l=>L("button",{children:[l.platformName,b("span",{children:l.environment,style:s0e})],style:o0e,onClick:u=>Dh(Tw(l)+"/")},l.environment+"/"+l.platformName)):b("div",{children:"No platforms discovered.",style:{color:"var("+y.textSecondary+")"}})}else s=b("div",{children:o._0,style:{color:"var("+y.error+")",fontSize:"var("+A.sizeSm+")"}});return L("div",{children:[b("h1",{children:"Select a platform",style:{fontSize:"var("+A.sizeXl+")",fontWeight:"var("+A.weightBold+")",margin:"0 0 1.5rem"}}),s],style:i0e})}let l0e=a0e;function Ed(e){let t=R(R(Q(e),n=>zx(n)[0]),Q),r=R(R(t,n=>O(n,"__typename")),ce);if(r===void 0)return"Accepted";switch(r){case"CommandPending":return"Pending";case"CommandRejected":let n=R(R(t,o=>O(o,"errorCode")),ce),i=R(R(t,o=>O(o,"errorDetail")),ce);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return"Accepted"}}function Yo(e,t){let r=O(e,t);if(r===void 0)return;let n=ce(r);return n!==void 0?n:R(R(Q(r),i=>O(i,"TAG")),ce)}function EL(e,t,r){if(r===void 0)return e;let n=Yo(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function u0e(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function c0e(e){let t=me.object(e);if(t===void 0)return;let r=o=>R(t[o],me.string),n=R(r("changeKind"),u0e),i=r("id");if(n!==void 0&&i!==void 0)return{changeKind:n,id:i,sortKeyValue:r("sortKeyValue")}}function sN(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let aN="default";function d0e(e,t){let r=sN(e);return typeof t!="object"?"/"+aN+"/"+r+"/*":"/"+aN+"/"+r+"/"+sN(t._0)}function J1(e,t,r,n,i){let o=r!==void 0?r:!0,s=ov(),a=d0e(e,t),l=Je(n);Ae(()=>{l.current=n},[n]);let u=Je(i);Ae(()=>{u.current=i},[i]),Ae(()=>{if(!o||s===void 0)return;let d=Wg(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let g=s.subscribe(d,a,v=>{let _=c0e(v);if(_!==void 0)return l.current(_)});f.contents=g;let m=s.registerReconnect(d,()=>se(u.current,v=>v()));h.contents=m},100);return()=>{clearTimeout(p);let g=f.contents;g!==void 0&&g();let m=h.contents;if(m!==void 0)return m()}},[a,o,s])}function wL(e,t,r,n,i,o){let s=t!==void 0?t:{},a=r!==void 0?r:"",l=n!==void 0?n:!0,u=i!==void 0?i:()=>{},d=Si(),f=ae(()=>[]),h=f[1],p=ae(()=>o4),g=p[1],m=p[0],v=ae(()=>"Loading"),_=v[1],x=ae(()=>0),E=x[1],S=ae(()=>1),C=S[1],k=S[0];return Ae(()=>{if(l)if(d!==void 0){_(T=>"Loading"),u();let N;if(o!==void 0){let T=dt(fe(Q(s),[],Ge));T.first=o*k|0,N=T}else N=s;Gt(d(e.queryDocument,N).then(T=>(h($=>cE(T,e.queryField)),g($=>l4(T,e.queryField)),_($=>"Loaded"),Promise.resolve())),T=>(_($=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else _(N=>({TAG:"Error",_0:"Not connected"}));else _(N=>"Loaded")},[x[0],a,l,k]),{rows:f[0],setRows:h,pageInfo:m,fetchState:v[0],refetch:()=>E(N=>N+1|0),loadMore:()=>C(N=>N+1|0),canLoadMore:m.hasNextPage}}function vu(e,t,r){let n=t!==void 0?t:!0,o=wL(e,void 0,void 0,n,void 0,50),s=Je(void 0),a=d=>{let f=s.current;f!==void 0&&clearTimeout(f),s.current=setTimeout(()=>{s.current=void 0,o.refetch()},250)},l=ov(),u=n&&fe(l,!1,d=>d.isLive(e.queryField));return J1(e.queryField,"All",u,a,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:u,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let f0e=50,lN=["message","body","text","title","content"],kL=["userId","recipientId","recipient","user","targetUserId"],h0e=["createdAt","sentAt","notifiedAt","at","timestamp"],p0e=["read","isRead","seen","acknowledged"];function $w(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function CL(e){return ne(Tr(e),t=>{if(Mh(t[1]))return t[0]})}function RL(e,t){return CL(e).find(r=>$w(r,t))}function g0e(e){let t=RL(e,kL);if(t!==void 0)return t;let r=Br(e,void 0,void 0);return Tr(e).map(n=>n[0]).find(n=>fe(O(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function m0e(e){return ne(Tr(e),t=>{if(Cm(t[1]))return t[0]}).find(t=>$w(t,h0e))}function v0e(e){return ne(Tr(e),t=>{if(Ue(iH(t[1]),"boolean"))return t[0]}).find(t=>$w(t,p0e))}function _0e(e,t){return ne(CL(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 b0e(e){return fe(R(Q(e),t=>O(t,"x-reventless-notifications")),!1,t=>{let r=it(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let y0e=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function x0e(e,t){let r=ne(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>y0e.some(i=>n.name.toLowerCase().startsWith(i)))}let uN={contents:[]};function cN(e,t,r){if(!uN.contents.includes(e)){uN.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 S0e(e){return ne(e.readModels.filter(t=>b0e(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=RL(t.schema,lN),n=g0e(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:m0e(t.schema),readField:v0e(t.schema),refFields:_0e(t.schema,n),markReadCommand:x0e(t,e)};cN(t.name,"recipient",kL);return}else{cN(t.name,"message",lN);return}})[0]}function mc(e,t){return R(O(e,t),ce)}function E0e(e,t,r){let n=mc(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function Gg(e,t){return R(R(t.timestampField,r=>mc(e,r)),$n)}function w0e(e,t,r){let n=t.readField;if(n!==void 0){let o=W(O(e,n),it);return o==="JSONTrue"&&typeof o!="object"}let i=Gg(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function k0e(e,t,r,n){return ne(t,i=>{let o=D(Q(i),{});if(E0e(o,e,r))return o}).toSorted((i,o)=>{let s=Gg(i,e),a=Gg(o,e);return s!==void 0?a!==void 0?a-s:-1:a!==void 0?1:0}).map((i,o)=>({id:D(mc(i,"id"),"#"+o.toString()),message:D(mc(i,e.messageField),""),timestamp:R(e.timestampField,s=>mc(i,s)),read:w0e(i,e,n),refs:ne(e.refFields,s=>W(mc(i,s.field),a=>[s.stem,a]))}))}function C0e(e,t){return st(t,void 0,(r,n)=>{let i=D(Q(n),{}),o=Gg(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function R0e(e,t){let r=D(R(e.markReadCommand,n=>n.aggregateIdField),"id");return dt([[r,t]])}function A0e(e,t){let r=e.length,n=t.length,i=kF((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 s=[],a=r,l=n;for(;a>0||l>0;){let u=e[a-1|0],d=t[l-1|0];a>0&&l>0&&u===d?(s=[{kind:"Unchanged",text:u}].concat(s),a=a-1|0,l=l-1|0):l>0&&(a===0||o(a,l-1|0)>=o(a-1|0,l))?(s=[{kind:"Added",text:d}].concat(s),l=l-1|0):(s=[{kind:"Removed",text:u}].concat(s),a=a-1|0)}return s}function ql(e){return"var("+e+")"}let T0e=w([c("font-family",ql(A.fontFamilyMono)),c("font-size",ql(A.sizeSm)),c("line-height",ql(A.lineHeightNormal)),c("border","1px solid var("+y.border+")"),c("border-radius",ql(X.md)),fa("auto")]),ub=w([z("flex"),c("padding","1px var("+F.md+")")]),N0e=w([c("background","rgba(248,81,73,0.12)"),c("color",ql(y.error))]),$0e=w([c("background","rgba(63,185,80,0.12)"),c("color",ql(y.success))]),D0e=w([c("color",ql(y.textSecondary))]),F0e=w([c("width","16px"),_i(0),c("user-select","none"),XF(Ce(8))]);function I0e(e){let t=e.before.split(`
|
|
57
|
+
`),r=e.after.split(`
|
|
58
|
+
`),n=A0e(t,r);return b("div",{children:n.map((i,o)=>{let s=i.kind,a;switch(s){case"Removed":a=[ub+" "+N0e,"-"];break;case"Added":a=[ub+" "+$0e,"+"];break;case"Unchanged":a=[ub+" "+D0e," "];break}return L("div",{children:[b("span",{children:a[1],className:F0e}),b("span",{children:i.text})],className:a[0]},o.toString())}),className:T0e})}let P0e=I0e;function sv(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 Jn(e){return"var("+e+")"}let O0e=w([z("flex"),pe("column"),c("gap","2px"),c("font-family",Jn(A.fontFamily)),c("font-size",Jn(A.sizeSm))]),dN=w([z("flex"),Z("flexStart"),c("gap","10px"),c("padding",Jn(F.xs)+" "+Jn(F.sm)),c("border-radius",Jn(X.sm))]),M0e=w([ye("pointer"),We([c("background",Jn(y.surfaceSubtle))])]),L0e=w([z("flex"),pe("column"),c("gap","2px"),c("min-width","0"),c("flex","1")]),z0e=w([c("color",Jn(y.textPrimary))]),U0e=w([c("font-weight",Jn(A.weightMedium))]),B0e=w([c("color",Jn(y.textSecondary))]),j0e=w([z("inlineFlex"),Z("center"),c("gap","6px"),c("color",Jn(y.textSecondary)),c("font-size",Jn(A.sizeXs)),c("white-space","nowrap")]),q0e=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("flex-shrink","0")]),V0e=w([c("background","none"),c("border","none"),c("padding","0"),c("color",Jn(y.brand)),c("font-size",Jn(A.sizeXs)),ye("pointer"),c("text-align","left"),We([c("text-decoration","underline")])]),K0e=w([c("margin-top","4px"),c("max-width","560px")]),H0e=w([c("color",Jn(y.textSecondary)),c("padding",Jn(F.md)),ha("center")]);function W0e(e){let t=e.onClick,r=e.entry,n=ae(()=>!1),i=n[1],o=n[0],s=Be(r.before)&&Be(r.after),a=D(r.actor,r.subject),l=t!==void 0?dN+" "+M0e:dN,u=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[b(od,{name:a,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[u!==void 0?b("span",{children:u+" ",className:U0e}):null,b("span",{children:r.verb+" ",className:B0e}),r.subject],className:z0e}),L("span",{children:[d!==void 0?b("span",{className:q0e,style:{background:d}}):null,f!==void 0?sv(e.nowMs,f):null],className:j0e}),s?b("button",{children:o?"Hide changes":"Show changes",className:V0e,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&s?b("div",{children:b(P0e,{before:D(r.before,""),after:D(r.after,"")}),className:K0e}):null],className:L0e})],className:l,onClick:h=>se(t,p=>p(r))})}function G0e(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",s=t!==void 0?t:Date.now();return i.length===0?b("div",{children:o,className:H0e}):b("div",{children:i.map(a=>b(W0e,{entry:a,nowMs:s,onClick:r},a.id)),className:O0e})}let J0e=G0e;function $t(e){return"var("+e+")"}let Q0e=w([Ut("relative"),z("inlineBlock")]),Y0e=w([Ut("relative"),z("inlineFlex"),Z("center"),Xe("center"),c("background","none"),c("border","none"),c("border-radius",$t(X.md)),c("cursor","pointer"),c("color",$t(y.textSecondary)),c("padding","6px"),We([c("background",$t(y.surfaceSubtle)),c("color",$t(y.textPrimary))])]),X0e=w([Ut("absolute"),pa(Ce(0)),bl(Ce(0)),z("inlineFlex"),Z("center"),Xe("center"),c("min-width","16px"),c("height","16px"),c("padding","0 4px"),c("border-radius",$t(X.full)),c("background",$t(y.brand)),c("color",$t(y.textOnBrand)),c("font-family",$t(A.fontFamily)),c("font-size","10px"),c("font-weight",$t(A.weightBold)),c("line-height","1")]),Z0e=w([Ut("absolute"),bl(Ce(0)),pa({NAME:"percent",VAL:100}),Cs(Ce(4)),c("width","320px"),c("background",$t(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",$t(X.md)),c("box-shadow",$t(mn.md)),c("z-index","200"),c("overflow","hidden"),c("font-family",$t(A.fontFamily))]),ege=w([z("flex"),Z("center"),Xe("spaceBetween"),c("padding","var("+F.sm+") var("+F.md+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),c("color",$t(y.textSecondary)),c("font-size",$t(A.sizeSm)),c("font-weight",$t(A.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),tge=w([c("background","none"),c("border","none"),c("color",$t(y.brand)),c("font-size",$t(A.sizeXs)),c("text-transform","none"),c("letter-spacing","0"),ye("pointer"),We([c("text-decoration","underline")])]),rge=w([c("max-height","360px"),c("overflow-y","auto")]);function nge(e){return w([z("flex"),Z("flexStart"),c("gap",$t(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+")"),ye(e?"pointer":"default"),We(e?[c("background",$t(y.surfaceSubtle))]:[])])}function ige(e){return w([c("width","8px"),c("height","8px"),c("border-radius",$t(X.full)),c("margin-top","5px"),c("flex-shrink","0"),c("background",e?"transparent":$t(y.brand))])}let oge=w([z("flex"),pe("column"),c("gap","2px"),c("min-width","0")]);function sge(e){return w([c("color",$t(y.textPrimary)),c("font-size",$t(A.sizeSm)),c("font-weight",$t(e?A.weightNormal:A.weightMedium)),c("line-height",$t(A.lineHeightNormal)),c("word-break","break-word")])}let age=w([c("color",$t(y.textDisabled)),c("font-size",$t(A.sizeXs))]),lge=w([c("color",$t(y.textDisabled)),c("font-size",$t(A.sizeSm)),c("padding",$t(F.md)),c("text-align","center")]);function uge(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 cge(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,s=e.onOpen,a=e.notifications,l=n!==void 0?n:"No notifications",u=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=ae(()=>u),h=f[1],p=f[0],g=a.filter(v=>!v.read).length;Ae(()=>{if(!p)return;let v=x=>h(E=>!1),_=x=>{if(x.key==="Escape")return h(E=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",_),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",_)}},[p]);let m=()=>{let v=!p;v&&se(i,_=>_()),h(_=>v)};return L("div",{children:[L("button",{children:[b(uge,{}),g>0?b("span",{children:g>99?"99+":g.toString(),className:X0e}):null],"aria-label":g>0?"Notifications ("+g.toString()+" unread)":"Notifications",className:Y0e,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),m()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&g>0?b("button",{children:"Mark all read",className:tge,type:"button",onClick:v=>o()}):null],className:ege}),a.length===0?b("div",{children:l,className:lge}):b("div",{children:a.map(v=>{let _=v.timestamp;return L("button",{children:[b("span",{className:ige(v.read)}),L("span",{children:[b("span",{children:v.message,className:sge(v.read)}),_!==void 0?b("span",{children:sv(d,_),className:age}):null],className:oge})],className:nge(Be(s)),type:"button",onClick:x=>{se(s,E=>E(v)),h(E=>!1)}},v.id)}),className:rge})],className:Z0e,onClick:v=>{v.stopPropagation()}}):null],className:Q0e})}let dge=cge,AL=dr([]),TL=dr(e=>{}),fge=AL.Provider,hge=TL.Provider;function pge(e){let t=e.initial,r=t!==void 0?t:[],n=ae(()=>r),i=n[1],o=Yr(s=>i(a=>s),[]);return Ar(hge,{value:o,children:Ar(fge,{value:n[0],children:e.children})})}let gge={make:pge};function mge(){return zt(AL)}function vge(){return zt(TL)}function NL(e){return"autoui.notifications.seen."+e}function _ge(e){let t=localStorage.getItem(NL(e));if(t!=null)return Ss(t)}function bge(e,t){localStorage.setItem(NL(e),t.toString())}function yge(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 xge(e){let t=mge(),r=$s(),n=Si(),i=Rs(),o=_l(),s=ae(()=>({})),a=s[1],l=s[0],d=ae(()=>0)[1],f=S=>(C=>a(k=>{let N=dt(Ge(k));return N[S]=C,N})),h=W(R(r,S=>S.identity),S=>({userId:S.userId,username:S.username})),p=t.flatMap(S=>{let C=fe(O(l,S.pluginId),[],k=>k.rows);return k0e(S.binding,C,h,_ge(S.pluginId)).map(k=>({key:S.pluginId+":"+k.id,appBinding:S,entry:k}))}).toSorted((S,C)=>{let k=R(S.entry.timestamp,$n),N=R(C.entry.timestamp,$n);return k!==void 0?N!==void 0?N-k:-1:N!==void 0?1:0}),g=(S,C)=>{let k=S.binding.markReadCommand;if(k!==void 0&&n!==void 0){Gt(n(k.mutationDocument,R0e(S.binding,C)).then(N=>{if(typeof Ed(N)!="object"){let $=S.pluginId;return se(O(l,$),P=>P.refetch())}}),N=>Promise.resolve());return}},m=S=>se(p.find(C=>C.key===S.id),C=>{C.entry.read||g(C.appBinding,C.entry.id);let k=C.entry;se(fU(k.refs,N=>{let T=N[1];return W(ma(i,N[0]),$=>[$,T])}),N=>{let T=N[0];o(oa(T.pluginId,T.name,N[1],[]))})}),v=Be(n)&&t.some(S=>Be(S.binding.markReadCommand)),_=()=>{p.forEach(S=>{if(!S.entry.read)return g(S.appBinding,S.entry.id)})},x=()=>{t.forEach(S=>{let C=fe(O(l,S.pluginId),[],k=>k.rows);se(C0e(S.binding,C),k=>bge(S.pluginId,k))}),d(S=>S+1|0)},E=p.map(S=>({id:S.key,message:S.entry.message,timestamp:S.entry.timestamp,read:S.entry.read}));return t.length===0?null:L(Hr,{children:[t.map(S=>b(yge,{binding:S.binding,onData:f(S.pluginId)},S.pluginId)),b(dge,{notifications:E,onOpen:m,onMarkAllRead:v?_:void 0,onPanelOpen:x})]})}let Sge=xge;function Ege(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 wge(e){let t=["B","KB","MB","GB"],n=((a,l)=>{for(;;){let u=l,d=a;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,a=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 Tn(e){return"var("+e+")"}let fN=w([z("flex"),pe("column"),Z("center"),Xe("center"),c("gap","6px"),c("padding",Tn(F.lg)),c("border","2px dashed var("+y.border+")"),c("border-radius",Tn(X.md)),c("color",Tn(y.textSecondary)),c("font-family",Tn(A.fontFamily)),c("font-size",Tn(A.sizeSm)),ye("pointer"),c("transition","border-color 120ms, background 120ms"),ha("center")]),kge=w([c("border-color",Tn(y.brand)),c("background",Tn(y.brandSubtle))]),Cge=w([c("font-size",Tn(A.sizeXs))]),Rge=w([z("flex"),Z("center"),c("gap","8px"),c("padding",Tn(F.xs)+" 0"),c("font-family",Tn(A.fontFamily)),c("font-size",Tn(A.sizeSm)),c("color",Tn(y.textPrimary))]),Age=w([c("flex","1"),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Tge=w([c("color",Tn(y.textSecondary)),c("font-size",Tn(A.sizeXs)),c("white-space","nowrap")]),Nge=w([c("color",Tn(y.success))]),hN=w([c("color",Tn(y.error))]),$ge=w([c("width","120px")]),Dge=w([c("width","40px"),c("height","40px"),c("flex","0 0 auto"),c("object-fit","cover"),c("border-radius",Tn(X.sm)),c("border","1px solid var("+y.border+")")]);function Fge(e){let t=e.onUploaded,r=e.label,n=e.multiple,i=e.accept,o=e.adapter,s=n!==void 0?n:!0,a=r!==void 0?r:"Drop files here or click to browse",l=ae(()=>[]),u=l[1],d=ae(()=>!1),f=d[1],h=Je(null),p=Je(0),g=Je([]);Ae(()=>(()=>{g.current.forEach(k=>{URL.revokeObjectURL(k)})}),[]);let m=(k,N)=>u(T=>T.map($=>$.key===k?{key:$.key,name:$.name,size:$.size,status:N,preview:$.preview}:$)),v=k=>{p.current=p.current+1|0;let N=p.current.toString()+":"+k.name,T=Ege(i,k.name,k.type),$=T?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"},P=k.type,M;if(P.toLowerCase().startsWith("image/")){let I=URL.createObjectURL(k);g.current=g.current.concat([I]),M=I}else M=void 0;if(u(I=>I.concat([{key:N,name:k.name,size:k.size,status:$,preview:M}])),T){Gt(o.upload(k,I=>m(N,{TAG:"Uploading",_0:I})).then(I=>{if(I.TAG==="Ok"){let U=I._0;m(N,{TAG:"Done",_0:U}),se(t,B=>B(k.name,U))}else m(N,{TAG:"Failed",_0:I._0});return Promise.resolve()}),I=>(m(N,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}},_=k=>{(s?k:k.slice(0,1)).forEach(v)},x=k=>{k.preventDefault(),f(T=>!1);let N=k.dataTransfer;if(N!=null)return _(Array.from(N.files))},E=k=>{let N=k.target.files;N!=null&&_(Array.from(N)),k.target.value=""},S=()=>se(ys(h.current),k=>k.click()),C=d[0]?fN+" "+kge:fN;return L("div",{children:[L("div",{children:[b("span",{children:a}),i!==void 0?b("span",{children:"Accepted: "+i,className:Cge}):null],className:C,role:"button",onClick:k=>S(),onDragLeave:k=>f(N=>!1),onDragOver:k=>{k.preventDefault(),f(N=>!0)},onDrop:x}),b("input",{ref:Wt(h),style:{display:"none"},accept:i,multiple:s,type:"file",onChange:E}),l[0].map(k=>{let N=k.preview,T=k.status,$;switch(T.TAG){case"Uploading":$=b("span",{children:b(JI,{value:T._0,showValue:!1}),className:$ge});break;case"Done":$=b("span",{children:"Uploaded",className:Nge});break;case"Rejected":$=b("span",{children:"Rejected",className:hN,title:T._0});break;case"Failed":$=b("span",{children:"Failed",className:hN,title:T._0});break}return L("div",{children:[N!==void 0?b("img",{className:Dge,alt:k.name,src:N}):null,b("span",{children:k.name,className:Age,title:k.name}),b("span",{children:wge(k.size),className:Tge}),$],className:Rge},k.key)})]})}let Ige=Fge;function Pge(e){if(e==="")return[];let t;try{t=br(JSON.parse(e))}catch{return[e]}return t!==void 0?ne(t,ce):[e]}function Oge(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 Mge(e){return Ue(R(R(Q(Qn(e)),t=>O(t,"type")),ce),"array")}function $L(e){return R(xs(e).storeTarget,HK)}function Lge(e,t,r){return $h(R($L(e),r),t)}function zge(e,t,r){return D(Lge(e,t,r),Oge($L(e)))}function Uge(e){let t=e.onChange,r=e.value,n=e.multiple,i=Je(n?Pge(r):r===""?[]:[r]),o=(s,a)=>{let l=n?i.current.concat([a]):[a];i.current=l,t(n?JSON.stringify(l.map(u=>u)):a)};return b(Ige,{adapter:e.adapter,accept:e.accept,multiple:n,onUploaded:o})}function Bge(e,t,r,n){if(n&&r==="")return"Required"}function jge(e,t,r,n){let i=t!==void 0?t:a=>{},o=(a,l,u,d,f,h,p)=>b(Uge,{adapter:zge(l,e,i),accept:r,multiple:D(n,Mge(l)),value:u,onChange:d}),s=a=>{let u={...D(Lne(a),{cell:(d,f,h)=>{},detail:(d,f,h)=>{}})};xr(a,(u.validateInput=Bge,u.input=o,u))};s("File"),s("Image")}var qge={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=qge,Vge=function(e,t,r,n,i,o,s,a){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,s,a],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Fe=Vge;function av(e){return function(){return e}}var wd=function(){};wd.thatReturns=av;wd.thatReturnsFalse=av(!1);wd.thatReturnsTrue=av(!0);wd.thatReturnsNull=av(null);wd.thatReturnsThis=function(){return this};wd.thatReturnsArgument=function(e){return e};var lv=Du,np=Fe;function Kge(e){np(!1)}function ba(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function DL(e){var t=ba(e);return typeof t=="object"&&t!==null&&t.kind===lv.FRAGMENT}function FL(e){var t=ba(e);return typeof t=="object"&&t!==null&&t.kind===lv.REQUEST}function Hge(e){var t=ba(e);return typeof t=="object"&&t!==null&&t.kind===lv.UPDATABLE_QUERY}function IL(e){var t=ba(e);return typeof t=="object"&&t!==null&&t.kind===lv.INLINE_DATA_FRAGMENT}function Dw(e){var t=ba(e);return DL(t)||np(!1),t}function Wge(e){var t,r=Dw(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 Gge(e){var t,r=Dw(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function Jge(e){var t=ba(e);return FL(t)||np(!1),t}function Qge(e){var t=ba(e);return Hge(t)||np(!1),t}function Yge(e){var t=ba(e);return IL(t)||np(!1),t}var Xo={getFragment:Dw,getNode:ba,getPaginationFragment:Wge,getRefetchableFragment:Gge,getRequest:Jge,getUpdatableQuery:Qge,getInlineDataFragment:Yge,graphql:Kge,isFragment:DL,isRequest:FL,isInlineDataFragment:IL},PL={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})(PL);var Ke=PL.exports,OL={exports:{}},ML={exports:{}},LL={exports:{}},zL={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})(zL);var UL=zL.exports,BL={exports:{}};(function(e){var t=UL.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var s=o.call(n,i||"default");if(t(s)!="object")return s;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})(BL);var Xge=BL.exports;(function(e){var t=UL.default,r=Xge;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})(LL);var jL=LL.exports;(function(e){var t=jL;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})(ML);var ei=ML.exports;(function(e){var t=ei;function r(i,o){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);o&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),s.push.apply(s,a)}return s}function n(i){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?r(Object(s),!0).forEach(function(a){t(i,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(s,a))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(OL);var Vt=OL.exports,qL={exports:{}},VL={exports:{}},KL={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})(KL);var HL=KL.exports;(function(e){var t=HL;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})(VL);var WL=VL.exports;(function(e){var t=WL;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 s=0,a=function(){};return{s:a,n:function(){return s>=n.length?{done:!0}:{done:!1,value:n[s++]}},e:function(h){throw h},f:a}}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})(qL);var Ir=qL.exports,GL=Ke.default,pN=GL(Vt),gN=GL(Ir),Zge=Fe;function eme(e,t,r){var n=(0,gN.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,pN.default)((0,pN.default)({},o),{},{uiContext:r}))}}catch(u){n.e(u)}finally{n.f()}var s=(0,gN.default)(t),a;try{for(s.s();!(a=s.n()).done;){var l=a.value;if(JL(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,Zge(!1)}}}catch(u){s.e(u)}finally{s.f()}}function JL(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 tme(e,t,r){t!=null&&eme(e,t,r)}var ip={handlePotentialSnapshotErrors:tme,eventShouldThrow:JL},QL={exports:{}},YL={exports:{}};(function(e){var t=HL;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(YL);var rme=YL.exports,XL={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})(XL);var nme=XL.exports,ZL={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})(ZL);var ime=ZL.exports;(function(e){var t=rme,r=nme,n=WL,i=ime;function o(s){return t(s)||r(s)||n(s)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(QL);var Sl=QL.exports,e8={DEFAULT_HANDLE_KEY:""},ome=e8,sme=ome.DEFAULT_HANDLE_KEY,ame=Fe;function lme(e,t,r){return t&&t!==sme?"__".concat(t,"_").concat(e):(r==null&&ame(!1),"__".concat(r,"_").concat(e))}var t8=lme,ume={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},bo=ume;function Q1(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(Q1);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=Q1(e[t[n]]);return r}function r8(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 r8(i,r)})}var Fu={stableCopy:Q1,hasCycle:r8},cme=Ke.default,dme=cme(Sl),fme=t8,uv=Du,hme=bo,pme=Fu,n8=pme.stableCopy,gme=Fe,mme=uv.VARIABLE,vme=uv.LITERAL,_me=uv.OBJECT_VALUE,bme=uv.LIST_VALUE,yme="__errors",xme="__module_component_",Sme="__module_operation_";function Y1(e,t){if(e.kind===mme)return Rme(e.variableName,t);if(e.kind===vme)return e.value;if(e.kind===_me){var r={};return e.fields.forEach(function(i){r[i.name]=Y1(i,t)}),r}else if(e.kind===bme){var n=[];return e.items.forEach(function(i){i!=null&&n.push(Y1(i,t))}),n}}function Fw(e,t,r){var n={};return r&&(n[o8.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=Y1(i,t)}),n}function Eme(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,s=e.args,a=e.filters,l=fme(n,i,o),u=null;return s&&a&&s.length!==0&&a.length!==0&&(u=s.filter(function(d){return a.indexOf(d.name)>-1})),r&&(u=u!=null?[r].concat((0,dme.default)(u)):[r]),u===null?l:Iw(l,Fw(u,t))}function i8(e,t){if(e.storageKey)return e.storageKey;var r=kme(e),n=e.name;return r&&r.length!==0?Iw(n,Fw(r,t)):n}function wme(e,t){var r=i8(e,t);return hme.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function kme(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 Cme(e,t){return Iw(e,n8(t))}function Iw(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 Rme(e,t){return t.hasOwnProperty(e)||gme(!1),n8(t[e])}function Ame(e){return"".concat(xme).concat(e)}function Tme(e){return"".concat(Sme).concat(e)}var o8={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:yme,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:Fw,getHandleStorageKey:Eme,getStorageKey:i8,getReadTimeResolverStorageKey:wme,getStableStorageKey:Cme,getModuleComponentKey:Ame,getModuleOperationKey:Tme},lr=o8,Nme=Ke.default,s8=Nme(Vt),$me=lr,Dme=$me.getArgumentValues,Fme=Fe;function Ime(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,s8.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:Fme(!1)}}),n||r}function Pme(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 Ome(e,t,r){if(t==null)return e;var n=(0,s8.default)({},e),i=r?Dme(r,e):{};return t.forEach(function(o){var s,a=(s=i[o.name])!==null&&s!==void 0?s:o.defaultValue;n[o.name]=a}),n}var El={getLocalVariables:Ome,getFragmentVariables:Ime,getOperationVariables:Pme},cb=[],db=[];/**
|
|
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 Mme(e,t){var r=cb.length?cb.pop():[],n=db.length?db.pop():[],i=X1(e,t,r,n);return r.length=0,n.length=0,cb.push(r),db.push(n),i}function X1(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 s=r.length;s--;)if(r[s]==e)return n[s]==t;r.push(e),n.push(t);var a=0;if(o==="[object Array]"){if(a=e.length,a!==t.length)return!1;for(;a--;)if(!X1(e[a],t[a],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(!X1(e[l[u]],t[l[u]],r,n))return!1}return r.pop(),n.pop(),!0}var ya=Mme,Lme=El,zme=Lme.getFragmentVariables,op=lr,Ume=op.CLIENT_EDGE_TRAVERSAL_PATH,Bme=op.FRAGMENT_OWNER_KEY,jme=op.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,qme=op.FRAGMENTS_KEY,a8=op.ID_KEY,l8=ya,hl=Fe;function cv(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||hl(!1);var r=t[a8],n=t[qme],i=t[Bme],o=t[Ume];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 s=i,a=o,l=n[e.name],u=zme(e,s.variables,l),d=l[jme]===!0;return g8(e,r,u,s,d,a)}return null}function u8(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 c8(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||hl(!1),u8(e,t)):(Array.isArray(t)&&hl(!1),cv(e,t))}function Vme(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=c8(i,o)}return r}function Kme(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=d8(i,o)}return r}function d8(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||hl(!1),Hme(e,t)):(Array.isArray(t)&&hl(!1),f8(e,t))}function Hme(e,t){var r=null;return t.forEach(function(n){var i=n!=null?f8(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function f8(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||hl(!1);var r=t[a8];return typeof r=="string"?r:null}function Wme(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],s=h8(i,o);Object.assign(r,s)}return r}function h8(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||hl(!1),p8(e,t)):(Array.isArray(t)&&hl(!1),Pw(e,t)||{})}function Pw(e,t){var r=cv(e,t);return r?r.variables:null}function p8(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=Pw(e,n);o!=null&&Object.assign(r,o)}}),r}function mN(e,t){return e.dataID===t.dataID&&e.node===t.node&&l8(e.variables,t.variables)&&Gme(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&Jme(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function Gme(e,t){return e===t?!0:e.identifier===t.identifier&&l8(e.cacheConfig,t.cacheConfig)}function Jme(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 Qme(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?mN(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return mN(r,t.selectors[n])}):!1}function g8(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 Yme(e,t,r){return{dataID:t,node:e,variables:r}}var Zo={areEqualSelectors:Qme,createReaderSelector:g8,createNormalizationSelector:Yme,getDataIDsFromFragment:d8,getDataIDsFromObject:Kme,getSingularSelector:cv,getPluralSelector:u8,getSelector:c8,getSelectorsFromObject:Vme,getVariablesFromSingularFragment:Pw,getVariablesFromPluralFragment:p8,getVariablesFromFragment:h8,getVariablesFromObject:Wme},Xme=Xo,Zme=Xme.getFragment,eve=ip,tve=eve.eventShouldThrow,rve=Zo,nve=rve.getSelector,vN=Fe,Nf=[];function ive(e,t){Nf.push(e);try{return t()}finally{Nf.pop()}}function ove(e,t){if(!Nf.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Nf[Nf.length-1],n=Zme(e),i=nve(n,t);i==null&&vN(!1),i.kind!=="SingularReaderSelector"&&vN(!1);var o=r.getDataForResolverFragment(i,t),s=o.data,a=o.isMissingData,l=o.fieldErrors;if(a||l!=null&&l.some(tve))throw m8;return s}var m8={},Ow={readFragment:ove,withResolverContext:ive,RESOLVER_FRAGMENT_ERRORED_SENTINEL:m8},sve=Ow;sve.readFragment;var v8={exports:{}};(function(e){function t(n,i,o,s,a,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(s,a)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(s,a){var l=n.apply(i,o);function u(f){t(l,s,a,u,d,"next",f)}function d(f){t(l,s,a,u,d,"throw",f)}u(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(v8);var _8=v8.exports;function ave(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var b8=ave,lve=b8,js=pve,xh=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){js=n},e.from=function(n){return uve(n)?cve(n):lve(n)?dve(n):fve(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var s;return i.subscribe({start:function(l){s=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){s=d},next:o.next,complete:o.complete,error:o.error})}catch(u){o.error(u,!0)}}}),function(){return s.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var s;return i.subscribe({start:function(l){s=l},next:o.next,error:o.error,complete:function(){s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var s=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(u){js(u,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:s("start"),next:s("next"),error:s("error"),complete:s("complete"),unsubscribe:s("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var s=i.subscribe(o);return function(){s.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var s=!1,a;return a=i.subscribe({next:function(u){s=!0,o.next(u)},error:o.error,complete:function(){s?o.complete():a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.subscribe=function(n){return hve(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var s=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(){s.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var s=[];function a(u){this._sub=u,s.push(u)}function l(){s.splice(s.indexOf(this._sub),1),s.length===0&&o.complete()}return i.subscribe({start:a,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:a,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){s.forEach(function(u){return u.unsubscribe()}),s.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var s,a,l=function u(){s=i.subscribe({next:o.next,error:o.error,complete:function(){a=setTimeout(u,n)}})};return l(),function(){clearTimeout(a),s.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var s=!1;n.subscribe({next:function(l){s||(s=!0,i(l))},error:o,complete:i})})},e})();function uve(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function cve(e){return e instanceof xh?e:xh.create(function(t){return e.subscribe(t)})}function dve(e){return xh.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function fve(e){return xh.create(function(t){t.next(e),t.complete()})}function hve(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){js(l,!0)}n=void 0}}var s=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(s)}catch(u){js(u,!0)}finally{o()}}}});try{t.start&&t.start(s)}catch(l){js(l,!0)}if(r)return s;var a=i({next:function(u){if(!r&&t.next)try{t.next(u)}catch(d){js(d,!0)}},error:function(u,d){if(r||!t.error)r=!0,js(u,d||!1),o();else{r=!0;try{t.error(u)}catch(f){js(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(u){js(u,!0)}finally{o()}}}});try{n=e(a)}catch(l){a.error(l,!0)}return r&&o(),s}function pve(e,t){}var wl=xh,y8=Ke.default,gve=y8(Ir),Yp=y8(ei),mve=wl,vve=Fe,_ve=(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=mve.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var s=i[o];switch(s.kind){case"complete":n.complete();break;case"error":n.error(s.error);break;case"next":n.next(s.data);break;default:s.kind,vve(!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,gve.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(s){n.e(s)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),x8=_ve,Mw=wl,_N=x8,S8=Fe,bve=typeof WeakMap=="function",bN=bve?new WeakMap:new Map;function yve(e,t){return E8(e,t.request.identifier,function(){return e.execute({operation:t})})}function E8(e,t,r){return Mw.create(function(n){var i=Lw(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(a){o={identifier:t,subject:new _N,subjectForInFlightStatus:new _N,subscription:a,promise:null},i.set(t,o)},next:function(a){var l=Xp(i,t);l.subject.next(a),l.subjectForInFlightStatus.next(a)},error:function(a){var l=Xp(i,t);l.subject.error(a),l.subjectForInFlightStatus.error(a)},complete:function(){var a=Xp(i,t);a.subject.complete(),a.subjectForInFlightStatus.complete()},unsubscribe:function(a){var l=Xp(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&S8(!1),xve(i,o).subscribe(n)})}function xve(e,t){return Mw.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 w8(e,t,r){return Mw.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(s){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function Sve(e,t){var r=Lw(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,s){var a=!1;w8(e,r,n).subscribe({complete:o,error:s,next:function(u){a&&o(u)}}),a=!0});return i}function Eve(e,t){var r=Lw(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:w8(e,r,n)}function Lw(e){var t=bN.get(e);if(t!=null)return t;var r=new Map;return bN.set(e,r),r}function Xp(e,t){var r=e.get(t);return r==null&&S8(!1),r}var dv={fetchQuery:yve,fetchQueryDeduped:E8,getPromiseForActiveRequest:Sve,getObservableForActiveRequest:Eve},wve=Ke.default;_8.default;var kve=wve(Ir),k8=wl,Cve=dv,Rve=Cve.getObservableForActiveRequest,Ave=Xo,Tve=Ave.getFragment,Nve=ip,$ve=Nve.handlePotentialSnapshotErrors,Dve=Zo,Fve=Dve.getSelector,G0=Fe;function Ive(e,t,r){var n,i=Tve(t),o=Fve(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 Pve(e,t,o);case"PluralReaderSelector":return Ove(e,t,o)}G0(!1)}function Pve(e,t,r){var n=e.lookup(r);return k8.create(function(i){i.next(Jg(e,t,r.owner,n));var o=e.subscribe(n,function(s){i.next(Jg(e,t,r.owner,s))});return function(){return o.dispose()}})}function Ove(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return k8.create(function(i){var o=n.map(function(a,l){return Jg(e,t,r.selectors[l].owner,a)});i.next(yN(o));var s=n.map(function(a,l){return e.subscribe(a,function(u){o[l]=Jg(e,t,r.selectors[l].owner,u),i.next(yN(o))})});return function(){return s.forEach(function(a){return a.dispose()})}})}function Jg(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&&(Rve(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{$ve(e,n.fieldErrors)}catch(s){return{error:s,state:"error"}}return n.data==null&&G0(!1),{state:"ok",value:n.data}}function yN(e){var t=[],r=(0,kve.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 zw={observeFragment:Ive};function C8(e){return Mve(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&C8(r)})),e}function Mve(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var R8=C8,Lve=Fu,zve=Lve.stableCopy,Uve=Fe;function Bve(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&Uve(!1),r+JSON.stringify(zve(t))}var A8=Bve,jve=A8,qve=bo,Vve=Fu,Kve=Vve.hasCycle,Hve=El,Wve=Hve.getOperationVariables,T8=Zo,Gve=T8.createNormalizationSelector,Jve=T8.createReaderSelector,Qve=lr,Yve=Qve.ROOT_ID,Xve=Fe;function Zve(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Yve,i=e.operation,o=Wve(i,e.params.providedVariables,t);qve.ENABLE_CYLE_DETECTION_IN_VARIABLES&&Kve(o)&&Xve(!1);var s=N8(e,o,r),a={fragment:Jve(e.fragment,n,o,s),request:s,root:Gve(i,n,o)};return a}function N8(e,t,r){var n={identifier:jve(e.params,t),node:e,variables:t,cacheConfig:r};return n}var kl={createOperationDescriptor:Zve,createRequestDescriptor:N8},e_e=Ke.default,t_e=e_e(ei),r_e=zw,n_e=r_e.observeFragment,i_e=kl,o_e=i_e.createOperationDescriptor;function s_e(e,t,r){var n=o_e(t,r),i={__id:n.fragment.dataID,__fragments:(0,t_e.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return n_e(e,o,i)}var a_e={observeQuery:s_e},l_e=_8.default,u_e=zw,c_e=u_e.observeFragment;function d_e(e,t,r){return Z1.apply(this,arguments)}function Z1(){return Z1=l_e(function*(e,t,r){var n;try{var i,o=yield new Promise(function(a,l){n=c_e(e,t,r).subscribe({next:function(d){d.state==="ok"?a(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(a){var s;throw(s=n)===null||s===void 0||s.unsubscribe(),a}}),Z1.apply(this,arguments)}var f_e={waitForFragmentData:d_e},h_e=zw;h_e.observeFragment;var p_e=a_e;p_e.observeQuery;var g_e=f_e;g_e.waitForFragmentData;function m_e(e){return e.ok===!0}function v_e(e){return e.ok===!1}var __e={isValueResult:m_e,isErrorResult:v_e},xN=new Map,b_e=1,y_e=x_e(),$8=" ",SN="\v";function x_e(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function S_e(e){return e[0]===$8&&y_e.has(e[1])||e[0]===SN?SN+e:e}function E_e(e,t){if(t==null||e.length<t)return S_e(e);var r=xN.get(e);return r!=null||(r=$8+b_e++,xN.set(e,r)),r}var D8={intern:E_e},EN=bo,w_e=D8,k_e=w_e.intern,Sh="client:";function C_e(e,t,r){var n=EN.STRING_INTERN_LEVEL<=0?e:k_e(e,EN.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(Sh)!==0&&(i=Sh+i),i}function R_e(e){return e.indexOf(Sh)===0}var A_e=0;function T_e(){return"".concat(Sh,"local:").concat(A_e++)}function N_e(e,t,r){var n="".concat(Sh).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var Ds={generateClientID:C_e,generateClientObjectClientID:N_e,generateUniqueClientID:T_e,isClientID:R_e},$_e={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},wN={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"},D_e={inject:function(t){wN=t},get:function(){return wN},isConnectionCall:function(t){return $_e.hasOwnProperty(t.name)}},Uw=D_e,F_e=Ds,Eh=F_e.generateClientID,I_e=lr,P_e=I_e.getStableStorageKey,F8=t8,Iu=Uw,O_e=Fe,I8="connection",ex="__connection_next_edge_index";function M_e(e,t){var r=e.get(t.dataID);if(r){var n=Iu.get(),i=n.EDGES,o=n.END_CURSOR,s=n.HAS_NEXT_PAGE,a=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=Eh(r.getDataID(),t.handleKey),g=r.getLinkedRecord(t.handleKey),m=g??e.get(p),v=m&&m.getLinkedRecord(l);if(m){g==null&&r.setLinkedRecord(m,t.handleKey);var E=m,S=f.getLinkedRecords(i);S&&(S=S.map(function(K){return tx(e,E,K)}));var C=E.getLinkedRecords(i),k=E.getLinkedRecord(l);E.copyFieldsFrom(f),C&&E.setLinkedRecords(C,i),k&&E.setLinkedRecord(k,l);var N=[],T=t.args;if(C&&S)if(T.after!=null){var $,P=($=v)===null||$===void 0?void 0:$.getValue(o),M=h?.getValue(o),I=v&&T.after===P,U=v&&P===M;if(I||U){var B=new Set;Zp(C,N,B),Zp(S,N,B)}else return}else if(T.before!=null)if(v&&T.before===v.getValue(d)){var q=new Set;Zp(S,N,q),Zp(C,N,q)}else return;else N=S;else S?N=S:N=C;if(N!=null&&N!==C&&E.setLinkedRecords(N,i),v&&h){if(T.after==null&&T.before==null)v.copyFieldsFrom(h);else if(T.before!=null||T.after==null&&T.last){v.setValue(!!h.getValue(a),a);var J=h.getValue(d);typeof J=="string"&&v.setValue(J,d)}else if(T.after!=null||T.before==null&&T.first){v.setValue(!!h.getValue(s),s);var Y=h.getValue(o);typeof Y=="string"&&v.setValue(Y,o)}}}else{var _=e.create(p,f.getType());_.setValue(0,ex),_.copyFieldsFrom(f);var x=f.getLinkedRecords(i);x&&(x=x.map(function(K){return tx(e,_,K)}),_.setLinkedRecords(x,i)),r.setLinkedRecord(_,t.handleKey),v=e.create(Eh(_.getDataID(),l),u),v.setValue(!1,s),v.setValue(!1,a),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),_.setLinkedRecord(v,l)}}}function L_e(e,t,r){var n=F8(I8,t,null);return e.getLinkedRecord(n,r)}function z_e(e,t,r){var n=F8(I8,t,null),i=P_e(n,r);return Eh(e,i)}function U_e(e,t,r){var n=Iu.get(),i=n.CURSOR,o=n.EDGES,s=e.getLinkedRecords(o);if(!s){e.setLinkedRecords([t],o);return}var a;if(r==null)a=s.concat(t);else{a=[];for(var l=!1,u=0;u<s.length;u++){var d=s[u];if(a.push(d),d!=null){var f=d.getValue(i);r===f&&(a.push(t),l=!0)}}l||a.push(t)}e.setLinkedRecords(a,o)}function B_e(e,t,r,n){var i=Iu.get(),o=i.NODE,s=Eh(t.getDataID(),r.getDataID()),a=e.get(s);return a||(a=e.create(s,n)),a.setLinkedRecord(r,o),a.getValue("cursor")==null&&a.setValue(null,"cursor"),a}function j_e(e,t,r){var n=Iu.get(),i=n.CURSOR,o=n.EDGES,s=e.getLinkedRecords(o);if(!s){e.setLinkedRecords([t],o);return}var a;if(r==null)a=[t].concat(s);else{a=[];for(var l=!1,u=0;u<s.length;u++){var d=s[u];if(d!=null){var f=d.getValue(i);r===f&&(a.push(t),l=!0)}a.push(d)}l||a.unshift(t)}e.setLinkedRecords(a,o)}function q_e(e,t){var r=Iu.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var s,a=0;a<o.length;a++){var l=o[a],u=l&&l.getLinkedRecord(i);u!=null&&u.getDataID()===t?s===void 0&&(s=o.slice(0,a)):s!==void 0&&s.push(l)}s!==void 0&&e.setLinkedRecords(s,n)}}function tx(e,t,r){if(r==null)return r;var n=Iu.get(),i=n.EDGES,o=t.getValue(ex);typeof o!="number"&&O_e(!1);var s=Eh(t.getDataID(),i,o),a=e.create(s,r.getType());return a.copyFieldsFrom(r),a.getValue("cursor")==null&&a.setValue(null,"cursor"),t.setValue(o+1,ex),a}function Zp(e,t,r){for(var n=Iu.get(),i=n.NODE,o=0;o<e.length;o++){var s=e[o];if(s){var a=s.getLinkedRecord(i),l=a&&a.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(s)}}}var fv={buildConnectionEdge:tx,createEdge:B_e,deleteNode:q_e,getConnection:L_e,getConnectionID:z_e,insertEdgeAfter:U_e,insertEdgeBefore:j_e,update:M_e},V_e=Ke.default,wh=V_e(Ir),Pu=fv,P8=Uw,Ic=Fe;var K_e={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)})}}},H_e={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),s=Array.isArray(o)?o:[o];s.forEach(function(a){if(typeof a=="string"){var l=(0,wh.default)(i),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=t.get(d);f!=null&&Pu.deleteNode(f,a)}}catch(h){l.e(h)}finally{l.f()}}})}}},W_e={update:O8(Pu.insertEdgeAfter)},G_e={update:O8(Pu.insertEdgeBefore)},J_e={update:M8(Pu.insertEdgeAfter)},Q_e={update:M8(Pu.insertEdgeBefore)};function O8(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 s,a;try{s=i.getLinkedRecord(r.fieldKey)}catch{}if(!s)try{a=i.getLinkedRecords(r.fieldKey)}catch{}if(!(s==null&&a==null)){var l=P8.get(),u=l.NODE,d=l.EDGES,f=(n=a)!==null&&n!==void 0?n:[s],h=(0,wh.default)(f),p;try{var g=function(){var x=p.value;if(x==null)return"continue";var E=x.getLinkedRecord("node");if(!E)return"continue";var S=E.getDataID(),C=(0,wh.default)(o),k;try{for(C.s();!(k=C.n()).done;){var N=k.value,T=t.get(N);if(T!=null){var $=(m=T.getLinkedRecords(d))===null||m===void 0?void 0:m.some(function(M){var I;return(M==null||(I=M.getLinkedRecord(u))===null||I===void 0?void 0:I.getDataID())===S});if(!$){var P=Pu.buildConnectionEdge(t,T,x);P==null&&Ic(!1),e(T,P)}}}}catch(M){C.e(M)}finally{C.f()}};for(h.s();!(p=h.n()).done;)var m,v=g()}catch(_){h.e(_)}finally{h.f()}}}}}function M8(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,s=o.connections,a=o.edgeTypeName;s==null&&Ic(!1),a==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=P8.get(),f=d.NODE,h=d.EDGES,p=(n=u)!==null&&n!==void 0?n:[l],g=(0,wh.default)(p),m;try{var v=function(){var S=m.value;if(S==null)return"continue";var C=S.getDataID(),k=(0,wh.default)(s),N;try{for(k.s();!(N=k.n()).done;){var T=N.value,$=t.get(T);if($!=null){var P=(_=$.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(!P){var M=Pu.createEdge(t,$,S,a);M==null&&Ic(!1),e($,M)}}}}catch(I){k.e(I)}finally{k.f()}};for(g.s();!(m=g.n()).done;)var _,x=v()}catch(E){g.e(E)}finally{g.f()}}}}}var Y_e={AppendEdgeHandler:W_e,DeleteRecordHandler:K_e,PrependEdgeHandler:G_e,AppendNodeHandler:J_e,PrependNodeHandler:Q_e,DeleteEdgeHandler:H_e},X_e=fv,Yu=Y_e,Z_e=Fe;function ebe(e){switch(e){case"connection":return X_e;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}Z_e(!1)}var tbe=ebe;function rbe(e){return!!(e&&e["@@RelayModernEnvironment"])}var Bw=rbe,nbe=Ke.default,jw=nbe(Ir),vc=fv;var ibe=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),obe=Object.freeze({APPEND:"append",PREPEND:"prepend"});function sbe(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(s){switch(s.type){case"NODE_DELETE":var a=abe(s,t);a&&(i.push(a),o.push(a));break;case"RANGE_ADD":var l=lbe(s,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var u=ube(s,t);u&&(i.push(u),o.push(u));break}}),{optimisticUpdater:function(a,l){i.forEach(function(u){u(a,l)})},updater:function(a,l){o.forEach(function(u){u(a,l)})}}}function abe(e,t){var r=e.deletedIDFieldName,n=qw(t);return n?function(i,o){var s=i.getRootField(n);if(s){var a=s.getValue(r),l=Array.isArray(a)?a:[a];l.forEach(function(u){u&&typeof u=="string"&&i.delete(u)})}}:null}function lbe(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=qw(t);return!n||!o?null:function(s,a){var l=s.get(r);if(l){var u=s.getRootField(o);if(u){var d=u.getLinkedRecord(i),f=(0,jw.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var g=vc.getConnection(l,p.key,p.filters);if(g){var m=vc.buildConnectionEdge(s,g,d);if(m)switch(p.rangeBehavior){case"append":vc.insertEdgeAfter(g,m);break;case"prepend":vc.insertEdgeBefore(g,m);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function ube(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var s=qw(t);return s?function(a,l){if(l){var u=[],d=l[s];if(d&&Array.isArray(o)){var f=(0,jw.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(g){f.e(g)}finally{f.f()}Array.isArray(d)?d.forEach(function(g){g&&g.id&&typeof g=="object"&&typeof g.id=="string"&&u.push(g.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(g){typeof g=="string"&&u.push(g)}));cbe(r,n,i,a,u)}}:null}function cbe(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var s=o,a=1;a<r.length-1;a++)s&&(s=s.getLinkedRecord(r[a]));if(!(!t||!s)){var l=(0,jw.default)(t),u;try{var d=function(){var h=u.value,p=vc.getConnection(s,h.key,h.filters);p&&i.forEach(function(g){vc.deleteNode(p,g)})};for(l.s();!(u=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function qw(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:ibe,RangeOperations:obe,convert:sbe},dbe=Xo,fbe=dbe.getRequest,hbe=Bw,pbe=kl,gbe=pbe.createOperationDescriptor,mbe=hv,vbe=Fe;function _be(e,t){hbe(e)||vbe(!1);var r=fbe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,s=t.variables,a=gbe(r,s);if(i){var l=mbe.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:a,response:o,updater:n})}var bbe=_be;function ybe(e,t){e.commitUpdate(t)}var xbe=ybe,Sbe=Ke.default;Sbe(Vt);var Ebe=Ke.default,kN=Ebe(Sl),wbe=Xo,kbe=wbe.getRequest,Cbe=Ds,Rbe=Cbe.generateUniqueClientID,Abe=Bw,Tbe=kl,Nbe=Tbe.createOperationDescriptor,$be=hv,Dbe=Fe;function Fbe(e,t){Abe(e)||Dbe(!1);var r=kbe(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,s=t.configs,a=t.cacheConfig,l=t.onError,u=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=Nbe(r,d,a,Rbe());if(typeof n=="function"&&(n=n()),s){var p=$be.convert(s,r,i,o);i=p.optimisticUpdater,o=p.updater}var g=[],m=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(_){var x;Array.isArray(_)?_.forEach(function(E){E.errors&&g.push.apply(g,(0,kN.default)(E.errors))}):_.errors&&g.push.apply(g,(0,kN.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,g.length!==0?g:null)}},error:l,unsubscribe:u});return{dispose:m.unsubscribe}}var Ibe=Fbe,Pbe=typeof WeakMap=="function",fb=Pbe?new WeakMap:new Map;function L8(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(!fb.has(i))fb.set(i,o),r[n]=o;else{var s=fb.get(i);r[n]=s}}),r}else return e}L8.tests_only_resetDebugCache=void 0;var Obe=L8,CN=wl;function Mbe(e){return function(r,n,i,o,s){var a=e(r,n,i,o,s);return a instanceof Error?CN.create(function(l){return l.error(a)}):CN.from(a)}}var Lbe={convertFetch:Mbe},zbe=Obe,Ube=Lbe,Bbe=Ube.convertFetch,hb=Fe;function jbe(e,t){var r=Bbe(e);function n(i,o,s,a,l){var u=zbe(o,i.providedVariables);if(i.operationKind==="subscription")return t||hb(!1),a&&hb(!1),t(i,u,s);var d=s.poll;return d!=null?(a&&hb(!1),r(i,u,{force:!0}).poll(d)):r(i,u,s,a,l)}return{execute:n}}var qbe={create:jbe},Vbe=Ke.default;Vbe(Vt);var Kbe=Fu;Kbe.stableCopy;var Hbe=Ke.default,Wbe=Hbe(Vt),Gbe=wl,Jbe=kl,Qbe=Jbe.createOperationDescriptor,Ybe=ip,Xbe=Ybe.handlePotentialSnapshotErrors,Zbe=dv,eye=Xo,tye=eye.getRequest,rye=Fe;function nye(e,t,r,n){var i,o=tye(t);o.params.operationKind!=="query"&&rye(!1);var s=(0,Wbe.default)({force:!0},n?.networkCacheConfig),a=Qbe(o,r,s),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function u(d){return Xbe(e,d.fieldErrors),d.data}switch(l){case"network-only":return RN(e,a).map(u);case"store-or-network":return e.check(a).status==="available"?Gbe.from(e.lookup(a.fragment)).map(u):RN(e,a).map(u);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function RN(e,t){return Zbe.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var iye=nye,oye=kl,sye=oye.createOperationDescriptor,aye=Xo,lye=aye.getRequest;function uye(e,t,r,n){var i=lye(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=sye(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var cye=uye,dye=(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(s){try{s(i)}catch(a){setTimeout(function(){throw a},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,s=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;s.add(i);var a=function(){s.delete(i)};return this._callbacks.set(n,s),{dispose:a}},t.clear=function(){this._preloadableQueries.clear()},e})(),fye=new dye,hye=fye,pye=dv,gye=pye.getPromiseForActiveRequest;function mye(e,t,r){var n,i,o=[],s=gye(e,r);if(s!=null)o=[r];else{var a,l,u=e.getOperationTracker(),d=u.getPendingOperationsAffectingOwner(r);o=(a=d?.pendingOperations)!==null&&a!==void 0?a:[],s=(l=d?.promise)!==null&&l!==void 0?l:null}if(!s)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(g){return g.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 s.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:s,pendingOperations:o}}var z8=mye;function vye(e,t){return e===t&&(e===null||typeof e!="object")}var U8=vye;function _ye(e,t){return rx(e,t,!0)}function rx(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 s=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,g){var m=i[g],v=rx(m,p,s);return v!==o[g]&&s&&(o[g]=v),h&&v===i[g]},!0)&&i.length===o.length}else if(!i&&!o){var a=e,l=t,u=Object.keys(a),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var g=a[p],m=rx(g,l[p],f);return m!==l[p]&&f&&(l[p]=m),h&&m===a[p]},!0)&&u.length===d.length}return n?e:t}var pv=_ye,B8=Ke.default,AN=B8(Vt),Vw=B8(ei),bye=z8,yye=ip,xye=yye.handlePotentialSnapshotErrors,Sye=U8,Eye=pv,j8=bo,wye=kl,kye=wye.createRequestDescriptor,Kw=Zo,Cye=Kw.areEqualSelectors,Rye=Kw.createReaderSelector,Aye=Kw.getSelectorsFromObject,Tye=ya,TN=Fe,Nye=(function(){function e(r,n,i,o,s){var a=this;(0,Vw.default)(this,"_onChange",function(){a._stale=!0,typeof a._callback=="function"&&a._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=s,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&q8(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 s=this._resolvers[o],a=n[o];if(s){var l=s.resolve();(i||l!==a)&&(i=i||(0,AN.default)({},n),i[o]=l)}else{var u=this._props[o],d=u!==void 0?u:null;(i||!Sye(d,a))&&(i=i||(0,AN.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,j8.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=Aye(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var s=i[o],a=this._resolvers[o];s==null?(a?.dispose(),a=null):s.kind==="PluralReaderSelector"?a==null?a=new NN(this._context.environment,this._rootIsQueryRenderer,s,this._callback!=null,this._onChange):(a instanceof NN||TN(!1),a.setSelector(s)):a==null?a=new nx(this._context.environment,this._rootIsQueryRenderer,s,this._callback!=null,this._onChange):(a instanceof nx||TN(!1),a.setSelector(s)),this._props[o]=n[o],this._resolvers[o]=a}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var s=this._resolvers[o];s&&s.setVariables(n,i)}this._stale=!0},e})(),nx=(function(){function e(r,n,i,o,s){var a=this;(0,Vw.default)(this,"_onChange",function(u){a._data=u.data,a._isMissingData=u.isMissingData,a._fieldErrors=u.fieldErrors,a._callback()});var l=r.lookup(i);this._callback=s,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,j8.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=bye(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,s=(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:s}),i}}return xye(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&Cye(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=Eye(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(!Tye(n,this._selector.variables)){var o=kye(i,n),s=Rye(this._selector.node,this._selector.dataID,n,o);this.setSelector(s)}},e})(),NN=(function(){function e(r,n,i,o,s){var a=this;(0,Vw.default)(this,"_onChange",function(l){a._stale=!0,a._callback()}),this._callback=s,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(q8)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var s=n[o],a=this._resolvers[o].resolve();(i||a!==s)&&(i=i||n.slice(0,o),i.push(a))}!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 s=0;s<i.length;s++)s<this._resolvers.length?this._resolvers[s].setSelector(i[s]):this._resolvers[s]=new nx(this._environment,this._rootIsQueryRenderer,i[s],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 q8(e){e&&e.dispose()}var $ye=Nye,Dye=$ye;function Fye(e,t,r,n,i,o){return new Dye(e,r,n,o,i)}var Iye=Fye,Pye=Fe,pb,$N;function Oye(e){return pb||(pb=e.createContext(null),$N=e),e!==$N&&Pye(!1),pb}var Mye=Oye,Lye=Fe,gb,DN;function zye(e){return gb||(gb=e.createContext(null),DN=e),e!==DN&&Lye(!1),gb}var Uye=zye,V8=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function Bye(){return V8}function jye(e){return e===V8}var gv={isSuspenseSentinel:jye,suspenseSentinel:Bye},K8={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})(K8);var kd=K8.exports,mv=Ke.default,qye=mv(ei),FN=mv(kd),IN=mv(jL),Ja=mv(Vt),Vye=R8,H8=Ds,W8=H8.generateClientObjectClientID;H8.isClientID;var Kye=gv,G8=Kye.isSuspenseSentinel,xa=lr,ix=xa.ACTOR_IDENTIFIER_KEY,An=xa.ERRORS_KEY,Hw=xa.ID_KEY,Hye=xa.INVALIDATED_AT_KEY,pl=xa.REF_KEY,Xc=xa.REFS_KEY,J8=xa.RELAY_RESOLVER_VALUE_KEY;xa.ROOT_ID;var Ww=xa.TYPENAME_KEY,mb=ya,_u=Fe;function Wye(e){return(0,Ja.default)({},e)}function Gye(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==Hw&&r!==Ww&&(t[r]=e[r])}function Jye(e,t){var r={};return r[Hw]=e,r[Ww]=t,r}function Qye(e){return e}function Yye(e){return e[Hw]}function Xye(e){return An in e?Object.keys(e).filter(function(t){return t!==An}):Object.keys(e)}function Zye(e){return e[Ww]}function e1e(e,t){var r;return(r=e[An])===null||r===void 0?void 0:r[t]}function Gw(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(pl)&&!r.hasOwnProperty(Xc)||_u(!1)),r}function t1e(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 n1e(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[pl]=="string"}function i1e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[Xc])||_u(!1),r[Xc])}function o1e(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[Xc])&&r[Xc].every(function(n){return typeof n=="string"})}function s1e(e){if(e==null)return null;var t=e[Hye];return typeof t!="number"?null:t}function a1e(e,t){var r,n=e[An],i=t[An],o=null;if(n==null&&i==null){var s;for(var a in t)(o||!mb(e[a],t[a]))&&(o=o!==null?o:(0,Ja.default)({},e),o[a]=t[a]);return(s=o)!==null&&s!==void 0?s: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(mb(f,u)&&mb(h,d))continue;o=(0,Ja.default)({},e),n!=null&&(o[An]=(0,Ja.default)({},n))}Y8(o,l,u),Q8(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function l1e(e,t){if(An in e||An in t){var r=e[An],n=(0,FN.default)(e,[An].map(IN.default)),i=t[An],o=(0,FN.default)(t,[An].map(IN.default)),s=(0,Ja.default)((0,Ja.default)({},n),o);if(r==null&&i==null)return s;var a={};for(var l in r)o.hasOwnProperty(l)||(a[l]=r[l]);for(var u in i)a[u]=i[u];for(var d in a){s[An]=a;break}return s}else return(0,Ja.default)((0,Ja.default)({},e),t)}function u1e(e){Vye(e)}function Q8(e,t,r){var n=e[An];if(r!=null&&r.length>0)n==null?e[An]=(0,qye.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 Y8(e,t,r){e[t]=r}function c1e(e,t,r){var n={};n[pl]=r,e[t]=n}function d1e(e,t,r){var n={};n[Xc]=r,e[t]=n}function f1e(e,t,r,n){var i={};i[pl]=n,i[ix]=r,e[t]=i}function h1e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[pl]=="string"&&r[ix]!=null||_u(!1),[r[ix],r[pl]])}function p1e(e,t){var r=Gw(e,J8);return r==null||G8(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&_u(!1),W8(t,r))}function g1e(e,t){var r=Gw(e,J8);return r==null||G8(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),W8(t,n))}))}function m1e(e){return e}var Vi={clone:Wye,copyFields:Gye,create:Jye,freeze:u1e,fromObject:Qye,getDataID:Yye,getErrors:e1e,getFields:Xye,getInvalidationEpoch:s1e,getLinkedRecordID:r1e,getLinkedRecordIDs:i1e,getType:Zye,getValue:Gw,hasValue:t1e,hasLinkedRecordID:n1e,hasLinkedRecordIDs:o1e,merge:l1e,setErrors:Q8,setValue:Y8,setLinkedRecordID:c1e,setLinkedRecordIDs:d1e,update:a1e,getActorLinkedRecordID:h1e,setActorLinkedRecordID:f1e,getResolverLinkedRecordID:p1e,getResolverLinkedRecordIDs:g1e,toJSON:m1e},v1e={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},vv=v1e,_1e=Ke.default,b1e=_1e(Ir),PN=Vi,Jw=vv,y1e=Jw.EXISTENT,x1e=Jw.NONEXISTENT,S1e=Jw.UNKNOWN,E1e=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],s=PN.fromObject(o);n._records.set(i,s)})}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?x1e:y1e:S1e},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,b1e.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=s[0],l=s[1];n[a]=PN.toJSON(l)}}catch(u){i.e(u)}finally{i.f()}return n},e})(),Ou=E1e,w1e=Fe,X8="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function k1e(e){e!==X8&&w1e(!1)}var Qw={assertInternalActorIdentifier:k1e,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:X8},ox="actor_key",C1e=Qw,R1e=C1e.getActorIdentifier;function A1e(e){if(e!=null&&typeof e=="object"&&typeof e[ox]=="string")return R1e(e[ox])}var T1e={ACTOR_IDENTIFIER_FIELD_NAME:ox,getActorIdentifierFromPayload:A1e},_v=Ke.default,ON=_v(Vt),N1e=_v(kd),Z8=_v(Ir),$1e=_v(Sl),D1e=["path","locations"],sx=Symbol("$SELF");function F1e(e){if(e==null)return null;var t=new Map,r=(0,Z8.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,s=i.locations,a=(0,N1e.default)(i,D1e);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 g=new Map;Array.isArray(p)&&g.set(sx,p),d.set(h,g),d=g}var m=o[u],v=d.get(m);v instanceof Map&&(d=v,v=d.get(m),m=sx),Array.isArray(v)?v.push(a):d.set(m,[a])}}}}catch(_){r.e(_)}finally{r.f()}return t}function I1e(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return e5(r,n),n}function e5(e,t){var r=(0,Z8.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],s=i[1],a=t.length;if(Array.isArray(s)?t.push.apply(t,(0,$1e.default)(s)):e5(s,t),o!==sx)for(var l=t.length,u=a;u<l;u++){var d=t[u];d.path==null?t[u]=(0,ON.default)((0,ON.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function P1e(e,t){var r=e.get(t);return r instanceof Map?r:null}var O1e={buildErrorTrie:F1e,getNestedErrorTrieByKey:P1e,getErrorsByKey:I1e},M1e="client:__type:",L1e="__TypeSchema";function z1e(e){return M1e+e}var bv={generateTypeID:z1e,TYPE_SCHEMA_TYPE:L1e},t5=Ke.default,U1e=t5(Ir),Jd=t5(Sl),r5=T1e;r5.ACTOR_IDENTIFIER_FIELD_NAME;var B1e=r5.getActorIdentifierFromPayload,MN=bo,n5=Ds,vb=n5.generateClientID,j1e=n5.isClientID,q1e=El,V1e=q1e.getLocalVariables,Yw=O1e,K1e=Yw.buildErrorTrie,H1e=Yw.getErrorsByKey,LN=Yw.getNestedErrorTrieByKey,gt=Vi,W1e=Zo,G1e=W1e.createNormalizationSelector,Mu=lr,J1e=Mu.ROOT_ID,Q1e=Mu.TYPENAME_KEY,zN=Mu.getArgumentValues,Y1e=Mu.getHandleStorageKey,X1e=Mu.getModuleComponentKey,Z1e=Mu.getModuleOperationKey,_b=Mu.getStorageKey,i5=bv,bb=i5.TYPE_SCHEMA_TYPE,yb=i5.generateTypeID,ii=Fe;function exe(e,t,r,n,i,o){var s=t.dataID,a=t.node,l=t.variables,u=new txe(e,l,n,o??!1);return u.normalizeResponse(a,s,r,i)}var txe=(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,Jd.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,s){var a=this._recordSource.get(i);return a||ii(!1),this._assignClientAbstractTypes(n),this._errorTrie=K1e(s),this._traverseSelections(n,a,o),{errors:s,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,s=Object.keys(i);o<s.length;o++){var a=s[o],l=(0,U1e.default)(i[a]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=yb(d),h=this._recordSource.get(f);h==null&&(h=gt.create(f,bb),this._recordSource.set(f,h)),gt.setValue(h,a,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||ii(!1),this._variables[n]},t._getRecordType=function(n){var i=n[Q1e];return i==null&&ii(!1),i},t._traverseSelections=function(n,i,o){for(var s=0;s<n.selections.length;s++){var a=n.selections[s];switch(a.kind){case"ScalarField":case"LinkedField":this._normalizeField(a,i,o);break;case"Condition":var l=!!this._getVariableValue(a.condition);l===a.passingValue&&this._traverseSelections(a,i,o);break;case"FragmentSpread":{var u=this._variables;this._variables=V1e(this._variables,a.fragment.argumentDefinitions,a.args),this._traverseSelections(a.fragment,i,o),this._variables=u;break}case"InlineFragment":{var d=a.abstractKey;if(d==null){var f=gt.getType(i);f===a.type&&this._traverseSelections(a,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=gt.getType(i),g=yb(p),m=this._recordSource.get(g);m==null&&(m=gt.create(g,bb),this._recordSource.set(g,m)),gt.setValue(m,d,h),h&&this._traverseSelections(a,i,o)}break}case"TypeDiscriminator":{var v=a.abstractKey,_=Object.prototype.hasOwnProperty.call(o,v),x=gt.getType(i),E=yb(x),S=this._recordSource.get(E);S==null&&(S=gt.create(E,bb),this._recordSource.set(E,S)),gt.setValue(S,v,_);break}case"LinkedHandle":case"ScalarHandle":var C=a.args?zN(a.args,this._variables):{},k=_b(a,this._variables),N=Y1e(a,this._variables);this._handleFieldPayloads.push({args:C,dataID:gt.getDataID(i),fieldKey:k,handle:a.handle,handleKey:N,handleArgs:a.handleArgs?zN(a.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(a,i,o);break;case"Defer":this._normalizeDefer(a,i,o);break;case"Stream":this._normalizeStream(a,i,o);break;case"ClientExtension":var T=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(a,i,o),this._isClientExtension=T;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(a.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(a,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(a,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(a.backingField,i,o);break;default:ii(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var s=n.if===null||this._getVariableValue(n.if);s===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,Jd.default)(this._path),selector:G1e(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 s=n.if===null||this._getVariableValue(n.if);s===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,Jd.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||ii(!1);var s=gt.getType(i),a=X1e(n.documentName),l=n.componentModuleProvider||o[a];gt.setValue(i,a,l??null);var u=Z1e(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,Jd.default)(this._path),typeName:s,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||ii(!1);var s=n.alias||n.name,a=_b(n,this._variables),l=o[s],u=MN.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,a,null),u?n.kind==="LinkedField"?gt.setLinkedRecordIDs(i,a,[]):gt.setValue(i,a,[]):gt.setValue(i,a,null);var f=this._errorTrie;if(f!=null){var h=H1e(f,s);h!=null&>.setErrors(i,a,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,a,l),gt.setValue(i,a,l);else if(n.kind==="LinkedField"){this._path.push(s);var p=this._errorTrie;this._errorTrie=p==null?null:LN(p,s),n.plural?this._normalizePluralLink(n,i,a,l):this._normalizeLink(n,i,a,l),this._errorTrie=p,this._path.pop()}else ii(!1)},t._normalizeActorChange=function(n,i,o){var s,a=n.linkedField;typeof o=="object"&&o||ii(!1);var l=a.alias||a.name,u=_b(a,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=B1e(d);if(h==null){gt.setValue(i,u,null);return}var p=(s=a.concreteType)!==null&&s!==void 0?s:this._getRecordType(d),g=this._getDataId(d,p)||gt.getLinkedRecordID(i,u)||vb(gt.getDataID(i),u);typeof g!="string"&&ii(!1),gt.setActorLinkedRecordID(i,u,h,g),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:g,path:[].concat((0,Jd.default)(this._path),[l]),typeName:p,variables:this._variables,node:a,actorIdentifier:h})},t._normalizeLink=function(n,i,o,s){var a;typeof s=="object"&&s||ii(!1);var l=this._getDataId(s,(a=n.concreteType)!==null&&a!==void 0?a:this._getRecordType(s))||gt.getLinkedRecordID(i,o)||vb(gt.getDataID(i),o);typeof l!="string"&&ii(!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,s);else{var d=n.concreteType||this._getRecordType(s);u=gt.create(l,d),this._recordSource.set(l,u)}this._traverseSelections(n,u,s)},t._normalizePluralLink=function(n,i,o,s){var a=this;Array.isArray(s)||ii(!1);var l=gt.getLinkedRecordIDs(i,o),u=[];s.forEach(function(d,f){var h;if(d==null){u.push(d);return}a._path.push(String(f));var p=a._errorTrie;a._errorTrie=p==null?null:LN(p,f),typeof d!="object"&&ii(!1);var g=a._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:a._getRecordType(d))||l&&l[f]||vb(gt.getDataID(i),o,f);typeof g!="string"&&ii(!1),u.push(g);var m=a._recordSource.get(g);if(m)a._validateRecordType(m,n,d);else{var v=n.concreteType||a._getRecordType(d);m=gt.create(g,v),a._recordSource.set(g,m)}l&&a._validateConflictingLinkedFieldsWithIdenticalId(l[f],g,o),a._traverseSelections(n,m,d),a._errorTrie=p,a._path.pop()}),gt.setLinkedRecordIDs(i,o,u)},t._validateRecordType=function(n,i,o){if(MN.ENABLE_STORE_ID_COLLISION_LOGGING){var s,a=(s=i.concreteType)!==null&&s!==void 0?s:this._getRecordType(o),l=gt.getDataID(n),u=j1e(l)&&l!==J1e||gt.getType(n)===a;if(!u){var d={name:"idCollision.typename",previous_typename:gt.getType(n),new_typename:a};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),o5={normalize:exe},yv=Ke.default,UN=yv(Vt),rxe=yv(Vi),nxe=yv(Ou),ixe=yv(o5);function oxe(e,t,r,n,i){var o,s=e.data,a=e.errors,l=nxe.default.create(),u=rxe.default.create(t.dataID,r);l.set(t.dataID,u);var d=ixe.default.normalize(l,t,s,n,a,i);return(0,UN.default)((0,UN.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var sxe=oxe,axe=Xo,lxe=axe.getInlineDataFragment,uxe=lr,cxe=uxe.FRAGMENTS_KEY,BN=Fe;function dxe(e,t){var r,n=lxe(e);if(t==null)return t;typeof t!="object"&&BN(!1);var i=(r=t[cxe])===null||r===void 0?void 0:r[n.name];return i==null&&BN(!1),i}var fxe=dxe,hxe=1e5;function pxe(){return hxe++}var s5=pxe,gxe=s5;function mxe(e,t){return{execute:function(n,i,o,s,a,l,u,d){var f=gxe(),h={start:function(m){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(m){e.__log({name:"network.next",networkRequestId:f,response:m})},error:function(m){e.__log({name:"network.error",networkRequestId:f,error:m})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(m){e.__log({name:"network.info",networkRequestId:f,info:m})};return t.execute(n,i,o,s,p,l,u,d).do(h)}}}var vxe=mxe,_xe=Ke.default,Qd=_xe(Ir),bxe=Fe,yxe=(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,s=new Set,a=(0,Qd.default)(i),l;try{for(a.s();!(l=a.n()).done;){var u=l.value,d=u.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),s.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),s.add(d))}}catch(v){a.e(v)}finally{a.f()}if(s.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,Qd.default)(s),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;this._resolveOwnerResolvers(m),h.add(m)}}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 s=new Set,a=new Set,l=(0,Qd.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?a.add(d):s.add(d))}}catch(x){l.e(x)}finally{l.f()}var h=(0,Qd.default)(s),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;this._resolveOwnerResolvers(g),this._ownersToPendingOperations.delete(g)}}catch(x){h.e(x)}finally{h.f()}var m=(0,Qd.default)(a),v;try{for(m.s();!(v=m.n()).done;){var _=v.value;this._resolveOwnerResolvers(_)}}catch(x){m.e(x)}finally{m.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 s=this._ownersToPendingPromise.get(i);if(s!=null)return{promise:s.promise,pendingOperations:s.pendingOperations};var a,l=new Promise(function(d){a=d});a==null&&bxe(!1);var u=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:a,pendingOperations:u}),{promise:l,pendingOperations:u}},e})(),xxe=yxe;function Sxe(e){var t=typeof eg<"u"?eg:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var Exe=Sxe,wxe=Ds,kxe=wxe.generateClientID,Cxe=lr,Rxe=Cxe.ROOT_ID,Axe=kxe(Rxe,"viewer"),Txe="Viewer",Xw={VIEWER_ID:Axe,VIEWER_TYPE:Txe},a5=Xw,Nxe=a5.VIEWER_ID,$xe=a5.VIEWER_TYPE;function Dxe(e,t){return t===$xe&&e.id==null?Nxe:e.id}var l5=Dxe,Fxe=function(t){},Ixe=Fxe,u5=Du,Pxe=u5.REQUEST,Oxe=u5.SPLIT_OPERATION;function Mxe(e){switch(e.kind){case Pxe:return e.operation;case Oxe:default:return e}}var Zw=Mxe;function jN(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 s=0,a=r.replace(/%s/g,function(){return String(i[s++])}),l=new Error(a),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 Lxe={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 jN.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 jN.apply(void 0,["warn",t,r].concat(i))}},xb,Sb,zxe=typeof window<"u"&&typeof((xb=window)===null||xb===void 0||(Sb=xb.performance)===null||Sb===void 0?void 0:Sb.now)=="function";function qN(){return zxe?window.performance.now():Date.now()}function Uxe(e){var t=qN(),r=e();return[t,qN()-t,r]}var Bxe=Uxe,c5=Ke.default,Yd=c5(Ir),Xd=c5(Sl),Eb=wl,jxe=s5,wb=Zw,qxe=Lxe,e0=bo,Vxe=Fu,Kxe=Vxe.stableCopy,Hxe=Bxe,d5=Ds,VN=d5.generateClientID,Wxe=d5.generateUniqueClientID,Gxe=El,Jxe=Gxe.getLocalVariables,t0=Vi,f5=Zo,kb=f5.createNormalizationSelector,Qxe=f5.createReaderSelector,r0=Ou,e2=lr,KN=e2.ROOT_TYPE,Yxe=e2.TYPENAME_KEY,Xxe=e2.getStorageKey,Mr=Fe;function Zxe(e){return new eSe(e)}var eSe=(function(){function e(r){var n=this,i,o,s,a=r.actorIdentifier,l=r.getDataID,u=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,g=r.operationLoader,m=r.operationTracker,v=r.optimisticConfig,_=r.scheduler,x=r.shouldProcessClientComponents,E=r.sink,S=r.source,C=r.treatMissingFieldsAsNull,k=r.updater,N=r.log,T=r.normalizeResponse;this._actorIdentifier=a,this._getDataID=l,this._treatMissingFieldsAsNull=C,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=N,this._executeId=jxe(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=g,this._operationTracker=m,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:((s=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=u,this._scheduler=_,this._sink=E,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=T;var $=this._nextSubscriptionId++;e0.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),S.subscribe({complete:function(){return n._complete($)},error:function(M){return n._error(M)},next:function(M){try{n._next($,M)}catch(I){E.error(I)}},start:function(M){var I;n._start($,M),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,Mr(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,s=this._scheduler;if(s!=null){var a=this._nextSubscriptionId++;Eb.create(function(l){var u=s.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return s.cancel(u)}}).subscribe({complete:function(){return o._complete(a)},error:function(u){return o._error(u)},start:function(u){return o._start(a,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,s=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})},s)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(s){if(!(s.data===null&&s.extensions!=null&&!s.hasOwnProperty("errors")))if(s.data==null){var a=s.hasOwnProperty("errors")&&s.errors!=null?s.errors:null,l=a?a.map(function(f){var h=f.message;return h}).join(`
|
|
68
|
+
`):"(No errors)",u=qxe.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:a,operation:i._operation.request.node,variables:i._operation.request.variables},u.stack,u}else{var d=s;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(a){var l;return((l=a.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&Mr(!1),!1;var o=n[0],s=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return s&&this._state!=="started"&&Mr(!1),s?(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 s=i.some(function(T){var $;return(($=T.extensions)===null||$===void 0?void 0:$.is_final)===!0});s&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var a=this._handleOptimisticResponses(o);if(!a){var l=tSe(o),u=l[0],d=l[1],f=l[2],h=u.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var g=Wxe();this._operation={request:this._operation.request,fragment:Qxe(this._operation.fragment.node,g,this._operation.fragment.variables,this._operation.fragment.owner),root:kb(this._operation.root.node,g,this._operation.root.variables)}}var m=this._processResponses(u);this._processPayloadFollowups(m)}if(p)for(var v=[],_=0;_<f.length;_++){var x,E=f[_],S=new r0(E.data),s=((x=E.extensions)===null||x===void 0?void 0:x.is_final)===!0,C={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:s,source:S};this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,this._updater),v.push(C),this._execTimeResolverResponseComplete=s,s&&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 N=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(N),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var s=this;if(this._optimisticUpdates!==null&&Mr(!1),!(n==null&&i==null)){var a=[];if(n){var l=this._normalizeResponse(n,this._operation.root,KN,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);HN(l),a.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,a)}else i&&a.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:r0.create(),isFinal:!1},updater:i});this._optimisticUpdates=a,a.forEach(function(d){return s._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,s=(0,Yd.default)(o),a;try{for(s.s();!(a=s.n()).done;){var l=a.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,Xd.default)(f))}break;case"ActorPayload":break;default:Mr(!1)}}}catch(h){s.e(h)}finally{s.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=Jxe(n.variables,i.argumentDefinitions,n.args):o=n.variables;var s=kb(i,n.dataID,o),a={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(a,s,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=wb(n),s=[],a=this._normalizeFollowupPayload(i,o);return HN(a),s.push({operation:this._operation,payload:a,updater:null}),this._processOptimisticFollowups(a,s),s},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var s=i._processOptimisticModuleImport(o,n);if(s.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var a;(a=i._optimisticUpdates).push.apply(a,(0,Xd.default)(s)),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 s=i._normalizeResponse(o,i._operation.root,KN,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,s,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),s})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var s=o.incrementalPlaceholders,a=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),a&&a.length!==0&&a.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}),s&&s.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",s.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=[];s.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(),s=o.get(n.operationReference);if(s!=null)this._processFollowupPayloadWithNormalizationNode(n,wb(s));else{var a=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},u=Eb.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));Eb.create(function(d){var f,h=u.subscribe({next:function(g){if(g!=null){var m=function(){try{var x=wb(g),E=e0.BATCH_ASYNC_MODULE_UPDATES_FN,S=E!=null&&i._pendingModulePayloadsCount>1,C=Hxe(function(){if(i._handleFollowupPayload(n,x),S)i._scheduleAsyncStoreUpdate(E,d.complete);else{var T=i._runPublishQueue();i._updateOperationTracker(T)}}),k=C[0],N=C[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:x.name,duration:N}),S||d.complete()}catch(T){d.error(T)}},v=i._scheduler;v==null?m():f=v.schedule(m)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(a),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(a,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:Mr(!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,s=i.label,a=i.path,l=a.map(String).join("."),u=this._incrementalResults.get(s);u==null&&(u=new Map,this._incrementalResults.set(s,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:Mr(!1);var p=n.source.get(h),g=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(C){var k=VN(C.dataID,C.fieldKey);return C.dataID===h||k===h});p==null&&Mr(!1);var m,v,_=this._source.get(h);if(_!=null){m=t0.update(_.record,p);var x=new Map,E=function(k){var N=rSe(k);x.set(N,k)};_.fieldPayloads.forEach(E),g.forEach(E),v=Array.from(x.values())}else m=p,v=g;if(this._source.set(h,{record:m,fieldPayloads:v}),f!=null){var S=this._processIncrementalResponses(f);this._processPayloadFollowups(S)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(s){var a=s.label,l=s.path,u=s.response,d=i._incrementalResults.get(a);if(d==null&&(d=new Map,i._incrementalResults.set(a,d)),a.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[s]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(s);return}var p=h.placeholder;p.kind!=="defer"&&Mr(!1),o.push(i._processDeferResponse(a,l,p,u))}else{var g=l.slice(0,-2).map(String).join("."),m=d.get(g);if(m==null){m={kind:"response",responses:[s]},d.set(g,m);return}else if(m.kind==="response"){m.responses.push(s);return}var v=m.placeholder;v.kind!=="stream"&&Mr(!1),o.push(i._processStreamResponse(a,l,v,u))}}),o},t._processDeferResponse=function(n,i,o,s){var a,l=o.selector.dataID,u=this._actorIdentifier;this._actorIdentifier=(a=o.actorIdentifier)!==null&&a!==void 0?a:this._actorIdentifier;var d=this._normalizeResponse(s,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&&Mr(!1);var h=f.fieldPayloads;if(h.length!==0){var p,g={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:r0.create(),isFinal:((p=s.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,g)}return this._actorIdentifier=u,d},t._processStreamResponse=function(n,i,o,s){var a=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||Mr(!1);var p=this._normalizeStreamItem(s,a,h,u,i,o.path),g=p.fieldPayloads,m=p.itemID,v=p.itemIndex,_=p.prevIDs,x=p.relayPayload,E=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,x,function(C){var k=C.get(a);if(k!=null){var N=k.getLinkedRecords(E);if(N!=null&&!(N.length!==_.length||N.some(function($,P){return _[P]!==($&&$.getDataID())}))){var T=(0,Xd.default)(N);T[v]=C.get(m),k.setLinkedRecords(T,E)}}}),g.length!==0){var S={errors:null,fieldPayloads:g,incrementalPlaceholders:null,followupPayloads:null,source:r0.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,S)}return this._actorIdentifier=f,x},t._normalizeStreamItem=function(n,i,o,s,a,l){var u,d,f,h,p=n.data;typeof p!="object"&&Mr(!1);var g=(u=o.alias)!==null&&u!==void 0?u:o.name,m=Xxe(o,s),v=this._source.get(i);v==null&&Mr(!1);var _=v.record,x=v.fieldPayloads,E=t0.getLinkedRecordIDs(_,m);E==null&&Mr(!1);var S=a[a.length-1],C=parseInt(S,10);C===S&&C>=0||Mr(!1);var k=(d=o.concreteType)!==null&&d!==void 0?d:p[Yxe];typeof k!="string"&&Mr(!1);var N=(f=(h=this._getDataID(p,k))!==null&&h!==void 0?h:E?.[C])!==null&&f!==void 0?f:VN(i,m,C);typeof N!="string"&&Mr(!1);var T=kb(o,N,s),$=t0.clone(_),P=(0,Xd.default)(E);P[C]=N,t0.setLinkedRecordIDs($,m,P),this._source.set(i,{record:$,fieldPayloads:x});var M=this._normalizeResponse(n,T,k,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,Xd.default)(l),[g,String(C)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:x,itemID:N,itemIndex:C,prevIDs:E,relayPayload:M,storageKey:m}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var s=o._runPublishQueue();o._updateOperationTracker(s);var a=(0,Yd.default)(o._completeFns),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;u()}}catch(d){a.e(d)}finally{a.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,Yd.default)(this._getActorsToVisit()),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,l=this._getPublishQueue(a).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,Yd.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(s){n.e(s)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,Yd.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(s){n.e(s)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Mr(!1),n},e})();function tSe(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var s=i.label,a=i.path;(s==null||a==null)&&Mr(!1),r.push({label:s,path:a,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(Kxe(e)))!==null&&t!==void 0?t:""}function HN(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Mr(!1)}var nSe={execute:Zxe},iSe=Promise.resolve();function oSe(e){iSe.then(e).catch(sSe)}function sSe(e){setTimeout(function(){throw e},0)}var aSe=oSe,nn=Vi,lSe=vv,WN=lSe.EXISTENT,Cb=Fe,uSe=(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 s=nn.clone(i);return s}else{if(o===null)return null;if(i!=null){var a=nn.update(i,o);return a}else{var l=nn.clone(o);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var o=this._base.get(n);o||Cb(!1),i=nn.create(n,nn.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),s=this._base.get(n);o||s||Cb(!1);var a=this._getSinkRecord(i);s&&nn.copyFields(s,a),o&&nn.copyFields(o,a)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);nn.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==WN&&this._sink.getStatus(n)!==WN||Cb(!1);var o=nn.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 nn.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getValue(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setValue=function(n,i,o){var s=this._getSinkRecord(n);nn.setValue(s,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getErrors(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setErrors=function(n,i,o){var s=this._getSinkRecord(n);nn.setErrors(s,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getLinkedRecordID(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setLinkedRecordID=function(n,i,o){var s=this._getSinkRecord(n);nn.setLinkedRecordID(s,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var s=this.__sources[o].get(n);if(s){var a=nn.getLinkedRecordIDs(s,i);if(a!==void 0)return a}else if(s===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var s=this._getSinkRecord(n);nn.setLinkedRecordIDs(s,i,o)},e})(),h5=uSe,cSe=Ke.default,xv=cSe(Ir),dSe=lr,Zc=dSe.getArgumentValues,fSe=["id","__id","__typename","js"];function hSe(e,t,r,n,i){var o={};return kh(o,e,t,r,n,i),o}function kh(e,t,r,n,i,o){var s,a=(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:mSe(p,r,t,i,o),set:pSe(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:vSe(p,r,t,i,o),set:gSe(p,r,t,i)});break;case"ScalarField":var g=(s=p.alias)!==null&&s!==void 0?s:p.name;Object.defineProperty(e,g,{get:function(){var v,_=Zc((v=p.args)!==null&&v!==void 0?v:[],r),x=t.getValue(p.name,_);return x==null&&(x=ySe(p,_,t,i,o)),x},set:fSe.includes(p.name)?void 0:function(m){var v,_=Zc((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(m,p.name,_)}});break;case"InlineFragment":t.getType()===p.type&&kh(e,t,r,p.selections,i,o);break;case"ClientExtension":kh(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(a.s();!(l=a.n()).done;){var d,f;u()}}catch(h){a.e(h)}finally{a.f()}}function pSe(e,t,r,n){return function(o){var s,a=Zc((s=e.args)!==null&&s!==void 0?s:[],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,a)}}function gSe(e,t,r,n){return function(o){var s,a=Zc((s=e.args)!==null&&s!==void 0?s:[],t);if(o==null)r.setValue(o,e.name,a);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,a)}}}function mSe(e,t,r,n,i){return function(){var o,s=Zc((o=e.args)!==null&&o!==void 0?o:[],t),a=r.getLinkedRecords(e.name,s);return a===void 0&&(a=bSe(e,s,r,n,i)),a!=null?a.map(function(l){if(l!=null){var u={};return kh(u,l,t,e.selections,n,i),u}else return l}):a}}function vSe(e,t,r,n,i){return function(){var o,s=Zc((o=e.args)!==null&&o!==void 0?o:[],t),a=r.getLinkedRecord(e.name,s);if(a===void 0&&(a=_Se(e,s,r,n,i)),a!=null){var l={};return kh(l,a,t,e.selections,n,i),l}else return a}}function _Se(e,t,r,n,i){var o=(0,xv.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.kind==="linked"){var l=a.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(u){o.e(u)}finally{o.f()}}function bSe(e,t,r,n,i){var o=(0,xv.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.kind==="pluralLinked"){var l=a.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 ySe(e,t,r,n,i){var o=(0,xv.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;if(a.kind==="scalar"){var l=a.handle(e,r,t,n);if(l!==void 0)return l}}}catch(u){o.e(u)}finally{o.f()}}var p5={createUpdatableProxy:hSe},xSe=Xo,SSe=xSe.getFragment,ESe=Zo,wSe=ESe.getVariablesFromFragment,kSe=lr,CSe=kSe.ID_KEY,RSe=p5,ASe=RSe.createUpdatableProxy,TSe=Fe;function NSe(e,t,r,n){var i=SSe(e),o=wSe(i,t),s=t[CSe],a=r.get(s);return a==null&&TSe(!1),{updatableData:ASe(a,o,i.selections,r,n)}}var g5={readUpdatableFragment:NSe},$Se=Xo,DSe=$Se.getUpdatableQuery,FSe=p5,ISe=FSe.createUpdatableProxy;function PSe(e,t,r,n){var i=DSe(e);return{updatableData:ISe(r.getRoot(),t,i.fragment.selections,r,n)}}var m5={readUpdatableQuery:PSe},OSe=Ds,MSe=OSe.generateClientID,LSe=lr,$a=LSe.getStableStorageKey,n0=Fe,zSe=(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=$a(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,s){return v5(n)||n0(!1),this.setValue__UNSAFE(n,i,o,s)},t.getErrors=function(n,i){var o=$a(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,s){var a=$a(i,o);return this._mutator.setValue(this._dataID,a,n),s!=null&&(s.length===0?this._mutator.setErrors(this._dataID,a):this._mutator.setErrors(this._dataID,a,s)),this},t.getLinkedRecord=function(n,i){var o=$a(n,i),s=this._mutator.getLinkedRecordID(this._dataID,o);return s!=null?this._source.get(s):s},t.setLinkedRecord=function(n,i,o){n instanceof e||n0(!1);var s=$a(i,o),a=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,s,a),this},t.getOrCreateLinkedRecord=function(n,i,o){var s=this.getLinkedRecord(n,o);if(!s){var a,l=$a(n,o),u=MSe(this.getDataID(),l);s=(a=this._source.get(u))!==null&&a!==void 0?a:this._source.create(u,i),this.setLinkedRecord(s,n,o)}return s},t.getLinkedRecords=function(n,i){var o=this,s=$a(n,i),a=this._mutator.getLinkedRecordIDs(this._dataID,s);return a==null?a:a.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||n0(!1);var s=$a(i,o),a=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,s,a),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function v5(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(v5)}var USe=zSe,BSe=Vi,_5=vv,Rb=_5.EXISTENT,GN=_5.NONEXISTENT,b5=lr,Ab=b5.ROOT_ID,JN=b5.ROOT_TYPE,jSe=g5,qSe=jSe.readUpdatableFragment,VSe=m5,KSe=VSe.readUpdatableQuery,HSe=USe,i0=Fe,WSe=(function(){function e(r,n,i,o,s){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=s??function(a){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,s=n.getRecordIDs();s.forEach(function(a){var l=n.getStatus(a);if(l===Rb){var u=n.get(a);u&&(o.__mutator.getStatus(a)!==Rb&&o.create(a,BSe.getType(u)),o.__mutator.copyFieldsFromRecord(u,a))}else l===GN&&o.delete(a)}),i&&i.length&&i.forEach(function(a){var l=o._handlerProvider&&o._handlerProvider(a.handle);l||i0(!1),l.update(o,a)})},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===Ab&&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===Rb?this._proxies[n]=new HSe(this,this.__mutator,n):this._proxies[n]=i===GN?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(Ab);return n||(n=this.create(Ab,JN)),n&&n.getType()===JN||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 KSe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return qSe(n,i,this,this._missingFieldHandlers)},e})(),y5=WSe,GSe=Du,QN=GSe.LINKED_FIELD,JSe=lr,QSe=JSe.getHandleStorageKey,YSe=ya,XSe=Fe;function ZSe(e,t,r){var n=t.find(function(o){return o.kind===QN&&o.name===e.name&&o.alias===e.alias&&YSe(o.args,e.args)});n&&n.kind===QN||XSe(!1);var i=QSe(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var x5=ZSe,eEe=Du,YN=eEe.SCALAR_FIELD,tEe=lr,rEe=tEe.getHandleStorageKey,nEe=ya,iEe=Fe;function oEe(e,t,r){var n=t.find(function(o){return o.kind===YN&&o.name===e.name&&o.alias===e.alias&&nEe(o.args,e.args)});n&&n.kind===YN||iEe(!1);var i=rEe(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var sEe=oEe,aEe=Ke.default,o0=aEe(Ir),lEe=h5,uEe=y5,cEe=Zw,dEe=Ds,fEe=dEe.isClientID,hEe=x5,pEe=sEe,gEe=El,XN=gEe.getLocalVariables,ZN=Vi,S5=vv,Tb=S5.EXISTENT,mEe=S5.UNKNOWN,t2=lr,E5=bv,vEe=E5.TYPE_SCHEMA_TYPE,Nb=E5.generateTypeID,Zd=Fe,_Ee=t2.getModuleOperationKey,s0=t2.getStorageKey,$b=t2.getArgumentValues;function bEe(e,t,r,n,i,o,s,a,l,u){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new yEe(e,t,r,h,i,o,s,a,l,u),g=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),g}var yEe=(function(){function e(r,n,i,o,s,a,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],g=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=s,this._mutator=p,this._operationLoader=a??null,this._recordSourceProxy=g,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),s=new lEe(this._getSourceForActor(n),o),a=new uEe(s,this._getDataID,void 0,this._handlers,this._log);i=[s,a],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)||Zd(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&fEe(i))){var o=n.args!=null?$b(n.args,this._variables):{},s=(0,o0.default)(this._handlers),a;try{for(s.s();!(a=s.n()).done;){var l=a.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){s.e(d)}finally{s.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?$b(n.args,this._variables):{},s=(0,o0.default)(this._handlers),a;try{for(s.s();!(a=s.n()).done;){var l=a.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){s.e(d)}finally{s.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,s=n.args!=null?$b(n.args,this._variables):{},a=(0,o0.default)(this._handlers),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;if(u.kind==="pluralLinked"){var d=u.handle(n,this._recordSourceProxy.get(i),s,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){a.e(h)}finally{a.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===mEe&&this._handleMissing(),o===Tb){var s=this._source.get(i),a=ZN.getInvalidationEpoch(s);a!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,a):a),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(s){switch(s.kind){case"ScalarField":o._checkScalar(s,i);break;case"LinkedField":s.plural?o._checkPluralLink(s,i):o._checkLink(s,i);break;case"ActorChange":o._checkActorChange(s.linkedField,i);break;case"Condition":var a=!!o._getVariableValue(s.condition);a===s.passingValue&&o._traverseSelections(s.selections,i);break;case"InlineFragment":{var l=s.abstractKey;if(l==null){var u=o._mutator.getType(i);u===s.type&&o._traverseSelections(s.selections,i)}else{var d=o._mutator.getType(i);d==null&&Zd(!1);var f=Nb(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(s.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=hEe(s,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var g=pEe(s,n,o._variables);o._checkScalar(g,i);break}case"ModuleImport":o._checkModuleImport(s,i);break;case"Defer":case"Stream":o._traverseSelections(s.selections,i);break;case"FragmentSpread":var m=o._variables;o._variables=XN(o._variables,s.fragment.argumentDefinitions,s.args),o._traverseSelections(s.fragment.selections,i),o._variables=m;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(s.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var _=s.abstractKey,x=o._mutator.getType(i);x==null&&Zd(!1);var E=Nb(x),S=o._mutator.getValue(E,_);S==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(s.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(s,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(s.backingField,i);break;default:Zd(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&Zd(!1);var s=_Ee(n.documentName),a=this._mutator.getValue(i,s);if(a==null){a===void 0&&this._handleMissing();return}var l=o.get(a);if(l!=null){var u=cEe(l),d=this._variables;this._variables=XN(this._variables,u.argumentDefinitions,n.args),this._traverse(u,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=s0(n,this._variables),s=this._mutator.getValue(i,o);s===void 0&&(s=this._handleMissingScalarField(n,i),s!==void 0&&this._mutator.setValue(i,o,s))},t._checkLink=function(n,i){var o=s0(n,this._variables),s=this._mutator.getLinkedRecordID(i,o);s===void 0&&(s=this._handleMissingLinkField(n,i),s!=null?this._mutator.setLinkedRecordID(i,o,s):s===null&&this._mutator.setValue(i,o,null)),s!=null&&this._traverse(n,s)},t._checkPluralLink=function(n,i){var o=this,s=s0(n,this._variables),a=this._mutator.getLinkedRecordIDs(i,s);a===void 0&&(a=this._handleMissingPluralLinkField(n,i),a!=null?this._mutator.setLinkedRecordIDs(i,s,a):a===null&&this._mutator.setValue(i,s,null)),a&&a.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=s0(n,this._variables),s=this._source.get(i),a=s!=null?ZN.getActorLinkedRecordID(s,o):s;if(a==null)a===void 0&&this._handleMissing();else{var l=a[0],u=a[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),g=p[0],m=p[1];this._source=this._getSourceForActor(l),this._mutator=g,this._recordSourceProxy=m,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,s=Object.keys(i);o<s.length;o++){var a=s[o],l=(0,o0.default)(i[a]),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,vEe),this._mutator.getValue(f,a)==null&&this._mutator.setValue(f,a,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),xEe={check:bEe},SEe=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},EEe=Vi,wEe=lr,kEe=wEe.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,CEe=Fe;function REe(e){var t=EEe.getValue(e,kEe);return t==null?null:(t instanceof Set||CEe(!1),t)}var w5=REe;function AEe(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var TEe=AEe,NEe=Ke.default,us=NEe(Ir),$Ee=pv,DEe=Du,e$=DEe.RELAY_LIVE_RESOLVER,FEe=bo,t$=SEe,k5=Ds,a0=k5.generateClientID,Db=k5.generateClientObjectClientID,et=Vi,IEe=Zo,PEe=IEe.createNormalizationSelector,l0=Ou,OEe=o5,MEe=OEe.normalize,Lu=lr,Fb=Lu.RELAY_RESOLVER_ERROR_KEY,ax=Lu.RELAY_RESOLVER_INVALIDATION_KEY,LEe=Lu.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,Ib=Lu.RELAY_RESOLVER_SNAPSHOT_KEY,Pb=Lu.RELAY_RESOLVER_VALUE_KEY,zEe=Lu.getReadTimeResolverStorageKey,UEe=Lu.getStorageKey,BEe=w5,jEe=TEe,qEe=gv,r$=qEe.isSuspenseSentinel,as=Fe,r2="__resolverLiveStateSubscription",u0="__resolverLiveStateValue",c0="__resolverLiveStateDirty",C5="__RELAY_RESOLVER__",VEe="__relay_model_instance";function Ob(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var KEe=(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,s,a){var l=this._getRecordSource(),u=$f(l,n),d=zEe(i,o),f=et.getLinkedRecordID(u,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,a)){var g;h!=null&&A5(h),f=(g=f)!==null&&g!==void 0?g:a0(n,d),h=et.create(f,C5);var m=s();if(et.setValue(h,Ib,m.snapshot),et.setValue(h,Fb,m.error),i.kind===e$){if(m.resolverResult!=null){m.error!=null&&as(!1);var v=m.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,m.resolverResult,i,o);l.set(f,h);var _=$f(l,n),x=et.clone(_);if(et.setLinkedRecordID(x,d,f),l.set(n,x),i.fragment!=null){var E,S=UEe(i.fragment,o),C=a0(n,S);Ob(this._resolverIDToRecordIDs,C,f),Ob(this._recordIDToResolverIDs,n,C);var k=(E=m.snapshot)===null||E===void 0?void 0:E.seenRecords;if(k!=null){var N=(0,us.default)(k),T;try{for(N.s();!(T=N.n()).done;){var $=T.value;Ob(this._recordIDToResolverIDs,$,C)}}catch(Y){N.e(Y)}finally{N.f()}}}}else if(i.kind===e$&&et.getValue(h,c0)){var P;f=(P=f)!==null&&P!==void 0?P:a0(n,d),h=et.clone(h);var M=et.getValue(h,u0);jEe(M)||as(!1),p=this._setLiveResolverValue(h,M,i,o),et.setValue(h,c0,!1),l.set(f,h)}var I=this._getResolverValue(h),U=et.getValue(h,Ib),B=et.getValue(h,Fb),q=null;if(r$(I)){var J;q=(J=f)!==null&&J!==void 0?J:a0(n,d)}return[I,f,B,U,q,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&as(!1);var s=et.getValue(o,u0);return new Promise(function(a){var l=s.subscribe(function(){l(),a()})})},t._setLiveStateValue=function(n,i,o,s,a){var l=this._makeLiveStateHandler(i),u=o.subscribe(l);et.setValue(n,u0,o);var d=this._setLiveResolverValue(n,o,s,a);return et.setValue(n,c0,!1),et.setValue(n,r2,u),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),s=o.get(n);if(s&&et.hasValue(s,u0)){var a=et.clone(s);et.setValue(a,c0,!0),i._setLiveResolverUpdate(n,a)}}},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&&as(!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,s){var a=null,l=null;try{a=i.read()}catch(u){l=u}return et.setValue(n,Fb,l),this._setResolverValue(n,a,o,s)},t._setResolverValue=function(n,i,o,s){var a=o.normalizationInfo,l=null;if(i!=null&&a!=null&&!r$(i)){var u,d=BEe(n),f=new Set,h=this._getRecordSource();if(a.plural){Array.isArray(i)||as(!1),u=[];for(var p=l0.create(),g=0;g<i.length;g++){var m=i[g];if(m!=null){typeof m!="object"&&as(!1);var v=i$(a,m),_=Db(v,et.getDataID(n),g),x=this._normalizeOutputTypeValue(_,m,s,a,[o.path,String(g)],v),E=(0,us.default)(x.getRecordIDs()),S;try{for(E.s();!(S=E.n()).done;){var C=S.value;p.set(C,$f(x,C)),f.add(C)}}catch(I){E.e(I)}finally{E.f()}u.push(_)}}l=n$(h,p,d)}else{typeof i!="object"&&as(!1);var k=i$(a,i),N=Db(k,et.getDataID(n)),T=this._normalizeOutputTypeValue(N,i,s,a,[o.path],k),$=(0,us.default)(T.getRecordIDs()),P;try{for($.s();!(P=$.n()).done;){var M=P.value;f.add(M)}}catch(I){$.e(I)}finally{$.f()}u=N,l=n$(h,T,d)}et.setValue(n,LEe,f),t$(u),et.setValue(n,Pb,u)}else t$(i),et.setValue(n,Pb,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return et.getValue(n,Pb)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,s=Array.from(n);s.length;){var a=s.pop();o.add(a),n.add(a);var l=this._recordIDToResolverIDs.get(a);if(l!=null){var u=(0,us.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,us.default)(h),g;try{for(p.s();!(g=p.n()).done;){var m=g.value;R5(m,i),o.has(m)||(o.add(m),s.push(m))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){u.e(v)}finally{u.f()}}}},t._isInvalid=function(n,i){if(!et.getValue(n,ax))return!1;var o=et.getValue(n,Ib),s=o?.data,a=o?.selector;if(s==null||a==null)return!0;var l=i(a),u=l.data,d=$Ee(s,u);if(d!==s)return!0;if(FEe.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=et.clone(n);et.setValue(f,ax,!1);var h=this._getRecordSource();h.set(et.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,s,a,l){var u=l0.create();switch(s.kind){case"OutputType":{var d=et.create(n,l);u.set(n,d);var f=PEe(s.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(a);return MEe(u,f,i,p,void 0,h).source}case"WeakModel":{var g=et.create(n,l);return et.setValue(g,VEe,i),u.set(n,g),u}default:s.kind,as(!1)}},t.ensureClientRecord=function(n,i){var o=Db(i,n),s=this._getRecordSource();if(!s.has(o)){var a=et.create(o,i);et.setValue(a,"id",n),s.set(o,a)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return GEe(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,us.default)(n),o;try{for(i.s();!(o=i.n()).done;){var s=o.value,a=this._getRecordSource().get(s);a!=null&&n2(a)&&this._getRecordSource().delete(s)}}catch(l){i.e(l)}finally{i.f()}}},e})();function n$(e,t,r){var n=new Set;if(r!=null){var i=(0,us.default)(r),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;t.has(s)||(n.add(s),e.remove(s))}}catch(p){i.e(p)}finally{i.f()}}var a=(0,us.default)(t.getRecordIDs()),l;try{for(a.s();!(l=a.n()).done;){var u=l.value,d=$f(t,u);if(e.has(u)){var f=$f(e,u),h=et.update(f,d);h!==f&&(n.add(u),e.set(u,h),WEe(f,e))}else e.set(u,d)}}catch(p){a.e(p)}finally{a.f()}return n}function HEe(e){var t=new Set;return et.getFields(e).forEach(function(r){if(et.hasLinkedRecordID(e,r)){var n=et.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(et.hasLinkedRecordIDs(e,r)){var i;(i=et.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function R5(e,t){var r=t.get(e);if(r){var n=et.clone(r);et.setValue(n,ax,!0),t.set(e,n)}}function WEe(e,t){var r=HEe(e),n=(0,us.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,s=t.get(o);s!=null&&n2(s)&&R5(o,t)}}catch(a){n.e(a)}finally{n.f()}}function GEe(e,t){if(t.size!==0){var r=(0,us.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&n2(o)&&A5(o)}}catch(s){r.e(s)}finally{r.f()}}}function n2(e){return et.getType(e)===C5}function A5(e){var t=et.getValue(e,r2);t?.()}function $f(e,t){var r=e.get(t);return r==null&&as(!1),r}function JEe(e){return e}function i$(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&as(!1),n}var QEe={LiveResolverCache:KEe,getUpdatedDataIDs:JEe,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:r2},YEe=Ke.default,XEe=YEe(Vt),T5=Vi,o$=Ou,ZEe=Fe,Mb=T5.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),N5=(function(){function e(r){this._base=r,this._sink=o$.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==Mb}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===Mb?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=o$.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,Mb)},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,XEe.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var s=n.get(o);s===void 0?delete i[o]:i[o]=T5.toJSON(s)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function ewe(e){return new N5(e)}function twe(e){return e instanceof N5||ZEe(!1),e.getOptimisticRecordIDs()}var rwe={create:ewe,getOptimisticRecordIDs:twe},nwe=Du,iwe=nwe.RELAY_LIVE_RESOLVER,s$=Fe,owe=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,s,a){i.kind===iwe&&s$(!1);var l=s(),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){s$(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),swe={NoopResolverCache:owe},Sv=Ke.default,a$=Sv(Vt),awe=Sv(ei),lwe=Sv(kd),Lb=Sv(Sl),uwe=["message"],l$=bo,cwe=gv,dwe=cwe.isSuspenseSentinel,fwe=El,oi=Vi,Fs=lr,u$=Fs.CLIENT_EDGE_TRAVERSAL_PATH,hwe=Fs.FRAGMENT_OWNER_KEY,pwe=Fs.FRAGMENT_PROP_NAME_KEY,d0=Fs.FRAGMENTS_KEY,f0=Fs.ID_KEY,gwe=Fs.MODULE_COMPONENT_KEY,mwe=Fs.ROOT_ID,J0=Fs.getArgumentValues,vwe=Fs.getModuleComponentKey,h0=Fs.getStorageKey,_we=swe,bwe=_we.NoopResolverCache,$5=Ow,ywe=$5.RESOLVER_FRAGMENT_ERRORED_SENTINEL,xwe=$5.withResolverContext,Swe=bv,Ewe=Swe.generateTypeID,Lr=Fe;function D5(e,t,r,n){var i=new wwe(e,t,r??new bwe,n);return i.read()}var wwe=(function(){function e(r,n,i,o){var s,a,l,u;this._clientEdgeTraversalPath=(s=n.clientEdgeTraversalPath)!==null&&s!==void 0&&s.length?(0,Lb.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(a=(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&&a!==void 0?a:!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,s=i.dataID,a=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,u=this._recordSource.get(s),d=!a;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,s,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=oi.getErrors(n,i);if(o!=null){var s=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var a=0;a<o.length;a++){var l,u,d,f=o[a];this._fieldErrors.push({kind:"relay_field_payload.error",owner:s,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 s=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:s,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:s,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var a=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];a!==null&&this._missingClientEdges.push({request:a.readerClientEdge.operation,clientEdgeDestinationID:a.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var s=this._recordSource.get(i);if(this._seenRecords.add(i),s==null)return s===void 0&&this._markDataAsMissing("<record>"),s;var a=o||{},l=this._traverseSelections(n.selections,s,a);return l?a:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Lr(!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 s;o=(s=n.field.linkedField.alias)!==null&&s!==void 0?s:n.field.linkedField.name}else{var a;o=(a=n.field.alias)!==null&&a!==void 0?a: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 s=n;switch(i){case"RESULT":s=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(s=null);break}var a=this._fieldErrors;if(this._fieldErrors=o,a!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<a.length;l++)this._fieldErrors.push(c$(a[l]))}return s},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 s=o.error;s.message;var a=(0,lwe.default)(s,uwe);return a;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,Lr(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var s=0;s<n.length;s++){var a=n[s];switch(a.kind){case"RequiredField":var l=this._readClientSideDirectiveField(a,i,o);if(!this._handleRequiredFieldValue(a,l))return!1;break;case"CatchField":{var u,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(a,i,o),g=(u=(d=a.field)===null||d===void 0?void 0:d.backingField)!==null&&u!==void 0?u:a.field,m=(f=g?.alias)!==null&&f!==void 0?f:g?.name;m==null&&Lr(!1),o[m]=this._catchErrors(p,a.to,h);break}case"ScalarField":this._readScalar(a,i,o);break;case"LinkedField":a.plural?this._readPluralLink(a,i,o):this._readLink(a,i,o);break;case"Condition":var v=!!this._getVariableValue(a.condition);if(v===a.passingValue){var _=this._traverseSelections(a.selections,i,o);if(!_)return!1}break;case"InlineFragment":{var x=this._readInlineFragment(a,i,o,!1);if(x===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(a,i,o):this._readResolverField(a,i,o);break}case"FragmentSpread":this._createFragmentPointer(a,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(a,i,o);break}case"ModuleImport":this._readModuleImport(a,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(a,i,o);break;case"Defer":case"ClientExtension":{var E=this._isMissingData,S=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var C=this._traverseSelections(a.selections,i,o);if(this._isMissingData=E||this._missingClientEdges.length>S||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!C)return!1;break}case"Stream":{var k=this._traverseSelections(a.selections,i,o);if(!k)return!1;break}case"ActorChange":this._readActorChange(a,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(a.backingField.kind==="RelayResolver"||a.backingField.kind==="RelayLiveResolver")){var N=a.linkedField;N.plural?this._readPluralLink(N,i,o):this._readLink(N,i,o)}else this._readClientEdge(a,i,o);break;default:Lr(!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 s=n.field;return s.linkedField.plural?this._readPluralLink(s.linkedField,i,o):this._readLink(s.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,Lr(!1)}},t._readResolverField=function(n,i,o){var s,a=oi.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var u=this._readResolverFieldImpl(n,a),d=(s=n.alias)!==null&&s!==void 0?s:n.name;return this._prependPreviousErrors(l,d),o[d]=u,u},t._readResolverFieldImpl=function(n,i){var o=this,s=n.fragment,a,l=function(x){return a!=null?{data:a.data,isMissingData:a.isMissingData,fieldErrors:a.fieldErrors}:(a=D5(o._recordSource,x,o._resolverCache),{data:a.data,isMissingData:a.isMissingData,fieldErrors:a.fieldErrors})},u=function(){if(s!=null){var x={__id:i,__fragmentOwner:o._owner,__fragments:(0,awe.default)({},s.name,s.args?J0(s.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(x[u$]=(0,Lb.default)(o._clientEdgeTraversalPath));var E={getDataForResolverFragment:l};return xwe(E,function(){var N=d$(n,o._variables,x,o._resolverContext),T=N[0],$=N[1];return{resolverResult:T,snapshot:a,error:$}})}else{var S=d$(n,o._variables,null,o._resolverContext),C=S[0],k=S[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],g=d[3],m=d[4],v=d[5];return this._propagateResolverMetadata(n.path,g,p,h,m,v),f},t._propagateResolverMetadata=function(n,i,o,s,a,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 g=0;g<i.fieldErrors.length;g++){var m,v=i.fieldErrors[g];((m=this._selector.node.metadata)===null||m===void 0?void 0:m.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(c$(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var _,x,E={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=[E]:this._fieldErrors.push(E)}s!=null&&this._seenRecords.add(s),a!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(a)),l?.forEach(function(S){u._updatedDataIDs.add(S)})},t._readClientEdge=function(n,i,o){var s=this,a,l=n.backingField;l.kind==="ClientExtension"&&Lr(!1);var u=(a=l.alias)!==null&&a!==void 0?a:l.name,d={};this._traverseSelections([l],i,d);var f=d[u];if(f==null||dwe(f))return o[u]=f,f;if(n.linkedField.plural){Array.isArray(f)||Lr(!1);var h;n.kind!=="ClientEdgeToClientObject"&&Lr(!1),n.backingField.normalizationInfo==null?h=f.map(function($){var P,M=(P=n.concreteType)!==null&&P!==void 0?P:$.__typename;typeof M!="string"&&Lr(!1);var I=zb($,l.path,s._owner.identifier),U=s._resolverCache.ensureClientRecord(I,M),B=n.modelResolvers;if(B!=null){var q=B[M];q===void 0&&Lr(!1);var J=s._readResolverFieldImpl(q,U);return J!=null?U:null}return U}):h=f.map(function($){return zb($,l.path,s._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 g,m=zb(f,l.path,this._owner.identifier),v,_=(g=n.concreteType)!==null&&g!==void 0?g:f.__typename,x;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof _!="string"&&Lr(!1),v=this._resolverCache.ensureClientRecord(m,_),x=null):(v=m,x=null):(v=m,x={readerClientEdge:n,clientEdgeDestinationID:m});var E=n.modelResolvers;if(E!=null){typeof _!="string"&&Lr(!1);var S=E[_];S===void 0&&Lr(!1);var C=this._readResolverFieldImpl(S,v);if(C==null)return o[u]=null,null}this._clientEdgeTraversalPath.push(x);var k=o[u];k==null||typeof k=="object"||Lr(!1);var N=this._fieldErrors;this._fieldErrors=null;var T=this._traverse(n.linkedField,v,k);return this._prependPreviousErrors(N,u),this._clientEdgeTraversalPath.pop(),o[u]=T,T}},t._readScalar=function(n,i,o){var s,a=(s=n.alias)!==null&&s!==void 0?s:n.name,l=h0(n,this._variables),u=oi.getValue(i,l);return u===null||l$.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(u)&&u.length===0?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(a),o[a]=u,u},t._readLink=function(n,i,o){var s,a=(s=n.alias)!==null&&s!==void 0?s:n.name,l=h0(n,this._variables),u=oi.getLinkedRecordID(i,l);if(u==null)return o[a]=u,u===null?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(a),u;var d=o[a];d==null||typeof d=="object"||Lr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,u,d);return this._prependPreviousErrors(f,a),o[a]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var s=this._fieldErrors[o];s.owner===this._fragmentName&&(s.kind==="missing_expected_data.throw"||s.kind==="missing_expected_data.log"||s.kind==="missing_required_field.throw"||s.kind==="missing_required_field.log")&&(s.fieldPath="".concat(i,".").concat(s.fieldPath))}if(n!=null){for(var a=this._fieldErrors.length-1;a>=0;a--)n.push(this._fieldErrors[a]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var s,a=(s=n.alias)!==null&&s!==void 0?s:n.name,l=h0(n,this._variables),u=oi.getActorLinkedRecordID(i,l);if(u==null)return o[a]=u,u===void 0?this._markDataAsMissing(a):u===null&&this._maybeAddFieldErrors(i,l),o[a];var d=u[0],f=u[1],h={};return this._createFragmentPointer(n.fragmentSpread,oi.fromObject({__id:f}),h),o[a]={__fragmentRef:h,__viewer:d},o[a]},t._readPluralLink=function(n,i,o){var s=h0(n,this._variables),a=oi.getLinkedRecordIDs(i,s);return(a===null||l$.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(a)&&a.length===0)&&this._maybeAddFieldErrors(i,s),this._readLinkedIds(n,a,i,o)},t._readLinkedIds=function(n,i,o,s){var a=this,l,u=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return s[u]=i,i===void 0&&this._markDataAsMissing(u),i;var d=s[u];d==null||Array.isArray(d)||Lr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,g){if(p==null){p===void 0&&a._markDataAsMissing(String(g)),h[g]=p;return}var m=h[g];m==null||typeof m=="object"||Lr(!1);var v=a._fieldErrors;a._fieldErrors=null,h[g]=a._traverse(n,p,m),a._prependPreviousErrors(v,g)}),this._prependPreviousErrors(f,u),s[u]=h,h},t._readModuleImport=function(n,i,o){var s=vwe(n.documentName),a=oi.getValue(i,s),l=a!==void 0?a: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[pwe]=n.fragmentPropName,o[gwe]=l},t._readAliasedInlineFragment=function(n,i,o){var s=this._fieldErrors;this._fieldErrors=null;var a=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(s,n.name),a===!1&&(a=null),o[n.name]=a},t._readInlineFragment=function(n,i,o,s){if(n.type==null){var a=this._traverseSelections(n.selections,i,o);return a===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var a=this._traverseSelections(n.selections,i,o);if(!a)return!1}else return null;else{var u=this._implementsInterface(i,l);if(u===!1&&s)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=oi.getType(n);return o!=null&&o===i||oi.getDataID(n)===mwe},t._createFragmentPointer=function(n,i,o){var s=o[d0];s==null&&(s=o[d0]={}),typeof s=="object"&&s!=null||Lr(!1),o[f0]==null&&(o[f0]=oi.getDataID(i)),s[n.name]=J0(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[hwe]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[u$]=(0,Lb.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var s=o[d0];s==null&&(s=o[d0]={}),typeof s=="object"&&s!=null||Lr(!1),o[f0]==null&&(o[f0]=oi.getDataID(i));var a={},l=this._fragmentName;this._fragmentName=n.name;var u=this._variables,d=n.args?J0(n.args,this._variables):{};this._variables=fwe.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,a),this._variables=u,this._fragmentName=l,s[n.name]=a},t._implementsInterface=function(n,i){var o=oi.getType(n),s=this._recordSource.get(Ewe(o)),a=s!=null?oi.getValue(s,i):null;return a==null&&this._markDataAsMissing("<abstract-type-hint>"),a},e})();function c$(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,a$.default)((0,a$.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,Lr(!1)}}function d$(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,s=null;try{var a=[];e.fragment!=null&&a.push(r);var l=e.args?J0(e.args,t):void 0;a.push(l),a.push(n),o=i.apply(null,a)}catch(u){o=null,u!==ywe&&(s=u)}return[o,s]}function zb(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;Lr(!1)}var i2={read:D5},kwe=Ke.default,f$=kwe(Ir),Cwe=Zw,Rwe=x5,Awe=w5,Twe=El,h$=Twe.getLocalVariables,Us=Vi,Ev=lr,Nwe=bv,p$=Nwe.generateTypeID,Ub=Fe,$we=Ev.getReadTimeResolverStorageKey,g$=Ev.getStorageKey,Dwe=Ev.getModuleOperationKey;function Fwe(e,t,r,n,i,o){var s=t.dataID,a=t.node,l=t.variables,u=new Iwe(e,l,r,n,i,o);u.mark(a,s)}var Iwe=(function(){function e(r,n,i,o,s,a){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=a??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=s}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)||Ub(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(s){switch(s.kind){case"ActorChange":o._traverseLink(s.linkedField,i);break;case"LinkedField":s.plural?o._traversePluralLink(s,i):o._traverseLink(s,i);break;case"Condition":var a=!!o._getVariableValue(s.condition);a===s.passingValue&&o._traverseSelections(s.selections,i);break;case"InlineFragment":if(s.abstractKey==null){var l=Us.getType(i);(l!=null&&l===s.type||l===Ev.ROOT_TYPE)&&o._traverseSelections(s.selections,i)}else{var u=Us.getType(i),d=p$(u);o._references.add(d),o._traverseSelections(s.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=h$(o._variables,s.fragment.argumentDefinitions,s.args),o._traverseSelections(s.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=Rwe(s,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(s.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=Us.getType(i),g=p$(p);o._references.add(g);break}case"ModuleImport":o._traverseModuleImport(s,i);break;case"ClientExtension":o._traverseSelections(s.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(s.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(s,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(s,i);break;default:Ub(!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 s=this._recordSource.get(o);if(s!=null)if(n.backingField.isOutputType){var a=Awe(s);if(a!=null){var l=(0,f$.default)(a),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=Us.getResolverLinkedRecordIDs(s,h);if(p!=null){var g=(0,f$.default)(p),m;try{for(g.s();!(m=g.n()).done;){var v=m.value;v!=null&&this._traverse(f,v)}}catch(x){g.e(x)}finally{g.f()}}}else{var _=Us.getResolverLinkedRecordID(s,h);_!=null&&this._traverse(f,_)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=$we(n,this._variables),s=Us.getLinkedRecordID(i,o);s!=null&&this._references.add(s);var a=n.fragment;return a!=null&&this._traverseSelections([a],i),s}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&Ub(!1);var s=Dwe(n.documentName),a=Us.getValue(i,s);if(a!=null){var l=o.get(a);if(l!=null){var u=Cwe(l),d=this._variables;this._variables=h$(this._variables,u.argumentDefinitions,n.args),this._traverseSelections(u.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=g$(n,this._variables),s=Us.getLinkedRecordID(i,o);s!=null&&this._traverse(n,s)},t._traversePluralLink=function(n,i){var o=this,s=g$(n,this._variables),a=Us.getLinkedRecordIDs(i,s);a?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),Pwe={mark:Fwe},Owe=Symbol.iterator;function Mwe(e,t){for(var r=e[Owe](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var Lwe=Mwe,zwe=lr,Uwe=zwe.ROOT_ID,Bwe=Xw,jwe=Bwe.VIEWER_ID,qwe=Symbol.iterator;function Vwe(e,t){for(var r=e[qwe](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==Uwe&&i!==jwe)return!0;n=r.next()}return!1}var Kwe=Vwe,m$=pv,v$=bo,Hwe=Lwe,Wwe=Kwe,_$=i2,Gwe=(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,s={backup:null,callback:i,snapshot:n,stale:!1},a=function(){o._subscriptions.delete(s)};return this._subscriptions.add(s),{dispose:a}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var s=o.snapshot,a=_$.read(n,s.selector,i._resolverCache,i._resolverContext),l=m$(s.data,a.data);a.data=l,o.backup=a})},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,s){var a=this,l=i.size!==0;this._subscriptions.forEach(function(u){var d=a._updateSubscription(n,u,i,l,s);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,s,a){var l=i.backup,u=i.callback,d=i.snapshot,f=i.stale,h=s&&Hwe(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?_$.read(n,d.selector,this._resolverCache,this._resolverContext):l,g=m$(d.data,p.data);if(p={data:g,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&&v$.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:a,snapshot:d,nextSnapshot:p}),u(p),d.selector.owner;if(v$.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||Wwe(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),Jwe=Gwe,F5=Ke.default,b$=F5(Ir),Qwe=F5(ei),I5=Qw,Ywe=I5.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,y$=I5.assertInternalActorIdentifier,Xwe=aSe,Zwe=xEe,e2e=l5,o2=QEe,t2e=o2.LiveResolverCache,r2e=o2.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,n2e=o2.getUpdatedDataIDs,Vl=Vi,x$=rwe,i2e=i2,o2e=Pwe,s2e=Jwe,a2e=lr,P5=lr,Bb=P5.ROOT_ID,l2e=P5.ROOT_TYPE,jb=Fe,u2e=10,c2e=(function(){function e(r,n){var i=this,o,s,a,l,u,d,f,h;(0,Qwe.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:u2e,this._shouldRetainWithinTTL_EXPERIMENTAL=(s=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&s!==void 0?s:!1,this._gcRun=null,this._gcScheduler=(a=n?.gcScheduler)!==null&&a!==void 0?a:Xwe,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:e2e,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 t2e(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new s2e(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,d2e(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,s,a,l,u,d,f,h=n.root,p=this._getMutableRecordSource(),g=this._globalInvalidationEpoch,m=(o=(s=n.request.node.operation.use_exec_time_resolvers)!==null&&s!==void 0?s:((a=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),_=v!=null?v.epoch:null;if(g!=null&&(_==null||_<=g))return{status:"stale"};var x=(l=i?.handlers)!==null&&l!==void 0?l:[],E=(u=i?.getSourceForActor)!==null&&u!==void 0?u:function(k){return y$(k),p},S=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(k){return y$(k),p},C=Zwe.check(E,S,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:Ywe,h,x,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,m);return h2e(C,_,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,s=!1,a=function(){if(!s){s=!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:a}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),s=i2e.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),s},t.notify=function(n,i){var o=this,s=this.__log;s?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var a=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(a,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 s?.({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();f2e(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var s=this.__log;s?.({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(s){var a,l=i.getSource().get(s);o.set(s,(a=Vl.getInvalidationEpoch(l))!==null&&a!==void 0?a:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,s=n.invalidations;if(o.get("global")!==s.get("global"))return!0;var a=(0,b$.default)(n.dataIDs),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;if(o.get(u)!==s.get(u))return!0}}catch(d){a.e(d)}finally{a.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,s={callback:i,invalidationState:n},a=function(){o._invalidationSubscriptions.delete(s)};return this._invalidationSubscriptions.add(s),{dispose:a}},t._updateInvalidationSubscription=function(n,i){var o=this,s=n.callback,a=n.invalidationState,l=a.dataIDs,u=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});u&&s()},t.snapshot=function(){this._optimisticSource!=null&&jb(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=x$.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||jb(!1);var i=this.__log;i?.({name:"store.restore"});var o=x$.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,s=(0,b$.default)(this._roots.entries()),a;try{for(s.s();!(a=s.n()).done;){var l,u,d,f=a.value,h=f[0],p=f[1],g=p.operation,m=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var _=this._queryCacheExpirationTime;_==null&&jb(!1);var x=v==null||v<=Date.now()-_,E=x&&m===0&&!this._releaseBuffer.includes(h);if(E)continue}var S=g.root,C=(l=(u=g.request.node.operation.use_exec_time_resolvers)!==null&&u!==void 0?u:((d=g.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(o2e.mark(this._recordSource,S,o,this._operationLoader,this._shouldProcessClientComponents,C),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(M){s.e(M)}finally{s.f()}for(var k=this._recordSource.getRecordIDs(),N=0;N<k.length;N++){var T=k[N];if(!o.has(T)){var $=this._recordSource.get(T);if($!=null){var P=Vl.getValue($,r2e);P?.()}this._recordSource.remove(T),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(T)}}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=n2e(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function d2e(e){if(!e.has(Bb)){var t=Vl.create(Bb,l2e);e.set(Bb,t)}}function f2e(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),g=t.get(h);if(g!==null){var m;p!=null?m=Vl.clone(p):m=g!=null?Vl.clone(g):null,m&&(Vl.setValue(m,a2e.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,m))}});for(var s=t.getRecordIDs(),a=0;a<s.length;a++){var l=s[a],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 h2e(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 s=r<=Date.now()-n;if(s)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var s2=c2e,O5=lr,p2e=O5.ROOT_TYPE,S$=O5.getStorageKey,g2e=g5,m2e=g2e.readUpdatableFragment,v2e=m5,_2e=v2e.readUpdatableQuery,E$=Fe,b2e=(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,p2e)),n},t._getRootField=function(n,i,o){var s=n.node.selections.find(function(a){return a.kind==="LinkedField"&&a.name===i||a.kind==="RequiredField"&&a.field.name===i});return s&&s.kind==="RequiredField"&&(s=s.field),s&&s.kind==="LinkedField"||E$(!1),s.plural!==o&&E$(!1),s},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=S$(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=S$(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return _2e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return m2e(n,i,this,this._missingFieldHandlers)},e})(),y2e=b2e,qb,Vb,Kb=h5,Hb=y5,w$=y2e,x2e=bo,S2e=i2,k$=Ou,p0=Fe,Wb=typeof eg<"u"?eg:typeof window<"u"?window:void 0,Gb=(qb=Wb==null||(Vb=Wb.ErrorUtils)===null||Vb===void 0?void 0:Vb.applyWithGuard)!==null&&qb!==void 0?qb:function(e,t,r,n,i){return e.apply(t,r)},E2e=(function(){function e(r,n,i,o,s){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=s}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(x2e.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 s=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,s)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,s=n.operation,a=n.updater,l=o.source,u=o.fieldPayloads,d=new Kb(this._store.getSource(),l),f=new Hb(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)}),a){var h=s.fragment;h==null&&p0(!1);var p=new w$(d,f,h,this._missingFieldHandlers),g=C$(l,h);a(p,g)}var m=f.getIDsMarkedForInvalidation();return this._store.publish(l,m),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 s=n._publishSourceFromPayload(o);i=i||s}else if(o.kind==="source"){var a=o.source;n._store.publish(a)}else{var l=o.updater,u=k$.create(),d=new Kb(n._store.getSource(),u),f=new Hb(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);Gb(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=k$.create(),o=new Kb(this._store.getSource(),i),s=new Hb(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),a=function(u){if(u.storeUpdater){var d=u.storeUpdater;Gb(d,null,[s],null,"RelayPublishQueue:applyUpdates")}else{var f=u.operation,h=u.payload,p=u.updater,g=h.source,m=h.fieldPayloads;if(g&&s.publishSource(g,m),p){var v;g&&(v=C$(g,f.fragment));var _=new w$(o,s,f.fragment,n._missingFieldHandlers);Gb(p,null,[_,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(a),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){a(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function C$(e,t){var r=S2e.read(e,t).data;return r}var w2e=E2e,k2e=Ke.default,R$=k2e(Vt),C2e=tbe,M5=Qw,A$=M5.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,g0=M5.assertInternalActorIdentifier,Jb=wl,T$=vxe,R2e=xxe,A2e=Exe,T2e=l5,N2e=Ixe,$2e=sxe,D2e=nSe,F2e=s2,I2e=w2e,N$=Ou,L5=(function(){function e(r){var n=this,i,o,s,a,l,u,d,f,h,p,g;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var m=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new F2e(new N$,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:O2e,this.relayFieldLogger=(s=r.relayFieldLogger)!==null&&s!==void 0?s:N2e,this._defaultRenderPolicy=(a=r.UNSTABLE_defaultRenderPolicy)!==null&&a!==void 0?a:"partial",this._operationLoader=m,this._operationExecutions=new Map,this._network=T$(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:T2e,this._missingFieldHandlers=(u=r.missingFieldHandlers)!==null&&u!==void 0?u:[],this._publishQueue=new I2e(v,(d=r.handlerProvider)!==null&&d!==void 0?d:C2e,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:$2e,this.__setNet=function(_){return n._network=T$(n,_)},this._operationTracker=(g=r.operationTracker)!==null&&g!==void 0?g:new R2e,this._shouldProcessClientComponents=r.shouldProcessClientComponents,A2e(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 Jb.create(function(s){})},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&&!P2e(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return Jb.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,s=N$.create(),a=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:A$,getSourceForActor:function(d){return g0(d),a},getTargetForActor:function(d){return g0(d),s}});return s.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(s),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,s=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:s})},t.executeMutation=function(n){var i=this,o=n.operation,s=n.optimisticResponse,a=n.optimisticUpdater,l=n.updater,u=n.uploadables,d;return(s||a)&&(d={operation:o,response:s,updater:a}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,R$.default)((0,R$.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,s=n.isClientPayload,a=n.operation,l=n.optimisticConfig,u=n.updater,d=this._publishQueue,f=this._store;return Jb.create(function(h){var p=D2e.execute({actorIdentifier:A$,getDataID:i._getDataID,isClientPayload:s,log:i.__log,operation:a,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(m){return g0(m),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(m){return g0(m),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:u,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function P2e(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}L5.prototype["@@RelayModernEnvironment"]=!0;function O2e(){}var M2e=L5,L2e=hv,z2e=Xo,U2e=z2e.getRequest,B2e=kl,j2e=B2e.createOperationDescriptor,q2e=Zo,V2e=q2e.createReaderSelector;function K2e(e,t){var r=U2e(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,s=t.onNext,a=t.variables,l=t.cacheConfig,u=j2e(r,a,l),d=n?L2e.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:u,updater:f}).subscribe({next:function(g){if(s!=null){var m=u.fragment,v;if(Array.isArray(g)){var _,x;v=(_=g[0])===null||_===void 0||(x=_.extensions)===null||x===void 0?void 0:x.__relay_subscription_root_id}else{var E;v=(E=g.extensions)===null||E===void 0?void 0:E.__relay_subscription_root_id}typeof v=="string"&&(m=V2e(m.node,v,m.variables,m.owner));var S=e.lookup(m).data;s(S)}},error:o,complete:i});return{dispose:h.unsubscribe}}var H2e=K2e,W2e=Ke.default;W2e(Vt);var z5=lr;z5.getModuleComponentKey;z5.getModuleOperationKey;var G2e=Object.prototype.hasOwnProperty;function J2e(e){for(var t in e)if(G2e.call(e,t))return!1;return!0}var Q2e=J2e,a2=Zo,Y2e=a2.getDataIDsFromFragment,X2e=a2.getSelector,Z2e=a2.getVariablesFromFragment,eke=Q2e,ef=bo,tke=Fu,$$=tke.stableCopy,rke=D8,D$=rke.intern;function nke(e,t){var r=X2e(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(u){return u.owner.identifier}).join(",")+"]",i=Z2e(e,t),o=Y2e(e,t);if(ef.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var s=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return s=ef.STRING_INTERN_LEVEL<=1?s:D$(s,ef.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||eke(i)?"{}":JSON.stringify($$(i)))+"/"+s}else{var a,l=(a=JSON.stringify(o))!==null&&a!==void 0?a:"missing";return l=ef.STRING_INTERN_LEVEL<=1?l:D$(l,ef.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify($$(i))+"/"+l}}var ike=nke,tf=Fe;function oke(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&tf(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&tf(!1);var o=i.operation.default?i.operation.default:i.operation,s=i.fragmentPathInResult;typeof o=="string"&&tf(!1);var a=i.identifierInfo;return a!=null&&(a.identifierField==null||typeof a.identifierField=="string"||tf(!1),a.identifierQueryVariableName==null||typeof a.identifierQueryVariableName=="string"||tf(!1)),{fragmentRefPathInResponse:s,identifierInfo:a,refetchableRequest:o,refetchMetadata:i}}var U5=oke,ske=U5,Qb=Fe;function ake(e,t){var r,n,i=ske(e),o=i.refetchableRequest,s=i.refetchMetadata,a=s.connection;a==null&&Qb(!1);var l=a.path,u=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];u==null&&Qb(!1);var d=s.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||Qb(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:a,stream:u.stream===!0}}var lke=ake,B5=Ke.default,m0=B5(ei),Xu=B5(Vt),F$=Fe;function uke(e,t,r,n,i,o){var s,a=o.backward,l=o.forward;if(e==="backward"){var u;a!=null&&a.count!=null&&a.cursor!=null||F$(!1);var d=(0,Xu.default)((0,Xu.default)((0,Xu.default)({},n),i),{},(u={},(0,m0.default)(u,a.cursor,r),(0,m0.default)(u,a.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||F$(!1);var f=(0,Xu.default)((0,Xu.default)((0,Xu.default)({},n),i),{},(s={},(0,m0.default)(s,l.cursor,r),(0,m0.default)(s,l.count,t),s));return a&&a.cursor&&(f[a.cursor]=null),a&&a.count&&(f[a.count]=null),f}var cke=uke,dke=Ke.default,fke=dke(Ir),I$=Fe;function hke(e,t){var r=e,n=(0,fke.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)||I$(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||I$(!1),r=r[o])}}catch(s){n.e(s)}finally{n.f()}return r}var pke=hke,j5=__e;j5.isErrorResult;j5.isValueResult;var gke=fv,mke=Uw,vke=bbe,_ke=xbe,bke=Ibe,P$=hv,yke=qbe,xke=wl,Ske=iye,Eke=cye,v0=dv,os=Xo,wke=hye,l2=Ds;l2.generateClientID;l2.generateUniqueClientID;l2.isClientID;var kke=Iye,Cke=Mye,Rke=Uye,Ake=Bw,q5=gv;q5.isSuspenseSentinel;q5.suspenseSentinel;var Tke=fxe,O$=El,Nke=M2e,M$=kl,Ri=Zo,$ke=s2,Dke=Ou,Hi=lr,Fke=Ow,L$=Xw,Ike=H2e,Pke=R8,Oke=ike,Mke=lke,Lke=cke,zke=z8,Uke=U5,Bke=A8,jke=pke,qke=ip,Vke=qke.handlePotentialSnapshotErrors,Kke=b8,Hke=U8,Wke=pv,Gke=e8,Jke=bo,Qke=x8,V5=Fu;V5.hasCycle;V5.stableCopy;var Yke={Environment:Nke,Network:yke,Observable:xke,RecordSource:Dke,ReplaySubject:Qke,Store:$ke,areEqualSelectors:Ri.areEqualSelectors,createFragmentSpecResolver:kke,createNormalizationSelector:Ri.createNormalizationSelector,createOperationDescriptor:M$.createOperationDescriptor,createReaderSelector:Ri.createReaderSelector,createRequestDescriptor:M$.createRequestDescriptor,getArgumentValues:Hi.getArgumentValues,getDataIDsFromFragment:Ri.getDataIDsFromFragment,getDataIDsFromObject:Ri.getDataIDsFromObject,getNode:os.getNode,getFragment:os.getFragment,getInlineDataFragment:os.getInlineDataFragment,getModuleComponentKey:Hi.getModuleComponentKey,getModuleOperationKey:Hi.getModuleOperationKey,getPaginationFragment:os.getPaginationFragment,getPluralSelector:Ri.getPluralSelector,getRefetchableFragment:os.getRefetchableFragment,getRequest:os.getRequest,getRequestIdentifier:Bke,getSelector:Ri.getSelector,getSelectorsFromObject:Ri.getSelectorsFromObject,getSingularSelector:Ri.getSingularSelector,getStorageKey:Hi.getStorageKey,getVariablesFromFragment:Ri.getVariablesFromFragment,getVariablesFromObject:Ri.getVariablesFromObject,getVariablesFromPluralFragment:Ri.getVariablesFromPluralFragment,getVariablesFromSingularFragment:Ri.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:Vke,graphql:os.graphql,isFragment:os.isFragment,isInlineDataFragment:os.isInlineDataFragment,isRequest:os.isRequest,readInlineData:Tke,readFragment:Fke.readFragment,MutationTypes:P$.MutationTypes,RangeOperations:P$.RangeOperations,ConnectionHandler:gke,VIEWER_ID:L$.VIEWER_ID,VIEWER_TYPE:L$.VIEWER_TYPE,applyOptimisticMutation:vke,commitLocalUpdate:_ke,commitMutation:bke,fetchQuery:Ske,fetchQuery_DEPRECATED:Eke,isRelayModernEnvironment:Ake,requestSubscription:Ike,ConnectionInterface:mke,PreloadableQueryRegistry:wke,RelayFeatureFlags:Jke,DEFAULT_HANDLE_KEY:Gke.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:Hi.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:Hi.FRAGMENT_OWNER_KEY,ID_KEY:Hi.ID_KEY,REF_KEY:Hi.REF_KEY,REFS_KEY:Hi.REFS_KEY,ROOT_ID:Hi.ROOT_ID,ROOT_TYPE:Hi.ROOT_TYPE,TYPENAME_KEY:Hi.TYPENAME_KEY,deepFreeze:Pke,isPromise:Kke,isScalarAndEqual:Hke,recycleNodesInto:Wke,getFragmentIdentifier:Oke,getRefetchMetadata:Uke,getPaginationMetadata:Mke,getPaginationVariables:Lke,getPendingOperationsForFragment:zke,getValueAtPath:jke,__internal:{createRelayContext:Cke,createRelayLoggingContext:Rke,getOperationVariables:O$.getOperationVariables,getLocalVariables:O$.getLocalVariables,fetchQuery:v0.fetchQuery,fetchQueryDeduped:v0.fetchQueryDeduped,getPromiseForActiveRequest:v0.getPromiseForActiveRequest,getObservableForActiveRequest:v0.getObservableForActiveRequest}},mt=Yke,Xke=s2,K5=Xke;const H5=q7(K5),Zke=K7({__proto__:null,default:H5},[K5]);let z$={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==mt.ROOT_TYPE))return o}};function eCe(e,t,r){return new mt.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function tCe(e,t,r){return new H5(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function rCe(e,t,r){return new Zke(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let nCe={make:eCe,makeLiveStore:tCe,_makeLiveStoreCjs:rCe};function iCe(e,t,r,n,i,o,s){return new mt.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([z$]):[z$],relayFieldLogger:o,isServer:s})}function W5(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 oCe(e,t,r,n){let i=n!==void 0?n:[];mt.commitLocalUpdate(e,o=>{W5(e,t,r).forEach(s=>{if(!i.includes(s))return se(ys(o.get(s)),a=>{a.invalidateRecord()})})})}let sCe={make:iCe,findAllConnectionIds:W5,invalidateAllOfConnection:oCe};var aCe=xt,lCe=mt,uCe=lCe.__internal.createRelayContext,Cd=uCe(aCe),G5={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})(G5);var wv=G5.exports,J5={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})(J5);var kv=J5.exports,Q5={exports:{}},Y5={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})(Y5);var cCe=Y5.exports;(function(e){var t=cCe;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})(Q5);var Cv=Q5.exports,U$=Fe;function dCe(e,t){t&&typeof t=="object"||U$(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||U$(!1)}}var fCe=dCe;function X5(e){return e.displayName||e.name||"Component"}function hCe(e){return"Relay("+X5(e)+")"}var Rv={getComponentName:X5,getContainerName:hCe},pCe=xt,Z5=pCe.createContext({rootIsQueryRenderer:!1}),gCe=Ke.default,mCe=gCe(wv),vCe=fCe,ez=Rv,_Ce=ez.getComponentName,bCe=ez.getContainerName,yCe=Cd,xCe=Z5,SCe=Fe,lx=xt,ECe=mt,wCe=ECe.getFragment,B$=lx.useContext;function kCe(e,t,r){var n=bCe(e);vCe(_Ce(e),t);var i={};for(var o in t)i[o]=wCe(t[o]);var s=r(e,i);s.displayName=n;function a(u,d){var f,h=B$(yCe);h==null&&SCe(!1);var p=B$(xCe);return lx.createElement(s,(0,mCe.default)({},u,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:u.componentRef||d}))}a.displayName=n;var l=lx.forwardRef(a);return l}var u2=kCe;function CCe(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 RCe=CCe,ACe=RCe,TCe=Fe;function NCe(e){return $Ce(e)||TCe(!1),e}function $Ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&ACe(e.environment)}var c2={assertRelayContext:NCe},sp=Ke.default,DCe=sp(wv),FCe=sp(kd),ICe=sp(kv),PCe=sp(Cv),j$=sp(ei),OCe=["componentRef","__relayContext","__rootIsQueryRenderer"],MCe=u2,LCe=Rv,zCe=LCe.getContainerName,UCe=c2,q$=UCe.assertRelayContext,BCe=ya,V$=xt,d2=mt,K$=d2.createFragmentSpecResolver,H$=d2.getDataIDsFromObject,jCe=d2.isScalarAndEqual;function qCe(e,t){var r,n=zCe(e);return r=(function(i){(0,PCe.default)(o,i);function o(a){var l,u;u=i.call(this,a)||this,(0,j$.default)((0,ICe.default)(u),"_handleFragmentDataUpdate",function(){var p=u.state.resolver;u.setState(function(g){return p===g.resolver?{data:g.resolver.resolve(),relayProp:_0(g.relayProp.environment)}:null})});var d=q$(a.__relayContext),f=(l=a.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=K$(d,n,t,a,f);return u.state={data:h.resolve(),prevProps:a,prevPropsContext:d,relayProp:_0(d.environment),resolver:h},u}o.getDerivedStateFromProps=function(l,u){var d,f=u.prevProps,h=q$(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,g=H$(t,f),m=H$(t,l),v=u.resolver;if(u.prevPropsContext.environment!==h.environment||!BCe(g,m))return v=K$(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 s=o.prototype;return s.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(l,u){this.state.resolver!==u.resolver?(u.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},s.componentWillUnmount=function(){this.state.resolver.dispose()},s.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)&&!jCe(l[h],this.props[h]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();u!==f&&this.setState({data:f})},s._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})},s.render=function(){var l=this.props,u=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,FCe.default)(l,OCe);return V$.createElement(e,(0,DCe.default)({},d,this.state.data,{ref:u,relay:this.state.relayProp}))},o})(V$.Component),(0,j$.default)(r,"displayName",n),r}function _0(e){return{environment:e}}function VCe(e,t){return MCe(e,t,qCe)}var KCe={createContainer:VCe},Av=xt,f2=mt;f2.createOperationDescriptor;f2.deepFreeze;f2.getRequest;Av.useLayoutEffect;Av.useState;Av.useRef;Av.useMemo;var HCe=Ke.default,W$=HCe(Vt),WCe=mt,GCe=WCe.getSelector;function JCe(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,s,a=e[n],l=t[n],u=GCe(a,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:{}:(s=u?.owner.variables)!==null&&s!==void 0?s:{};r=(0,W$.default)((0,W$.default)({},r),d)}),r}var tz=JCe,QCe=Ke.default,G$=QCe(ei),Yb=Fe,h2=mt,YCe=h2.__internal.fetchQuery,XCe=h2.createOperationDescriptor,ZCe=h2.isRelayModernEnvironment,eRe=(function(){function e(r){(0,G$.default)(this,"_selectionReferences",[]),(0,G$.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,s=n.operation,a=n.preservePreviousReferences,l=a===void 0?!1:a,u=o.retain(s),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 ZCe(o)?YCe(o,s).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:s}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||Yb(!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,s=n.environment,a=n.operation,l=n.onDataChange,u=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:s,onDataChangeCallbacks:f||[],operation:a},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?XCe(a.request.node,a.request.variables,i):a,p=this.execute({environment:s,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:u})},error:function(m){o._didFetchFinish=!0,o._error=m,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;u?v&&v.forEach(function(_){_({error:m})}):d=m}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},u=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||Yb(!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||Yb(!1);var s=this._fetchOptions,a=s.environment,l=s.onDataChangeCallbacks,u=s.operation;if(!this._snapshot&&(this._snapshot=a.lookup(u.fragment),this._rootSubscription=a.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})(),p2=eRe,Rd=Ke.default,tRe=Rd(wv),Xb=Rd(kd),rf=Rd(kv),rRe=Rd(Cv),Dl=Rd(ei),Vn=Rd(Vt),nRe=["componentRef"],iRe=["componentRef","__relayContext","__rootIsQueryRenderer"],oRe=["componentRef","__relayContext","__rootIsQueryRenderer"],sRe=u2,Zb=tz,rz=Rv,aRe=rz.getComponentName,lRe=rz.getContainerName,uRe=Cd,cRe=p2,dRe=c2,ey=dRe.assertRelayContext,ty=ya,cs=Fe,ry=xt,Sa=mt,J$=Sa.ConnectionInterface,Q$=Sa.Observable,b0=Sa.RelayFeatureFlags,y0=Sa.createFragmentSpecResolver,fRe=Sa.createOperationDescriptor,Y$=Sa.getDataIDsFromObject,hRe=Sa.getRequest,pRe=Sa.getVariablesFromObject,gRe=Sa.isScalarAndEqual,X$="forward";function mRe(e){var t=e.path;return t||cs(!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 vRe(e){var t=e.count;return t||cs(!1),function(r,n){return(0,Vn.default)((0,Vn.default)({},r),{},(0,Dl.default)({},t,n))}}function _Re(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&&cs(!1),t&&cs(!1),t=(0,Vn.default)((0,Vn.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||cs(!1),t||{}}function Z$(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function bRe(e,t,r){var n;aRe(e);var i=lRe(e),o=_Re(t),s=r.getConnectionFromProps||mRe(o),a=r.direction||o.direction;a||cs(!1);var l=r.getFragmentVariables||vRe(o);return n=(function(u){(0,rRe.default)(d,u);function d(h){var p,g;g=u.call(this,h)||this,(0,Dl.default)((0,rf.default)(g),"_handleFragmentDataUpdate",function(){g.setState({data:g._resolver.resolve()})}),(0,Dl.default)((0,rf.default)(g),"_hasMore",function(){var _=g._getConnectionData();return!!(_&&_.hasMore&&_.cursor)}),(0,Dl.default)((0,rf.default)(g),"_isLoading",function(){return!!g._refetchSubscription}),(0,Dl.default)((0,rf.default)(g),"_refetchConnection",function(_,x,E){if(!g._canFetchPage("refetchConnection"))return{dispose:function(){}};g._refetchVariables=E;var S={count:_,cursor:null,totalCount:_},C=g._fetchPage(S,Z$(x),{force:!0});return{dispose:C.unsubscribe}}),(0,Dl.default)((0,rf.default)(g),"_loadMore",function(_,x,E){if(!g._canFetchPage("loadMore"))return{dispose:function(){}};var S=Z$(x),C=g._getConnectionData();if(!C)return Q$.create(function(M){return M.complete()}).subscribe(S),null;var k=C.edgeCount+_;if(E&&E.force)return g._refetchConnection(k,x);var N=J$.get();N.END_CURSOR,N.START_CURSOR;var T=C.cursor,$={count:_,cursor:T,totalCount:k},P=g._fetchPage($,S,E);return{dispose:P.unsubscribe}});var m=ey(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return g._isARequestInFlight=!1,g._refetchSubscription=null,g._refetchVariables=null,b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?g._resolver=y0(m,i,t,h,v):g._resolver=y0(m,i,t,h,v,g._handleFragmentDataUpdate),g.state={data:g._resolver.resolve(),prevContext:m,contextForChildren:m,relayProp:g._buildRelayProp(m),resolverGeneration:0},g._isUnmounted=!1,g._hasFetched=!1,g}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,g){b0.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(g.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var g=this,m,v=ey(p.__relayContext),_=(m=p.__rootIsQueryRenderer)!==null&&m!==void 0?m:!1,x=Y$(t,this.props),E=Y$(t,p),S=Zb(t,this.props),C=Zb(t,p);v.environment!==this.state.prevContext.environment||!ty(S,C)||!ty(x,E)?(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(N){return{prevContext:v,contextForChildren:v,relayProp:g._buildRelayProp(v),resolverGeneration:N.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,g){if(g.data!==this.state.data||g.relayProp!==this.state.relayProp||g.resolverGeneration!==this.state.resolverGeneration)return!0;for(var m=Object.keys(p),v=0;v<m.length;v++){var _=m[v];if(_==="__relayContext"){if(g.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(_)&&!gRe(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,g=this._resolver.resolve();p!==g&&this.setState({data:g})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,g=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==g&&this.setState({data:g})},f._getConnectionData=function(){var p=this.props;p.componentRef;var g=(0,Xb.default)(p,nRe),m=(0,Vn.default)((0,Vn.default)({},g),this.state.data),v=s(m);if(v==null)return null;var _=J$.get(),x=_.EDGES,E=_.PAGE_INFO,S=_.HAS_NEXT_PAGE,C=_.HAS_PREV_PAGE,k=_.END_CURSOR,N=_.START_CURSOR;typeof v!="object"&&cs(!1);var T=v[x],$=v[E];if(T==null||$==null)return null;Array.isArray(T)||cs(!1),typeof $!="object"&&cs(!1);var P=a===X$?$[S]:$[C],M=a===X$?$[k]:$[N];return typeof P!="boolean"||T.length!==0&&typeof M>"u"?null:{cursor:M,edgeCount:T.length,hasMore:P}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new cRe),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,g,m){var v=this,_=ey(this.props.__relayContext),x=_.environment,E=this.props;E.componentRef,E.__relayContext,E.__rootIsQueryRenderer;var S=(0,Xb.default)(E,iRe),C=(0,Vn.default)((0,Vn.default)({},S),this.state.data),k,N=Zb(t,S);k=pRe(t,S),k=(0,Vn.default)((0,Vn.default)((0,Vn.default)({},N),k),this._refetchVariables);var T=r.getVariables(C,{count:p.count,cursor:p.cursor},k);typeof T=="object"&&T!==null||cs(!1),T=(0,Vn.default)((0,Vn.default)({},T),this._refetchVariables),k=(0,Vn.default)((0,Vn.default)({},T),k);var $=m?{force:!!m.force}:void 0;$!=null&&m?.metadata!=null&&($.metadata=m?.metadata);var P=hRe(r.query),M=fRe(P,T,$),I=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var U=function(J,Y){var K=v._resolver.resolve();v._resolver.setVariables(l(k,p.totalCount),M.request.node);var G=v._resolver.resolve();ty(K,G)?Y():v.setState({data:G,contextForChildren:{environment:v.props.__relayContext.environment}},Y)},B=function(){v._refetchSubscription===I&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,I=this._getQueryFetcher().execute({environment:x,operation:M,preservePreviousReferences:!0}).mergeMap(function(q){return Q$.create(function(J){U(q,function(){J.next(),J.complete()})})}).do({error:B,complete:B,unsubscribe:B}).subscribe(g||{}),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,g=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var m=(0,Xb.default)(p,oRe);return ry.createElement(uRe.Provider,{value:this.state.contextForChildren},ry.createElement(e,(0,tRe.default)({},m,this.state.data,{ref:g,relay:this.state.relayProp})))},d})(ry.Component),(0,Dl.default)(n,"displayName",i),n}function yRe(e,t,r){return sRe(e,t,function(n,i){return bRe(n,i,r)})}var xRe={createContainer:yRe},Tv=Ke.default,nz=Tv(Vt),SRe=Tv(kv),ERe=Tv(Cv),wRe=Tv(ei),kRe=Cd,Qg=p2,CRe=Z5,RRe=ya,ny=xt,g2=mt,ARe=g2.createOperationDescriptor;g2.deepFreeze;var m2=g2.getRequest,Gi={},TRe={rootIsQueryRenderer:!0};ny.Component;function ux(){return{error:null,props:null,retry:null}}function NRe(){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 s=r.retry(o);s&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:s}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function v2(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function e3(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=m2(r),s=v2(o.params,e.variables);i=Gi[s]?Gi[s].queryFetcher:new Qg(n)}else i=new Qg(n);return(0,nz.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},iz(e,i,t.retryCallbacks))}function iz(e,t,r,n){var i=e.environment,o=e.query,s=e.variables,a=e.cacheConfig,l=i;if(o){var u=m2(o),d=ARe(u,s,a),f={environment:l};if(typeof n=="string"&&Gi[n]){var h=Gi[n].snapshot;return h?{error:null,relayContext:f,renderProps:Q0(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:ux(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),g=t.fetch({environment:l,onDataChange:null,operation:d}),m=g||p;return n=n||v2(u.params,e.variables),Gi[n]={queryFetcher:t,snapshot:m},m?{error:null,relayContext:f,renderProps:Q0(null,m,t,r),snapshot:m,requestCacheKey:n}:{error:null,relayContext:f,renderProps:ux(),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:NRe(),requestCacheKey:null}}}var Ad=Ke.default,$Re=Ad(wv),DRe=Ad(kd),Zu=Ad(Vt),t3=Ad(kv),FRe=Ad(Cv),iy=Ad(ei),IRe=["componentRef","__relayContext","__rootIsQueryRenderer"],PRe=u2,oy=tz,ORe=Rv,MRe=ORe.getContainerName,LRe=Cd,zRe=p2,URe=c2,sy=URe.assertRelayContext,r3=ya,ay=xt,zu=mt,BRe=zu.Observable,n3=zu.createFragmentSpecResolver,jRe=zu.createOperationDescriptor,i3=zu.getDataIDsFromObject,qRe=zu.getRequest,VRe=zu.getVariablesFromObject,KRe=zu.isScalarAndEqual;function HRe(e,t,r){var n,i=MRe(e);return n=(function(o){(0,FRe.default)(s,o);function s(l){var u,d;d=o.call(this,l)||this,(0,iy.default)((0,t3.default)(d),"_handleFragmentDataUpdate",function(){var g=d.state.resolver;d.setState(function(m){return g===m.resolver?{data:m.resolver.resolve()}:null})}),(0,iy.default)((0,t3.default)(d),"_refetch",function(g,m,v,_){if(d._isUnmounted)return{dispose:function(){}};var x=sy(d.props.__relayContext),E=x.environment,S=oy(t,d.props),C=typeof g=="function"?g(d._getFragmentVariables()):g;C=(0,Zu.default)((0,Zu.default)({},S),C);var k=m?(0,Zu.default)((0,Zu.default)({},C),m):C,N=_?{force:!!_.force}:void 0;N!=null&&_?.metadata!=null&&(N.metadata=_?.metadata);var T=typeof v=="function"?{next:v,error:v}:v||{},$=qRe(r),P=jRe($,C,N);d.state.localVariables=C,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var M,I=d._getQueryFetcher().lookupInStore(E,P,_?.fetchPolicy);return I!=null?(d.state.resolver.setVariables(k,P.request.node),d.setState(function(U){return{data:U.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){T.next&&T.next(),T.complete&&T.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:E,operation:P,preservePreviousReferences:!0}).mergeMap(function(U){return d.state.resolver.setVariables(k,P.request.node),BRe.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===M&&(d._refetchSubscription=null)}).subscribe((0,Zu.default)((0,Zu.default)({},T),{},{start:function(B){d._refetchSubscription=M=B,T.start&&T.start(B)}})),{dispose:function(){M&&M.unsubscribe()}})});var f=sy(l.__relayContext),h=(u=l.__rootIsQueryRenderer)!==null&&u!==void 0?u:!1;d._refetchSubscription=null;var p=n3(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:o3(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var a=s.prototype;return a.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.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()},s.getDerivedStateFromProps=function(u,d){var f,h=d.prevProps,p=sy(u.__relayContext),g=(f=u.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,m=i3(t,h),v=i3(t,u),_=oy(t,h),x=oy(t,u),E=d.resolver;if(d.prevPropsContext.environment!==p.environment||!r3(_,x)||!r3(m,v))return E=n3(p,i,t,u,g),{data:E.resolve(),localVariables:null,prevProps:u,prevPropsContext:p,contextForChildren:p,relayProp:o3(p.environment,d.relayProp.refetch),resolver:E};d.localVariables||E.setProps(u);var S=E.resolve();return S!==d.data?{data:S,prevProps:u}:null},a.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},a.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)&&!KRe(u[p],this.props[p]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();d!==h&&this.setState({data:h})},a._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})},a._getFragmentVariables=function(){return VRe(t,this.props)},a._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new zRe),this._queryFetcher},a.render=function(){var u=this.props,d=u.componentRef;u.__relayContext,u.__rootIsQueryRenderer;var f=(0,DRe.default)(u,IRe),h=this.state,p=h.relayProp,g=h.contextForChildren;return ay.createElement(LRe.Provider,{value:g},ay.createElement(e,(0,$Re.default)({},f,this.state.data,{ref:d,relay:p})))},s})(ay.Component),(0,iy.default)(n,"displayName",i),n}function o3(e,t){return{environment:e,refetch:t}}function WRe(e,t,r){return PRe(e,t,function(n,i){return HRe(n,i,r)})}var GRe={createContainer:WRe},JRe=xt;JRe.createContext({wrapPrepareQueryResource:function(t){return t()}});var QRe=Cd,YRe=Fe,XRe=xt,ZRe=XRe.useContext;function eAe(){var e=ZRe(QRe);return e==null&&YRe(!1),e.environment}var oz=eAe,sz=xt;sz.useContext;sz.useEffect;var tAe=Ke.default,s3=tAe(Vt),rAe=Fe,Uu=mt,a3=Uu.__internal.fetchQueryDeduped,l3=Uu.Observable,u3=Uu.PreloadableQueryRegistry,c3=Uu.ReplaySubject,d3=Uu.createOperationDescriptor,nAe=Uu.getRequest,iAe=Uu.getRequestIdentifier,f3=100001;function oAe(e,t,r,n,i){var o;f3++;var s=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",a=(0,s3.default)((0,s3.default)({},n?.networkCacheConfig),{},{force:!0}),l,u=!1,d=function(ie,oe){return u=!0,e.executeWithSource({operation:ie,source:oe})},f=new c3,h=l3.create(function(G){return f.subscribe(G)}),p,g=null,m=!1,v=function(ie,oe){m=!0;var _e=new c3,Re="raw-network-request-"+iAe(ie,r),Pe=a3(e,Re,function(){var xe=e.getNetwork();return xe.execute(ie,r,a,void 0,void 0,void 0,void 0,oe)}),at=Pe.subscribe({error:function(pt){g=pt,_e.error(pt)},next:function(pt){_e.next(pt)},complete:function(){_e.complete()}}),ve=at.unsubscribe;return p=ve,l3.create(function(xe){var pt=_e.subscribe(xe);return function(){pt.unsubscribe(),p()}})},_,x=function(ie,oe){m=!0;var _e=a3(e,ie.request.identifier,oe).subscribe({error:function(Pe){f.error(Pe)},next:function(Pe){f.next(Pe)},complete:function(){f.complete()}});_=_e.unsubscribe},E=function(ie){var oe=d3(ie,r,a);if(l=e.retain(oe),s!=="store-only"){var _e=s!=="store-or-network"||e.check(oe).status!=="available";_e&&x(oe,function(){var Re=v(ie.params,function(){return e.check(oe)}),Pe=d(oe,Re);return Pe})}},S,C,k;if(t.kind==="PreloadableConcreteRequest"){var N=t;S=N.params;var T=S;k=T.id,k===null&&rAe(!1);var $=u3.get(k);if($!=null)E($);else{var P=s==="store-only"?null:v(S),M=u3.onLoad(k,function(G){C();var ie=d3(G,r,a);l=e.retain(ie),P!=null&&x(ie,function(){return d(ie,P)})});C=M.dispose}}else{var I=t,U=nAe(I);S=U.params,k=S.cacheID!=null?S.cacheID:S.id,E(U)}var B=!1,q=!1,J=!1,Y=function(){q||(l&&l.dispose(),q=!0)},K=function(){J||(u?_&&_():p&&p(),C&&C(),J=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){B||(Y(),K(),B=!0)},releaseQuery:Y,cancelNetworkRequest:K,fetchKey:f3,id:k,get isDisposed(){return B||q},get networkError(){return g},name:S.name,networkCacheConfig:a,fetchPolicy:s,source:m?h:void 0,variables:r}}var Nv={loadQuery:oAe},sAe=Nv;sAe.loadQuery;var aAe=xt;aAe.useMemo;var lAe=Fe,uAe=(function(){function e(r){this._capacity=r,this._capacity>0||lAe(!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 cAe(e){return new uAe(e)}var dAe={create:cAe},fAe=Ke.default,ly=fAe(ei),hAe=300*1e3,pAe=(function(){function e(r){var n=this;(0,ly.default)(this,"_retainCount",0),(0,ly.default)(this,"_retainDisposable",null),(0,ly.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 s=this._retain(n),a=null,l=function(){clearTimeout(a),a=null,i._releaseTemporaryRetain=null,s.dispose()};return a=setTimeout(l,hAe),(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})(),gAe=pAe,az=Ke.default,x0=az(Vt),lz=az(ei),mAe=dAe,vAe=gAe,_Ae=Fe,bAe=mt,yAe=bAe.isPromise,xAe=1e3,uz="store-or-network",cz="store-and-network",SAe=typeof WeakMap=="function";function Yg(e){return e.request.node.params.metadata.live!==void 0}function cx(e,t,r,n,i){var o=r??(Yg(t)?cz:uz),s=n??e.UNSTABLE_getDefaultRenderPolicy(),a="".concat(o,"-").concat(s,"-").concat(t.request.identifier);return i!=null?"".concat(a,"-").concat(i):a}function h3(e,t){var r={__id:e.fragment.dataID,__fragments:(0,lz.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var EAe=2e5;function uy(e,t,r,n,i,o){var s=Yg(t),a=n,l=i,u=new vAe(function(f){var h=f.retain(t);return{dispose:function(){s&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:EAe++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return a},setValue:function(h){a=h},setNetworkSubscription:function(h){s&&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 wAe=(function(){function e(r){var n=this;(0,lz.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=mAe.create(xAe)}var t=e.prototype;return t.prepare=function(n,i,o,s,a,l,u){var d=cx(this._environment,n,o,s,l);return this.prepareWithIdentifier(d,n,i,o,s,a,u)},t.prepareWithIdentifier=function(n,i,o,s,a,l,u){var d=this._environment,f=s??(Yg(i)?cz:uz),h=a??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),g=null,m=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,u,(0,x0.default)((0,x0.default)({},l),{},{unsubscribe:function(x){g?.dispose();var E=l?.unsubscribe;E&&E(x)}}))),g=p.temporaryRetain(d);var v=p.getValue();if(yAe(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:m,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,s=n.cacheIdentifier,a=n.operation,l=this._getOrCreateCacheEntry(s,a,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,s){var a=this._environment,l=cx(a,n,i,o,s);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,s,a){var l=this._cache.get(n);return l==null&&(l=uy(n,i,o,s,a,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,s,a,l,u){var d=this,f=this._environment,h=f.check(i),p=h.status,g=p==="available",m=g||a==="partial"&&p!=="stale",v,_,x=function(){};switch(s){case"store-only":{v=!1,_=!0;break}case"store-or-network":{v=!g,_=m;break}case"store-and-network":{v=!0,_=m;break}case"network-only":default:{v=!0,_=!1;break}}if(_){var E=h3(i,n),S=uy(n,i,h,E,null,this._clearCacheEntry);this._cache.set(n,S)}if(v){var C=h3(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(){Yg(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 N=this._cache.get(n);if(!N){var T=new Promise(function(M){x=M});T.displayName="Relay("+i.fragment.node.name+")",N=uy(n,i,h,T,k,this._clearCacheEntry),this._cache.set(n,N)}}else{var $=u?.complete;$&&$()}var P=this._cache.get(n);return P==null&&_Ae(!1),f.__log({name:"queryresource.fetch",resourceID:P.id,operation:i,profilerContext:l,fetchPolicy:s,renderPolicy:a,queryAvailability:h,shouldFetch:v}),P},e})();function kAe(e){return new wAe(e)}var p3=SAe?new WeakMap:new Map;function CAe(e){var t=p3.get(e);if(t)return t;var r=kAe(e);return p3.set(e,r),r}var ap={getQueryResourceForEnvironment:CAe,getQueryCacheIdentifier:cx},RAe=xt;RAe.useMemo;var dz=xt;dz.useCallback;dz.useEffect;var AAe=xt,TAe=mt,NAe=TAe.__internal.createRelayLoggingContext,$Ae=NAe(AAe),DAe=$Ae,FAe=xt,IAe=FAe.useContext;function PAe(){return IAe(DAe)}var fz=PAe,_2=Ke.default,g3=_2(Vt),gl=_2(Ir),OAe=_2(Sl),MAe=ap,hz=MAe.getQueryResourceForEnvironment,LAe=oz,zAe=fz,Fl=Fe,lp=xt;lp.useDebugValue;var cy=lp.useEffect,dy=lp.useMemo,m3=lp.useRef,S0=lp.useState,Ea=mt,pz=Ea.__internal,UAe=pz.fetchQuery,BAe=pz.getPromiseForActiveRequest,E0=Ea.RelayFeatureFlags,v3=Ea.areEqualSelectors,jAe=Ea.createOperationDescriptor,qAe=Ea.getPendingOperationsForFragment,VAe=Ea.getSelector,KAe=Ea.getVariablesFromFragment,_3=Ea.handlePotentialSnapshotErrors,b3=Ea.recycleNodesInto;function HAe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function WAe(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 s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,gl.default)(o.missingClientEdges),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function GAe(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 s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,gl.default)(o.missingLiveResolverFields),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function JAe(e,t,r){if(t.kind==="singular")_3(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;_3(e,o.fieldErrors,r)}}catch(s){n.e(s)}finally{n.f()}}}function Xg(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=b3(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 s=!1,a=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=b3(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&&(s=!0),a.push(h)}return a.length!==t.snapshots.length&&Fl(!1),[s,{kind:"plural",snapshots:a,epoch:r}]}}function QAe(e,t,r,n,i){var o=KAe(t,r),s=(0,g3.default)((0,g3.default)({},o),{},{id:n.clientEdgeDestinationID}),a=jAe(n.request,s,i?.networkCacheConfig),l=hz(e),u=l.prepare(a,UAe(e,a),i?.fetchPolicy);return[u,BAe(e,a.request)]}function YAe(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(s){r(function(a){if(a.kind!=="singular"||a.snapshot.selector!==s.selector){var l=Xg(e,a);if(l!=null){var u=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),n.current=u,u?d:a}else return a}return n.current=!0,{kind:"singular",snapshot:s,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(s,a){return e.subscribe(s,function(l){r(function(u){var d;if(u.kind!=="plural"||((d=u.snapshots[a])===null||d===void 0?void 0:d.selector)!==l.selector){var f=Xg(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 g=(0,OAe.default)(u.snapshots);return g[a]=l,n.current=!0,{kind:"plural",snapshots:g,epoch:e.getStore().getEpoch()}})})});return function(){var s=(0,gl.default)(o),a;try{for(s.s();!(a=s.n()).done;){var l=a.value;l.dispose()}}catch(u){s.e(u)}finally{s.f()}}}}function y3(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 XAe(e,t,r,n){var i,o,s=dy(function(){return VAe(e,t)},[e,t]),a=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;a?t==null||Array.isArray(t)||Fl(!1):Array.isArray(t)&&Fl(!1),t==null||a&&Array.isArray(t)&&t.length===0||s!=null||Fl(!1);var l=LAe(),u;E0.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=zAe());var d=S0(function(){return y3(l,s)}),f=d[0],h=d[1],p=f,g=S0(p),m=g[0],v=g[1],_=m,x=S0(s),E=x[0],S=x[1],C=S0(l),k=C[0],N=C[1];if(!v3(s,E)||l!==k){S(s),N(l);var T=y3(l,s);h(T),v(T),p=T,_=T}var $=m3(!1);if(cy(function(){$.current=s},[s]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||E0.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var P=dy(function(){var _e=WAe(p),Re,Pe=[];if(_e!=null&&_e.length){Re=[];var at=(0,gl.default)(_e),ve;try{for(at.s();!(ve=at.n()).done;){var xe=ve.value,pt=QAe(l,e,t,xe,n),ur=pt[0],It=pt[1];Re.push(ur),It!=null&&Pe.push(It)}}catch(wi){at.e(wi)}finally{at.f()}}return[Re,Pe]},[p,l,e,t,n]),M=P[0],I=P[1];if(I.length)throw Promise.all(I);cy(function(){var _e=hz(l);if(M!=null&&M.length){var Re=[],Pe=(0,gl.default)(M),at;try{for(Pe.s();!(at=Pe.n()).done;){var ve=at.value;Re.push(_e.retain(ve))}}catch(xe){Pe.e(xe)}finally{Pe.f()}return function(){for(var xe=0,pt=Re;xe<pt.length;xe++){var ur=pt[xe];ur.dispose()}}}},[l,M])}if(HAe(p)){var U=GAe(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||!$.current||!v3($.current,s)){s==null&&Fl(!1);var B=s.kind==="PluralReaderSelector"?s.selectors[0].owner:s.owner,q=qAe(l,e,B);if(q)throw q.promise}}JAe(l,p,u);var J=m3(!1);if(cy(function(){var _e=_,Re=Xg(l,_);if(Re!==null){var Pe=Re[0],at=Re[1];Pe&&h(at),_e=at}return YAe(l,_e,h,J)},[l,_]),J.current){var Y=Xg(l,p);if(Y!=null){var K=Y[0],G=Y[1];K&&(h(G),p=G)}J.current=!1}var ie;if(a){var oe=t==null;ie=dy(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"?ie=null:(p.kind!=="singular"&&Fl(!1),ie=p.snapshot.data);return E0.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(ie===void 0||Array.isArray(ie)&&ie.length>0&&ie.every(function(_e){return _e===void 0})),ie}var ZAe=XAe,b2=Ke.default,x3=b2(Vt),ml=b2(Ir),eTe=b2(Sl),tTe=ap,gz=tTe.getQueryResourceForEnvironment,rTe=oz,nTe=fz,Il=Fe,up=xt;up.useDebugValue;var w0=up.useEffect,fy=up.useMemo,S3=up.useRef,iTe=up.useState,wa=mt,mz=wa.__internal,oTe=mz.fetchQuery,sTe=mz.getPromiseForActiveRequest,k0=wa.RelayFeatureFlags,E3=wa.areEqualSelectors,aTe=wa.createOperationDescriptor,lTe=wa.getPendingOperationsForFragment,uTe=wa.getSelector,cTe=wa.getVariablesFromFragment,w3=wa.handlePotentialSnapshotErrors,k3=wa.recycleNodesInto;function dTe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function fTe(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 s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,ml.default)(o.missingClientEdges),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function hTe(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 s;r=(s=r)!==null&&s!==void 0?s:[];var a=(0,ml.default)(o.missingLiveResolverFields),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;r.push(u)}}catch(d){a.e(d)}finally{a.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function pTe(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(s){n.e(s)}finally{n.f()}}}function dx(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,selector:t.selector,environment:t.environment}]}else{for(var s=!1,a=[],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&&(s=!0),a.push(h)}return a.length!==t.snapshots.length&&Il(!1),[s,{kind:"plural",snapshots:a,epoch:r,selector:t.selector,environment:t.environment}]}}function gTe(e,t,r,n,i){var o=cTe(t,r),s=(0,x3.default)((0,x3.default)({},o),{},{id:n.clientEdgeDestinationID}),a=aTe(n.request,s,i?.networkCacheConfig),l=gz(e),u=l.prepare(a,oTe(e,a),i?.fetchPolicy),d=sTe(e,a.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[u,d]}function C3(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(s){var a=null;if(s.kind!=="singular"||s.snapshot.selector!==o.selector||s.environment!==e){var l=dx(s.environment,s);if(l!=null){var u=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),a=u?d:s}else a=s}else a={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return a})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,s){return e.subscribe(o,function(a){r(function(l){var u,d=null;if(l.kind!=="plural"||((u=l.snapshots[s])===null||u===void 0?void 0:u.selector)!==a.selector||l.environment!==e){var f=dx(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 g=(0,eTe.default)(l.snapshots);g[s]=a,d={kind:"plural",snapshots:g,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,ml.default)(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;a.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function R3(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 mTe(e,t,r,n){var i,o,s=fy(function(){return uTe(e,t)},[e,t]),a=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;a?t==null||Array.isArray(t)||Il(!1):Array.isArray(t)&&Il(!1),t==null||a&&Array.isArray(t)&&t.length===0||s!=null||Il(!1);var l=rTe(),u;k0.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=nTe());var d=iTe(function(){return R3(l,s)}),f=d[0],h=d[1],p=f,g=p.environment;if(!E3(s,p.selector)||l!==p.environment){var m=R3(l,s);h(m),p=m}var v=S3(!1);if(w0(function(){v.current=s},[s]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||k0.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var _=fy(function(){var I=fTe(p),U,B=[];if(I!=null&&I.length){U=[];var q=(0,ml.default)(I),J;try{for(q.s();!(J=q.n()).done;){var Y=J.value,K=gTe(l,e,t,Y,n),G=K[0],ie=K[1];U.push(G),ie!=null&&B.push(ie)}}catch(oe){q.e(oe)}finally{q.f()}}return[U,B]},[p,l,e,t,n]),x=_[0],E=_[1];if(E.length){var S=Promise.all(E);throw S.displayName="RelayClientEdge(".concat(E.map(function(I){return I.displayName}).join(","),")"),S}w0(function(){var I=gz(l);if(x!=null&&x.length){var U=[],B=(0,ml.default)(x),q;try{for(B.s();!(q=B.n()).done;){var J=q.value;U.push(I.retain(J))}}catch(Y){B.e(Y)}finally{B.f()}return function(){for(var Y=0,K=U;Y<K.length;Y++){var G=K[Y];G.dispose()}}}},[l,x])}if(dTe(p)){var C=hTe(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!==g||!v.current||!E3(v.current,s)){s==null&&Il(!1);var N=s.kind==="PluralReaderSelector"?s.selectors[0].owner:s.owner,T=lTe(l,e,N);if(T)throw T.promise}}pTe(l,p,u);var $=S3(null);w0(function(){var I=$.current;if(I!=null){if(p.environment===I.environment&&p.selector===I.selector)return;I.dispose()}if(p.kind!=="bailout"){var U=p,B=dx(p.environment,p);if(B!==null){var q=B[0],J=B[1];if(q){h(J);return}U=J}var Y=C3(p.environment,U,h);$.current={dispose:Y,selector:p.selector,environment:p.environment}}},[p]),w0(function(){if($.current==null&&p.kind!=="bailout"){var I=C3(p.environment,p,h);$.current={dispose:I,selector:p.selector,environment:p.environment}}return function(){var U;(U=$.current)===null||U===void 0||U.dispose(),$.current=null}},[]);var P;if(a){var M=t==null;P=fy(function(){return p.kind==="bailout"?M?null:[]:(p.kind!=="plural"&&Il(!1),p.snapshots.map(function(I){return I.data}))},[p,M])}else p.kind==="bailout"?P=null:(p.kind!=="singular"&&Il(!1),P=p.snapshot.data);return k0.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(P===void 0||Array.isArray(P)&&P.length>0&&P.every(function(I){return I===void 0})),P}var vTe=mTe,vz=Ke.default;vz(ZAe);vz(vTe);var _z=ap;_z.getQueryCacheIdentifier;_z.getQueryResourceForEnvironment;var $v=xt;$v.useContext;$v.useEffect;$v.useState;$v.useRef;var _Te=xt;_Te.useState;var bTe=xt,bz=mt;bz.createOperationDescriptor;bz.getRequest;bTe.useMemo;var yTe=mt;yTe.__internal.fetchQuery;var xTe=Ke.default;xTe(Vt);var yz=xt;yz.useEffect;yz.useRef;var STe=Ke.default;STe(Ir);var Dv=xt;Dv.useCallback;Dv.useEffect;Dv.useRef;Dv.useState;var ETe=xt;ETe.useDebugValue;var wTe=mt;wTe.getFragment;var kTe=Ke.default;kTe(Vt);var Fv=xt,CTe=mt;CTe.commitMutation;Fv.useState;Fv.useEffect;Fv.useRef;Fv.useCallback;var xz=mt;xz.ConnectionInterface;xz.getValueAtPath;var y2=xt,Sz=mt;Sz.__internal.getObservableForActiveRequest;Sz.getSelector;y2.useEffect;y2.useState;y2.useMemo;var RTe=Ke.default;RTe(Vt);var x2=xt;x2.useCallback;x2.useRef;x2.useState;var cp=mt;cp.__internal.fetchQuery;cp.createOperationDescriptor;cp.getPaginationVariables;cp.getRefetchMetadata;cp.getSelector;var ATe=Ke.default;ATe(Vt);var S2=xt;S2.useCallback;S2.useEffect;S2.useState;var Td=mt;Td.__internal.fetchQuery;Td.RelayFeatureFlags;Td.createOperationDescriptor;Td.getPaginationVariables;Td.getRefetchMetadata;Td.getSelector;var Ez=Ke.default;Ez(Vt);Ez(Ir);var TTe=ap;TTe.getQueryResourceForEnvironment;var Bu=mt;Bu.__internal.fetchQuery;Bu.RelayFeatureFlags;Bu.createOperationDescriptor;Bu.getPendingOperationsForFragment;Bu.getSelector;Bu.getVariablesFromFragment;Bu.handlePotentialSnapshotErrors;var NTe=Ke.default;NTe(Ir);var $Te=Nv;$Te.loadQuery;var dp=xt;dp.useCallback;dp.useEffect;dp.useInsertionEffect;dp.useRef;dp.useState;var DTe=mt;DTe.getRequest;var FTe=Ke.default;FTe(Ir);var ITe=Nv;ITe.loadQuery;var Iv=xt;Iv.useCallback;Iv.useEffect;Iv.useRef;Iv.useState;var wz=mt;wz.RelayFeatureFlags;wz.getRequest;var PTe=Ke.default;PTe(Vt);var OTe=ap;OTe.getQueryResourceForEnvironment;var E2=xt;E2.useCallback;E2.useContext;E2.useReducer;var Nd=mt;Nd.__internal.fetchQuery;Nd.createOperationDescriptor;Nd.getFragmentIdentifier;Nd.getRefetchMetadata;Nd.getSelector;Nd.getValueAtPath;var MTe=Ke.default;MTe(Vt);var w2=xt;w2.useCallback;w2.useDebugValue;w2.useState;var Pv=mt;Pv.RelayFeatureFlags;Pv.getFragment;Pv.getFragmentIdentifier;Pv.getPaginationMetadata;var LTe=Ke.default;LTe(Vt);var ju=xt;ju.useCallback;ju.useDebugValue;ju.useEffect;ju.useLayoutEffect;ju.useMemo;ju.useRef;ju.useState;var k2=mt;k2.getFragment;k2.getFragmentIdentifier;k2.getPaginationMetadata;var Ov=mt;Ov.ConnectionInterface;Ov.RelayFeatureFlags;Ov.getSelector;Ov.getValueAtPath;var zTe=xt;zTe.useDebugValue;var UTe=mt,kz=UTe.__internal;kz.fetchQueryDeduped;kz.fetchQuery;var BTe=xt;BTe.useDebugValue;var jTe=mt;jTe.getFragment;var Cz=xt;Cz.useEffect;Cz.useRef;var qTe=xt;qTe.useEffect;var VTe=mt;VTe.requestSubscription;var KTe=Cd,HTe=KCe,WTe=xRe,GTe=GRe,JTe=Nv;JTe.loadQuery;var ko=mt,QTe={ConnectionHandler:ko.ConnectionHandler,MutationTypes:ko.MutationTypes,RangeOperations:ko.RangeOperations,ReactRelayContext:KTe,applyOptimisticMutation:ko.applyOptimisticMutation,commitLocalUpdate:ko.commitLocalUpdate,commitMutation:ko.commitMutation,createFragmentContainer:HTe.createContainer,createPaginationContainer:WTe.createContainer,createRefetchContainer:GTe.createContainer,fetchQuery_DEPRECATED:ko.fetchQuery_DEPRECATED,graphql:ko.graphql,readInlineData:ko.readInlineData,requestSubscription:ko.requestSubscription,fetchQuery:ko.fetchQuery},YTe=QTe;function XTe(e){let t=YTe.ReactRelayContext.Provider;return Ar(t,{value:{environment:e.environment},children:e.children})}let ZTe={make:XTe},eNe={Provider:ZTe};function tNe(e,t,r){let n=async(i,o,s,a)=>{let l=D(ys(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,g=await p();return jg(g)&&r(),g};return sCe.make(mt.Network.create(n),nCe.make(new mt.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function rNe(e){let t=e.config,r=$s(),n=jt(()=>tNe(t,()=>R(r,i=>i.getToken()),()=>se(r,i=>i.logout())),[t,r]);return b(eNe.Provider.make,{environment:n,children:e.children})}let nNe=rNe;function iNe(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function oNe(e,t){return e+"_"+t+"EventHistory"}function sNe(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 aNe(e){return fe(R(Q(e),t=>O(t,"x-reventless-audit")),!1,t=>{let r=it(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let A3={contents:[]};function T3(e){if(!A3.contents.includes(e)){A3.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 lNe(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=iNe(e.queryField);if(r!==void 0){if(n!==void 0){let i=oNe(n,r);return{queryField:i,queryDocument:sNe(i),displayName:r}}T3(e.name);return}T3(e.name)}function Da(e,t){return R(O(e,t),ce)}function uNe(e){let t=D(Q(e),{}),r=D(R(O(t,"meta"),Q),{}),n=ne(D(R(O(t,"tags"),br),[]),a=>{let l=D(Q(a),{}),u=Da(l,"key"),d=Da(l,"value");if(u!==void 0&&d!==void 0)return[u,d]}),i=Da(t,"position"),o=Da(t,"eventType");if(i===void 0||o===void 0)return;let s=D(Da(r,"time"),D(Da(t,"recordedAt"),""));return{position:i,eventType:o,payload:D(O(t,"payload"),{}),tags:n,actor:Da(r,"user"),time:s,recordedAt:D(Da(t,"recordedAt"),s)}}function cNe(e,t){return ne(cE(e,t),uNe)}function dNe(e,t){let r=l4(e,t);return[r.hasNextPage,r.endCursor]}function fNe(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return bt(r).toLowerCase()}function hNe(e){return D(W(Q(e),Ge),[]).filter(t=>t[0]!=="TAG")}function pNe(e){let t={};return e.map(r=>{let n=JSON.stringify(dt(Ge(t)),null,2);hNe(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(dt(Ge(t)),null,2);return[n,i]})}let gNe="System";function mNe(e,t){let r=pNe(e);return e.map((n,i)=>{let o=D(r[i],["",""]),s=fe(n.tags[0],t,a=>t+" "+a[1]);return{id:n.position,verb:fNe(n.eventType,t),subject:s,actor:D(n.actor,gNe),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function vNe(e){let t=[];return e.forEach(r=>se(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(zf)}function _Ne(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(zf)}function $i(e){return"var("+e+")"}let bNe=w([z("flex"),pe("column"),Z("center"),Xe("center"),c("gap",$i(F.lg)),c("padding",$i(F.xxl)),Ko({NAME:"percent",VAL:100}),YF({NAME:"percent",VAL:100}),ha("center"),c("min-height","400px")]),yNe=w([c("font-size","48px"),c("line-height","1")]),xNe=w([c("color",$i(y.textPrimary)),c("font-size",$i(A.sizeXxl)),c("font-weight",$i(A.weightBold)),yn(Ce(0))]),SNe=w([c("color",$i(y.textSecondary)),c("font-size",$i(A.sizeLg)),c("line-height",$i(A.lineHeightRelaxed)),c("max-width","480px"),yn(Ce(0))]),ENe=w([c("background",$i(y.brand)),c("color",$i(y.textOnBrand)),c("border-radius",$i(X.md)),c("padding","var("+F.sm+") var("+F.lg+")"),c("font-size",$i(A.sizeMd)),c("font-weight",$i(A.weightMedium)),c("border","none"),c("cursor","pointer"),Cs(Ce(8))]);function wNe(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:yNe}),b("h2",{children:t.title,className:xNe}),b("p",{children:fe(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:SNe}),b("button",{children:"Upgrade to unlock",className:ENe})],className:bNe})}let kNe=wNe;function CNe(e){let t=e.children,r=e.definition,n=xl(),i=r.requiredAccess;return i!==void 0&&!n(i)?b(kNe,{definition:r}):t}let C0=CNe,RNe=O;function N3(e,t){let r=R(t[0],n=>O(e,n));if(r!==void 0&&t.every(n=>Ue(O(e,n),r)))return r}function Zg(e,t,r){let n=O(e,t);return n!==void 0?r(n):!0}function C2(e,t,r){return ne(t,n=>{let i=O(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}function Rz(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let R2=["body","text","message","comment","content"],ANe=["author","createdby","user","commenter","postedby"],TNe=["createdat","postedat","at","commentedat"];function Az(e){return ne(Tr(e),t=>{if(Mh(t[1]))return t[0]})}function A2(e,t){return Az(e).find(r=>t.includes(r.toLowerCase()))}function NNe(e){let t=Br(e,void 0,void 0),r=Tr(e).map(n=>n[0]).find(n=>fe(O(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:A2(e,ANe)}function $Ne(e){return ne(Tr(e),t=>{if(Cm(t[1]))return t[0]}).find(t=>TNe.includes(t.toLowerCase()))}function Tz(e){return Az(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function DNe(e,t){let r=Rz(t).toLowerCase();return Tz(e).find(n=>n.toLowerCase()===r+"id")}function FNe(e){let t=Tz(e);if(t.length===1)return t[0]}function INe(e){return fe(R(Q(e),t=>O(t,"x-reventless-comments")),!1,t=>{let r=it(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function $3(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=Rz(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let PNe=["addcomment","postcomment","comment","writecomment","leavecomment"];function ONe(e,t){let r=ne(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>PNe.some(i=>n.name.toLowerCase().startsWith(i)))}let D3={contents:[]};function MNe(e){if(!D3.contents.includes(e)){D3.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 '+R2.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function LNe(e,t){return ne(e.readModels.filter(r=>r.name!==t?INe(r.schema)?!0:$3(r.name,t):!1),r=>{let n=DNe(r.schema,t),i=n!==void 0?n:$3(r.name,t)?FNe(r.schema):void 0,o=A2(r.schema,R2);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:NNe(r.schema),timestampField:$Ne(r.schema),postCommand:ONe(r,e)}:void 0;MNe(r.name)})[0]}function ec(e,t){return R(O(e,t),ce)}function zNe(e,t,r){let n=ne(t,o=>{let s=D(Q(o),{});if(Ue(ec(s,e.entityField),r))return s}),i=o=>R(R(e.timestampField,s=>ec(o,s)),$n);return n.toSorted((o,s)=>{let a=i(o),l=i(s);return a!==void 0?l!==void 0?a-l:-1:l!==void 0?1:0}).map((o,s)=>({id:D(ec(o,"id"),"#"+s.toString()),body:D(ec(o,e.bodyField),""),author:R(e.authorField,a=>ec(o,a)),timestamp:R(e.timestampField,a=>ec(o,a))}))}function UNe(e,t,r){let n=e.postCommand,i=D(R(n,s=>s.aggregateIdField),e.entityField),o=D(R(n,s=>A2(s.schema,R2)),e.bodyField);return dt([[i,t],[o,r]])}function bs(e){return"var("+e+")"}let BNe=w([Ut("fixed"),pa(Ce(0)),nd(Ce(0)),bl(Ce(0)),Wx(Ce(0)),c("background","rgba(0,0,0,0.5)"),z("flex"),Z("center"),Xe("center"),c("z-index","1000"),c("backdrop-filter","blur(2px)")]),jNe=w([c("background",bs(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",bs(X.lg)),c("box-shadow",bs(mn.lg)),z("flex"),pe("column"),c("max-height","90vh"),c("max-width","90vw"),c("min-width","400px"),c("overflow","hidden")]),qNe=w([z("flex"),Z("center"),Xe("spaceBetween"),c("padding","var("+F.md+") var("+F.lg+")"),c("border-bottom","1px solid var("+y.borderSubtle+")"),_i(0)]),VNe=w([c("color",bs(y.textPrimary)),c("font-size",bs(A.sizeLg)),c("font-weight",bs(A.weightMedium)),yn(Ce(0))]),KNe=w([c("background","none"),c("border","none"),c("cursor","pointer"),c("color",bs(y.textSecondary)),c("font-size","18px"),c("padding","0"),c("line-height","1"),We([c("color",bs(y.textPrimary))])]),HNe=w([c("padding",bs(F.lg)),c("overflow-y","auto"),vo(1)]),WNe=w([z("flex"),Z("center"),Xe("flexEnd"),c("gap",bs(F.sm)),c("padding","var("+F.md+") var("+F.lg+")"),c("border-top","1px solid var("+y.borderSubtle+")"),_i(0)]);function GNe(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:VNe}),b("button",{children:"x",className:KNe,onClick:n=>t()})],className:qNe}),b("div",{children:e.children,className:HNe}),fe(e.footer,null,n=>b("div",{children:n,className:WNe}))],className:jNe,style:fe(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:BNe,onClick:n=>t()}):null}let T2=GNe;function Li(e){return"var("+e+")"}let JNe=w([z("flex"),pe("column"),c("gap",Li(F.sm))]),QNe=w([c("overflow-x","auto")]),YNe=w([c("border-collapse","collapse"),c("font-size",Li(A.sizeSm)),c("min-width","min-content")]),N2=[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(A.weightMedium))],XNe=w(N2.concat([c("text-align","left"),c("color",Li(y.textSecondary))])),ZNe=w(N2.concat([c("text-align","right"),c("color",Li(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Li(A.sizeXs))])),e$e=w(N2.concat([c("text-align","left"),c("color",Li(y.textPrimary))]));function t$e(e){return w([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 r$e=w([z("flex"),Z("center"),c("gap","6px"),c("font-size",Li(A.sizeXs)),c("color",Li(y.textSecondary))]);function n$e(e){return w([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 Nz(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function i$e(e){return st(e,0,(t,r)=>st(r,t,(n,i)=>i.value>n?i.value:n))}let $z=[.12,.35,.6,.85,1];function o$e(e){let t=e.cells,r=e.colHeaders,n=i$e(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:XNe,scope:"col"}),r.map(i=>b("th",{children:i.label,className:ZNe,scope:"col"},i.value))]})}),b("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[b("th",{children:i.label,className:e$e,scope:"row"}),r.map((s,a)=>{let l=D(R(t[o],u=>u[a]),{value:0,display:""});return b("td",{children:b("span",{children:l.display,title:i.label+" × "+s.label+": "+l.display}),className:t$e(Nz(l.value,n))},i.value+":"+s.value)})]},i.value))})],className:YNe}),className:QNe}),L("div",{children:["0",$z.map(i=>b("span",{className:n$e(i)},i.toString())),e.maxLabel],className:r$e})],className:JNe})}let s$e=o$e;function a$e(e,t){let r=s=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(s,a,l)=>{if(typeof s!="object")switch(s){case"Function":case"Lazy":a[l]=r;return;case"Class":a[l]=[r,r,r,0];return}else{if(s.TAG!=="Module"){a[l]=s._0;return}let u=s._0,d={};a[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 l$e(e,t,r){let n=(i,o,s,a,l)=>{if(typeof i!="object")switch(i){case"Function":a[l]=s;return;case"Lazy":case"Class":Object.assign(o,s);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],s[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,s=i.length;o<s;++o){let a=i[o],l=a[1];n(a[0],t[l],r[l],t,l)}return}}function fx(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function u$e(e,t,r){let n=R(O(e,t),fx);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let s=o,a=i;if(s>r)return!0;let l=R(O(e,a),fx);if(l===void 0)return!1;if(l===t)return!0;o=s+1|0,i=l}}}else return!1}function c$e(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},s={contents:0};e.forEach(l=>{let u=fx(l);if(u!==void 0){if(O(t,u)!==void 0){if(u$e(t,l.key,r)){s.contents=s.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 a=(l,u)=>{let d=O(t,l);if(d===void 0)return;let f=u>=r?[]:ne(D(O(n,l),[]),h=>a(h,u+1|0));return{node:d,children:f}};return{roots:ne(i,l=>a(l,0)),detached:o.contents,cycles:s.contents}}function Dz(e){return st(e.children,e.children.length,(t,r)=>t+Dz(r)|0)}let d$e="14px";function gn(e){return"var("+e+")"}let f$e=w([z("flex"),pe("column"),c("gap",gn(F.sm))]),h$e=w([c("overflow-x","auto"),c("padding-bottom","4px")]),p$e=w([z("flex"),Z("flexStart"),Xe("center"),c("gap",gn(F.lg)),c("min-width","min-content"),c("padding","var("+F.xs+") 0")]),g$e=w([z("flex"),pe("column"),Z("center"),c("min-width","min-content")]);function m$e(e){return w([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",gn(X.md)),c("background",gn(y.surface)),c("text-align","left"),ye("pointer"),We([c("background",gn(y.surfaceSubtle))])])}let v$e=w([c("font-size",gn(A.sizeSm)),c("font-weight",gn(A.weightMedium)),c("color",gn(y.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),_$e=w([c("font-size",gn(A.sizeXs)),c("color",gn(y.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),b$e=w([c("margin-top","2px"),c("padding","0 6px"),c("border","1px solid var("+y.border+")"),c("border-radius","10px"),c("background",gn(y.surface)),c("color",gn(y.textSecondary)),c("font-size",gn(A.sizeXs)),c("line-height","16px"),ye("pointer"),We([c("color",gn(y.textPrimary))])]),F3=w([c("width","1px"),c("height",d$e),c("background",gn(y.border))]),y$e=w([z("flex"),Z("flexStart"),c("min-width","min-content")]),x$e=w([z("flex"),pe("column"),Z("center"),c("min-width","min-content")]),S$e=w([c("padding","0 var("+F.xs+")")]),E$e=w([z("flex"),c("width","100%"),c("height","1px")]);function I3(e){return w([c("flex","1 1 50%"),c("background",e?gn(y.border):"transparent")])}let w$e=w([c("font-size",gn(A.sizeXs)),c("color",gn(y.textDisabled))]),k$e="var("+y.brand+")",$2=a$e(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function C$e(e){let t=e.depth,r=e.tree,n=ae(()=>!1),i=n[1],o=n[0],s=Dz(r),a=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[b("span",{children:r.node.title,className:v$e}),l!==void 0&&l!==""?b("span",{children:l,className:_$e}):null],className:m$e(D(r.node.accent,k$e)),title:r.node.title,onClick:u=>se(r.node.onOpen,d=>d())}),a===0?null:L(Hr,{children:[b("button",{children:o?"+"+s.toString():"−","aria-expanded":!o,className:b$e,title:o?"Expand":"Collapse",onClick:u=>i(d=>!d)}),o?null:L(Hr,{children:[b("div",{className:F3}),b("div",{children:r.children.map((u,d)=>L("div",{children:[L("div",{children:[b("div",{className:I3(d>0)}),b("div",{className:I3(d<(a-1|0))})],className:E$e}),b("div",{className:F3}),b("div",{children:b($2.make,{tree:u,depth:t+1|0}),className:S$e})],className:x$e},u.node.key)),className:y$e})]})]})],className:g$e})}l$e({_0:[["Function","make"]]},$2,{make:C$e});function R$e(e){let t=c$e(e.nodes);if(t.roots.length===0)return b(id,{title:"Nothing to chart",description:"No rows in this window."});let r=ne([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($2.make,{tree:n,depth:0},n.node.key)),className:p$e}),className:h$e}),r.length===0?null:b("span",{children:r.join(" · "),className:w$e})],className:f$e})}let A$e=R$e;function zi(e){return"var("+e+")"}let T$e=w([Ut("relative"),c("padding-left","28px"),z("flex"),pe("column"),c("gap",zi(F.md))]),N$e=w([Ut("absolute"),nd(Ce(7)),pa(Ce(8)),Wx(Ce(0)),c("width","2px"),c("background",zi(y.borderSubtle))]),$$e=w([Ut("absolute"),nd(Ce(-21)),pa(Ce(6)),c("width","10px"),c("height","10px"),c("border-radius","50%"),c("background",zi(y.brand)),c("border","2px solid var("+y.surface+")"),_i(0)]),Fz=w([Ut("relative"),z("flex"),pe("column"),c("gap","2px")]),D$e=Fr([Fz,w([c("background","none"),c("border","none"),c("padding","0"),ha("left"),ye("pointer"),We([c("opacity","0.85")])])]),F$e=w([z("flex"),Z("center"),c("gap",zi(F.sm))]),I$e=w([c("color",zi(y.textDisabled)),c("font-size",zi(A.sizeXs)),c("font-family",zi(A.fontFamilyMono))]),P$e=w([c("color",zi(y.textPrimary)),c("font-size",zi(A.sizeMd)),c("font-weight",zi(A.weightMedium))]),O$e=w([c("color",zi(y.textSecondary)),c("font-size",zi(A.sizeSm)),c("line-height",zi(A.lineHeightNormal)),Ih(Ce(0))]);function M$e(e){let t=e.onSelect,r=n=>L(Hr,{children:[b("div",{className:$$e,style:W(n.accent,i=>({background:i}))}),L("div",{children:[b("span",{children:n.timestamp,className:I$e}),fe(n.variant,null,i=>b(na,{variant:i,label:n.label})),fe(n.variant,b("span",{children:n.label,className:P$e}),i=>null)],className:F$e}),fe(n.detail,null,i=>b("div",{children:i,className:O$e}))]});return L("div",{children:[b("div",{className:N$e}),e.entries.map(n=>t!==void 0?b("button",{children:r(n),className:D$e,type:"button",onClick:i=>t(n.id)},n.id):b("div",{children:r(n),className:Fz},n.id))],className:T$e})}let L$e=M$e;function z$e(e){let t=e[0];if(t===void 0)return;let r=st(e,t.start,(i,o)=>o.start<i?o.start:i),n=st(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[Gn(r),oo(Gn(n),1)]}function U$e(e,t){let r=(t-e)/HI;return r<=21?"Days":r<=120?"Weeks":"Months"}function P3(e){let t=new Date(e).getMonth()|0;return D(VI[t],"").slice(0,3)}function B$e(e,t){switch(t){case"Days":return sa(e);case"Weeks":return KI(e).toString()+" "+P3(e);case"Months":let r=new Date(e).getFullYear().toString();return P3(e)+" '"+r.slice(2)}}function j$e(e,t,r){let n=l=>{switch(r){case"Days":return oo(Gn(e),l);case"Weeks":return oo(Am(e),l*7|0);case"Months":return LI(zI(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 s=i.length,a=s<=40?1:(s/40|0)+1|0;return CF(i,(l,u)=>{if(Uo(u,a)===0)return[l,B$e(l,r)]})}function em(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function Df(e){return e<0?0:e>100?100:e}function hx(e,t,r){let n=Df(em(e.start,t,r)),o=Df(em(e.end_>e.start?e.end_:e.start,t,r))-n,s=o<.6?.6:o;return[n+s>100?100-s:n,s]}function Iz(e){return e.map(t=>ne(t.dependsOn,r=>W(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 q$e(e){return st(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function Pz(e){return Iz(e).filter(t=>t.violated)}function V$e(e,t){return Pz(e).some(r=>r.to_===t)}let D2="184px";function Qt(e){return"var("+e+")"}let K$e=w([z("flex"),pe("column"),c("gap",Qt(F.sm))]),H$e=w([z("flex"),Z("center"),Xe("spaceBetween"),bi("wrap"),c("gap",Qt(F.sm))]),W$e=w([z("inlineFlex"),Z("center"),c("gap",Qt(F.xs))]),Oz=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",Qt(X.sm)),c("padding","2px var("+F.sm+")"),c("color",Qt(y.textSecondary)),c("font-size",Qt(A.sizeSm)),ye("pointer"),We([c("background",Qt(y.surfaceSubtle)),c("color",Qt(y.textPrimary))])]),G$e=Fr([Oz,w([c("background",Qt(y.surfaceSubtle)),c("color",Qt(y.textPrimary)),c("font-weight",Qt(A.weightMedium))])]),J$e=w([c("font-size",Qt(A.sizeMd)),c("font-weight",Qt(A.weightMedium)),c("color",Qt(y.textPrimary))]),Q$e=w([c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Qt(X.md)),c("overflow","hidden")]),Mz=w([z("flex"),Z("stretch")]),Y$e=Fr([Mz,w([c("background",Qt(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")")])]),X$e=w([c("flex","0 0 "+D2),c("padding","4px var("+F.sm+")"),c("font-size",Qt(A.sizeXs)),c("color",Qt(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),Z$e=w([Ut("relative"),c("flex","1 1 auto"),c("height","22px"),c("overflow","hidden")]),e3e=w([Ut("absolute"),c("top","4px"),c("padding-left","3px"),c("border-left","1px solid var("+y.borderSubtle+")"),c("font-size",Qt(A.sizeXs)),c("color",Qt(y.textSecondary)),c("white-space","nowrap"),c("pointer-events","none")]),t3e=w([Ut("relative")]),r3e=Fr([Mz,w([c("height","30px"),c("border-top","1px solid var("+y.borderSubtle+")")])]),n3e=w([c("flex","0 0 "+D2),z("flex"),Z("center"),c("gap","4px"),c("padding","0 var("+F.sm+")"),c("font-size",Qt(A.sizeSm)),c("color",Qt(y.textPrimary)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden")]),i3e=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),o3e=w([c("color",Qt(y.warning)),c("font-size",Qt(A.sizeXs)),c("flex","0 0 auto")]),s3e=w([Ut("relative"),c("flex","1 1 auto")]),a3e=w([Ut("absolute"),c("top","0"),c("bottom","0"),c("width","1px"),c("background",Qt(y.borderSubtle)),c("opacity","0.6"),c("pointer-events","none")]);function l3e(e){return w([Ut("absolute"),c("top","5px"),c("height","19px"),c("border","none"),c("border-radius",Qt(X.sm)),c("background",e),c("padding","0"),ye("pointer"),We([c("filter","brightness(1.12)")])])}let u3e=w([c("outline","2px solid var("+y.warning+")"),c("outline-offset","1px")]),c3e=w([Ut("absolute"),c("top","0"),c("left",D2),c("right","0"),c("bottom","0"),c("pointer-events","none")]),d3e=w([c("display","block"),c("width","100%"),c("height","100%")]),f3e=w([c("font-size",Qt(A.sizeXs)),c("color",Qt(y.textDisabled))]),h3e="var("+y.brand+")";function Qa(e){return(Math.round(e*100)/100).toString()}function p3e(e,t){let r=oo(t,-1);return Zi(e)===Zi(r)?Zi(e):Zi(e)+" – "+Zi(r)}function g3e(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=S=>n.findIndex(C=>C.key===S),s=o(i.from),a=o(i.to_),l=n[s],u=n[a];if(l===void 0||u===void 0)return null;let d=hx(l,r,t),h=hx(u,r,t)[0],p=d[0]+d[1],g=s*30+30/2,m=a*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,_;if(h>p){let S=Df((p+h)/2);_=[[p,g],[S,g],[S,m],[h,m]]}else{let S=Df(p+1.4),C=Df(h-1.4),k=(g+m)/2;_=[[p,g],[S,g],[S,k],[C,k],[C,m],[h,m]]}let x=i.violated?"var("+y.warning+")":"var("+y.border+")",E=_.length-2|0;return b("g",{children:_.map((S,C)=>{let k=_[C+1|0];return k!==void 0?b("line",{markerEnd:C===E?"url(#"+v+")":void 0,stroke:x,strokeWidth:"1.5",x1:Qa(S[0])+"%",x2:Qa(k[0])+"%",y1:Qa(S[1]),y2:Qa(k[1])},C.toString()):null})})}function m3e(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=L7(),o=ae(()=>t),s=o[1],a="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,u=z$e(n);if(u===void 0)return b(id,{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],U$e(f,d)),p=j$e(f,d,h),g=Iz(n),m=q$e(n),v=Pz(n).length,_=(S,C)=>b("button",{children:C,className:h===S?G$e:Oz,onClick:k=>s(N=>S)}),x,E=0;if(r!==void 0||m!==0||v!==0?E=1:x=null,E===1){let S=ne([r,m>0?m.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:S.join(" · "),className:f3e})}return L("div",{children:[L("div",{children:[b("span",{children:p3e(f,d),className:J$e}),L("div",{children:[_("Days","Days"),_("Weeks","Weeks"),_("Months","Months")],className:W$e})],className:H$e}),L("div",{children:[L("div",{children:[b("div",{children:"Task",className:X$e}),b("div",{children:p.map(S=>{let C=S[0];return b("span",{children:S[1],className:e3e,style:{left:Qa(em(C,f,d))+"%"}},C.toString())}),className:Z$e})],className:Y$e}),L("div",{children:[n.map(S=>{let C=hx(S,f,d),k=V$e(n,S.key),N=l3e(D(S.accent,h3e)),T=k?N+" "+u3e:N;return L("div",{children:[L("div",{children:[k?b("span",{children:"▲",className:o3e,title:"Starts before a dependency ends"}):null,b("span",{children:S.title,className:i3e,title:S.title})],className:n3e}),L("div",{children:[p.map($=>{let P=$[0];return b("div",{className:a3e,style:{left:Qa(em(P,f,d))+"%"}},P.toString())}),b("button",{className:T,style:{left:Qa(C[0])+"%",width:Qa(C[1])+"%"},title:S.title+" · "+sa(S.start)+" → "+sa(S.end_),onClick:$=>S.onOpen()})],className:s3e})],className:r3e},S.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:a,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"})]}),g.map(S=>b(g3e,{edge:S,tasks:n,from:f,to_:d,arrowId:a,arrowBadId:l},S.from+"->"+S.to_))],className:d3e}),className:c3e})],className:t3e})],className:Q$e}),x],className:K$e})}let v3e=m3e;function Bn(e){return"var("+e+")"}let _3e=w([c("overflow-x","auto")]),b3e=w([c("border-collapse","collapse"),c("font-size",Bn(A.sizeSm)),c("color",Bn(y.textPrimary)),c("min-width","min-content")]),F2=[c("border","1px solid var("+y.borderSubtle+")"),c("padding","4px var("+F.sm+")"),c("text-align","right"),c("white-space","nowrap")],y3e=w(F2),x3e=w(F2.concat([c("color",Bn(y.textDisabled))])),S3e=w([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(A.weightMedium)),c("white-space","nowrap")]),E3e=w([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(A.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",Bn(A.sizeXs)),c("white-space","nowrap")]),w3e=w([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(A.weightMedium)),c("white-space","nowrap")]),hy=w(F2.concat([c("font-weight",Bn(A.weightMedium))])),O3=w([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(A.weightMedium)),c("white-space","nowrap")]),M3="Total";function k3e(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:S3e,scope:"col"}),i.map(o=>b("th",{children:o.label,className:E3e,scope:"col"},o.value)),b("th",{children:M3,className:O3,scope:"col"})]})}),b("tbody",{children:e.rowHeaders.map((o,s)=>{let a=D(n[s],[]);return L("tr",{children:[b("th",{children:o.label,className:w3e,scope:"row"}),i.map((l,u)=>{let d=D(a[u],{display:"",empty:!0});return b("td",{children:d.empty?"—":d.display,className:d.empty?x3e:y3e},l.value)}),b("td",{children:D(r[s],""),className:hy})]},o.value)})}),b("tfoot",{children:L("tr",{children:[b("th",{children:M3,className:O3,scope:"row"}),i.map((o,s)=>b("td",{children:D(t[s],""),className:hy},o.value)),b("td",{children:e.grandTotal,className:hy})]})})],className:b3e}),className:_3e})}let C3e=k3e;function R3e(e){let t=e.label,r=e.size;return b(F1,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let px=R3e;function hi(e){return"var("+e+")"}let A3e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",hi(F.md))]),T3e=w([z("flex"),pe("column"),Z("stretch"),c("gap",hi(F.xs)),c("padding","0"),c("background","none"),c("border","none"),c("text-align","left"),ye("pointer"),We([c("opacity","0.88")])]),N3e=w([c("width","100%"),c("aspect-ratio","4 / 3"),c("object-fit","cover"),c("background",hi(y.surfaceSubtle)),c("border","1px solid var("+y.border+")"),c("border-radius",hi(X.md))]),$3e=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",hi(F.sm))]),D3e=w([c("color",hi(y.textPrimary)),c("font-size",hi(A.sizeSm)),c("font-weight",hi(A.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),F3e=w([c("color",hi(y.textSecondary)),c("font-size",hi(A.sizeXs)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),I3e=w([c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",hi(X.md)),c("color","#f5f5f5"),c("padding","4px var("+F.sm+")"),c("font-size",hi(A.sizeSm)),ye("pointer"),We([c("background","rgba(255,255,255,0.22)")])]),P3e=w([c("color",hi(y.textDisabled)),c("font-size",hi(A.sizeSm))]);function O3e(e){return ne(e,t=>W(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function M3e(e){let t=e.onOpen,r=e.items,n=ae(()=>{}),i=n[1],o=n[0],s=O3e(r);if(r.length===0)return b("span",{children:"(empty)",className:P3e});let a;if(o!==void 0){let l=R(t,u=>W(s[o],d=>b("button",{children:"Open record →",className:I3e,type:"button",onClick:f=>{i(h=>{}),u(d.key)}})));a=b(MI,{slides:s,index:o,onIndexChange:u=>i(d=>u),onClose:()=>i(u=>{}),action:l})}else a=null;return L(Hr,{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:N3e,alt:l.title,src:u}):d!==void 0?b(px,{size:"Tile",label:"Add image"}):b(px,{size:"Tile"}),L("div",{children:[b("span",{children:l.title,className:D3e}),D(l.badge,null)],className:$3e}),f!==void 0?b("span",{children:f,className:F3e}):null],className:T3e,title:Ui(l.src)&&Be(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,g=l.onUpload;if(p===void 0)return g!==void 0?g():se(t,v=>v(l.key));let m=s.findIndex(v=>v.key===l.key);return m!==-1?i(v=>m):se(t,v=>v(l.key))}},l.key)}),className:A3e}),a]})}let L3e=M3e;const Mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $d(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function I2(e){return"nodeType"in e}function Ei(e){var t,r;return e?$d(e)?e:I2(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function P2(e){const{Document:t}=Ei(e);return e instanceof t}function fp(e){return $d(e)?!1:e instanceof Ei(e).HTMLElement}function Lz(e){return e instanceof Ei(e).SVGElement}function Dd(e){return e?$d(e)?e.document:I2(e)?P2(e)?e:fp(e)||Lz(e)?e.ownerDocument:document:document:document}const vl=Mv?EF:Ae;function O2(e){const t=Je(e);return vl(()=>{t.current=e}),Yr(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 z3e(){const e=Je(null),t=Yr((n,i)=>{e.current=setInterval(n,i)},[]),r=Yr(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Ch(e,t){t===void 0&&(t=[e]);const r=Je(e);return vl(()=>{r.current!==e&&(r.current=e)},t),r}function hp(e,t){const r=Je();return jt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function tm(e){const t=O2(e),r=Je(null),n=Yr(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function gx(e){const t=Je();return Ae(()=>{t.current=e},[e]),t.current}let py={};function Lv(e,t){return jt(()=>{if(t)return t;const r=py[e]==null?0:py[e]+1;return py[e]=r,e+"-"+r},[e,t])}function zz(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,s)=>{const a=Object.entries(s);for(const[l,u]of a){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const Pc=zz(1),rm=zz(-1);function U3e(e){return"clientX"in e&&"clientY"in e}function Uz(e){if(!e)return!1;const{KeyboardEvent:t}=Ei(e.target);return t&&e instanceof t}function B3e(e){if(!e)return!1;const{TouchEvent:t}=Ei(e.target);return t&&e instanceof t}function mx(e){if(B3e(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 U3e(e)?{x:e.clientX,y:e.clientY}:null}const L3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function j3e(e){return e.matches(L3)?e:e.querySelector(L3)}const q3e={display:"none"};function V3e(e){let{id:t,value:r}=e;return Qi.createElement("div",{id:t,style:q3e},r)}function K3e(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 Qi.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function H3e(){const[e,t]=ae("");return{announce:Yr(n=>{n!=null&&t(n)},[]),announcement:e}}const Bz=dr(null);function W3e(e){const t=zt(Bz);Ae(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function G3e(){const[e]=ae(()=>new Set),t=Yr(n=>(e.add(n),()=>e.delete(n)),[e]);return[Yr(n=>{let{type:i,event:o}=n;e.forEach(s=>{var a;return(a=s[i])==null?void 0:a.call(s,o)})},[e]),t]}const J3e={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
|
+
`},Q3e={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 Y3e(e){let{announcements:t=Q3e,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=J3e}=e;const{announce:o,announcement:s}=H3e(),a=Lv("DndLiveRegion"),[l,u]=ae(!1);if(Ae(()=>{u(!0)},[]),W3e(jt(()=>({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=Qi.createElement(Qi.Fragment,null,Qi.createElement(V3e,{id:n,value:i.draggable}),Qi.createElement(K3e,{id:a,announcement:s}));return r?V7(d,r):d}var Qr;(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"})(Qr||(Qr={}));function nm(){}function z3(e,t){return jt(()=>({sensor:e,options:t??{}}),[e,t])}function X3e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return jt(()=>[...t].filter(n=>n!=null),[...t])}const Vo=Object.freeze({x:0,y:0});function Z3e(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function eDe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function tDe(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),s=i-n,a=o-r;if(n<i&&r<o){const l=t.width*t.height,u=e.width*e.height,d=s*a,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:s}=o,a=r.get(s);if(a){const l=tDe(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Z3e)};function nDe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function jz(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Vo}function iDe(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((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const oDe=iDe(1);function sDe(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 aDe(e,t,r){const n=sDe(t);if(!n)return e;const{scaleX:i,scaleY:o,x:s,y:a}=n,l=e.left-s-(1-i)*parseFloat(r),u=e.top-a-(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 lDe={ignoreTransform:!1};function pp(e,t){t===void 0&&(t=lDe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Ei(e).getComputedStyle(e);u&&(r=aDe(r,u,d))}const{top:n,left:i,width:o,height:s,bottom:a,right:l}=r;return{top:n,left:i,width:o,height:s,bottom:a,right:l}}function U3(e){return pp(e,{ignoreTransform:!0})}function uDe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function cDe(e,t){return t===void 0&&(t=Ei(e).getComputedStyle(e)),t.position==="fixed"}function dDe(e,t){t===void 0&&(t=Ei(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 M2(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(P2(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!fp(i)||Lz(i)||r.includes(i))return r;const o=Ei(e).getComputedStyle(i);return i!==e&&dDe(i,o)&&r.push(i),cDe(i,o)?r:n(i.parentNode)}return e?n(e):r}function qz(e){const[t]=M2(e,1);return t??null}function gy(e){return!Mv||!e?null:$d(e)?e:I2(e)?P2(e)||e===Dd(e).scrollingElement?window:fp(e)?e:null:null}function Vz(e){return $d(e)?e.scrollX:e.scrollLeft}function Kz(e){return $d(e)?e.scrollY:e.scrollTop}function vx(e){return{x:Vz(e),y:Kz(e)}}var sn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(sn||(sn={}));function Hz(e){return!Mv||!e?!1:e===document.scrollingElement}function Wz(e){const t={x:0,y:0},r=Hz(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,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const fDe={x:.2,y:.2};function hDe(e,t,r,n,i){let{top:o,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=fDe);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=Wz(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(p.y=sn.Backward,g.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&l>=t.bottom-m.height&&(p.y=sn.Forward,g.y=n*Math.abs((t.bottom-m.height-l)/m.height)),!h&&a>=t.right-m.width?(p.x=sn.Forward,g.x=n*Math.abs((t.right-m.width-a)/m.width)):!f&&s<=t.left+m.width&&(p.x=sn.Backward,g.x=n*Math.abs((t.left+m.width-s)/m.width)),{direction:p,speed:g}}function pDe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}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 Gz(e){return e.reduce((t,r)=>Pc(t,vx(r)),Vo)}function gDe(e){return e.reduce((t,r)=>t+Vz(r),0)}function mDe(e){return e.reduce((t,r)=>t+Kz(r),0)}function vDe(e,t){if(t===void 0&&(t=pp),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);qz(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const _De=[["x",["left","right"],gDe],["y",["top","bottom"],mDe]];class L2{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=M2(r),i=Gz(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of _De)for(const l of s)Object.defineProperty(this,l,{get:()=>{const u=a(n),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ff{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 bDe(e){const{EventTarget:t}=Ei(e);return e instanceof t?e:Dd(e)}function my(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 Ji;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ji||(Ji={}));function B3(e){e.preventDefault()}function yDe(e){e.stopPropagation()}var Xt;(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"})(Xt||(Xt={}));const Jz={start:[Xt.Space,Xt.Enter],cancel:[Xt.Esc],end:[Xt.Space,Xt.Enter,Xt.Tab]},xDe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Xt.Right:return{...r,x:r.x+25};case Xt.Left:return{...r,x:r.x-25};case Xt.Down:return{...r,y:r.y+25};case Xt.Up:return{...r,y:r.y-25}}};class z2{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 Ff(Dd(r)),this.windowListeners=new Ff(Ei(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ji.Resize,this.handleCancel),this.windowListeners.add(Ji.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ji.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&vDe(n),r(Vo)}handleKeyDown(t){if(Uz(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=Jz,coordinateGetter:s=xDe,scrollBehavior:a="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}:Vo;this.referenceCoordinates||(this.referenceCoordinates=d);const f=s(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=rm(f,d),p={x:0,y:0},{scrollableAncestors:g}=n.current;for(const m of g){const v=t.code,{isTop:_,isRight:x,isLeft:E,isBottom:S,maxScroll:C,minScroll:k}=Wz(m),N=pDe(m),T={x:Math.min(v===Xt.Right?N.right-N.width/2:N.right,Math.max(v===Xt.Right?N.left:N.left+N.width/2,f.x)),y:Math.min(v===Xt.Down?N.bottom-N.height/2:N.bottom,Math.max(v===Xt.Down?N.top:N.top+N.height/2,f.y))},$=v===Xt.Right&&!x||v===Xt.Left&&!E,P=v===Xt.Down&&!S||v===Xt.Up&&!_;if($&&T.x!==f.x){const M=m.scrollLeft+h.x,I=v===Xt.Right&&M<=C.x||v===Xt.Left&&M>=k.x;if(I&&!h.y){m.scrollTo({left:M,behavior:a});return}I?p.x=m.scrollLeft-M:p.x=v===Xt.Right?m.scrollLeft-C.x:m.scrollLeft-k.x,p.x&&m.scrollBy({left:-p.x,behavior:a});break}else if(P&&T.y!==f.y){const M=m.scrollTop+h.y,I=v===Xt.Down&&M<=C.y||v===Xt.Up&&M>=k.y;if(I&&!h.x){m.scrollTo({top:M,behavior:a});return}I?p.y=m.scrollTop-M:p.y=v===Xt.Down?m.scrollTop-C.y:m.scrollTop-k.y,p.y&&m.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,Pc(rm(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()}}z2.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=Jz,onActivation:i}=t,{active:o}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function j3(e){return!!(e&&"distance"in e)}function q3(e){return!!(e&&"delay"in e)}class U2{constructor(t,r,n){var i;n===void 0&&(n=bDe(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:s}=o;this.props=t,this.events=r,this.document=Dd(s),this.documentListeners=new Ff(this.document),this.listeners=new Ff(n),this.windowListeners=new Ff(Ei(s)),this.initialCoordinates=(i=mx(o))!=null?i:Vo,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(Ji.Resize,this.handleCancel),this.windowListeners.add(Ji.DragStart,B3),this.windowListeners.add(Ji.VisibilityChange,this.handleCancel),this.windowListeners.add(Ji.ContextMenu,B3),this.documentListeners.add(Ji.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(q3(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(j3(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(Ji.Click,yDe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ji.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(r=mx(t))!=null?r:Vo,u=rm(i,l);if(!n&&a){if(j3(a)){if(a.tolerance!=null&&my(u,a.tolerance))return this.handleCancel();if(my(u,a.distance))return this.handleStart()}if(q3(a)&&my(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),s(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===Xt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const SDe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class B2 extends U2{constructor(t){const{event:r}=t,n=Dd(r.target);super(t,SDe,n)}}B2.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 EDe={move:{name:"mousemove"},end:{name:"mouseup"}};var _x;(function(e){e[e.RightClick=2]="RightClick"})(_x||(_x={}));class wDe extends U2{constructor(t){super(t,EDe,Dd(t.event.target))}}wDe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===_x.RightClick?!1:(n?.({event:r}),!0)}}];const vy={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class kDe extends U2{constructor(t){super(t,vy)}static setup(){return window.addEventListener(vy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(vy.move.name,t)};function t(){}}}kDe.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 If;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(If||(If={}));var im;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(im||(im={}));function CDe(e){let{acceleration:t,activator:r=If.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:s=5,order:a=im.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=ADe({delta:f,disabled:!o}),[g,m]=z3e(),v=Je({x:0,y:0}),_=Je({x:0,y:0}),x=jt(()=>{switch(r){case If.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case If.DraggableRect:return i}},[r,i,l]),E=Je(null),S=Yr(()=>{const k=E.current;if(!k)return;const N=v.current.x*_.current.x,T=v.current.y*_.current.y;k.scrollBy(N,T)},[]),C=jt(()=>a===im.TreeOrder?[...u].reverse():u,[a,u]);Ae(()=>{if(!o||!u.length||!x){m();return}for(const k of C){if(n?.(k)===!1)continue;const N=u.indexOf(k),T=d[N];if(!T)continue;const{direction:$,speed:P}=hDe(k,T,x,t,h);for(const M of["x","y"])p[M][$[M]]||(P[M]=0,$[M]=0);if(P.x>0||P.y>0){m(),E.current=k,g(S,s),v.current=P,_.current=$;return}}v.current={x:0,y:0},_.current={x:0,y:0},m()},[t,S,n,m,o,s,JSON.stringify(x),JSON.stringify(p),g,u,C,d,JSON.stringify(h)])}const RDe={x:{[sn.Backward]:!1,[sn.Forward]:!1},y:{[sn.Backward]:!1,[sn.Forward]:!1}};function ADe(e){let{delta:t,disabled:r}=e;const n=gx(t);return hp(i=>{if(r||!n||!i)return RDe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[sn.Backward]:i.x[sn.Backward]||o.x===-1,[sn.Forward]:i.x[sn.Forward]||o.x===1},y:{[sn.Backward]:i.y[sn.Backward]||o.y===-1,[sn.Forward]:i.y[sn.Forward]||o.y===1}}},[r,t,n])}function TDe(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 NDe(e,t){return jt(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...o]},[]),[e,t])}var Rh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Rh||(Rh={}));var bx;(function(e){e.Optimized="optimized"})(bx||(bx={}));const V3=new Map;function $De(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,s]=ae(null),{frequency:a,measure:l,strategy:u}=i,d=Je(e),f=v(),h=Ch(f),p=Yr(function(_){_===void 0&&(_=[]),!h.current&&s(x=>x===null?_:x.concat(_.filter(E=>!x.includes(E))))},[h]),g=Je(null),m=hp(_=>{if(f&&!r)return V3;if(!_||_===V3||d.current!==e||o!=null){const x=new Map;for(let E of e){if(!E)continue;if(o&&o.length>0&&!o.includes(E.id)&&E.rect.current){x.set(E.id,E.rect.current);continue}const S=E.node.current,C=S?new L2(l(S),S):null;E.rect.current=C,C&&x.set(E.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&&s(null)},[JSON.stringify(o)]),Ae(()=>{f||typeof a!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},a))},[a,f,p,...n]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(u){case Rh.Always:return!1;case Rh.BeforeDragging:return r;default:return!r}}}function Qz(e,t){return hp(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function DDe(e,t){return Qz(e,t)}function FDe(e){let{callback:t,disabled:r}=e;const n=O2(t),i=jt(()=>{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=O2(t),i=jt(()=>{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 IDe(e){return new L2(pp(e),e)}function K3(e,t,r){t===void 0&&(t=IDe);const[n,i]=ae(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 s=FDe({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}}}}),a=zv({callback:o});return vl(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),n}function PDe(e){const t=Qz(e);return jz(e,t)}const H3=[];function ODe(e){const t=Je(e),r=hp(n=>e?n&&n!==H3&&e&&t.current&&e.parentNode===t.current.parentNode?n:M2(e):H3,[e]);return Ae(()=>{t.current=e},[e]),r}function MDe(e){const[t,r]=ae(null),n=Je(e),i=Yr(o=>{const s=gy(o.target);s&&r(a=>a?(a.set(s,vx(s)),new Map(a)):null)},[]);return Ae(()=>{const o=n.current;if(e!==o){s(o);const a=e.map(l=>{const u=gy(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,vx(u)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const u=gy(l);u?.removeEventListener("scroll",i)})}},[i,e]),jt(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Pc(o,s),Vo):Gz(e):Vo,[e,t])}function W3(e,t){t===void 0&&(t=[]);const r=Je(null);return Ae(()=>{r.current=null},t),Ae(()=>{const n=e!==Vo;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?rm(e,r.current):Vo}function LDe(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 zDe(e,t){return jt(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=s=>{o(s,t)},r},{}),[e,t])}function Yz(e){return jt(()=>e?uDe(e):null,[e])}const G3=[];function UDe(e,t){t===void 0&&(t=pp);const[r]=e,n=Yz(r?Ei(r):null),[i,o]=ae(G3);function s(){o(()=>e.length?e.map(l=>Hz(l)?n:new L2(t(l),l)):G3)}const a=zv({callback:s});return vl(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function BDe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return fp(t)?t:e}function jDe(e){let{measure:t}=e;const[r,n]=ae(null),i=Yr(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}),s=Yr(u=>{const d=BDe(u);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[a,l]=tm(s);return jt(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const qDe=[{sensor:B2,options:{}},{sensor:z2,options:{}}],VDe={current:{}},Y0={draggable:{measure:U3},droppable:{measure:U3,strategy:Rh.WhileDragging,frequency:bx.Optimized},dragOverlay:{measure:pp}};class Pf 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 KDe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Pf,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:nm},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Y0,measureDroppableContainers:nm,windowRect:null,measuringScheduled:!1},HDe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:nm,draggableNodes:new Map,over:null,measureDroppableContainers:nm},Uv=dr(HDe),WDe=dr(KDe);function GDe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Pf}}}function JDe(e,t){switch(t.type){case Qr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Qr.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 Qr.DragEnd:case Qr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qr.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Pf(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Qr.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const s=new Pf(e.droppable.containers);return s.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Qr.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Pf(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function QDe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=zt(Uv),o=gx(n),s=gx(r?.id);return Ae(()=>{if(!t&&!n&&o&&s!=null){if(!Uz(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=j3e(d);if(f){f.focus();break}}})}},[n,t,i,s,o]),null}function YDe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function XDe(e){return jt(()=>({draggable:{...Y0.draggable,...e?.draggable},droppable:{...Y0.droppable,...e?.droppable},dragOverlay:{...Y0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function ZDe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=Je(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;vl(()=>{if(!s&&!a||!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=jz(d,n);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=qz(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const Xz=dr({...Vo,scaleX:1,scaleY:1});var Oa;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Oa||(Oa={}));const Zz=z7(function(t){var r,n,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:u,sensors:d=qDe,collisionDetection:f=rDe,measuring:h,modifiers:p,...g}=t;const m=U7(JDe,void 0,GDe),[v,_]=m,[x,E]=G3e(),[S,C]=ae(Oa.Uninitialized),k=S===Oa.Initialized,{draggable:{active:N,nodes:T,translate:$},droppable:{containers:P}}=v,M=N!=null?T.get(N):null,I=Je({initial:null,translated:null}),U=jt(()=>{var Kt;return N!=null?{id:N,data:(Kt=M?.data)!=null?Kt:VDe,rect:I}:null},[N,M]),B=Je(null),[q,J]=ae(null),[Y,K]=ae(null),G=Ch(g,Object.values(g)),ie=Lv("DndDescribedBy",s),oe=jt(()=>P.getEnabled(),[P]),_e=XDe(h),{droppableRects:Re,measureDroppableContainers:Pe,measuringScheduled:at}=$De(oe,{dragging:k,dependencies:[$.x,$.y],config:_e.droppable}),ve=TDe(T,N),xe=jt(()=>Y?mx(Y):null,[Y]),pt=Dn(),ur=DDe(ve,_e.draggable.measure);ZDe({activeNode:N!=null?T.get(N):null,config:pt.layoutShiftCompensation,initialRect:ur,measure:_e.draggable.measure});const It=K3(ve,_e.draggable.measure,ur),wi=K3(ve?ve.parentElement:null),fr=Je({activatorEvent:null,active:null,activeNode:ve,collisionRect:null,collisions:null,droppableRects:Re,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),So=P.getNodeFor((r=fr.current.over)==null?void 0:r.id),Sr=jDe({measure:_e.dragOverlay.measure}),en=(n=Sr.nodeRef.current)!=null?n:ve,xn=k?(i=Sr.rect)!=null?i:It:null,Qe=!!(Sr.nodeRef.current&&Sr.rect),le=PDe(Qe?null:It),Te=Yz(en?Ei(en):null),Le=ODe(k?So??ve:null),j=UDe(Le),ue=YDe(p,{transform:{x:$.x-le.x,y:$.y-le.y,scaleX:1,scaleY:1},activatorEvent:Y,active:U,activeNodeRect:It,containerNodeRect:wi,draggingNodeRect:xn,over:fr.current.over,overlayNodeRect:Sr.rect,scrollableAncestors:Le,scrollableAncestorRects:j,windowRect:Te}),Se=xe?Pc(xe,$):null,Ne=MDe(Le),tt=W3(Ne),$e=W3(Ne,[It]),we=Pc(ue,tt),nt=xn?oDe(xn,ue):null,He=U&&nt?f({active:U,collisionRect:nt,droppableRects:Re,droppableContainers:oe,pointerCoordinates:Se}):null,ct=eDe(He,"id"),[Et,St]=ae(null),hr=Qe?ue:Pc(ue,$e),nr=nDe(hr,(o=Et?.rect)!=null?o:null,It),ti=Je(null),Eo=Yr((Kt,Pt)=>{let{sensor:Er,options:Ci}=Pt;if(B.current==null)return;const jr=T.get(B.current);if(!jr)return;const Pr=Kt.nativeEvent,Tt=new Er({active:B.current,activeNode:jr,event:Pr,options:Ci,context:fr,onAbort(ir){if(!T.get(ir))return;const{onDragAbort:En}=G.current,Fn={id:ir};En?.(Fn),x({type:"onDragAbort",event:Fn})},onPending(ir,ri,En,Fn){if(!T.get(ir))return;const{onDragPending:ni}=G.current,vt={id:ir,constraint:ri,initialCoordinates:En,offset:Fn};ni?.(vt),x({type:"onDragPending",event:vt})},onStart(ir){const ri=B.current;if(ri==null)return;const En=T.get(ri);if(!En)return;const{onDragStart:Fn}=G.current,es={activatorEvent:Pr,active:{id:ri,data:En.data,rect:I}};xp(()=>{Fn?.(es),C(Oa.Initializing),_({type:Qr.DragStart,initialCoordinates:ir,active:ri}),x({type:"onDragStart",event:es}),J(ti.current),K(Pr)})},onMove(ir){_({type:Qr.DragMove,coordinates:ir})},onEnd:jn(Qr.DragEnd),onCancel:jn(Qr.DragCancel)});ti.current=Tt;function jn(ir){return async function(){const{active:En,collisions:Fn,over:es,scrollAdjustedTranslate:ni}=fr.current;let vt=null;if(En&&ni){const{cancelDrop:In}=G.current;vt={activatorEvent:Pr,active:En,collisions:Fn,delta:ni,over:es},ir===Qr.DragEnd&&typeof In=="function"&&await Promise.resolve(In(vt))&&(ir=Qr.DragCancel)}B.current=null,xp(()=>{_({type:ir}),C(Oa.Uninitialized),St(null),J(null),K(null),ti.current=null;const In=ir===Qr.DragEnd?"onDragEnd":"onDragCancel";if(vt){const ts=G.current[In];ts?.(vt),x({type:In,event:vt})}})}}},[T]),cr=Yr((Kt,Pt)=>(Er,Ci)=>{const jr=Er.nativeEvent,Pr=T.get(Ci);if(B.current!==null||!Pr||jr.dndKit||jr.defaultPrevented)return;const Tt={active:Pr};Kt(Er,Pt.options,Tt)===!0&&(jr.dndKit={capturedBy:Pt.sensor},B.current=Ci,Eo(Er,Pt))},[T,Eo]),Sn=NDe(d,cr);LDe(d),vl(()=>{It&&S===Oa.Initializing&&C(Oa.Initialized)},[It,S]),Ae(()=>{const{onDragMove:Kt}=G.current,{active:Pt,activatorEvent:Er,collisions:Ci,over:jr}=fr.current;if(!Pt||!Er)return;const Pr={active:Pt,activatorEvent:Er,collisions:Ci,delta:{x:we.x,y:we.y},over:jr};xp(()=>{Kt?.(Pr),x({type:"onDragMove",event:Pr})})},[we.x,we.y]),Ae(()=>{const{active:Kt,activatorEvent:Pt,collisions:Er,droppableContainers:Ci,scrollAdjustedTranslate:jr}=fr.current;if(!Kt||B.current==null||!Pt||!jr)return;const{onDragOver:Pr}=G.current,Tt=Ci.get(ct),jn=Tt&&Tt.rect.current?{id:Tt.id,rect:Tt.rect.current,data:Tt.data,disabled:Tt.disabled}:null,ir={active:Kt,activatorEvent:Pt,collisions:Er,delta:{x:jr.x,y:jr.y},over:jn};xp(()=>{St(jn),Pr?.(ir),x({type:"onDragOver",event:ir})})},[ct]),vl(()=>{fr.current={activatorEvent:Y,active:U,activeNode:ve,collisionRect:nt,collisions:He,droppableRects:Re,draggableNodes:T,draggingNode:en,draggingNodeRect:xn,droppableContainers:P,over:Et,scrollableAncestors:Le,scrollAdjustedTranslate:we},I.current={initial:xn,translated:nt}},[U,ve,He,nt,T,en,xn,Re,P,Et,Le,we]),CDe({...pt,delta:$,draggingRect:nt,pointerCoordinates:Se,scrollableAncestors:Le,scrollableAncestorRects:j});const Ki=jt(()=>({active:U,activeNode:ve,activeNodeRect:It,activatorEvent:Y,collisions:He,containerNodeRect:wi,dragOverlay:Sr,draggableNodes:T,droppableContainers:P,droppableRects:Re,over:Et,measureDroppableContainers:Pe,scrollableAncestors:Le,scrollableAncestorRects:j,measuringConfiguration:_e,measuringScheduled:at,windowRect:Te}),[U,ve,It,Y,He,wi,Sr,T,P,Re,Et,Pe,Le,j,_e,at,Te]),ki=jt(()=>({activatorEvent:Y,activators:Sn,active:U,activeNodeRect:It,ariaDescribedById:{draggable:ie},dispatch:_,draggableNodes:T,over:Et,measureDroppableContainers:Pe}),[Y,Sn,U,It,_,ie,T,Et,Pe]);return Qi.createElement(Bz.Provider,{value:E},Qi.createElement(Uv.Provider,{value:ki},Qi.createElement(WDe.Provider,{value:Ki},Qi.createElement(Xz.Provider,{value:nr},u)),Qi.createElement(QDe,{disabled:a?.restoreFocus===!1})),Qi.createElement(Y3e,{...a,hiddenTextDescribedById:ie}));function Dn(){const Kt=q?.autoScrollEnabled===!1,Pt=typeof l=="object"?l.enabled===!1:l===!1,Er=k&&!Kt&&!Pt;return typeof l=="object"?{...l,enabled:Er}:{enabled:Er}}}),eFe=dr(null),J3="button",tFe="Draggable";function e9(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Lv(tFe),{activators:s,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=zt(Uv),{role:p=J3,roleDescription:g="draggable",tabIndex:m=0}=i??{},v=l?.id===t,_=zt(v?Xz:eFe),[x,E]=tm(),[S,C]=tm(),k=zDe(s,t),N=Ch(r);vl(()=>(f.set(t,{id:t,key:o,node:x,activatorNode:S,data:N}),()=>{const $=f.get(t);$&&$.key===o&&f.delete(t)}),[f,t]);const T=jt(()=>({role:p,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&p===J3?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[n,p,m,v,g,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:T,isDragging:v,listeners:n?void 0:k,node:x,over:h,setNodeRef:E,setActivatorNodeRef:C,transform:_}}const rFe="Droppable",nFe={timeout:25};function t9(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Lv(rFe),{active:s,dispatch:a,over:l,measureDroppableContainers:u}=zt(Uv),d=Je({disabled:r}),f=Je(!1),h=Je(null),p=Je(null),{disabled:g,updateMeasurementsFor:m,timeout:v}={...nFe,...i},_=Ch(m??n),x=Yr(()=>{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]),E=zv({callback:x,disabled:g||!s}),S=Yr((T,$)=>{E&&($&&(E.unobserve($),f.current=!1),T&&E.observe(T))},[E]),[C,k]=tm(S),N=Ch(t);return Ae(()=>{!E||!C.current||(E.disconnect(),f.current=!1,E.observe(C.current))},[C,E]),Ae(()=>(a({type:Qr.RegisterDroppable,element:{id:n,key:o,disabled:r,node:C,rect:h,data:N}}),()=>a({type:Qr.UnregisterDroppable,key:o,id:n})),[n]),Ae(()=>{r!==d.current.disabled&&(a({type:Qr.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,a]),{active:s,rect:h,isOver:l?.id===n,node:C,over:l,setNodeRef:k}}function r9(e,t){se(ys(e.onPointerDown),r=>r(t))}function n9(e,t){se(ys(e.onKeyDown),r=>r(t))}function i9(e){return W(e==null?void 0:Wt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}function Dr(e){return"var("+e+")"}let iFe=w([z("flex"),Z("stretch"),c("gap",Dr(F.md)),c("overflow-x","auto"),c("padding-bottom",Dr(F.sm))]),_y=w([z("flex"),pe("column"),c("gap",Dr(F.sm)),c("flex","0 0 240px"),c("padding",Dr(F.sm)),c("background",Dr(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Dr(X.md)),c("min-height","120px")]),oFe=w([c("border-color",Dr(y.brand))]),sFe=w([Ys(.45)]),aFe=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",Dr(F.sm)),c("font-size",Dr(A.sizeSm)),c("font-weight",Dr(A.weightMedium)),c("color",Dr(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),Q3=w([z("flex"),pe("column"),Z("stretch"),c("gap","4px"),c("padding",Dr(F.sm)),c("background",Dr(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Dr(X.sm)),c("text-align","left"),ye("pointer"),We([c("border-color",Dr(y.brand))])]),lFe=w([ye("grab")]),uFe=w([Ys(.85),c("z-index","10"),ye("grabbing")]),cFe=w([c("font-size",Dr(A.sizeSm)),c("font-weight",Dr(A.weightMedium)),c("color",Dr(y.textPrimary))]),dFe=w([c("font-size",Dr(A.sizeXs)),c("color",Dr(y.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),fFe=w([c("color",Dr(y.textDisabled)),c("font-size",Dr(A.sizeSm))]);function hFe(e){let t=e.onClick,r=e.draggable,n=e.card,i=e9({id:n.key,disabled:!r}),o=r?Q3+" "+lFe:Q3,s=i.isDragging?o+" "+uFe:o,a=i9(i.transform),l=a!==void 0?{transform:a}:void 0,u=i.listeners,d=u==null?void 0:Wt(u),f=n.meta;return L("div",{children:[b("span",{children:n.title,className:cFe}),f!==void 0?b("span",{children:f,className:dFe,title:f}):null],ref:Wt(i.setNodeRef),className:s,role:"button",style:l,tabIndex:0,onKeyDown:h=>se(d,p=>n9(p,h)),onClick:h=>se(t,p=>p(n.key)),onPointerDown:h=>se(d,p=>r9(p,h))})}function pFe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,s=t9({id:i.value,disabled:!o}),a=s.isOver,l=o?a?_y+" "+oFe:_y:_y+" "+sFe;return L("div",{children:[L("div",{children:[b("span",{children:i.label}),b(_f,{count:i.cards.length,label:""})],className:aFe}),i.cards.length===0?b("span",{children:"—",className:fFe}):i.cards.map(u=>b(hFe,{card:u,draggable:n,onClick:r},u.key))],ref:Wt(s.setNodeRef),className:l})}function gFe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=Be(r),s=X3e(z3(B2,{activationConstraint:{distance:5}}),z3(z2,{})),a=ae(()=>{}),l=a[1],u=a[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 g=i.find(v=>v.cards.some(_=>_.key===h.active.id));if(fe(t,!0,v=>v(h.active.id,p.id))&&fe(g,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return b(Zz,{sensors:Wt(s),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:b("div",{children:i.map(h=>b(pFe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:iFe})})}let mFe=gFe;function ht(e){return"var("+e+")"}let vFe=w([z("flex"),pe("column"),c("gap",ht(F.sm))]),_Fe=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",ht(F.sm))]),Y3=w([z("inlineFlex"),Z("center"),c("gap",ht(F.xs))]),hf=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",ht(X.sm)),c("padding","2px var("+F.sm+")"),c("color",ht(y.textSecondary)),c("font-size",ht(A.sizeSm)),ye("pointer"),We([c("background",ht(y.surfaceSubtle)),c("color",ht(y.textPrimary))])]),bFe=Fr([hf,w([c("background",ht(y.surfaceSubtle)),c("color",ht(y.textPrimary)),c("font-weight",ht(A.weightMedium))])]),yFe=w([c("font-size",ht(A.sizeMd)),c("font-weight",ht(A.weightMedium)),c("color",ht(y.textPrimary))]),xFe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px")]),SFe=w([c("font-size",ht(A.sizeXs)),c("color",ht(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("padding","2px var("+F.xs+")")]),EFe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px"),c("background",ht(y.borderSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",ht(X.md)),c("overflow","hidden")]),o9=w([z("flex"),pe("column"),c("gap","2px"),c("min-height","96px"),c("padding","4px"),c("background",ht(y.surface))]),wFe=Fr([o9,w([c("opacity","0.55")])]),s9=w([c("font-size",ht(A.sizeXs)),c("color",ht(y.textSecondary))]),kFe=Fr([s9,w([c("color",ht(y.brand)),c("font-weight",ht(A.weightMedium))])]);function CFe(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",ht(X.sm)),c("background",ht(y.surfaceSubtle)),c("color",ht(y.textPrimary)),c("font-size",ht(A.sizeXs)),c("padding","1px var("+F.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),ye("pointer"),We([c("background",ht(y.surfaceElevated))])])}let RFe=w([c("background","none"),c("border","none"),c("padding","0"),c("text-align","left"),c("font-size",ht(A.sizeXs)),c("color",ht(y.brand)),ye("pointer"),We([c("text-decoration","underline")])]);function AFe(e){return w([z("grid"),c("grid-template-columns","repeat("+e.toString()+", 1fr)"),c("gap","1px"),c("background",ht(y.borderSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",ht(X.md)),c("overflow","hidden")])}let TFe=w([z("flex"),pe("column"),c("gap","2px"),c("min-height","200px"),c("padding","4px"),c("background",ht(y.surface))]),NFe=w([c("font-size",ht(A.sizeXs)),c("color",ht(y.textSecondary)),c("padding-bottom","2px"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),$Fe=w([z("flex"),bi("wrap"),Z("center"),c("gap",ht(F.md)),c("font-size",ht(A.sizeXs)),c("color",ht(y.textSecondary))]);function DFe(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e),c("margin-right","4px")])}let FFe=w([c("font-size",ht(A.sizeXs)),c("color",ht(y.textDisabled))]),IFe="var("+y.brand+")";function PFe(e){return D(e.end_,e.start)}function X3(e,t){return e.filter(r=>BI(r.start,PFe(r),t)).toSorted((r,n)=>r.start-n.start)}function OFe(e,t){return qI(e.start)||!UI(e.start,t)?e.title:jI(e.start)+" "+e.title}function MFe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],s=ae(()=>"Month"),a=s[1],l=s[0],u=ae(()=>Gn(D(t,Date.now()))),d=u[1],f=u[0],h=Gn(Date.now()),p=S=>d(C=>{switch(l){case"Month":return LI(C,S);case"Week":return oo(C,S*7|0);case"Day":return oo(C,S)}}),g=(S,C)=>b("button",{children:OFe(S,C),className:CFe(D(S.accent,IFe)),title:S.title,onClick:k=>S.onOpen()},S.key),m=()=>{let S=bW(f);return L(Hr,{children:[b("div",{children:tS.map(C=>b("div",{children:C,className:SFe},C)),className:xFe}),b("div",{children:S.map(C=>{let k=X3(i,C),N=k.slice(0,3),T=k.length-N.length|0;return L("div",{children:[b("span",{children:KI(C).toString(),className:C===h?kFe:s9}),N.map($=>g($,C)),T>0?b("button",{children:"+"+T.toString()+" more",className:RFe,onClick:$=>{d(P=>C),a(P=>"Day")}}):null],className:yW(C,f)?o9:wFe},C.toString())}),className:EFe})]})},v=S=>b("div",{children:S.map(C=>L("div",{children:[b("div",{children:sa(C),className:NFe}),X3(i,C).map(k=>g(k,C))],className:TFe},C.toString())),className:AFe(S.length)}),_;switch(l){case"Month":_=m();break;case"Week":_=v(il(7,S=>oo(Am(f),S)));break;case"Day":_=v([Gn(f)]);break}let x;switch(l){case"Month":case"Week":x=Zi(f);break;case"Day":x=sa(f)+" — "+Zi(f);break}let E=(S,C)=>b("button",{children:C,className:l===S?bFe:hf,onClick:k=>a(N=>S)});return L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:hf,onClick:S=>p(-1)}),b("button",{children:"Today",className:hf,onClick:S=>d(C=>h)}),b("button",{children:"›",className:hf,onClick:S=>p(1)}),b("span",{children:x,className:yFe})],className:Y3}),L("div",{children:[E("Month","Month"),E("Week","Week"),E("Day","Day")],className:Y3})],className:_Fe}),o.length!==0?b("div",{children:o.map(S=>L("span",{children:[b("span",{className:DFe(S.accent)}),S.label]},S.label)),className:$Fe}):null,_,r!==void 0?b("span",{children:r,className:FFe}):null],className:vFe})}let LFe=MFe;function un(e){return"var("+e+")"}let zFe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),c("gap",un(F.md))]),UFe=w([z("flex"),pe("column"),Z("stretch"),c("gap",un(F.sm)),c("padding",un(F.md)),c("background",un(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",un(X.md)),c("text-align","left"),ye("pointer"),We([c("border-color",un(y.brand)),c("background",un(y.surfaceSubtle))])]),BFe=w([c("width","100%"),c("height","96px"),c("object-fit","cover"),c("border-radius",un(X.sm))]),jFe=w([c("width","100%"),c("height","96px")]),qFe=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",un(F.sm))]),VFe=w([c("font-size",un(A.sizeMd)),c("font-weight",un(A.weightMedium)),c("color",un(y.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),KFe=w([z("flex"),Z("baseline"),c("gap",un(F.sm)),c("font-size",un(A.sizeSm))]),HFe=w([c("color",un(y.textSecondary)),c("white-space","nowrap"),_i(0)]),WFe=w([c("color",un(y.textPrimary)),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis")]),GFe=w([c("color",un(y.textDisabled)),c("font-size",un(A.sizeSm))]);function JFe(e){let t=e.cards;if(t.length===0)return b("span",{children:"(empty)",className:GFe});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(px,{size:"Fill"}),className:jFe}):b("img",{className:BFe,alt:n.title,src:i._0}):null,L("button",{children:[o,L("div",{children:[b("span",{children:n.title,className:VFe,title:n.title}),D(n.badge,null)],className:qFe}),n.fields.map(s=>L("div",{children:[b("span",{children:s.label,className:HFe}),b("span",{children:s.value,className:WFe})],className:KFe},s.label))],className:UFe,onClick:s=>se(r,a=>a(n.key))},n.key)}),className:zFe})}let QFe=JFe;function YFe(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 XFe(e,t,r){return YFe(Ho(e,t),r).map(n=>{let i=n[0];return{key:i,label:bt(i),state:n[1]}})}function mo(e){return"var("+e+")"}let ZFe=w([z("flex"),Z("flexStart"),c("gap","0"),c("width","100%")]),eIe=w([z("flex"),pe("column"),Z("center"),c("gap","4px"),c("flex","0 0 auto")]);function tIe(e){return w([c("flex","1 1 auto"),c("height","2px"),c("margin","0 6px"),c("margin-top","11px"),c("min-width","16px"),c("background",mo(e?y.brand:y.borderSubtle))])}let j2=[z("inlineFlex"),Z("center"),Xe("center"),c("width","24px"),c("height","24px"),c("border-radius","50%"),c("font-size",mo(A.sizeXs)),c("font-weight",mo(A.weightMedium)),c("box-sizing","border-box")],rIe=w(j2.concat([c("background",mo(y.brand)),c("color","#fff")])),nIe=w(j2.concat([c("background",mo(y.surface)),c("color",mo(y.brand)),c("border","2px solid var("+y.brand+")")])),iIe=w(j2.concat([c("background",mo(y.surface)),c("color",mo(y.textDisabled)),c("border","1px solid var("+y.border+")")])),a9=[c("font-size",mo(A.sizeXs)),c("text-align","center"),c("max-width","96px")],oIe=w(a9.concat([c("color",mo(y.textPrimary))])),sIe=w(a9.concat([c("color",mo(y.textDisabled))])),aIe=w([c("display","none")]);function lIe(e){switch(e){case"Done":return rIe;case"Current":return nIe;case"Upcoming":return iIe}}function uIe(e){switch(e){case"Done":case"Current":return oIe;case"Upcoming":return sIe}}function cIe(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function dIe(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:tIe(n.state==="Done"||n.state==="Current")},n.key+":c"),s=r?aIe:uIe(n.state);return L(Px,{children:[o,L("div",{children:[b("span",{children:cIe(n.state,i),className:lIe(n.state)}),b("span",{children:n.label,className:s})],className:eIe,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:ZFe,role:"list"})}let l9=dIe;function u9(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 fIe(e){if(typeof e=="object")return bt(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function hIe(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 pIe(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function gIe(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 _n(e){return"var("+e+")"}let mIe=w([z("flex"),pe("column"),c("gap",_n(F.md)),c("font-family",_n(A.fontFamily))]),vIe=w([z("flex"),pe("column")]),_Ie=w([z("flex"),Z("stretch"),c("gap",_n(F.sm))]),bIe=w([z("flex"),pe("column"),Z("center"),c("flex","0 0 22px")]);function yIe(e){return w([z("inlineFlex"),Z("center"),Xe("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",_n(y.surface)),c("font-size","11px"),c("line-height","1"),c("flex","0 0 auto")])}let xIe=w([c("flex","1 1 auto"),c("width","1px"),c("min-height","12px"),c("background",_n(y.borderSubtle))]),Z3=w([z("flex"),pe("column"),c("gap","2px"),c("flex","1 1 auto"),c("min-width","0"),c("padding-bottom",_n(F.sm))]),SIe=w([ye("pointer"),We([c("background",_n(y.surfaceSubtle))]),c("border-radius",_n(X.sm)),c("padding-left","4px"),c("margin-left","-4px")]),EIe=w([z("flex"),Z("center"),bi("wrap"),c("gap",_n(F.xs))]),wIe=w([c("font-size",_n(A.sizeSm)),c("font-weight",_n(A.weightMedium)),c("color",_n(y.textPrimary))]),kIe=w([z("flex"),Z("center"),c("gap","6px"),c("font-size",_n(A.sizeXs)),c("color",_n(y.textSecondary))]),CIe=w([c("font-size",_n(A.sizeSm)),c("color",_n(y.textSecondary)),c("white-space","pre-wrap")]),RIe=w([c("font-size",_n(A.sizeXs)),c("color",_n(y.textDisabled))]);function AIe(e){let t=e.entries;if(t.length===0)return b(id,{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(l9,{steps:i}):null,b("div",{children:t.map((s,a)=>{let l=Be(s.onOpen),u=s.actor,d=s.at,f,h=0;u!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[u!==void 0?L(Hr,{children:[b(od,{name:u,src:s.actorImageUrl,size:"Small"}),b("span",{children:u})]}):null,d!==void 0?b("span",{children:sv(D(n,Date.now()),d),title:D(qf(d),d)}):null],className:kIe}));let p=s.note;return L("div",{children:[L("div",{children:[b("span",{children:pIe(s.decision),className:yIe(gIe(s.decision))}),a===o?null:b("div",{className:xIe})],className:bIe}),L("div",{children:[L("div",{children:[b("span",{children:s.step,className:wIe}),b(na,{variant:hIe(s.decision),label:fIe(s.decision)})],className:EIe}),f,p!==void 0&&p!==""?b("div",{children:p,className:CIe}):null],className:l?Z3+" "+SIe:Z3,onClick:g=>se(s.onOpen,m=>m())})],className:_Ie},s.key)}),className:vIe}),r!==void 0?b("span",{children:r,className:RIe}):null],className:mIe})}let TIe=AIe;function Lo(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let NIe=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],$Ie=["decision","outcome","verdict","approval","approvalstatus","result"],DIe=["step","stage","level","tier","approvalstep","approvallevel","phase"],FIe=["note","notes","comment","comments","reason","remarks","justification","rationale"];function IIe(e){let t=Eu(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function PIe(e){return e.filter(t=>NIe.includes(Lo(t))).length>=2}function c9(e){return ne(Tr(e),t=>{let r=t[1],n=t[0];if(Mh(r))return W(IIe(r),i=>[n,i])})}function OIe(e){let t=c9(e),r=t.find(n=>$Ie.includes(Lo(n[0])));return r!==void 0?r:t.find(n=>PIe(n[1]))}function MIe(e,t){let r=Tr(e).map(n=>n[0]).find(n=>fe(O(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:Tr(e).map(n=>n[0]).find(n=>fe(Gc(n),!1,xI))}function d9(e,t){let r=D(t,Br(e,void 0,void 0)),n=OIe(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],s=c9(e).find(a=>{let l=a[0];return l!==o?DIe.includes(Lo(l)):!1});return{decisionField:o,dateSpan:i,stepField:W(s,a=>a[0]),stepValues:fe(s,[],a=>a[1]),actorField:MIe(e,r),noteField:ne(Tr(e),a=>{let l=a[0];if(Mh(a[1])&&FIe.includes(Lo(l)))return l})[0]}}function LIe(e){return Be(d9(e,void 0))}function q2(e){return e.rows.map((t,r)=>{let n=D(Q(t),{});return{key:D(R(O(n,"id"),ce),"#"+r.toString()),json:t,dict:n}})}function zl(e,t){return R(O(e,t),ce)}function eD(e,t){return R(wu(t,e),$n)}function tD(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>Lo(n)===Lo(t));return r!==-1?r:e.length}function zIe(e,t,r){let n=r!==void 0?r:f=>f,s=q2(e).map(f=>{let h=R(t.stepField,g=>zl(f.dict,g)),p=zl(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?s.sort((f,h)=>tD(t.stepValues,f[1])-tD(t.stepValues,h[1])|0):s.sort((f,h)=>{let p=eD(f[0].dict,t.dateSpan),g=eD(h[0].dict,t.dateSpan);return p!==void 0?g!==void 0?p-g:-1:g!==void 0?1:0});let l=s.map(f=>{let h=f[0];return{key:h.key,step:D(W(f[1],bt),D(R(e.semantics.labelField,p=>zl(h.dict,p)),"Decision")),decision:fe(f[2],"Pending",u9),actor:W(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=ne(s,f=>W(f[1],Lo)),d=t.stepValues.filter(f=>!u.includes(Lo(f))).map(f=>({key:"pending:"+f,step:bt(f),decision:"Pending"}));return l.concat(d)}function UIe(e,t){let r=t.stepField;if(r===void 0)return[];let n=q2(e),i=ne(n,s=>{let a=zl(s.dict,r),l=zl(s.dict,t.decisionField);if(a===void 0||l===void 0)return;let u=u9(l);if(!(typeof u!="object"&&u==="Pending"))return Lo(a)}),o=t.stepValues.find(s=>!i.includes(Lo(s)));return t.stepValues.map(s=>({key:s,label:bt(s),state:i.includes(Lo(s))?"Done":Ue(o,s)?"Current":"Upcoming"}))}function ka(e){return e.rows.map((t,r)=>{let n=D(Q(t),{});return{key:D(R(O(n,"id"),ce),"#"+r.toString()),json:t,dict:n}})}function bu(e,t){return R(O(e,t),ce)}function qu(e,t){return D(R(e.semantics.labelField,r=>bu(t.dict,r)),t.key)}function BIe(e,t){return W(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 f9(e,t,r){se(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function h9(e,t,r){return b("span",{children:ep(e,t,r!==void 0?r:"item"),style:{color:"var("+y.textDisabled+")",fontSize:"var("+A.sizeXs+")"}})}function Bv(e,t,r,n){return L("div",{children:[e,h9(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+F.sm+")"}})}function jIe(e){let t=e.source,r=Rs(),n=hm(),i=ka(t),o=$o(t.schema,"List"),s=Zh(i.map(p=>p.dict),o,r),u={lookupLabel:(p,g)=>Xh(s,p,r,g),isMissing:(p,g)=>ev(s,p,r,g)},d=ne([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 g=W(R(t.semantics.statusField,v=>Yo(p.dict,v)),v=>b(na,{variant:"Neutral",label:bt(v),dot:!1})),m=BIe(t,p);return{key:p.key,title:qu(t,p),media:m,badge:g,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(QFe,{cards:h,onCardClick:p=>f9(t,i,p)}),[t],void 0,void 0)}function qIe(e){let t=ka(e),r=D(e.semantics.statusField,""),n=Ho(e.schema,r),i=a=>D(Yo(a.dict,r),""),o=a=>a.map(l=>({value:l,label:l===""?"(no status)":bt(l),cards:t.filter(u=>i(u)===l).map(u=>{let d=ne(km(e.schema),f=>{if(f!==r)return bu(u.dict,f)})[0];return{key:u.key,title:qu(e,u),meta:d}})})),s=st(t.map(i).filter(a=>!n.includes(a)),[],(a,l)=>a.includes(l)?a:a.concat([l]));return o(n).concat(o(s))}function VIe(e){let t=e.source,r=ka(t),n=D(t.semantics.statusField,""),i=qIe(t),o=f=>D(R(r.find(h=>h.key===f),h=>Yo(h.dict,n)),""),s=(f,h)=>R(t.statusCommandFor,p=>p(o(f),h)),a=t.onCommand,l=a!==void 0&&Be(t.statusCommandFor)?(f,h)=>se(s(f,h),p=>a(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>Be(s(f,h)):void 0;return Bv(b(mFe,{columns:i,onCardClick:f=>f9(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let ed=["var("+y.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function V2(e,t){return D(e.accent,ed[Uo(t,ed.length)])}function KIe(e){return e.map((t,r)=>{let n=V2(t,r),i=t.semantics.dateSpan;return i!==void 0?ne(ka(t),o=>W(R(wu(i,o.dict),$n),s=>{let a=R(Yx(i,o.dict),$n);return{key:r.toString()+":"+o.key,title:qu(t,o),start:s,end_:a,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function HIe(e){let t=e.sources,r=KIe(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:V2(i,o)})):[];return b(LFe,{events:r,legend:n,windowNote:ep(t,void 0,void 0)})}function WIe(e){return e.map((r,n)=>{let i=r.semantics.dateSpan,o=V2(r,n);return ka(r).map(s=>{let a=R(i,f=>wu(f,s.dict)),l=R(a,$n),u=a!==void 0?D(qf(a),a):"",d=W(R(r.semantics.statusField,f=>Yo(s.dict,f)),bt);return{entry:{id:n.toString()+":"+s.key,timestamp:u,label:qu(r,s),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(s.key,s.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 GIe(e){let t=e.sources,r=WIe(t),n=i=>se(r.find(o=>o.entry.id===i),o=>o.open_());return Bv(b(L$e,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function p9(e,t){let r=O(e,t);if(r===void 0)return[];let n=ce(r);return n!==void 0?[n]:ne(D(br(r),[]),ce)}function JIe(e,t){let r=t.map(n=>n.key);return ne(Tr(e.schema),n=>{let i=n[0];return W(Gc(i),o=>i)}).filter(n=>t.some(i=>p9(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function QIe(e){let t=ka(e),r=JIe(e,t),n=Nh(e.semantics.dateSpan,bI);return n!==void 0?ne(t,i=>W(R(wu(n,i.dict),$n),o=>{let s=D(R(Yx(n,i.dict),$n),o);return{key:i.key,title:qu(e,i),start:o,end_:s<o?o:s,accent:e.accent,dependsOn:r.map(a=>p9(i.dict,a)).flat(),onOpen:()=>e.onOpenRow(i.key,i.json)}})):[]}function YIe(e){let t=e.source,r=QIe(t),n=t.rows.length,i=r.length,o=ep([t],i,void 0),s=i===n?o:o+" (the rest carry no start date)";return b(v3e,{tasks:r,windowNote:s})}function XIe(e,t){let r=e.semantics.labelField,n=R(e.semantics.statusField,i=>bu(t.dict,i));return n!==void 0?n:R(km(e.schema).find(i=>Uf(i,r)?Uf(i,e.semantics.parentField):!1),i=>bu(t.dict,i))}function ZIe(e){let t=ka(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:qu(e,n),subtitle:XIe(e,n),parent:R(r,i=>bu(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function ePe(e){let t=e.source,r=ZIe(t);return b(A$e,{nodes:r,windowNote:ep([t],void 0,void 0)})}function tPe(e){let t=e.source,r=Rs(),n=q2(t),i=$o(t.schema,"List"),o=Zh(n.map(d=>d.dict),i,r),s=d9(t.schema,t.semantics);if(s===void 0)return null;let l=zIe(t,s,d=>{let f=R(s.actorField,Gc);return f!==void 0?D(Xh(o,f,r,d),d):d}),u=UIe(t,s);return b(TIe,{entries:l,steps:u,windowNote:ep([t],void 0,"decision")})}function rPe(e){return ne(Tr(e),t=>{let r=Eu(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function g9(e){let t=rPe(e),r=Br(e,void 0,void 0).statusField,n=r!==void 0&&t.some(s=>s[0]===r)?t.filter(s=>s[0]===r).concat(t.filter(s=>s[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function nPe(e){return W(g9(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],s=o[1],a=o[0],l=ka(e),u=(_,x)=>D(Yo(_.dict,x),""),d=(_,x)=>st(l.map(E=>u(E,_)).filter(E=>!x.includes(E)),[],(E,S)=>E.includes(S)?E:E.concat([S])),f=s.concat(d(a,s)),h=n.concat(d(i,n)),p=f.map(_=>h.map(x=>st(l,0,(E,S)=>u(S,a)===_&&u(S,i)===x?E+1|0:E))),g=p.map(_=>st(_,0,(x,E)=>x+E|0)),m=h.map((_,x)=>st(p,0,(E,S)=>E+S[x]|0)),v=st(g,0,(_,x)=>_+x|0);return{rowField:a,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:g,colTotals:m,grandTotal:v}})}function iPe(e,t){return sI(e.toString(),aK(t))}function oPe(e){let t=e.source,r=ae(()=>"Numbers"),n=r[1],i=r[0],o=nPe(t);if(o===void 0)return null;let s=m=>m===""?"(none)":bt(m),a=bt(o.rowField),l=bt(o.colField),u=o.rowValues.map(m=>[m,s(m)]),d=o.colValues.map(m=>[m,s(m)]),f=st(o.counts,0,(m,v)=>st(v,m,(_,x)=>x>_?x:_)),h=m=>iPe(m,fE([t])),p=(m,v)=>b("button",{children:v,style:{background:"none",backgroundColor:i===m?"var("+y.surfaceSubtle+")":"transparent",border:"1px solid var("+y.border+")",color:i===m?"var("+y.textPrimary+")":"var("+y.textSecondary+")",cursor:"pointer",fontSize:"var("+A.sizeSm+")",padding:"2px var("+F.sm+")",borderRadius:"var("+X.sm+")"},type:"button",onClick:_=>n(x=>m)}),g;return g=i==="Numbers"?b(C3e,{rowDimLabel:a,colDimLabel:l,rowHeaders:u.map(m=>({value:m[0],label:m[1]})),colHeaders:d.map(m=>({value:m[0],label:m[1]})),cells:o.counts.map(m=>m.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):b(s$e,{rowDimLabel:a,colDimLabel:l,rowHeaders:u.map(m=>({value:m[0],label:m[1]})),colHeaders:d.map(m=>({value:m[0],label:m[1]})),cells:o.counts.map(m=>m.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+")"}}),g,h9([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+F.sm+")"}})}function sPe(e){return e.map((t,r)=>{let n=t.semantics.imageField;return ka(t).map(i=>{let o=R(R(n,u=>bu(i.dict,u)),u=>{if(u!=="")return tu(u)}),s=W(R(t.semantics.statusField,u=>Yo(i.dict,u)),bt),a=t.fillSlot,l=o!==void 0||a===void 0||n===void 0?void 0:a(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:qu(t,i),caption:s,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function aPe(e){let t=e.sources,r=sPe(t),n=i=>se(r.find(o=>o.item.key===i),o=>o.open_());return Bv(b(L3e,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function Ca(e){return b("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function Fd(e,t){let r=e[0];return r!==void 0?t(r):null}Qo({id:"cards",label:"Cards",icon:Ca("▤"),arity:"Single",isCapable:e=>!0,render:e=>Fd(e,t=>b(jIe,{source:t})),capability:"always — richer with label/image semantics and summary fields"});Qo({id:"board",label:"Board",icon:Ca("▥"),arity:"Single",isCapable:e=>{let t=Br(e,void 0,void 0);return fe(t.statusField,!1,r=>Ho(e,r).length!==0)},render:e=>Fd(e,t=>b(VIe,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});Qo({id:"calendar",label:"Calendar",icon:Ca("▣"),arity:{TAG:"Multi",min:1},isCapable:e=>Be(Br(e,void 0,void 0).dateSpan),render:e=>b(HIe,{sources:e}),capability:"dateSpan — a `date-range` field, a start*/end* date-time pair, or a lone non-infrastructure date field"});Qo({id:"timeline",label:"Timeline",icon:Ca("▚"),arity:{TAG:"Multi",min:2},isCapable:e=>Be(Br(e,void 0,void 0).dateSpan),render:e=>b(GIe,{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"});Qo({id:"gantt",label:"Gantt",icon:Ca("▬"),arity:"Single",isCapable:e=>fe(Br(e,void 0,void 0).dateSpan,!1,bI),render:e=>Fd(e,t=>b(YIe,{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"});Qo({id:"hierarchy",label:"Hierarchy",icon:Ca("⑂"),arity:"Single",isCapable:e=>Be(Br(e,void 0,void 0).parentField),render:e=>Fd(e,t=>b(ePe,{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"});Qo({id:"approvals",label:"Approvals",icon:Ca("✓"),arity:"Single",isCapable:LIe,render:e=>Fd(e,t=>b(tPe,{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"});Qo({id:"pivot",label:"Pivot",icon:Ca("⊞"),arity:"Single",isCapable:e=>Be(g9(e)),render:e=>Fd(e,t=>b(oPe,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});Qo({id:"gallery",label:"Gallery",icon:Ca("▨"),arity:"Single",isCapable:e=>Be(Br(e,void 0,void 0).imageField),render:e=>b(aPe,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function rD(e,t){return e===t?0:e<t?-1:1}function lPe(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 pf(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 ne(r._0,ce).join(", ");break}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function uPe(e,t,r){let n=s=>s!==void 0?it(s)==="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 s=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 s(t)-s(r);case"KDate":return rD(pf(e,t),pf(e,r));case"KNumber":let a=D(R(t,Bo),0),l=D(R(r,Bo),0);return a-l}return rD(pf(e,t),pf(e,r))}function cPe(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?fe(R(t,ce),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=W(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 dPe(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>pf(i.kind,O(e,i.key)).toLowerCase().includes(n))}function fPe(e,t,r){let n=Ge(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let s=o[0],a=t.find(l=>l.key===s);return a!==void 0?cPe(a.kind,O(i,s),o[1]):!0}))}function hPe(e,t,r){return r===""?e:e.filter(n=>dPe(n,t,r))}function pPe(e,t,r,n){if(r===void 0)return e;let i=t.find(s=>s.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((s,a)=>uPe(i.kind,O(s,r),O(a,r))*o)}function gPe(e,t){return ne(e,r=>{if(!_ie(r.kind))return;let n=lPe(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 mPe=w([Ut("relative"),z("inlineFlex"),Z("center")]),vPe=w([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(A.sizeMd)),c("color",To(y.textPrimary)),c("outline","none"),c("width","240px"),ga([c("border-color",To(y.brand))]),$V([c("color",To(y.textDisabled))])]),_Pe=w([Ut("absolute"),nd(Ce(10)),c("color",To(y.textDisabled)),c("font-size",To(A.sizeSm)),c("pointer-events","none")]),bPe=w([Ut("absolute"),bl(Ce(8)),c("background","none"),c("border","none"),c("cursor","pointer"),c("color",To(y.textDisabled)),c("font-size",To(A.sizeSm)),c("padding","0"),c("line-height","1"),We([c("color",To(y.textSecondary))])]);function yPe(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:_Pe}),b("input",{className:vPe,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?b("button",{children:"x",className:bPe,onClick:o=>r("")}):null],className:mPe})}let m9=yPe;function Ua(e){return"var("+e+")"}let xPe=w([z("flex"),Z("center"),c("gap",Ua(F.sm)),bi("wrap")]),SPe=w([z("flex"),Z("center"),c("gap","4px")]),EPe=w([c("color",Ua(y.textSecondary)),c("font-size",Ua(A.sizeSm)),c("white-space","nowrap")]),wPe=w([c("background",Ua(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Ua(X.sm)),c("padding","2px var("+F.sm+")"),c("font-size",Ua(A.sizeSm)),c("color",Ua(y.textPrimary)),c("cursor","pointer"),c("outline","none"),ga([c("border-color",Ua(y.brand))])]);function kPe(e){let t=e.onChange,r=e.filter;return L("div",{children:[b("span",{children:r.label+":",className:EPe}),L("select",{children:[b("option",{children:"All",value:""}),r.options.map(n=>b("option",{children:n.label,value:n.value},n.value))],className:wPe,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:SPe})}function CPe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?b(m9,{value:r,onChange:t}):null,e.filters.map(i=>b(kPe,{filter:i,onChange:n},i.key))],className:xPe})}let v9=CPe;function ds(e){return"var("+e+")"}function _9(e){switch(e){case"Success":return y.success;case"Warning":return y.warning;case"Error":return y.error;case"Info":return y.info}}function RPe(e){return w([z("flex"),Z("flexStart"),c("gap",ds(F.sm)),c("padding","var("+F.sm+") var("+F.md+")"),c("border-radius",ds(X.md)),c("border-left","3px solid var("+_9(e)+")"),c("background",ds(y.surfaceElevated)),c("font-size",ds(A.sizeMd)),c("line-height",ds(A.lineHeightNormal))])}function APe(e){return w([c("color",ds(_9(e))),c("font-size","16px"),_i(0),Cs(Ce(1))])}let TPe=w([vo(1)]),NPe=w([c("font-weight",ds(A.weightMedium)),c("color",ds(y.textPrimary)),Em(Ce(2))]),$Pe=w([c("color",ds(y.textSecondary))]),DPe=w([c("background","none"),DV(Ce(0),"none",MV),ye("pointer"),c("color",ds(y.textSecondary)),c("font-size","16px"),c("line-height","1"),c("padding","0"),_i(0)]);function FPe(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function IPe(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[b("span",{children:FPe(r),className:APe(r)}),L("div",{children:[fe(e.title,null,n=>b("div",{children:n,className:NPe})),b("div",{children:e.message,className:$Pe})],className:TPe}),fe(e.onDismiss,null,n=>b("button",{children:"×","aria-label":"Dismiss",className:DPe,onClick:i=>n()}))],className:RPe(r),role:"alert"})}let b9=IPe;function K2(){let e=ae(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(a=>{});let s=o._0;t(a=>s)};return{element:r!==void 0?b(b9,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function nD(e){try{return decodeURIComponent(e)}catch{return e}}function PPe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function iD(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[nD(r),nD(n)]}function Ii(e){return"var("+e+")"}let OPe=w([z("flex"),pe("column"),Z("center"),Xe("center"),c("gap",Ii(F.md)),vo(1),c("min-height","160px"),ha("center"),c("padding",Ii(F.lg))]),MPe=w([c("font-size","32px"),c("color",Ii(y.error)),c("line-height","1")]),LPe=w([c("color",Ii(y.textPrimary)),c("font-size",Ii(A.sizeLg)),c("font-weight",Ii(A.weightMedium)),yn(Ce(0))]),zPe=w([c("color",Ii(y.textSecondary)),c("font-size",Ii(A.sizeSm)),c("line-height",Ii(A.lineHeightNormal)),yn(Ce(0))]),UPe=w([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(A.sizeSm)),c("cursor","pointer"),Cs(Ce(4))]);function BPe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[b("div",{children:"X",className:MPe}),b("h3",{children:r,className:LPe}),fe(e.detail,null,n=>b("p",{children:n,className:zPe})),fe(e.onRetry,null,n=>b("button",{children:"Try again",className:UPe,onClick:i=>n()}))],className:OPe})}let Ba=BPe,jPe=dt([["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 qPe(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function oD(e,t){return fe(R(Q(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 ne(n._0,ce).filter(o=>o!=="");default:return[]}})}function VPe(e){return R(e,t=>{try{return JSON.parse(t)}catch{return}})}function sD(e,t){return st(Ge(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function KPe(e,t,r,n){let i=ma(t,r);if(i===void 0)return Promise.resolve(n);let o=i.queryField,s=i.labelField,a=s==="id"?"id":"id "+s,l="query($ids: [ID!]) { "+o+"(first: "+n.length.toString()+", filter: {ids: $ids}) { edges { node { "+a+" } } } }",u={};return u.ids=n.map(d=>d),Gt(e(l,u).then(d=>{let f=u4(d,o,s);return Promise.resolve(n.map(h=>{let p=O(f,h);return p!==void 0?p:h}))}),d=>Promise.resolve(n))}function gp(e,t,r,n){let i=qPe(r,n);if(r===void 0)return Promise.resolve(i);let o=O(jPe,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let s=VPe(n);if(s===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(u=>{let d=u.field,f=oD(s,d);return f.length===0?Promise.resolve([d,""]):KPe(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(sD(o.template,d))})}let a={};return o.idFields.forEach(l=>{let u=l.field,d=oD(s,u);a[u]=d.join(", ")}),Promise.resolve(sD(o.template,a))}let HPe="The request failed — the change was not sent.",aD="This command could not be sent. See the console for details.";function WPe(e,t,r){let n={};return Ge(D(Q(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[D(e.aggregateIdField,"id")]=t,n}function H2(e,t,r,n,i,o,s,a){let l=o!==void 0?o:[],u=s!==void 0?s:h=>{},d=a!==void 0?a:h=>{},f=t.filter(h=>h.level==="Instance");return(h,p,g)=>{let m=f.find(v=>v.name===h);if(e!==void 0)if(m!==void 0){d(p),Gt(e(m.mutationDocument,WPe(m,p,g)).then(v=>{let _=Ed(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"+fe(x.errorCode,"",E=>" ("+E+")")),i(),gp(e,l,x.errorCode,x.detail).then(E=>(u({TAG:"Failed",_0:{command:m.label,reason:E}}),Promise.resolve()))}}),v=>(console.error("[AutoUI] "+r+": command "+h+" failed to reach the server"),u({TAG:"Failed",_0:{command:m.label,reason:HPe}}),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:aD}});else return console.error("[AutoUI] "+r+': command "'+h+'" not sent — no GraphQL executor in context'),u({TAG:"Failed",_0:{command:h,reason:aD}})}}let GPe=500;function to(e){return"var("+e+")"}let JPe=w([Ut("relative"),z("inlineBlock")]),QPe=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",to(X.sm)),c("cursor","pointer"),c("color",to(y.textSecondary)),c("padding","2px var("+F.sm+")"),c("font-size",to(A.sizeSm)),We([c("background",to(y.surfaceSubtle)),c("color",to(y.textPrimary))])]),YPe=w([Ut("absolute"),bl(Ce(0)),pa({NAME:"percent",VAL:100}),Cs(Ce(4)),c("background",to(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",to(X.md)),c("box-shadow",to(mn.md)),c("min-width","160px"),c("z-index","200"),c("overflow","hidden"),TV(Ce(4),Ce(0))]);function XPe(e){return w([z("block"),Ko({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",to(A.sizeMd)),c("color",to(e?y.error:y.textPrimary)),ye("pointer"),We([c("background",to(y.surfaceSubtle))])])}let ZPe=w([c("border","none"),c("border-top","1px solid var("+y.borderSubtle+")"),EV(Ce(4),Ce(0))]);function eOe(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=ae(()=>!1),i=n[1],o=n[0];return Ae(()=>{if(!o)return;let s=a=>i(l=>!1);return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[o]),L("div",{children:[b("button",{children:r,className:QPe,onClick:s=>{s.stopPropagation(),i(a=>!a)}}),o?b("div",{children:e.items.map((s,a)=>{if(typeof s!="object")return b("hr",{className:ZPe},a.toString());let l=s.onClick,u=s.label;return b("button",{children:u,className:XPe(s.danger),onClick:d=>{i(f=>!1),l()}},u)}),className:YPe,onClick:s=>{s.stopPropagation()}}):null],className:JPe})}let tOe=eOe;function yx(e){return"var("+e+")"}let rOe=w([z("grid"),c("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),c("gap",yx(F.lg)),c("align-items","start"),tI("(max-width: 720px)",[c("grid-template-columns","minmax(0, 1fr)")])]),y9=w([c("min-width","0"),c("overflow","auto")]),nOe=Fr([y9,w([c("border-left","1px solid var("+y.border+")"),c("padding-left",yx(F.lg)),tI("(max-width: 720px)",[c("border-left","none"),c("padding-left","0"),c("border-top","1px solid var("+y.border+")"),c("padding-top",yx(F.lg))])])]);function iOe(e){return L("div",{children:[b("div",{children:e.master,className:y9}),b("div",{children:e.detail,className:nOe})],className:rOe})}let oOe=iOe;function Ah(e){return"var("+e+")"}let sOe=w([z("flex"),pe("column"),Z("center"),Xe("center"),c("gap",Ah(F.md)),vo(1),c("min-height","160px"),c("color",Ah(y.textSecondary))]),aOe=w([c("width","32px"),c("height","32px"),c("border","3px solid var("+y.borderSubtle+")"),c("border-top-color",Ah(y.brand)),c("border-radius","50%"),c("animation","rv-spin 0.7s linear infinite")]),lOe=w([c("font-size",Ah(A.sizeSm)),c("color",Ah(y.textSecondary))]);LV("@keyframes rv-spin",[kr("from",[c("transform","rotate(0deg)")]),kr("to",[c("transform","rotate(360deg)")])]);function uOe(e){return L("div",{children:[b("div",{className:aOe}),fe(e.label,null,t=>b("span",{children:t,className:lOe}))],className:sOe})}let Of=uOe;function cOe(e,t){return D(R(O(e,t),ce),"")}function dOe(e,t,r){let n={},i=[];e.forEach(s=>{let a=cOe(s,t),l=O(n,a);l!==void 0?l.push(s):(n[a]=[s],i.push(a))});let o=s=>{if(s==="")return r.length+1|0;let a=r.indexOf(s);return a!==-1?a:r.length};return i.toSorted((s,a)=>{let l=o(s),u=o(a);return l!==u?l-u|0:s<a?-1:s>a?1:0}).map(s=>[s,D(O(n,s),[])])}function At(e){return"var("+e+")"}let x9="168px",fOe=w([z("flex"),pe("column"),c("gap",At(F.sm))]),hOe=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",At(F.sm))]),lD=w([z("inlineFlex"),Z("center"),c("gap",At(F.xs))]),gf=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",At(X.sm)),c("padding","2px var("+F.sm+")"),c("color",At(y.textSecondary)),c("font-size",At(A.sizeSm)),ye("pointer"),We([c("background",At(y.surfaceSubtle)),c("color",At(y.textPrimary))])]),pOe=Fr([gf,w([c("background",At(y.surfaceSubtle)),c("color",At(y.textPrimary)),c("font-weight",At(A.weightMedium))])]),gOe=w([c("font-size",At(A.sizeMd)),c("font-weight",At(A.weightMedium)),c("color",At(y.textPrimary))]),mOe=w([c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",At(X.md)),c("overflow","hidden")]),S9=w([z("flex"),Z("stretch")]),vOe=Fr([S9,w([c("background",At(y.surfaceSubtle)),c("border-bottom","1px solid var("+y.borderSubtle+")")])]),_Oe=Fr([S9,w([c("border-top","1px solid var("+y.borderSubtle+")")])]),bOe=w([c("flex","0 0 "+x9),c("padding","4px var("+F.sm+")"),c("font-size",At(A.sizeXs)),c("color",At(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),E9=w([c("flex","0 0 "+x9),c("padding","6px var("+F.sm+")"),c("font-size",At(A.sizeSm)),c("font-weight",At(A.weightMedium)),c("color",At(y.textPrimary)),c("border-right","1px solid var("+y.borderSubtle+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),yOe=Fr([E9,w([c("color",At(y.textDisabled)),c("font-style","italic")])]);function xx(e){return w([z("grid"),c("flex","1 1 auto"),c("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let xOe=w([c("background",At(y.surfaceSubtle))]),SOe=w([c("padding","4px var("+F.xs+")"),c("font-size",At(A.sizeXs)),c("color",At(y.textSecondary)),c("border-left","1px solid var("+y.borderSubtle+")")]),w9=w([z("flex"),pe("column"),c("gap","2px"),c("min-height","48px"),c("padding","3px"),c("border-left","1px solid var("+y.borderSubtle+")")]),EOe=Fr([w9,w([c("background",At(y.surfaceSubtle))])]);function uD(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",At(X.sm)),c("background",At(y.surfaceSubtle)),c("color",At(y.textPrimary)),c("font-size",At(A.sizeXs)),c("padding","1px var("+F.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),ye("pointer"),We([c("background",At(y.surfaceElevated))])])}let wOe=w([ye("grab")]),kOe=w([Ys(.85),c("z-index","10"),ye("grabbing")]),COe=w([c("font-size",At(A.sizeXs)),c("color",At(y.textDisabled))]),cD="var("+y.brand+")";function ROe(e){return D(e.end_,e.start)}function AOe(e,t){return e.filter(r=>BI(r.start,ROe(r),t)).toSorted((r,n)=>r.start-n.start)}function TOe(e,t){return qI(e.start)||!UI(e.start,t)?e.title:jI(e.start)+" "+e.title}function NOe(e){let t=e.draggable,r=e.event,n=e9({id:r.key,disabled:!t}),i=t?uD(D(r.accent,cD))+" "+wOe:uD(D(r.accent,cD)),o=n.isDragging?i+" "+kOe:i,s=W(i9(n.transform),u=>({transform:u})),a=n.listeners,l=a==null?void 0:Wt(a);return b("button",{children:TOe(r,e.day),ref:Wt(n.setNodeRef),className:o,style:s,title:r.title,onKeyDown:u=>se(l,d=>n9(d,u)),onClick:u=>r.onOpen(),onPointerDown:u=>se(l,d=>r9(d,u))})}function $Oe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,s=t9({id:o}),a=!i.unassigned&&s.isOver?xx(n.length)+" "+xOe:xx(n.length);return L("div",{children:[b("div",{children:i.label,className:i.unassigned?yOe:E9}),b("div",{children:n.map(l=>b("div",{children:AOe(i.events,l).map(u=>b(NOe,{event:u,day:l,draggable:t},u.key)),className:l===r?EOe:w9},l.toString())),ref:Wt(s.setNodeRef),className:a})],className:_Oe})}function DOe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=ae(()=>"Week"),s=o[1],a=o[0],l=ae(()=>Gn(D(r,Date.now()))),u=l[1],d=l[0],f=Gn(Date.now()),h=Be(t),p;p=a==="Week"?il(7,x=>oo(Am(d),x)):[Gn(d)];let g=x=>u(E=>a==="Week"?oo(E,x*7|0):oo(E,x)),m=x=>{let E=x.over;if(t===void 0||E==null||E.id==="")return;let S=i.find(C=>C.events.some(k=>k.key===x.active.id));if(fe(S,!0,C=>C.resourceId!==E.id))return t(x.active.id,E.id)},v=(x,E)=>b("button",{children:E,className:a===x?pOe:gf,onClick:S=>s(C=>x)}),_;return _=a==="Week"?Zi(d):sa(d)+" — "+Zi(d),L("div",{children:[L("div",{children:[L("div",{children:[b("button",{children:"‹",className:gf,onClick:x=>g(-1)}),b("button",{children:"Today",className:gf,onClick:x=>u(E=>f)}),b("button",{children:"›",className:gf,onClick:x=>g(1)}),b("span",{children:_,className:gOe})],className:lD}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:lD})],className:hOe}),b(Zz,{onDragEnd:m,children:L("div",{children:[L("div",{children:[b("div",{children:"Resource",className:bOe}),b("div",{children:p.map(x=>b("div",{children:sa(x),className:SOe},x.toString())),className:xx(p.length)})],className:vOe}),i.map(x=>b($Oe,{lane:x,days:p,today:f,draggable:h},x.unassigned?"\0unassigned":x.resourceId))],className:mOe})}),n!==void 0?b("span",{children:n,className:COe}):null],className:fOe})}let FOe=DOe;function k9(e,t){let r=R(R(R(Q(e),o=>O(o,"properties")),Q),o=>O(o,t));if(r===void 0)return;let n=R(R(Q(r),o=>O(o,"const")),ce);if(n!==void 0)return n;let i=Eu(r);if(i!==void 0&&i.length===1)return i[0]}function C9(e){return e.filter(t=>t.level==="Instance")}function IOe(e,t,r){return t!==void 0&&Ho(e,t).length!==0?C9(r).some(n=>{let i=n.allowedStates;return i!==void 0?i.length!==0:!1}):!1}function POe(e,t,r){let n=C9(r),i=Ho(e,t),o=l=>({commandName:l.name,label:l.label,toState:k9(l.schema,t)}),s=i.map(l=>{let u=ne(n,d=>{let f=d.allowedStates;if(f!==void 0&&f.includes(l))return o(d)});return{value:l,label:bt(l),terminal:u.length===0,outgoing:u}}),a=n.filter(l=>Ui(l.allowedStates)).map(o);return{statusField:t,states:s,anyState:a}}function ar(e){return"var("+e+")"}let OOe=w([z("flex"),pe("column"),c("gap",ar(F.md))]),MOe=w([c("font-size",ar(A.sizeLg)),c("font-weight",ar(A.weightMedium)),c("color",ar(y.textPrimary)),yn(Ce(0))]),LOe=w([c("font-size",ar(A.sizeXs)),c("color",ar(y.textDisabled))]),zOe=w([z("flex"),c("flex-wrap","wrap"),Z("flexStart"),c("gap",ar(F.md))]),UOe=w([z("flex"),pe("column"),c("gap",ar(F.sm)),c("flex","0 1 240px"),c("padding",ar(F.md)),c("background",ar(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",ar(X.md))]),BOe=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",ar(F.sm))]),jOe=w([c("font-size",ar(A.sizeXs)),c("color",ar(y.textDisabled)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),qOe=w([z("flex"),pe("column"),c("gap","4px")]),VOe=w([z("inlineFlex"),Z("center"),c("gap","4px"),c("align-self","flex-start"),c("padding","2px var("+F.sm+")"),c("background",ar(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",ar(X.sm)),c("font-size",ar(A.sizeSm)),c("color",ar(y.textPrimary))]),KOe=w([c("color",ar(y.textSecondary))]),HOe=w([c("font-size",ar(A.sizeXs)),c("color",ar(y.textDisabled))]),WOe=w([z("flex"),pe("column"),c("gap",ar(F.sm)),c("padding-top",ar(F.sm))]),GOe=w([c("font-size",ar(A.sizeXs)),c("font-weight",ar(A.weightMedium)),c("color",ar(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),JOe=w([z("flex"),c("flex-wrap","wrap"),c("gap","6px")]);function dD(e){let t=e.toState;return L("span",{children:[e.label,t!==void 0?b("span",{children:" → "+bt(t),className:KOe}):null],className:VOe},e.commandName)}function QOe(e){let t=e.title,r=e.statusField,n=POe(e.schema,r,e.commands);return L("div",{children:[t!==void 0?b("h3",{children:t,className:MOe}):null,b("div",{children:"Lifecycle on “"+bt(r)+"”",className:LOe}),b("div",{children:n.states.map(i=>L("div",{children:[L("div",{children:[b(na,{variant:"Neutral",label:i.label,dot:!0}),i.terminal?b("span",{children:"end",className:jOe}):null],className:BOe}),i.terminal?b("span",{children:"No commands available",className:HOe}):b("div",{children:i.outgoing.map(dD),className:qOe})],className:UOe},i.value)),className:zOe}),n.anyState.length!==0?L("div",{children:[b("span",{children:"Any state",className:GOe}),b("div",{children:n.anyState.map(dD),className:JOe})],className:WOe}):null],className:OOe})}let YOe=QOe;function XOe(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 ZOe(e,t){return e+"→"+t}function W2(e){return D(W(R(R(Q(e),t=>O(t,"properties")),Q),t=>Object.keys(t)),[])}function G2(e){return ne(D(R(R(Q(e),t=>O(t,"required")),br),[]),ce).filter(t=>t!=="TAG")}function by(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 e6e(e,t,r){let n=by(e).concat(by(t)),i=by(r);return n.some(o=>i.some(s=>s.startsWith(o)?!0:o.startsWith(s)))}function t6e(e){return e.filter(t=>t.level==="Instance")}function yy(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function r6e(e,t,r){return W2(e.schema).includes(t)?dt([[t,r]]):{}}function n6e(e,t){let r=e.filter(n=>W2(n.schema).includes(t)?G2(n.schema).every(i=>i===t||i==="id"?!0:Ue(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function xy(e){if(e.length===1)return e[0]}function J2(e,t,r){let n=t6e(t),i=n6e(n,e);return(o,s)=>{let a=(h,p)=>{if(yy(h,o))return{command:h.name,patch:r6e(h,e,s),tier:p}},l=R(R(R(r,h=>h[s]),h=>n.find(p=>p.name===h)),h=>a(h,"Hints"));if(l!==void 0)return l;let u=R(xy(n.filter(h=>yy(h,o)?Ue(h.targetState,s):!1)),h=>a(h,"DeclaredTarget"));if(u!==void 0)return u;let d=R(xy(n.filter(h=>yy(h,o)?Ue(k9(h.schema,e),s):!1)),h=>a(h,"SchemaTarget"));if(d!==void 0)return d;let f=R(xy(n.filter(h=>{let p=h.allowedStates;return p!==void 0&&p.includes(o)?e6e(h.name,h.label,s):!1})),h=>a(h,"StemMatch"));return f!==void 0?f:R(i,h=>a(h,"Setter"))}}function i6e(e,t,r,n){let i=J2(t,r,n),o=Ho(e,t),s={};return o.forEach(a=>{o.forEach(l=>{if(a!==l)return se(i(a,l),u=>{s[ZOe(a,l)]=u})})}),s}let yu="resources",xu="events";function o6e(e){return e.find(t=>Ue(t.role,yu))}function R9(e){return e.filter(t=>Ue(t.role,xu))}function s6e(e,t){return e.toString()+"::"+t}function a6e(e){let t=e.indexOf("::");if(t!==-1)return W(RF(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function nf(e,t){return R(O(e,t),ce)}function l6e(e){let t=o6e(e),r=R9(e),n=t!==void 0?t.rows.map(d=>{let f=D(Q(d),{}),h=D(nf(f,"id"),""),p=D(R(t.semantics.labelField,g=>nf(f,g)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>ne(d.rows,h=>{let p=D(Q(h),{}),g=D(nf(p,"id"),""),m=d.semantics.dateSpan;if(m!==void 0)return W(R(wu(m,p),$n),v=>{let _=R(Yx(m,p),$n),x=D(R(d.semantics.labelField,T=>nf(p,T)),g),E=D(R(d.resourceRef,T=>nf(p,T)),""),S=s6e(f,g),C=d.accent;return[E,{key:S,title:x,start:v,end_:_,accent:C,onOpen:()=>d.onOpenRow(g,h)}]})})).flat(),s=d=>ne(o,f=>{if(d(f[0]))return f[1]}),a=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:s(h=>h===f)}}),l=s(d=>!i.includes(d)),u=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return a.concat(u)}function u6e(e){let t=e.sources,r=l6e(t),n=R9(t),o=n.some(l=>Be(l.onCommand)&&Be(l.assignCommand)?Be(l.resourceRef):!1)?(l,u)=>se(a6e(l),d=>{let f=d[1];se(n[d[0]],h=>{let p=h.onCommand,g=h.assignCommand,m=h.resourceRef;if(p!==void 0&&g!==void 0&&m!==void 0)return p(g,f,dt([[m,u]]))})}):void 0,s=st(n,0,(l,u)=>l+u.rows.length|0),a=oI(fE(t),s,void 0,"scheduled item");return b(FOe,{lanes:r,windowNote:a,onReassign:o})}let c6e=b("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),mf="scheduler";function A9(e){return Be(Br(e,void 0,void 0).dateSpan)?Tr(e).some(t=>Be(Gc(t[0]))):!1}function d6e(e,t,r){return r?!1:A9(t)}function T9(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>W2(i.schema).includes(t)?G2(i.schema).every(o=>o===t||o==="id"?!0:Ue(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function f6e(e,t,r){let n=r!==void 0?r:(o,s)=>{},i={};return Bg().filter(o=>{let s=o.arity;return typeof s!="object"?!1:s.TAG!=="Multi"}).forEach(o=>{let s={},a={},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=>io(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(s,f,u):h===xu?se(R(d,p=>p.resourceRef),p=>l(a,f,[u,p])):void 0}),Ge(a).forEach(u=>{let d=u[0],f=D(O(s,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];u[1].forEach(g=>{i[g[0].name]={resource:p,resourceRef:g[1]}})})}),i}Qo({id:mf,label:"Scheduler",icon:c6e,arity:{TAG:"Slots",_0:[{role:yu,min:1,max:1},{role:xu,min:1}]},isCapable:A9,render:e=>b(u6e,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function ra(e){return"var("+e+")"}let R0=w([z("inlineFlex"),Z("center"),c("gap","6px"),c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",ra(X.full)),c("padding","2px var("+F.sm+")"),c("color",ra(y.textSecondary)),c("font-size",ra(A.sizeXs)),c("line-height","1.5")]),Sy=w([ye("pointer"),We([c("background",ra(y.surfaceSubtle)),c("color",ra(y.textPrimary))])]),h6e=w([Ys(.6),ye("notAllowed")]);function Q2(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let p6e=Q2(ra(y.success)),g6e=Q2(ra(y.border)),m6e=Q2(ra(y.border)),v6e=zV([[0,[Ys(.4)]],[50,[Ys(1)]],[100,[Ys(.4)]]]),_6e=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",ra(y.warning)),FV(v6e),IV({NAME:"ms",VAL:1200}),PV("infinite"),OV("easeInOut")]);function b6e(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,s=n?i&&o?[R0+" "+Sy,_6e,"Reconnecting…"]:i?[R0+" "+Sy,p6e,"Live"]:[R0+" "+Sy,g6e,"Snapshot"]:[R0+" "+h6e,m6e,"Off"],a=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:s[1]}),s[2]],className:s[0],title:l,disabled:!n,type:"button",onClick:a})}let y6e=b6e;function of(e){return"var("+e+")"}let x6e=w([z("inlineFlex"),Z("center"),c("gap","6px"),c("background",of(y.brand)),c("color",of(y.textOnBrand)),c("border","none"),c("border-radius",of(X.full)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",of(A.sizeSm)),c("font-weight",of(A.weightMedium)),ye("pointer"),We([c("opacity","0.85")])]),S6e=w([z("flex"),Z("center"),Xe("center"),c("padding","var("+F.xs+") 0")]);function E6e(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:x6e,type:"button",onClick:i=>t()}),className:S6e})}let w6e=E6e;function k6e(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function C6e(e){return k6e(e)}function Y2(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function yo(e){return[e._0,Y2(e)]}function N9(e,t){return TF(t,e,(r,n)=>n(r))}function xo(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}let fD=21;function $9(e,t,r){return ne(a4(e,t),n=>{let i=R(O(n,"id"),ce),o=D(R(O(n,r),ce),D(i,""));return W(i,s=>({id:s,label:o}))})}function R6e(e,t){let r=Si(),n=ae(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return Ae(()=>{let o={contents:!1};if(i(s=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let s=t==="id"?"id":"id "+t,a="query { "+e+"(first: "+fD.toString()+") { edges { node { "+s+" } } } }";Gt(r(a,{}).then(l=>{if(!o.contents){let u=$9(l,e,t),d=u.length>=fD,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(s=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function A6e(e,t,r){let n=Si(),i=ae(()=>({loading:!1,options:[],error:!1})),o=i[1];return Ae(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let s={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let a=setTimeout(()=>{if(s.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,Gt(n(u,d).then(f=>{if(!s.contents){let h=$9(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(s.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()=>{s.contents=!0,clearTimeout(a)}},[n,r,e]),i[0]}function T6e(e,t,r){let n=Si(),i=ae(()=>{}),o=i[1];return Ae(()=>{let s={contents:!1},a=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,Gt(n(u,d).then(f=>{if(!s.contents){let h=Q(f),p=D(R(R(h,_=>O(_,"data")),Q),{}),g=O(p,e),m=g!==void 0?g:R(h,_=>O(_,e)),v=R(m,Q);if(v!==void 0){let _=D(R(O(v,"id"),ce),t),x=D(R(O(v,r),ce),_);o(E=>({id:_,label:x}))}else o(_=>{})}return Promise.resolve()}),f=>Promise.resolve())}else a=1;return a===1&&o(l=>{}),()=>{s.contents=!0}},[n,t,r]),i[0]}function mr(e){return"var("+e+")"}function vf(e){if(e==="")return[];let t=br(JSON.parse(e));return t!==void 0?ne(t,ce):[e]}let N6e=w([Ut("relative"),Ko({NAME:"percent",VAL:100})]),hD=w([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(A.sizeMd)),c("color",mr(y.textPrimary)),c("outline","none"),Ko({NAME:"percent",VAL:100}),CV(Ce(34)),z("flex"),Z("center"),bi("wrap"),c("gap","4px"),ye("pointer"),ha("left"),ga([c("border-color",mr(y.brand))])]),$6e=w([c("border-color",mr(y.brand))]),D6e=w([c("border-color",mr(y.error))]),F6e=w([c("color",mr(y.textSecondary))]),I6e=w([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(A.sizeSm)),c("gap","4px")]),P6e=w([ye("pointer"),c("color",mr(y.textSecondary)),c("font-weight",mr(A.weightBold))]),O6e=w([c("border","none"),c("background","transparent"),c("outline","none"),c("color",mr(y.textPrimary)),c("font-size",mr(A.sizeMd)),vo(1),ZF(Ce(40))]),M6e=w([Ut("absolute"),pa({NAME:"percent",VAL:100}),nd("zero"),bl("zero"),Cs(Ce(2)),c("background",mr(y.surfaceElevated)),c("border","1px solid var("+y.border+")"),c("border-radius",mr(X.sm)),c("box-shadow",mr(mn.md)),SV("none"),yn("zero"),AV("zero"),wV(Ce(240)),RV("auto"),NV(20)]),L6e=w([c("padding","var("+F.xs+") var("+F.sm+")"),ye("pointer"),c("color",mr(y.textPrimary)),c("font-size",mr(A.sizeMd))]),z6e=w([c("background",mr(y.surfaceSubtle))]),U6e=w([c("background",mr(y.brandSubtle))]),pD=w([c("padding","var("+F.xs+") var("+F.sm+")"),c("color",mr(y.textSecondary)),c("font-size",mr(A.sizeSm))]),B6e=(function(e,t){return e.contains(t)});function j6e(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,s=Math.max(120,Math.min(240,i?n:r));return[i,s]}function q6e(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,s=e.required,a=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,g=R6e(u,l),m=g.options,v=g.loading,_=Je(void 0),x;if(a)x="Search";else{let Qe=_.current;if(Qe!==void 0)x=Qe;else if(v)x="Inline";else{let le=g.hasMore?"Search":"Inline";_.current=le,x=le}}let E=ae(()=>!1),S=E[1],C=E[0],k=ae(()=>0),N=k[1],T=k[0],$=ae(()=>""),P=$[1],M=$[0],I=ae(()=>[!1,240]),U=I[1],B=I[0],q=Je(null),J=Je(null),Y=a||o===""?!1:!m.some(Qe=>Qe.id===o),K=T6e(e.singleQueryField,Y?o:void 0,l),G=Qe=>{let le=W(m.find(Le=>Le.id===Qe),Le=>Le.label),Te=R(K,Le=>{if(Le.id===Qe)return Le.label});return le!==void 0?le:Te!==void 0?Te:Qe};Ae(()=>{if(!C)return;let Qe=le=>{let Te=le.target,Le=q.current;if(Le!=null&&!B6e(Le,Te))return S(j=>!1)};return document.addEventListener("mousedown",Qe),()=>{document.removeEventListener("mousedown",Qe)}},[C]),EF(()=>{if(C){let Qe=q.current;Qe!=null&&U(le=>j6e(Qe))}},[C]);let ie=x==="Search"&&M!=="",oe=A6e(u,l,ie?M:""),_e;if(M==="")_e=m;else{let Qe=M.toLowerCase();_e=m.filter(le=>le.label.toLowerCase().startsWith(Qe))}let Re=ie&&!oe.error?oe.options:_e,Pe=Re.length,at=v||ie&&oe.loading,ve=Qe=>{let le=vf(o),Te=le.some(j=>j===Qe)?le.filter(j=>j!==Qe):le.concat([Qe]);i(d,JSON.stringify(Te.map(j=>j))),P(j=>""),N(j=>0);let Le=J.current;if(Le!=null){Le.focus();return}},xe=Qe=>{let le=Re[Qe];if(le!==void 0){if(a)return ve(le.id);{let Te=le.id;return i(d,Te),S(Le=>!1),P(Le=>"")}}},pt=Qe=>{switch(Qe.key){case"ArrowDown":return Qe.preventDefault(),C?N(j=>Pe===0?0:Uo(j+1|0,Pe)):S(j=>!0);case"ArrowUp":return Qe.preventDefault(),N(j=>Pe===0?0:Uo((j-1|0)+Pe|0,Pe));case"Backspace":if(!(a&&M===""))return;let Te=vf(o);if(Te.length===0)return;let Le=Te.slice(0,Te.length-1|0);return i(d,JSON.stringify(Le.map(j=>j)));case"Enter":return C?(Qe.preventDefault(),xe(T)):void 0;case"Escape":return C?S(j=>!1):void 0;default:return}},ur=C?hD+" "+$6e:hD,It=h?ur+" "+D6e:ur,wi=()=>vf(o).map(le=>L("span",{children:[G(le),b("span",{children:"×",className:P6e,onClick:Te=>{Te.stopPropagation(),ve(le)}})],className:I6e},le)),fr=(B[1]|0).toString()+"px",So=B[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:fr,top:"auto"}:{maxHeight:fr},Sr;if(at)Sr=b("li",{children:"Loading…",className:pD});else if(Pe===0)Sr=b("li",{children:M===""?"No options":"No matches",className:pD});else{let Qe=a?vf(o):o===""?[]:[o];Sr=Re.map((le,Te)=>{let Le=Qe.some(Se=>Se===le.id),ue=bU([[L6e],Te===T?[z6e]:[],Le?[U6e]:[]]).join(" ");return b("li",{children:le.label,"aria-selected":Le,className:ue,role:"option",onMouseDown:Se=>{Se.preventDefault(),xe(Te)},onMouseEnter:Se=>N(Ne=>Te)},le.id)})}let en=b("ul",{children:Sr,className:M6e,role:"listbox",style:So}),xn;return xn=x==="Inline"?b("button",{children:o===""?b("span",{children:s?"Select…":"—",className:F6e}):G(o),className:It,autoFocus:p,type:"button",onKeyDown:pt,onBlur:Qe=>f(),onClick:Qe=>S(le=>!le)}):L("div",{children:[a?wi():null,b("input",{ref:Wt(J),className:O6e,autoFocus:p,placeholder:s?"Search…":"—",type:"text",value:a||C?M:o===""?"":G(o),onKeyDown:pt,onFocus:Qe=>S(le=>!0),onBlur:Qe=>f(),onChange:Qe=>{let le=Qe.target.value;P(Te=>le)}})],className:It,onClick:Qe=>S(le=>!0)}),L("div",{children:[xn,C?en:null],ref:Wt(q),className:N6e})}let V6e=q6e;function D9(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function K6e(e){return t=>{let r=yo(t),n=r[0];return n>=e?xo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+D9(e.toString()),tl:r[1]}}}}function H6e(e){return t=>{let r=yo(t),n=r[0];return n<=e?xo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+D9(e.toString()),tl:r[1]}}}}function W6e(e){let t=yo(e),r=t[0];return isFinite(r)&&(r|0)===r?xo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}let G6e="Must not be empty";function J6e(e){let t=yo(e),r=t[0];return r.length>0?xo(e):{TAG:"Invalid",_0:r,_1:{hd:G6e,tl:t[1]}}}let Q6e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function Y6e(e){let t=yo(e),r=t[0];return Q6e.exec(r)!==null?xo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function X6e(e){let t=yo(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?xo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let Z6e=/^[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 eMe(e){let t=yo(e),r=t[0];return Z6e.exec(r)!==null?xo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let tMe=/^c[a-z0-9]{23,24}$/;function rMe(e){let t=yo(e),r=t[0];return tMe.exec(r)!==null?xo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function nMe(e){let t=yo(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]}}:xo(e)}function iMe(e){return t=>{let r=yo(t),n=r[0];return n.length>=e?xo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function oMe(e){return t=>{let r=yo(t),n=r[0];return n.length<=e?xo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function sMe(e,t){return r=>{let n=yo(r),i=n[0];return e.exec(i)!==null?xo(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function aMe(e){let t=Y2(e);if(t!==0)return t.hd}function lMe(e){switch(e){case"Email":return Y6e;case"Url":return X6e;case"Uuid":return eMe;case"Cuid":return rMe;case"DateTime":return nMe}}function uMe(e,t,r){if(e==="")return t?J6e({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return se(r.minLength,i=>{n.push(iMe(i))}),se(r.maxLength,i=>{n.push(oMe(i))}),se(r.format,i=>{n.push(lMe(i))}),se(r.pattern,i=>{n.push(sMe(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:N9({TAG:"Pending",_0:e},Mx(n))}function cMe(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=Ss(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(W6e),se(r.min,a=>{i.push(K6e(a))}),se(r.max,a=>{i.push(H6e(a))});let o=N9({TAG:"Pending",_0:n},Mx(i)),s=Y2(o);return s!==0?{TAG:"Invalid",_0:e,_1:s}:{TAG:"Valid",_0:e}}function dMe(e,t,r){let i=vf(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return se(r.maxItems,a=>{if(i>a){o.contents={hd:"Select at most "+a.toString()+" items",tl:o.contents};return}}),se(r.minItems,a=>{if(i<a&&(t||i>0)){o.contents={hd:"Select at least "+a.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function gD(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function fMe(e,t){let r=e.propSchema;if(r!==void 0&&Bne(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 s=qne(e.key,r,t,o);return s!==void 0?{TAG:"Invalid",_0:t,_1:{hd:s,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 uMe(t,n.required,n.constraints);case"NumberField":return cMe(t,n.required,n.constraints);case"EnumField":return gD(t,n.required);case"RefField":return n.multi?dMe(t,n.required,n.constraints):gD(t,n.required)}}function om(e,t){let r=W(O(e,t),it);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function mD(e,t){let r=W(O(e,t),it);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function sm(e,t){let r=W(O(e,t),it);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function hMe(e){let t=sm(e,"format");if(sm(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 pMe(e){let t=om(e,"minLength"),r=om(e,"maxLength"),n=W(sm(e,"pattern"),s=>new RegExp(s)),i=hMe(e),o=sm(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function vD(e,t){let r=mD(e,"minimum"),n=mD(e,"maximum");return{min:r,max:n,integer:t}}function gMe(e){let t=om(e,"minItems"),r=om(e,"maxItems");return{minItems:t,maxItems:r}}function mMe(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,s=O(o,"required"),a;if(s!==void 0){let d=it(s);a=typeof d!="object"?[]:d.TAG==="JSONArray"?ne(d._0,f=>{let h=it(f);if(!(typeof h!="object"||h.TAG!=="JSONString"))return h._0}):[]}else a=[];let l=O(o,"properties");if(l===void 0)return[];let u=it(l);return typeof u!="object"?[]:u.TAG==="JSONObject"?ne(Ge(u._0),d=>{let f=d[1],h=d[0],p=it(f);if(typeof p!="object"||p.TAG!=="JSONObject")return;let g=p._0;if(Be(O(g,"const")))return;let m=O(g,"type"),v;if(m!==void 0){let N=it(m);v=typeof N!="object"||N.TAG!=="JSONString"?"string":N._0}else v="string";let _=a.some(N=>N===h),x=O(n,h),E;if(x!==void 0)E=x.multi?x.entityNamePlural:x.entityName;else{let N=O(g,"title");if(N!==void 0){let T=it(N);E=typeof T!="object"||T.TAG!=="JSONString"?bt(h):T._0}else E=bt(h)}let S=O(g,"enum"),C;if(S!==void 0){let N=it(S);C=typeof N!="object"||N.TAG!=="JSONArray"?void 0:ne(N._0,T=>{let $=it(T);if(!(typeof $!="object"||$.TAG!=="JSONString"))return $._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?gMe(g):{}};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:vD(g,!0)};break;case"number":k={TAG:"NumberField",required:_,constraints:vD(g,!1)};break;default:k={TAG:"TextField",required:_,constraints:pMe(g)}}return W(k,N=>({key:h,label:E,fieldType:N,propSchema:f}))}):[]}function vMe(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 hn(e){return"var("+e+")"}let _Me=w([z("flex"),pe("column"),c("gap",hn(F.md))]),bMe=w([z("flex"),pe("column"),c("gap","4px")]),_D=w([c("color",hn(y.textSecondary)),c("font-size",hn(A.sizeSm)),c("font-weight",hn(A.weightMedium))]),yMe=w([c("color",hn(y.error)),Ih(Ce(2))]),bD=w([c("background",hn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",hn(X.sm)),c("padding","var("+F.xs+") var("+F.sm+")"),c("font-size",hn(A.sizeMd)),c("color",hn(y.textPrimary)),c("outline","none"),Ko({NAME:"percent",VAL:100}),c("transition","border-color 120ms, box-shadow 120ms"),ga([c("border-color",hn(y.brand))])]),xMe=w([c("border-color",hn(y.error)),ga([c("border-color",hn(y.error)),c("box-shadow","0 0 0 2px color-mix(in srgb, var("+y.error+") 25%, transparent)")])]),SMe=w([c("color",hn(y.error)),c("font-size",hn(A.sizeXs)),c("min-height","1.1em"),c("line-height","1.1"),Cs(Ce(2))]),EMe=w([ye("pointer"),XF(Ce(6))]),yD=w([c("background",hn(y.brand)),c("color",hn(y.textOnBrand)),c("border","none"),c("border-radius",hn(X.sm)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",hn(A.sizeMd)),ye("pointer"),xV("flexStart"),c("transition","opacity 120ms")]),wMe=w([Ys(.5),ye("notAllowed")]);function kMe(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,s=e.value,a=e.field,l=r!==void 0?r:!1,u=t!==void 0?t:!1,d=a.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&&Be(n),p=h?bD+" "+xMe:bD,g=x=>i(a.key),m=a.propSchema,v=m!==void 0?jne(a.key,m,s,x=>o(a.key,x),()=>i(a.key),f,h):void 0,_;if(v!==void 0)_=v;else{let x=a.fieldType;if(typeof x!="object")_=L("label",{children:[b("input",{className:EMe,checked:s==="true",type:"checkbox",onBlur:g,onChange:E=>o(a.key,E.target.checked?"true":"false")}),"Enabled"],className:_D});else switch(x.TAG){case"TextField":let E=x.constraints.format,S;if(E!==void 0)switch(E){case"Email":S="email";break;case"Url":S="url";break;default:S="text"}else S="text";_=b("input",{className:p,autoFocus:u,type:S,value:s,onBlur:g,onChange:C=>o(a.key,C.target.value)});break;case"NumberField":_=b("input",{className:p,autoFocus:u,type:"number",value:s,onBlur:g,onChange:C=>o(a.key,C.target.value)});break;case"EnumField":_=b("select",{children:x.options.map(C=>b("option",{children:C,value:C},C)),className:p,value:s,onBlur:g,onChange:C=>o(a.key,C.target.value)});break;case"RefField":_=b(V6e,{fieldKey:a.key,queryField:x.queryField,singleQueryField:x.singleQueryField,labelField:x.labelField,multi:x.multi,required:x.required,value:s,onChange:o,onBlur:()=>i(a.key),hasError:h,autoFocus:u});break}}return L("div",{children:[L("label",{children:[a.label,f?b("span",{children:"*",className:yMe}):null],className:_D}),_,b("div",{children:h?D(n,""):null,className:SMe})],className:bMe})}function CMe(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,s=n!==void 0?n:"Submit",a=t!==void 0?t:[],l=jt(()=>mMe(o,a),[o,a]),u=ae(()=>D(r,vMe(l))),d=u[1],f=u[0],h=ae(()=>({})),p=h[1],g=h[0],m=ae(()=>!1),v=m[1],_=m[0],x=jt(()=>l.map(P=>{let M=D(O(f,P.key),"");return[P.key,fMe(P,M)]}),[l,f]),E=x.every(P=>C6e(P[1])),S={};x.forEach(P=>{let M=aMe(P[1]);if(M!==void 0){S[P[0]]=M;return}});let C=(P,M)=>d(I=>{let U=dt(Ge(I));return U[P]=M,U}),k=P=>p(M=>{let I=dt(Ge(M));return I[P]=!0,I}),N=P=>{if(P.preventDefault(),v(M=>!0),E)return i(f)},T=_&&!E,$=T?yD+" "+wMe:yD;return L("form",{children:[l.map((P,M)=>{let I=D(O(g,P.key),!1);return b(kMe,{field:P,value:D(O(f,P.key),""),onChange:C,onBlur:k,errorMessage:O(S,P.key),showError:I||_,autoFocus:M===0},P.key)}),b("button",{children:s,className:$,disabled:T,type:"submit"})],className:_Me,noValidate:!0,onSubmit:N})}let RMe=CMe;function AMe(e){return"var("+e+")"}let TMe=w([z("flex"),pe("column"),c("gap",AMe(F.md))]);function NMe(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.injectNewId,o=e.aggregateIdField,s=e.aggregateId,a=e.schema,l=i!==void 0?i:!1,u=n!==void 0?n:[],d=t!==void 0?t:"Submit",f=ae(()=>{}),h=f[1],p=ae(()=>!1),g=p[1],v=ae(()=>crypto.randomUUID())[0],_=S=>{let C=dt(Ge(S));se(s,k=>{C[D(o,"id")]=k}),l&&(C[D(o,"id")]=v),g(k=>!0),h(k=>{}),r(C).then(k=>{if(g(N=>!1),typeof k=="object"){let N=k._0;h(T=>N)}return Promise.resolve()})},x=s!==void 0?o!==void 0||l?o:void 0:l?o:void 0,E=x!==void 0?D(W(Q(a),S=>{let C=dt(Ge(S));return se(R(O(C,"properties"),Q),k=>{let N=dt(Ge(k).filter(T=>T[0]!==x));C.properties=N}),C}),a):a;return L("div",{children:[fe(f[0],null,S=>b(b9,{variant:"Error",message:S})),p[0]?b(Of,{label:"Submitting..."}):null,b(RMe,{schema:E,onSubmit:_,submitLabel:d,refFields:u})],className:TMe})}let X2=NMe;function $Me(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 s=i[0];if(s!==""){t[decodeURIComponent(s)]="";return}else return;case 2:let a=i[0],l=i[1];if(a!==""){t[decodeURIComponent(a)]=decodeURIComponent(l);return}else return}}),t}function DMe(e,t){return e===t?0:e<t?-1:1}function F9(e){let t=Ge(e).filter(r=>r[1]!=="").toSorted((r,n)=>DMe(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function FMe(e){if(e.path===0)return"/";let r=[];return _U(e.path,n=>{r.push(n)}),"/"+r.join("/")}function xD(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=Ge(e).filter(o=>{let s=o[0];return r.includes(s)?!1:!n.some(a=>a[0]===s)});return dt(i.concat(n))}function IMe(){let e=iU(),t=$Me(e.search),r=FMe(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let u=F9(l);Dh(r+u+n)};return{params:t,get:l=>O(t,l),set:(l,u)=>i(xD(t,[[l,u]])),setMany:l=>i(xD(t,l))}}function Z2(e){return fe(R(R(Q(e),t=>O(t,"properties")),Q),[],Ge)}function PMe(e,t){return W(Z2(e).find(r=>r[0]===t),r=>r[1])}function ek(e){if(e.length===1)return Wt(e[0])}function OMe(e,t){return G2(e.schema).every(r=>r===t||r==="id"?!0:Ue(r,e.aggregateIdField))}function Sx(e,t){return W(ek(Z2(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function SD(e,t,r){return ek(ne(e,n=>R(Sx(n,r),i=>{if(OMe(n,i))return{command:n,argument:i,tier:t}})))}function I9(e,t){return Ue(xs(e).storeTarget,t)}function MMe(e,t,r,n){let i=t.field;return i!==void 0?Z2(e.schema).some(o=>o[0]===i)?i:void 0:$h(R(n,o=>Sx(e,(s,a)=>I9(a,o))),Sx(e,(o,s)=>o===r))}let ED={contents:[]};function wD(e,t,r){let n=e+"."+t.command+"."+D(t.field,"")+"."+r;if(!ED.contents.some(i=>i===n)){ED.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function LMe(e,t,r,n){let i=ek(e.filter(o=>o.name===t.command));if(i!==void 0){let o=MMe(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};wD(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}wD(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function P9(e,t,r){return R(PMe(e,t),n=>{let i=xs(n),o=i.storeTarget,s=r.filter(u=>u.level==="Instance"),a=i.setter;if(a!==void 0)return LMe(s,a,t,o);let l=R(o,u=>SD(s,"StoreMatch",(d,f)=>I9(f,u)));return l!==void 0?l:SD(s,"NameMatch",(u,d)=>u===t)})}function O9(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||Be(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||Be(e.index)||e.scanSort;return{filter:t,sort:r}}function kD(e){return jv(e.ann)}function M9(e){let t=Be(XK(e)),r=km(e).length!==0,n=Gx(e).length!==0;return{search:t||r||n}}function Ex(e){let r=D(W(R(R(Q(e),s=>O(s,"properties")),Q),Ge),[]).map(s=>jv(xs(s[1]))),n=r.some(s=>s.filter),i=r.some(s=>s.sort),o=M9(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function CD(e,t){let r={},n={};return Ge(e).forEach(i=>{let o=i[1];if(o==="")return;let s=i[0],a=t.find(l=>l.key===s);if(a!==void 0){jv(a.ann).filter?r[s]=o:n[s]=o;return}n[s]=o}),[r,n]}function RD(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 zMe(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),Ge(e).forEach(o=>{let s=o[1],a=o[0],l=n.find(f=>f.key===a),u=W(l,f=>f.kind),d;if(u!==void 0&&typeof u!="object")switch(u){case"KBoolean":d=s==="true";break;case"KNumber":d=D(W(Ss(s),f=>f),s);break;default:d=s}else d=s;i[a+"Eq"]=d}),Ge(i).length!==0)return i}function UMe(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return dt([["field",e._0],["direction",t]])}function BMe(e){let t=e.resource,r=vu(t,void 0),n=t.name,i=r.rows,o=t.schema,s=e.resourceSemantics,a=og(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:s,window:a,onOpenRow:(T,$)=>{},role:yu},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,g=e.eventSemantics,m=e.eventAccent,v=e.eventWindow,_=e.onOpenEvent,x=e.onCommand,E=xu,S=e.resourceRef,C=e.assignCommand,k={readModelName:f,rows:h,schema:p,semantics:g,accent:m,window:v,onOpenRow:_,onCommand:x,role:E,resourceRef:S,assignCommand:C},N=r.fetchState;return typeof N!="object"?N==="Loading"?b(Of,{}):e.mode.render([d,k]):b(Ba,{detail:N._0,onRetry:()=>r.refetch()})}let jMe=BMe,L9=dr(void 0),qMe=L9.Provider;function VMe(e){return Ar(qMe,{value:e.refresh,children:e.children})}let AD={make:VMe};function KMe(){return zt(L9)}function TD(e){try{return ys(localStorage.getItem(e))}catch{return}}function ND(e,t){try{return localStorage.setItem(e,t)}catch{return}}function vr(e){return"var("+e+")"}let Ey=w([z("flex"),pe("column"),c("gap",vr(F.lg))]),$D=w([z("flex"),Z("center"),Xe("spaceBetween"),c("margin-bottom",vr(F.sm))]),HMe=w([c("font-size",vr(A.sizeXl)),c("font-weight",vr(A.weightMedium)),c("color",vr(y.textPrimary)),yn(Ce(0))]),WMe=w([z("flex"),c("gap",vr(F.sm))]),GMe=w([z("flex"),pe("column"),c("gap",vr(F.lg))]),JMe=w([z("flex"),pe("column"),c("gap",vr(F.sm))]),QMe=w([c("font-size",vr(A.sizeSm)),c("font-weight",vr(A.weightMedium)),c("color",vr(y.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),yn(Ce(0))]),YMe=w([c("background",vr(y.brand)),c("color",vr(y.textOnBrand)),c("border","none"),c("border-radius",vr(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",vr(A.sizeSm)),c("cursor","pointer")]),XMe=w([z("inlineFlex"),Z("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","0"),c("color",vr(y.brand)),c("font-size",vr(A.sizeSm)),ye("pointer"),c("text-decoration","none"),We([c("text-decoration","underline")])]),ZMe=w([z("flex"),Z("center"),Xe("flexEnd"),c("gap",vr(F.xs)),c("padding-top",vr(F.sm))]),DD=w([c("background","none"),c("border","1px solid var("+y.border+")"),c("border-radius",vr(X.sm)),c("padding","2px var("+F.sm+")"),c("color",vr(y.textSecondary)),c("font-size",vr(A.sizeSm)),ye("pointer"),We([c("background",vr(y.surfaceSubtle)),c("color",vr(y.textPrimary))]),rI([c("opacity","0.4"),ye("notAllowed")])]);function e4e(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 t4e(e,t){let r=D(R(R(Q(e),i=>O(i,"properties")),Q),{}),n={};return Ge(t).forEach(i=>{let o=i[1],s=i[0],a=D(R(R(R(O(r,s),Q),d=>O(d,"type")),ce),"string"),l,u=0;switch(a){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(W(Ss(o),d=>d),o)),n[s]=l}),n}let FD={contents:[]},ID={contents:[]};function r4e(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!FD.contents.some(i=>i===n)){FD.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 n4e(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!ID.contents.some(i=>i===n)){ID.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 PD={contents:[]};function i4e(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!PD.contents.some(n=>n===r)){PD.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 o4e(e){let t=e.schedulerJoin,r=e.uiHints,n=e.liveDefault,i=e.sortKeyField,o=e.byIdsQueryDocument,s=e.byIdsQueryField,a=e.detailQueryDocument,l=e.singleQueryField,u=e.drillPath,d=e.openRowId,f=e.pluginId,h=e.detailView,p=e.rows,g=e.readModel,m=u!==void 0?u:[],v=n!==void 0?n:!0,_=Si(),x=ae(()=>{}),E=x[1],S=ae(()=>{}),C=S[1],k=S[0],N=ae(()=>({})),T=N[1],$=N[0],P=ae(()=>"Loaded"),M=P[1],I=P[0],U=ae(()=>{}),B=U[1],q=U[0],J=ov(),Y=fe(J,!1,H=>H.isLive(g.queryField)),K="reventless.live."+D(f,"default")+"."+g.name,G=ae(()=>{let H=TD(K);if(H===void 0)return v;switch(H){case"false":return!1;case"true":return!0;default:return v}}),ie=G[1],oe=G[0],_e=()=>{let H=!oe;ND(K,H?"true":"false"),ie(de=>H)},Re=Y&&oe,Pe=R(r,H=>io(H,g.name)),at=v4(g.schema,Pe),ve=fe(R(Pe,H=>H.suppress),!1,H=>H.includes(mf)),xe;if(t!==void 0&&d6e(!0,g.schema,ve)){let H=c4(mf);xe=H!==void 0&&!at.some(de=>de.id===H.id)?at.concat([H]):at}else xe=at;let pt=f4(f,g.name,void 0),ur=ae(()=>hE(pt)),It=ur[1],wi=H=>{d4(pt,H),It(de=>H)},fr=_4(ur[0],Pe,gI(g.schema),xe),So=t!==void 0&&fr!==void 0?fr.id===mf:!1,Sr=Be(h)&&!So,en="reventless.layout."+D(f,"default")+"."+g.name,xn=ae(()=>TD(en)),Qe=xn[1],le=Wie(xn[0],Pe,tH(g.schema),Sr),Te=J!==void 0&&Re?J.statusFor(Wg(g.queryField))!=="Open":!1,Le=Re&&!Te,j=ae(()=>0),ue=j[1],Se=j[0],Ne=Je({}),tt=Je(void 0),$e=Je(new Map),we=H=>{$e.current.set(H,Date.now())},nt=H=>{let de=$e.current.get(H);return de!==void 0?Date.now()-de<6e4:!1},He=IMe(),ct=F9(He.params),Et=_l(),St=W(f,H=>Vs(Fa(H,g.name))+ct),hr=Jx(g.schema),nr=H=>W(R(O(H,"id"),ce),de=>{let ge=R(hr,ke=>R(O(H,ke),ce));return ge!==void 0?PPe(de,ge):de}),ti=H=>hr!==void 0?iD(H)[0]:H,Eo=H=>{if(hr===void 0)return dt([["id",H]]);let de=iD(H),ge=de[1],ke=de[0];return dt(ge!==void 0?[["id",ke],["subId",ge]]:[["id",ke]])},cr=d!==void 0?d:k,Sn=H=>f!==void 0?Et(oa(f,g.name,H,[])+ct):C(de=>H),Ki=()=>St!==void 0?Et(St):C(H=>{}),ki=Ex(g.schema),Dn=M9(g.schema),Kt=ki.hasFilter||ki.hasSort||ki.hasSearch,Pt=$o(g.schema,void 0),Er=[];Ge(He.params).forEach(H=>{let de=H[1];if(de==="")return;let ge=H[0];if(ge==="after"||ge==="before"){Er.push(ge+"="+de);return}if(!Kt)return;if(ge==="sort"||ge==="dir"){Er.push(ge+"="+de);return}if(ge==="q"&&Dn.search){Er.push(ge+"="+de);return}if(!ge.startsWith("f."))return;let ke=ge.slice(2);if(fe(Pt.find(ze=>ze.key===ke),!1,ze=>kD(ze).filter)){Er.push(ge+"="+de);return}});let Ci=Er.toSorted((H,de)=>H===de?0:H<de?-1:1).join("|"),jr={};if(Kt){let H={};Ge(He.params).forEach(Jr=>{let tn=Jr[0];if(tn.startsWith("f.")){H[tn.slice(2)]=Jr[1];return}});let de=CD(H,Pt),ge=D(He.get("q"),""),ke=zMe(de[0],ge,Dn,Pt),ze=He.get("dir")==="desc"?"Desc":"Asc",wt=RD(He.get("sort"),ze,Pt),wr=UMe(wt);se(ke,Jr=>{jr.filter=Jr}),se(wr,Jr=>{jr.orderBy=Jr})}e4e(He.get("after"),He.get("before"),f0e).forEach(H=>{jr[H[0]]=H[1]});let Pr=wL(g,jr,Ci,void 0,()=>T(H=>({})),void 0),Tt=Pr.refetch,jn=Pr.fetchState,ir=Pr.pageInfo,ri=Pr.setRows,En=Pr.rows,Fn=H=>{if(a!==void 0&&l!==void 0&&_!==void 0){M(de=>"Loading"),Gt(_(a,Eo(H)).then(de=>{let ge=R(Q(de),Ye=>O(Ye,l)),ke=0;return ge!==void 0&&it(ge)!=="JSONNull"?(T(Ye=>{let ze=dt(Ge(Ye));return ze[H]=ge,ze}),M(Ye=>"Loaded")):ke=1,ke===1&&(T(Ye=>dt(Ge(Ye).filter(ze=>ze[0]!==H))),M(Ye=>({TAG:"Error",_0:"Detail not found"}))),Promise.resolve()}),de=>(M(ge=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}},es=()=>{if(se(cr,Fn),!Le)return Tt()};Ae(()=>{let H=d!==void 0?d:k;H!==void 0&&(Ui(O($,H))?Fn(H):M(de=>"Loaded"))},[d,k]);let ni=Rs(),vt=hm(),In=K2(),ts=fe(R($s(),H=>H.identity),[],H=>H.groups),Hv=(H,de)=>W(Nh(P9(g.schema,de,g.commands),ge=>O9(ge.command,ts)),ge=>(()=>E(ke=>({command:ge.command,rowId:H})))),ik=(H,de)=>R(R(O(H,"id"),ce),ge=>Hv(ge,de)),Ra=(p!==void 0?p:En).map(H=>D(Q(H),{})),vp=Zh(Ra,Pt,ni),Id={lookupLabel:(H,de)=>Xh(vp,H,ni,de),isMissing:(H,de)=>ev(vp,H,ni,de)},ak=Eie(He.get("after"),He.get("before")),Gv=wie(ir,ak),Jv=kie(ir,ak),lk=Gv||Jv,m7=W(f,H=>({pluginId:H,viewName:g.name})),uk=bie(Pt,ni,vt,O,!0,Id,m7,ik).map(H=>{if(!H.sortable||!lk)return H;let de=fe(Pt.find(ge=>ge.key===H.key),!1,ge=>kD(ge).sort);return{key:H.key,label:H.label,render:H.render,sortable:de,width:H.width}}),ck=He.get("sort"),_p=He.get("dir")==="desc"?"Desc":"Asc",dk=H=>ri(de=>de.map(ge=>{let ke=R(R(Q(ge),ze=>O(ze,"id")),ce);if(ke===void 0)return ge;let Ye=H.find(ze=>Ue(R(R(Q(ze),wt=>O(wt,"id")),ce),ke));return Ye!==void 0?Ye:ge})),bp=i!==void 0?ne(En,H=>R(R(Q(H),de=>O(de,i)),ce)):[],v7=H=>{let de=ir.hasNextPage,ge=bp.length;if(H===void 0||i===void 0||!de||ge<=0)return!1;let ke=bp[0];if(_p==="Asc"){let ze=st(bp,ke,(wt,wr)=>wt>wr?wt:wr);return H>ze}let Ye=st(bp,ke,(ze,wt)=>ze<wt?ze:wt);return H<Ye},_7=()=>{let H=Object.keys(Ne.current);if(Ne.current={},tt.current=void 0,H.length!==0){if(H.length>10)return Tt();if(s!==void 0&&o!==void 0&&_!==void 0){let de=dt([["ids",H.map(ge=>ge)]]);Gt(_(o,de).then(ge=>{let ke=D(R(R(Q(ge),Ye=>O(Ye,s)),br),[]);return dk(ke),Promise.resolve()}),ge=>Promise.resolve());return}if(hr!==void 0||l===void 0||a===void 0||_===void 0)return Tt();H.forEach(de=>{let ge=dt([["id",de]]);Gt(_(a,ge).then(ke=>{let Ye=R(Q(ke),ze=>O(ze,l));return Ye!==void 0&&it(Ye)!=="JSONNull"&&dk([Ye]),Promise.resolve()}),ke=>Promise.resolve())})}},fk=H=>{Ne.current[H]=!0;let de=tt.current;de!==void 0&&clearTimeout(de),tt.current=setTimeout(_7,150)},hk=H=>{let de=ge=>R(R(Q(ge),ke=>O(ke,"id")),ce);ri(ge=>{let ke=ge.map(wt=>{let wr=de(wt);if(wr===void 0)return wt;let Jr=H.find(tn=>Ue(de(tn),wr));return Jr!==void 0?Jr:wt}),Ye=ne(ke,de),ze=H.filter(wt=>{let wr=de(wt);return wr!==void 0?!Ye.includes(wr):!1});return ke.concat(ze)})},b7=H=>{let de=En.some(ke=>Ue(R(R(Q(ke),Ye=>O(Ye,"id")),ce),H.id));switch(H.changeKind){case"Added":if(nt(H.id)){if($e.current.delete(H.id),de)return;{let ke=H.id;if(hr!==void 0)return Tt();if(s!==void 0&&o!==void 0&&_!==void 0){let ze=dt([["ids",[ke]]]);Gt(_(o,ze).then(wt=>{let wr=D(R(R(Q(wt),Jr=>O(Jr,s)),br),[]);return hk(wr),Promise.resolve()}),wt=>Promise.resolve());return}if(l===void 0||a===void 0||_===void 0)return Tt();let Ye=dt([["id",ke]]);Gt(_(a,Ye).then(ze=>{let wt=R(Q(ze),wr=>O(wr,l));return wt!==void 0&&it(wt)!=="JSONNull"&&hk([wt]),Promise.resolve()}),ze=>Promise.resolve());return}}else return v7(H.sortKeyValue)?void 0:ue(ke=>ke+1|0);case"Updated":return de?fk(H.id):void 0;case"Removed":return de?hr!==void 0?fk(H.id):ri(ke=>ke.filter(Ye=>Uf(R(R(Q(Ye),ze=>O(ze,"id")),ce),H.id))):void 0;case"BulkInvalidated":return ue(ke=>0),Tt()}},y7=()=>Tt();J1(g.queryField,"All",Re,b7,y7);let x7=H=>{if(cr===void 0||H.id!==ti(cr))return;let de=H.changeKind;if(hr!==void 0)switch(de){case"Updated":case"Removed":return Fn(cr);case"Added":case"BulkInvalidated":return}else switch(de){case"Updated":return Fn(cr);case"Removed":return B(ge=>cr);case"Added":case"BulkInvalidated":return}},S7=()=>{if(cr!==void 0&&a!==void 0&&l!==void 0&&_!==void 0){Gt(_(a,Eo(cr)).then(H=>{let de=R(Q(H),ke=>O(ke,l)),ge=0;return de!==void 0&&it(de)!=="JSONNull"?(T(ke=>{let Ye=dt(Ge(ke));return Ye[cr]=de,Ye}),M(ke=>"Loaded")):ge=1,ge===1&&B(ke=>cr),Promise.resolve()}),H=>Promise.resolve());return}};J1(g.queryField,{_0:D(W(cr,ti),"")},Re&&Be(cr),x7,S7),Ae(()=>{B(H=>{})},[D(cr,"")]);let Qv=D(He.get("q"),""),Yv={};Ge(He.params).forEach(H=>{let de=H[0];if(de.startsWith("f.")){Yv[de.slice(2)]=H[1];return}});let pk=gPe(Pt,Yv),E7=pk.length!==0,w7=W(ck,H=>({key:H,direction:_p==="Asc"?"Asc":"Desc"})),k7=(H,de)=>{let ge=de==="Asc"?"asc":"desc";He.setMany([["sort",H],["dir",ge],["after",""],["before",""]])},gk=H=>He.setMany([["q",H],["after",""],["before",""]]),C7=(H,de)=>He.setMany([["f."+H,de],["after",""],["before",""]]),R7=()=>se(ir.endCursor,H=>He.setMany([["after",H],["before",""]])),A7=()=>se(ir.startCursor,H=>He.setMany([["before",H],["after",""]])),Pd=g.commands.filter(H=>H.level==="Instance"),T7=Pd.length!==0,Vu;if(T7){let ge={key:"__actions",label:"",render:ke=>{let Ye=R(O(ke,"id"),ce),ze=g.statusField;ze!==void 0&&(O(ke,ze)!==void 0?Yo(ke,ze)===void 0&&n4e(f,g.name,ze):r4e(f,g.name,ze));let wr=EL(Pd,ke,g.statusField).map(Jr=>({TAG:"Action",label:Jr.label,onClick:()=>E(tn=>({command:Jr,rowId:Ye})),danger:!1}));return b(tOe,{items:wr,triggerLabel:"..."})},sortable:!1,width:"56px"};Vu=uk.concat([ge])}else Vu=uk;let N7=g.commands.filter(H=>H.level==="Collection"),mk=H=>{let de=H.map(wr=>D(Q(wr),{})),ge=CD(Yv,Pt),Ye=Kt&&Dn.search?"":Qv,ze=RD(ck,_p,Pt),wt;return wt=typeof ze!="object"||ze.TAG==="ServerSort"?[void 0,_p]:[ze._0,ze._1],pPe(hPe(fPe(de,Pt,ge[1]),Pt,Ye),Pt,wt[0],wt[1])},vk=H=>{if(fr!==void 0&&fr.id!==ca){let de=Br(g.schema,R(r,wo=>da(wo,g.name)),{field:g.labelField,source:g.labelFieldSource}),ge=W(de.statusField,wo=>J2(wo,Pd,R(Pe,Ta=>Ta.transitions))),ke=H2(_,Pd,g.name,Re,()=>Tt(),ni,In.onNotice,we),Ye=mk(H).map(wo=>wo),ze=oK(Jv,Gv);if(t!==void 0&&fr.id===mf){let wo=Br(t.resource.schema,R(r,Ta=>da(Ta,t.resource.name)),{field:t.resource.labelField,source:t.resource.labelFieldSource});return b(jMe,{mode:fr,resource:t.resource,resourceSemantics:wo,resourceRef:t.resourceRef,assignCommand:T9(Pd,t.resourceRef),eventReadModelName:g.name,eventSchema:g.schema,eventRows:Ye,eventWindow:ze,eventSemantics:de,eventAccent:R(Pe,Ta=>Ta.accent),onOpenEvent:(Ta,P7)=>se(R(Q(P7),nr),Sn),onCommand:ke})}let wt=g.name,wr=g.schema,Jr=R(Pe,wo=>wo.accent),tn=ze,Is=(wo,Ta)=>se(R(Q(Ta),nr),Sn),yp=W(ge,wo=>ke),e_={readModelName:wt,rows:Ye,schema:wr,semantics:de,accent:Jr,window:tn,onOpenRow:Is,onCommand:yp,statusCommandFor:ge,fillSlot:Hv};return fr.render([e_])}else{let de=mk(H),ge=W(h,tn=>(Is=>se(nr(Is),Sn))),ke=tn=>D(nr(tn),JSON.stringify(tn)),Ye=(tn,Is)=>{let yp=Is.map(ke),Zv={};return yp.forEach(e_=>{Zv[e_]=!0}),Object.keys(Zv).length!==yp.length&&i4e(f,g.name),b(ig,{columns:tn,data:Is,keyFn:ke,sortState:w7,onSort:k7,onRowClick:ge,activeKey:cr})},ze=ZK(g.schema);if(ze===void 0)return Ye(Vu,de);let wt=dOe(de,ze,Ho(g.schema,ze)),wr=wt.length;if(wr===1||wr===0)return Ye(Vu,de);let Jr=Vu.filter(tn=>tn.key!==ze);return b("div",{children:wt.map(tn=>{let Is=tn[0];return L("div",{children:[b("div",{children:bt(Is),className:QMe}),Ye(Jr,tn[1])],className:JMe},Is)}),className:GMe})}},$7=p!==void 0?vk(p):typeof jn!="object"?jn==="Loading"?b(Of,{}):vk(En):b(Ba,{detail:jn._0,onRetry:()=>Tt()}),Aa;if(cr!==void 0&&h!==void 0){let de=(p!==void 0?p:En).find(Ye=>Ue(R(Q(Ye),nr),cr)),ge=O($,cr);Aa=[cr,h,ge!==void 0?ge:de]}else Aa=void 0;let _k=H=>{let de=H[2],ge=H[0];if(Ue(q,ge))return b(Ba,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>Ki()});if(de!==void 0)return H[1](ti(ge),m,rr(de));let ke=0;if(typeof jn!="object"){if(jn==="Loading")return b(Of,{});if(typeof I=="object")return b(Ba,{detail:I._0,onRetry:()=>Tt()});if(I!=="Loading")return b(Ba,{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(Of,{}):b(Ba,{detail:jn._0,onRetry:()=>Tt()})},D7=Sr?b("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(H=>{let de=H[1],ge=H[0],ke;return ke=le==="Full"?ge==="full":ge==="split",L("button",{children:[b("span",{children:H[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),b("span",{children:de})],className:ke?uf.Style.btnActive:uf.Style.btn,title:de,onClick:Ye=>{ND(en,ge),Qe(ze=>ge)}},ge)}),"aria-label":"Layout",className:uf.Style.group,role:"group"}):null,bk=L("div",{children:[b("h2",{children:g.name,className:HMe}),L("div",{children:[xe.length>1?b(uf.make,{modes:xe,activeId:fe(fr,ca,H=>H.id),onSelect:wi}):null,D7,b(y6e,{live:oe,canBeLive:Y,reconnecting:Te,onToggle:_e}),N7.map(H=>b("button",{children:"+ "+H.label,className:YMe,onClick:de=>E(ge=>({command:H,rowId:void 0}))},H.name))],className:WMe})],className:$D}),F7=L(Hr,{children:[E7?b(v9,{filters:pk,onFilterChange:C7,searchValue:Qv,onSearchChange:gk}):b(m9,{value:Qv,onChange:gk}),Se>0?b(w6e,{count:Se,onClick:()=>{ue(H=>0),He.setMany([["after",""],["before",""]]),Tt()}}):null]}),I7=lk?L("div",{children:[b("button",{children:"‹ Prev",className:DD,disabled:!Jv,onClick:H=>A7()}),b("button",{children:"Next ›",className:DD,disabled:!Gv,onClick:H=>R7()})],className:ZMe}):null,yk=L(Hr,{children:[F7,In.element,$7,I7]}),Xv;if(le==="Full")Xv=Aa!==void 0?b(AD.make,{refresh:es,children:L("div",{children:[b("div",{children:b("button",{children:"← "+g.name,className:XMe,onClick:H=>Ki()}),className:$D}),_k([Aa[0],Aa[1],Aa[2]])],className:Ey})}):L("div",{children:[bk,yk],className:Ey});else{let H=Aa!==void 0?_k(Aa):b(id,{title:"Select an item",description:"Choose a row on the left to see its details here."});Xv=b(AD.make,{refresh:es,children:L("div",{children:[bk,b(oOe,{master:yk,detail:H})],className:Ey})})}return L(Hr,{children:[Xv,fe(x[0],null,H=>b(T2,{isOpen:!0,onClose:()=>E(de=>{}),title:H.command.label,children:b(X2,{schema:H.command.schema,aggregateId:H.rowId,aggregateIdField:H.command.aggregateIdField,injectNewId:H.command.level==="Collection",refFields:H.command.refFields,onSubmit:de=>{if(_!==void 0){let ge=H.rowId;return ge!==void 0?we(ge):se(O(de,D(H.command.aggregateIdField,"id")),we),Gt(_(H.command.mutationDocument,t4e(H.command.schema,de)).then(ke=>{let Ye=Ed(ke);if(typeof Ye!="object")return Ye==="Accepted"?(E(ze=>{}),Le||Tt(),Promise.resolve("Ok")):(E(ze=>{}),Le||setTimeout(()=>Tt(),GPe),Promise.resolve("Ok"));{let ze=Ye._0;return gp(_,ni,ze.errorCode,ze.detail).then(wt=>Promise.resolve({TAG:"Err",_0:wt}))}}),ke=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return E(ge=>{}),Promise.resolve("Ok")},submitLabel:"Execute"})}))]})}let s4e=o4e;function a4e(e,t,r){if(e.length<2)return[];let n=st(e,Number.MAX_VALUE,(a,l)=>a<l?a:l),o=st(e,Number.MIN_VALUE,(a,l)=>a>l?a:l)-n,s=t/(e.length-1|0);return e.map((a,l)=>({x:l*s,y:o===0?r/2:r-(a-n)/o*r}))}function l4e(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function u4e(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,s=t!==void 0?t:"",a=a4e(e.values,i,o),l=s===""?"var("+y.brand+")":s;return a.length<2?null:b("svg",{children:b("polyline",{fill:"none",points:l4e(a),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 c4e=u4e;function Wn(e){return"var("+e+")"}let d4e=w([z("flex"),pe("column"),c("gap",Wn(F.xs)),c("padding",Wn(F.lg)),c("background",Wn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",Wn(X.md))]),f4e=w([c("color",Wn(y.textSecondary)),c("font-size",Wn(A.sizeSm)),c("font-weight",Wn(A.weightMedium))]),h4e=w([z("flex"),Z("baseline"),c("gap",Wn(F.sm))]),p4e=w([c("color",Wn(y.textPrimary)),c("font-size",Wn(A.sizeXxl)),c("font-weight",Wn(A.weightBold)),c("line-height",Wn(A.lineHeightTight))]);function g4e(e){switch(e){case"Up":return y.success;case"Down":return y.error;case"Neutral":return y.textDisabled}}function m4e(e){return w([c("color",Wn(g4e(e))),c("font-size",Wn(A.sizeSm)),c("font-weight",Wn(A.weightMedium))])}function v4e(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:m4e(r)})}else n=null;return L("div",{children:[b("div",{children:e.label,className:f4e}),L("div",{children:[b("span",{children:e.value,className:p4e}),n],className:h4e}),fe(e.sublabel,null,i=>b("div",{children:i,style:{color:"var("+y.textDisabled+")",fontSize:"var("+A.sizeXs+")"}})),D(e.footer,null)],className:d4e})}let _4e=v4e;function z9(e){return"var("+e+")"}let b4e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",z9(F.md))]),y4e=w([ye("pointer"),c("border-radius",z9(X.md)),We([c("filter","brightness(0.98)")])]);function x4e(e){let t=e.kpis;return t.length===0?null:b("div",{children:t.map(r=>{let n=W(r.spark,s=>b(c4e,{values:s,width:120,height:24})),i=b(_4e,{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:y4e,role:"button",tabIndex:0,onKeyDown:s=>{if(s.key==="Enter")return o()},onClick:s=>o()},r.key):b("div",{children:i},r.key)}),className:b4e})}let S4e=x4e,am=["var("+y.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function U9(e,t){return D(e.color,am[Uo(t,am.length)])}function E4e(e){let t=st(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 Vr(e){return(Math.round(e*1e3)/1e3).toString()}function wy(e,t,r,n,i,o){let s=A0(e,t,r,i),a=s[1],l=s[0],u=A0(e,t,r,o),d=u[1],f=u[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+Vr(e)+" "+Vr(t)+" L "+Vr(l)+" "+Vr(a)+" A "+Vr(r)+" "+Vr(r)+" 0 "+h+" 1 "+Vr(f)+" "+Vr(d)+" Z";let p=A0(e,t,n,i),g=A0(e,t,n,o);return"M "+Vr(l)+" "+Vr(a)+" A "+Vr(r)+" "+Vr(r)+" 0 "+h+" 1 "+Vr(f)+" "+Vr(d)+" L "+Vr(g[0])+" "+Vr(g[1])+" A "+Vr(n)+" "+Vr(n)+" 0 "+h+" 0 "+Vr(p[0])+" "+Vr(p[1])+" Z"}function w4e(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,s=E4e(n);if(s.length===0)return null;let a=i/2,l=i/2-1,u=o>0?l*o:0;return b("svg",{children:s.map((d,f)=>{let h=d[1],p=d[0],g=n[f],m=U9(g,f),v=h-p>=.999?wy(a,a,l,u,p,p+.5)+" "+wy(a,a,l,u,p+.5,h):wy(a,a,l,u,p,h);return b("path",{children:b("title",{children:g.label}),d:v,fill:m},g.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let k4e=w4e,C4e=["var("+y.brand+")","var("+y.success+")"];function R4e(e){let t=e.flatMap(i=>i.values),r=st(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=st(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function A4e(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(g=>g.values.length<2))return null;let s=R4e(n),a=s[0],l=s[1]-a,u=l===0?1:l,d=o-16,f=st(n,0,(g,m)=>g>m.values.length?g:m.values.length),h=i/(f-1|0),p=8+d;return b("svg",{children:n.map((g,m)=>{let v=D(g.color,D(C4e[m],"var("+y.brand+")")),x=g.values.map((C,k)=>{let N=k*h,T=8+d-(C-a)/u*d;return[N,T]}).map(C=>C[0].toString()+","+C[1].toString()).join(" "),E=(g.values.length-1|0)*h,S="0,"+p.toString()+" "+x+(" "+E.toString()+","+p.toString());return L("g",{children:[b("polygon",{fill:v,fillOpacity:"0.15",points:S,stroke:"none"}),b("polyline",{fill:"none",points:x,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},g.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let T4e=A4e;function N4e(e){let t=e.size,r=t!==void 0?t:120;return b(k4e,{slices:e.slices,size:r,innerRatio:.6})}let $4e=N4e;function Xl(e){return"var("+e+")"}function D4e(e){return w([z("flex"),pe("column"),Z("center"),c("gap","2px"),c("width","100%"),c("max-width",e.toString()+"px")])}let F4e=w([Ut("relative"),c("width","100%"),c("line-height","0")]),I4e=w([Ut("absolute"),c("left","0"),c("right","0"),c("bottom","0"),c("text-align","center"),c("line-height","1.1"),c("font-size",Xl(A.sizeXl)),c("font-weight",Xl(A.weightMedium)),c("color",Xl(y.textPrimary))]),P4e=w([z("flex"),Xe("spaceBetween"),c("width","100%"),c("font-size",Xl(A.sizeXs)),c("color",Xl(y.textDisabled))]),O4e=w([c("font-size",Xl(A.sizeSm)),c("color",Xl(y.textSecondary))]);function M4e(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 OD(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function MD(e,t,r,n,i){let o=OD(e,t,r,n),s=OD(e,t,r,i);return"M "+wn(o[0])+" "+wn(o[1])+" A "+wn(r)+" "+wn(r)+" 0 0 1 "+wn(s[0])+" "+wn(s[1])}function L4e(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,s=i!==void 0?i:0,a=t!==void 0?t:160;if(n<=s)return null;let l=M4e(o,s,n),u=a*.09,d=a/2,f=a/2-u/2,h=f+u/2,p=h+u/2;return L("div",{children:[L("div",{children:[L("svg",{children:[b("path",{d:MD(d,h,f,0,1),fill:"none",stroke:"var("+y.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:wn(u)}),l<=0?null:b("path",{d:MD(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(a),viewBox:"0 0 "+wn(a)+" "+wn(p)}),b("div",{children:D(e.display,wn(o)),className:I4e})],className:F4e}),L("div",{children:[b("span",{children:wn(s)}),b("span",{children:wn(n)})],className:P4e}),r!==void 0?b("div",{children:r,className:O4e}):null],className:D4e(a)})}let z4e=L4e;function Mf(e){return"var("+e+")"}let U4e=w([z("flex"),pe("column"),c("gap","6px")]),B4e=w([c("overflow-x","auto")]),j4e=w([z("flex"),c("gap","4px"),Z("flexStart")]);function q4e(e){return w([z("grid"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px"),Z("center"),c("font-size",Mf(A.sizeXs)),c("color",Mf(y.textDisabled)),c("line-height","1")])}function V4e(e){return w([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 K4e(e){return w([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 H4e=w([c("visibility","hidden")]),W4e=w([z("flex"),Z("center"),bi("wrap"),c("gap",Mf(F.md)),c("font-size",Mf(A.sizeXs)),c("color",Mf(y.textSecondary))]),G4e=w([z("flex"),Z("center"),c("gap","4px")]);function J4e(e){return w([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 Q4e(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function Y4e(e){let t=e[0];if(t===void 0)return[];let r=il(Q4e(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 X4e(e){return st(e,0,(t,r)=>r.value>t?r.value:t)}function LD(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function Z4e(e){return e%2===0?D(tS[e],""):""}function eLe(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=Y4e(r);if(i.length===0)return null;let o=X4e(r),s=r[0],a=r[r.length-1|0],l=s!==void 0&&a!==void 0?Zi(s.time)+" – "+Zi(a.time):"";return L("div",{children:[b("div",{children:L("div",{children:[b("div",{children:il(7,u=>b("span",{children:Z4e(u)},u.toString())),className:q4e(n)}),b("div",{children:i.map((u,d)=>u.map((f,h)=>f!==void 0?b("div",{className:K4e(Nz(f.value,o)),title:sa(f.time)+" "+Zi(f.time)+": "+LD(f.value)},f.time.toString()):b("div",{className:H4e},"b:"+d.toString()+":"+h.toString()))),className:V4e(n)})],className:j4e}),className:B4e}),L("div",{children:[b("span",{children:l}),L("span",{children:["less",$z.map(u=>b("span",{className:J4e(u)},u.toString())),"more (max "+LD(o)+")"],className:G4e})],className:W4e})],className:U4e})}let tLe=eLe;function vi(e){return"var("+e+")"}let rLe=w([z("flex"),pe("column"),c("gap","2px")]),nLe=w([z("flex"),pe("column"),c("gap","3px")]),iLe=w([z("flex"),Xe("spaceBetween"),Z("baseline"),c("gap",vi(F.sm)),c("font-size",vi(A.sizeSm))]),oLe=w([c("color",vi(y.textPrimary))]),sLe=w([c("color",vi(y.textPrimary)),c("font-weight",vi(A.weightMedium)),c("white-space","nowrap")]),aLe=w([c("color",vi(y.textSecondary)),c("font-weight",vi(A.weightNormal))]),lLe=w([c("background",vi(y.surfaceSubtle)),c("border-radius",vi(X.sm)),c("height","14px"),fa("hidden")]);function uLe(e,t){return w([c("background",t),c("border-radius",vi(X.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let cLe=w([c("padding","2px 0 4px"),c("font-size",vi(A.sizeXs)),c("color",vi(y.textDisabled))]),dLe=w([c("padding-top","4px"),c("font-size",vi(A.sizeXs)),c("color",vi(y.textDisabled))]);function zD(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function fLe(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function hLe(e){let t=fe(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:zD(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?zD(i.value-r.value,i.value):void 0}})}function pLe(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=hLe(t),i=fe(t[0],0,o=>o.value);return L("div",{children:[t.map((o,s)=>{let a=n[s],l=i<=0?0:o.value/i*100,u=R(a,d=>d.dropOff);return L("div",{children:[u!==void 0?b("div",{children:"↓ "+u.toString()+"% drop-off",className:cLe}):null,L("div",{children:[L("div",{children:[b("span",{children:o.label,className:oLe}),L("span",{children:[fLe(o.value),s===0?null:b("span",{children:" · "+fe(a,0,d=>d.conversion).toString()+"%",className:aLe})],className:sLe})],className:iLe}),b("div",{children:b("div",{className:uLe(l,D(o.color,"var("+y.brand+")"))}),className:lLe})],className:nLe})]},o.label+":"+s.toString())}),r!==void 0?b("div",{children:r,className:dLe}):null],className:rLe})}let gLe=pLe;function Lf(e){return"var("+e+")"}let mLe=w([z("flex"),pe("column"),c("gap","2px")]),vLe=w([z("flex"),c("gap","4px")]),B9=[c("font-size",Lf(A.sizeXs)),c("color",Lf(y.textDisabled)),c("white-space","nowrap")],_Le=w(B9.concat([z("flex"),pe("column"),Xe("spaceBetween"),c("text-align","right")]));function bLe(e){return w(B9.concat([z("flex"),Xe("spaceBetween"),c("margin-left",e.toString()+"px")]))}let yLe=w([z("flex"),Xe("spaceBetween"),c("gap",Lf(F.sm)),c("font-size",Lf(A.sizeXs)),c("color",Lf(y.textSecondary))]);function xLe(e){let t=e[0];if(t!==void 0)return st(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 Or(e){return(Math.round(e*100)/100).toString()}function UD(e,t,r){return r<=t?.5:(e-t)/(r-t)}function SLe(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,s=r!==void 0?r:320,a=t!==void 0?t:200,l=xLe(o);if(l===void 0)return null;let u=3.5+1,d=s-u*2,f=a-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:yLe})),L("div",{children:[L("div",{children:[L("div",{children:[b("span",{children:Or(l.yMax)}),b("span",{children:Or(l.yMin)})],className:_Le,style:{width:"34px"}}),L("svg",{children:[b("line",{stroke:"var("+y.borderSubtle+")",strokeWidth:"1",x1:Or(u),x2:Or(s-u),y1:Or(a-u),y2:Or(a-u)}),b("line",{stroke:"var("+y.borderSubtle+")",strokeWidth:"1",x1:Or(u),x2:Or(u),y1:Or(u),y2:Or(a-u)}),o.map((g,m)=>{let v=u+UD(g.x,l.xMin,l.xMax)*d,_=u+(1-UD(g.y,l.yMin,l.yMax))*f;return b("circle",{children:b("title",{children:g.label+" — "+D(i,"x")+": "+Or(g.x)+", "+D(n,"y")+": "+Or(g.y)}),cx:Or(v),cy:Or(_),fill:D(g.color,"var("+y.brand+")"),fillOpacity:"0.75",r:Or(3.5)},g.label+":"+m.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Or(a),width:Or(s),viewBox:"0 0 "+Or(s)+" "+Or(a)})],className:vLe}),L("div",{children:[b("span",{children:Or(l.xMin)}),b("span",{children:Or(l.xMax)})],className:bLe(38)}),h],className:mLe})}let ELe=SLe;function zo(e){return"var("+e+")"}let wLe=w([z("flex"),pe("column"),c("gap","6px"),yn(Ce(0)),c("padding","0"),c("list-style","none")]),j9=[z("grid"),c("grid-template-columns","1.5rem 1fr auto"),Z("center"),c("gap",zo(F.sm)),c("font-size",zo(A.sizeSm)),c("color",zo(y.textPrimary))],kLe=w(j9),CLe=w(j9.concat([ye("pointer"),c("background","transparent"),c("border","none"),c("padding","2px 0"),c("text-align","left"),c("width","100%"),c("font","inherit"),We([c("color",zo(y.brand))])])),RLe=w([c("align-self","start"),c("font-size",zo(A.sizeXs)),c("color",zo(y.textDisabled)),c("text-align","right"),c("font-variant-numeric","tabular-nums")]),ALe=w([z("flex"),pe("column"),c("gap","3px"),ZF(Ce(0))]),TLe=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),NLe=w([c("background",zo(y.surfaceSubtle)),c("border-radius",zo(X.sm)),c("height","6px"),fa("hidden")]);function $Le(e){return w([c("background",zo(y.brand)),c("border-radius",zo(X.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let DLe=w([c("align-self","start"),c("font-weight",zo(A.weightMedium)),c("white-space","nowrap"),c("font-variant-numeric","tabular-nums")]);function FLe(e,t){return t<=0||e<=0?0:e/t*100}function ILe(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=st(n,0,(o,s)=>s.value>o?s.value:o);return b("ol",{children:n.map((o,s)=>{let a=L(Hr,{children:[b("span",{children:(s+1|0).toString(),className:RLe}),L("span",{children:[b("span",{children:o.label,className:TLe,title:o.label}),b("span",{children:b("span",{className:$Le(FLe(o.value,i))}),className:NLe})],className:ALe}),b("span",{children:o.display,className:DLe})]}),l=o.onOpen;return b("li",{children:l!==void 0?b("button",{children:a,className:CLe,type:"button",onClick:u=>l()}):b("div",{children:a,className:kLe})},o.key)}),className:wLe})}let PLe=ILe;function OLe(e){return st(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function MLe(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 s=st(n,0,(f,h)=>{let p=OLe(h);return f>p?f:p}),a=s===0?1:s,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),g={contents:o};return b("g",{children:f.segments.map((m,v)=>{let _=m.value>0?m.value:0,x=_/a*d,E=g.contents-x;return g.contents=E,_===0?null:b("rect",{children:b("title",{children:f.label+" — "+m.key+": "+_.toString()}),height:x.toString(),width:u.toString(),fill:D(m.color,"var("+y.brand+")"),x:p.toString(),y:E.toString()},m.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 LLe=MLe;function _r(e){return"var("+e+")"}let zLe=w([z("flex"),pe("column"),c("gap",_r(F.lg))]),ULe=w([c("font-size",_r(A.sizeXl)),c("font-weight",_r(A.weightMedium)),c("color",_r(y.textPrimary)),yn(Ce(0))]),BLe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),c("gap",_r(F.md))]),lc=w([z("flex"),pe("column"),c("gap",_r(F.sm)),c("padding",_r(F.lg)),c("background",_r(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",_r(X.md))]),uc=w([c("font-size",_r(A.sizeSm)),c("font-weight",_r(A.weightMedium)),c("color",_r(y.textSecondary))]),jLe=w([z("flex"),Z("center"),c("gap",_r(F.lg))]),BD=w([z("flex"),pe("column"),c("gap","4px"),c("font-size",_r(A.sizeSm)),c("color",_r(y.textSecondary))]),jD=w([z("flex"),Z("center"),c("gap","6px")]);function qD(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let VD=w([c("font-size",_r(A.sizeXs)),c("color",_r(y.textDisabled))]),qLe=w([z("flex"),Xe("spaceBetween"),Z("center"),c("gap",_r(F.sm))]),VLe=w([z("inlineFlex"),c("gap",_r(F.xs))]);function KLe(e){return w([c("background",e?_r(y.surfaceSubtle):"transparent"),c("border","1px solid var("+y.border+")"),c("border-radius",_r(X.sm)),c("padding","2px var("+F.sm+")"),c("font-size",_r(A.sizeXs)),c("color",_r(e?y.textPrimary:y.textSecondary)),ye("pointer")])}function lm(e,t){return R(O(e,t),r=>{let n=Bo(r);return n!==void 0?n:W(Xm(r),i=>wne(i[0],i[1]))})}function mp(e){return e.map(t=>D(Q(t),{}))}function wx(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=ne(mp(e),o=>lm(o,r)),i=st(n,0,(o,s)=>o+s);return t==="sum"?i:n.length===0?0:i/n.length}function um(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function HLe(e,t,r){return sI(e,r&&(t==="count"||t==="sum"))}function WLe(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 Bs(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 "+bt(n):e.view;case"sum":return n!==void 0?e.view+" — total "+bt(n):e.view;default:return e.view}}function q9(e,t,r,n){let i=il(r,o=>[]);return mp(e).forEach(o=>se(R(wu(t,o),$n),s=>{let a=Math.floor((n-s)/864e5)|0;if(a>=0&&a<r)return se(i[(r-1|0)-a|0],l=>{l.push(o)})})),i}function kx(e,t,r,n,i,o){return q9(e,t,r,n).map(s=>wx(s.map(a=>a),i,o))}function V9(e,t){return ne(mp(e),r=>Yo(r,t))}function K9(e,t,r){let n=Ho(t,r),i=st(e.filter(o=>!n.includes(o)),[],(o,s)=>o.includes(s)?o:o.concat([s]));return n.concat(i)}function GLe(e,t,r){let n=V9(e,r);return ne(K9(n,t,r),i=>{let o=n.filter(s=>s===i).length;if(o!==0)return{label:bt(i),value:o}})}function H9(e){return am[Uo(e,am.length)]}function JLe(e,t,r,n,i,o){let s=q9(e,t,r,n),a=f=>ne(f,h=>Yo(h,o)),l=s.flatMap(a),u=K9(l,i,o).filter(f=>l.some(h=>h===f)),d=s.map((f,h)=>{let p=a(f);return{label:sa(n-((r-1|0)-h|0)*864e5),segments:u.map((g,m)=>({key:bt(g),value:p.filter(v=>v===g).length,color:H9(m)}))}});return{statuses:u,bars:d}}function QLe(e,t,r){let n=Ho(t,r),i=V9(e,r),o=ne(i,s=>{let a=n.indexOf(s);if(!(a<0))return a});return{stages:n.map((s,a)=>({label:bt(s),value:o.filter(l=>l>=a).length})),excluded:i.length-o.length|0}}function YLe(e,t){return W(Tr(e).find(r=>r[0]===t),r=>r[1])}function W9(e,t){return W(O(e.semantics,t),r=>r.semantic)}function XLe(e,t,r){let n=YLe(e,t);if(n===void 0)return;let i=Vf(n,"maximum");if(i===void 0)return Ue(W9(r,t),"Percent")?{min:0,max:100}:void 0;let o=D(Vf(n,"minimum"),0);if(i>o)return{min:o,max:i}}function KD(e,t,r){let n=W9(e,t);if(n===void 0)return um(r);switch(n){case"Percent":return QM(r);case"Bytes":return YM(r);case"Duration":return tE(r);case"Currency":case"Money":return eE(r);default:return um(r)}}function ZLe(e,t,r,n){return ne(mp(e),i=>W(lm(i,t),o=>{let s=D(R(O(i,"id"),ce),"");return{id:s,label:D(R(O(i,r),ce),s===""?"—":s),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function e8e(e,t,r,n){return ne(mp(e),i=>{let o=lm(i,t),s=lm(i,r);if(o!==void 0&&s!==void 0)return{label:D(R(O(i,n),ce),D(R(O(i,"id"),ce),"—")),x:o,y:s}})}function t8e(e,t,r,n,i,o){return kx(e,t,r,n,i,o).map((s,a)=>({time:Gn(n-((r-1|0)-a|0)*HI),value:s}))}function r8e(e){let t=ae(()=>"Days30"),r=t[1],n=t[0],i=(s,a)=>b("button",{children:a,className:KLe(n===s),type:"button",onClick:l=>r(u=>s)}),o;return o=n==="Days30"?e.body:b(tLe,{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:VLe})],className:qLe}),o],className:lc})}function n8e(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,s=e.pluginId,a=t!==void 0?t:{},l=_l(),u=xl(),d=ne(st(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=Zg(a,I.name,u),B=vu(I,U&&Ui(r));return[I,U,B]}),h=I=>r!==void 0?D(O(r,I),[]):fe(f.find(U=>U[0].name===I),[],U=>U[2].rows),p=I=>r!==void 0?!1:fe(f.find(U=>U[0].name===I),!1,U=>U[2].canLoadMore),g=Date.now(),m=ne(o,I=>W(d.find(U=>U.name===I.view?Zg(a,U.name,u):!1),U=>({metric:I,readModel:U,rows:h(U.name),partial:p(U.name),semantics:Br(U.schema,R(n,B=>da(B,U.name)),{field:U.labelField,source:U.labelFieldSource})}))),v=m.map((I,U)=>{let B=D(I.metric.aggregate,"count"),q=W(I.semantics.dateSpan,J=>kx(I.rows,J,14,g,B,I.metric.field));return{key:U.toString()+":"+I.readModel.name,label:Bs(I.metric),value:HLe(um(wx(I.rows,B,I.metric.field)),B,I.partial),sublabel:WLe(I.readModel.name,B,I.partial,I.rows.length),spark:q,onOpen:()=>l(Vs(Fa(s,I.readModel.name)))}}),_=I=>{let U=I.readModel.statusField;return U!==void 0?U:I.semantics.statusField},x=ne(m,I=>W(I.semantics.dateSpan,U=>{let B=D(I.metric.aggregate,"count"),q=Bs(I.metric)+" — trend",J=_(I),Y;if(B==="count"&&J!==void 0){let G=JLe(I.rows,U,30,g,I.readModel.schema,J),ie=G.statuses;Y=ie.length===0?void 0:L(Hr,{children:[b(LLe,{bars:G.bars}),b("div",{children:ie.map((oe,_e)=>L("span",{children:[b("span",{className:qD(H9(_e))}),bt(oe)],className:jD},oe)),className:BD})]})}else Y=void 0;let K;if(Y!==void 0)K=Y;else{let G=kx(I.rows,U,30,g,B,I.metric.field);K=b(T4e,{series:[{label:Bs(I.metric),values:G}]})}return b(r8e,{title:q,body:K,yearDays:t8e(I.rows,U,365,g,B,I.metric.field)},"trend:"+Bs(I.metric))})),E=ne(m,I=>{let U=I.metric.aggregate,B=I.metric.field;if(U==="avg"&&B!==void 0)return W(XLe(I.readModel.schema,B,I.semantics),q=>{let J=wx(I.rows,"avg",B);return L("div",{children:[b("span",{children:Bs(I.metric),className:uc}),b(z4e,{value:J,min:q.min,max:q.max,display:KD(I.semantics,B,J),caption:I.readModel.name+" · "+bt(B)})],className:lc},"gauge:"+Bs(I.metric))})}),S=[],C=ne(m,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||S.includes(I.readModel.name+":"+B))return;S.push(I.readModel.name+":"+B);let q=ZLe(I.rows,B,I.readModel.labelField,10).map(J=>({key:J.id===""?J.label:J.id,label:J.label,display:KD(I.semantics,B,J.value),value:J.value,onOpen:J.id===""?void 0:()=>l(oa(s,I.readModel.name,J.id,[]))}));if(q.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — top by "+bt(B),className:uc}),b(PLe,{entries:q})],className:lc},"top:"+I.readModel.name+":"+B)}),k=ne(m,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 J=e8e(I.rows,q,B,I.readModel.labelField);if(J.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — "+bt(B)+" by "+bt(q),className:uc}),b(ELe,{points:J,xLabel:bt(q),yLabel:bt(B)})],className:lc},"scatter:"+Bs(I.metric))}),N=ne(m,I=>{let U=I.metric.viz,B=_(I);if(U===void 0||U!=="funnel"||B===void 0)return;let q=QLe(I.rows,I.readModel.schema,B),J=q.stages;if(J.length===0)return;let Y=q.excluded;return L("div",{children:[b("span",{children:Bs(I.metric)+" — "+bt(B)+" funnel",className:uc}),b(gLe,{stages:J,note:Y===0?void 0:Y.toString()+" row(s) with an unlisted "+bt(B)+" excluded"})],className:lc},"funnel:"+Bs(I.metric))}),T=ne(m,I=>{let U=D(I.metric.aggregate,"count"),B=Ue(I.metric.viz,"funnel")?void 0:_(I);if(U!=="count"||B===void 0)return;let q=GLe(I.rows,I.readModel.schema,B);if(q.length!==0)return L("div",{children:[b("span",{children:I.readModel.name+" — by "+bt(B),className:uc}),L("div",{children:[b($4e,{slices:q}),b("div",{children:q.map((J,Y)=>L("span",{children:[b("span",{className:qD(U9(J,Y))}),J.label+" ("+um(J.value)+")"],className:jD},J.label)),className:BD})],className:jLe})],className:lc},"status:"+I.readModel.name)}),$=(Be(r)?[]:ne(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(C2(a,d.map(I=>I.name),u)),P=[N,k,E,x,C,T].flatMap(I=>I),M=st(ne(m,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:ULe}),b(S4e,{kpis:v}),P.length!==0?b("div",{children:P,className:BLe}):null,M.length!==0?b("span",{children:"Figures cover the rows loaded for: "+M.join(", "),className:VD}):null,$.length!==0?b("span",{children:$.join(" · "),className:VD}):null],className:zLe})}let i8e=n8e,G9={actor:"",eventType:"",timeFrom:"",timeTo:""};function HD(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function pn(e){return"var("+e+")"}let o8e=w([z("flex"),pe("column"),c("gap",pn(F.sm))]),s8e=w([z("flex"),Z("center"),c("gap",pn(F.md)),bi("wrap"),c("padding-bottom",pn(F.xs)),c("border-bottom","1px solid var("+y.border+")")]),a8e=w([z("flex"),Z("center"),c("gap","4px")]),WD=w([c("color",pn(y.textSecondary)),c("font-size",pn(A.sizeSm)),c("white-space","nowrap")]),GD=w([c("background",pn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",pn(X.sm)),c("padding","2px var("+F.sm+")"),c("font-size",pn(A.sizeSm)),c("color",pn(y.textPrimary)),c("outline","none"),ga([c("border-color",pn(y.brand))])]),l8e=w([c("background","none"),c("border","none"),c("padding","0"),c("color",pn(y.brand)),c("font-size",pn(A.sizeSm)),ye("pointer"),We([c("text-decoration","underline")])]),u8e=w([z("flex"),Xe("center"),c("padding-top",pn(F.xs))]),c8e=w([c("background",pn(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",pn(X.sm)),c("padding","4px var("+F.md+")"),c("font-size",pn(A.sizeSm)),c("color",pn(y.textPrimary)),ye("pointer"),We([c("border-color",pn(y.brand))])]);function d8e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,s=e.filter,a=i!==void 0?i:!1,l=n!==void 0?n:!1,u=t!==void 0?t:"No recorded history for this record",d=ne([["actor","Actor",e.actors.map(h=>({label:h,value:h})),s.actor],["eventType","Event",e.eventTypes.map(h=>({label:bt(h),value:h})),s.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(v9,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:s.eventType,timeFrom:s.timeFrom,timeTo:s.timeTo});case"eventType":return o({actor:s.actor,eventType:p,timeFrom:s.timeFrom,timeTo:s.timeTo});default:return}}}),L("div",{children:[b("span",{children:"From:",className:WD}),b("input",{className:GD,type:"date",value:s.timeFrom,onChange:h=>o({actor:s.actor,eventType:s.eventType,timeFrom:h.target.value,timeTo:s.timeTo})}),b("span",{children:"To:",className:WD}),b("input",{className:GD,type:"date",value:s.timeTo,onChange:h=>o({actor:s.actor,eventType:s.eventType,timeFrom:s.timeFrom,timeTo:h.target.value})})],className:a8e}),HD(s)?b("button",{children:"Clear filters",className:l8e,onClick:h=>o(G9)}):null],className:s8e}),b(J0e,{entries:e.entries,emptyLabel:HD(s)?"No events match these filters":u,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),a?b("div",{children:b("button",{children:l?"Loading…":"Load earlier events",className:c8e,disabled:l,onClick:h=>se(r,p=>p())}),className:u8e}):null],className:o8e})}let f8e=d8e;function h8e(e){if(e!=="")return e+"T00:00:00.000Z"}function p8e(e){if(e!=="")return e+"T23:59:59.999Z"}function g8e(e,t,r){let n={};return n.entityId=e,n.first=50,se(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),se(h8e(t.timeFrom),i=>{n.timeFrom=i}),se(p8e(t.timeTo),i=>{n.timeTo=i}),n}function m8e(e){let t=e.entityId,r=e.binding,n=Si(),i=xl(),o=fe(e.requiredAccess,!1,I=>!i(I)),s=ae(()=>[]),a=s[1],l=s[0],u=ae(()=>G9),d=u[1],f=u[0],h=ae(()=>!0),p=h[1],g=ae(()=>{}),m=g[1],v=g[0],_=ae(()=>!1),x=_[1],S=ae(()=>{})[1],C=ae(()=>0),k=C[1],N=C[0],T=Je(void 0),$=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;Ae(()=>{if(!o)if(n!==void 0){let I=N===0,U=I?void 0:T.current;p(B=>!0),m(B=>{}),Gt(n(r.queryDocument,g8e(t,f,U)).then(B=>{let q=cNe(B,r.queryField),J=dNe(B,r.queryField),Y=J[1],K=J[0];return a(G=>I?q:q.concat(G)),x(G=>K),S(G=>Y),T.current=Y,p(G=>!1),Promise.resolve()}),B=>(p(q=>!1),m(q=>"Could not load the history for this record."),Promise.resolve()))}else m(I=>"Not connected")},[$,N,o]);let P=I=>{T.current=void 0,k(U=>0),a(U=>[]),d(U=>I)},M=()=>k(I=>I+1|0);return o?null:v!==void 0?b(Ba,{title:"History unavailable",detail:v,onRetry:()=>k(I=>I+1|0)}):b(f8e,{entries:mNe(l,r.displayName),actors:vNe(l),eventTypes:_Ne(l),filter:f,onFilterChange:P,hasMore:_[0],loading:h[0],onLoadMore:M})}let v8e=m8e;function Ln(e){return"var("+e+")"}let _8e=w([z("flex"),pe("column"),c("gap",Ln(F.lg))]),b8e=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",Ln(F.md))]),y8e=w([c("font-size",Ln(A.sizeXl)),c("font-weight",Ln(A.weightMedium)),c("color",Ln(y.textPrimary)),yn(Ce(0))]),x8e=w([z("flex"),bi("wrap"),Z("center"),c("gap",Ln(F.md)),c("font-size",Ln(A.sizeSm)),c("color",Ln(y.textSecondary))]),S8e=w([z("inlineFlex"),Z("center"),c("gap","4px"),ye("pointer")]);function E8e(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let JD=w([c("font-size",Ln(A.sizeXs)),c("color",Ln(y.textDisabled))]),w8e=w([z("flex"),Z("center"),c("gap",Ln(F.sm))]),k8e=w([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(A.sizeSm)),ye("pointer"),We([c("background",Ln(y.surfaceSubtle)),c("color",Ln(y.textPrimary))])]);function C8e(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},s=_l(),a=xl(),l=Si(),u=Rs(),d=K2(),f=ae(()=>[]),h=f[1],p=f[0],g=n.map((S,C)=>{let k=Zg(o,S.name,a),N=k&&!p.includes(S.name),T=vu(S,N);return[S,C,N,k,T]}),m=(S,C)=>D(R(R(r,k=>io(k,S.name)),k=>k.accent),ed[Uo(C,ed.length)]),v=ne(g,S=>{let C=S[4],k=S[0],N=R(r,M=>io(M,k.name)),T=Br(k.schema,R(r,M=>da(M,k.name)),{field:k.labelField,source:k.labelFieldSource}),$=W(T.statusField,M=>J2(M,k.commands,R(N,I=>I.transitions))),P=H2(l,k.commands,k.name,C.isLive,C.refetch,u,d.onNotice,void 0);if(S[2])return{readModelName:k.name,rows:C.rows,schema:k.schema,semantics:T,accent:m(k,S[1]),window:og(C.canLoadMore),onOpenRow:(M,I)=>s(oa(i,k.name,M,[])),onCommand:W($,M=>P),statusCommandFor:$}}),_=ne(g,S=>{if(S[2]&&S[4].canLoadMore)return S[0].name}),x=()=>{g.forEach(S=>{let C=S[4];if(S[2]&&C.canLoadMore)return C.loadMore()})},E=ne(g,S=>{let C=S[0],k=S[4].fetchState;if(S[2])return typeof k!="object"?k==="Loading"?C.name+": loading…":void 0:C.name+": "+k._0}).concat(C2(o,n.map(S=>S.name),a));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:y8e}),className:b8e}),b("div",{children:g.filter(S=>S[3]).map(S=>{let C=S[0];return L("label",{children:[b("input",{checked:S[2],type:"checkbox",onChange:k=>{let N=C.name;h(T=>T.includes(N)?T.filter($=>$!==N):T.concat([N]))}}),b("span",{className:E8e(m(C,S[1]))}),C.name],className:S8e},C.name)}),className:x8e}),d.element,e.mode.render(v),_.length!==0?L("div",{children:[b("button",{children:"Load more",className:k8e,onClick:S=>x()}),b("span",{children:"More rows available: "+_.join(", "),className:JD})],className:w8e}):null,E.length!==0?b("span",{children:E.join(" · "),className:JD}):null],className:_8e})}let R8e=C8e;function Zl(e){return"var("+e+")"}let A8e=w([z("flex"),Z("center"),c("gap",Zl(F.xs)),c("font-size",Zl(A.sizeSm)),c("color",Zl(y.textSecondary))]),T8e=w([c("color",Zl(y.brand)),c("text-decoration","none"),We([c("text-decoration","underline")])]),N8e=w([c("color",Zl(y.textPrimary)),c("font-weight",Zl(A.weightMedium))]),$8e=w([c("color",Zl(y.textDisabled)),eI("none")]);function D8e(e){let t=e.crumbs;return b("nav",{children:t.map((r,n)=>{let i=n===(t.length-1|0);return L(Px,{children:[n>0?b("span",{children:"/","aria-hidden":!0,className:$8e}):null,i||Ui(r.href)?b("span",{children:r.label,className:N8e}):b("a",{children:r.label,className:T8e,href:D(r.href,"#")})]},r.label)}),"aria-label":"breadcrumbs",className:A8e})}let F8e=D8e;function _t(e){return"var("+e+")"}let I8e=w([z("flex"),pe("column"),c("gap",_t(F.lg)),c("padding","0 var("+F.md+")"),c("min-width","0")]),P8e=w([z("flex"),Z("center"),c("font-size",_t(A.sizeMd)),c("padding","var("+F.sm+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")")]),O8e=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",_t(F.md)),c("padding-bottom",_t(F.md)),c("border-bottom","1px solid var("+y.borderSubtle+")")]),M8e=w([c("font-size",_t(A.sizeXl)),c("font-weight",_t(A.weightMedium)),c("color",_t(y.textPrimary)),yn(Ce(0))]),L8e=w([z("flex"),bi("wrap"),c("gap",_t(F.sm)),c("padding-bottom",_t(F.sm))]),z8e=w([c("background",_t(y.surface)),c("color",_t(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",_t(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",_t(A.sizeSm)),ye("pointer"),We([c("background",_t(y.surfaceElevated))])]),U8e=w([z("flex"),pe("column"),c("gap",_t(F.sm)),c("min-width","0")]),QD=w([z("flex"),Z("start"),c("gap",_t(F.md)),c("padding","var("+F.xs+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")"),iI([c("border-bottom","none")])]),YD=w([c("color",_t(y.textSecondary)),c("font-size",_t(A.sizeMd)),c("font-weight",_t(A.weightMedium)),c("white-space","nowrap"),c("padding-top","2px"),_i(0),c("min-width","200px")]),ky=w([c("color",_t(y.textPrimary)),c("font-size",_t(A.sizeMd)),c("word-break","break-word"),c("min-width","0")]),B8e=w([z("flex"),Z("start"),c("gap",_t(F.md)),c("padding","var("+F.xs+") 0"),c("border-bottom","1px solid var("+y.borderSubtle+")"),iI([c("border-bottom","none")])]),j8e=w([c("color",_t(y.textSecondary)),c("font-size",_t(A.sizeMd)),c("font-weight",_t(A.weightMedium)),c("padding-top","2px"),_i(0),c("min-width","200px")]),q8e=w([z("flex"),pe("column"),c("gap",_t(F.sm)),vo(1),c("padding",_t(F.md)),c("background",_t(y.surfaceSubtle)),c("border-radius",_t(X.md)),c("border","1px solid var("+y.borderSubtle+")"),c("min-width","0")]),V8e=w([z("flex"),pe("column"),c("gap",_t(F.sm)),c("min-width","0")]),K8e=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",_t(F.md)),c("padding-bottom",_t(F.xs)),c("border-bottom","1px solid var("+y.borderSubtle+")")]),H8e=w([c("color",_t(y.textPrimary)),c("font-size",_t(A.sizeMd)),c("font-weight",_t(A.weightMedium))]),XD=w([c("overflow-x","auto"),c("max-width","100%"),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",_t(X.md))]),cc=w([c("color",_t(y.textDisabled)),c("font-size",_t(A.sizeSm))]);function J9(e,t){return D(R(R(Q(e),r=>O(r,"title")),ce),bt(t))}function ZD(e){return R(R(Q(e),t=>O(t,"type")),ce)}function eF(e){return R(R(Q(e),t=>O(t,"format")),ce)}function W8e(e){return R(Q(e),t=>O(t,"items"))}function tF(e){return Be(R(R(Q(e),t=>O(t,"properties")),Q))}function G8e(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function rF(e){let t=e.toLowerCase(),r=e.length,n=s=>{let a=s.length;if(r>a&&t.endsWith(s))return e.slice(0,r-a|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function J8e(e,t){let r=Qn(t),n=ZD(r);if(n!==void 0)switch(n){case"array":let o=W8e(r);if(o===void 0)return"ArrayOfScalars";let s=ZD(o);if(tF(o)||Ue(s,"object"))return{TAG:"ArrayOfObjects",_0:o};if(!Ue(s,"string"))return"ArrayOfScalars";let a=rF(e);return a!==void 0?{TAG:"EntityRefArray",_0:a}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return tF(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!G8e(e))return{TAG:"Scalar",_0:D(n,"string"),_1:eF(r)};let i=rF(e);return i!==void 0?{TAG:"EntityRef",_0:i}:{TAG:"Scalar",_0:D(n,"string"),_1:eF(r)}}function Cy(e,t,r,n){let i=it(e);if(typeof i!="object")switch(i){case"JSONFalse":return b(na,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return b(na,{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"?wm(o):D(cI(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function Q8e(e){return D(W(br(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 nF(e){return D(W(br(e),t=>ne(t,Q)),[])}function Q9(e,t){let r=R(O(e,"id"),ce);if(r!==void 0)return r;let n=R(O(e,"compositeId"),ce);return n!==void 0?n:"#"+t.toString()}function iF(e){return e.map((t,r)=>({key:Q9(t,r),row:t}))}function Y8e(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 s=Be(Q(o.data)),a=br(o.data),l;if(s){let u=D(Q(o.data),{}),d=R(R(Q(o.schema),p=>O(p,"properties")),Q),f=R(d,p=>O(p,i)),h=O(u,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:J9(f,i)}:void 0}else if(Be(a)){let u=D(a,[]),d=D(R(Q(o.schema),h=>O(h,"items")),o.schema),f=u.find((h,p)=>{let g=D(Q(h),{});return Q9(g,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 X8e(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,s=e.drillPath,a=e.labelField,l=e.aggregateId,u=e.statusField,d=e.commands,f=e.rootLabel,h=e.schema,p=e.data,g=d!==void 0?d:[],m=s!==void 0?s:[],v=Si(),_=Rs(),x=hm(),E=KMe(),S=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,C=_l(),k=ae(()=>[]),N=k[1],T=ae(()=>{}),$=T[1],P=ae(()=>({})),M=P[1],I=P[0],U=Be(o)&&Be(i),B=U?m:k[0],q=le=>{if(o!==void 0&&i!==void 0&&l!==void 0)return C(oa(o,i,l,le));N(Te=>le)},J=Y8e([{data:p,schema:h,label:f}],B,[]),Y=D(Q(p),{}),K=$o(h,"Drill"),G=Zh([Y],K,_),_e={lookupLabel:(le,Te)=>Xh(G,le,_,Te),isMissing:(le,Te)=>ev(G,le,_,Te)},Re=fe(R($s(),le=>le.identity),[],le=>le.groups),Pe=le=>{if(l!==void 0)return W(Nh(P9(h,le,g),Te=>O9(Te.command,Re)),Te=>(()=>$(Le=>Te.command)))},at=(le,Te)=>{let Le=D(R(R(Q(le),ue=>O(ue,"properties")),Q),{}),j={};return Ge(Te).forEach(ue=>{let Se=ue[1],Ne=ue[0],tt=D(R(R(R(O(Le,Ne),Q),nt=>O(nt,"type")),ce),"string"),$e,we=0;switch(tt){case"array":if(Se==="")$e=[];else try{$e=JSON.parse(Se)}catch{$e=[Se]}break;case"boolean":$e=Se==="true";break;case"integer":case"number":we=1;break;case"object":if(Se==="")$e=null;else try{$e=JSON.parse(Se)}catch{$e=null}break;default:$e=Se}we===1&&($e=D(W(Ss(Se),nt=>nt),Se)),j[Ne]=$e}),j},ve=(le,Te,Le)=>L("div",{children:[b("div",{children:Te,className:YD}),b("div",{children:Le,className:ky})],className:QD},le),xe=(le,Te,Le)=>{if(Ug(le,_,S))return Le;let j=ma(_,le);if(j===void 0)return Le;let ue=j.name.endsWith("s");return Te?ue?j.name:j.name+"s":ue?j.name.slice(0,j.name.length-1|0):j.name},pt=le=>{let Te=it(le.data);if(typeof Te!="object"){if(Te==="JSONNull")return b("span",{children:"—",className:cc})}else switch(Te.TAG){case"JSONObject":let Le=D(Q(le.data),{}),j=$o(le.schema,"Drill");return j.length===0?b("span",{children:"(no fields)",className:cc}):b("div",{children:j.map($e=>{let we=$e.key,nt=$e.propSchema,He=O(Le,we),ct=J9(nt,we),Et=J8e(we,nt);if(He===void 0)return ve(we,ct,D(Une(we,nt),b("span",{children:"—",className:cc})));if(typeof Et!="object")switch(Et){case"Bool":return ve(we,ct,Cy(He,void 0,we))}else switch(Et.TAG){case"Scalar":let St=P1(we,nt,He);return St!==void 0?ve(we,ct,St):ve(we,ct,Cy(He,Et._1,we));case"EntityRef":let hr=Et._0;return ve(we,xe(hr,!1,ct),O1(we,hr,He,_,x,_e,S,void 0,void 0));case"EntityRefArray":let nr=Et._0;return ve(we,xe(nr,!0,ct),O1(we,nr,He,_,x,_e,S,void 0,void 0));case"NestedObject":let ti=P1(we,nt,He);if(ti!==void 0)return ve(we,ct,ti);let Eo=$o(Et._0,"Drill"),cr=D(R(O(Le,we),Q),{});return L("div",{children:[b("div",{children:ct,className:j8e}),b("div",{children:Eo.map(vt=>{let In=O(cr,vt.key);return L("div",{children:[b("div",{children:vt.label,className:YD}),b("div",{children:Gl(vt.key,vt.kind,vt.propSchema,In,void 0,_,x,_e,S),className:ky})],className:QD},vt.key)}),className:q8e})],className:B8e},we);case"ArrayOfObjects":let Sn=Et._0,Ki=iF(nF(He)),ki=Ki.length,Dn=D(i,f),Kt=Dn+"."+we,Pt=R(n,vt=>io(vt,Kt)),Er=v4(Sn,Pt),Ci=f4(o,Dn,we),jr=O(I,we),Pr=jr!==void 0?jr:hE(Ci),Tt=_4(Pr,Pt,gI(Sn),Er),jn=vt=>{d4(Ci,vt),M(In=>{let ts=dt(Ge(In));return ts[we]=vt,ts})},ir=D(br(He),[]),ri=vt=>{let In=Br(Sn,R(n,Ra=>da(Ra,Kt)),void 0),ts=R(Pt,Ra=>Ra.accent),ok={readModelName:Kt,rows:ir,schema:Sn,semantics:In,accent:ts,window:"Complete",onOpenRow:(Ra,vp)=>{let Wv=dU(ir,Id=>Id===vp),sk=Wv!==void 0?fe(Ki[Wv],Ra,Id=>Id.key):Ra;q(B.concat([we,sk]))}};return vt.render([ok])},Fn=$o(Sn,"Drill").map(vt=>({key:vt.key,label:vt.label,render:In=>Gl(vt.key,vt.kind,vt.propSchema,O(In.row,vt.key),void 0,_,x,_e,S),sortable:!1,width:vt.width})),es=ki===0?b("span",{children:"(empty)",className:cc}):b("div",{children:b(ig,{columns:Fn,data:Ki,keyFn:vt=>vt.key,onRowClick:vt=>q(B.concat([we,vt.key])),density:"Comfortable"}),className:XD}),ni=Tt!==void 0&&Tt.id!==ca?ri(Tt):es;return L("div",{children:[L("div",{children:[b("span",{children:ct,className:H8e}),L("span",{children:[Er.length>1?b(uf.make,{modes:Er,activeId:fe(Tt,ca,vt=>vt.id),onSelect:jn}):null,b(_f,{count:ki,label:"items",onClick:()=>q(B.concat([we]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:K8e}),ni],className:V8e},we)}return ve(we,ct,b(uI,{items:Q8e(He)}))}),className:U8e});case"JSONArray":let ue=iF(nF(le.data)),Se=D(R(Q(le.schema),$e=>O($e,"items")),le.schema),tt=$o(Se,"Drill").map($e=>({key:$e.key,label:$e.label,render:we=>Gl($e.key,$e.kind,$e.propSchema,O(we.row,$e.key),void 0,_,x,_e,S),sortable:!1,width:$e.width}));return ue.length===0?b("span",{children:"(empty)",className:cc}):b("div",{children:b(ig,{columns:tt,data:ue,keyFn:$e=>$e.key,onRowClick:$e=>q(B.concat([$e.key])),density:"Comfortable"}),className:XD})}return b("div",{children:Cy(le.data,void 0,void 0),className:ky})},ur=a!==void 0&&a!=="id"?R(R(R(Q(p),le=>O(le,a)),ce),le=>{if(le!=="")return le}):void 0,It=D(ur,D(l,f)),wi=le=>o!==void 0&&i!==void 0&&l!==void 0?oa(o,i,l,B.slice(0,le)):"#",fr=J!==void 0?J.map((le,Te)=>{let Le=Te===(J.length-1|0);return{label:Te===0?It:le.label,href:Le?void 0:wi(Te)}}):[{label:It,href:void 0}],So=le=>{let Te=le.target,Le=Te.tagName,j=le.metaKey||le.ctrlKey||le.shiftKey||le.altKey||le.button!==0;if(Le!=="A"||j)return;if(le.preventDefault(),U){let $e=Te.pathname,we=Te.search;return C($e+we)}let Ne=Te.parentNode.querySelectorAll("a").findIndex($e=>$e===Te),tt=Ne<0?0:Ne;q(B.slice(0,tt))},Sr;if(J!==void 0){let le=J[J.length-1|0];Sr=le!==void 0?pt(le):null}else Sr=b(Ba,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>q([])});let en=B.length===0,xn=en?EL(g.filter(le=>le.level==="Instance"),Y,u):[],Qe;if(en&&u!==void 0){let le=XFe(h,u,D(Yo(Y,u),""));Qe=le.length!==0?b(l9,{steps:le}):void 0}else Qe=void 0;return L("div",{children:[en?L("div",{children:[b("h2",{children:It,className:M8e}),t!==void 0&&l!==void 0?t(l):null],className:O8e}):b("div",{children:b(F8e,{crumbs:fr}),className:P8e,onClick:So}),D(Qe,null),xn.length!==0?b("div",{children:xn.map(le=>b("button",{children:le.label,className:z8e,onClick:Te=>$(Le=>le)},le.name)),className:L8e}):null,en?b(hI.make,{fill:Pe,children:Sr}):Sr,en&&r!==void 0&&l!==void 0?r(l):null,fe(T[0],null,le=>b(T2,{isOpen:!0,onClose:()=>$(Te=>{}),title:le.label,children:b(X2,{schema:le.schema,aggregateId:l,aggregateIdField:le.aggregateIdField,refFields:le.refFields,onSubmit:Te=>v!==void 0?Gt(v(le.mutationDocument,at(le.schema,Te)).then(Le=>{let j=Ed(Le);if(typeof j!="object")return j==="Accepted"?($(ue=>{}),se(E,ue=>ue()),Promise.resolve("Ok")):($(ue=>{}),se(E,ue=>{setTimeout(ue,500)}),Promise.resolve("Ok"));{let ue=j._0;return gp(v,_,ue.errorCode,ue.detail).then(Se=>Promise.resolve({TAG:"Err",_0:Se}))}}),Le=>Promise.resolve({TAG:"Err",_0:"Request failed"})):($(Le=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:I8e})}let oF=X8e;function ms(e){return"var("+e+")"}let Z8e=w([z("flex"),pe("column"),c("gap",ms(F.md))]),e5e=w([z("flex"),Z("center"),Xe("spaceBetween"),c("padding-bottom",ms(F.sm)),c("border-bottom","1px solid var("+y.border+")")]),t5e=w([c("font-size",ms(A.sizeLg)),c("font-weight",ms(A.weightMedium)),c("color",ms(y.textPrimary)),yn(Ce(0))]),r5e=w([z("flex"),bi("wrap"),c("gap",ms(F.sm))]),n5e=w([c("background",ms(y.surface)),c("color",ms(y.textPrimary)),c("border","1px solid var("+y.border+")"),c("border-radius",ms(X.md)),c("padding","var("+F.xs+") var("+F.md+")"),c("font-size",ms(A.sizeSm)),c("cursor","pointer")]);function i5e(e,t){let r=D(R(R(Q(e),i=>O(i,"properties")),Q),{}),n={};return Ge(t).forEach(i=>{let o=i[1],s=i[0],a=D(R(R(R(O(r,s),Q),d=>O(d,"type")),ce),"string"),l,u=0;switch(a){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(W(Ss(o),d=>d),o)),n[s]=l}),n}function o5e(e){let t=e.contextId,r=e.slice,n=Si(),i=Rs(),o=ae(()=>{}),s=o[1];return L("div",{children:[b("div",{children:b("h2",{children:r.name,className:t5e}),className:e5e}),b("div",{children:r.commands.map(a=>b("button",{children:a.label,className:n5e,onClick:l=>s(u=>a)},a.name)),className:r5e}),fe(o[0],null,a=>b(T2,{isOpen:!0,onClose:()=>s(l=>{}),title:a.label,children:b(X2,{schema:a.schema,aggregateId:t,aggregateIdField:a.aggregateIdField,injectNewId:a.level==="Collection",refFields:a.refFields,onSubmit:l=>n!==void 0?Gt(n(a.mutationDocument,i5e(a.schema,l)).then(u=>{let d=Ed(u);if(typeof d=="object"){let f=d._0;return gp(n,i,f.errorCode,f.detail).then(h=>Promise.resolve({TAG:"Err",_0:h}))}return s(f=>{}),Promise.resolve("Ok")}),u=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(s(u=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:Z8e})}let s5e=o5e;function Ya(e){return"var("+e+")"}let a5e=w([z("flex"),pe("column"),c("gap",Ya(F.xl))]),l5e=w([c("font-size",Ya(A.sizeXl)),c("font-weight",Ya(A.weightMedium)),c("color",Ya(y.textPrimary)),yn(Ce(0))]),u5e=w([z("flex"),pe("column"),c("gap",Ya(F.md)),c("padding",Ya(F.lg)),c("background",Ya(y.surfaceSubtle)),c("border","1px solid var("+y.borderSubtle+")"),c("border-radius",Ya(X.md))]);function Y9(e){return e.filter(t=>IOe(t.schema,t.statusField,t.commands))}function c5e(e){let t=Y9(e.views);return L("div",{children:[b("h2",{children:"Lifecycles",className:l5e}),t.length!==0?t.map(r=>b("div",{children:b(YOe,{schema:r.schema,statusField:D(r.statusField,""),commands:r.commands,title:r.name}),className:u5e},r.name)):b(id,{title:"No lifecycles",description:"No view in this plugin declares a status enum with state-scoped commands."})],className:a5e})}let d5e=c5e;function yt(e){return"var("+e+")"}let f5e=w([z("flex"),pe("column"),c("gap",yt(F.md)),c("font-family",yt(A.fontFamily))]),h5e=w([z("flex"),Z("center"),c("gap",yt(F.sm)),c("color",yt(y.textSecondary)),c("font-size",yt(A.sizeSm)),c("font-weight",yt(A.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),p5e=w([z("inlineFlex"),Z("center"),c("padding","0 6px"),c("border-radius",yt(X.full)),c("background",yt(y.surfaceElevated)),c("color",yt(y.textPrimary)),c("font-size",yt(A.sizeXs)),c("letter-spacing","0")]),g5e=w([z("flex"),pe("column"),c("gap",yt(F.md))]),m5e=w([z("flex"),Z("flexStart"),c("gap",yt(F.sm))]),v5e=w([z("flex"),pe("column"),c("gap","2px"),c("min-width","0"),vo(1)]),_5e=w([z("flex"),Z("baseline"),c("gap",yt(F.sm))]),b5e=w([c("color",yt(y.textPrimary)),c("font-size",yt(A.sizeSm)),c("font-weight",yt(A.weightMedium))]),y5e=w([c("color",yt(y.textDisabled)),c("font-size",yt(A.sizeXs))]),x5e=w([c("color",yt(y.textPrimary)),c("font-size",yt(A.sizeSm)),c("line-height",yt(A.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word")]),S5e=w([c("color",yt(y.textDisabled)),c("font-size",yt(A.sizeSm)),c("padding","var("+F.sm+") 0")]),E5e=w([z("flex"),pe("column"),Z("flexEnd"),c("gap",yt(F.sm))]),w5e=w([c("width","100%"),c("min-height","64px"),c("padding",yt(F.sm)),c("background",yt(y.surface)),c("border","1px solid var("+y.border+")"),c("border-radius",yt(X.md)),c("color",yt(y.textPrimary)),c("font-family",yt(A.fontFamily)),c("font-size",yt(A.sizeSm)),c("resize","vertical")]),k5e=w([c("background",yt(y.brand)),c("border","none"),c("border-radius",yt(X.md)),c("color",yt(y.textOnBrand)),c("padding","4px var("+F.md+")"),c("font-size",yt(A.sizeSm)),c("font-weight",yt(A.weightMedium)),ye("pointer"),rI([c("opacity","0.5"),ye("default")])]),C5e=w([c("color",yt(y.error)),c("font-size",yt(A.sizeXs)),c("align-self","flex-start")]);function R5e(e){let t=e.comment,r=t.timestamp;return L("div",{children:[b(od,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[b("span",{children:D(t.author,"Unknown"),className:b5e}),r!==void 0?b("span",{children:sv(e.nowMs,r),className:y5e}):null],className:_5e}),b("span",{children:t.body,className:x5e})],className:v5e})],className:m5e})}function A5e(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,s=e.title,a=e.comments,l=s!==void 0?s:"Comments",u=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=ae(()=>""),p=h[1],g=h[0],m=g.trim(),v=m!==""&&!d,_=()=>{if(v)return se(i,x=>x(m)),p(x=>"")};return L("div",{children:[L("div",{children:[l,b("span",{children:a.length.toString(),className:p5e})],className:h5e}),a.length===0?b("div",{children:u,className:S5e}):b("div",{children:a.map(x=>b(R5e,{comment:x,nowMs:f},x.id)),className:g5e}),i!==void 0?L("div",{children:[b("textarea",{className:w5e,disabled:d,placeholder:"Write a comment…",value:g,onKeyDown:x=>{if(x.key==="Enter"&&(x.metaKey||x.ctrlKey))return x.preventDefault(),_()},onChange:x=>{let E=x.target.value;p(S=>E)}}),r!==void 0?b("span",{children:r,className:C5e}):null,b("button",{children:d?"Posting…":"Comment",className:k5e,disabled:!v,onClick:x=>_()})],className:E5e}):null],className:f5e})}let T5e=A5e;function N5e(e){let t=e.entityId,r=e.binding,n=Si(),i=Rs(),o=xl(),s=fe(e.requiredAccess,!1,v=>!o(v)),a=vu(r.readModel,!s),l=ae(()=>!1),u=l[1],d=ae(()=>{}),f=d[1],h=v=>{let _=r.postCommand;if(n!==void 0&&_!==void 0){u(x=>!0),f(x=>{}),Gt(n(_.mutationDocument,UNe(r,t,v)).then(x=>{u(S=>!1);let E=Ed(x);if(typeof E!="object")return a.refetch(),Promise.resolve();{let S=E._0;return gp(n,i,S.errorCode,S.detail).then(C=>(f(k=>C),Promise.resolve()))}}),x=>(u(E=>!1),f(E=>"Could not post the comment."),Promise.resolve()));return}};if(s)return null;let p=zNe(r,a.rows,t),g=r.postCommand;return b(T5e,{comments:p,onPost:n!==void 0&&g!==void 0?h:void 0,posting:l[0],error:d[0]})}let $5e=N5e;function zn(e){return"var("+e+")"}let D5e=w([z("flex"),pe("column"),c("gap",zn(F.lg))]),F5e=w([z("flex"),Z("center"),Xe("spaceBetween"),c("gap",zn(F.md))]),I5e=w([c("font-size",zn(A.sizeXl)),c("font-weight",zn(A.weightMedium)),c("color",zn(y.textPrimary)),yn(Ce(0))]),P5e=w([z("flex"),bi("wrap"),Z("center"),c("gap",zn(F.md)),c("font-size",zn(A.sizeSm)),c("color",zn(y.textSecondary))]),O5e=w([z("inlineFlex"),Z("center"),c("gap","4px"),ye("pointer")]);function M5e(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let sF=w([c("font-size",zn(A.sizeXs)),c("color",zn(y.textDisabled))]),L5e=w([z("flex"),Z("center"),c("gap",zn(F.sm))]),z5e=w([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(A.sizeSm)),ye("pointer"),We([c("background",zn(y.surfaceSubtle)),c("color",zn(y.textPrimary))])]);function U5e(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,s=t!==void 0?t:{},a=_l(),l=xl(),u=Si(),d=Rs(),f=K2(),h=ae(()=>[]),p=h[1],g=h[0],m=K=>Br(K.schema,R(r,G=>da(G,K.name)),{field:K.labelField,source:K.labelFieldSource}),v=vu(i,!0),_=i.name,x=v.rows,E=i.schema,S=m(i),C=og(v.canLoadMore),T={readModelName:_,rows:x,schema:E,semantics:S,window:C,onOpenRow:(K,G)=>a(oa(o,i.name,K,[])),role:yu},$=n.map((K,G)=>{let ie=Zg(s,K.readModel.name,l),oe=ie&&!g.includes(K.readModel.name),_e=vu(K.readModel,oe);return[K,G,oe,ie,_e]}),P=(K,G)=>D(R(R(r,ie=>io(ie,K.name)),ie=>ie.accent),ed[Uo(G,ed.length)]),M=ne($,K=>{let G=K[4],ie=K[0],oe=T9(ie.readModel.commands,ie.resourceRef),_e=H2(u,ie.readModel.commands,ie.readModel.name,G.isLive,G.refetch,d,f.onNotice,void 0);if(K[2])return{readModelName:ie.readModel.name,rows:G.rows,schema:ie.readModel.schema,semantics:m(ie.readModel),accent:P(ie.readModel,K[1]),window:og(G.canLoadMore),onOpenRow:(Re,Pe)=>a(oa(o,ie.readModel.name,Re,[])),onCommand:W(oe,Re=>_e),role:xu,resourceRef:ie.resourceRef,assignCommand:oe}}),I=[T].concat(M),U=(v.canLoadMore?[i.name]:[]).concat(ne($,K=>{if(K[2]&&K[4].canLoadMore)return K[0].readModel.name})),B=()=>{v.canLoadMore&&v.loadMore(),$.forEach(K=>{let G=K[4];if(K[2]&&G.canLoadMore)return G.loadMore()})},q=v.fetchState,J;J=typeof q!="object"?q==="Loading"?[i.name+": loading…"]:[]:[i.name+": "+q._0];let Y=J.concat(ne($,K=>{let G=K[0],ie=K[4].fetchState;if(K[2])return typeof ie!="object"?ie==="Loading"?G.readModel.name+": loading…":void 0:G.readModel.name+": "+ie._0}).concat(C2(s,n.map(K=>K.readModel.name),l)));return L("div",{children:[b("div",{children:b("h2",{children:e.canvasName,className:I5e}),className:F5e}),b("div",{children:$.filter(K=>K[3]).map(K=>{let G=K[0];return L("label",{children:[b("input",{checked:K[2],type:"checkbox",onChange:ie=>{let oe=G.readModel.name;p(_e=>_e.includes(oe)?_e.filter(Re=>Re!==oe):_e.concat([oe]))}}),b("span",{className:M5e(P(G.readModel,K[1]))}),G.readModel.name],className:O5e},G.readModel.name)}),className:P5e}),f.element,e.mode.render(I),U.length!==0?L("div",{children:[b("button",{children:"Load more",className:z5e,onClick:K=>B()}),b("span",{children:"More rows available: "+U.join(", "),className:sF})],className:L5e}):null,Y.length!==0?b("span",{children:Y.join(" · "),className:sF}):null],className:D5e})}let B5e=U5e;function j5e(e){return e}function aF(e){return e.map(t=>({name:t.name,schema:t.schema,commands:t.commands,declaredLabelField:t.labelField,declaredLabelSource:t.labelFieldSource}))}function X9(e){if(typeof e=="object")return"heuristic:"+e._0;switch(e){case"Annotation":return"annotation";case"Type":return"type";case"Hint":return"hint"}}function Z9(e,t,r){return t!==void 0?Object.entries(i6e(e.schema,t,e.commands,R(r,n=>n.transitions))):[]}function e7(e){return W(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function t7(e,t){return fe(Nh(e.declaredLabelSource,r=>Ue(e.declaredLabelField,t)),t,r=>t+" ("+r+")")}function r7(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 fe(O(e.semantics,r),r,n=>r+" ("+X9(n.provenance)+")")}function q5e(e,t,r){let n=e.name,i=e.schema,o=Br(i,t,e7(e)),s=Ge(o.semantics).map(d=>{let f=d[1];return dt([["field",d[0]],["semantic",Oh(f.semantic)],["provenance",X9(f.provenance)]])}),a=[];se(o.geo,d=>{a.push(["geo",d.latField+"/"+d.lngField])}),se(o.dateSpan,d=>{a.push(["dateSpan",r7(o,d)])}),se(o.statusField,d=>{a.push(["status",d])}),se(o.labelField,d=>{a.push(["label",t7(e,d)])}),se(o.imageField,d=>{a.push(["image",d])}),se(o.parentField,d=>{a.push(["parent",d])});let l=dE(i).map(d=>d.id),u=Z9(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+XOe(f.tier)+")"]});return dt([["view",n],["capableModes",l],["roles",dt(a)],["transitions",dt(u)],["fields",s]])}function n7(e,t,r,n){return dt([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(j5e)],["views",t.map(o=>q5e(o,R(r,s=>da(s,o.name)),R(r,s=>io(s,o.name))))]])}function V5e(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=Br(i,R(t,g=>da(g,n)),e7(r)),s=dE(i).map(g=>g.id).join(", "),a=[];se(o.geo,g=>{a.push("geo="+g.latField+"/"+g.lngField)}),se(o.dateSpan,g=>{a.push("dateSpan="+r7(o,g))}),se(o.statusField,g=>{a.push("status="+g)}),se(o.labelField,g=>{a.push("label="+t7(r,g))}),se(o.imageField,g=>{a.push("image="+g)}),se(o.parentField,g=>{a.push("parent="+g)});let l=a.length===0?"":"; "+a.join("; "),u=Object.keys(o.semantics).length,d=Z9(r,o.statusField,R(t,g=>io(g,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"";return n+": modes "+s+l+p+"; "+u.toString()+" field semantic(s)"})}function K5e(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),V5e(t,r).forEach(o=>{console.log(" "+o)}),console.log(JSON.stringify(n7(e,t,r,i),null,2))}function Ry(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function H5e(e,t,r){return"/"+Ry(e)+"/"+Ry(t)+"/"+Ry(r)}function W5e(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function G5e(e){let t=me.object(e);if(t===void 0)return;let r=o=>R(t[o],me.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:D(R(t.sentAt,me.float),0),body:D(t.body,null)}}function J5e(e,t,r,n,i){let o=n!==void 0?n:!0,s=ov(),a=R(s,h=>h.clientNamespace()),l=o&&Be(a)&&fe(s,!1,h=>h.clientChannelsAvailable()),u=a!==void 0?H5e(a,e,t):void 0,d=Je(i);return d.current=i,Ae(()=>{let h=l?s:void 0;if(h!==void 0&&u!==void 0)return h.subscribe("Domain",u,p=>{let g=G5e(p);if(g!==void 0&&g.senderId!==r)return d.current(g)})},[l,D(u,""),r]),{available:l,publish:(h,p)=>{let g=l?s:void 0;if(g===void 0||u===void 0)return;let m=Date.now(),v={kind:h,senderId:r,sentAt:m,body:p};g.publish("Domain",u,[W5e(v)]).then(_=>{_.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+u+" failed: "+_._0)})}}}let Cx="heartbeat",Rx="hello",i7="leave";function lF(e){let t=me.object(e);if(t===void 0)return;let r=i=>R(t[i],me.string),n=r("userId");if(n!==void 0&&n!=="")return[n,D(r("username"),n)]}function Q5e(e,t,r){let n=t.kind;if(n===i7){let a=lF(t.body);if(a===void 0)return e;let l=a[0];return e.filter(u=>u.userId!==l)}if(n!==Cx&&n!==Rx)return e;let i=lF(t.body);if(i===void 0)return e;let o=i[0];return e.filter(a=>a.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function Y5e(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function X5e(e,t){return Object.fromEntries([["userId",e],["username",t]])}function Z5e(e,t,r,n,i){let o="presence",s=i!==void 0?i:!0,a=ae(()=>[]),l=a[1],u=Je(void 0),f=J5e(o,t,r,s&&r!=="",g=>{if(l(v=>Q5e(v,g,Date.now())),g.kind!==Rx)return;let m=u.current;if(m!==void 0){setTimeout(()=>m(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return Ae(()=>{if(!h)return;let g=X5e(r,n),m=()=>p(Cx,g);u.current=m,p(Rx,g),p(Cx,g);let v=setInterval(m,1e4);return()=>{clearInterval(v),u.current=void 0,p(i7,g)}},[h,r,n,t]),Ae(()=>{if(!h)return;let g=setInterval(()=>l(m=>Y5e(m,Date.now())),1e4);return()=>{clearInterval(g)}},[h]),h?a[0]:[]}function X0(e){return"var("+e+")"}let eze=w([z("inlineFlex"),Z("center"),c("gap",X0(F.xs))]),tze=w([c("font-family",X0(A.fontFamily)),c("font-size",X0(A.sizeSm)),c("color",X0(y.textSecondary)),c("white-space","nowrap")]);function rze(e){return e===1?"1 other here":e.toString()+" others here"}function nze(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",s=r!==void 0?r:4,a=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(dI,{members:l,size:o,max:s}),a?b("span",{children:rze(i.length),className:tze}):null],className:eze,title:i.map(u=>u.username).join(", ")})}let ize=nze;function oze(e){let t=$s(),r=R(t,a=>a.identity),n=fe(r,"",a=>a.userId),i=fe(r,"",a=>a.username),s=Z5e(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(a=>({userId:a.userId,username:a.username}));return b(ize,{people:s})}let sze=oze;function o7(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 Xa(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let Ax={contents:[]},Tx={contents:[]};function Nx(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!Ax.contents.some(i=>i===n)){Ax.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 $x(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 s7(e){let t=[];return e.forEach(r=>{r.readModels.forEach(n=>{Nx(r.id,n.name,n.labelField),$x(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Xa(n.queryField),labelField:n.labelField})}),r.stateViewSlices.forEach(n=>{Nx(r.id,n.name,n.labelField),$x(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Xa(n.queryField),labelField:n.labelField})})}),t}function Z0(e,t){let r=e.toLowerCase(),n=o=>{let s=o.length,a=e.length;if(a>s&&r.endsWith(o))return e.slice(0,a-s|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function tk(e){return e.endsWith("s")?[Xa(e),e]:[e,qv(e)]}function td(e,t){return e.find(r=>r.name===t)}function rk(e,t){let r=o7(t),n=qv(r),i=td(e,n);return i!==void 0?i:td(e,r)}function a7(e){return ne(D(R(R(Q(e),t=>O(t,"required")),br),[]),ce)}function l7(e,t,r,n){return ne(e.references,i=>{let o=O(n,i.fieldName),s=R(o,Q),a=R(R(s,p=>O(p,"type")),ce),l=Ue(a,"array"),u=i.plugin,d=u!==void 0?t.filter(p=>p.pluginId===u):t,f=td(d,i.entity),h=f!==void 0?f:rk(d,i.entity);if(h!==void 0){let p=tk(h.name);return{propertyKey:i.fieldName,queryField:h.queryField,singleQueryField:h.singleQueryField,labelField:h.labelField,multi:l,required:r.some(g=>g===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 u7(e,t,r,n,i,o){let s=[];return i!==void 0&&Ge(i).forEach(a=>{let l=a[0],u=Q(a[1]);if(Be(R(u,E=>O(E,"const"))))return;let f=R(R(u,E=>O(E,"type")),ce),h=R(R(R(R(u,E=>O(E,"items")),Q),E=>O(E,"type")),ce),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 g=!1;if(e.level==="Collection"&&!p){let E;if(t!==void 0)if(Ue(e.aggregateIdField,l))E=!0;else{let S=Z0(l,!1);E=S!==void 0?S.toLowerCase()===t.name.toLowerCase():!1}else E=Ue(e.aggregateIdField,l);g=E}if(g)return;let m=e.aggregateIdField,v;if(m!==void 0&&t!==void 0&&m===l&&!p){let E=td(r,qv(t.name));v=E!==void 0?E:td(r,t.name)}else v=void 0;let _;if(v!==void 0)_=v;else{let E=Z0(l,p);_=E!==void 0?rk(r,E):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 E=tk(_.name),S=_.queryField,C=_.singleQueryField,k=_.labelField,N=n.some(M=>M===l),T=E[0],$=E[1],P={propertyKey:l,queryField:S,singleQueryField:C,labelField:k,multi:p,required:N,entityName:T,entityNamePlural:$};s.push(P);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}}),s}function c7(e,t,r,n){let i=a7(e.schema),o=R(R(Q(e.schema),a=>O(a,"properties")),Q);if(e.references.length===0)return u7(e,t,r,i,o,n);let s=D(o,{});return l7(e,r,i,s)}function d7(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:c7(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 aze={capitalize:o7,pluralize:qv,singularize:Xa,warnedIdLabel:Ax,warnedUnsearchable:Tx,warnIfIdLabel:Nx,warnIfUnsearchable:$x,buildRegistry:s7,stemFromKey:Z0,entityDisplayNames:tk,findByName:td,findByStem:rk,requiredSet:a7,resolveExplicitRefs:l7,resolveByHeuristic:u7,resolveForCommand:c7,enrichPlugin:d7};function Vv(e){let t=me.object(e);if(t===void 0)return;let r=R(t.properties,me.object);if(r!==void 0)return r;let n=R(R(R(t.items,me.object),i=>i.properties),me.object);return n!==void 0?n:st(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:R(R(t[o],me.array),s=>st(s,void 0,(a,l)=>a!==void 0?a:Vv(l))))}function f7(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(a=>{if(n<=0)return a;let l=R(e[a],Vv);return l!==void 0?a+" { "+f7(l,n-1|0,!1)+" }":a}).join(" ")}function lze(e,t){return Object.keys(e).filter(i=>{let o=e[i];return o!==void 0?Ui(Vv(o)):!0}).join(" ")}function h7(e,t,r){let n=Object.keys(e),i=n.includes("id")?n:["id"].concat(n);return ne(i,o=>{let s=e[o];if(s===void 0)return o;let a=Vv(s);if(a===void 0)return o;let l=lze(a);if(l!=="")return o+" { "+l+" }"}).join(" ")}function Kv(e){return D(R(R(me.object(e),t=>t.properties),me.object),{})}function uF(e,t,r,n,i,o){let s=n!==void 0?n:!1,a=i!==void 0?i:!1,l=o!==void 0?o:!1,u=h7(Kv(t)),d=s||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=a?v.concat(["$orderBy: "+r+"OrderBy"]):v,E=a?_.concat(["orderBy: $orderBy"]):_;p=[x,E]}else p=[f,h];let g=p[0].join(", "),m=p[1].join(", ");return"query("+g+") { "+e+"("+m+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+u+" } } } }"}function cF(e,t){let r=f7(Kv(t),void 0,void 0),n=Jx(t);return n!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+n+": $subId) { "+r+" } }":"query($id: ID!) { "+e+"(id: $id) { "+r+" } }"}function uze(e,t){let r=h7(Kv(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function cze(e){return Gx(e).length===0?Ui(Jx(e)):!1}function dze(e){let t=Object.keys(Kv(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function fze(e,t,r,n,i,o,s,a,l,u,d,f){let h=[],p=i!==void 0?i:[],g=o!==void 0?o:[],m=s!==void 0?s:[],v={},_={},x={},E=fe(d,[],j=>Hie(j,e)),S=p.length===0?[e]:p,C=s7(S),k=d7(e,C),N={},T=(j,ue)=>{let Se=O(N,j);Se!==void 0?N[j]=Se.concat(ue):N[j]=ue};k.aggregates.forEach(j=>{j.linkedViews.forEach(ue=>T(ue,j.commands))}),k.stateChangeSlices.forEach(j=>{let ue=j.commands.filter(Ne=>Ne.level==="Collection"),Se=j.commands.filter(Ne=>Ne.level==="Instance");j.linkedViews.forEach(Ne=>T(Ne,ue)),se(j.consistencyRead,Ne=>T(Ne,Se))});let $=[],P=eu(),M=k.id,I=(j,ue,Se,Ne,tt,$e)=>{let we=cze(j.schema),nt=we?j.queryField+"ByIds":void 0,He=we?uze(j.queryField,j.schema):void 0,ct=dze(j.schema),Et=D(eH(j.schema),!0),St=j.name,hr=Vs(Fa(M,St)),nr=O(_,St),ti=Se+St,Eo={label:St,icon:void 0,group:k.name,sortOrder:j.sortIndex},Sn={fragmentId:ti,title:St,menuEntry:Eo,requiredAccess:nr,url:hr},Ki=M+"."+St,ki=(Dn,Kt)=>b(s4e,{readModel:j,detailView:ue,pluginId:M,openRowId:Dn,drillPath:Kt,singleQueryField:Ne,detailQueryDocument:tt,byIdsQueryField:nt,byIdsQueryDocument:He,sortKeyField:ct,liveDefault:Et,uiHints:d,schedulerJoin:$e},Ki);return $.push(tc(nc(M,St),Dn=>{let Kt=kH(Dn);return b(C0,{definition:Sn,children:ki(Kt[0],Kt[1])})})),LU(P,M,St,Fa(M,St)),Sn},U=k.readModels.filter(j=>!g.includes(j.name)).map(j=>{let ue=D(O(N,j.name),j.commands),Se=Xa(j.queryField),Ne=Ex(j.schema);if(j.queryDocument===""){let $e={...j};return $e.commands=ue,$e.queryDocument=uF(j.queryField,j.schema,Se,Ne.hasFilter,Ne.hasSort,Ne.hasSearch),$e}let tt={...j};return tt.commands=ue,tt}),B=k.stateViewSlices.filter(j=>!g.includes(j.name)).map(j=>{let ue=D(O(N,j.name),[]),Se=Xa(j.queryField),Ne=Ex(j.schema),tt=uF(j.queryField,j.schema,Se,Ne.hasFilter,Ne.hasSort,Ne.hasSearch);return{name:j.name,schema:j.schema,queryDocument:tt,queryField:j.queryField,sortIndex:j.sortIndex,commands:ue,linkedWriteSide:j.linkedWriteSide,labelField:j.labelField,labelFieldSource:j.labelFieldSource,searchableFields:j.searchableFields,statusField:j.statusField}}),q=f6e(U.concat(B),d,(j,ue)=>{console.warn("[AutoUI] "+k.id+': scheduler canvas "'+j+'" has '+ue.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),J=k.aggregates,Y={readModels:U,aggregates:J},K=j=>W(LNe(Y,j),ue=>{let Se=O(_,ue.readModel.name);return Ne=>b($5e,{binding:ue,entityId:Ne,requiredAccess:Se})}),G=j=>{let ue=D(d,M1),Se=Gie(io(ue,j.name),aNe(j.schema));return W(lNe(j,Se),Ne=>{let tt=O(_,j.name);return $e=>b(v8e,{binding:Ne,entityId:$e,requiredAccess:tt})})},ie=j=>{let ue=D(d,M1);if(Jie(io(ue,j.name)))return Se=>b(sze,{readModel:j.name,entityId:Se})},oe=j=>{let ue=K(j.name),Se=G(j);if(!(ue===void 0&&Se===void 0))return Ne=>L(Hr,{children:[fe(ue,null,tt=>tt(Ne)),fe(Se,null,tt=>tt(Ne))]})},_e=U.map(j=>{let ue=Xa(j.queryField),Se=cF(ue,j.schema),Ne=D(W(ne(j.linkedWriteSide,we=>k.aggregates.find(nt=>nt.name===we))[0],we=>we.commands),j.commands),tt=O(v,j.name);return I(j,tt!==void 0?tt:(we,nt,He)=>b(oF,{data:He,schema:j.schema,rootLabel:j.name,commands:Ne,statusField:j.statusField,aggregateId:we,labelField:j.labelField,drillPath:nt,pluginId:k.id,viewName:j.name,uiHints:d,entityPanel:oe(j),headerAccessory:ie(j)}),k.id+".",ue,Se,O(q,j.name))}),Re=B.map(j=>{let ue=Xa(j.queryField),Se=cF(ue,j.schema),Ne=O(v,j.name);return I(j,Ne!==void 0?Ne:($e,we,nt)=>b(oF,{data:nt,schema:j.schema,rootLabel:j.name,commands:j.commands,statusField:j.statusField,aggregateId:$e,labelField:j.labelField,drillPath:we,pluginId:k.id,viewName:j.name,uiHints:d,entityPanel:oe(j),headerAccessory:ie(j)}),k.id+".slice.",ue,Se,O(q,j.name))}),Pe=k.stateChangeSlices.filter(j=>!m.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:ue=>b(s5e,{slice:j,contextId:ue.contextId}),requiredAccess:O(x,j.name),minWidth:void 0})),at=U.concat(B).toSorted((j,ue)=>j.sortIndex===ue.sortIndex?zf(j.name,ue.name):Ox(j.sortIndex,ue.sortIndex));Be(hE("autoui.inferenceReport"))&&K5e(k.id,aF(at),d,E),se(f,j=>j(n7(k.id,aF(at),d,E)));let ve=ne(Bg(),j=>{let ue=j.arity;if(!(typeof ue!="object"||ue.TAG!=="Multi"))return[j,ue.min]}).flatMap(j=>{let ue=j[1],Se=j[0],Ne={};return at.forEach(tt=>{let $e=R(d,ct=>io(ct,tt.name)),we=fe(R($e,ct=>ct.suppress),!1,ct=>ct.includes(Se.id));if(!(Se.isCapable(tt.schema)&&!we))return;let nt=D(R($e,ct=>ct.canvas),Se.label),He=O(Ne,nt);He!==void 0?He.push(tt):Ne[nt]=[tt]}),ne(Ge(Ne),tt=>{let $e=tt[1];if($e.length>=ue)return[Se,tt[0],$e]})}),xe=(j,ue)=>ve.some(Se=>Se[1]===ue?Se[0].id!==j.id:!1)?ue+" — "+j.label:ue,pt=ve.map(j=>{let ue=j[2],Se=j[0],Ne=xe(Se,j[1]),tt=k.id+".canvas."+Ne,$e={label:Ne,icon:void 0,group:k.name,sortOrder:900},we=N3(_,ue.map(ct=>ct.name)),nt=Vs(Fa(M,Ne)),He={fragmentId:tt,title:Ne,menuEntry:$e,requiredAccess:we,url:nt};return $.push(tc(nc(M,Ne),ct=>b(C0,{definition:He,children:b(R8e,{pluginId:M,mode:Se,canvasName:Ne,readModels:ue,uiHints:d,viewAccess:_})}))),He}),ur=ne(Bg(),j=>{let ue=j.arity;if(!(typeof ue!="object"||ue.TAG==="Multi"))return[j,ue._0]}).flatMap(j=>{let ue=j[1],Se=j[0],Ne={},tt={},$e=(ct,Et,St)=>{let hr=O(ct,Et);hr!==void 0?hr.push(St):ct[Et]=[St]};at.forEach(ct=>{let Et=R(d,nr=>io(nr,ct.name)),St=D(R(Et,nr=>nr.canvas),Se.label),hr=R(Et,nr=>nr.role);if(hr!==void 0)return hr===yu?$e(Ne,St,ct):hr===xu?se(R(Et,nr=>nr.resourceRef),nr=>$e(tt,St,[ct,nr])):void 0});let we=(ct,Et)=>fe(ue.find(St=>St.role===ct),Et,St=>St.min),nt=we(yu,1),He=we(xu,1);return ne(Ge(Ne),ct=>{let Et=ct[1],St=ct[0],hr=D(O(tt,St),[]),nr=Et[0];if(nr===void 0||!(Et.length>=nt&&hr.length>=He))return;let ti=hr.map(Dn=>({readModel:Dn[0],resourceRef:Dn[1]})),Eo=k.id+".scheduler."+St,cr={label:St,icon:void 0,group:k.name,sortOrder:910},Sn=RNe(_,nr.name),Ki=Vs(Fa(M,St)),ki={fragmentId:Eo,title:St,menuEntry:cr,requiredAccess:Sn,url:Ki};return $.push(tc(nc(M,St),Dn=>b(C0,{definition:ki,children:b(B5e,{pluginId:M,canvasName:St,mode:Se,resource:nr,events:ti,uiHints:d,viewAccess:_})}))),ki})}),It=U.concat(B).flatMap(j=>YK(j.schema).map(ue=>({view:j.name,label:ue[2],field:ue[0],aggregate:ue[1]}))),wi=U.concat(B).flatMap(j=>vH(j.schema,R(d,ue=>da(ue,j.name))).map(ue=>({view:j.name,field:ue,aggregate:"sum"}))),fr=D(R(d,j=>j.dashboard),[]),So=fr.map(j=>[j.view,D(j.field,"")]),Sr=(j,ue)=>!j.some(Se=>Se[0]===ue.view?Se[1]===D(ue.field,""):!1),en=It.filter(j=>Sr(So,j)),xn=So.concat(en.map(j=>[j.view,D(j.field,"")])),Qe=fr.concat(en).concat(wi.filter(j=>Sr(xn,j))),le;if(Qe.length!==0){let j="Dashboard",ue=U.concat(B),Se=k.id+".dashboard",Ne={label:j,icon:void 0,group:k.name,sortOrder:-100},tt=N3(_,st(Qe.map(nt=>nt.view),[],(nt,He)=>nt.includes(He)?nt:nt.concat([He])).filter(nt=>ue.some(He=>He.name===nt))),$e=Vs(Fa(M,j)),we={fragmentId:Se,title:j,menuEntry:Ne,requiredAccess:tt,url:$e};$.push(tc(nc(M,j),nt=>b(C0,{definition:we,children:b(i8e,{pluginId:M,metrics:Qe,readModels:ue,uiHints:d,viewAccess:_})}))),le=[we]}else le=[];let Te=Y9(U.concat(B)),Le;if(Te.length!==0){let j="Lifecycles",ue=k.id+".lifecycles",Se={label:j,icon:void 0,group:k.name,sortOrder:-50},Ne=Vs(Fa(M,j)),tt={fragmentId:ue,title:j,menuEntry:Se,requiredAccess:void 0,url:Ne};$.push(tc(nc(M,j),$e=>b(d5e,{views:Te}))),Le=[tt]}else Le=[];return{pages:le.concat(Le.concat(_e.concat(Re.concat(pt.concat(ur))))),panels:Pe,routes:$,publicLinks:P}}let dF=new Map;function hze(e,t){let r=dF.get(e);if(!(r!==void 0?r===t:!1)){SF.registerRemotes([{name:e,entry:t}]),dF.set(e,t);return}}async function pze(e,t,r){hze(e,r);try{let n=await SF.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!==cm)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 gze=dr(null),Ay={didCatch:!1,error:null};class mze extends B7{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ay}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),s=0;s<i;s++)o[s]=arguments[s];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(Ay)}}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&&vze(t.resetKeys,i)){var o,s;(o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Ay)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=t;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")a=r(l);else if(n)a=Ar(n,l);else if(i!==void 0)a=i;else throw s}return Ar(gze.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function vze(){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 _ze(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 bze(e,t){console.error("Fragment crashed:",e)}function yze(e){let t=e.fallbackComponent;return Ar(mze,{FallbackComponent:t!==void 0?t:_ze,onError:bze,children:e.children})}let xze=yze;function Sze(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=ae(()=>"Loading"),o=i[1],s=i[0];return Ae(()=>{o(l=>"Loading");let a={contents:!1};return pze(n,r,t).then(l=>{if(a.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}))}),()=>{a.contents=!0}},[n,r,t]),typeof s!="object"?b("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):s.TAG==="Loaded"?b(xze,{children:Ar(s._0,e.panelProps)}):b("div",{children:"Panel error: "+s._0,style:{color:"#a00",padding:"0.75rem"}})}let Eze=Sze;function si(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Pl(e){return si(e)==="object"}function wze(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function fF(e,t){return e.length<124?e:t}const kze="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 zr;(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"})(zr||(zr={}));function p7(e){if(!Pl(e))throw new Error(`Message is expected to be an object, but got ${si(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 ${si(e.type)}`);switch(e.type){case zr.ConnectionInit:case zr.ConnectionAck:case zr.Ping:case zr.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 zr.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${si(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 ${si(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 ${si(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 ${si(e.payload.variables)}`);if(e.payload.operationName!=null&&si(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 ${si(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 ${si(e.payload.extensions)}`);break}case zr.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${si(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 ${si(e.payload)}`);break}case zr.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${si(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!wze(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 zr.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${si(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 Cze(e,t){return p7(typeof e=="string"?JSON.parse(e,t):e)}function sf(e,t){return p7(e),JSON.stringify(e,t)}var Oc=function(e){return this instanceof Oc?(this.v=e,this):new Oc(e)},Rze=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),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(p){return function(g){return Promise.resolve(g).then(p,f)}}function a(p,g){n[p]&&(i[p]=function(m){return new Promise(function(v,_){o.push([p,m,v,_])>1||l(p,m)})},g&&(i[p]=g(i[p])))}function l(p,g){try{u(n[p](g))}catch(m){h(o[0][3],m)}}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,g){p(g),o.shift(),o.length&&l(o[0][0],o[0][1])}};function Aze(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:s=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(J){let Y=1e3;for(let K=0;K<J;K++)Y*=2;await new Promise(K=>setTimeout(K,Y+Math.floor(Math.random()*2700+300)))},shouldRetry:f=Ty,isFatalConnectionProblem:h,on:p,webSocketImpl:g,generateID:m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,J=>{const Y=Math.random()*16|0;return(J=="x"?Y:Y&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:_}=e;let x;if(g){if(!Nze(g))throw new Error("Invalid WebSocket implementation provided");x=g}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 E=x,S=(()=>{const q=(()=>{const Y={};return{on(K,G){return Y[K]=G,()=>{delete Y[K]}},emit(K){var G;"id"in K&&((G=Y[K.id])===null||G===void 0||G.call(Y,K))}}})(),J={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(Y,K){const G=J[Y];return G.push(K),()=>{G.splice(G.indexOf(K),1)}},emit(Y,...K){for(const G of[...J[Y]])G(...K)}}})();function C(q){const J=[S.on("error",Y=>{J.forEach(K=>K()),q(Y)}),S.on("closed",Y=>{J.forEach(K=>K()),q(Y)})]}let k,N=0,T,$=!1,P=0,M=!1;async function I(){clearTimeout(T);const[q,J]=await(k??(k=new Promise((G,ie)=>(async()=>{if($){if(await d(P),!N)return k=void 0,ie({code:1e3,reason:"All Subscriptions Gone"});P++}S.emit("connecting",$);const oe=new E(typeof t=="function"?await t():t,kze);let _e,Re;function Pe(){isFinite(s)&&s>0&&(clearTimeout(Re),Re=setTimeout(()=>{oe.readyState===E.OPEN&&(oe.send(sf({type:zr.Ping})),S.emit("ping",!1,void 0))},s))}C(ve=>{k=void 0,clearTimeout(_e),clearTimeout(Re),ie(ve),ve instanceof hF&&(oe.close(4499,"Terminated"),oe.onerror=null,oe.onclose=null)}),oe.onerror=ve=>S.emit("error",ve),oe.onclose=ve=>S.emit("closed",ve),oe.onopen=async()=>{try{S.emit("opened",oe);const ve=typeof r=="function"?await r():r;if(oe.readyState!==E.OPEN)return;oe.send(sf(ve?{type:zr.ConnectionInit,payload:ve}:{type:zr.ConnectionInit},v)),isFinite(l)&&l>0&&(_e=setTimeout(()=>{oe.close(Ai.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Pe()}catch(ve){S.emit("error",ve),oe.close(Ai.InternalClientError,fF(ve instanceof Error?ve.message:new Error(ve).message,"Internal client error"))}};let at=!1;oe.onmessage=({data:ve})=>{try{const xe=Cze(ve,_);if(S.emit("message",xe),xe.type==="ping"||xe.type==="pong"){S.emit(xe.type,!0,xe.payload),xe.type==="pong"?Pe():a||(oe.send(sf(xe.payload?{type:zr.Pong,payload:xe.payload}:{type:zr.Pong})),S.emit("pong",!1,xe.payload));return}if(at)return;if(xe.type!==zr.ConnectionAck)throw new Error(`First message cannot be of type ${xe.type}`);clearTimeout(_e),at=!0,S.emit("connected",oe,xe.payload,$),$=!1,P=0,G([oe,new Promise((pt,ur)=>C(ur))])}catch(xe){oe.onmessage=null,S.emit("error",xe),oe.close(Ai.BadResponse,fF(xe instanceof Error?xe.message:new Error(xe).message,"Bad response"))}}})())));q.readyState===E.CLOSING&&await J;let Y=()=>{};const K=new Promise(G=>Y=G);return[q,Y,Promise.race([K.then(()=>{if(!N){const G=()=>q.close(1e3,"Normal Closure");isFinite(o)&&o>0?T=setTimeout(()=>{q.readyState===E.OPEN&&G()},o):G()}}),J])]}function U(q){if(Ty(q)&&(Tze(q.code)||[Ai.InternalServerError,Ai.InternalClientError,Ai.BadRequest,Ai.BadResponse,Ai.Unauthorized,Ai.SubprotocolNotAcceptable,Ai.SubscriberAlreadyExists,Ai.TooManyInitialisationRequests].includes(q.code)))throw q;if(M)return!1;if(Ty(q)&&q.code===1e3)return N>0;if(!u||P>=u||!f(q)||h?.(q))throw q;return $=!0}n||(async()=>{for(N++;;)try{const[,,q]=await I();await q}catch(q){try{if(!U(q))return}catch(J){return i?.(J)}}})();function B(q,J){const Y=m(q);let K=!1,G=!1,ie=()=>{N--,K=!0};return(async()=>{for(N++;;)try{const[oe,_e,Re]=await I();if(K)return _e();const Pe=S.onMessage(Y,at=>{switch(at.type){case zr.Next:{J.next(at.payload);return}case zr.Error:{G=!0,K=!0,J.error(at.payload),ie();return}case zr.Complete:{K=!0,ie();return}}});oe.send(sf({id:Y,type:zr.Subscribe,payload:q},v)),ie=()=>{!K&&oe.readyState===E.OPEN&&oe.send(sf({id:Y,type:zr.Complete},v)),N--,K=!0,_e()},await Re.finally(Pe);return}catch(oe){if(!U(oe))return}})().then(()=>{G||J.complete()}).catch(oe=>{J.error(oe)}),()=>{K||ie()}}return{on:S.on,subscribe:B,iterate(q){const J=[],Y={done:!1,error:null,resolve:()=>{}},K=B(q,{next(ie){J.push(ie),Y.resolve()},error(ie){Y.done=!0,Y.error=ie,Y.resolve()},complete(){Y.done=!0,Y.resolve()}}),G=(function(){return Rze(this,arguments,function*(){for(;;){for(J.length||(yield Oc(new Promise(_e=>Y.resolve=_e)));J.length;)yield yield Oc(J.shift());if(Y.error)throw Y.error;if(Y.done)return yield Oc(void 0)}})})();return G.throw=async ie=>(Y.done||(Y.done=!0,Y.error=ie,Y.resolve()),{done:!0,value:void 0}),G.return=async()=>(K(),{done:!0,value:void 0}),G},async dispose(){if(M=!0,k){const[q]=await k;q.close(1e3,"Normal Closure")}},terminate(){k&&S.emit("closed",new hF)}}}class hF 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 Tze(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function Nze(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function $ze(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return Aze({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function Th(e,t){return R(e[t],me.string)}function Po(e,t){return D(Th(e,t),"")}function Dze(e,t){return W(R(e[t],me.float),r=>r|0)}function Fze(e,t){return ne(D(R(e[t],me.array),[]),me.string)}function Ize(e){let t=me.object(e);return t!==void 0?{label:Po(t,"label"),icon:Th(t,"icon"),group:Th(t,"group"),sortOrder:D(Dze(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function Pze(e){return W(me.object(e),t=>({fragmentId:Po(t,"fragmentId"),title:Po(t,"title"),description:Po(t,"description"),positions:Fze(t,"positions"),requiredAccess:Th(t,"requiredAccess")}))}function Oze(e){return W(me.object(e),t=>({fragmentId:Po(t,"fragmentId"),title:Po(t,"title"),menuEntry:D(W(t.menuEntry,Ize),{label:Po(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:Th(t,"requiredAccess")}))}function Mze(e){return W(me.object(e),t=>({pluginId:Po(t,"pluginId"),remoteEntryUrl:Po(t,"remoteEntryUrl"),panels:ne(D(R(t.panels,me.array),[]),Pze),pages:ne(D(R(t.pages,me.array),[]),Oze),registeredAt:Po(t,"registeredAt"),updatedAt:Po(t,"updatedAt")}))}function Lze(e){return ne(D(R(R(R(R(me.object(e),t=>t.data),me.object),t=>t.Platform_UIFragments),me.array),[]),Mze)}let zze=`{
|
|
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 Uze(e,t){return se(R(R(Q(t),r=>O(r,"properties")),Q),r=>{zx(r).forEach(n=>se(R(R(Q(n),i=>O(i,"x-reventless-semantic-target")),Q),i=>{let o=O(i,"store"),s=O(i,"plugin");if(o!==void 0&&s===void 0){i.plugin=e;return}}))}),t}function Dx(e,t){let r=ce(t);return Uze(e,r!==void 0?JSON.parse(r):t)}function pF(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function gF(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function Bze(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function jze(e,t){let r=D(R(O(t,"type"),ce),"string");return r!=="array"?gF(e)&&r==="string"?"ID":pF(r):"["+D(W(R(R(R(O(t,"items"),Q),i=>O(i,"type")),ce),i=>i==="string"&&(Bze(e)||gF(e))?"ID":pF(i)),"String")+"!]"}function qze(e,t,r){let n=D(W(R(R(Q(t),u=>O(u,"properties")),Q),u=>Object.keys(u).filter(d=>d!=="TAG").map(d=>{let f=D(W(R(O(u,d),Q),h=>jze(d,h)),"String");return[d,f]})),[]),o=(r!==void 0?[]:[["id","ID"]]).concat(n),s="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(o.length===0)return"mutation { "+e+" { "+s+" } }";let a=o.map(u=>"$"+u[0]+": "+u[1]+"!").join(", "),l=o.map(u=>{let d=u[0];return d+": $"+d}).join(", ");return"mutation "+e+"("+a+") { "+e+"("+l+") { "+s+" } }"}function Vze(e){let t=e.split(".");return D(t[t.length-1|0],e)}function Kze(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Hze(e){return ne(D(br(e),[]),t=>W(Q(t),r=>{let n=i=>D(R(O(r,i),ce),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:R(O(r,"plugin"),ce)}}))}function mF(e,t){return ne(D(br(t),[]),r=>W(R(Q(r),n=>{let i=R(O(n,"apiExposed"),MF);if(!Ue(i,!1))return n}),n=>{let i=g=>D(R(O(n,g),ce),""),o=i("name"),a=i("level")==="Instance"?"Instance":"Collection",l=D(W(O(n,"schema"),g=>Dx(e,g)),null),u=i("mutationField"),d=R(O(n,"aggregateIdField"),ce),f=D(W(O(n,"references"),Hze),[]),h=W(R(O(n,"allowedStates"),br),g=>ne(g,ce)),p=R(O(n,"targetState"),ce);return{name:o,label:Kze(Vze(o)),schema:l,mutationDocument:qze(u,l,d),requiredRole:void 0,level:a,aggregateIdField:d,refFields:[],references:f,allowedStates:h,targetState:p}}))}function Wze(e){return ne(D(br(e),[]),t=>W(Q(t),r=>{let n=f=>D(R(O(r,f),ce),""),i=f=>D(R(O(r,f),br),[]),o=(f,h)=>ne(D(R(O(f,h),br),[]),ce),s=n("pluginId"),a=ne(i("readModels"),f=>W(Q(f),h=>{let p=g=>D(R(O(h,g),ce),"");return{name:p("name"),schema:D(W(O(h,"schema"),g=>Dx(s,g)),null),queryDocument:"",queryField:p("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(h,"linkedWriteSide"),labelField:p("labelField"),labelFieldSource:R(O(h,"labelFieldSource"),ce),searchableFields:o(h,"searchableFields"),statusField:R(O(h,"statusField"),ce)}})),l=ne(i("aggregates"),f=>W(Q(f),h=>({name:(g=>D(R(O(h,g),ce),""))("name"),schema:null,commands:mF(s,D(O(h,"commands"),[])),linkedViews:o(h,"linkedViews")}))),u=ne(i("stateViewSlices"),f=>W(Q(f),h=>{let p=g=>D(R(O(h,g),ce),"");return{name:p("name"),schema:D(W(O(h,"schema"),g=>Dx(s,g)),null),queryField:p("queryField"),sortIndex:0,linkedWriteSide:o(h,"linkedWriteSide"),labelField:p("labelField"),labelFieldSource:R(O(h,"labelFieldSource"),ce),searchableFields:o(h,"searchableFields"),statusField:R(O(h,"statusField"),ce)}})),d=ne(i("stateChangeSlices"),f=>W(Q(f),h=>({name:(g=>D(R(O(h,g),ce),""))("name"),commands:mF(s,D(O(h,"commands"),[])),linkedViews:o(h,"linkedViews"),consistencyRead:R(O(h,"consistencyRead"),ce)})));return{id:s,name:s,readModels:a,aggregates:l,stateViewSlices:u,stateChangeSlices:d}}))}function Gze(e){return D(W(R(R(R(me.object(e),t=>t.data),me.object),t=>t.Platform_ComponentDefinitions),Wze),[])}let Jze=`{
|
|
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 Fx(e,t){return e+"/"+t}function Qze(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(Fx(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(Fx(r.pluginId,i.fragmentId),n)});return}}),t}function Yze(e,t,r){return e.get(Fx(t,r))}function Xze(e,t,r){return e.map(n=>{let i=Yze(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(Eze,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function vF(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(W([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function Zze(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>vF(n.fragmentId,e)),r.panels.map(n=>vF(n.fragmentId,e))]:[[],[]]}function _F(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),Gt(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function e9e(e,t,r,n,i,o,s,a){let l=Qze(s);n(aze.buildRegistry(o)),i(ne(o,p=>W(S0e(p),g=>({pluginId:p.id,binding:g}))));let u=[],d=[],f=[],h={contents:eu()};o.forEach(p=>{let g=Zze(p.id,s),m=fze(p,void 0,void 0,void 0,o,g[0],g[1],void 0,void 0,void 0,a[p.id],void 0),v=Xze(m.panels,p.id,l);m.pages.forEach(_=>{u.push(_)}),v.forEach(_=>{d.push(_)}),m.routes.forEach(_=>{f.push(_)}),h.contents=Iy(h.contents,m.publicLinks)}),se(e,p=>p.setPluginPages(u)),se(t,p=>p.setPluginPanels(d)),se(r,p=>p.setPluginRoutes(f,h.contents)),s.forEach(p=>{})}function bF(e,t,r,n,i,o,s,a,l){let u=_F(e.platformApiEndpoint,Jze,t),d=_F(e.platformApiEndpoint,zze,t);return Promise.all([u,d]).then(f=>{let h=f[1],p=f[0];(jg(p)||jg(h))&&r();let g=Gze(p),m=Lze(h);e9e(n,i,o,s,a,g,m,l)})}let t9e=`subscription OnPluginStatusChange {
|
|
114
|
+
onPluginStatusChange { pluginId status }
|
|
115
|
+
}`,r9e=`subscription OnUIFragmentChange {
|
|
116
|
+
onUIFragmentChange { pluginId changeKind }
|
|
117
|
+
}`;function n9e(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=zt(tp),o=zt(rp),s=Nw(),a=SH(),l=vge(),u=$s(),d=R(u,f=>f.getToken());return Ae(()=>{bF(r,d,()=>se(u,f=>f.logout()),i,o,s,a,l,n)},[d]),Ae(()=>{try{let f=$ze(r.platformApiSubscriptionEndpoint,d),h=()=>{bF(r,d,()=>se(u,m=>m.logout()),i,o,s,a,l,n)},p=f.subscribe({query:t9e,variables:void 0},{next:m=>h(),error:m=>{},complete:()=>{}}),g=f.subscribe({query:r9e,variables:void 0},{next:m=>h(),error:m=>{},complete:()=>{}});return()=>{p(),g(),f.dispose()}}catch{return}},[d]),null}let i9e=n9e;function Pi(e){return"var("+e+")"}let o9e=w([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"),Xe("center"),c("gap",Pi(F.sm)),c("min-height","160px"),ha("center"),Ko({NAME:"percent",VAL:100}),c("box-sizing","border-box")]),s9e=w([c("font-size","32px"),c("line-height","1"),Em(Ce(4))]),a9e=w([c("color",Pi(y.textPrimary)),c("font-size",Pi(A.sizeMd)),c("font-weight",Pi(A.weightMedium)),Em(Ce(4))]),l9e=w([c("color",Pi(y.textSecondary)),c("font-size",Pi(A.sizeSm)),c("line-height",Pi(A.lineHeightNormal))]),u9e=w([c("color",Pi(y.textDisabled)),c("font-size",Pi(A.sizeXs)),c("font-family",Pi(A.fontFamilyMono)),Cs(Ce(8))]);function c9e(e){let t=e.definition;return L("div",{children:[b("div",{children:"[locked]",className:s9e}),b("div",{children:t.title,className:a9e}),b("div",{children:t.description,className:l9e}),b("div",{children:t.extensionPackage,className:u9e})],className:o9e})}let d9e=c9e,f9e=w([z("flex"),Z("center"),Xe("center"),c("min-height","160px"),c("color","var("+y.textSecondary+")"),c("font-size","var("+A.sizeSm+")")]);function h9e(e){return b("div",{children:"Loading…",className:f9e})}w([z("flex"),Z("center"),Xe("center"),c("min-height","160px"),c("color","var("+y.error+")"),c("font-size","var("+A.sizeSm+")")]);function p9e(e){let t=xl(),r=_pe(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?b(d9e,{definition:r}):b(j7,{children:r.component(e.props),fallback:b(h9e,{})})}let g9e=p9e;function m9e(e){let t=vpe(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?b("div",{children:t.map(o=>b(g9e,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let v9e=m9e;function _9e(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(v9e,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let b9e=_9e,y9e="host.home",x9e="/",S9e={label:"Home",icon:void 0,group:void 0,sortOrder:0},E9e=x9e,w9e={fragmentId:y9e,title:"Home",menuEntry:S9e,requiredAccess:void 0,url:E9e};function k9e(e){let t=e.config,r=zt(tp),n=Nw(),i=cL(),o=fm(void 0);return Ae(()=>{t.autoRedirectFirstPage||(se(r,s=>s.register([w9e])),se(n,s=>s.register([tc(FF(a=>a),b(b9e,{}))],eu())))},[]),Ae(()=>{if(t.autoRedirectFirstPage&&(o===""||o==="/")){let s=i.find(a=>Be(a.url));if(s!==void 0){let a=s.url;a!==void 0&&Dh(a)}}},[i.length,o]),null}let C9e=k9e;function R9e(e){return R(Q(e),t=>{let r=R(O(t,"uploadUrl"),ce),n=R(O(t,"storageRef"),ce);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function A9e(e,t,r,n,i){return new Promise((o,s)=>{let a=new XMLHttpRequest;a.open("PUT",e),a.setRequestHeader("Content-Type",n),a.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},a.onload=()=>{let l=a.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},a.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),a.send(r)})}function T9e(e,t){let r=t!==void 0?t:()=>{};return{upload:(n,i)=>{let o=n.type,s=dt([["content-type","application/json"]]);se(r(),l=>{s.authorization="Bearer "+l});let a=D(JSON.stringify({fileName:n.name,contentType:o}),"{}");return Gt(fetch(e,{method:"POST",headers:s,body:a}).then(l=>l.ok?l.json().then(R9e):Promise.resolve(void 0)).then(l=>l!==void 0?A9e(l.uploadUrl,l.storageRef,n,o,i):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})),l=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))}}}let N9e=[],$9e=[],D9e=[],F9e={pages:N9e,panels:$9e,routes:D9e};function g7(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 nk(e){return b("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function I9e(e){let t=e.extensions,r=zt(tp),n=zt(rp),i=Nw();return Ae(()=>{t.pages.length!==0&&se(r,o=>o.register(t.pages)),t.panels.length!==0&&se(n,o=>o.register(t.panels)),t.routes.length!==0&&se(i,o=>o.register(t.routes,eu()))},[]),null}function Ix(e){let t=e.config,r=Dpe(),n=$pe(),i=L("div",{children:[b(Sge,{}),b(Mpe,{}),b(phe,{})],style:{borderBottom:"1px solid var("+y.borderSubtle+")",display:"flex",padding:"0.5rem 1rem",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem"}});return L(Hr,{children:[b(C9e,{config:t}),b(i9e,{config:t,uiHints:e.uiHints}),b(I9e,{extensions:e.extensions}),b(epe,{appName:"Reventless",router:r,headerSlot:i,routesReady:n,loading:b(nk,{})})]})}function P9e(e){let t=e.discoverPlatforms,r=fm(void 0),n=gL(r);if(n===void 0)return t!==void 0?b(l0e,{discover:t}):b(g7,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return b(mL.make,{scope:i,children:b(aU,{value:{prefix:Tw(i),path:n[1]},children:b(Ix,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function yF(e){let t=e.access;return b(Dhe,{access:t,children:b(Che.make,{children:b(mpe.make,{access:t,children:b(Npe.make,{children:b(xH.make,{children:b(gge.make,{children:e.children})})})})})})}function O9e(e){let t=e.uiHints,r=e.extensions,n=e.config,i=$s(),o=n.mode,s;if(o==="Single"){let u=n.environment,d=n.platformName;s=u!==void 0&&d!==void 0?b(mL.make,{scope:{environment:u,platformName:d},children:b(Ix,{config:n,extensions:r,uiHints:t})}):b(Ix,{config:n,extensions:r,uiHints:t})}else s=b(P9e,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return b(yF,{access:n.accessTiers,children:s});if(i===void 0)return b(ZT,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?b(yF,{access:l.groups.concat(n.accessTiers),children:s}):b(ZT,{})}function M9e(e){let t=e.config,r=$s();jU(t.assetOrigins);let n=fm(void 0),i=t.mode,o;o=i==="Single"?void 0:W(gL(n),f=>f[0]);let s=fe(o,"",f=>f.environment+"|"+f.platformName),a=jt(()=>{let f=noe(t.apiEndpoint,t.platformApiEndpoint,()=>R(r,h=>h.getToken()),()=>se(r,h=>h.logout()));return o!==void 0?n0e(o)(f):f},[t,r,s]),l=()=>R(r,f=>f.getToken()),u=Je(l);u.current=l;let d=t.uploadEndpoints;return Ae(()=>{let f={},h=p=>{let g=f[p];if(g!==void 0)return g;let m=T9e(p,()=>u.current());return f[p]=m,m};(Be(t.uploadEndpoint)||Object.entries(d).length!==0)&&jge(W(t.uploadEndpoint,h),p=>W(d[p],h),void 0,void 0)},[t.uploadEndpoint,d]),b(Sie.make,{execute:a,children:b(nNe,{config:t,children:b(Xpe.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,getToken:l,children:b(hpe.make,{initialPreset:"Light",children:b(O9e,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})})})})}function L9e(e,t){let r=ae(()=>{}),n=r[1];return Ae(()=>{toe(e.uiHintsUrl).then(i=>n(o=>i))},[e.uiHintsUrl]),W(r[0],i=>Bie(i,D(t.uiHints,{})))}function z9e(e){let t=e.extensions,r=e.config,n=L9e(r,t);return b(she.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:n!==void 0?b(M9e,{config:r,extensions:t,uiHints:n,discoverPlatforms:e.discoverPlatforms}):b(nk,{})})}function U9e(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:F9e,i=ae(()=>"LoadingConfig"),o=i[1],s=i[0];return Ae(()=>{roe().then(a=>{if(a.TAG==="Ok"){let u=a._0;return t!==void 0?Gt(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=a._0;return o(u=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof s!="object"?b(nk,{}):s.TAG==="Ready"?b(z9e,{config:s._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):b(g7,{message:s._0})}let B9e={make:U9e},xF=document.querySelector("#root");xF!=null&&O7(xF).render(b(B9e.make,{registerModes:Q7}));export{Gt as $,Q as A,ys as B,y as C,Be as D,Br as E,xr as F,vE as G,Qc as H,X as R,F as S,A as T,xs as a,Tr as b,uie as c,ce as d,D as e,ne as f,O as g,bt as h,R as i,br as j,dt as k,se as l,fe as m,Wt as n,Uo as o,ka as p,f9 as q,st as r,bu as s,qu as t,cpe as u,rr as v,ep as w,Qo as x,Ss as y,Bo as z};
|