@reventlessdev/reventless-host-shell 3.0.0-alpha.79 → 3.0.0-alpha.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{Geocoder.res-BBwViGpp.js → Geocoder.res-BOdySsJH.js} +2 -2
- package/dist/assets/{GraphMode.res-B565yCSp.js → GraphMode.res-DKdroqtc.js} +1 -1
- package/dist/assets/{GraphView.res-D01bDRV1.js → GraphView.res-CRcyg6hQ.js} +1 -1
- package/dist/assets/{MapMode.res-CLIrAqxf.js → MapMode.res-CwUDCE7P.js} +14 -14
- package/dist/assets/StateMachineDiagram.res-BNdLprCN.js +3 -0
- package/dist/assets/index-DMFzPDvN.js +1 -0
- package/dist/assets/index-pVLf0Xc0.js +133 -0
- package/dist/mf-entry-bootstrap-0.js +1 -1
- package/package.json +5 -5
- package/dist/assets/StateMachineDiagram.res-BmSCUno8.js +0 -3
- package/dist/assets/index-B9vMLj1R.js +0 -133
- package/dist/assets/index-fFUHOAvr.js +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-DKdroqtc.js","assets/GraphView.res-CRcyg6hQ.js","assets/StateMachineDiagram.res-BNdLprCN.js","assets/MapMode.res-CwUDCE7P.js","assets/Geocoder.res-BOdySsJH.js","assets/index-DMFzPDvN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import"./virtualExposes-DN39MDG_.js";import{d as $P}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C8lRAcSv.js";import{_ as jf}from"./preload-helper-BlTxHScW.js";import{_ as Kj}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 y,b as cr}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 de,b as De,c as or,d as _r,e as Hj,f as Et,g as qr,h as Pe,i as Tt,j as ov,k as Wj,l as NP,m as go,n as Jj,o as Qj,p as Yj,q as Xj}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js";import{a as DP,b as dm}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Bp_g55i_.js";import{c as Jg,_ as kt}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function Zj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function eq(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Jt(e){return e===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:e!==null&&e.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function ro(e){if(e!=null)return Jt(e)}function jt(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 av="JsExn";function tq(e){if(e.RE_EXN_ID===av)return Jt(e._1)}function rq(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function ws(e){return rq(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let nq=["map","graph"];async function iq(e,t){switch(e){case"graph":return(await jf(()=>import("./GraphMode.res-DKdroqtc.js"),__vite__mapDeps([0,1])).then(a=>a.init))(t.graphLayout,void 0),(await jf(()=>import("./StateMachineDiagram.res-BNdLprCN.js"),__vite__mapDeps([2,1])).then(a=>a.init))();case"map":let i=await jf(()=>import("./MapMode.res-CwUDCE7P.js"),__vite__mapDeps([3])).then(a=>a.init),o=await jf(()=>import("./Geocoder.res-BOdySsJH.js"),__vite__mapDeps([4])).then(a=>a.fromShell);return i(t.mapStyle,o(),void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+nq.join(", "));return}}async function oq(e){await Promise.all(e.viewModes.map(async t=>{try{return await iq(t,e)}catch(r){let n=ws(r);if(n.RE_EXN_ID===av){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function gi(e,t){if(e!==void 0&&t(jt(e)))return e}function re(e,t){if(e!==void 0)return t(jt(e))}function ne(e,t,r){return e!==void 0?r(jt(e)):t}function q(e,t){if(e!==void 0)return Jt(t(jt(e)))}function k(e,t){if(e!==void 0)return t(jt(e))}function D(e,t){return e!==void 0?jt(e):t}function Jn(e,t){return e!==void 0?e:t}function ke(e){return e!==void 0}function vr(e){return e===void 0}function aq(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function rR(e){switch(e){case"":case"/":return 0;default:let t=e.slice(1),n=t[t.length-1|0]==="/"?t.slice(0,-1):t,i=n.split("?",2),a=(i.length!==2?n:i[0]).split("/").filter(u=>u.length!==0),s=a.length-1|0,l=0;for(;;){let u=l,d=s;if(d<0)return u;l={hd:a[d],tl:u},s=d-1|0}}}function sq(e,t){let r=globalThis.window;return e!==void 0?rR(e):r!==void 0?rR(jt(r).location.pathname):0}function lq(){let e=globalThis.window;if(e===void 0)return"";let t=jt(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function nR(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function uq(e,t){let r=globalThis.window;return e!==void 0?nR(e):r!==void 0?nR(jt(r).location.search):""}function Es(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){jt(t).pushState(null,"",e),jt(r).dispatchEvent(aq("popstate"));return}}function cq(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 Qg(e,t){return{path:sq(e),hash:lq(),search:uq(e)}}function dq(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(Qg(void 0));return jt(t).addEventListener("popstate",r),r}function fq(e){let t=globalThis.window;if(t!==void 0){jt(t).removeEventListener("popstate",e);return}}function hq(e,t){let r=de(()=>Qg(void 0)),n=r[1],i=r[0];return De(()=>{let o=dq(s=>n(l=>s)),a=Qg(void 0);return cq(a,i)&&n(s=>a),()=>fq(o)},[]),i}let pq=Qg,sv=or({prefix:"",path:""});function FP(e,t){return e===""||t.startsWith(e)?t:e+t}let mq=sv.Provider;function gq(e){return _r(mq,{value:e.value,children:e.children})}let vq=gq,iR="popstate";function bq(){let e=globalThis.window;return e!==void 0?jt(e).location.pathname:""}function _q(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=jt(t);return r.addEventListener(iR,e),()=>{r.removeEventListener(iR,e)}}function lv(e,t){return Hj(_q,bq,()=>D(e,""))}function Ns(){let t=Et(sv).prefix;return r=>Es(FP(t,r))}function IP(){let t=Et(sv).path,r=lv(void 0);return t===""?r:t}function Ft(e,t){return e.catch(r=>t(ws(r)))}function dd(e,t){return e===t?0:e<t?-1:1}function GS(e,t){return e<t?-1:e===t?0:1}function No(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function PP(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function Cl(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 tt(e,t,r){return e.reduce(r,t)}function yq(e,t){let r=e.findIndex(t);if(r!==-1)return r}function Q(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a);s!==void 0&&(n[i]=jt(s),i=i+1|0)}return n.length=i,n}function KS(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a,o);s!==void 0&&(n[i]=jt(s),i=i+1|0)}return n.length=i,n}function xq(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 OP(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function Sq(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 wq(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return Sq(e.tl,r).tl=t,r}function Eq(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 kq(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 uv(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 cv(e){let t=Eq(e),r=new Array(t);return kq(r,0,e),r}function Cq(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function MP(e){return Cq(e,0)}function Rq(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function LP(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function Aq(e){let t=e.length,r=0;for(let i=0;i<t;++i)r=r+e[i].length|0;let n=new Array(r);r=0;for(let i=0;i<t;++i){let o=e[i];for(let a=0,s=o.length;a<s;++a)n[r]=o[a],r=r+1|0}return n}function Tq(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let zP=Tq;function Lc(e){return e!==void 0?e.h:0}function _a(e,t,r,n){let i=Lc(e),o=Lc(n);return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n}}function $q(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function Nq(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function oR(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 Lc(l)>=Lc(u)?_a(l,e.k,e.v,_a(u,t,r,n)):_a(_a(l,e.k,e.v,u.l),u.k,u.v,_a(u.r,t,r,n))}if(o<=(i+2|0))return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n};let a=n.l,s=n.r;return Lc(s)>=Lc(a)?_a(_a(e,t,r,a),n.k,n.v,s):_a(_a(e,t,r,a.l),a.k,a.v,_a(a.r,n.k,n.v,s))}function Dq(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Jt(r.v);e=t<n?r.l:r.r}}function I1(e,t,r){if(e===void 0)return $q(t,r);let n=e.k;if(t===n)return Nq(e,r);let i=e.v;return t<n?oR(I1(e.l,t,r),n,i,e.r):oR(e.l,n,i,I1(e.r,t,r))}let UP=Dq;function BP(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=uv(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 P1={parsers:0,children:void 0,capture:void 0,wildcard:!1};function Fq(e,t){let r=e,n=t;for(;;){let i=n,o=r,a=o.parsers,s=0;if(a!==0)s=1;else{if(i===0)return 0;s=1}if(s===1){let l=o.capture,u=0;if(i===0)return a;if(i.hd===""){if(i.tl===0)return a;u=2}else u=2;if(u===2){if(o.wildcard)return a;let d=i.tl,f=UP(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 Iq(e,t,r){let n=(i,o)=>{if(i===0)return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:o.wildcard};let a=o.capture,s=o.children,l=i.tl,u=i.hd;if(typeof u!="object"){if(u!=="Capture")return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:!0};let f=n(l,a!==void 0?a:P1);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=u._0,f=UP(s,d),p=n(l,f!==void 0?f:P1);return{parsers:o.parsers,children:I1(s,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function Pq(e){return{prefix:0,matched:BP(e)}}function Oq(e){return cv({hd:"",tl:e.matched}).join("/")}function Mq(e){return cv({hd:"",tl:e.prefix}).join("/")}function Lq(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function Yg(e,t){return{TAG:"Match",_0:e,_1:t}}function O1(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:O1(e._1)}:{hd:"Capture",tl:O1(e._1)}}function zq(e,t){let r=i=>e("/"+cv(i).join("/")),n=(i,o)=>{for(;;){let a=o,s=i;if(typeof a!="object")return a==="End"?s(0):d=>s(wq(d.matched,0));if(a.TAG==="Match"){let d=a._0;o=a._1,i=f=>s({hd:d,tl:f});continue}let l=a._1,u=a._0.to_;return d=>n(f=>s({hd:u(d),tl:f}),l)}};return n(r,t)}function Uq(e){return zq(t=>t,e)}function Bq(e,t,r){let n=e,i=t,o=0,a=r;for(;;){let s=a,l=o,u=i,d=n;if(typeof d!="object")return d==="End"?s!==0?s.hd===""&&s.tl===0?{TAG:"MatchWithTrailingSlash",_0:u}:"NoMatch":{TAG:"FullMatch",_0:u}:{TAG:"FullMatch",_0:u({prefix:MP(l),matched:s})};if(d.TAG==="Match"){if(s===0)return"NoMatch";let p=s.hd;if(d._0!==p)return"NoMatch";a=s.tl,o={hd:p,tl:l},n=d._1;continue}if(s===0)return"NoMatch";let f=s.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";a=s.tl,o={hd:f,tl:l},i=u(jt(h)),n=d._1}}function jq(e){let t=MP(e);return LP(t,P1,(r,n)=>{let i=O1(n._0);return Iq(i,n,r)})}function qq(e,t){let r=BP(t),i=Fq(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let a=o.hd,s=a._2,l=Bq(a._0,a._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:s(l._0)}:{TAG:"MatchWithTrailingSlash",_0:s(l._0)};i=o.tl}}function Vq(e,t){let r=qq(e,t);if(typeof r=="object")return Jt(r._0)}function jP(e){return e("End")}let qP={prefix:Mq,wildcard_match:Oq,of_parts:Pq},Gq="Wildcard",ls=Uq,Tc=Lq;function Cu(){return{}}let VP=or({});function Kq(e,t){return e+("."+t)}function Hq(e,t,r,n){return e[Kq(t,r)]=ls(n),e}function M1(e,t){return Object.assign(Object.assign({},e),t)}function hp(){return Et(VP)}let Wq=VP.Provider;function Jq(e){return _r(Wq,{value:e.registry,children:e.children})}let Qq={make:Jq},GP={contents:{}};function Yq(e){GP.contents=e}function Xq(e){return e.startsWith("/")?e.slice(1):e}function Zq(e){let t=Xq(e);return q(tt(Object.entries(GP.contents),void 0,(r,n)=>{let i=n[0];if(!t.startsWith(i+"/"))return r;let o=n[1];return r!==void 0&&r[0].length>=i.length?r:[i,o]}),r=>r[1])}function Ru(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=Zq(e);if(t===void 0)return e;let r=e.startsWith("/")?e:"/"+e;return(t.endsWith("/")?t.slice(0,t.length-1|0):t)+r}let eV=((e,t)=>{for(var r in e)t(e[r],r)});function tV(e){if(typeof e=="boolean")return e}function rV(e){if(e===null)return null}function nV(e){if(typeof e=="string")return e}function iV(e){if(typeof e=="number")return e}function oV(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function aV(e){if(Array.isArray(e))return e}let he={bool:tV,$$null:rV,string:nV,float:iV,object:oV,array:aV};function F(e,t){if(t in e)return Jt(e[t])}function $e(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 pp(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 Oe(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}let sV=/[^aeiou]y$/i;function lV(e){return sV.test(e)?e.slice(0,e.length-1|0)+"ies":e.endsWith("s")||e.endsWith("x")||e.endsWith("z")||e.endsWith("ch")||e.endsWith("sh")?e+"es":e+"s"}function xo(e){return e.endsWith("ies")?e.slice(0,e.length-3|0)+"y":e.endsWith("ses")||e.endsWith("xes")||e.endsWith("zes")||e.endsWith("ches")||e.endsWith("shes")?e.slice(0,e.length-2|0):e.endsWith("s")?e.slice(0,e.length-1|0):e}function mp(e){return lV(xo(e))}let uV=[["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"]],cV=Oe(uV);function a_(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function s_(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function dV(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 fV(e){let t=e.length,r=[],n={contents:""},i=()=>{if(n.contents.length>0){r.push(n.contents),n.contents="";return}};for(let o=0;o<t;++o){let a=e.charAt(o);if(a==="_"||a==="-"||a===" ")i();else if(a_(a)){let s=o>0&&s_(e.charAt(o-1|0)),l=(o+1|0)<t&&s_(e.charAt(o+1|0)),u=o>0&&a_(e.charAt(o-1|0));(s||u&&l)&&i(),n.contents=n.contents+a}else if(dV(a)){let s=!1;if(o>0){let l=e.charAt(o-1|0);s=a_(l)||s_(l)}s&&i(),n.contents=n.contents+a}else n.contents=n.contents+a}return i(),r}function hV(e){let t=e.toLowerCase(),r=F(cV,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function ct(e){let t=fV(e);return t.length!==0?t.map(hV).join(" "):e}let pV=xo;function We(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 ie(e){if(typeof e=="string")return e}function Ii(e){if(typeof e=="number")return e}function G(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function _t(e){if(Array.isArray(e))return e}function dv(e){if(typeof e=="boolean")return e}let aR=(function(e,t){for(var r in e)t(r)});function Re(e,t){if(e===t)return!0;let r=typeof e;if(r==="string"||r==="number"||r==="bigint"||r==="boolean"||r==="undefined"||e===null)return!1;let n=typeof t;if(r==="function"||n==="function")throw{RE_EXN_ID:"Invalid_argument",_1:"equal: functional value",Error:new Error};if(n==="number"||n==="bigint"||n==="undefined"||t===null)return!1;let i=e.TAG,o=t.TAG;if(i!==o)return!1;let a=e.length|0,s=t.length|0;if(a===s)if(Array.isArray(e)){let l=0;for(;;){let u=l;if(u===a)return!0;if(!Re(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)||!Re(t[f],e[f])){l.contents=!1;return}};return aR(e,u),l.contents&&aR(t,d),l.contents}}else return!1}function Ma(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!Re(e,t)}let KP="x-reventless-union";function mV(e){let t=F(e,KP),r;if(t!==void 0){let n=ie(t);r=n!==void 0?n:k(k(G(t),i=>F(i,"name")),ie)}else r=void 0;return k(r,n=>{if(n!=="")return n})}function gV(e){return Re(k(k(G(e),t=>F(t,"type")),ie),"null")}function vV(e){return k(k(k(G(e),t=>F(t,"properties")),G),t=>q(k(k(k(F(t,"TAG"),G),r=>F(r,"const")),ie),r=>({tag:r,properties:Oe($e(t).filter(n=>n[0]!=="TAG"))})))}function Ul(e){return k(G(e),t=>tt(["oneOf","anyOf"],void 0,(r,n)=>r!==void 0?r:k(k(F(t,n),_t),i=>{let o=i.filter(l=>!gV(l)),a=o.length;if(a===1)return Ul(o[0]);if(a===0)return;let s=Q(o,vV);if(s.length===o.length)return{name:mV(t),arms:s}})))}function HP(e,t){return q(e.name,r=>r+t.tag)}function HS(e,t){let r=e.arms.find(i=>i.tag===t?!0:Re(HP(e,i),t));if(r!==void 0)return r;let n=e.arms.filter(i=>t.endsWith(i.tag));if(n.length===1)return n[0]}function WP(e){return Oe([["type","object"],["properties",e.properties]])}function yn(e){let t=G(e);if(t===void 0)return e;let r=F(t,"type"),n=F(t,"properties");return r!==void 0||n!==void 0||ke(Ul(e))?e:D(q(tt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:k(k(F(t,o),_t),a=>a.find(s=>Ma(k(k(G(s),l=>F(l,"type")),ie),"null")))),yn),e)}function JP(e){return k(G(yn(e)),t=>{if(k(F(t,"type"),ie)==="array")return q(F(t,"items"),yn)})}function bV(e,t){return t.startsWith(e)}function _V(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let fn={initial:"initial",inherit_:"inherit_",unset:"unset",toString:_V};function yV(e){return{NAME:"var",VAL:e}}function xV(e,t){return{NAME:"varDefault",VAL:[e,t]}}function sR(e){return bV("--",e)?e:"--"+e}function fv(e){if(e.NAME==="var")return"var("+sR(e.VAL)+")";let t=e.VAL;return"var("+sR(t[0])+","+t[1]+")"}function SV(e){return{NAME:"s",VAL:e}}function wV(e){return{NAME:"ms",VAL:e}}function EV(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let kV={s:SV,ms:wV,toString:EV};function WS(e){return e.VAL.toString()+"%"}function CV(e){return{NAME:"ch",VAL:e}}function RV(e){return{NAME:"em",VAL:e}}function AV(e){return{NAME:"ex",VAL:e}}function TV(e){return{NAME:"rem",VAL:e}}function $V(e){return{NAME:"vh",VAL:e}}function NV(e){return{NAME:"vw",VAL:e}}function DV(e){return{NAME:"vmin",VAL:e}}function FV(e){return{NAME:"vmax",VAL:e}}function IV(e){return{NAME:"px",VAL:e}}function PV(e){return{NAME:"pxFloat",VAL:e}}function OV(e){return{NAME:"cm",VAL:e}}function MV(e){return{NAME:"mm",VAL:e}}function LV(e){return{NAME:"inch",VAL:e}}function zV(e){return{NAME:"pc",VAL:e}}function UV(e){return{NAME:"pt",VAL:e}}function L1(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 QP={ch:CV,em:RV,ex:AV,rem:TV,vh:$V,vw:NV,vmin:DV,vmax:FV,px:IV,pxFloat:PV,cm:OV,mm:MV,inch:LV,pc:zV,pt:UV,zero:"zero",toString:L1};function BV(e,t){return{NAME:"min",VAL:[e,t]}}function jV(e,t){return{NAME:"max",VAL:[e,t]}}function qo(e){if(typeof e!="object")return L1(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+qo(n[0])+" - "+qo(n[1])+")"}if(t==="percent")return WS(e);if(t==="add"){let n=e.VAL;return"calc("+qo(n[0])+" + "+qo(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+qo(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+qo(n[0])+", "+qo(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+qo(n[0])+", "+qo(n[1])+")"}if(t!=="mul")return L1(e);let r=e.VAL;return"calc("+qo(r[0])+" * "+r[1].toString()+")"}let on={min:BV,max:jV,toString:qo};function qV(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 VV(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let GV={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:VV};function KV(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let YP={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:KV};function HV(e){return"auto"}let WV={auto:"auto",toString:HV};function JV(e,t){return{NAME:"steps",VAL:[e,t]}}function QV(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function YV(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 XV(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 ZV={toString:XV};function eG(e){return typeof e=="object"?e.VAL.toString():"infinite"}let tG={toString:eG};function rG(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 nG={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:rG};function iG(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function oG(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function aG(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function sG(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function lG(e){return{NAME:"hex",VAL:e}}function lR(e){let t=e.NAME;return t==="var"||t==="varDefault"?fv(e):qV(e)}function uR(e){let t=e.NAME;return t==="percent"?WS(e):t==="num"?e.VAL.toString():fv(e)}function fm(e){return e.NAME==="percent"?WS(e):fv(e)}function hm(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()+", "+uR(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+lR(n[0])+", "+fm(n[1])+", "+fm(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("+lR(r[0])+", "+fm(r[1])+", "+fm(r[2])+", "+uR(r[3])+")"}function uG(e){if(typeof e!="object"||e.NAME!=="lightDark")return hm(e);let t=e.VAL;return"light-dark("+hm(t[0])+", "+hm(t[1])+")"}function cG(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 dG={toString:cG};function fG(e){return typeof e=="object"?e.VAL.toString():"normal"}let cR={toString:fG};function hG(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let pG={toString:hG};function mG(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let gG={toString:mG};function vG(e){return"list-item"}let bG={toString:vG};function _G(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 yG={toString:_G};function xG(e){return e==="contents"?"contents":"none"}let SG={toString:xG};function wG(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let EG={toString:wG};function kG(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 JS={toString:kG};function CG(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let XP={toString:CG};function RG(e){return"normal"}let AG={toString:RG};function TG(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let $G={toString:TG};function NG(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let DG={toString:NG};function FG(e){return e==="normal"?"normal":"stretch"}let IG={toString:FG};function PG(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let OG={toString:PG};function MG(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let LG={toString:MG};function zG(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let UG={toString:zG};function BG(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let jG={toString:BG};function qG(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let QS={toString:qG};function VG(e){return"none"}let hv={toString:VG};function GG(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let YS={toString:GG},an={$$var:yV,varDefault:xV,toString:fv},KG={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:JV,cubicBezier:QV,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:YV},z1={rgb:iG,rgba:oG,hsl:aG,hsla:sG,hex:lG,transparent:"transparent",currentColor:"currentColor",toString:uG},HG=hv,WG=hv,JG=hv,QG=hv,YG=z1.transparent;function XG(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]=du(t._1);break;case"PseudoClass":e[":"+t._0]=du(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=du(t._2);break}return e}function du(e){return zP(e,{},XG)}function ZG(e){let t=p=>e.injectRaw(p),r=(p,m)=>e.renderRaw(p,m),n=(p,m)=>e.injectRules(p,du(m)),i=(p,m,g)=>e.renderRules(p,m,du(g)),o=p=>e.make(du(p)),a=p=>e.mergeStyles(p),s=(p,m)=>e.mergeStyles([p,m]),l=(p,m,g)=>e.mergeStyles([p,m,g]),u=(p,m,g,v)=>e.mergeStyles([p,m,g,v]),d=p=>zP(p,{},(m,g)=>(m[g[0].toString()+"%"]=du(g[1]),m));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:a,merge2:s,merge3:l,merge4:u,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,m)=>e.renderKeyframes(p,d(m))}}function pv(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?an.toString(e):on.toString(e)}function eK(e){if(typeof e!="object")return z1.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?an.toString(e):z1.toString(e)}function tK(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?XP.toString(e):e==="normal"||e==="stretch"?IG.toString(e):JS.toString(e)}}function rK(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?an.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?JS.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?XP.toString(e):OG.toString(e)}}function nK(e){return{TAG:"D",_0:"animationDuration",_1:kV.toString(e)}}function iK(e){return{TAG:"D",_0:"animationIterationCount",_1:tG.toString(e)}}function oK(e){return{TAG:"D",_0:"animationTimingFunction",_1:KG.toString(e)}}function aK(e){return{TAG:"D",_0:"bottom",_1:pv(e)}}function sK(e){return{TAG:"D",_0:"cursor",_1:nG.toString(e)}}function lK(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?an.toString(e):e==="table"||e==="grid"||e==="flex"?gG.toString(e):e==="contents"||e==="none"?SG.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?EG.toString(e):e==="block"||e==="inline"||e==="runIn"?pG.toString(e):e==="listItem"?bG.toString(e):yG.toString(e)}}function uK(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):UG.toString(e)}}function cK(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function dK(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function fK(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?an.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?LG.toString(e):fn.toString(e)}}function hK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):on.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):YS.toString(e);return{TAG:"D",_0:"height",_1:t}}function pK(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?an.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?$G.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="normal"?AG.toString(e):JS.toString(e)}}function mK(e){return{TAG:"D",_0:"left",_1:pv(e)}}function gK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):r==="abs"?cR.toString(e):on.toString(e)}else t=e==="zero"?on.toString(e):e==="normal"?cR.toString(e):fn.toString(e);return{TAG:"D",_0:"lineHeight",_1:t}}function vK(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):ZV.toString(e)}}function Au(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):WV.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?an.toString(e):on.toString(e)}function bK(e){return{TAG:"D",_0:"margin",_1:Au(e)}}function _K(e,t){return{TAG:"D",_0:"margin",_1:Au(e)+(" "+Au(t))}}function yK(e){return{TAG:"D",_0:"marginLeft",_1:Au(e)}}function xK(e){return{TAG:"D",_0:"marginRight",_1:Au(e)}}function SK(e){return{TAG:"D",_0:"marginTop",_1:Au(e)}}function wK(e){return{TAG:"D",_0:"marginBottom",_1:Au(e)}}function EK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):on.toString(e)}else t=e==="none"?JG.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):YS.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function kK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):on.toString(e)}else t=e==="none"?HG.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):QS.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function CK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):on.toString(e)}else t=e==="none"?QG.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):YS.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function RK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):on.toString(e)}else t=e==="none"?WG.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):QS.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function AK(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function TK(e){return{TAG:"D",_0:"overflow",_1:YP.toString(e)}}function $K(e){return{TAG:"D",_0:"overflowY",_1:YP.toString(e)}}function NK(e){return{TAG:"D",_0:"padding",_1:on.toString(e)}}function DK(e,t){return{TAG:"D",_0:"padding",_1:on.toString(e)+(" "+on.toString(t))}}function FK(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):GV.toString(e)}}function IK(e){return{TAG:"D",_0:"right",_1:pv(e)}}function PK(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):DG.toString(e)}}function OK(e){return{TAG:"D",_0:"top",_1:pv(e)}}function MK(e,t){return{TAG:"D",_0:e,_1:t}}function LK(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):jG.toString(e)}}function zK(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?an.toString(e):on.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):e==="zero"?on.toString(e):QS.toString(e);return{TAG:"D",_0:"width",_1:t}}function UK(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function BK(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function jK(e,t){return{TAG:"S",_0:e,_1:t}}function qK(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function VK(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function GK(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function KK(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function HK(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function WK(e){return{TAG:"S",_0:"::placeholder",_1:e}}let JK=QP.px;function QK(e){return typeof e=="object"?an.toString(e):e==="unset"||e==="inherit_"||e==="initial"?fn.toString(e):dG.toString(e)}function YK(e,t,r){return{TAG:"D",_0:"border",_1:QP.toString(e)+" "+QK(t)+" "+eK(r)}}function XK(e){return{TAG:"D",_0:"animationName",_1:e}}function ZK(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 eH(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 tH=(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(eH(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ZK(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})(),ei="-ms-",Xg="-moz-",Kt="-webkit-",ZP="comm",XS="rule",ZS="decl",rH="@import",eO="@keyframes",nH="@layer",iH=Math.abs,mv=String.fromCharCode,oH=Object.assign;function aH(e,t){return Kn(e,0)^45?(((t<<2^Kn(e,0))<<2^Kn(e,1))<<2^Kn(e,2))<<2^Kn(e,3):0}function tO(e){return e.trim()}function sH(e,t){return(e=t.exec(e))?e[0]:e}function Ht(e,t,r){return e.replace(t,r)}function U1(e,t){return e.indexOf(t)}function Kn(e,t){return e.charCodeAt(t)|0}function yh(e,t,r){return e.slice(t,r)}function Ea(e){return e.length}function ew(e){return e.length}function pm(e,t){return t.push(e),e}function lH(e,t){return e.map(t).join("")}var gv=1,fd=1,rO=0,Pi=0,cn=0,Fd="";function vv(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:gv,column:fd,length:a,return:""}}function gf(e,t){return oH(vv("",null,null,"",null,null,0),e,{length:-e.length},t)}function uH(){return cn}function cH(){return cn=Pi>0?Kn(Fd,--Pi):0,fd--,cn===10&&(fd=1,gv--),cn}function Xi(){return cn=Pi<rO?Kn(Fd,Pi++):0,fd++,cn===10&&(fd=1,gv++),cn}function Ia(){return Kn(Fd,Pi)}function xg(){return Pi}function gp(e,t){return yh(Fd,e,t)}function xh(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 nO(e){return gv=fd=1,rO=Ea(Fd=e),Pi=0,[]}function iO(e){return Fd="",e}function Sg(e){return tO(gp(Pi-1,B1(e===91?e+2:e===40?e+1:e)))}function dH(e){for(;(cn=Ia())&&cn<33;)Xi();return xh(e)>2||xh(cn)>3?"":" "}function fH(e,t){for(;--t&&Xi()&&!(cn<48||cn>102||cn>57&&cn<65||cn>70&&cn<97););return gp(e,xg()+(t<6&&Ia()==32&&Xi()==32))}function B1(e){for(;Xi();)switch(cn){case e:return Pi;case 34:case 39:e!==34&&e!==39&&B1(cn);break;case 40:e===41&&B1(e);break;case 92:Xi();break}return Pi}function hH(e,t){for(;Xi()&&e+cn!==57;)if(e+cn===84&&Ia()===47)break;return"/*"+gp(t,Pi-1)+"*"+mv(e===47?e:Xi())}function pH(e){for(;!xh(Ia());)Xi();return gp(e,Pi)}function mH(e){return iO(wg("",null,null,null,[""],e=nO(e),0,[0],e))}function wg(e,t,r,n,i,o,a,s,l){for(var u=0,d=0,f=a,h=0,p=0,m=0,g=1,v=1,b=1,_=0,S="",E=i,C=o,A=n,T=S;v;)switch(m=_,_=Xi()){case 40:if(m!=108&&Kn(T,f-1)==58){U1(T+=Ht(Sg(_),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:T+=Sg(_);break;case 9:case 10:case 13:case 32:T+=dH(m);break;case 92:T+=fH(xg()-1,7);continue;case 47:switch(Ia()){case 42:case 47:pm(gH(hH(Xi(),xg()),t,r),l);break;default:T+="/"}break;case 123*g:s[u++]=Ea(T)*b;case 125*g:case 59:case 0:switch(_){case 0:case 125:v=0;case 59+d:b==-1&&(T=Ht(T,/\f/g,"")),p>0&&Ea(T)-f&&pm(p>32?fR(T+";",n,r,f-1):fR(Ht(T," ","")+";",n,r,f-2),l);break;case 59:T+=";";default:if(pm(A=dR(T,t,r,u,d,i,s,S,E=[],C=[],f),o),_===123)if(d===0)wg(T,t,A,A,E,o,f,s,C);else switch(h===99&&Kn(T,3)===110?100:h){case 100:case 108:case 109:case 115:wg(e,A,A,n&&pm(dR(e,A,A,0,0,i,s,S,i,E=[],f),C),i,C,f,s,n?E:C);break;default:wg(T,A,A,A,[""],C,0,s,C)}}u=d=p=0,g=b=1,S=T="",f=a;break;case 58:f=1+Ea(T),p=m;default:if(g<1){if(_==123)--g;else if(_==125&&g++==0&&cH()==125)continue}switch(T+=mv(_),_*g){case 38:b=d>0?1:(T+="\f",-1);break;case 44:s[u++]=(Ea(T)-1)*b,b=1;break;case 64:Ia()===45&&(T+=Sg(Xi())),h=Ia(),d=f=Ea(S=T+=pH(xg())),_++;break;case 45:m===45&&Ea(T)==2&&(g=0)}}return o}function dR(e,t,r,n,i,o,a,s,l,u,d){for(var f=i-1,h=i===0?o:[""],p=ew(h),m=0,g=0,v=0;m<n;++m)for(var b=0,_=yh(e,f+1,f=iH(g=a[m])),S=e;b<p;++b)(S=tO(g>0?h[b]+" "+_:Ht(_,/&\f/g,h[b])))&&(l[v++]=S);return vv(e,t,r,i===0?XS:s,l,u,d)}function gH(e,t,r){return vv(e,t,r,ZP,mv(uH()),yh(e,2,-2),0)}function fR(e,t,r,n){return vv(e,t,r,ZS,yh(e,0,n),yh(e,n+1,-1),n)}function Hc(e,t){for(var r="",n=ew(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function vH(e,t,r,n){switch(e.type){case nH:if(e.children.length)break;case rH:case ZS:return e.return=e.return||e.value;case ZP:return"";case eO:return e.return=e.value+"{"+Hc(e.children,n)+"}";case XS:e.value=e.props.join(",")}return Ea(r=Hc(e.children,n))?e.return=e.value+"{"+r+"}":""}function bH(e){var t=ew(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function _H(e){return function(t){t.root||(t=t.return)&&e(t)}}function yH(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var xH=function(t,r,n){for(var i=0,o=0;i=o,o=Ia(),i===38&&o===12&&(r[n]=1),!xh(o);)Xi();return gp(t,Pi)},SH=function(t,r){var n=-1,i=44;do switch(xh(i)){case 0:i===38&&Ia()===12&&(r[n]=1),t[n]+=xH(Pi-1,r,n);break;case 2:t[n]+=Sg(i);break;case 4:if(i===44){t[++n]=Ia()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=mv(i)}while(i=Xi());return t},wH=function(t,r){return iO(SH(nO(t),r))},hR=new WeakMap,EH=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&&!hR.get(n))&&!i){hR.set(t,!0);for(var o=[],a=wH(r,o),s=n.props,l=0,u=0;l<a.length;l++)for(var d=0;d<s.length;d++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},kH=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function oO(e,t){switch(aH(e,t)){case 5103:return Kt+"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 Kt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Kt+e+Xg+e+ei+e+e;case 6828:case 4268:return Kt+e+ei+e+e;case 6165:return Kt+e+ei+"flex-"+e+e;case 5187:return Kt+e+Ht(e,/(\w+).+(:[^]+)/,Kt+"box-$1$2"+ei+"flex-$1$2")+e;case 5443:return Kt+e+ei+"flex-item-"+Ht(e,/flex-|-self/,"")+e;case 4675:return Kt+e+ei+"flex-line-pack"+Ht(e,/align-content|flex-|-self/,"")+e;case 5548:return Kt+e+ei+Ht(e,"shrink","negative")+e;case 5292:return Kt+e+ei+Ht(e,"basis","preferred-size")+e;case 6060:return Kt+"box-"+Ht(e,"-grow","")+Kt+e+ei+Ht(e,"grow","positive")+e;case 4554:return Kt+Ht(e,/([^-])(transform)/g,"$1"+Kt+"$2")+e;case 6187:return Ht(Ht(Ht(e,/(zoom-|grab)/,Kt+"$1"),/(image-set)/,Kt+"$1"),e,"")+e;case 5495:case 3959:return Ht(e,/(image-set\([^]*)/,Kt+"$1$`$1");case 4968:return Ht(Ht(e,/(.+:)(flex-)?(.*)/,Kt+"box-pack:$3"+ei+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Kt+e+e;case 4095:case 3583:case 4068:case 2532:return Ht(e,/(.+)-inline(.+)/,Kt+"$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(Ea(e)-1-t>6)switch(Kn(e,t+1)){case 109:if(Kn(e,t+4)!==45)break;case 102:return Ht(e,/(.+:)(.+)-([^]+)/,"$1"+Kt+"$2-$3$1"+Xg+(Kn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~U1(e,"stretch")?oO(Ht(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Kn(e,t+1)!==115)break;case 6444:switch(Kn(e,Ea(e)-3-(~U1(e,"!important")&&10))){case 107:return Ht(e,":",":"+Kt)+e;case 101:return Ht(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Kt+(Kn(e,14)===45?"inline-":"")+"box$3$1"+Kt+"$2$3$1"+ei+"$2box$3")+e}break;case 5936:switch(Kn(e,t+11)){case 114:return Kt+e+ei+Ht(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Kt+e+ei+Ht(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Kt+e+ei+Ht(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Kt+e+ei+e+e}return e}var CH=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case ZS:t.return=oO(t.value,t.length);break;case eO:return Hc([gf(t,{value:Ht(t.value,"@","@"+Kt)})],i);case XS:if(t.length)return lH(t.props,function(o){switch(sH(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Hc([gf(t,{props:[Ht(o,/:(read-\w+)/,":"+Xg+"$1")]})],i);case"::placeholder":return Hc([gf(t,{props:[Ht(o,/:(plac\w+)/,":"+Kt+"input-$1")]}),gf(t,{props:[Ht(o,/:(plac\w+)/,":"+Xg+"$1")]}),gf(t,{props:[Ht(o,/:(plac\w+)/,ei+"input-$1")]})],i)}return""})}},RH=[CH],AH=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||RH,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)o[v[b]]=!0;s.push(g)});var l,u=[EH,kH];{var d,f=[vH,_H(function(g){d.insert(g)})],h=bH(u.concat(i,f)),p=function(v){return Hc(mH(v),h)};l=function(v,b,_,S){d=_,p(v?v+"{"+b.styles+"}":b.styles),S&&(m.inserted[b.name]=!0)}}var m={key:r,sheet:new tH({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function TH(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 $H={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},NH=/[A-Z]|^ms/g,DH=/_EMO_([^_]+?)_([^]*?)_EMO_/g,aO=function(t){return t.charCodeAt(1)===45},pR=function(t){return t!=null&&typeof t!="boolean"},l_=yH(function(e){return aO(e)?e:e.replace(NH,"-$&").toLowerCase()}),mR=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(DH,function(n,i,o){return dl={name:i,styles:o,next:dl},i})}return $H[t]!==1&&!aO(t)&&typeof r=="number"&&r!==0?r+"px":r};function Zg(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 dl={name:i.name,styles:i.styles,next:dl},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)dl={name:a.name,styles:a.styles,next:dl},a=a.next;var s=o.styles+";";return s}return FH(e,t,r)}}var l=r;if(t==null)return l;var u=t[l];return u!==void 0?u:l}function FH(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Zg(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":pR(s)&&(n+=l_(o)+":"+mR(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)pR(a[l])&&(n+=l_(o)+":"+mR(o,a[l])+";");else{var u=Zg(e,t,a);switch(o){case"animation":case"animationName":{n+=l_(o)+":"+u+";";break}default:n+=o+"{"+u+"}"}}}return n}var gR=/label:\s*([^\s;{]+)\s*(;|$)/g,dl;function u_(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="";dl=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=Zg(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Zg(r,t,e[s]),n){var l=o;i+=l[s]}gR.lastIndex=0;for(var u="",d;(d=gR.exec(i))!==null;)u+="-"+d[1];var f=TH(i)+u;return{name:f,styles:i,next:dl}}function sO(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var IH=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},PH=function(t,r,n){IH(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 vR(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function bR(e,t,r){var n=[],i=sO(e,n,r);return n.length<2?r:i+t(n)}var OH=function(t){var r=AH(t);r.sheet.speedy=function(s){this.isSpeedy=s},r.compat=!0;var n=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=u_(u,r.registered,void 0);return PH(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=u_(u,r.registered),h="animation-"+f.name;return vR(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=u_(u,r.registered);vR(r,f)},a=function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];return bR(r.registered,n,MH(u))};return{css:n,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(u){r.inserted[u]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:sO.bind(null,r.registered),merge:bR.bind(null,r.registered,n)}},MH=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},bv=OH({key:"css"}),LH=bv.cx,_v=bv.injectGlobal,lO=bv.keyframes,zH=bv.css;function UH(e,t){_v(t)}function BH(e,t){_v(Oe([[e,t]]))}function jH(e,t,r){_v(Oe([[t,r]]))}function qH(e){return lO(e)}function VH(e,t){return lO(t)}let yv=ZG({injectRaw:e=>{_v(e)},renderRaw:UH,injectRules:BH,renderRules:jH,make:e=>zH(e),mergeStyles:e=>LH(e),makeKeyframes:qH,renderKeyframes:VH}),c=MK,ee=tK,uO=rK,tw=aK,Ce=sK,z=lK,_e=uK,Yn=cK,Un=dK,ai=fK,cO=hK,Je=pK,Id=mK,GH=gK,KH=vK,hn=bK,HH=_K,vp=yK,dO=xK,sa=SK,bp=wK,WH=EK,JH=kK,QH=CK,rw=RK,vs=AK,Ds=TK,YH=$K,XH=NK,ZH=DK,Mt=FK,Bl=IK,qa=PK,Fs=OK,fO=LK,la=zK,eW=UK,fr=jK,nw=BK,hO=qK,Is=VK,pO=GK,qe=KK,mO=HK,tW=WK,Ae=JK,rW=YK,nW=XK,iW=nK,oW=iK,aW=oK,sW=YG,lW=yv.global,w=yv.style,Wr=yv.merge,uW=yv.keyframes,x={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"},O={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},$={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"},Z={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},Pn={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function So(e){return"var("+e+")"}let cW=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap",So(O.md)),Yn(1),c("min-height","200px"),qa("center"),c("padding",So(O.xxl))]),dW=w([c("font-size","40px"),c("color",So(x.textDisabled)),c("line-height","1")]),fW=w([c("color",So(x.textPrimary)),c("font-size",So($.sizeLg)),c("font-weight",So($.weightMedium)),hn(Ae(0))]),hW=w([c("color",So(x.textSecondary)),c("font-size",So($.sizeMd)),c("max-width","360px"),hn(Ae(0))]),pW=w([c("background",So(x.brand)),c("color",So(x.textOnBrand)),c("border","none"),c("border-radius",So(Z.md)),c("padding","var("+O.sm+") var("+O.lg+")"),c("font-size",So($.sizeMd)),c("cursor","pointer"),sa(Ae(8))]);function mW(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[y("div",{children:"( )",className:dW}),y("h3",{children:r,className:fW}),ne(e.description,null,n=>y("p",{children:n,className:hW})),ne(e.action,null,n=>{let i=n[1];return y("button",{children:n[0],className:pW,onClick:o=>i()})})],className:cW})}let Pd=mW;function $i(e){return"var("+e+")"}let gW=w([la({NAME:"percent",VAL:100}),c("border-collapse","collapse"),c("font-size",$i($.sizeMd))]),vW=w([c("background",$i(x.surfaceSubtle)),c("border-bottom","2px solid var("+x.border+")")]),_R=w([c("padding","var("+O.xs+") var("+O.sm+")"),c("color",$i(x.textSecondary)),c("font-weight",$i($.weightMedium)),c("font-size",$i($.sizeSm)),c("text-align","left"),c("white-space","nowrap"),c("user-select","none")]),bW=w([c("padding","var("+O.sm+") var("+O.md+")"),c("font-size",$i($.sizeMd))]),_W=w([Ce("pointer"),qe([c("color",$i(x.textPrimary))])]),yW=w([c("color",$i(x.textPrimary))]),xW=w([vp(Ae(4)),c("font-size",$i($.sizeXs)),c("color",$i(x.brand))]),yR=w([c("border-bottom","1px solid var("+x.borderSubtle+")"),qe([c("background",$i(x.surfaceSubtle))])]),SW=w([c("min-height","44px")]),wW=w([Ce("pointer")]),EW=w([c("background",$i(x.surfaceSubtle)),c("box-shadow","inset 3px 0 0 0 var("+x.brand+")")]),xR=w([c("padding","var("+O.xs+") var("+O.sm+")"),c("color",$i(x.textPrimary)),c("vertical-align","middle")]),kW=w([c("padding","var("+O.sm+") var("+O.md+")")]),CW=w([qa("center"),c("padding",$i(O.xxl))]);function RW(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?_R+" "+bW:_R;return y("thead",{children:y("tr",{children:e.columns.map(i=>{let o=ne(r,!1,l=>l.key===i.key),a=ne(r,"Asc",l=>l.direction),s=i.sortable?n+" "+_W+(o?" "+yW:""):n;return L("th",{children:[i.label,o?y("span",{children:a==="Asc"?"^":"v",className:xW}):null],className:s,style:ne(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return re(t,u=>{let d=o&&a==="Asc"?"Desc":"Asc";u(i.key,d)})}},i.key)})}),className:vW})}function AW(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,a=e.columns,s=r!==void 0?r:"Compact",l=s==="Comfortable"?xR+" "+kW:xR,u=s==="Comfortable"?yR+" "+SW:yR;return L("table",{children:[y(RW,{columns:a,sortState:e.sortState,onSort:e.onSort,density:s}),y("tbody",{children:o.length===0?y("tr",{children:y("td",{children:D(e.emptyView,y(Pd,{title:"No data"})),className:l+" "+CW,colSpan:a.length})}):o.map(d=>{let f=i(d),h=ne(n,u,m=>u+" "+wW),p=Re(t,f)?h+" "+EW:h;return y("tr",{children:a.map(m=>y("td",{children:m.render(d),className:l},m.key)),className:p,onClick:m=>re(n,g=>g(d))},f)})})],className:gW})}let Sh=AW;function wh(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function TW(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function $W(e){let t=Q(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 SR(e,t){return e.toString()+" "+t+(e===1?"":"s")}function gO(e,t,r,n){let i=n!==void 0?n:"item",o=D(r,t),a=o===t?SR(o,i):o.toString()+" of "+SR(t,i);if(e===void 0)return"Showing the "+a+" loaded";if(typeof e!="object")return"Showing all "+a;switch(e._0){case"FromStart":return"Showing the first "+a+" — more available";case"Between":return"Showing "+a+" — more before and after";case"ToEnd":return"Showing the last "+a+" — more before"}}function vO(e,t){return t?e+"+":e}function NW(e){return typeof e=="object"}function bO(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let _O=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function DW(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}),No(t.contents,_O.length)}function FW(e){let t=Q(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 c_(e){return"var("+e+")"}let IW=w([z("inlineFlex"),ee("center"),Je("center"),c("border-radius",c_(Z.full)),c("color","#ffffff"),c("font-family",c_($.fontFamily)),c("font-weight",c_($.weightMedium)),c("flex-shrink","0"),c("user-select","none"),c("vertical-align","middle"),c("overflow","hidden")]),PW=w([c("width","100%"),c("height","100%"),c("object-fit","cover")]);function OW(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=de(()=>!1),a=o[1],s=bO(i),l=s.toString()+"px",u=r!==void 0?r!==""&&!o[0]:!1,d={background:u?"transparent":_O[DW(n)],fontSize:((s/2|0)-1|0).toString()+"px",height:l,width:l};return y("span",{children:u?y("img",{className:PW,alt:n,src:D(r,""),onError:f=>a(h=>!0)}):FW(n),"aria-label":n,className:IW,role:"img",style:d,title:n})}let Od=OW;function sl(e){return"var("+e+")"}let MW=w([z("flex"),ai("wrap"),c("gap",sl(O.xs)),ee("center")]),LW=w([z("inlineFlex"),ee("center"),c("padding","2px 8px"),c("border-radius",sl(Z.full)),c("background",sl(x.surfaceElevated)),c("color",sl(x.textSecondary)),c("font-size",sl($.sizeXs)),c("font-weight",sl($.weightMedium)),c("line-height","1.5"),c("white-space","nowrap")]),zW=w([c("color",sl(x.textDisabled)),c("font-size",sl($.sizeSm))]);function UW(e){let t=e.items;return t.length===0?y("span",{children:"—",className:zW}):y("div",{children:t.map((r,n)=>y("span",{children:r,className:LW},n.toString()+":"+r)),className:MW})}let yO=UW;function su(e){return"var("+e+")"}let wR=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("background","transparent"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",su(Z.sm)),c("padding","1px 6px"),c("color",su(x.textSecondary)),c("font-size",su($.sizeXs)),c("line-height","1"),Ce("pointer"),qe([c("background",su(x.surfaceElevated)),c("color",su(x.textPrimary))])]),BW=w([c("color",su(x.success)),c("border-color",su(x.success))]);function jW(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=de(()=>!1),o=i[1],a=i[0],s=u=>{u.stopPropagation(),u.preventDefault(),Ft(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=a?wR+" "+BW:wR;return y("button",{children:a?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:s})}let qW=jW;function e0(e){return"var("+e+")"}let VW=w([z("inlineFlex"),ee("center"),c("gap",e0(O.xs)),c("min-width","0")]),GW=w([c("color",e0(x.brand)),c("text-decoration","none"),c("max-width","260px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),qe([c("text-decoration","underline")])]),KW=w([c("color",e0(x.textPrimary)),c("font-family","var(--rv-font-mono, ui-monospace, monospace)"),c("font-size",e0($.sizeSm)),c("max-width","200px"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]);function HW(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function WW(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,a=Ns();return L("span",{children:[i!==void 0?y("a",{children:n,className:GW,title:n,href:i,onClick:l=>{if(!(l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.button!==0)&&i!==void 0)return l.preventDefault(),l.stopPropagation(),a(i)}}):y("span",{children:HW(n,18),className:KW,title:r}),o?y(qW,{value:r}):null],className:VW})}let JW=WW;function us(e){return"var("+e+")"}let ER=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",us(Z.full)),c("background",us(x.surfaceElevated)),c("color",us(x.textSecondary)),c("font-size",us($.sizeXs)),c("font-weight",us($.weightMedium)),c("line-height","1.5"),c("white-space","nowrap"),c("border","none")]),QW=w([Ce("pointer"),qe([c("background",us(x.surface)),c("color",us(x.textPrimary))])]),YW=w([c("font-weight",us($.weightBold)),c("color",us(x.textPrimary))]);function XW(e){let t=e.onClick,r=ne(t,ER,i=>ER+" "+QW),n=L(cr,{children:[y("span",{children:e.count.toString(),className:YW})," "+e.label,ne(t,null,i=>y("span",{children:" ▸","aria-hidden":!0}))]});return t!==void 0?y("button",{children:n,className:r,type:"button",onClick:i=>t()}):y("span",{children:n,className:r})}let Zf=XW;function vf(e){let t=e.toString();return t.length<2?"0"+t:t}function xv(e){let t=new Date(e),r=t.getTime();if(Number.isNaN(r))return e;let n=t.getFullYear()|0,i=(t.getMonth()|0)+1|0,o=t.getDate()|0,a=t.getHours()|0,s=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+vf(i)+"-"+vf(o)+" "+vf(a)+":"+vf(s)+":"+vf(l)}let ZW=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function Eh(e){if(ZW.test(e))return xv(e)}function eJ(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function xO(e,t){if(!ne(e,!1,eJ))return Eh(t)}function d_(e){return"var("+e+")"}function tJ(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[x.success,x.background];case"Warning":return[x.warning,x.background];case"Error":return[x.error,x.background];case"Info":return[x.info,x.background];case"Neutral":return[x.surfaceElevated,x.textSecondary]}}function rJ(e,t){return w([z("inlineFlex"),ee("center"),c("gap","4px"),c("padding","2px 8px"),c("border-radius",d_(Z.full)),c("font-size",d_($.sizeXs)),c("font-weight",d_($.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 nJ(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=tJ(n);return L("span",{children:[i?y("span",{style:{background:"currentColor",display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}):null,e.label],className:rJ(o[0],o[1])})}let Xo=nJ;function iJ(e){return q(e.plugin,t=>t+"."+e.store)}let SO={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,retired:void 0};function Ri(e,t){let r=q(F(e,t),We);return r==="JSONTrue"&&typeof r!="object"}function bf(e,t){return k(F(e,t),ie)}function oJ(e){return k(k(F(e,"x-reventless-semantic-target"),G),t=>q(k(F(t,"store"),ie),r=>({plugin:k(F(t,"plugin"),ie),store:r})))}function aJ(e){return k(k(F(e,"x-reventless-setter"),G),t=>q(k(F(t,"command"),ie),r=>({command:r,field:k(F(t,"field"),ie)})))}function sJ(e){return q(k(F(e,"x-reventless-retired"),G),t=>{let r=k(F(t,"values"),_t);return{label:gi(k(F(t,"label"),ie),n=>n.trim()!==""),showWhenFalse:Ri(t,"showWhenFalse"),values:r!==void 0?Q(r,n=>gi(ie(n),i=>i.trim()!=="")):q(gi(k(F(t,"value"),ie),n=>n.trim()!==""),n=>[n]),namedWhenRetired:Ri(t,"namedWhenRetired")}})}function lJ(e){let t=q(F(e,"x-reventless-index"),We);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function wO(e){let t=G(e);if(t===void 0)return;let r=G(yn(e));if(r===void 0||r===t)return t;let n=Oe($e(r));return $e(t).forEach(i=>{n[i[0]]=i[1]}),n}function Do(e){let t=wO(e);return t!==void 0?{isId:Ri(t,"x-reventless-id"),isCompositeId:Ri(t,"x-reventless-compositeId"),isSubId:Ri(t,"x-reventless-subId"),isCompositeSubId:Ri(t,"x-reventless-compositeSubId"),index:lJ(t),hidden:Ri(t,"x-reventless-hidden")||Ri(t,"x-reventless-ui-hidden"),summary:Ri(t,"x-reventless-summary"),groupBy:Ri(t,"x-reventless-group-by"),drillTarget:q(bf(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:bf(t,"x-reventless-drillTargetKey")})),collapsed:Ri(t,"x-reventless-collapsed"),scan:Ri(t,"x-reventless-scan"),scanSort:Ri(t,"x-reventless-scanSort"),semantic:bf(t,"x-reventless-semantic"),semanticFromType:Re(bf(t,"x-reventless-semantic-source"),"type"),storeTarget:oJ(t),channel:bf(t,"x-reventless-channel"),setter:aJ(t),retired:sJ(t)}:SO}function uJ(e){return ne(wO(e),!1,t=>Ri(t,"x-reventless-hidden"))}function _p(e,t){return D(q(k(k(G(e),r=>F(r,"properties")),G),r=>Q($e(r),n=>{if(t(Do(n[1])))return n[0]})),[])}function cJ(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Q($e(t),r=>{let n=r[0];return k(k(k(G(r[1]),i=>F(i,"x-reventless-metric")),G),i=>{let o=k(F(i,"aggregate"),ie),a=k(F(i,"label"),ie);return q(o,s=>[n,s,a])})})),[])}function Sv(e){return _p(e,t=>t.summary)}function EO(e){return _p(e,t=>t.isId)[0]}function dJ(e){return _p(e,t=>t.groupBy)[0]}function yp(e){return k(k(k(G(e),t=>F(t,"properties")),G),t=>Q($e(t),r=>{let n=r[0];return q(Do(r[1]).retired,i=>[n,i])})[0])}function fJ(e){return q(yp(e),t=>t[0])}function kO(e){return _p(e,t=>t.isCompositeId)}function iw(e){return _p(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function hJ(e){return k(k(G(e),t=>F(t,"x-reventless-live")),t=>{let r=We(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function pJ(e){return D(hJ(e),!0)}function ow(e){return k(k(G(e),t=>F(t,"x-reventless-viewmode")),ie)}function mJ(e){return k(k(G(e),t=>F(t,"x-reventless-layout")),ie)}function gJ(e){let t=G(e),r=n=>D(k(k(k(k(k(k(t,i=>F(i,"properties")),G),i=>F(i,n)),G),i=>F(i,"title")),ie),ct(n));return k(k(k(t,n=>F(n,"x-reventless-owner-unscoped")),G),n=>q(k(F(n,"field"),ie),i=>({ownerLabel:r(i),matchedGroups:ne(k(F(n,"as"),_t),[],o=>Q(o,ie))})))}function Wu(e){return k(q(k(k(G(yn(e)),t=>F(t,"enum")),_t),t=>Q(t,ie)),t=>{if(t.length!==0)return t})}function ao(e,t){return D(k(k(k(k(G(e),r=>F(r,"properties")),G),r=>F(r,t)),Wu),[])}function aw(e,t){return q(yp(e),r=>{let n=r[1],i=r[0];return{field:i,label:D(Jn(gi(t,o=>o.trim()!==""),n.label),ct(i)),showWhenFalse:n.showWhenFalse,values:n.values,namedWhenRetired:n.namedWhenRetired}})}function vJ(e,t){return k(t,r=>{let n=e.values,i=We(r);if(n!==void 0)return typeof i!="object"||i.TAG!=="JSONString"?void 0:n.includes(i._0);if(typeof i!="object")switch(i){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function kh(e,t){let r=e.values,n=vJ(e,t);return r!==void 0?n!==void 0&&n?q(k(t,ie),i=>y(Xo,{variant:"Warning",label:i,dot:!1})):void 0:n!==void 0?n?y(Xo,{variant:"Warning",label:e.label,dot:!1}):e.showWhenFalse?y(Xo,{variant:"Neutral",label:"Not "+e.label,dot:!1}):void 0:void 0}let CO="archived",sw="1";function bJ(e){return e.values!==void 0?"Show retired":"Show "+e.label.toLowerCase()}function _J(e,t){return e?ke(t):!1}function yJ(e,t){return e?Re(t,sw):!1}function xJ(e){return[[CO,e?"":sw],["after",""],["before",""]]}let bc={param:CO,on:sw,label:bJ,offered:_J,showing:yJ,toggleParams:xJ};function SJ(e,t){return e>t?e-t|0:0}function $c(e){return"var("+e+")"}let wJ=w([z("inlineFlex"),ee("center"),c("vertical-align","middle")]),kR=w([z("inlineFlex"),c("border-radius",$c(Z.full)),c("box-shadow","0 0 0 2px var("+x.surface+")")]),EJ=w([z("inlineFlex"),ee("center"),Je("center"),c("border-radius",$c(Z.full)),c("background",$c(x.surfaceElevated)),c("color",$c(x.textSecondary)),c("font-family",$c($.fontFamily)),c("font-weight",$c($.weightMedium)),c("flex-shrink","0"),c("user-select","none")]);function kJ(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,a=SJ(n.length,o),s=a>0?n.slice(0,o):n,l=a>0?n.slice(o):[],u=bO(i),d=(-u|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((s.length+1|0)-h|0).toString()});return L("span",{children:[s.map((h,p)=>y("span",{children:y(Od,{name:h.name,src:h.imageUrl,size:i}),className:kR,style:f(p)},p.toString())),a>0?y("span",{children:"+"+a.toString(),className:kR+" "+EJ,style:{fontSize:((u/2|0)-2|0).toString()+"px",height:u.toString()+"px",marginLeft:d.toString()+"px",width:u.toString()+"px",zIndex:(s.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:wJ})}let RO=kJ,AO=or(void 0),CJ=AO.Provider;function RJ(e){return _r(CJ,{value:e.fill,children:e.children})}let TO={make:RJ};function AJ(e){return k(Et(AO),t=>t(e))}function ks(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}function Md(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 TJ=["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"],$O="storageRef",$J="uploadableImage",NJ="uploadableFile";function DJ(e){return e===$O||e===$J?!0:e===NJ}function lw(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-url":return"FileUrl";case"geo-lat":return"GeoLat";case"geo-lng":return"GeoLng";case"geo-point":case"geoPoint":return"GeoPoint";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"file":case"fileRef":case"uploadableFile":return"File";case"image":case"imageRef":case"uploadableImage":return"Image";case"url":return"Url";case"user-ref":return"UserRef";default:return}}function NO(e){switch(e){case"Image":return["Illustrable"];case"Status":return["Stageable"];case"GeoPoint":return["Mappable"];case"ParentRef":return["Hierarchical"];case"Money":return["Measure"];case"DateRange":return["Schedulable"];default:return[]}}function DO(e,t){return k(k(F(e,t),ie),r=>{if(r!=="")return r})}function FO(e,t,r){return k(k(k(k(F(e,t),G),n=>F(n,r)),ie),n=>{if(n!=="")return n})}function Ju(e,t){return e.TAG==="Pair"?DO(t,e.startField):FO(t,e._0,"start")}function uw(e,t){if(e.TAG!=="Pair")return FO(t,e._0,"end");let r=e.endField;if(r!==void 0)return DO(t,r)}function IO(e){return e.TAG==="Pair"?e.endField!==void 0:!0}function CR(e,t){let r=F(e,t);if(r===void 0)return;let n=Ii(r);return n!==void 0?n:k(ie(r),ks)}function RR(e,t,r){return k(k(k(F(e,t),G),n=>F(n,r)),Ii)}function $Ge(e,t){let r;if(e.TAG==="Paired")r=[CR(t,e.latField),CR(t,e.lngField)];else{let o=e._0;r=[RR(t,o,"lat"),RR(t,o,"lng")]}let n=r[1],i=r[0];if(i!==void 0&&n!==void 0)return[i,n]}function cw(e){return k(G(e),t=>{let r=k(k(Jn(F(t,"__typename"),F(t,"TAG")),ie),n=>{if(n!=="")return n});return q(r,n=>[n,Oe($e(t).filter(i=>{let o=i[0];return o!=="__typename"?o!=="TAG":!1}))])})}function Pr(e){return D(q(k(k(G(yn(e)),t=>F(t,"properties")),G),$e),[]).map(t=>[t[0],yn(t[1])])}function Gr(e,t){return k(k(G(yn(e)),r=>F(r,t)),ie)}function FJ(e){return Gr(e,"type")}function Cs(e){let t=Gr(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function xp(e){return Re(Gr(e,"type"),"string")}function wv(e){let t=Gr(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let PO=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function OO(e){return PO.includes(e.toLowerCase())}function t0(e,t){return t.some(r=>e.endsWith(r))}function IJ(e){return t0(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function PJ(e){let t=Gr(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 AR(e){return ne(Wu(e),0,t=>t.length)}function Ch(e,t){return k(k(G(yn(e)),r=>F(r,t)),Ii)}function OJ(e,t){if(!Cs(t))return;let r=Ch(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 MJ=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function LJ(e){let t=Pr(e),r=(n,i)=>t.some(o=>o[0].toLowerCase()===n?i(o[1]):!1);return r("amount",Cs)?r("currency",xp):!1}function zJ(e){let t=Pr(e),r=n=>t.some(i=>{let o=i[1];return i[0].toLowerCase()===n&&Re(Gr(o,"type"),"string")?wv(o):!1});return r("start")?r("end"):!1}function UJ(e){let t=Pr(e);return MJ.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let BJ=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function jJ(e){return BJ.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function qJ(e,t){let r=e.toLowerCase(),n=OJ(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&AR(t)>0?AR(t)<=8?["Status","name:status-enum"]:void 0:Re(Gr(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:Cs(t)&&t0(r,["price","amount","total"])?["Currency","name:currency"]:Re(Gr(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:Re(Gr(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:Re(Gr(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:Re(Gr(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||t0(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:Cs(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:Re(Gr(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:Re(Gr(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:Re(Gr(t,"type"),"string")&&jJ(r)?["ParentRef","name:parent-ref"]:Re(Gr(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:Re(Gr(t,"type"),"string")&&PO.includes(r)?["UserRef","name:user"]:void 0}function dw(e){return["lat","latitude"].includes(e)}function fw(e){return["lng","lon","long","longitude"].includes(e)}function VJ(e){let t=Pr(e),r=t.some(i=>dw(i[0].toLowerCase())?Cs(i[1]):!1),n=t.some(i=>fw(i[0].toLowerCase())?Cs(i[1]):!1);return r?n:!1}function GJ(e){return["createdat","updatedat","deletedat"].includes(e)}let TR={contents:[]};function MO(e,t,r){let n=e+"."+t+"."+r;if(TR.contents.some(o=>o===n))return;TR.contents.push(n);let i=TJ.map(Md).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function hd(e,t){let r=yn(t),n=Do(r),i=n.semanticFromType?"Type":"Annotation",o=ne(n.semantic,!1,DJ),a=k(n.semantic,d=>{if(d===$O)return;let f=lw(d);if(f!==void 0)return{semantic:f,provenance:i};MO("x-reventless-semantic",e,d)});if(a!==void 0)return a;let s=e.toLowerCase(),l=Re(Gr(r,"type"),"object")&&LJ(r)?["Money","shape:money"]:Re(Gr(r,"type"),"object")&&zJ(r)?["DateRange","shape:date-range"]:Re(Gr(r,"type"),"object")&&UJ(r)?["Address","shape:address"]:Re(Gr(r,"type"),"object")&&VJ(r)?["GeoPoint","shape:geo-point"]:dw(s)&&Cs(r)?["GeoLat","name:geo-pair"]:fw(s)&&Cs(r)?["GeoLng","name:geo-pair"]:void 0,u;if(l!==void 0)u=l;else if(Re(Gr(r,"type"),"string")&&IJ(s))u=["FileUrl","name:file-url"];else{let d=PJ(r);u=d!==void 0?d:qJ(e,r)}return Jn(q(u,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function LO(e,t){let r=hd(e,t);return r!==void 0?r:k(JP(t),n=>hd(pV(e),n))}function xn(e,t,r){let n=Pr(e),i={};n.forEach(T=>{let R=T[0],N=k(k(t,I=>F(I,R)),I=>{let M=lw(I);if(M!==void 0)return{semantic:M,provenance:"Hint"};MO("uiHints.fields",R,I)});if(N!==void 0){i[R]=N;return}else return re(hd(R,T[1]),I=>{i[R]=I})});let o=T=>n.map(R=>R[0]).find(R=>ne(F(i,R),!1,N=>N.semantic===T)),a=T=>n.map(R=>R[0]).find(R=>ne(F(i,R),!1,N=>NO(N.semantic).includes(T))),s=k(gi(r,T=>T.field!=="id"),T=>q(n.find(R=>R[0]===T.field?Re(Gr(R[1],"type"),"string"):!1),R=>R[0])),l=ne(r,!1,T=>Re(T.source,"annotation")),u=l?s:void 0,d=n.map(T=>T[0]).find(T=>ne(F(i,T),!1,R=>R.semantic==="Label"?R.provenance==="Hint":!1)),f;if(d!==void 0)f=d;else{let T=0;if(s!==void 0&&l?f=s:T=1,T===1){let R=o("Label");f=R!==void 0?R:s}}if(f!==void 0&&s!==void 0&&f===s){let R={semantic:"Label",provenance:l?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},N=F(i,f);if(N!==void 0){let I=0,M=N.provenance;(typeof M=="object"||M!=="Hint")&&(I=1),I===1&&N.semantic==="Label"&&(i[f]=R)}else i[f]=R}let h=a("Mappable"),p=o("GeoLat"),m=o("GeoLng"),v=h!==void 0?{TAG:"Pointed",_0:h}:p!==void 0&&m!==void 0?{TAG:"Paired",latField:p,lngField:m}:void 0,b=a("Schedulable"),_=Q(n,T=>{let R=T[0];if(ne(F(i,R),!1,N=>N.semantic==="DateTime")||wv(T[1]))return R}),S=_.find(T=>T.toLowerCase().startsWith("start")),E=_.find(T=>T.toLowerCase().startsWith("end")),C=S!==void 0?E!==void 0?{TAG:"Pair",startField:S,endField:E}:{TAG:"Pair",startField:S}:q(_.find(T=>{let R=T.toLowerCase();return GJ(R)?!1:t0(R,["at","date"])?!0:R==="date"}),T=>({TAG:"Pair",startField:T}));return{semantics:i,geo:v,dateSpan:b!==void 0?{TAG:"Ranged",_0:b}:C,statusField:a("Stageable"),labelField:f,projectedLabelField:u,imageField:a("Illustrable"),parentField:a("Hierarchical")}}function KJ(e,t){let n=xn(e,t,void 0).semantics;return Q(Pr(e),i=>{let o=i[0];return k(F(n,o),a=>{if(NO(a.semantic).includes("Measure"))return o})})}let zO=or([]),UO=or(e=>{}),HJ=zO.Provider,WJ=UO.Provider;function JJ(e){let t=e.initial,r=t!==void 0?t:[],n=de(()=>r),i=n[1],o=qr(a=>i(s=>a),[]);return _r(WJ,{value:o,children:_r(HJ,{value:n[0],children:e.children})})}let QJ={make:JJ};function ua(){return Et(zO)}function YJ(){return Et(UO)}function XJ(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function Va(e,t){let r=XJ(t),n=mp(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function ZJ(e,t){return e.find(r=>r.name===t)}function nl(e,t){return jP(r=>Yg(e,Yg(encodeURIComponent(t),r)))}function Nc(e,t){return Yg(e,Yg(encodeURIComponent(t),Gq))}function La(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return ls(Nc(e,t))(qP.of_parts(i.join("/")))}function eQ(e){let r=qP.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=q(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}var lu=(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))(lu||{});const tQ=[0,1],BO=[1,0],jO=[2,3],qO=[3,2],rQ={L:tQ,M:BO,Q:jO,H:qO},nQ=/^\d*$/,iQ=/^[A-Z0-9 $%*+./:-]*$/,f_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",hw=1,pw=40,$R=3,oQ=3,mm=40,aQ=10,VO=[[-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]],GO=[[-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 sQ=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<hw||t>pw)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const o=Array.from({length:this.size}).fill(!1);for(let s=0;s<this.size;s++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),i===-1){let s=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const u=this.getPenaltyScore();u<s&&(i=l,s=u),this.applyMask(l)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}size;mask;modules=[];types=[];getModule(t,r){return t>=0&&t<this.size&&r>=0&&r<this.size&&this.modules[r][t]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,lu.Timing),this.setFunctionModule(n,6,n%2===0,lu.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,Xa(i,o));this.setFunctionModule(8,7,Xa(i,6)),this.setFunctionModule(8,8,Xa(i,7)),this.setFunctionModule(7,8,Xa(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,Xa(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,Xa(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,Xa(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=Xa(r,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,i),this.setFunctionModule(a,o,i)}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){const o=Math.max(Math.abs(i),Math.abs(n)),a=t+i,s=r+n;a>=0&&a<this.size&&s>=0&&s<this.size&&this.setFunctionModule(a,s,o!==2&&o!==4,lu.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,lu.Alignment)}setFunctionModule(t,r,n,i=lu.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==Eg(r,n))throw new RangeError("Invalid argument");const i=GO[n[0]][r],o=VO[n[0]][r],a=Math.floor(j1(r)/8),s=i-a%i,l=Math.floor(a/i),u=[],d=gQ(o);for(let h=0,p=0;h<i;h++){const m=t.slice(p,p+l-o+(h<s?0:1));p+=m.length;const g=vQ(m,d);h<s&&m.push(0),u.push(m.concat(g))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,m)=>{(h!==l-o||m>=s)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(j1(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){const a=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][a]&&r<t.length*8&&(this.modules[l][a]=Xa(t[r>>>3],7-(r&7)),r++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let n=0;n<this.size;n++){let i;switch(t){case 0:i=(n+r)%2===0;break;case 1:i=r%2===0;break;case 2:i=n%3===0;break;case 3:i=(n+r)%3===0;break;case 4:i=(Math.floor(n/3)+Math.floor(r/2))%2===0;break;case 5:i=n*r%2+n*r%3===0;break;case 6:i=(n*r%2+n*r%3)%2===0;break;case 7:i=((n+r)%2+n*r%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[r][n]&&i&&(this.modules[r][n]=!this.modules[r][n])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[o][u]===a?(s++,s===5?t+=$R:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*mm),a=this.modules[o][u],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*mm}for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][o]===a?(s++,s===5?t+=$R:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*mm),a=this.modules[u][o],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*mm}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const s=this.modules[o][a];s===this.modules[o][a+1]&&s===this.modules[o+1][a]&&s===this.modules[o+1][a+1]&&(t+=oQ)}let r=0;for(const o of this.modules)r=o.reduce((a,s)=>a+(s?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*aQ,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 cs(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 Xa(e,t){return(e>>>t&1)!==0}class mw{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 lQ=[1,10,12,14],uQ=[2,9,11,13],cQ=[4,8,16,16];function KO(e,t){return e[Math.floor((t+7)/17)+1]}function HO(e){const t=[];for(const r of e)cs(r,8,t);return new mw(cQ,e.length,t)}function dQ(e){if(!WO(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);cs(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new mw(lQ,e.length,t)}function fQ(e){if(!JO(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=f_.indexOf(e.charAt(r))*45;n+=f_.indexOf(e.charAt(r+1)),cs(n,11,t)}return r<e.length&&cs(f_.indexOf(e.charAt(r)),6,t),new mw(uQ,e.length,t)}function hQ(e){return e===""?[]:WO(e)?[dQ(e)]:JO(e)?[fQ(e)]:[HO(mQ(e))]}function WO(e){return nQ.test(e)}function JO(e){return iQ.test(e)}function pQ(e,t){let r=0;for(const n of e){const i=KO(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function mQ(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 j1(e){if(e<hw||e>pw)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 Eg(e,t){return Math.floor(j1(e)/8)-VO[t[0]][e]*GO[t[0]][e]}function gQ(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]=q1(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=q1(r,2)}return t}function vQ(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,a)=>r[a]^=q1(o,i))}return r}function q1(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 bQ(e,t,r=1,n=40,i=-1,o=!0){if(!(hw<=r&&r<=n&&n<=pw)||i<-1||i>7)throw new RangeError("Invalid value");let a,s;for(a=r;;a++){const f=Eg(a,t)*8,h=pQ(e,a);if(h<=f){s=h;break}if(a>=n)throw new RangeError("Data too long")}for(const f of[BO,jO,qO])o&&s<=Eg(a,f)*8&&(t=f);const l=[];for(const f of e){cs(f.mode[0],4,l),cs(f.numChars,KO(f.mode,a),l);for(const h of f.getData())l.push(h)}const u=Eg(a,t)*8;cs(0,Math.min(4,u-l.length),l),cs(0,(8-l.length%8)%8,l);for(let f=236;l.length<u;f^=253)cs(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 sQ(a,t,d,i)}function _Q(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:a=-1,border:s=1}=t||{},l=typeof e=="string"?hQ(e):Array.isArray(e)?[HO(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=bQ(l,rQ[r],i,o,a,n),d=yQ({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},s);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function yQ(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let a=0;a<t;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},a=>!1)),e.data.push(Array.from({length:n},a=>!1));const i=lu.Border;e.types.forEach(o=>{for(let a=0;a<t;a++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},a=>i)),e.types.push(Array.from({length:n},a=>i));return e}function xQ(e){return"var("+e+")"}let SQ=w([z("inlineBlock"),c("background","#ffffff"),c("padding","6px"),c("border-radius",xQ(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),c("line-height","0")]),wQ=w([c("color","#000000"),c("display","block")]);function EQ(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function kQ(e){if(e.trim()!=="")try{return _Q(e,{ecc:"M",border:4})}catch{return}}function CQ(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=kQ(r);if(i===void 0)return null;let o=i.size.toString();return y("span",{children:y("svg",{children:y("path",{d:EQ(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:wQ,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:SQ})}let RQ=CQ,AQ=["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 NR(e){return e>="0"?e<="9":!1}function TQ(e){let t=[],r=0,n=e.length;for(;r<n;)if(NR(D(e[r],""))){let i=r;for(;r<n&&NR(D(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function $Q(e){let t={};return TQ(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,a=n-o|0;if(a<=0)return;let s=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(a/2|0)|0)+(s?0:1)|0)<n){t[(i+o|0).toString()]=a;return}}),t}function NQ(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=$Q(e),i=[],o=ke(n[0]);i.push(o?105:104);let a=o?"C":"B",s=0;for(;s<t;){let l=n[s.toString()];if(l!==void 0){a!=="C"&&(i.push(99),a="C");for(let u=0,d=l/2|0;u<d;++u){let f=e.substring(s+(u<<1)|0,(s+(u<<1)|0)+2|0);i.push(D(OP(f),0))}s=s+l|0}else a==="C"&&(i.push(100),a="B"),i.push(D(e.codePointAt(s),32)-32|0),s=s+1|0}return i}function DQ(e){return q(NQ(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=>AQ[n]).join("")})}function FQ(e,t,r){let n=r.toString(),i=[],o=0,a=e.length;for(;o<a;)if(Re(e[o],"1")){let s=o;for(;o<a&&Re(e[o],"1");)o=o+1|0;let l=(o-s|0).toString();i.push("M"+(s+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function IQ(e){return"var("+e+")"}let PQ=w([z("inlineBlock"),JH({NAME:"percent",VAL:100}),c("overflow-x","auto"),c("background","#ffffff"),c("padding","6px"),c("border-radius",IQ(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),c("line-height","0")]),OQ=w([c("color","#000000"),c("display","block")]);function MQ(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,a=DQ(n);if(a===void 0)return null;let s=a.length+20|0;return y("span",{children:y("svg",{children:y("path",{d:FQ(a,10,40),fill:"currentColor"}),"aria-label":D(e.title,"Barcode for "+n),className:OQ,role:"img",height:i.toString(),width:(s*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+s.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:PQ})}let LQ=MQ;function no(e){return"var("+e+")"}let zQ=w([Mt("fixed"),Fs(Ae(0)),Id(Ae(0)),Bl(Ae(0)),tw(Ae(0)),c("background","rgba(0,0,0,0.82)"),z("flex"),_e("column"),ee("center"),Je("center"),c("gap",no(O.md)),c("padding",no(O.lg)),c("z-index","1100")]),UQ=w([c("max-width","min(92vw, 1400px)"),c("max-height","78vh"),c("object-fit","contain"),c("border-radius",no(Z.sm)),c("box-shadow",no(Pn.lg))]),BQ=w([z("flex"),ee("center"),c("gap",no(O.md)),c("max-width","100%")]),jQ=w([z("flex"),ee("center"),c("gap",no(O.md)),c("max-width","92vw"),c("color","#f5f5f5"),c("font-size",no($.sizeSm))]),qQ=w([c("font-size",no($.sizeMd)),c("font-weight",no($.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),VQ=w([c("color","#c8c8c8")]),GQ=w([c("font-family",no($.fontFamilyMono)),c("color","#c8c8c8")]),QO=w([z("inlineFlex"),ee("center"),Je("center"),c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",no(Z.md)),c("color","#f5f5f5"),c("padding","4px var("+O.sm+")"),c("font-size",no($.sizeSm)),Ce("pointer"),qe([c("background","rgba(255,255,255,0.22)")])]),DR=Wr([QO,w([c("width","40px"),c("height","40px"),c("border-radius","50%"),c("font-size",no($.sizeLg)),Un(0)])]),KQ=Wr([QO,w([Mt("absolute"),Fs(Ae(16)),Bl(Ae(16)),c("width","32px")])]);function _c(e,t,r){return t===0?0:No(No(e+r|0,t)+t|0,t)}function HQ(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,a=o>1;De(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return a?r(_c(n,o,-1)):void 0;case"ArrowRight":return a?r(_c(n,o,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,o]);let s=i[_c(n,o,0)];if(s===void 0)return null;let l=s.title,u=s.caption;return L("div",{children:[y("button",{children:"✕",className:KQ,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[a?y("button",{children:"‹",className:DR,title:"Previous",type:"button",onClick:d=>r(_c(n,o,-1))}):null,y("img",{className:UQ,alt:D(s.title,""),src:s.src}),a?y("button",{children:"›",className:DR,title:"Next",type:"button",onClick:d=>r(_c(n,o,1))}):null],className:BQ,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?y("span",{children:l,className:qQ,title:l}):null,u!==void 0?y("span",{children:u,className:VQ}):null,a?y("span",{children:(_c(n,o,0)+1|0).toString()+" / "+o.toString(),className:GQ}):null,D(e.action,null)],className:jQ,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:zQ,role:"dialog",onClick:d=>t()})}let YO=HQ;function vi(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function ko(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function XO(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function Ev(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return ko(vi(e),-r|0)}function ZO(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function WQ(e){let t=Ev(ZO(e));return Cl(42,r=>ko(t,r))}function eM(e,t){return vi(e)===vi(t)}function JQ(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function tM(e,t,r){let n=vi(r),i=n+864e5;return e<i?t>=n:!1}function FR(e){let t=e.toString();return t.length<2?"0"+t:t}function rM(e){let t=new Date(e);return FR(t.getHours()|0)+":"+FR(t.getMinutes()|0)}function nM(e){return e===vi(e)}let iM=["January","February","March","April","May","June","July","August","September","October","November","December"];function bo(e){let t=new Date(e),r=t.getMonth()|0;return D(iM[r],"")+" "+t.getFullYear().toString()}let gw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function oM(e){return new Date(e).getDate()|0}function Rs(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(gw[n],"")+" "+(new Date(e).getDate()|0).toString()}function Qn(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let aM=864e5;function fu(e){return"var("+e+")"}function QQ(e){return w([c("width","100%"),c("height",e),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",fu(Z.md)),c("background",fu(x.surfaceSubtle)),Ds("hidden")])}let YQ=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap",fu(O.sm)),c("height","100%"),c("padding",fu(O.lg)),c("color",fu(x.textSecondary)),c("font-size",fu($.sizeSm)),c("text-align","center")]),XQ=w([c("color",fu(x.brand)),c("text-decoration","none"),qe([c("text-decoration","underline")])]);function ZQ(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function eY(e){let t=e.height,r=e.title,n=e.src,i=r!==void 0?r:"Document",o=t!==void 0?t:"70vh";return y("object",{children:L("div",{children:["This browser can't display the document inline.",y("a",{children:"Open "+i,className:XQ,href:n,rel:"noopener noreferrer",target:"_blank"})],className:YQ}),"aria-label":i,className:QQ(o),data:n,type:"application/pdf"})}let tY=eY;function sM(e){return e==="Small"?"13px":"18px"}let lM="★";function rY(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function Tu(e){return"var("+e+")"}function nY(e){return w([z("inlineFlex"),Mt("relative"),c("font-size",sM(e)),c("line-height","1"),c("letter-spacing","1px"),c("white-space","nowrap"),c("vertical-align","-1px")])}let iY=w([c("color",Tu(x.borderSubtle))]);function oY(e){return w([Mt("absolute"),c("top","0"),c("left","0"),c("width",(e*100).toString()+"%"),Ds("hidden"),c("white-space","nowrap"),c("color",Tu(x.warning)),c("pointer-events","none")])}let IR=w([z("inlineFlex"),c("gap","2px"),ee("center")]);function aY(e,t){return w([c("background","none"),c("border","none"),c("padding","0 1px"),c("font-size",sM(t)),c("line-height","1"),Ce("pointer"),c("color",Tu(e?x.warning:x.borderSubtle)),c("transition","color 120ms, transform 120ms"),qe([c("transform","scale(1.15)")]),fr("&:focus-visible",[c("outline","2px solid var("+x.brand+")"),c("outline-offset","1px"),c("border-radius","2px")])])}let PR=w([c("color",Tu(x.textSecondary)),c("font-size",Tu($.sizeSm))]),sY=w([z("inlineFlex"),ee("center"),c("gap","6px")]),lY=w([c("border","1px solid var("+x.error+")"),c("border-radius",Tu(Z.sm)),c("padding","2px 4px")]);function uY(e){return PP(e<=0?0:e,lM).join("")}function cY(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,a=e.max,s=e.value,l=a!==void 0?a:5,u=o!==void 0?o:"Small",d=i!==void 0?i:!1,f=t!==void 0?t:!1,h=l<=0?5:l,p=uY(h),m=D(e.label,(Math.round(s*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[Cl(h,g=>g+1|0).map(g=>{let v=g<=s;return y("button",{children:lM,"aria-label":g.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:aY(v,u),title:g.toString()+" of "+h.toString(),type:"button",onBlur:b=>re(r,_=>_()),onClick:b=>{b.stopPropagation(),n(g===s?0:g)}},g.toString())}),d?y("span",{children:s<=0?"—":s.toString(),className:PR}):null],"aria-label":m,className:f?IR+" "+lY:IR,role:"group"}):L("span",{children:[L("span",{children:[y("span",{children:p,className:iY}),y("span",{children:p,className:oY(rY(s,h))})],"aria-label":m,className:nY(u),role:"img",title:m}),d?y("span",{children:(Math.round(s*10)/10).toString()+" / "+h.toString(),className:PR}):null],className:sY})}let h_=cY;function $u(e){return"var("+e+")"}let dY=w([z("flex"),_e("column"),c("gap","4px")]),fY=w([z("flex"),Je("spaceBetween"),c("font-size",$u($.sizeSm))]),hY=w([c("color",$u(x.textSecondary))]),pY=w([c("color",$u(x.textPrimary)),c("font-weight",$u($.weightMedium))]),mY=w([c("background",$u(x.surfaceSubtle)),c("border-radius",$u(Z.full)),c("height","8px"),Ds("hidden")]);function gY(e,t){return w([c("background",t!==void 0?t:"var("+x.brand+")"),c("border-radius",$u(Z.full)),c("height","100%"),c("width",e.toString()+"%"),c("transition","width 0.3s ease")])}function vY(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,a=o<0?0:o;return L("div",{children:[ke(r)||i?L("div",{children:[ne(r,null,s=>y("span",{children:s,className:hY})),i?y("span",{children:Math.round(a).toString()+"%",className:pY}):null],className:fY}):null,y("div",{children:y("div",{className:gY(a,e.color)}),className:mY})],className:dY})}let uM=vY,kv={};function cM(e){kv[e.id]=e}function dM(e){return F(kv,e)}let fM={};function bY(e){return ne(F(kv,e),fM,t=>t.constraints)}let OR={contents:[]};function _Y(e,t){if(OR.contents.some(n=>n===e))return;OR.contents.push(e);let r=pp(kv).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 hM="#111111";function Ho(e){return"var("+e+")"}let MR=w([z("flex"),_e("column"),c("gap",Ho(O.xs))]);function yY(e){return w([c("background","#ffffff"),c("border",e?"1px solid var("+x.error+")":"1px dashed var("+x.border+")"),c("border-radius",Ho(Z.md)),c("touch-action","none"),c("max-width","100%"),c("width","100%"),c("height","auto"),Ce("crosshair"),c("display","block")])}let xY=w([c("fill","#9ca3af"),c("font-size","13px"),c("pointer-events","none"),c("user-select","none")]),SY=w([c("stroke","#e5e7eb"),c("stroke-width","1")]),LR=w([z("flex"),ee("center"),c("gap",Ho(O.sm)),c("font-size",Ho($.sizeXs)),c("color",Ho(x.textSecondary))]),zR=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Ho(Z.sm)),c("color",Ho(x.textSecondary)),c("font-size",Ho($.sizeXs)),c("padding","2px 8px"),Ce("pointer"),qe([c("border-color",Ho(x.brand)),c("color",Ho(x.brand))])]),wY=w([c("background","#ffffff"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Ho(Z.md)),c("padding","4px"),c("display","inline-block"),c("line-height","0")]),EY=w([c("display","block"),c("max-width","100%"),c("height","auto")]);function Ai(e){return(Math.round(e*10)/10).toString()}function pM(e){return e.map(t=>Ai(t.x)+","+Ai(t.y)).join(" ")}function kY(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let a=o.length===1?o.concat(o):o;return'<polyline points="'+pM(a)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+Ai(t)+" "+Ai(r)+'" width="'+Ai(t)+'" height="'+Ai(r)+'"><g fill="none" stroke="'+hM+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function UR(e){return e.trim().startsWith("<svg")}function mM(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function CY(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function RY(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,a=e.value,s=n!==void 0?n:480,l=r!==void 0?r:160,u=t!==void 0?t:!1,d=Pe(null),f=de(()=>[]),h=f[1],p=f[0],m=de(()=>!1),g=m[1],v=Pe(!1),b=R=>q(ro(d.current),N=>{let I=N.getBoundingClientRect(),M=I.width===0?1:s/I.width,P=I.height===0?1:l/I.height;return{x:(R.clientX-I.left)*M,y:(R.clientY-I.top)*P}}),_=R=>o(kY(R,s,l)),S=R=>{R.preventDefault();let N=b(R);if(N!==void 0)return v.current=!0,re(ro(d.current),I=>{I.setPointerCapture(R.pointerId)}),h(I=>I.concat([[N]]))},E=R=>{if(!v.current)return;let N=b(R);if(N!==void 0)return h(I=>{let M=I[I.length-1|0];if(M===void 0)return I;let P=M[M.length-1|0];return P!==void 0&&!CY(N,P)?I:I.slice(0,I.length-1|0).concat([M.concat([N])])})},C=R=>{if(v.current)return v.current=!1,_(p),re(i,N=>N())},A=()=>{h(R=>[]),g(R=>!0),o("")},T=p.length!==0;return a.trim().startsWith("<svg")&&!T&&!m[0]?L("div",{children:[y("span",{children:y("img",{className:EY,alt:"Signature",src:mM(a)}),className:wY}),y("div",{children:y("button",{children:"Sign again",className:zR,type:"button",onClick:R=>A()}),className:LR})],className:MR}):L("div",{children:[L("svg",{children:[y("line",{className:SY,x1:Ai(s*.06),x2:Ai(s*.94),y1:Ai(l*.78),y2:Ai(l*.78)}),T?null:y("text",{children:"Sign here",className:xY,textAnchor:"middle",x:Ai(s/2),y:Ai(l*.7)}),y("g",{children:p.map((R,N)=>y("polyline",{points:pM(R.length===1?R.concat(R):R)},N.toString())),fill:"none",stroke:hM,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Jt(d),"aria-label":"Signature pad",className:yY(u),role:"img",onPointerDown:S,onPointerMove:E,onPointerUp:C,onPointerCancel:C,viewBox:"0 0 "+Ai(s)+" "+Ai(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[T?y("button",{children:"Clear",className:zR,type:"button",onClick:R=>A()}):null,y("span",{children:"Draw your signature above"})],className:LR})],className:MR})}let AY=RY;function TY(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function wo(e){return"var("+e+")"}let $Y=w([z("flex"),_e("column"),c("gap",wo(O.sm))]),NY=w([z("flex"),c("gap","4px")]),BR=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",wo(Z.sm)),c("color",wo(x.textSecondary)),c("font-size",wo($.sizeXs)),c("padding","2px 8px"),Ce("pointer")]),DY=w([c("background",wo(x.brandSubtle)),c("border-color",wo(x.brand)),c("color",wo(x.textPrimary))]),FY=w([la({NAME:"percent",VAL:100}),c("min-height","220px"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",wo(Z.sm)),c("background","#ffffff")]),IY=w([c("margin","0"),c("font-family",wo($.fontFamilyMono)),c("font-size",wo($.sizeXs)),c("line-height",wo($.lineHeightRelaxed)),c("color",wo(x.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]);function PY(e){let t=e.textAlternative,r=de(()=>!1),n=r[1],i=r[0],o=(l,u,d)=>y("button",{children:l,className:u?BR+" "+DY:BR,type:"button",onClick:d}),a,s=0;return i&&t!==void 0?a=y("pre",{children:t,className:IY}):s=1,s===1&&(a=y("iframe",{className:FY,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:NY}):null,a],className:$Y})}function OY(e,t){return y(PY,{html:e.body,textAlternative:e.textAlternative})}function MY(){cM({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:OY})}const jR={};function LY(e){let t=jR[e];if(t)return t;t=jR[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 pd(e,t){typeof t!="string"&&(t=pd.defaultChars);const r=LY(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,a=n.length;o<a;o+=3){const s=parseInt(n.slice(o+1,o+3),16);if(s<128){i+=r[s];continue}if((s&224)===192&&o+3<a){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const u=s<<6&1984|l&63;u<128?i+="��":i+=String.fromCharCode(u),o+=3;continue}}if((s&240)===224&&o+6<a){const l=parseInt(n.slice(o+4,o+6),16),u=parseInt(n.slice(o+7,o+9),16);if((l&192)===128&&(u&192)===128){const d=s<<12&61440|l<<6&4032|u&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((s&248)===240&&o+9<a){const l=parseInt(n.slice(o+4,o+6),16),u=parseInt(n.slice(o+7,o+9),16),d=parseInt(n.slice(o+10,o+12),16);if((l&192)===128&&(u&192)===128&&(d&192)===128){let f=s<<18&1835008|l<<12&258048|u<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}pd.defaultChars=";/?:@&=+$,#";pd.componentChars="";const qR={};function zY(e){let t=qR[e];if(t)return t;t=qR[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 Sp(e,t,r){typeof t!="string"&&(r=t,t=Sp.defaultChars),typeof r>"u"&&(r=!0);const n=zY(t);let i="";for(let o=0,a=e.length;o<a;o++){const s=e.charCodeAt(o);if(r&&s===37&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(s<128){i+=n[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Sp.defaultChars=";/?:@&=+$,-_.!~*'()#";Sp.componentChars="-_.!~*'()";function vw(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 r0(){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 UY=/^([a-z0-9.+-]+:)/i,BY=/:[0-9]*$/,jY=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,qY=["<",">",'"',"`"," ","\r",`
|
|
3
|
+
`," "],VY=["{","}","|","\\","^","`"].concat(qY),GY=["'"].concat(VY),VR=["%","/","?",";","#"].concat(GY),GR=["/","?","#"],KY=255,KR=/^[+a-z0-9A-Z_-]{0,63}$/,HY=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,HR={javascript:!0,"javascript:":!0},WR={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function bw(e,t){if(e&&e instanceof r0)return e;const r=new r0;return r.parse(e,t),r}r0.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=jY.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let a=UY.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&HR[a])&&(o=o.substr(2),this.slashes=!0)),!HR[a]&&(i||a&&!WR[a])){let u=-1;for(let m=0;m<GR.length;m++)n=o.indexOf(GR[m]),n!==-1&&(u===-1||n<u)&&(u=n);let d,f;u===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",u),f!==-1&&(d=o.slice(0,f),o=o.slice(f+1),this.auth=d),u=-1;for(let m=0;m<VR.length;m++)n=o.indexOf(VR[m]),n!==-1&&(u===-1||n<u)&&(u=n);u===-1&&(u=o.length),o[u-1]===":"&&u--;const h=o.slice(0,u);o=o.slice(u),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let g=0,v=m.length;g<v;g++){const b=m[g];if(b&&!b.match(KR)){let _="";for(let S=0,E=b.length;S<E;S++)b.charCodeAt(S)>127?_+="x":_+=b[S];if(!_.match(KR)){const S=m.slice(0,g),E=m.slice(g+1),C=b.match(HY);C&&(S.push(C[1]),E.unshift(C[2])),E.length&&(o=E.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>KY&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),WR[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};r0.prototype.parseHost=function(e){let t=BY.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 WY=Object.freeze(Object.defineProperty({__proto__:null,decode:pd,encode:Sp,format:vw,parse:bw},Symbol.toStringTag,{value:"Module"})),gM=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,vM=/[\0-\x1F\x7F-\x9F]/,JY=/[\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]/,_w=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,bM=/[\$\+<->\^`\|~\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]/,_M=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,QY=Object.freeze(Object.defineProperty({__proto__:null,Any:gM,Cc:vM,Cf:JY,P:_w,S:bM,Z:_M},Symbol.toStringTag,{value:"Module"})),YY=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))),XY=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var p_;const ZY=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]]),eX=(p_=String.fromCodePoint)!==null&&p_!==void 0?p_: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 tX(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=ZY.get(e))!==null&&t!==void 0?t:e}var $n;(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"})($n||($n={}));const rX=32;var fl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(fl||(fl={}));function V1(e){return e>=$n.ZERO&&e<=$n.NINE}function nX(e){return e>=$n.UPPER_A&&e<=$n.UPPER_F||e>=$n.LOWER_A&&e<=$n.LOWER_F}function iX(e){return e>=$n.UPPER_A&&e<=$n.UPPER_Z||e>=$n.LOWER_A&&e<=$n.LOWER_Z||V1(e)}function oX(e){return e===$n.EQUALS||iX(e)}var Cn;(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"})(Cn||(Cn={}));var ds;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ds||(ds={}));class aX{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=Cn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ds.Strict}startEntity(t){this.decodeMode=t,this.state=Cn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Cn.EntityStart:return t.charCodeAt(r)===$n.NUM?(this.state=Cn.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Cn.NamedEntity,this.stateNamedEntity(t,r));case Cn.NumericStart:return this.stateNumericStart(t,r);case Cn.NumericDecimal:return this.stateNumericDecimal(t,r);case Cn.NumericHex:return this.stateNumericHex(t,r);case Cn.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|rX)===$n.LOWER_X?(this.state=Cn.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Cn.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(V1(i)||nX(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(V1(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===$n.SEMI)this.consumed+=1;else if(this.decodeMode===ds.Strict)return 0;return this.emitCodePoint(tX(this.result),this.consumed),this.errors&&(t!==$n.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&fl.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=sX(n,i,this.treeIndex+Math.max(1,o),a),this.treeIndex<0)return this.result===0||this.decodeMode===ds.Attribute&&(o===0||oX(a))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&fl.VALUE_LENGTH)>>14,o!==0){if(a===$n.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ds.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]&fl.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]&~fl.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case Cn.NamedEntity:return this.result!==0&&(this.decodeMode!==ds.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Cn.NumericDecimal:return this.emitNumericEntity(0,2);case Cn.NumericHex:return this.emitNumericEntity(0,3);case Cn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Cn.EntityStart:return 0}}}function yM(e){let t="";const r=new aX(e,n=>t+=eX(n));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),r.startEntity(o);const u=r.write(i,s+1);if(u<0){a=s+r.end();break}a=s+u,s=u===0?a+1:a}const l=t+i.slice(a);return t="",l}}function sX(e,t,r,n){const i=(t&fl.BRANCH_LENGTH)>>7,o=t&fl.JUMP_TABLE;if(i===0)return o!==0&&n===o?r:-1;if(o){const l=n-o;return l<0||l>=i?-1:e[r+l]-1}let a=r,s=a+i-1;for(;a<=s;){const l=a+s>>>1,u=e[l];if(u<n)a=l+1;else if(u>n)s=l-1;else return e[l+i]}return-1}const xM=yM(YY);yM(XY);function lX(e,t=ds.Legacy){return xM(e,t)}function uX(e){return xM(e,ds.Strict)}function cX(e){return Object.prototype.toString.call(e)}function yw(e){return cX(e)==="[object String]"}const dX=Object.prototype.hasOwnProperty;function fX(e,t){return dX.call(e,t)}function Cv(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 SM(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function xw(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 Rh(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 wM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,hX=/&([a-z#][a-z0-9]{1,31});/gi,pX=new RegExp(wM.source+"|"+hX.source,"gi"),mX=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function gX(e,t){if(t.charCodeAt(0)===35&&mX.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return xw(n)?Rh(n):e}const r=lX(e);return r!==e?r:e}function vX(e){return e.indexOf("\\")<0?e:e.replace(wM,"$1")}function md(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(pX,function(t,r,n){return r||gX(t,n)})}const bX=/[&<>"]/,_X=/[&<>"]/g,yX={"&":"&","<":"<",">":">",'"':"""};function xX(e){return yX[e]}function Rl(e){return bX.test(e)?e.replace(_X,xX):e}const SX=/[.?*+^$[\]\\(){}|-]/g;function wX(e){return e.replace(SX,"\\$&")}function xr(e){switch(e){case 9:case 32:return!0}return!1}function Ah(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 EM(e){return _w.test(e)||bM.test(e)}function Th(e){return EM(Rh(e))}function $h(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 Rv(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function JR(e){return e===32||e===9||e===10||e===13}function Av(e){let t=0;for(;t<e.length&&JR(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&JR(e.charCodeAt(r));r--);return e.slice(t,r+1)}const EX={mdurl:WY,ucmicro:QY},kX=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:SM,asciiTrim:Av,assign:Cv,escapeHtml:Rl,escapeRE:wX,fromCodePoint:Rh,has:fX,isMdAsciiPunct:$h,isPunctChar:EM,isPunctCharCode:Th,isSpace:xr,isString:yw,isValidEntityCode:xw,isWhiteSpace:Ah,lib:EX,normalizeReference:Rv,unescapeAll:md,unescapeMd:vX},Symbol.toStringTag,{value:"Module"}));function CX(e,t,r){let n,i,o,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),o===91){if(a===e.pos-1)n++;else if(r)return e.pos=l,-1}}let u=-1;return i&&(u=e.pos),e.pos=l,u}function RX(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=md(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let a=0;for(;i<r&&(n=e.charCodeAt(i),!(n===32||n<32||n===127));){if(n===92&&i+1<r){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(n===40&&(a++,a>32))return o;if(n===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=md(e.slice(t,i)),o.pos=i,o.ok=!0),o}function AX(e,t,r,n){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o<r;){if(i=e.charCodeAt(o),i===a.marker)return a.pos=o+1,a.str+=md(e.slice(t,o)),a.ok=!0,a;if(i===40&&a.marker===41)return a;i===92&&o+1<r&&o++,o++}return a.can_continue=!0,a.str+=md(e.slice(t,o)),a}const TX=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:RX,parseLinkLabel:CX,parseLinkTitle:AX},Symbol.toStringTag,{value:"Module"})),Ga={};Ga.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+Rl(o.content)+"</code>"};Ga.code_block=function(e,t,r,n,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+Rl(e[t].content)+`</code></pre>
|
|
4
|
+
`};Ga.fence=function(e,t,r,n,i){const o=e[t],a=o.info?md(o.info).trim():"";let s="",l="";if(a){const d=a.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let u;if(r.highlight?u=r.highlight(o.content,s,l)||Rl(o.content):u=Rl(o.content),u.indexOf("<pre")===0)return u+`
|
|
5
|
+
`;if(a){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+s]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+s);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${u}</code></pre>
|
|
6
|
+
`}return`<pre><code${i.renderAttrs(o)}>${u}</code></pre>
|
|
7
|
+
`};Ga.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)};Ga.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
+
`:`<br>
|
|
9
|
+
`};Ga.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
+
`:`<br>
|
|
11
|
+
`:`
|
|
12
|
+
`};Ga.text=function(e,t){return Rl(e[t].content)};Ga.html_block=function(e,t){return e[t].content};Ga.html_inline=function(e,t){return e[t].content};function Ld(){this.rules=Cv({},Ga)}Ld.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+Rl(t.attrs[r][0])+'="'+Rl(t.attrs[r][1])+'"';return i};Ld.prototype.renderToken=function(t,r,n){const i=t[r];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&t[r-1].hidden&&(o+=`
|
|
13
|
+
`),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let a=!1;if(i.block&&(a=!0,i.nesting===1&&r+1<t.length)){const s=t[r+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===i.tag)&&(a=!1)}return o+=a?`>
|
|
14
|
+
`:">",o};Ld.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};Ld.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};Ld.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;s==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function Oi(){this.__rules__=[],this.__cache__=null}Oi.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Oi.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))})})};Oi.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};Oi.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};Oi.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};Oi.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Oi.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};Oi.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};Oi.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};Oi.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function ca(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}ca.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};ca.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ca.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};ca.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};ca.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 kM(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}kM.prototype.Token=ca;const $X=/\r\n?|\n/g,NX=/\0/g;function DX(e){let t;t=e.src.replace($X,`
|
|
16
|
+
`),t=t.replace(NX,"�"),e.src=t}function FX(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 IX(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 PX(e){return/^<a[>\s]/i.test(e)}function OX(e){return/^<\/a\s*>/i.test(e)}function MX(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(PX(s.content)&&o>0&&o--,OX(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let u=e.md.linkify.match(l);const d=[];let f=s.level,h=0;u.length>0&&u[0].index===0&&a>0&&i[a-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const m=u[p].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let v=u[p].text;u[p].schema?u[p].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const b=u[p].index;if(b>h){const C=new e.Token("text","",0);C.content=l.slice(h,b),C.level=f,d.push(C)}const _=new e.Token("link_open","a",1);_.attrs=[["href",g]],_.level=f++,_.markup="linkify",_.info="auto",d.push(_);const S=new e.Token("text","",0);S.content=v,S.level=f,d.push(S);const E=new e.Token("link_close","a",-1);E.level=--f,E.markup="linkify",E.info="auto",d.push(E),h=u[p].lastIndex}if(h<l.length){const p=new e.Token("text","",0);p.content=l.slice(h),p.level=f,d.push(p)}t[r].children=i=SM(i,a,d)}}}}const CM=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,LX=/\((c|tm|r)\)/i,zX=/\((c|tm|r)\)/ig,UX={c:"©",r:"®",tm:"™"};function BX(e,t){return UX[t.toLowerCase()]}function jX(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(zX,BX)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function qX(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&CM.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 VX(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(LX.test(e.tokens[t].content)&&jX(e.tokens[t].children),CM.test(e.tokens[t].content)&&qX(e.tokens[t].children))}const GX=/['"]/,QR=/['"]/g,YR="’";function gm(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function KX(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 HX(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const a=e[o],s=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,a.type!=="text")continue;const l=a.content;let u=0;const d=l.length;e:for(;u<d;){QR.lastIndex=u;const f=QR.exec(l);if(!f)break;let h=!0,p=!0;u=f.index+1;const m=f[0]==="'";let g=32;if(f.index-1>=0)g=l.charCodeAt(f.index-1);else for(r=o-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){g=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(u<d)v=l.charCodeAt(u);else for(r=o+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const b=$h(g)||Th(g),_=$h(v)||Th(v),S=Ah(g),E=Ah(v);if(E?h=!1:_&&(S||b||(h=!1)),S?p=!1:b&&(E||_||(p=!1)),v===34&&f[0]==='"'&&g>=48&&g<=57&&(p=h=!1),h&&p&&(h=b,p=_),!h&&!p){m&&gm(i,o,f.index,YR);continue}if(p)for(r=n.length-1;r>=0;r--){let C=n[r];if(n[r].level<s)break;if(C.single===m&&n[r].level===s){C=n[r];let A,T;m?(A=t.md.options.quotes[2],T=t.md.options.quotes[3]):(A=t.md.options.quotes[0],T=t.md.options.quotes[1]),gm(i,o,f.index,T),gm(i,C.token,C.pos,A),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:m,level:s}):p&&m&&gm(i,o,f.index,YR)}}Object.keys(i).forEach(function(o){e[o].content=KX(e[o].content,i[o])})}function WX(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!GX.test(e.tokens[t].content)||HX(e.tokens[t].children,e)}function JX(e){let t,r;const n=e.tokens,i=n.length;for(let o=0;o<i;o++){if(n[o].type!=="inline")continue;const a=n[o].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=r=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}}const m_=[["normalize",DX],["block",FX],["inline",IX],["linkify",MX],["replacements",VX],["smartquotes",WX],["text_join",JX]];function Sw(){this.ruler=new Oi;for(let e=0;e<m_.length;e++)this.ruler.push(m_[e][0],m_[e][1])}Sw.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};Sw.prototype.State=kM;function Ka(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,a=0,s=0,l=0,u=i.length,d=!1;a<u;a++){const f=i.charCodeAt(a);if(!d)if(xr(f)){s++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||a===u-1)&&(f!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),d=!1,s=0,l=0,o=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Ka.prototype.push=function(e,t,r){const n=new ca(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};Ka.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ka.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Ka.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!xr(n))break}return t};Ka.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!xr(this.src.charCodeAt(--t)))return t+1;return t};Ka.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};Ka.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};Ka.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let a=0,s=t;s<r;s++,a++){let l=0;const u=this.bMarks[s];let d=u,f;for(s+1<r||i?f=this.eMarks[s]+1:f=this.eMarks[s];d<f&&l<n;){const h=this.src.charCodeAt(d);if(xr(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(d-u<this.tShift[s])l++;else break;d++}l>n?o[a]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[a]=this.src.slice(d,f)}return o.join("")};Ka.prototype.Token=ca;const QX=65536;function g_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function XR(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,a=0,s="";for(;n<r;)i===124&&(o?(s+=e.substring(a,n-1),a=n):(t.push(s+e.substring(a,n)),s="",a=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(s+e.substring(a)),t}function YX(e,t,r,n){if(t+2>r)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!xr(s)||a===45&&xr(s))return!1;for(;o<e.eMarks[i];){const E=e.src.charCodeAt(o);if(E!==124&&E!==45&&E!==58&&!xr(E))return!1;o++}let l=g_(e,t+1),u=l.split("|");const d=[];for(let E=0;E<u.length;E++){const C=u[E].trim();if(!C){if(E===0||E===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?d.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=g_(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=XR(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const f=u.length;if(f===0||f!==d.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const b=e.push("tr_open","tr",1);b.map=[t,t+1];for(let E=0;E<u.length;E++){const C=e.push("th_open","th",1);d[E]&&(C.attrs=[["style","text-align:"+d[E]]]);const A=e.push("inline","",0);A.content=u[E].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let _,S=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let E=!1;for(let A=0,T=p.length;A<T;A++)if(p[A](e,i,r,!0)){E=!0;break}if(E||(l=g_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(u=XR(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),S+=f-u.length,S>QX))break;if(i===t+2){const A=e.push("tbody_open","tbody",1);A.map=_=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[i,i+1];for(let A=0;A<f;A++){const T=e.push("td_open","td",1);d[A]&&(T.attrs=[["style","text-align:"+d[A]]]);const R=e.push("inline","",0);R.content=u[A]?u[A].trim():"",R.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return _&&(e.push("tbody_close","tbody",-1),_[1]=i),e.push("table_close","table",-1),g[1]=i,e.parentType=h,e.line=i,!0}function XX(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 ZX(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const u=e.src.slice(s,i),d=e.src.slice(i,o);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,a),!(i-s<l)&&(i=e.skipSpaces(i),!(i<o)))){h=!0;break}l=e.sCount[t],e.line=f+(h?1:0);const p=e.push("fence","code",0);return p.info=d,p.content=e.getLines(t+1,f,l,!0),p.markup=u,p.map=[t,e.line],!0}function eZ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const s=[],l=[],u=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m<r;m++){const S=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],o=e.eMarks[m],i>=o)break;if(e.src.charCodeAt(i++)===62&&!S){let C=e.sCount[m]+1,A,T;e.src.charCodeAt(i)===32?(i++,C++,T=!1,A=!0):e.src.charCodeAt(i)===9?(A=!0,(e.bsCount[m]+C)%4===3?(i++,C++,T=!1):T=!0):A=!1;let R=C;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<o;){const N=e.src.charCodeAt(i);if(xr(N))N===9?R+=4-(R+e.bsCount[m]+(T?1:0))%4:R++;else break;i++}p=i>=o,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(A?1:0),u.push(e.sCount[m]),e.sCount[m]=R-C,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let E=!1;for(let C=0,A=f.length;C<A;C++)if(f[C](e,m,r,!0)){E=!0;break}if(E){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]=-1}const g=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const b=[t,0];v.map=b,e.md.block.tokenize(e,t,m);const _=e.push("blockquote_close","blockquote",-1);_.markup=">",e.lineMax=a,e.parentType=h,b[1]=e.line;for(let S=0;S<d.length;S++)e.bMarks[S+t]=s[S],e.tShift[S+t]=d[S],e.sCount[S+t]=u[S],e.bsCount[S+t]=l[S];return e.blkIndent=g,!0}function tZ(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o<i;){const u=e.src.charCodeAt(o++);if(u!==a&&!xr(u))return!1;u===a&&s++}if(s<3)return!1;if(n)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function ZR(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(!xr(o))return-1}return n}function eA(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),!xr(o))?-1:i}function rZ(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 nZ(e,t,r,n){let i,o,a,s,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;n&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(d=!0);let f,h,p;if((p=eA(e,l))>=0){if(f=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,p-1)),d&&h!==1)return!1}else if((p=ZR(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const m=e.src.charCodeAt(p-1),g=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const v=[l,0];s.map=v,s.markup=String.fromCharCode(m);let b=!1;const _=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const E=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let C=E;for(;o<i;){const V=e.src.charCodeAt(o);if(V===9)C+=4-(C+e.bsCount[l])%4;else if(V===32)C++;else break;o++}const A=o;let T;A>=i?T=1:T=C-E,T>4&&(T=1);const R=E+T;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[l,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const I=e.tight,M=e.tShift[l],P=e.sCount[l],U=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=A-e.bMarks[l],e.sCount[l]=C,A>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,l,r,!0),(!e.tight||b)&&(u=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=U,e.tShift[l]=M,e.sCount[l]=P,e.tight=I,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,N[1]=l,l>=r||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let j=!1;for(let V=0,Y=_.length;V<Y;V++)if(_[V](e,l,r,!0)){j=!0;break}if(j)break;if(f){if(p=eA(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=ZR(e,l),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return f?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),v[1]=l,e.line=l,e.parentType=S,u&&rZ(e,g),!0}function iZ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(_){const S=e.lineMax;if(_>=S||e.isEmpty(_))return null;let E=!1;if(e.sCount[_]-e.blkIndent>3&&(E=!0),e.sCount[_]<0&&(E=!0),!E){const T=e.md.block.ruler.getRules("reference"),R=e.parentType;e.parentType="reference";let N=!1;for(let I=0,M=T.length;I<M;I++)if(T[I](e,_,S,!0)){N=!0;break}if(e.parentType=R,N)return null}const C=e.bMarks[_]+e.tShift[_],A=e.eMarks[_];return e.src.slice(C,A+1)}let l=e.src.slice(i,o+1);o=l.length;let u=-1;for(i=1;i<o;i++){const _=l.charCodeAt(i);if(_===91)return!1;if(_===93){u=i;break}else if(_===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(_===92&&(i++,i<o&&l.charCodeAt(i)===10)){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(i=u+2;i<o;i++){const _=l.charCodeAt(i);if(_===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!xr(_))break}const d=e.md.helpers.parseLinkDestination(l,i,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;i=d.pos;const h=i,p=a,m=i;for(;i<o;i++){const _=l.charCodeAt(i);if(_===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!xr(_))break}let g=e.md.helpers.parseLinkTitle(l,i,o);for(;g.can_continue;){const _=s(a);if(_===null)break;l+=_,i=o,o=l.length,a++,g=e.md.helpers.parseLinkTitle(l,i,o,g)}let v;for(i<o&&m!==i&&g.ok?(v=g.str,i=g.pos):(v="",i=h,a=p);i<o;){const _=l.charCodeAt(i);if(!xr(_))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,a=p;i<o;){const _=l.charCodeAt(i);if(!xr(_))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const b=Rv(l.slice(1,u));return b?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:v,href:f}),e.line=a),!0):!1}const oZ=["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"],aZ="[a-zA-Z_:][a-zA-Z0-9:._-]*",sZ="[^\"'=<>`\\x00-\\x20]+",lZ="'[^']*'",uZ='"[^"]*"',cZ="(?:"+sZ+"|"+lZ+"|"+uZ+")",dZ="(?:\\s+"+aZ+"(?:\\s*=\\s*"+cZ+")?)",RM="<[A-Za-z][A-Za-z0-9\\-]*"+dZ+"*\\s*\\/?>",AM="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",fZ="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",hZ="<[?][\\s\\S]*?[?]>",pZ="<![A-Za-z][^>]*>",mZ="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",gZ=new RegExp("^(?:"+RM+"|"+AM+"|"+fZ+"|"+hZ+"|"+pZ+"|"+mZ+")"),vZ=new RegExp("^(?:"+RM+"|"+AM+")"),Ql=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+oZ.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(vZ.source+"\\s*$"),/^$/,!1]];function bZ(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s<Ql.length&&!Ql[s][0].test(a);s++);if(s===Ql.length)return!1;if(n)return Ql[s][2];let l=t+1;const u=Ql[s][1].test("");if(!Ql[s][1].test(a)){for(;l<r&&!(e.sCount[l]<e.blkIndent&&(u||!e.isEmpty(l)));l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(i,o),Ql[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function _Z(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i<o&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<o&&!xr(a))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&xr(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const u=e.push("heading_open","h"+String(s),1);u.markup="########".slice(0,s),u.map=[t,e.line];const d=e.push("inline","",0);d.content=Av(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function yZ(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s<r&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p<m&&(a=e.src.charCodeAt(p),(a===45||a===61)&&(p=e.skipChars(p,a),p=e.skipSpaces(p),p>=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=n.length;p<m;p++)if(n[p](e,s,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=Av(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;const u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(a),u.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(a),e.parentType=i,!0}function xZ(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<r&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let u=!1;for(let d=0,f=n.length;d<f;d++)if(n[d](e,o,r,!0)){u=!0;break}if(u)break}const a=Av(e.getLines(t,o,e.blkIndent,!1));e.line=o;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const vm=[["table",YX,["paragraph","reference"]],["code",XX],["fence",ZX,["paragraph","reference","blockquote","list"]],["blockquote",eZ,["paragraph","reference","blockquote","list"]],["hr",tZ,["paragraph","reference","blockquote","list"]],["list",nZ,["paragraph","reference","blockquote"]],["reference",iZ],["html_block",bZ,["paragraph","reference","blockquote"]],["heading",_Z,["paragraph","reference","blockquote"]],["lheading",yZ],["paragraph",xZ]];function Tv(){this.ruler=new Oi;for(let e=0;e<vm.length;e++)this.ruler.push(vm[e][0],vm[e][1],{alt:(vm[e][2]||[]).slice()})}Tv.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let a=t,s=!1;for(;a<r&&(e.line=a=e.skipEmptyLines(a),!(a>=r||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=r;break}const l=e.line;let u=!1;for(let d=0;d<i;d++)if(u=n[d](e,a,r,!1),u){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<r&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}};Tv.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)};Tv.prototype.State=Ka;function wp(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}wp.prototype.pushPending=function(){const e=new ca("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};wp.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new ca(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};wp.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)===55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)===56320){const v=this.src.charCodeAt(e-2);i=(v&64512)===55296?65536+(v-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let o=e;for(;o<r&&this.src.charCodeAt(o)===n;)o++;const a=o-e;let s=o<r?this.src.charCodeAt(o):32;if((s&64512)===55296){const v=this.src.charCodeAt(o+1);s=(v&64512)===56320?65536+(s-55296<<10)+(v-56320):65533}else(s&64512)===56320&&(s=65533);const l=$h(i)||Th(i),u=$h(s)||Th(s),d=Ah(i),f=Ah(s),h=!f&&(!u||d||l),p=!d&&(!l||f||u);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||u),length:a}};wp.prototype.Token=ca;function SZ(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 wZ(e,t){let r=e.pos;for(;r<e.posMax&&!SZ(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const EZ=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function kZ(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(EZ);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const d=e.push("link_open","a",1);d.attrs=[["href",u]],d.markup="linkify",d.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-o.length,!0}function CZ(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&&xr(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const ww=[];for(let e=0;e<256;e++)ww.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ww[e.charCodeAt(0)]=1});function RZ(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),!!xr(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const s=e.src.charCodeAt(r+1);s>=56320&&s<=57343&&(o+=e.src[r+1],r++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&ww[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=r+1,!0}function AZ(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const o=e.posMax;for(;r<o&&e.src.charCodeAt(r)===96;)r++;const a=e.src.slice(i,r),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=a),e.pos+=s,!0;let l=r,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&e.src.charCodeAt(l)===96;)l++;const d=l-u;if(d===s){if(!t){const f=e.push("code_inline","code",0);f.markup=a,f.content=e.src.slice(r,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=u}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function TZ(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=a,o--);for(let l=0;l<o;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function tA(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];r=e.tokens[a.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[s.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&n.push(s.token-1)}for(;n.length;){const o=n.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(r=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=r)}}function $Z(e){const t=e.tokens_meta,r=e.tokens_meta.length;tA(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&tA(e,t[n].delimiters)}const TM={tokenize:TZ,postProcess:$Z};function NZ(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let o=0;o<i.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function rA(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const u=e.tokens[o.token];u.type=a?"strong_close":"em_close",u.tag=a?"strong":"em",u.nesting=-1,u.markup=a?s+s:s,u.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function DZ(e){const t=e.tokens_meta,r=e.tokens_meta.length;rA(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&rA(e,t[n].delimiters)}const $M={tokenize:NZ,postProcess:DZ};function FZ(e,t){let r,n,i,o,a="",s="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<f&&e.src.charCodeAt(m)===40){for(u=!1,m++;m<f&&(r=e.src.charCodeAt(m),!(!xr(r)&&r!==10));m++);if(m>=f)return!1;if(l=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",l=m;m<f&&(r=e.src.charCodeAt(m),!(!xr(r)&&r!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<f&&l!==m&&i.ok)for(s=i.str,m=i.pos;m<f&&(r=e.src.charCodeAt(m),!(!xr(r)&&r!==10));m++);}(m>=f||e.src.charCodeAt(m)!==41)&&(u=!0),m++}if(u){if(typeof e.env.references>"u")return!1;if(m<f&&e.src.charCodeAt(m)===91?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?n=e.src.slice(l,m++):m=p+1):m=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[Rv(n)],!o)return e.pos=d,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const g=e.push("link_open","a",1),v=[["href",a]];g.attrs=v,s&&v.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function IZ(e,t){let r,n,i,o,a,s,l,u,d="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!xr(r)&&r!==10));o++);if(o>=h)return!1;for(u=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(d=e.md.normalizeLink(s.str),e.md.validateLink(d)?o=s.pos:d=""),u=o;o<h&&(r=e.src.charCodeAt(o),!(!xr(r)&&r!==10));o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&u!==o&&s.ok)for(l=s.str,o=s.pos;o<h&&(r=e.src.charCodeAt(o),!(!xr(r)&&r!==10));o++);else l="";if(o>=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<h&&e.src.charCodeAt(o)===91?(u=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(u,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[Rv(i)],!a)return e.pos=f,!1;d=a.href,l=a.title}if(!t){n=e.src.slice(p,m);const g=[];e.md.inline.parse(n,e.md,e.env,g);const v=e.push("image","img",0),b=[["src",d],["alt",""]];v.attrs=b,v.children=g,v.content=n,l&&b.push(["title",l])}return e.pos=o,e.posMax=h,!0}const PZ=/^([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])?)*)$/,OZ=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function MZ(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const a=e.src.charCodeAt(r);if(a===60)return!1;if(a===62)break}const o=e.src.slice(n+1,r);if(OZ.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}if(PZ.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}return!1}function LZ(e){return/^<a[>\s]/i.test(e)}function zZ(e){return/^<\/a\s*>/i.test(e)}function UZ(e){const t=e|32;return t>=97&&t<=122}function BZ(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&&!UZ(i))return!1;const o=e.src.slice(n).match(gZ);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],LZ(a.content)&&e.linkLevel++,zZ(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const jZ=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,qZ=/^&([a-z][a-z0-9]{1,31});/i;function VZ(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(jZ);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=xw(a)?Rh(a):Rh(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(qZ);if(o){const a=uX(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function nA(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;a<r;a++){const s=e[a];if(o.push(0),(e[n].marker!==s.marker||i!==s.token-1)&&(n=a),i=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let u=n-o[n]-1,d=u;for(;u>l;u-=o[u]+1){const f=e[u];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=u>0&&!e[u-1].open?o[u-1]+1:0;o[a]=a-u+p,o[u]=p,s.open=!1,f.end=a,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function GZ(e){const t=e.tokens_meta,r=e.tokens_meta.length;nA(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&nA(t[n].delimiters)}function KZ(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 v_=[["text",wZ],["linkify",kZ],["newline",CZ],["escape",RZ],["backticks",AZ],["strikethrough",TM.tokenize],["emphasis",$M.tokenize],["link",FZ],["image",IZ],["autolink",MZ],["html_inline",BZ],["entity",VZ]],b_=[["balance_pairs",GZ],["strikethrough",TM.postProcess],["emphasis",$M.postProcess],["fragments_join",KZ]];function Ep(){this.ruler=new Oi;for(let e=0;e<v_.length;e++)this.ruler.push(v_[e][0],v_[e][1]);this.ruler2=new Oi;for(let e=0;e<b_.length;e++)this.ruler2.push(b_[e][0],b_[e][1])}Ep.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<i){for(let s=0;s<n;s++)if(e.level++,a=r[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Ep.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const o=e.pos;let a=!1;if(e.level<i){for(let s=0;s<r;s++)if(a=t[s](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ep.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s<a;s++)o[s](i)};Ep.prototype.State=wp;function HZ(e){const t={};e=e||{},t.src_Any=gM.source,t.src_Cc=vM.source,t.src_Z=_M.source,t.src_P=_w.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 G1(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function $v(e){return Object.prototype.toString.call(e)}function WZ(e){return $v(e)==="[object String]"}function JZ(e){return $v(e)==="[object Object]"}function QZ(e){return $v(e)==="[object RegExp]"}function iA(e){return $v(e)==="[object Function]"}function YZ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const NM={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function XZ(e){return Object.keys(e||{}).reduce(function(t,r){return t||NM.hasOwnProperty(r)},!1)}const ZZ={"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}}},eee="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]",tee="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ree(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function oA(){return function(e,t){t.normalize(e)}}function n0(e){const t=e.re=HZ(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(eee),r.push(t.src_xn),t.src_tlds=r.join("|");function n(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const u={validate:null,link:null};if(e.__compiled__[s]=u,JZ(l)){QZ(l.validate)?u.validate=ree(l.validate):iA(l.validate)?u.validate=l.validate:o(s,l),iA(l.normalize)?u.normalize=l.normalize:l.normalize?o(s,l):u.normalize=oA();return}if(WZ(l)){i.push(s);return}o(s,l)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:oA()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(YZ).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function DM(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 io(e,t){if(!(this instanceof io))return new io(e,t);t||XZ(e)&&(t=e,e={}),this.__opts__=G1({},NM,t),this.__schemas__=G1({},ZZ,e),this.__compiled__={},this.__tlds__=tee,this.__tlds_replaced__=!1,this.re={},n0(this)}io.prototype.add=function(t,r){return this.__schemas__[t]=r,n0(this),this};io.prototype.set=function(t){return this.__opts__=G1(this.__opts__,t),this};io.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)};io.prototype.pretest=function(t){return this.re.pretest.test(t)};io.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};io.prototype.match=function(t){const r=[],n=[],i=[],o=[];let a,s,l;function u(h,p){return h?p?h.index!==p.index?h.index<p.index?h:p:h.lastIndex>=p.lastIndex?h:p:h:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(a=l.exec(t))!==null;)s=this.testSchemaAt(t,a[2],l.lastIndex),s&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+s});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)i.push({schema:"",index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)o.push({schema:"mailto:",index:a.index+a[1].length,lastIndex:a.index+a[0].length});const d=[0,0,0];let f=0;for(;;){const h=[n[d[0]],o[d[1]],i[d[2]]],p=u(u(h[0],h[1]),h[2]);if(!p)break;if(p===h[0]?d[0]++:p===h[1]?d[1]++:d[2]++,p.index<f)continue;const m=new DM(t,p.schema,p.index,p.lastIndex);this.__compiled__[m.schema].normalize(m,this),r.push(m),f=p.lastIndex}return r.length?r:null};io.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 DM(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};io.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(),n0(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,n0(this),this)};io.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};io.prototype.onCompile=function(){};const Wc=2147483647,Ta=36,Ew=1,Nh=26,nee=38,iee=700,FM=72,IM=128,PM="-",oee=/^xn--/,aee=/[^\0-\x7F]/,see=/[\x2E\u3002\uFF0E\uFF61]/g,lee={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},__=Ta-Ew,$a=Math.floor,y_=String.fromCharCode;function il(e){throw new RangeError(lee[e])}function uee(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function OM(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(see,".");const i=e.split("."),o=uee(i,t).join(".");return n+o}function MM(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 cee=e=>String.fromCodePoint(...e),dee=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ta},aA=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},LM=function(e,t,r){let n=0;for(e=r?$a(e/iee):e>>1,e+=$a(e/t);e>__*Nh>>1;n+=Ta)e=$a(e/__);return $a(n+(__+1)*e/(e+nee))},zM=function(e){const t=[],r=e.length;let n=0,i=IM,o=FM,a=e.lastIndexOf(PM);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&il("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<r;){const l=n;for(let d=1,f=Ta;;f+=Ta){s>=r&&il("invalid-input");const h=dee(e.charCodeAt(s++));h>=Ta&&il("invalid-input"),h>$a((Wc-n)/d)&&il("overflow"),n+=h*d;const p=f<=o?Ew:f>=o+Nh?Nh:f-o;if(h<p)break;const m=Ta-p;d>$a(Wc/m)&&il("overflow"),d*=m}const u=t.length+1;o=LM(n-l,u,l==0),$a(n/u)>Wc-i&&il("overflow"),i+=$a(n/u),n%=u,t.splice(n++,0,i)}return String.fromCodePoint(...t)},UM=function(e){const t=[];e=MM(e);const r=e.length;let n=IM,i=0,o=FM;for(const l of e)l<128&&t.push(y_(l));const a=t.length;let s=a;for(a&&t.push(PM);s<r;){let l=Wc;for(const d of e)d>=n&&d<l&&(l=d);const u=s+1;l-n>$a((Wc-i)/u)&&il("overflow"),i+=(l-n)*u,n=l;for(const d of e)if(d<n&&++i>Wc&&il("overflow"),d===n){let f=i;for(let h=Ta;;h+=Ta){const p=h<=o?Ew:h>=o+Nh?Nh:h-o;if(f<p)break;const m=f-p,g=Ta-p;t.push(y_(aA(p+m%g,0))),f=$a(m/g)}t.push(y_(aA(f,0))),o=LM(i,u,s===a),i=0,++s}++i,++n}return t.join("")},fee=function(e){return OM(e,function(t){return oee.test(t)?zM(t.slice(4).toLowerCase()):t})},hee=function(e){return OM(e,function(t){return aee.test(t)?"xn--"+UM(t):t})},BM={version:"2.3.1",ucs2:{decode:MM,encode:cee},decode:zM,encode:UM,toASCII:hee,toUnicode:fee},pee={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},mee={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"]}}},gee={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"]}}},vee={default:pee,zero:mee,commonmark:gee},bee=/^(vbscript|javascript|file|data):/,_ee=/^data:image\/(gif|png|jpeg|webp);/;function yee(e){const t=e.trim().toLowerCase();return bee.test(t)?_ee.test(t):!0}const jM=["http:","https:","mailto:"];function xee(e){const t=bw(e,!0);if(t.hostname&&(!t.protocol||jM.indexOf(t.protocol)>=0))try{t.hostname=BM.toASCII(t.hostname)}catch{}return Sp(vw(t))}function See(e){const t=bw(e,!0);if(t.hostname&&(!t.protocol||jM.indexOf(t.protocol)>=0))try{t.hostname=BM.toUnicode(t.hostname)}catch{}return pd(vw(t),pd.defaultChars+"%")}function Fo(e,t){if(!(this instanceof Fo))return new Fo(e,t);t||yw(e)||(t=e||{},e="default"),this.inline=new Ep,this.block=new Tv,this.core=new Sw,this.renderer=new Ld,this.linkify=new io,this.validateLink=yee,this.normalizeLink=xee,this.normalizeLinkText=See,this.utils=kX,this.helpers=Cv({},TX),this.options={},this.configure(e),t&&this.set(t)}Fo.prototype.set=function(e){return Cv(this.options,e),this};Fo.prototype.configure=function(e){const t=this;if(yw(e)){const r=e;if(e=vee[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};Fo.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Fo.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Fo.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Fo.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens};Fo.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Fo.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};Fo.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function ln(e){return"var("+e+")"}let wee=w([c("color",ln(x.textPrimary)),c("font-size",ln($.sizeSm)),c("line-height",ln($.lineHeightRelaxed)),c("word-break","break-word"),fr("& > :first-child",[c("margin-top","0")]),fr("& > :last-child",[c("margin-bottom","0")]),fr("& h1, & h2, & h3, & h4, & h5, & h6",[c("margin","var("+O.md+") 0 var("+O.sm+")"),c("line-height",ln($.lineHeightTight)),c("font-weight",ln($.weightBold))]),fr("& h1",[c("font-size",ln($.sizeXl))]),fr("& h2",[c("font-size",ln($.sizeLg))]),fr("& h3, & h4, & h5, & h6",[c("font-size",ln($.sizeMd))]),fr("& p",[c("margin","var("+O.sm+") 0")]),fr("& a",[c("color",ln(x.brand)),c("text-decoration","none")]),fr("& a:hover",[c("text-decoration","underline")]),fr("& ul, & ol",[c("margin","var("+O.sm+") 0"),c("padding-left","1.5em")]),fr("& li",[c("margin","var("+O.xs+") 0")]),fr("& code",[c("font-family",ln($.fontFamilyMono)),c("font-size","0.9em"),c("background",ln(x.surfaceSubtle)),c("padding","1px 4px"),c("border-radius",ln(Z.sm))]),fr("& pre",[c("background",ln(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",ln(Z.md)),c("padding",ln(O.md)),c("overflow","auto"),c("margin","var("+O.sm+") 0")]),fr("& pre code",[c("background","none"),c("padding","0")]),fr("& blockquote",[c("margin","var("+O.sm+") 0"),c("padding-left",ln(O.md)),c("border-left","3px solid var("+x.border+")"),c("color",ln(x.textSecondary))]),fr("& table",[c("border-collapse","collapse"),c("margin","var("+O.sm+") 0")]),fr("& th, & td",[c("border","1px solid var("+x.borderSubtle+")"),c("padding","var("+O.xs+") var("+O.sm+")"),c("text-align","left")]),fr("& th",[c("background",ln(x.surfaceSubtle)),c("font-weight",ln($.weightMedium))]),fr("& img",[c("max-width","100%"),c("border-radius",ln(Z.sm))]),fr("& hr",[c("border","none"),c("border-top","1px solid var("+x.borderSubtle+")"),c("margin","var("+O.md+") 0")])]),Eee=new Fo({html:!1,linkify:!0});function kee(e){let t=e.source,r=Tt(()=>Eee.render(t),[t]),n=Pe(null);return De(()=>{re(ro(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),y("div",{ref:Jt(n),className:wee,dangerouslySetInnerHTML:{__html:r}})}let qM=kee;function Cee(e,t){return y(qM,{source:e.body})}function Ree(){cM({id:"markdown",label:"Markdown",constraints:{},preview:Cee})}function Jc(e){return Array.from(e).length}function kw(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 VM(e,t){return k(t,r=>{let i=kw(e,r)[1];if(i!=="")return i})}function Dr(e){return"var("+e+")"}let Aee=w([z("flex"),_e("column"),c("gap","4px")]),sA=w([c("background",Dr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Dr(Z.sm)),c("padding","var("+O.xs+") var("+O.sm+")"),c("font-family","inherit"),c("font-size",Dr($.sizeMd)),c("line-height",Dr($.lineHeightNormal)),c("color",Dr(x.textPrimary)),c("outline","none"),c("resize","vertical"),la({NAME:"percent",VAL:100}),c("box-sizing","border-box"),c("transition","border-color 120ms"),Is([c("border-color",Dr(x.brand))])]),Tee=w([c("border-color",Dr(x.error)),Is([c("border-color",Dr(x.error))])]),$ee=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",Dr(O.sm)),c("font-size",Dr($.sizeXs)),c("color",Dr(x.textSecondary))]),Nee=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("color",Dr(x.textSecondary))]),lA=w([c("font-variant-numeric","tabular-nums")]),Dee=w([c("color",Dr(x.error)),c("font-weight",Dr($.weightMedium))]),Fee=w([c("background",Dr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-left","3px solid var("+x.error+")"),c("border-radius",Dr(Z.sm)),c("padding","var("+O.xs+") var("+O.sm+")"),c("font-size",Dr($.sizeXs)),c("line-height",Dr($.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word"),c("max-height","8em"),c("overflow","auto")]),Iee=w([c("color",Dr(x.textSecondary)),c("font-size",Dr($.sizeXs)),bp(Ae(2))]),Pee=w([c("color",Dr(x.textPrimary))]),Oee=w([c("color",Dr(x.error)),c("font-weight",Dr($.weightMedium))]),Mee=w([c("color",Dr(x.textDisabled)),c("text-decoration","line-through")]);function GM(e){return e.toString()+" character"+(e===1?"":"s")}function KM(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 Lee(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,a=e.onBlur,s=e.onChange,l=e.value,u=a!==void 0?a:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=VM(l,o),m=ke(p),g=f||m?sA+" "+Tee:sA,v;if(p!==void 0&&o!==void 0){let b=kw(l,o);v=L("div",{children:[y("div",{children:"Sent as:",className:Iee}),L("div",{children:[y("span",{children:b[0],className:Pee}),y("span",{children:"✂",className:Oee}),y("span",{children:p,className:Mee})],className:Fee})]})}else v=null;return L("div",{children:[y("textarea",{className:g,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:b=>u(),onChange:b=>s(b.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?ke(i)?" · "+t:t:null],className:Nee}),y("span",{children:KM(h,o),className:m?lA+" "+Dee:lA})],className:$ee}),v],className:Aee})}let zee=Lee;MY();Ree();function er(e){return"var("+e+")"}let Uee=w([z("flex"),_e("column"),c("gap",er(O.sm)),c("background",er(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",er(Z.md)),c("padding",er(O.md))]),Bee=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",er(O.sm))]),jee=w([c("font-size",er($.sizeSm)),c("font-weight",er($.weightMedium)),c("color",er(x.textPrimary))]),qee=w([c("font-size",er($.sizeXs)),c("color",er(x.textSecondary))]),bm=w([c("font-size",er($.sizeXs)),c("color",er(x.textSecondary)),c("font-variant-numeric","tabular-nums"),c("white-space","nowrap")]),uA=w([c("color",er(x.error)),c("font-weight",er($.weightMedium))]),Vee=w([z("flex"),ee("baseline"),Je("spaceBetween"),c("gap",er(O.sm)),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("padding-bottom",er(O.xs))]),Gee=w([c("font-size",er($.sizeMd)),c("font-weight",er($.weightMedium)),c("color",er(x.textPrimary)),c("word-break","break-word")]),Kee=w([c("color",er(x.textDisabled)),c("text-decoration","line-through")]),Hee=w([c("color",er(x.error)),c("font-weight",er($.weightMedium))]),Wee=w([c("margin","0"),c("font-family","inherit"),c("font-size",er($.sizeSm)),c("line-height",er($.lineHeightRelaxed)),c("color",er(x.textPrimary)),c("white-space","pre-wrap"),c("word-break","break-word")]),Jee=w([c("max-width","100%"),c("border-radius",er(Z.sm)),c("border","1px solid var("+x.borderSubtle+")"),c("object-fit","cover")]),Qee=w([c("font-size",er($.sizeXs)),c("color",er(x.error)),c("background",er(x.surfaceSubtle)),c("border-left","3px solid var("+x.error+")"),c("border-radius",er(Z.sm)),c("padding","var("+O.xs+") var("+O.sm+")")]);function cA(e,t){let r=kw(e,t),n=r[1];return n===""?e:L(cr,{children:[r[0],y("span",{children:"✂",className:Hee}),y("span",{children:n,className:Kee})]})}function Yee(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=dM(n);De(()=>{vr(o)&&_Y(n,"ChannelPreview")},[n]);let a=ne(o,n,b=>b.label),s=ne(o,fM,b=>b.constraints),l=Jc(r.body),u=VM(r.body,s.maxLength),d=r.subject,f;if(d!==void 0){let b=s.subjectMaxLength,_=Jc(d),S=ne(b,!1,E=>_>E);f=L("div",{children:[y("span",{children:b!==void 0?cA(d,b):d,className:Gee}),b!==void 0?y("span",{children:_.toString()+" / "+b.toString(),className:S?bm+" "+uA:bm}):null],className:Vee})}else f=null;let h=k(o,b=>b.preview),p;if(h!==void 0)p=h(r,s);else{let b=s.maxLength;p=y("pre",{children:b!==void 0?cA(r.body,b):r.body,className:Wee})}let m=r.imageUrl,g;if(m!==void 0){let b=s.mediaAspect;g=y("img",{className:Jee,style:b!==void 0?TY({},"aspectRatio",b):{},alt:"Message media",src:Ru(m)})}else g=null;let v=s.note;return L("div",{children:[i?L("div",{children:[y("span",{children:a,className:jee}),y("span",{children:KM(l,s.maxLength),className:ke(u)?bm+" "+uA:bm})],className:Bee}):null,f,p,u!==void 0?y("div",{children:GM(Jc(u))+" past the limit — "+a+" will cut the tail.",className:Qee}):null,g,v!==void 0?y("span",{children:v,className:qee}):null],className:Uee})}let Xee=Yee;function se(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 HM(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 da=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Zee=da&&"documentMode"in document?document.documentMode:null,Vo=da&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Al=da&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),gd=!(!da||!("InputEvent"in window)||Zee)&&"getTargetRanges"in new window.InputEvent("input"),Tl=da&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,WM=da&&/Android/.test(navigator.userAgent),kp=da&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!WM,JM=da&&/^(?=.*Chrome).*/i.test(navigator.userAgent),i0=da&&WM&&JM,Cp=da&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Vo&&!JM,ete=0,tte=1,rte=2,dA=1,fA=2,hA=4,pA=8,nte=16,x_=32,S_=64,Cw=128,ite=1,ote=2,ate=3,ste=4,lte=5,ute=6,Dh=kp||Tl||Cp?" ":"",hu=`
|
|
18
|
+
|
|
19
|
+
`,Rw=Al?" ":Dh,As={bold:1,capitalize:1024,code:16,highlight:Cw,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},cte={directionless:1,unmergeable:2},o0={center:2,end:6,justify:4,left:1,right:3,start:5},dte={[ote]:"center",[ute]:"end",[ste]:"justify",[ite]:"left",[ate]:"right",[lte]:"start"},fte={normal:0,segmented:2,token:1},hte={[ete]:"normal",[rte]:"segmented",[tte]:"token"},mA="$config";function gA(){return Or()._blockCursorElement}function pte(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let QM=class kg{element;before;after;constructor(t,r,n){this.element=t,this.before=r||null,this.after=n||null}withBefore(t){return new kg(this.element,t,this.after)}withAfter(t){return new kg(this.element,this.before,t)}withElement(t){return this.element===t?this:new kg(t,this.before,this.after)}insertChild(t){const r=this.getInsertionAnchor();return r!==null&&r.parentElement!==this.element&&se(357),this.element.insertBefore(t,r),this}removeChild(t){return t.parentElement!==this.element&&se(358),this.element.removeChild(t),this}replaceChild(t,r){return r.parentElement!==this.element&&se(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=vA(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(r===t)return n<=o?"before":"after";const a=vA(t,r);if(a===null)return"after";const s=Array.prototype.indexOf.call(t.childNodes,a);return s>=0&&s<=o?"before":"after"}getInsertionAnchor(){return this.before}};function vA(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class Qc extends QM{withBefore(t){return new Qc(this.element,t,this.after)}withAfter(t){return new Qc(this.element,this.before,t)}withElement(t){return this.element===t?this:new Qc(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;for(;pte(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===gA()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(Cp||Tl||kp);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=br().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const a=br().createElement("img");a.setAttribute("data-lexical-managed-linebreak","true"),a.style.setProperty("display","inline","important"),a.style.setProperty("border","0px","important"),a.style.setProperty("margin","0px","important"),a.alt="",n.insertBefore(a,o),n.__lexicalLineBreak=a}else n.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),r=this.getInsertionAnchor();let n=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==r;i=i.nextSibling)n++;return n}resolveChildIndex(t,r,n,i){if(n===this.element){const l=this.getFirstChildOffset(),u=gA(),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=bA(r,n);o.push(i);const a=bA(r,this.element);let s=t.getIndexWithinParent();for(let l=0;l<a.length;l++){const u=o[l],d=a[l];if(u===void 0||u<d)break;if(u>d){s+=1;break}}return[t.getParentOrThrow(),s]}}function bA(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&&se(225),r.reverse()}let YM;try{YM="0.48.0+prod.esm"}catch{}const XM=YM??'"<unknown>+source"';let _f=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 Yl=null;function ZM(e,t=1e3){return e instanceof K1?e.clone():e.size<t?new Map(e):new K1().init(new Map(e),void 0,e.size)}let K1=class e6{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e6().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===Yl?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!==Yl?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!==Yl&&n!==void 0||(this._size++,n===Yl&&i.delete(t)),i.set(t,r),this}delete(t){const r=this.has(t);return r&&(this.getNursery().set(t,Yl),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!==Yl&&(o!==void 0&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===Yl||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 a0(e,t,r,n,i,o){if(K(e)){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&((K(a)||bs(a)&&a.__slots!==null)&&a0(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}for(const a of bs(e)&&e.__slots!==null?e.__slots.values():[]){const s=n.get(a);s!==void 0&&Mu(s)&&s.__slotHost===t&&((K(s)||bs(s)&&s.__slots!==null)&&a0(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a))}}let H1=!1,Aw=0;function mte(e){Aw=e.timeStamp}function w_(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&Kd(e,r)!==void 0}function gte(e,t,r){const n=xi(Ui(r)),i=n&&Io(n,r._rootElement);let o=null,a=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,a=i.focusOffset);const s=e.nodeValue;s!==null&&Vw(t,s,o,a,!1)}function vte(e,t,r){if(le(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return zi(t)&&r.isAttached()}function bte(e,t,r){for(let n=e;n&&!I4(n);n=Xu(n)){const i=Kd(n,t);if(i!==void 0){const o=gr(i,r);if(o)return dt(o)||!rt(n)?void 0:[n,o]}}}function t6(e,t,r){H1=!0;const n=performance.now()-Aw>100;try{Co(e,()=>{const i=ye()||(function(f){return f.read("latest",()=>{const h=ye();return h!==null?h.clone():null})})(e),o=new Map,a=e._editorState,s=e._blockCursorElement;let l=!1,u="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,m=h.target,g=bte(m,e,a);if(!g)continue;const[v,b]=g;if(p==="characterData")n&&ce(b)&&zi(m)&&vte(i,m,b)&>e(m,b,e);else if(p==="childList"){l=!0;const _=h.addedNodes;for(let C=0;C<_.length;C++){const A=_[C],T=y4(A),R=A.parentNode;if(!(R==null||A===s||T!==null||w_(A,R,e)||e._slotsUsed&&rt(A)&&A.hasAttribute("data-lexical-slot")||I4(A))){if(Al){const N=(rt(A)?A.innerText:null)||A.nodeValue;N&&(u+=N)}R.removeChild(A)}}const S=h.removedNodes,E=S.length;if(E>0){let C=0;for(let A=0;A<E;A++){const T=S[A];(w_(T,m,e)||s===T)&&(m.appendChild(T),C++)}E!==C&&o.set(v,b)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=r.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],p=h.addedNodes,m=h.target;for(let g=0;g<p.length;g++){const v=p[g],b=v.parentNode;b==null||v.nodeName!=="BR"||w_(v,m,e)||b.removeChild(v)}}r.takeRecords()}i!==null&&(l&&On(i),Al&&C4(e)&&i.insertRawText(u))})}finally{H1=!1}}function r6(e){const t=e._observer;t!==null&&t6(e,t.takeRecords(),t)}function n6(e){(function(t){Aw===0&&Ui(t).addEventListener("textInput",mte,!0)})(e),e._observer=new MutationObserver((t,r)=>{t6(e,t,r)})}const _A="latest";let _te=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||Ste).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function Rp(e,t){return new _te(e,t)}function Ap(e,t,r=_A){const n=(r===_A?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function Yc(e,t,r){let n;if(An(),typeof r=="function"){const o=e.getLatest(),a=Ap(o,t);if(n=r(a),t.isEqual(a,n))return o}else n=r;const i=e.getWritable();return o6(i).updateFromKnown(t,n),i}function yte(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of Jw(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 yA=new Set(["__proto__","constructor","prototype"]);let xte=class i6{node;knownState;unknownState;sharedNodeState;size;constructor(t,r,n=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=r,this.unknownState=n,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,u,d){let f=d.size;if(u)for(const h in u){const p=l.get(h);p&&d.has(p)||f++}return f})(a,n,i);this.size=s}getValue(t){const r=this.knownState.get(t);if(r!==void 0)return r;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(n=t.parse(i)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},r={};for(const[n,i]of this.knownState)n.isEqual(i,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(i);for(const n of this.sharedNodeState.flatKeys)n in t&&(r[n]=t[n],delete t[n]);return xA(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 i6(t,r,(function(o,a,s){let l;if(s)for(const[u,d]of Object.entries(s)){if(yA.has(u))continue;const f=o.get(u);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[u]=d)}return l})(r.sharedConfigMap,i,n),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,r){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&n in o||(o&&(delete o[n],this.unknownState=xA(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(yA.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 o6(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new xte(t,a6(t));return t.__state=r,r}function a6(e){return e.__state?e.__state.sharedNodeState:v4(Or(),e.getType()).sharedNodeState}function xA(e){if(e)for(const t in e)return e}function Ste(e){return e}function SA(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 wA(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,a]of Object.entries(n))if(!e.has(o)&&(e.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function EA(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function kA(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style,l=e.__state,u=t.__state;return(r===null||r===o)&&(n===null||n===a)&&(i===null||i===s)&&(e.__state===null||l===u||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&SA(h,d,f)||f&&SA(h,f,d)||d&&wA(h,d,f)||f&&wA(h,f,d))})(l,u))}function CA(e,t){const r=e.mergeWithSibling(t),n=qt()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function RA(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&ce(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(kA(t,n)){n=CA(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&ce(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(kA(n,r)){n=CA(n,r);break}break}r.remove()}}else n.remove()}function hl(e){return AA(e.anchor),AA(e.focus),e}function AA(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),ce(n)){e.set(n.__key,i?n.getTextContentSize():0,"text",!0);break}if(!K(n))break;e.set(n.__key,i?n.getChildrenSize():0,"element",!0)}}const Fh=Symbol.for("@lexical/CachedTextSize");function TA(e,t){return J1.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=Wo.get(n);if(o===void 0&&se(345,n),K(o)){const a=Nr.get(n);if(a!==void 0&&K(a)&&a.__parent!==o.__parent)r+=o.getTextContentSize();else{const s=Nu.get(n),l=s&&s.__lexicalTextContent;typeof l!="string"&&se(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const a=o[Fh];a===void 0&&se(347,o.getType(),n),r+=a}n=o.__next}return r},{editor:Dt})}function s6(e){K(e)||e[Fh]===void 0&&(e[Fh]=ce(e)?e.__text.length:e.getTextContentSize())}const wte=4;let Ih,Dt,Ph,ht="",Vr=null,ti=null,qn=null;function Na(){return{firstTextKey:qn,format:Vr,style:ti}}function vo(e){e.firstTextKey!==null&&(Vr=e.format,ti=e.style,qn=e.firstTextKey)}function W1(e){if(qn!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&se(348),t===null)return;const r=Nr.get(t);ce(r)&&(Vr=r.getFormat(),ti=r.getStyle(),qn=t)}let Nv,eh,th,Wo,J1,Nr,Nu,Q1,Oh,Du,fs=!1,s0=!1;function xl(e,t){const r=Wo.get(e),n=Nr.has(e);if(t!==null){const i=tx(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(Dt._keyToDOMMap.delete(e),K(r)){const i=E0(r,Wo);Y1(i,0,i.length-1,null)}if(r!==void 0){for(const i of Ki(r).values()){const o=Z1(i);xl(i,null),o!==null&&o.remove()}Gw(Oh,Ph,Nv,r,"destroyed")}}}function Y1(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&xl(o,n)}}function Xl(e,t){e.setProperty("text-align",t)}const Ete="40px";function l6(e,t){const r=Ih.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, ${Ete}))`)}function u6(e,t){const r=e.style;t===0?Xl(r,""):t===1?Xl(r,"left"):t===2?Xl(r,"center"):t===3?Xl(r,"right"):t===4?Xl(r,"justify"):t===5?Xl(r,"start"):t===6&&Xl(r,"end")}function X1(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(jr(n))return null;const o=n.getParent();return o===null||yr(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function c6(e){const t=br().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function d6(e,t,r){t||e.contentEditable==="false"?Bre(r,Dt):r.removeAttribute("contenteditable")}function $A(e,t,r){const n=ht,i=Na();ht="";let o="";const a=dt(e);for(const[s,l]of r){const u=c6(s);d6(t,a,u),t.appendChild(u),ht="";const d=Na();Sl(l,Po(e,u,Dt)),vo(d),f6(e,s,t,u),o+=ht}return vo(i),ht=n,o}function Ki(e){return bs(e)&&e.__slots!==null?e.__slots:M4}function f6(e,t,r,n){const i=Du.$getSlotTargetElement(e,t,r,Dt);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function Z1(e){const t=Nu.get(e);return t!==void 0?t.parentElement:null}function NA(e,t,r){const n=Ki(e),i=Ki(t);for(const[d,f]of n)if(!i.has(d)){const h=Z1(f);xl(f,null),h!==null&&h.remove()}const o=ht,a=Na();let s="",l=null;const u=dt(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?Z1(h):null;ht="";const m=Na();if(p===null){p=c6(d);let g=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){g=v;break}r.insertBefore(p,g),Sl(f,Po(t,p,Dt))}else h===f?as(f,p):(h!==void 0&&xl(h,p),Sl(f,Po(t,p,Dt)));if(vo(m),d6(r,u,p),f6(t,d,r,p),s+=ht,p.parentElement===r){const g=l===null?r.firstChild:l.nextSibling;g!==p&&r.insertBefore(p,g),l=p}}return vo(a),ht=o,s}function Sl(e,t){const r=Nr.get(e);if(r===void 0&&se(60),t!==null){const i=Wo.get(e);if(i!==void 0){const o=Nu.get(e);if(o!==void 0){const a=Mu(i)?i.__slotHost:null,s=Mu(r)?r.__slotHost:null,l=i.__parent!==r.__parent||a!==s,u=s!==null&&o.parentElement!==t.element;if(l||u)return t.insertChild(o),as(e,t.element)}}}const n=Du.$createDOM(r,Dt);if((function(i,o,a){const s=a._keyToDOMMap;x4(o,a,i),s.set(i,o)})(e,n,Dt),ce(r)?n.setAttribute("data-lexical-text","true"):dt(r)&&(n.setAttribute("data-lexical-decorator","true"),Ure(n,{captureSelection:!0})),K(r)){const i=r.__indent,o=r.__size;X1(n,r),i!==0&&l6(n,i);const a=Ki(r),s=a.size>0?$A(r,n,a):"";if(o===0)n.__lexicalTextContent=s,n.__lexicalFirstTextKey=null,ht+=s,a.size>0&&(n.__lexicalSlotTextLength=s.length);else{const u=ht,d=o-1;if(ex(E0(r,Nr),r,0,d,Po(r,n,Dt)),s!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=s+f,ht=u+s+f}a.size>0&&(n.__lexicalSlotTextLength=s.length)}const l=r.__format;l!==0&&u6(n,l),r.isInline()||h6(null,r,n)}else{const i=r.getTextContent();if(dt(r)){const o=r.decorate(Dt,Ih);o!==null&&p6(e,o),n.contentEditable="false";const a=Ki(r);a.size>0&&$A(r,n,a)}ht+=i}return t!==null&&t.insertChild(n),Du.$decorateDOM(r,null,n,Dt),s6(r),Gw(Oh,Ph,Nv,r,"created"),n}function ex(e,t,r,n,i){const o=ht,a=Na();ht="",Vr=null,ti=null,qn=null;let s=r;for(;s<=n;++s){const u=Na();Sl(e[s],i);const d=Nr.get(e[s]);d!==null&&ce(d)?Vr===null&&(Vr=d.getFormat(),ti=d.getStyle(),qn=d.__key):K(d)&&s<n&&!d.isInline()&&(ht+=hu),vo(u)}const l=Dt._keyToDOMMap.get(t.__key);l===void 0&&se(349,t.__key),l.__lexicalTextContent=ht,l.__lexicalFirstTextKey=qn,ht=o+ht,vo(a)}function h6(e,t,r){const n=Po(t,r,Dt),i=n.element.__lexicalLastChildKind??null,o=(function(a,s){if(a){const l=a.__last;if(l){const u=s.get(l);if(u)return _i(u)?"line-break":dt(u)&&u.isInline()?"decorator":null}return Ki(a).size>0?null:"empty"}return null})(t,Nr);i!==o&&n.setManagedLineBreak(o)}function kte(e,t,r){var n;Vr=null,ti=null,qn=null,(function(i,o,a){const s=ht,l=i.__size,u=o.__size;ht="";const d=a.element,f=Dt._keyToDOMMap.get(o.__key);f===void 0&&se(351,o.__key);const h=u-l;if(!fs&&Math.abs(h)<=1&&l>=wte&&i.__first===o.__first&&(h!==0||!Dt._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,m=Q1.get(i.__key);if(!fs&&typeof p=="string"&&m!==void 0){const g=(function(v,b){const _=b.size;if(_===0||_>=v.__size)return null;let S=v.__last,E=null,C=0;for(;S!==null&&C<_;){if(!b.has(S))return null;E=S;const A=Nr.get(S);if(A===void 0)return null;S=A.__prev,C++}return C!==_||S!==null&&b.has(S)?null:E})(o,m);if(g!==null){const v=m.size;if(h===0){const b=TA(g,v);let _=g,S=0;for(;_!==null&&S<v;){const R=Nr.get(_);if(R===void 0)break;const N=Na();as(_,d),ce(R)&&Vr===null&&(Vr=R.getFormat(),ti=R.getStyle(),qn=R.__key),vo(N),_=R.__next,S++}let E="";for(_=g,S=0;_!==null&&S<v;){const R=Nr.get(_);if(R===void 0)break;let N;if(K(R)){const I=Dt._keyToDOMMap.get(_),M=I&&I.__lexicalTextContent;typeof M!="string"&&se(352,R.getType()),N=M}else N=R.getTextContent();E+=N,S<v-1&&K(R)&&!R.isInline()&&(E+=hu),_=R.__next,S++}const C=f.__lexicalSlotTextLength||0,A=C>0?p.slice(C):p,T=A.slice(0,A.length-b)+E;return f.__lexicalTextContent=T,ht=s+T,void DA(o,f,m)}if((function(b,_,S,E,C,A,T,R){if(R!==1&&R!==-1||T!==(R===1?2:1))return!1;const I=T-R;let M=b.__last;for(let pe=0;pe<I-1;pe++){if(M===null)return!1;const be=Wo.get(M);if(be===void 0)return!1;M=be.__prev}if(M===null)return!1;const P=Nr.get(A),U=Wo.get(M);if(P===void 0||U===void 0||P.__prev!==U.__prev)return!1;const j=[];let V=A;for(let pe=0;pe<T;pe++){if(V===null)return!1;j.push(V);const be=Nr.get(V);V=be?be.__next:null}const Y=[];V=M;for(let pe=0;pe<I;pe++){if(V===null)return!1;Y.push(V);const be=Wo.get(V);V=be?be.__next:null}const J=new Set(Y),X=new Set(j),oe=[];let ge=0,H=0;for(;ge<I&&H<T;)if(j[H]===Y[ge])oe.push({key:j[H],kind:"reconcile"}),ge++,H++;else if(X.has(Y[ge])){if(J.has(j[H]))return!1;oe.push({key:j[H],kind:"create",nextIndex:H}),H++}else oe.push({key:Y[ge],kind:"destroy"}),ge++;for(;ge<I;)oe.push({key:Y[ge++],kind:"destroy"});for(;H<T;)oe.push({key:j[H],kind:"create",nextIndex:H}),H++;const ae=TA(M,I);for(const pe of oe){const be=Na();if(pe.kind==="reconcile")as(pe.key,S.element);else if(pe.kind==="destroy")xl(pe.key,S.element);else{let Ie=null;for(let $t=pe.nextIndex+1;$t<T;$t++){const Lt=Dt._keyToDOMMap.get(j[$t]);if(Lt!==void 0){Ie=Lt;break}}Sl(pe.key,S.withBefore(Ie??S.before))}if(pe.kind!=="destroy"){const Ie=Nr.get(pe.key);Ie&&ce(Ie)&&Vr===null&&(Vr=Ie.getFormat(),ti=Ie.getStyle(),qn=Ie.__key)}vo(be)}let te="";for(let pe=0;pe<T;pe++){const be=Nr.get(j[pe]);if(be===void 0)return!1;let Ie;if(K(be)){const $t=Dt._keyToDOMMap.get(j[pe]),Lt=$t&&$t.__lexicalTextContent;typeof Lt!="string"&&se(350,be.getType()),Ie=Lt}else Ie=be.getTextContent();te+=Ie,pe<T-1&&K(be)&&!be.isInline()&&(te+=hu)}const ue=E.__lexicalSlotTextLength||0,Se=ue>0?C.slice(ue):C;return E.__lexicalTextContent=Se.slice(0,Se.length-ae)+te,!0})(i,0,a,f,p,g,v,h)){const b=f.__lexicalTextContent;return typeof b!="string"&&se(353),ht=s+b,void DA(o,f,m)}}}if(h===0){let g=i.__first,v=0;for(;g!==null;){const b=Nr.get(g);if(b===void 0)break;const _=fs||th.has(g)||eh.has(g),S=Na();if(_)as(g,d);else{let E,C;if(K(b)){C=Nu.get(g);const A=C&&C.__lexicalTextContent;typeof A!="string"&&se(354,b.getType()),E=A}else E=b.getTextContent();ht+=E,C!==void 0&&W1(C)}ce(b)?Vr===null&&(Vr=b.getFormat(),ti=b.getStyle(),qn=b.__key):K(b)&&v<u-1&&!b.isInline()&&(ht+=hu),vo(S),g=b.__next,v++}return f.__lexicalTextContent=ht,f.__lexicalFirstTextKey=qn,void(ht=s+ht)}}if(l===1&&u===1){const p=i.__first,m=o.__first;if(p===m)as(p,d);else{const v=tx(p),b=Sl(m,null);try{v.parentNode===d?d.replaceChild(b,v):a.insertChild(b)}catch(_){if(typeof _=="object"&&_!=null){const S=`${_.toString()} Parent: ${d.tagName}, new child: {tag: ${b.tagName} key: ${m}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(S)}throw _}xl(p,null)}const g=Nr.get(m);ce(g)&&Vr===null&&(Vr=g.getFormat(),ti=g.getStyle(),qn=g.__key)}else{const p=E0(i,Wo),m=E0(o,Nr);if(p.length!==l&&se(227),m.length!==u&&se(228),l===0)u!==0&&ex(m,o,0,u-1,a);else if(u===0){if(l!==0){const g=a.after==null&&a.before==null&&Ki(o).size===0&&a.element.__lexicalLineBreak==null;Y1(p,0,l-1,g?null:d),g&&(d.textContent="")}}else(function(g,v,b,_,S,E){const C=_-1,A=S-1;let T,R,N=E.getFirstChild(),I=0,M=0;for(;I<=C&&M<=A;){const j=v[I],V=b[M],Y=Na();if(j===V)N=E_(as(V,E.element)),I++,M++;else{if(R===void 0&&(R=FA(b,M)),T===void 0)T=FA(v,I);else if(!T.has(j)){I++,vo(Y);continue}if(!R.has(j)){N=E_(tx(j)),xl(j,E.element),I++,T.delete(j),vo(Y);continue}if(T.has(V)){const X=yd(Dt,V);X!==N&&E.withBefore(N??E.before).insertChild(X),N=E_(as(V,E.element)),I++,M++}else Sl(V,E.withBefore(N??E.before)),M++}const J=Nr.get(V);J!==null&&ce(J)?Vr===null&&(Vr=J.getFormat(),ti=J.getStyle(),qn=J.__key):K(J)&&M<=A&&!J.isInline()&&(ht+=hu),vo(Y)}const P=I>C,U=M>A;if(P&&!U){const j=b[A+1],V=j===void 0?null:Dt.getElementByKey(j);ex(b,g,M,A,E.withBefore(V??E.before))}else U&&!P&&Y1(v,I,C,E.element)})(o,p,m,l,u,a)}f.__lexicalTextContent=ht,f.__lexicalFirstTextKey=qn,ht=s+ht})(e,t,Po(t,r,Dt)),yr(t)||(n=t,Vr==null||Vr===n.__textFormat||s0||n.setTextFormat(Vr),(function(i){ti==null||ti===i.__textStyle||s0||i.setTextStyle(ti)})(t))}function DA(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const a=Nr.get(o);if(a===void 0){o=null;break}if(a.__parent===i)break;o=a.__parent}if(o!==null&&!r.has(o)){const a=Nr.get(n);if(ce(a))return Vr=a.getFormat(),void(ti=a.getStyle())}}t.__lexicalFirstTextKey=qn}function as(e,t){const r=Wo.get(e);let n=Nr.get(e);r!==void 0&&n!==void 0||se(61);const i=fs||th.has(e)||eh.has(e),o=yd(Dt,e);if(r===n&&!i){let a;if(K(r)){const s=o.__lexicalTextContent;typeof s!="string"&&se(355,r.getType()),a=s,W1(o)}else a=r.getTextContent();return ht+=a,o}if(r!==n&&i&&Gw(Oh,Ph,Nv,n,"updated"),Du.$updateDOM(n,r,o,Dt)){const a=Sl(e,null);return t===null&&se(62),t.replaceChild(a,o),xl(e,null),a}if(K(r)){K(n)||se(334,e);const a=n.__indent;(fs||a!==r.__indent)&&l6(o,a);const s=n.__format;(fs||s!==r.__format)&&u6(o,s);const l=i&&(Ki(n).size>0||Ki(r).size>0)?NA(r,n,o):"";if(i){const u=ht;if(kte(r,n,o),jr(n)||n.isInline()||h6(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,ht=u+l+d,o.__lexicalSlotTextLength=l.length}else(Ki(n).size>0||Ki(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const u=o.__lexicalTextContent;typeof u!="string"&&se(356,r.getType()),ht+=u,W1(o)}if((fs||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(X1(o,n),jr(n)&&!fs))for(const u of n.getChildren())K(u)&&X1(yd(Dt,u.getKey()),u)}else{const a=n.getTextContent();if(dt(n)){const s=n.decorate(Dt,Ih);s!==null&&p6(e,s),i&&(Ki(n).size>0||Ki(r).size>0)&&NA(r,n,o)}ht+=a}if(!s0&&jr(n)){const a=n.getLatest();if(a.__cachedText!==ht){const s=a.getWritable();s.__cachedText=ht,n=s}}return Du.$decorateDOM(n,r,o,Dt),s6(n),o}function p6(e,t){let r=Dt._pendingDecorators;const n=Dt._decorators;if(r===null){if(n[e]===t)return;r=S4(Dt)}r[e]=t}function E_(e){let t=e.nextSibling;return t!==null&&t===Dt._blockCursorElement&&(t=t.nextSibling),t}function FA(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function Cte(e,t,r,n,i,o){ht="",Vr=null,ti=null,qn=null,fs=n===2,Dt=r,Ih=r._config,Du=r._config.dom||_0,Ph=r._nodes,Nv=Dt._listeners.mutation,eh=i,th=o,Wo=e._nodeMap,J1=e,Nr=t._nodeMap,s0=t._readOnly,Nu=ZM(r._keyToDOMMap),Q1=(function(){const s=new Map,l=u=>{for(const d of u){const f=Nr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=s.get(h);p===void 0&&(p=new Set,s.set(h,p)),p.add(d)}};return l(eh.keys()),l(th),s})();const a=new Map;return Oh=a,as("root",null),Dt=void 0,Ph=void 0,eh=void 0,th=void 0,Wo=void 0,J1=void 0,Nr=void 0,Ih=void 0,Nu=void 0,Q1=void 0,Oh=void 0,Du=_0,a}function tx(e){const t=Nu.get(e);return t===void 0&&se(75,e),t}function Ve(e){return{type:e}}const m6=Ve("SELECTION_CHANGE_COMMAND"),Rte=Ve("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),g6=Ve("CLICK_COMMAND"),v6=Ve("BEFORE_INPUT_COMMAND"),b6=Ve("INPUT_COMMAND"),_6=Ve("COMPOSITION_START_COMMAND"),y6=Ve("COMPOSITION_END_COMMAND"),vu=Ve("DELETE_CHARACTER_COMMAND"),Xc=Ve("INSERT_LINE_BREAK_COMMAND"),Mh=Ve("INSERT_PARAGRAPH_COMMAND"),Zc=Ve("CONTROLLED_TEXT_INSERTION_COMMAND"),Tw=Ve("PASTE_COMMAND"),Cg=Ve("REMOVE_TEXT_COMMAND"),Lh=Ve("DELETE_WORD_COMMAND"),zh=Ve("DELETE_LINE_COMMAND"),Jo=Ve("FORMAT_TEXT_COMMAND"),Ate=Ve("SET_TEXT_FORMAT_COMMAND"),Dv=Ve("UNDO_COMMAND"),Fv=Ve("REDO_COMMAND"),x6=Ve("KEYDOWN_COMMAND"),S6=Ve("KEY_ARROW_RIGHT_COMMAND"),w6=Ve("MOVE_TO_END"),E6=Ve("KEY_ARROW_LEFT_COMMAND"),k6=Ve("MOVE_TO_START"),C6=Ve("KEY_ARROW_UP_COMMAND"),R6=Ve("KEY_ARROW_DOWN_COMMAND"),Uh=Ve("KEY_ENTER_COMMAND"),A6=Ve("KEY_SPACE_COMMAND"),$w=Ve("KEY_BACKSPACE_COMMAND"),T6=Ve("KEY_ESCAPE_COMMAND"),$6=Ve("KEY_DELETE_COMMAND"),N6=Ve("KEY_TAB_COMMAND"),Tte=Ve("INSERT_TAB_COMMAND"),$te=Ve("INDENT_CONTENT_COMMAND"),IA=Ve("OUTDENT_CONTENT_COMMAND"),D6=Ve("DROP_COMMAND"),Nte=Ve("FORMAT_ELEMENT_COMMAND"),F6=Ve("DRAGSTART_COMMAND"),I6=Ve("DRAGOVER_COMMAND"),Dte=Ve("DRAGEND_COMMAND"),Iv=Ve("COPY_COMMAND"),Nw=Ve("CUT_COMMAND"),P6=Ve("SELECT_ALL_COMMAND"),Fte=Ve("CLEAR_EDITOR_COMMAND"),Ite=Ve("CLEAR_HISTORY_COMMAND"),_m=Ve("CAN_REDO_COMMAND"),ym=Ve("CAN_UNDO_COMMAND"),Pte=Ve("FOCUS_COMMAND"),Ote=Ve("BLUR_COMMAND"),Mte=Ve("KEY_MODIFIER_COMMAND");function Lte(e){const t=new Map;return{dispose(){for(const r of t.values())r.dispose();t.clear()},register(r,n){let i=t.get(r);i===void 0&&(i={dispose:e(r,n),holders:new Set},t.set(r,i));const o=()=>{const a=t.get(r);a&&a.holders.delete(o)&&a.holders.size===0&&(t.delete(r),a.dispose())};return i.holders.add(o),o}}}function zte(e,t,r,n){return e.addEventListener(t,r,n),e.removeEventListener.bind(e,t,r,n)}const Za=Object.freeze({}),rx=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&Bh(r),!t.isComposing()&&Te(t,x6,e)}],["pointerdown",function(e,t){const r=N4(e),n=e.pointerType;Hd(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&Co(t,()=>{w0(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){Te(t,_6,e)}],["compositionend",function(e,t){const r=t._inputState;Al?r.compositionPhase="ending-firefox":Tl||!kp&&!Cp?Te(t,y6,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;Bh(r),Co(t,()=>{z6(e,t)||t.dispatchCommand(b6,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){Co(t,()=>{const r=ye(),n=xi(Ui(t)),i=Bd();if(n){if(le(r)){const o=r.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!jr(a)&&dn().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=Io(n,t._rootElement).anchorNode;(rt(o)||zi(o))&&On(Iw(i,n,t,e))}}Te(t,g6,e)})}],["cut",Za],["copy",Za],["dragstart",Za],["dragover",Za],["dragend",Za],["paste",Za],["focus",Za],["blur",Za],["drop",Za]];gd&&rx.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||Al&&C4(n)||i!=="insertCompositionText"&&Co(n,()=>{z6(r,n)||Te(n,v6,r)},{event:r})})(e,t)]);const nx=new WeakMap,l0=new WeakMap,Ute=Lte(e=>(e.addEventListener("selectionchange",zA),()=>e.removeEventListener("selectionchange",zA)));function O6(e,t,r,n,i,o){const a=e.anchor,s=e.focus,l=a.getNode(),u=qt();let d;if(o!==void 0)d=o;else{const g=xi(Ui(u));d=g!==null?Io(g,u._rootElement):null}const f=d!==null?d.anchorNode:null,h=a.key,p=u.getElementByKey(h),m=r.length;return h!==s.key||!ce(l)||(!i&&(!gd||u._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&m<2||w4(r))&&a.offset!==s.offset&&!l.isComposing()||Wi(l)||l.isDirty()&&m>1||(i||!gd)&&p!==null&&!l.isComposing()&&f!==wl(l,p,u)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!l.isComposing()&&(l.getFormat()!==e.format||l.getStyle()!==e.style)||(function(g,v){if(v.isSegmented())return!0;if(!g.isCollapsed())return!1;const b=g.anchor.offset,_=v.getParentOrThrow(),S=bu(v);return b===0?!v.canInsertTextBefore()||!_.canInsertTextBefore()&&!v.isComposing()||S||(function(E){const C=E.getPreviousSibling();return(ce(C)||K(C)&&C.isInline())&&!C.canInsertTextAfter()})(v):b===v.getTextContentSize()&&(!v.canInsertTextAfter()||!_.canInsertTextAfter()&&!v.isComposing()||S)})(e,l)}function PA(e,t){return zi(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function OA(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:a}=Io(e,t._rootElement),s=t._inputState;s.isSelectionChangeFromDOMUpdate&&(s.isSelectionChangeFromDOMUpdate=!1,PA(n,i)&&PA(o,a)&&!s.postDeleteSelectionToRestore)||Co(t,()=>{if(!r)return void On(null);if(!$p(t,n,o))return;let l=ye();if(s.postDeleteSelectionToRestore&&le(l)&&l.isCollapsed()){const u=l.anchor,d=s.postDeleteSelectionToRestore.anchor;(u.key===d.key&&u.offset===d.offset+1||u.offset===1&&d.getNode().is(u.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),On(l))}if(s.postDeleteSelectionToRestore=null,le(l)){const u=l.anchor,d=u.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=Ui(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:m,offset:g,key:v,timeStamp:b}=s.collapsedSelectionFormat,_=dn(),S=t.isComposing()===!1&&_.getTextContent()==="";if(h<b+200&&u.offset===g&&u.key===v)Rg(l,p,m);else if(u.type==="text")ce(d)||se(141),M6(l,d);else if(u.type==="element"&&!S){K(d)||se(259);const E=u.getNode();E.isEmpty()?(function(C,A){const T=A.getTextFormat(),R=A.getTextStyle();Rg(C,T,R)})(l,E):Rg(l,l.format,"")}}else{const f=u.key,h=l.focus.key,p=l.getNodes(),m=p.length,g=l.isBackward(),v=g?a:i,b=g?i:a,_=g?h:f,S=g?f:h;let E=2047,C=!1;for(let A=0;A<m;A++){const T=p[A],R=T.getTextContentSize();if(ce(T)&&R!==0&&!(A===0&&T.__key===_&&v===R||A===m-1&&T.__key===S&&b===0)&&(C=!0,E&=T.getFormat(),E===0))break}l.format=C?E:0}}Te(t,m6,void 0)})}function Rg(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function M6(e,t){Rg(e,t.getFormat(),t.getStyle())}function L6(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function MA(e){const{lastKeyCode:t}=qt()._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=ye();if(!le(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!ce(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const a=i.getNextSibling();if(r===`
|
|
21
|
+
`){if(_i(a))a.selectEnd();else if(!a){const s=lr(i,vd),l=s&&s.getNextSibling();K(l)&&l.selectStart()}}else r===" "?Fu(a)&&a.selectEnd():ce(a)&&a.getTextContent()[0]===r&&a.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function Bh(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function LA(e){Bh(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>Bh(e),0)}function z6(e,t){const r=N4(e);if(rt(r)&&w0(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=Vh(n.ownerDocument);return i!==null&&n.contains(i)&&w0(i,t)}function Bte(e){const t=e.inputType,r=L6(e),n=qt(),i=n._inputState,o=ye();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(Bh(i),e.preventDefault(),le(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=Bd();if(!le(f))return!0;On(f.clone())}if(le(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(Tn(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Co(n,()=>{Tn(null)})},30),le(o)){const h=o.anchor.getNode();h.markDirty(),ce(h)||se(142),M6(o,h)}}else{if(Tn(null),Tl&&r!==null&&!r.collapsed&&(o.applyDOMRange(r),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),p=h.getTextContent(),m=h.canInsertTextAfter(),g=o.anchor.offset===0&&o.focus.offset===p.length;let v=i0&&f&&!g&&m;if(v&&o.isCollapsed()&&(v=!dt(kre(o.anchor,!0))),!v){Te(n,vu,!0);const b=ye();i0&&le(b)&&b.isCollapsed()&&(i.postDeleteSelectionToRestore=b,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!le(o))return!0;const a=e.data;i.unprocessedBeforeInputData!==null&&qw(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||jr(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const s=o.anchor,l=o.focus,u=s.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(a===`
|
|
22
|
+
`)e.preventDefault(),Te(n,Xc,!1);else if(a===hu)e.preventDefault(),Te(n,Mh,void 0);else if(a==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else a!=null&&O6(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Te(n,Zc,a),MA(a)):i.unprocessedBeforeInputData=a;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Te(n,Zc,e),MA((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;Tn(null),f||Te(n,Zc,e),Ag(h);break}case"insertLineBreak":Tn(null),Te(n,Xc,!1);break;case"insertParagraph":Tn(null),i.isInsertLineBreak&&!Tl?(i.isInsertLineBreak=!1,Te(n,Xc,!1)):Te(n,Mh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Te(n,Tw,e);break;case"deleteByComposition":(function(f,h){return f!==h||K(f)||K(h)||!bu(f)||!bu(h)})(u,d)&&Te(n,Cg,e);break;case"deleteByDrag":Ou(ox),Te(n,Cg,e);break;case"deleteByCut":Te(n,Cg,e);break;case"deleteContent":Te(n,vu,!1);break;case"deleteWordBackward":Te(n,Lh,!0);break;case"deleteWordForward":Te(n,Lh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Te(n,zh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Te(n,zh,!1);break;case"formatStrikeThrough":Te(n,Jo,"strikethrough");break;case"formatBold":Te(n,Jo,"bold");break;case"formatItalic":Te(n,Jo,"italic");break;case"formatUnderline":Te(n,Jo,"underline");break;case"historyUndo":Te(n,Dv,void 0);break;case"historyRedo":Te(n,Fv,void 0)}return!0}function jte(e){const t=qt(),r=t._inputState,n=ye(),i=e.data,o=L6(e);let a=!1;if(i!=null&&le(n)){const s=xi(Ui(t)),l=s!==null?Io(s,t._rootElement):null,u=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&!t.isComposing();u&&(r.hadOrphanedCompositionEvents=!0);const d=n.anchor.getNode(),f=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&t.isComposing()&&ce(d)&&Wi(d);if(!u&&!f&&O6(n,o,i,e.timeStamp,!1,l)){if(a=!0,r.compositionPhase==="ending-firefox"){const b=u0(t,i);if(r.compositionPhase="idle",b)return Ou(jh),cT(),!0}const h=n.anchor.getNode();if(s===null||l===null)return!0;const p=n.isBackward(),m=p?n.anchor.offset:n.focus.offset,g=p?n.focus.offset:n.anchor.offset;gd&&!n.isCollapsed()&&ce(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,m)+i+h.getTextContent().slice(m+g)===k4(l.anchorNode)||Te(t,Zc,i);const v=i.length;Al&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),i0&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,Tn(null))}}return a||(qw(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(u0(t,i||void 0),Ou(jh),r.compositionPhase="idle")),cT(),!0}function qte(e){const t=qt(),r=t._inputState,n=ye();if(le(n)&&!t.isComposing()){r.compositionPhase="composing",r.hadOrphanedCompositionEvents=!1;const i=n.anchor,o=n.anchor.getNode();if(Tn(i.key),Ou(H6),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!i0&&(o.getFormat()!==n.format||ce(o)&&o.getStyle()!==n.style)||ce(o)&&(Wi(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){Te(t,Zc,Rw);const a=ye();le(a)&&Tn(a.anchor.key)}}return!0}function Vte(e){const t=qt();return t._inputState.compositionPhase="idle",u0(t,e.data),Ou(jh),!0}function Ag(e){if(e===null)return;const t=gr(e);if(!ce(t)||t.getType()==="text"||Wi(t)||!t.isAttached())return;const r=ye(),n=le(r)&&r.anchor.key===e?r.anchor.offset:null,i=Ur(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 u0(e,t){const r=e._compositionKey;if(Tn(null),r!==null&&t!=null){if(t===""){const i=gr(r),o=e.getElementByKey(r),a=o!==null&&ce(i)?wl(i,o,e):null;if(a!==null&&a.nodeValue!==null&&ce(i)){const s=xi(Ui(e)),l=s&&Io(s,e._rootElement);let u=null,d=null;l!==null&&l.anchorNode===a&&(u=l.anchorOffset,d=l.focusOffset),Vw(i,a.nodeValue,u,d,!0)}return Ag(r),!1}if(t[t.length-1]===`
|
|
23
|
+
`){const i=ye();if(le(i)||hr(i)){if(le(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return Te(e,Uh,null),Ag(r),!1}}const n=gr(r);if(n!==null&&ce(n)&&Wi(n)){n.markDirty();const i=ye(),o=n.getTextContentSize(),a=le(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(a,a).insertText(t),!0}}return qw(!0,e,t),Ag(r),!1}function Gte(e){const t=qt(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=fT(e);if(n&&Co(t,()=>{u0(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return nr(n,"ArrowRight",{shiftKey:"any"})})(e))Te(t,S6,e);else if((function(n){return nr(n,"ArrowRight",{...ts,shiftKey:"any"})})(e))Te(t,w6,e);else if((function(n){return nr(n,"ArrowLeft",{shiftKey:"any"})})(e))Te(t,E6,e);else if((function(n){return nr(n,"ArrowLeft",{...ts,shiftKey:"any"})})(e))Te(t,k6,e);else if((function(n){return nr(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))Te(t,C6,e);else if((function(n){return nr(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))Te(t,R6,e);else if((function(n){return nr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,Te(t,Uh,e);else if((function(n){return n.key===" "})(e))Te(t,A6,e);else if((function(n){return Vo&&nr(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,Te(t,Xc,!0);else if((function(n){return nr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,Te(t,Uh,e);else if((function(n){return nr(n,"Backspace",{shiftKey:"any"})||Vo&&nr(n,"h",{ctrlKey:!0})})(e))fT(e)?Te(t,$w,e)&&LA(r):(e.preventDefault(),Te(t,vu,!0));else if((function(n){return n.key==="Escape"})(e))Te(t,T6,e);else if((function(n){return nr(n,"Delete",{})||Vo&&nr(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?Te(t,$6,e):(e.preventDefault(),Te(t,vu,!1));else if((function(n){return nr(n,"Backspace",dT)})(e))e.preventDefault(),Te(t,Lh,!0);else if((function(n){return nr(n,"Delete",dT)})(e))e.preventDefault(),Te(t,Lh,!1);else if((function(n){return Vo&&nr(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),Te(t,zh,!0);else if((function(n){return Vo&&(nr(n,"Delete",{metaKey:!0})||nr(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),Te(t,zh,!1);else if((function(n){return nr(n,"b",ts)})(e))e.preventDefault(),Te(t,Jo,"bold");else if((function(n){return nr(n,"u",ts)})(e))e.preventDefault(),Te(t,Jo,"underline");else if((function(n){return nr(n,"i",ts)})(e))e.preventDefault(),Te(t,Jo,"italic");else if((function(n){return nr(n,"Tab",{shiftKey:"any"})})(e))Te(t,N6,e);else if((function(n){return nr(n,"z",ts)})(e))e.preventDefault(),Te(t,Dv,void 0);else if((function(n){return Vo?nr(n,"z",{metaKey:!0,shiftKey:!0}):nr(n,"y",{ctrlKey:!0})||nr(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),Te(t,Fv,void 0);else{const n=t._editorState._selection;(function(i){return nr(i,"a",ts)})(e)?(e.preventDefault(),Te(t,P6,e)&&LA(r)):n===null||le(n)||((function(i){return nr(i,"c",ts)})(e)?(e.preventDefault(),Te(t,Iv,e)):(function(i){return nr(i,"x",ts)})(e)&&(e.preventDefault(),Te(t,Nw,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(Mte,e),!0}function U6(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const ed=new Map;function zA(e){const t=Tre(e.target);if(t===null)return;const r=Kw(e.target);let n=null,i=null;const o=r!==null?l0.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&&Ts(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,m=null;for(const g of f){const v=g._rootElement;if(v===null)continue;const b=Io(t,v).anchorNode;if(b!==null&&rd(b)===g){if(Ts(v.getRootNode())){n=g,i=b;break}p===null&&(p=g,m=b)}}n===null&&p!==null&&(n=p,i=m)}else{const p=t.anchorNode;p===null||rt(p)&&p.shadowRoot!==null||(n=rd(p),n!==null&&(i=p))}}if(n===null){const f=Vh(r);n=f!==null?rd(f):null}}if(n===null)return;if(n._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;Co(n,()=>{const f=Bd(),h=i??Io(t,n._rootElement).anchorNode;(rt(h)||zi(h))&&On(Iw(f,t,n,e))})}const a=jw(n),s=a[a.length-1],l=s._key,u=ed.get(l),d=u||s;d!==n&&OA(t,d,!1),OA(t,n,!0),n!==s?ed.set(l,n):u&&ed.delete(l)}function UA(e){e._lexicalHandled=!0}function BA(e){return e._lexicalHandled===!0}function Kte(e){const t=nx.get(e);if(t===void 0)return;const r=l0.get(t);if(r===void 0)return;nx.delete(e);const n=Np(e);Mv(n)?((function(o){if(o._parentEditor!==null){const a=jw(o),s=a[a.length-1]._key;ed.get(s)===o&&ed.delete(s)}else ed.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&se(198);const i=U6(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function ix(e,t,r){An();const n=e.__key,i=e.getParent();if(i===null)return void(Wn(e)!==null&&se(367,n,String(Wn(e))));const o=(function(s){const l=ye();if(!le(l)||!K(s))return l;const{anchor:u,focus:d}=l,f=u.getNode(),h=d.getNode();return xd(f,s)&&u.set(s.__key,0,"element"),xd(h,s)&&d.set(s.__key,0,"element"),l})(e);let a=!1;if(le(o)&&t){const s=o.anchor,l=o.focus;s.key===n&&(p0(s,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),l.key===n&&(p0(l,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else hr(o)&&t&&e.isSelected()&&e.selectPrevious();if(le(o)&&t&&!a){const s=e.getIndexWithinParent();hs(e),uu(o,i,s,-1)}else hs(e);r||yr(i)||i.canBeEmpty()||!i.isEmpty()||ix(i,t),t&&o&&jr(i)&&i.isEmpty()&&i.selectEnd()}const B6=Symbol.for("ephemeral");function c0(e){return e[B6]||!1}const jA={configurable:!0,enumerable:!1,value:void 0,writable:!0};class Zi{__type;__key;__parent;__prev;__next;__state;[Fh];static getType(){const{ownNodeType:t}=Ww(this);return t===void 0&&se(64,this.name),t}static clone(t){se(65,this.name)}$config(){return{}}config(t,r){const n=r.extends||O4(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",jA),Object.defineProperty(this,Fh,jA),_4(this,t)}getType(){return this.__type}isInline(){se(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const r=gr(t);if(r===null)break;t=r.__parent!==null?r.__parent:Wn(r)}return!1}isSelected(t){const r=t||ye();if(r==null)return!1;const n=r.getNodes().some(i=>i.__key===this.__key);if(ce(this))return n;if(le(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(dt(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:gr(t)}getParentOrThrow(){const t=this.getParent();return t===null&&se(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const r=t.getParent();if(yr(r)||Wn(t)!==null)return K(t)||t===this&&dt(t)||se(194),t;t=r}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&se(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:gr(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:gr(t)}getNextSiblings(){const t=[];let r=this.getNextSibling();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getCommonAncestor(t){const r=K(this)?this:this.getParent(),n=K(t)?t:t.getParent(),i=r&&n?mx(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=mx(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?j4(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&se(279),!1)))}isParentOf(t){return xd(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const a=o.__key;if(i.has(a)||(i.add(a),n.push(o)),o===t)break;const s=K(o)?r?o.getFirstChild():o.getLastChild():null;if(s!==null){o=s;continue}const l=r?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const u=o.getParentOrThrow();if(i.has(u.__key)||n.push(u),u===t)break;let d=null,f=u;do{if(f===null&&se(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=qt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(c0(this))return this;const t=gr(this.__key);return t===null&&se(113),t}getWritable(){if(c0(this))return this;An();const t=Os(),r=qt(),n=t._nodeMap,i=this.__key,o=this.getLatest(),a=r._cloneNotNeeded,s=ye();if(s!==null&&s.setCachedNodes(null),a.has(i))return y0(o),o;const l=F4(o);return a.add(i),y0(l),n.set(i,l),l}getTextContent(){return L4(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){se(70)}updateDOM(t,r,n){se(71)}getDOMSlot(t){return new QM(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){se(18,this.name)}updateFromJSON(t){return(function(r,n){const i=r.getWritable(),o=n.$;let a=o;for(const s of a6(i).flatKeys)s in n&&(a!==void 0&&a!==o||(a={...o}),a[s]=n[s]);return(i.__state||a)&&o6(r).updateFromJSON(a),i})(this,t)}static transform(){return null}remove(t){ix(this,!0,t)}replace(t,r){An();let n=ye();n!==null&&(n=n.clone()),F_(this,t);const i=this.getLatest(),o=this.__key,a=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size,d=s.getParent(),f=d!==null?s.getIndexWithinParent():-1;hs(s),d!==null&&le(n)&&uu(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),m=i.__prev,g=i.__next,v=i.__parent;ix(i,!1,!0),h===null?l.__first=a:h.getWritable().__next=a,s.__prev=m,p===null?l.__last=a:p.getWritable().__prev=a,s.__next=g,s.__parent=v,l.__size=u;let b=0;r&&(K(this)&&K(s)||se(139),b=s.getChildrenSize(),s.splice(b,0,this.getChildren()));const _=Ro(this);if(_.length>0){bs(this)&&bs(s)||se(368,this.__key,s.__key);for(const S of _){const E=Lu(this,S);E!==null&&(Hre(this,S),z4(s,S,E))}}if(le(n)){On(n);const S=n.anchor,E=n.focus;S.key===o&&(r&&S.type==="element"?S.set(s.__key,b+S.offset,"element"):KA(S,s)),E.key===o&&(r&&E.type==="element"?E.set(s.__key,b+E.offset,"element"):KA(E,s))}return ps()===o&&Tn(a),s}insertAfter(t,r=!0){An(),F_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),a=ye();let s=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(le(a)){const m=o.__key,g=a.anchor,v=a.focus;s=g.type==="element"&&g.key===m&&g.offset===p+1,l=v.type==="element"&&v.key===m&&v.offset===p+1}hs(i),r&&le(a)&&uu(a,o,p,-1)}else hs(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&&le(a)){const p=this.getIndexWithinParent();uu(a,d,p+1);const m=d.__key;s&&a.anchor.set(m,p+2,"element"),l&&a.focus.set(m,p+2,"element")}return t}insertBefore(t,r=!0){An(),F_(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,a=ye(),s=i.getParent(),l=s!==null?i.getIndexWithinParent():-1;hs(i),s!==null&&r&&le(a)&&uu(a,s,l,-1);const u=this.getPreviousSibling(),d=this.getParentOrThrow().getWritable(),f=n.__prev,h=this.getIndexWithinParent();return u===null?d.__first=o:u.getWritable().__next=o,d.__size++,n.__prev=o,i.__prev=f,i.__next=n.__key,i.__parent=n.__parent,r&&le(a)&&uu(a,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return Wt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){An();const n=Qo(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(K(i))return i.select();if(!ce(i)){const a=i.getIndexWithinParent()+1;return o.select(a,a)}return i.select(t,r)}selectNext(t,r){An();const n=Qo(this);if(n!==null)return n.selectNext(t,r);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(K(i))return i.select(0,0);if(!ce(i)){const a=i.getIndexWithinParent();return o.select(a,a)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function j6(e){return e instanceof Zi}const d0="historic",q6="history-push",rh="history-merge",V6="paste",G6="cut",K6="collaboration",Hte="skip-scroll-into-view",Wte="skip-dom-selection",ox="skip-selection-focus",H6="composition-start",jh="composition-end",Jte="!important";function f0(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,a=!1,s=!1,l=0;const u=e.length;let d=-1;for(let p=0;p<u;p++){const m=e[p];if(o)m==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(a)d===-1&&(d=p),a=!1;else if(i===null)if(m!=="/"||e[p+1]!=="*")if(m!=='"'&&m!=="'")if(m!=="(")if(m!==")")if(s||m!==":"||l!==0){if(m===";"&&l===0){d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const g=r.trim(),v=n.trim();g!==""&&v!==""&&(t[g]=v),r="",n="",s=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),s=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=m;else d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),m==="\\"?a=!0:m===i&&(i=null)}d!==-1&&(s?n+=e.slice(d,u):r+=e.slice(d,u));const f=r.trim(),h=n.trim();return f!==""&&h!==""&&(t[f]=h),t}function Qte(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===Jte?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function td(e,t,r=""){if(t===r)return;const n=f0(r),i=f0(t);for(const o in i)delete n[o],Qte(e,o,i[o]);for(const o in n)e.removeProperty(o)}function k_(e,t){return 16&t?"code":t&Cw?"mark":32&t?"sub":64&t?"sup":null}function C_(e,t){return 1&t?"strong":2&t?"em":"span"}function W6(e,t,r,n,i){const o=n.classList;let a=nd(i,"base");a!==void 0&&o.add(...a),a=nd(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;a!==void 0&&(8&r&&4&r?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const u in As){const d=As[u];if(a=nd(i,u),a!==void 0)if(r&d){if(s&&(u==="underline"||u==="strikethrough")){t&d&&o.remove(...a);continue}((t&d)===0||l&&u==="underline"||u==="strikethrough")&&o.add(...a)}else t&d&&o.remove(...a)}}function J6(e,t,r){const n=r.isComposing(),i=e+(n?Dh:""),o=Or(),a=zv(o).$getDOMSlot(r,t,o),s=a.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void a.insertChild(br().createTextNode(i));const l=s,u=l.nodeValue;if(u!==i)if(n||Al){const[d,f,h]=(function(p,m){const g=p.length,v=m.length;let b=0,_=0;for(;b<g&&b<v&&p[b]===m[b];)b++;for(;_+b<g&&_+b<v&&p[g-_-1]===m[v-_-1];)_++;return[b,g-b-_,m.slice(b,v-_)]})(u,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function qA(e,t,r,n,i,o){J6(i,e,t);const a=o.theme.text;a!==void 0&&W6(0,0,n,e,a)}function xm(e,t){const r=br().createElement(t);return r.appendChild(e),r}function ax(e){return e!=null&&e.__isInlineFormattable===!0}class Ps extends Zi{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new Ps(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 hte[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===ps()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=As[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return Iu(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const n=this.__format,i=k_(0,n),o=C_(0,n),a=i===null?o:i,s=br().createElement(a);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),i!==null&&(l=br().createElement(o),s.appendChild(l)),qA(l,this,0,n,this.__text,t);const u=this.__style;return u!==""&&td(s.style,u),s}updateDOM(t,r,n){const i=this.__text,o=t.__format,a=this.__format,s=k_(0,o),l=k_(0,a),u=C_(0,o),d=C_(0,a);if((s===null?u:s)!==(l===null?d:l))return!0;if(s===l&&u!==d){const g=r.firstChild;g==null&&se(48);const v=br().createElement(d);return qA(v,this,0,a,i,n),r.replaceChild(v,g),!1}let f=r;l!==null&&s!==null&&(f=r.firstChild,f==null&&se(49)),J6(i,f,this);const h=n.theme.text;h!==void 0&&o!==a&&W6(0,o,a,f,h);const p=t.__style,m=this.__style;return p!==m&&td(r.style,m,p),!1}static importDOM(){return{"#text":()=>({conversion:ere,priority:0}),b:()=>({conversion:Xte,priority:0}),code:()=>({conversion:es,priority:0}),em:()=>({conversion:es,priority:0}),i:()=>({conversion:es,priority:0}),mark:()=>({conversion:es,priority:0}),s:()=>({conversion:es,priority:0}),span:()=>({conversion:Yte,priority:0}),strong:()=>({conversion:es,priority:0}),sub:()=>({conversion:es,priority:0}),sup:()=>({conversion:es,priority:0}),u:()=>({conversion:es,priority:0})}}static importJSON(t){return Ur().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 rt(r)||se(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=xm(r,"b")),this.hasFormat("italic")&&(r=xm(r,"i")),this.hasFormat("strikethrough")&&(r=xm(r,"s")),this.hasFormat("underline")&&(r=xm(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"?As[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?cte[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=Iu(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=fte[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=ye(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!le(o))return a4(s,n,s,i,"text","text");{const l=ps();l!==o.anchor.key&&l!==o.focus.key||Tn(s),o.setTextNodeRange(this,n,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,r,n,i){const o=this.getWritable(),a=o.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const u=ye();if(i&&le(u)){const f=t+s;u.setTextNodeRange(o,f,o,f)}const d=a.slice(0,l)+n+a.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){An();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=ps(),a=n.length;t.sort((R,N)=>R-N),t.push(a);const s=[],l=t.length;for(let R=0,N=0;R<a&&N<=l;N++){const I=t[N];I>R&&(s.push(n.slice(R,I)),R=I)}const u=s.length;if(u===1)return[r];const d=s[0],f=r.getParent();let h;const p=r.getFormat(),m=r.getStyle(),g=r.__detail;let v=!1,b=null,_=null;const S=ye();if(le(S)){const[R,N]=S.isBackward()?[S.focus,S.anchor]:[S.anchor,S.focus];R.type==="text"&&R.key===i&&(b=R),N.type==="text"&&N.key===i&&(_=N)}r.isSegmented()?(h=Ur(d),h.__format=p,h.__style=m,h.__detail=g,h.__state=EA(r,h),v=!0):h=r.setTextContent(d);const E=[h];for(let R=1;R<u;R++){const N=Ur(s[R]);N.__format=p,N.__style=m,N.__detail=g,N.__state=EA(r,N);const I=N.__key;o===i&&Tn(I),E.push(N)}const C=b?b.offset:null,A=_?_.offset:null;let T=0;for(const R of E){if(!b&&!_)break;const N=T+R.getTextContentSize();if(b!==null&&C!==null&&C<=N&&C>=T&&(b.set(R.getKey(),C-T,"text"),C<N&&(b=null)),_!==null&&A!==null&&A<=N&&A>=T){_.set(R.getKey(),A-T,"text");break}T=N}if(f!==null){(function(I){const M=I.getPreviousSibling(),P=I.getNextSibling();M!==null&&y0(M),P!==null&&y0(P)})(this);const R=f.getWritable(),N=this.getIndexWithinParent();v?(R.splice(N,0,E),this.remove()):R.splice(N,1,E),le(S)&&uu(S,f,N,u-1)}return E}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||se(50);const n=this.__key,i=t.__key,o=this.__text,a=o.length;ps()===i&&Tn(n);const s=ye();if(le(s)){const f=s.anchor,h=s.focus;f!==null&&f.key===i&&ZA(f,r,n,t,a),h!==null&&h.key===i&&ZA(h,r,n,t,a)}const l=t.__text,u=r?l+o:o+l;this.setTextContent(u);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function Yte(e){return{forChild:Dw(e.style),node:null}}function Xte(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:Dw(t.style,r?void 0:"bold"),node:null}}const VA=new WeakMap;function Zte(e){if(!rt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function ere(e){const t=e;e.parentElement===null&&se(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const a=[n];for(;o!==null&&(i=VA.get(o))===void 0&&!Zte(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l<a.length;l++)VA.set(a[l],s);return s})(t)!==null)return{node:qh(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=GA(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=GA(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:Ur(r)}}function GA(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,rt(r)){const o=r.style.display;if(o===""&&!S0(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(zi(r))return r;if(r.nodeName==="BR")return null}}const tre={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function es(e){const t=tre[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Dw(e.style,t),node:null}}function Ur(e=""){return fa(new Ps(e))}function ce(e){return e instanceof Ps}function Dw(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),a=e.fontStyle==="italic",s=n.includes("underline"),l=e.verticalAlign;return u=>((ce(u)||ax(u))&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),s&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class zd extends Ps{static getType(){return"tab"}static clone(t){return new zd(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const r=super.createDOM(t),n=nd(t.theme,"tab");return n!==void 0&&r.classList.add(...n),r}static importJSON(t){return Ud().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,r,n,i){return n===""&&r===0||n===" "&&r===1||se(286),this}setDetail(t){return t!==2&&se(127),this}setMode(t){return t!=="normal"&&se(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ud(){return fa(new zd)}function Fu(e){return e instanceof zd}class rre{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:Kh(Ji(Di(this,"next")),Ji(Di(t,"next")))<0}getNode(){const t=gr(this.key);return t===null&&se(20),t}set(t,r,n,i){const o=this._selection,a=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,bd()||(ps()===a&&Tn(t),o!==null&&(o.setCachedNodes(null),le(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function za(e,t,r){return new rre(e,t,r)}function R_(e,t){let r=t.__key,n=e.offset,i="element";if(ce(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!K(t)){const o=t.getNextSibling();if(ce(o))r=o.__key,n=0,i="text";else{const a=t.getParent();a&&(r=a.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function KA(e,t){if(K(t)){const r=t.getLastDescendant();K(r)||ce(r)?R_(e,r):R_(e,t)}else R_(e,t)}class Pv{_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(!hr(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 Pv(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(a=>Wn(a)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(ce(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a<n;a++)r[a].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=gr(i);o!==null&&n.push(o)}return bd()||(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=>Wn(r)===null);if((ye()||Bd())===this&&t[0]){const r=Bt(t[0],"next");Hh(Zo(r,r))}for(const r of t)r.remove();Q6()}}function Q6(){const e=dn();if(e.isEmpty()){const t=Wt();e.append(t),t.select()}}function le(e){return e instanceof Qu}class Qu{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!!le(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=(function(n){const i=[],[o,a]=n.getTextSlices();o&&i.push(o.caret.origin);const s=new Set,l=new Set;for(const u of n)if(To(u)){const{origin:d}=u;i.length===0?s.add(d):(l.add(d),i.push(d))}else{const{origin:d}=u;K(d)&&l.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),$l(n.focus)&&K(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let u=Oo(n.focus.origin,"previous");To(u)&&s.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=Xw(u))s.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!K(u)||l.has(u)||u.isEmpty()||s.has(u))break;i.pop()}if(i.length===0&&n.isCollapsed()){const u=Ji(n.anchor),d=Ji(n.anchor.getFlipped()),f=p=>Ao(p)?p.origin:p.getNodeAtCaret(),h=f(u)||f(d)||(n.anchor.getNodeAtCaret()?u.origin:d.origin);i.push(h)}return i})(tE(gx(this),"next"));return bd()||(this._cachedNodes=r),r}setTextNodeRange(t,r,n,i){return this.anchor.set(t.__key,r,"text"),this.focus.set(n.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const r=t[0],n=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=sx(this);let u="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(K(h)&&!h.isInline()){d||(u+=`
|
|
24
|
+
`);let p="";for(const m of Ro(h)){const g=Lu(h,m);g!==null&&(p+=g.getTextContent())}p!==""?(u+=p,d=!1):d=!h.isEmpty()}else if(d=!1,ce(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=s<l?p.slice(s,l):p.slice(l,s)):p=a?p.slice(s):p.slice(l):h===n&&(p=a?p.slice(0,l):p.slice(0,s)),u+=p}else!dt(h)&&!_i(h)||h===n&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(t){const r=qt(),n=r.getEditorState()._selection,i=o4(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,a,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(a.key,a.offset,a.type,!0),s&&(this.dirty=!0),hl(this)}clone(){const t=this.anchor,r=this.focus;return new Qu(za(t.key,t.offset,t.type),za(r.key,r.offset,r.type),this.format,this.style)}toggleFormat(t){this.format=Iu(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=As[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(qh(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let a=r,s=n;!this.isCollapsed()&&n.isBefore(r)&&(a=n,s=r),a.type==="element"&&(function(v,b,_,S){const E=v.getNode(),C=E.getChildAtIndex(v.offset),A=Ur();if(A.setFormat(_),A.setStyle(S),Gd(C))C.splice(0,0,[A]);else if(C!==null){const T=yr(E)?Wt().append(A):A;C.insertBefore(T)}else if(yr(E)){const T=E.getLastChild();K(T)&&!T.isInline()&&T.isEmpty()?T.append(A):E.append(Wt().append(A))}else E.append(A);v.is(b)&&b.set(A.__key,0,"text"),v.set(A.__key,0,"text")})(a,s,i,o),s.type==="element"&&Bu(s,Ji(Di(s,"next")));const l=a.offset;let u=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];ce(h)||se(26);const p=h.getTextContent().length,m=h.getParentOrThrow();let g=d[f-1];if(f===1&&s.type==="element"&&(u=p,s.set(a.key,u,"text")),this.isCollapsed()&&l===p&&(Wi(h)||!h.canInsertTextAfter()||!m.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let b;if(ce(v)&&v.canInsertTextBefore()&&!Wi(v)?b=v:(b=Ur(),b.setFormat(i),b.setStyle(o),m.canInsertTextAfter()?h.insertAfter(b):m.insertAfter(b)),b.select(0,0),h=b,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Wi(h)||!h.canInsertTextBefore()||!m.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let b;if(!ce(v)||Wi(v)?(b=Ur(),b.setFormat(i),m.canInsertTextBefore()?h.insertBefore(b):m.insertBefore(b)):b=v,b.select(),h=b,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(ps()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=Ur(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=g.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||K(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),r4(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(bu(h)){const S=Ur(t);return S.select(),void h.replace(S)}const v=h.getFormat(),b=h.getStyle();if(l!==u||v===i&&b===o){if(Fu(h)){const S=Ur(t);return S.setFormat(i),S.setStyle(o),S.select(),void h.replace(S)}}else{if(h.getTextContent()!==""){const S=Ur(t);if(S.setFormat(i),S.setStyle(o),S.select(),l===0)h.insertBefore(S,!1);else{const[E]=h.splitText(l);E.insertAfter(S,!1)}return void(S.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}h.setFormat(i),h.setStyle(o)}const _=u-l;h=h.spliceText(l,_,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=v,this.style=b,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const v=new Set([...h.getParentKeys(),...g.getParentKeys()]),b=K(h)?h:h.getParentOrThrow();let _=K(g)?g:g.getParentOrThrow(),S=g;if(!b.is(_)&&_.isInline())do S=_,_=_.getParentOrThrow();while(_.isInline());if(s.type==="text"&&(u!==0||g.getTextContent()==="")||s.type==="element"&&g.getIndexWithinParent()<u)if(ce(g)&&!bu(g)&&u!==g.getTextContentSize()){if(g.isSegmented()){const R=Ur(g.getTextContent());g.replace(R),g=R}jr(s.getNode())||s.type!=="text"||(ce(g)||se(395),g=g.spliceText(0,u,"")),v.add(g.__key)}else{const R=g.getParentOrThrow();R.canBeEmpty()||R.getChildrenSize()!==1?g.remove():R.remove()}else v.add(g.__key);const E=_.getChildren(),C=new Set(d),A=b.is(_),T=b.isInline()&&h.getNextSibling()===null?b:h;for(let R=E.length-1;R>=0;R--){const N=E[R];if(N.is(h)||K(N)&&N.isParentOf(h))break;N.isAttached()&&(!C.has(N)||N.is(S)?A||T.insertAfter(N,!1):N.remove())}if(!A){let R=_,N=null;for(;R!==null;){const I=R.getChildren(),M=I.length;(M===0||I[M-1].is(N))&&(v.delete(R.__key),N=R),R=R.getParent()}}if(bu(h))if(l===p)h.select();else{const R=Ur(t);R.select(),h.replace(R)}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 R=1;R<f;R++){const N=d[R],I=N.__key;v.has(I)||N.remove()}}}removeText(){const t=ye()===this;Dg(this,tne(gx(this))),t&&ye()!==this&&On(this)}formatText(t,r=null){X6(this,t,r)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const r=this.anchor.getNode();if(this.anchor.type==="element"&&K(r)&&Wn(r)!==null){let g=r.isShadowRoot()?r.getFirstChild()??r.append(Wt()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&g!==null&&!K(g)){const v=Wt();g.insertBefore(v),g=v}if(g!==null){g.selectStart();const v=ye();return le(v)||se(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&yr(r)){const g=T_(t),v=g.getLastDescendant();return r.splice(this.anchor.offset,0,g.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=lr(n,Vn);const o=t[t.length-1];if(K(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=yf(this);i.splice(g,0,t),o.selectEnd()}return}if(!t.some(g=>(K(g)||dt(g))&&!g.isInline())){K(i)||se(211,n.constructor.name,n.getType());const g=yf(this);return i.splice(g,0,t),void o.selectEnd()}if(K(i)&&Wn(i)!==null){const g=yf(this),v=ux(t);i.splice(g,0,v);const b=v[v.length-1];return void(b!==void 0?b.selectEnd():i.select(g,g))}if(i===null){const g=T_(t),v=g.getLastDescendant();let b=Di(this.anchor,"next");for(const _ of g.getChildren())b=V4(_,b);return void(v!==null&&v.selectEnd())}if(K(i)&&!i.isParentRequired()&&!yr(i.getParentOrThrow())){const g=yf(this),v=ux(t);i.splice(g,0,v);const b=v[v.length-1];return void(b!==void 0?b.selectEnd():i.select(g,g))}const a=T_(t),s=a.getLastDescendant(),l=a.getChildren(),u=!K(i)||!i.isEmpty()?this.insertParagraph():null;u&&!i.isAttached()&&(n=this.anchor.getNode(),i=lr(n,Vn));const d=l[l.length-1];let f=l[0];var h;K(h=f)&&Vn(h)&&!h.isEmpty()&&K(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(K(i)||se(211,n.constructor.name,n.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&se(212,n.constructor.name,n.getType()),(function(g,v){const b=v.getParentOrThrow().getLastChild();let _=v;const S=[v];for(;_!==b;)_.getNextSibling()||se(140),_=_.getNextSibling(),S.push(_);let E=g;for(const C of S)E=E.insertAfter(C)})(i,f));const p=lr(s,Vn);u&&K(p)&&(u.canMergeWhenEmpty()||Vn(d))&&(p.append(...u.getChildren()),u.remove()),K(i)&&i.isEmpty()&&i.remove(),s.selectEnd();const m=K(i)?i.getLastChild():null;_i(m)&&p!==i&&m.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&yr(t)){const s=Wt();return t.splice(this.anchor.offset,0,[s]),s.select(),s}const r=yf(this),n=lr(this.anchor.getNode(),Vn);if(n!==null&&Wn(n)!==null)return null;K(n)||se(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...o),a.selectStart(),a):null}insertLineBreak(t){const r=na();if(this.insertNodes([r]),t){const n=r.getParentOrThrow(),i=r.getIndexWithinParent();n.select(i,i)}}extract(){const t=[...this.getNodes()],r=t.length;let n=t[0],i=t[r-1];const[o,a]=sx(this),s=this.isBackward(),[l,u]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(r===0)return[];if(r===1){if(ce(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(ce(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),ce(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(g0(this,t,r,n))return;const i=t==="move",o=qt(),a=xi(Ui(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,u=this.focus.getNode();l===null||s===null||!K(u)||u.isInline()||u.canBeEmpty()||x0(s,o,l);const d=yd(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=ce(u)?wl(u,d,o):null),this.dirty){const h=yd(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const m=this.anchor.getNode();p=ce(m)?wl(m,h,o):null}p&&f&&m0(a,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&ce(u)&&u.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===u.getTextContentSize())){const h=Bt(u,r?"previous":"next").getNodeAtCaret();if(ce(h)){if(!i){const p=h.getTextContentSize();return r?this.focus.set(h.__key,p-1,"text"):this.focus.set(h.__key,1,"text"),void(this.dirty=!0)}{const p=o.getElementByKey(h.getKey()),m=p?wl(h,p,o):null;if(m){const g=r?m.length:0;m0(a,m,g,m,g)}}}}if(e4(a,t,r?"backward":"forward",n),a.rangeCount>0){const h=Lv(a,o._rootElement),p=h||a.getRangeAt(0),m=this.anchor.getNode(),g=jr(m)?m:R4(m);this.applyDOMRange(p),this.dirty=!0,!i&&(t4(this,r,g),(h?a.direction!=="backward":a.anchorNode===p.startContainer&&a.anchorOffset===p.startOffset)||Z6(this))}n==="lineboundary"&&g0(this,t,r,n,"decorators")}forwardDeletion(t,r,n){if(!n&&(t.type==="element"&&K(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(K(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=jv(Di(n,t?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(To(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(K(o.anchor.origin)&&o.anchor.origin.isEmpty()){const u=Ji(l);Dg(this,Zo(u,u)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if($l(l)){if(K(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(dt(l.origin)){if(!l.origin.isIsolated())if(Ro(l.origin).length>0){if(K(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=h0();u.add(l.origin.getKey()),On(u)}}else if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&K(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const u=h0();u.add(l.origin.getKey()),On(u)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:u}=s;return Ro(u).length>0?void 0:l.origin.isEmpty()&&!u.isEmpty()&&l.origin.getParent()===u.getParent()?void l.origin.remove(!0):(Dg(this,Zo(!l.origin.isEmpty()&&u.isEmpty()?ec(Bt(u,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if(Wn(l)!==null)return;if(K(l)&&l.isShadowRoot())break;l=l.getParent()}}const a=this.focus;if(A_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&WA(this,n.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=n.type==="text"?n.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,u=s.getTextContentSize();if(s.is(i)||t&&l!==u||!t&&l!==0)return void JA(s,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,u=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==u)return void JA(i,t,l)}(function(l,u){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const m=d.offset,g=f.offset,v=m<g,b=v?m:g,_=v?g:m,S=_-1;b!==S&&(function(E){return!(w4(E)||ire(E))})(h.getTextContent().slice(b,_))&&(u?f.set(f.key,S,f.type):d.set(d.key,S,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()&&jr(n.getParent())&&n.getPreviousSibling()===null&&WA(this,n),Q6()}}deleteLine(t){const r=lx(this.anchor);if(r!==null&&dt(Qo(r)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&A_(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):lr(this.anchor.getNode(),Vn)!==lr(this.focus.getNode(),Vn)?(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;A_(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 bd()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function hr(e){return e instanceof Pv}function Y6(e,t){if(hr(e)){for(const b of e.getNodes())ax(b)&&b.setFormat(t(b.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void Tn(null);const r=[];for(const b of e.getNodes())ce(b)?r.push(b):K(b)?b.setTextFormat(t(b.getTextFormat())):ax(b)&&b.setFormat(t(b.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void Tn(null);const i=e.anchor,o=e.focus,a=e.isBackward(),s=a?o:i,l=a?i:o;let u=0,d=r[0],f=s.type==="element"?0:s.offset;if(s.type==="text"&&f===d.getTextContentSize()&&(u=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const m=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===m)return;const b=t(d.getFormat());if(Wi(d)||f===0&&m===d.getTextContentSize())d.setFormat(b);else{const _=d.splitText(f,m),S=f===0?_[0]:_[1];S.setFormat(b),s.type==="text"&&s.set(S.__key,0,"text"),l.type==="text"&&l.set(S.__key,m-f,"text")}return void(e.format=b)}f===0||Wi(d)||([,d]=d.splitText(f),f=0);const g=t(d.getFormat());d.setFormat(g);const v=t(p.getFormat());m>0&&(m===p.getTextContentSize()||Wi(p)||([p]=p.splitText(m)),p.setFormat(v));for(let b=u+1;b<h;b++){const _=r[b];_.setFormat(t(_.getFormat()))}s.type==="text"&&s.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,m,"text"),e.format=g|v}function nre(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&Y6(e,n=>{for(const[i,o]of r)n=Iu(n,i,o?As[i]:0);return n})}function X6(e,t,r=null){const n=r===null&&le(e)?Iu(e.format,t,null):r;Y6(e,i=>Iu(i,t,n))}function HA(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function sx(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]:[HA(r),HA(n)]}function WA(e,t){for(let r=t;r;r=r.getParent()){if(K(r)){if(r.collapseAtStart(e))return!0;if(yr(r))break}if(r.getPreviousSibling())break}return!1}function Z6(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 e4(e,t,r,n){e.modify(t,r,n)}function t4(e,t,r){const n=e.getNodes(),i=n.filter(s=>xd(s,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],a=K(o)?o:o.getParentOrThrow();return t?a.selectStart():a.selectEnd(),!0}function A_(e,t,r){if(g0(e,"extend",t,r))return;const n=qt(),i=xi(Ui(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,a=n._rootElement,s=e.anchor,l=e.focus.getNode();a===null||o===null||!K(l)||l.isInline()||l.canBeEmpty()||x0(o,n,a);const u=N=>{const I=N.getNode(),M=n.getElementByKey(N.key);return M!==null&&N.type==="text"&&ce(I)?wl(I,M,n):M},d=s.getNode(),f=u(s);if(f===null)return;const h=s.offset,p=e.isCollapsed(),m=e.focus,g=p?f:u(m);if(g===null)return;const v=m.offset;if(m0(i,g,v,g,v),e4(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const b=Lv(i,a)||i.getRangeAt(0),_=b.startContainer,S=b.startOffset;if(p&&r==="character"&&s.type==="text"&&ce(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const N=Bt(d,t?"previous":"next").getNodeAtCaret();if(ce(N)){const I=t?N.getTextContentSize()-1:1;return e.focus.set(N.__key,I,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&s.type==="text"){const N=t?0:d.getTextContentSize(),I=_===f?S:h!==N?N:-1;if(I>=0)return void(I!==h&&(e.focus.set(s.key,I,"text"),e.dirty=!0))}const[E,C,A,T]=t?[_,S,f,h]:[f,h,_,S],R=jr(d)?d:R4(d);e.applyDOMRange({collapsed:!1,endContainer:A,endOffset:T,startContainer:E,startOffset:C}),e.dirty=!0,!t4(e,t,R)&&t&&Z6(e),r==="lineboundary"&&g0(e,"extend",t,r,"decorators")}const ire=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function JA(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let u=0;u<o;u++){const d=u===o-1;if(s=a,a+=i[u].length,t&&a===r||a>r||d){i.splice(u,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(s,s))}function QA(e,t,r,n){let i,o=t,a=!1;if(rt(e)){let s=!1;const l=e.childNodes,u=l.length,d=n._blockCursorElement;o===u&&u>0&&(s=!0,o=u-1),Kd(e,n)!==void 0||w0(e,n)||(a=!0);let f=l[o],h=!1;if(f===d)f=l[o+1],h=!0;else if(d!==null){const p=d.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,d)&&o--}if(i=zc(f),ce(i))o=Pa(i,s?"next":"previous");else{let p=zc(e);if(p===null)return null;if(K(p)){const m=n.getElementByKey(p.getKey());m===null&&se(214),[p,o]=Po(p,m,n).resolveChildIndex(p,m,e,t),K(p)||se(215),s&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(K(v)&&(function(b,_,S){const E=b.getParent();return S===null||E===null||!E.canBeEmpty()||E!==S.getNode()})(v,0,r)){const b=s?v.getLastDescendant():v.getFirstDescendant();b===null?p=v:(v=b,p=K(v)?v:v.getParentOrThrow()),o=0}ce(v)?(i=v,p=null,o=Pa(v,s?"next":"previous")):v!==p&&s&&!h&&(K(p)||se(216),o=Math.min(p.getChildrenSize(),o+1))}else{const m=Qo(p),g=m!==null?m:p,v=g.getIndexWithinParent(),b=n.getElementByKey(p.getKey());let _="after";if(b!==null&&zc(e)===p){const S=Po(p,b,n);S.element!==b?_=S.resolveLeafPosition(b,e,t):t===0&&dt(p)&&(_="before")}o=_==="before"?v:v+1,p=g.getParentOrThrow()}if(K(p))return[za(p.__key,o,"element"),a]}}else i=zc(e);return ce(i)?[za(i.__key,Pa(i,o,"clamp"),"text"),a]:null}function YA(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((r||!t)&&o===null&&K(a)&&a.isInline()){const s=a.getPreviousSibling();ce(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else K(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):ce(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&K(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&K(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){const s=a.getNextSibling();ce(s)&&e.set(s.__key,0,"text")}}}function r4(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);YA(e,n,i),YA(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function lx(e){const t=gr(e.key);return t===null?null:Uv(t)}function n4(e,t,r){const n=lx(e),i=lx(t);if(n===i||n!==null&&i!==null&&n.is(i))return!1;const o=r(n,i);if(n!==null)return K(n)?t.set(n.getKey(),o?n.getChildrenSize():0,"element"):t.set(n.getKey(),o?n.getTextContentSize():0,"text"),!0;const a=Qo(i);if(a===null)return!1;const s=a.getParent();if(s===null)return!1;const l=a.getIndexWithinParent();return t.set(s.getKey(),o?l+1:l,"element"),!0}function i4(e){const t=n4(e.anchor,e.focus,(r,n)=>(function(i,o,a,s){if(a!==null&&s!==null){const d=Qo(a),f=Qo(s);if(d!==null&&d.is(f)){for(const h of Bv(d).values()){if(h===a.getKey())return!0;if(h===s.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(a!==null){const d=Qo(a),f=gr(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=Qo(s),u=gr(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 o4(e,t,r,n,i,o){if(e===null||r===null||!$p(i,e,r))return null;const a=QA(e,t,le(o)?o.anchor:null,i);if(a===null)return null;const s=QA(r,n,le(o)?o.focus:null,i);if(s===null)return null;const[l,u]=a,[d,f]=s;if(l.type==="element"&&d.type==="element"){const p=zc(e),m=zc(r);if(dt(p)&&dt(m))return null}const h=i._slotsUsed&&n4(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return r4(l,d),[l,d,u||f||h]}function vd(e){return K(e)&&!e.isInline()}function a4(e,t,r,n,i,o){const a=Os(),s=new Qu(za(e,t,i),za(r,n,o),0,"");return s.dirty=!0,a._selection=s,s}function Fw(){const e=za("root",0,"element"),t=za("root",0,"element");return new Qu(e,t,0,"")}function h0(){return new Pv(new Set)}function Iw(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!H1&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,d,f,h;if(le(e)&&!l)return e.clone();{if(t===null)return null;const E=Io(t,r._rootElement);if(u=E.anchorNode,d=E.focusNode,f=E.anchorOffset,h=E.focusOffset,(s||a===void 0)&&le(e)&&!$p(r,u,d))return e.clone()}const p=o4(u,f,d,h,r,e);if(p===null)return null;const[m,g,v]=p;let b=0,_="";if(le(e)){const E=e.anchor;if(m.key===E.key)b=e.format,_=e.style;else{const C=m.getNode();ce(C)?(b=C.getFormat(),_=C.getStyle()):K(C)&&(b=C.getTextFormat(),_=C.getTextStyle())}}const S=new Qu(m,g,b,_);return v&&(S.dirty=!0),S}function ye(){return Os()._selection}function Bd(){return qt()._editorState._selection}function uu(e,t,r,n=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(r<=u&&n>0||r<u&&n<0){const d=Math.max(0,u+n);i.set(l,d,"element"),o.set(l,d,"element"),XA(e)}}else{const u=e.isBackward(),d=u?o:i,f=d.getNode(),h=u?i:o,p=h.getNode();if(t.is(f)){const m=d.offset;(r<=m&&n>0||r<m&&n<0)&&d.set(l,Math.max(0,m+n),"element")}if(t.is(p)){const m=h.offset;(r<=m&&n>0||r<m&&n<0)&&h.set(l,Math.max(0,m+n),"element")}}XA(e)}function XA(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),a=n.getNode();if(e.isCollapsed()){if(!K(o))return;const s=o.getChildrenSize(),l=r>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(ce(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text"),n.set(u.__key,d,"text")}return}if(K(o)){const s=o.getChildrenSize(),l=r>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(ce(u)){let d=0;l&&(d=u.getTextContentSize()),t.set(u.__key,d,"text")}}if(K(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(ce(u)){let d=0;l&&(d=u.getTextContentSize()),n.set(u.__key,d,"text")}}}function p0(e,t,r,n,i){let o=null,a=0,s=null;n!==null?(o=n.__key,ce(n)?(a=n.getTextContentSize(),s="text"):K(n)&&(a=n.getChildrenSize(),s="element")):i!==null&&(o=i.__key,ce(i)?s="text":K(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=r.getChildrenSize()),e.set(r.__key,a,"element"))}function ZA(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 m0(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function eT(e,t,r){const n=yd(e,t.getKey());if(K(t)){const i=Po(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function ore(e,t,r,n,i,o){const a=o.getRootNode(),s=Yu(a)||Ts(a)?Vh(a):null;if(i.has(K6)&&s!==o||s!==null&&Bw(s,s))return;const l=Io(n,o);let u;if(!le(t))return void(e!==null&&$p(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[m,g]=eT(r,h,d.offset),[v,b]=eT(r,p,f.offset),_=t.format,S=t.style,E=t.isCollapsed();let C=m,A=v,T=!1;if(d.type==="text"?(C=ce(h)?wl(h,m,r):null,T=h.getFormat()!==_||h.getStyle()!==S):le(e)&&e.anchor.type==="text"&&(T=!0),f.type==="text"&&(A=ce(p)?wl(p,v,r):null),C!==null&&A!==null){if(E&&(e===null||T||le(e)&&(e.format!==_||e.style!==S))&&(function(R,N,I,M,P,U){R._inputState.collapsedSelectionFormat={format:N,key:P,offset:M,style:I,timeStamp:U}})(r,_,S,g,d.key,performance.now()),(n.type!=="Range"||!E)&&l.anchorOffset===g&&l.focusOffset===b&&l.anchorNode===C&&l.focusNode===A){if(s===null||!o.contains(s)){const R=s!==null?rd(s):null;R!==null&&R!==r||i.has(ox)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(m0(n,C,g,A,b),Al&&t.isCollapsed()&&o!==null&&!i.has(ox)){const R=fx(o);if(R===null||!o.contains(R)){const N=Vh(o.ownerDocument),I=N!==null?rd(N):null;I!==null&&I!==r||o.focus({preventScroll:!0})}}if(!i.has(Hte)&&t.isCollapsed()&&o!==null&&o===fx(o)){const R=le(t)&&t.anchor.type==="element"?C.childNodes[g]||null:(u===void 0&&(u=Nre(n,o)),u);if(R!==null){let N;if(zi(R)){const I=R.ownerDocument.createRange();I.selectNode(R),N=I.getBoundingClientRect()}else N=R.getBoundingClientRect();(function(I,M,P){const U=Kw(P),j=Hw(U);if(U===null||j===null)return;const V=P.getBoundingClientRect();if(M.bottom<V.top)return;let{top:Y,bottom:J}=M,X=0,oe=0,ge=P;for(;ge!==null;){const H=ge===U.body;if(H){const te=j.visualViewport;if(te){const be=te.offsetTop;X=be,oe=be+te.height}else X=0,oe=Ui(I).innerHeight;const ue=j.getComputedStyle(U.documentElement),Se=parseFloat(ue.scrollPaddingTop),pe=parseFloat(ue.scrollPaddingBottom);isFinite(Se)&&(X+=Se),isFinite(pe)&&(oe-=pe)}else{const te=ge===P?V:ge.getBoundingClientRect();X=te.top,oe=te.bottom}let ae=0;if(Y<X?ae=-(X-Y):J>oe&&(ae=J-oe),ae!==0)if(H)j.scrollBy(0,ae);else{const te=ge.scrollTop;ge.scrollTop+=ae;const ue=ge.scrollTop-te;Y-=ue,J-=ue}if(H)break;ge=Xu(ge)}})(r,N,o)}}(function(R){R._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function are(e){let t=ye()||Bd();t===null&&(t=dn().selectEnd()),t.insertNodes(e)}function s4(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 qh(e){const t=[];return s4(e,{linebreak:()=>t.push(na()),tab:()=>t.push(Ud()),text:r=>t.push(Ur(r))}),t}function ux(e){const t=[];for(const r of e)_i(r)||(!K(r)&&!dt(r)||r.isInline()?t.push(r):K(r)&&t.push(...ux(r.getChildren())));return t}function yf(e){let t=e;e.isCollapsed()||t.removeText();const r=ye();le(r)&&(t=r),le(t)||se(161);const n=t.anchor;let i=n.getNode(),o=n.offset;for(;!Vn(i)&&Wn(i)===null;){const a=i;if([i,o]=sre(i,o),a.is(i))break}return o}function sre(e,t){const r=e.getParent();if(!r){const i=Wt();return dn().append(i),i.select(),[dn(),0]}if(ce(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(!K(e)||t===0)return[r,e.getIndexWithinParent()];const n=e.getChildAtIndex(t);if(n){const i=new Qu(za(e.__key,t,"element"),za(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function tT(e){return _i(e)||Rre(e)||ce(e)||e.isParentRequired()}function T_(e){const t=Wt();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(tT(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(_i(i)&&(o===void 0||!tT(o)))continue}r.append(i)}else t.append(i),r=null}return t}function g0(e,t,r,n,i="decorators-and-blocks"){if(t==="move"&&n==="character"&&!e.isCollapsed()){const[d,f]=r===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(d.key,d.offset,d.type),!0}const o=Di(e.focus,r?"previous":"next"),a=n==="lineboundary",s=t==="move";let l=o,u=i==="decorators-and-blocks";if(!eE(l)){for(const d of l){u=!1;const{origin:f}=d;if(!dt(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(u)for(const d of jv(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(To(d))d.origin.isInline()||(l=d);else{if(K(d.origin))continue;dt(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&dt(l.origin)&&l.origin.isKeyboardSelectable()){const d=h0();return d.add(l.origin.getKey()),On(d),!0}return l=Ji(l),s&&Bu(e.anchor,l),Bu(e.focus,l),u||!a}let Nn=null,nn=null,Ni=!1,$_=!1,Tg=!1;const N_=new Set;let $g=0;const rT={characterData:!0,childList:!0,subtree:!0};function bd(){return Ni||Nn!==null&&Nn._readOnly}function An(){Ni&&se(13)}function l4(){$g>99&&se(14)}function Os(){return Nn===null&&se(195,u4()),Nn}function lre(e){Os()!==null&&nn===null&&(nn=e),nn!==e&&HM(378)}function qt(){return nn===null&&se(337,u4()),nn}function ure(){qt()._dirtyType=2}function u4(){let e=0;const t=new Set,r=_d.version;if(typeof window<"u")for(const i of T4(document)){const o=Np(i);if(Mv(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===r&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let n=` Detected on the page: ${e} compatible editor(s) with version ${r}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function c4(){return nn}function nT(e,t,r){const n=t.__type,i=v4(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const a=o.length;for(let s=0;s<a&&(o[s](t),t.isAttached());s++);}function iT(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function d4(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 cre(e){return v0(e,qt()._nodes)}function v0(e,t){const r=e.type,n=t.get(r);n===void 0&&se(17,r);const i=n.klass;e.type!==i.getType()&&se(18,i.name);const o=i.importJSON(e),a=e.children;if(K(o)&&Array.isArray(a))for(let l=0;l<a.length;l++){const u=v0(a[l],t);o.append(u)}const s=e.$slots;if(s){bs(o)||se(379,i.name);for(const l in s)z4(o,l,v0(s[l],t))}return o}function oT(e,t,r){const n=Nn,i=Ni,o=nn;Nn=t,Ni=!0,nn=e;try{return r()}finally{Nn=n,Ni=i,nn=o}}function pl(e,t){const r=Tg;Tg=!0;try{(function(n,i){const o=n._pendingEditorState,a=n._rootElement,s=n._headless||a===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&aT(n,n._deferred));const l=n._editorState,u=l._selection,d=o._selection,f=n._dirtyType!==0,h=Nn,p=Ni,m=nn,g=n._updating,v=n._observer;let b=null;if(n._pendingEditorState=null,n._editorState=o,!s&&f&&v!==null){nn=n,Nn=o,Ni=!1,n._updating=!0;try{const R=n._dirtyType,N=n._dirtyElements,I=n._dirtyLeaves;v.disconnect(),b=Cte(l,o,n,R,N,I)}catch(R){if(R instanceof Error&&n._onError(R),$_)throw R;return g4(n,null,a,o),n6(n),n._dirtyType=2,$_=!0,pl(n,l),void($_=!1)}finally{v.observe(a,rT),n._updating=g,Nn=h,Ni=p,nn=m}}o._readOnly||(o._readOnly=!0);const _=n._dirtyLeaves,S=n._dirtyElements,E=n._normalizedNodes,C=n._updateTags;f&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set),n._updateTags=new Set,(function(R,N){const I=R._decorators;let M=R._pendingDecorators||I;const P=N._nodeMap;let U;for(U in M)P.has(U)||(M===I&&(M=S4(R)),delete M[U])})(n,o);const A=s?null:xi(Ui(n));if(n._editable&&A!==null&&(f||d===null||d.dirty||!d.is(u))&&a!==null&&!C.has(Wte)){nn=n,Nn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const R=n._blockCursorElement;R!==null&&x0(R,n,a),ore(u,d,n,A,C,a)}(function(R,N,I){let M=R._blockCursorElement;if(le(I)&&I.isCollapsed()&&I.anchor.type==="element"&&N.contains(fx(N))){const P=I.anchor,U=P.getNode(),j=P.offset;let V=!1,Y=null;if(j===U.getChildrenSize())Ng(U.getChildAtIndex(j-1))&&(V=!0);else{const J=U.getChildAtIndex(j);if(J!==null&&Ng(J)){const X=J.getPreviousSibling();(X===null||Ng(X))&&(V=!0,Y=R.getElementByKey(J.__key))}}if(V){const J=Po(U,R.getElementByKey(U.__key),R).element;return M===null&&(R._blockCursorElement=M=(function(X){const oe=X.theme,ge=br().createElement("div");ge.contentEditable="false",ge.setAttribute("data-lexical-cursor","true");let H=oe.blockCursor;if(H!==void 0){if(typeof H=="string"){const ae=_s(H);H=oe.blockCursor=ae}H!==void 0&&ge.classList.add(...H)}return ge})(R._config)),N.style.caretColor="transparent",void(Y===null?J.appendChild(M):J.insertBefore(M,Y))}}M!==null&&x0(M,R,N)})(n,a,d)}finally{v!==null&&v.observe(a,rT),nn=m,Nn=h}}b!==null&&(function(R,N,I,M,P){const U=Array.from(R._listeners.mutation),j=U.length;for(let V=0;V<j;V++){const[Y,J]=U[V];for(const X of J){const oe=N.get(X);oe!==void 0&&Y(oe,{dirtyLeaves:M,prevEditorState:P,updateTags:I})}}})(n,b,C,_,l),le(d)||d===null||u!==null&&u.is(d)||n.dispatchCommand(m6,void 0);const T=n._pendingDecorators;T!==null&&(n._decorators=T,n._pendingDecorators=null,nh("decorator",n,!0,T)),(function(R,N,I){const M=uT(N),P=uT(I);M!==P&&nh("textcontent",R,!0,P)})(n,i||l,o),nh("update",n,!0,{dirtyElements:S,dirtyLeaves:_,editorState:o,mutatedNodes:b,normalizedNodes:E,prevEditorState:i||l,tags:C}),!g&&aT(n,n._deferred),(function(R){const N=R._updates;if(N.length===0)return void(R._cascadeCount=0);if((function(M){N_.has(M)||(N_.add(M),setTimeout(()=>{N_.delete(M),M._cascadeCount=0},0))})(R),R._cascadeCount++>99)return R._updates=[],R._cascadeCount=0,void R._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: ${R._config.namespace}`));const I=N.shift();if(I){const[M,P]=I;Ov(R,M,P)}})(n)})(e,t)}finally{Tg=r}}function nh(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],a=Array.from(o);for(const[s,l]of a){l&&l();const u=s(...n);o.has(s)?o.set(s,u):u&&u()}}finally{t._updating=i}}function f4(e,t,r,n){const i=jw(e);let o;if(!Tg)for(let a=0;a<i.length;a++)i[a]._updating||(i[a]._cascadeCount=0);for(let a=4;a>=0;a--)for(let s=0;s<i.length;s++){const l=i[s];if(s>0&&l._updating){o=l;break}const u=l._commands.get(t);if(u!==void 0){const d=u[a];if(d.size>0){let f=!1;if(Co(l,()=>{for(const h of d)if(h(r,n))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{f4(o,t,r,n)}),!1}function aT(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 sT(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,a]=i,s=e._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(n=!0),a.discrete&&(s===null&&se(191),s._flushSync=!0),l&&e._deferred.push(l),d4(e,a.tag)),s==null?Ov(e,o,a):o()}}return n}function Ov(e,t,r){const n=e._updateTags;let i,o=!1,a=!1;r!==void 0&&(i=r.onUpdate,d4(e,r.tag),o=r.skipTransforms||!1,a=r.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=h4(l||s),u=!0),l._flushSync=a;const d=Nn,f=Ni,h=nn,p=e._updating;Nn=l,Ni=!1,e._updating=!0,nn=e;const m=e._headless||e.getRootElement()===null;zw(null);try{u&&(m?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(_,S){const E=_.getEditorState()._selection,C=xi(Ui(_));return le(E)||E==null?Iw(E,C,_,S):E.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=sT(e,o),(function(_,S){const E=S.getEditorState()._selection,C=_._selection;if(le(C)){const A=C.anchor,T=C.focus;let R;if(A.type==="text"&&(R=A.getNode(),R.selectionTransform(E,C)),T.type==="text"){const N=T.getNode();R!==N&&N.selectionTransform(E,C)}}})(l,e),e._dirtyType!==0&&(o?(function(_,S){const E=S._dirtyLeaves,C=_._nodeMap;for(const A of E){const T=C.get(A);ce(T)&&T.isAttached()&&T.isSimpleText()&&!T.isUnmergeable()&&RA(T)}})(l,e):(function(_,S){const E=S._dirtyLeaves,C=S._dirtyElements,A=_._nodeMap,T=ps(),R=new Map;let N=E,I=N.size,M=C,P=M.size;for(;I>0||P>0;){if(I>0){S._dirtyLeaves=new Set;for(const U of N){const j=A.get(U);ce(j)&&j.isAttached()&&j.isSimpleText()&&!j.isUnmergeable()&&RA(j),j!==void 0&&iT(j,T)&&nT(S,j,R),E.add(U)}if(N=S._dirtyLeaves,I=N.size,I>0){$g++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map,M.delete("root")&&M.set("root",!0);for(const U of M){const j=U[0],V=U[1];if(C.set(j,V),!V)continue;const Y=A.get(j);Y!==void 0&&iT(Y,T)&&nT(S,Y,R)}N=S._dirtyLeaves,I=N.size,M=S._dirtyElements,P=M.size,$g++}S._dirtyLeaves=E,S._dirtyElements=C})(l,e),sT(e),(function(_,S,E,C){const A=_._nodeMap,T=S._nodeMap,R=[];for(const[M]of C){const P=T.get(M);P!==void 0&&(P.isAttached()||(K(P)&&a0(P,M,A,T,R,C),A.has(M)||C.delete(M),R.push(M)))}for(const M of E){const P=T.get(M);P===void 0||P.isAttached()||(bs(P)&&P.__slots!==null&&a0(P,M,A,T,R,E),A.has(M)||E.delete(M),R.push(M))}for(const M of R)T.delete(M);const N=qt(),I=N._compositionKey;I===null||T.has(I)||(N._compositionKey=null)})(s,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const b=l._selection;if(le(b)){e._slotsUsed&&i4(b);const _=l._nodeMap,S=b.anchor.key,E=b.focus.key;_.get(S)!==void 0&&_.get(E)!==void 0||se(19)}else hr(b)&&b._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void pl(e)}finally{Nn=d,Ni=f,nn=h,e._updating=p,$g=0}e._dirtyType!==0||e._deferred.length>0||(function(v,b){const _=b.getEditorState()._selection,S=v._selection;if(S!==null){if(S.dirty||!S.is(_))return!0}else if(_!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,pl(e)):u&&xre(()=>{pl(e)}):(l._flushSync=!1,u&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function Co(e,t,r){nn===e&&r===void 0?t():Ov(e,t,r)}function dre(e){if(yr(e)){let t=null;for(const r of e.getChildren())t=r.isInline()?(t||r.replace(r.createParentElementNode())).append(r):null}}class Mi extends Zi{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:dre,extends:Zi})}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&&se(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 dte[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&&Ro(this).length===0}isDirty(){const t=qt()._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 Ro(this)){const i=Lu(this,n);K(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(ce(r)&&t.push(r),K(r)){const n=r.getAllTextNodes();t.push(...n)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;K(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;K(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 K(o)&&o.getLastDescendant()||o||null}const i=r[t];return K(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:gr(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&se(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:gr(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&se(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=L4(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContent(),K(o)&&i!==n-1&&!o.isInline()&&(t+=hu)}return t}getTextContentSize(){let t=(function(i){let o=0;for(const a of Ro(i)){const s=Lu(i,a);s!==null&&(o+=s.getTextContentSize())}return o})(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContentSize(),K(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=o0[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=As[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return Iu(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){An();const n=ye();let i=t,o=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(ce(l)||K(l))return l.select(0,0)}else if(!(t!==void 0&&t!==a||r!==void 0&&r!==a)){const l=this.getLastChild();if(ce(l)||K(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return le(n)?(n.anchor.set(s,i,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):a4(s,i,s,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(r=>r.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const r=this.getWritable();return r.__dir=t,r}setFormat(t){return this.getWritable().__format=t!==""&&o0[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){c0(this)&&se(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();t+r<=i||se(226,String(t),String(r),String(i));for(const p of n);const a=o.__key,s=[],l=[],u=this.getChildAtIndex(t+r);let d=null,f=i-r+n.length;if(t!==0)if(t===i)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){p===null&&se(100);const g=p.getNextSibling(),v=p.__key;hs(p.getWritable()),l.push(v),p=g}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const m=p.getWritable();m.__parent===a&&f--,hs(m);const g=p.__key;if(h===null)o.__first=g,m.__prev=null;else{const v=h.getWritable();v.__next=g,m.__prev=v.__key}p.__key===a&&se(76),m.__parent=a,s.push(g),h=p}if(t+r===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const m=h.getWritable();p.__prev=h.__key,m.__next=u.__key}else p.__prev=null}if(o.__size=f,l.length){const p=ye();if(le(p)){const m=new Set(l),g=new Set(s),{anchor:v,focus:b}=p;lT(v,m,g)&&p0(v,v.getNode(),this,d,u),lT(b,m,g)&&p0(b,b.getNode(),this,d,u),f!==0||this.canBeEmpty()||yr(this)||this.remove()}}return o}getDOMSlot(t){return new Qc(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(rt(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===""||yr(this)||this.getChildren().some(ce)||(r!==0&&(t.textFormat=r),n!==""&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,r){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,r,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,r){const n=Po(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(i==null?(n.insertChild(a),i=a):i!==a&&n.replaceChild(a,i),i=i.nextSibling)}}}function K(e){return e instanceof Mi}function lT(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 Pw extends Zi{__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&&se(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 dt(e){return e instanceof Pw}class jd extends Mi{__cachedText;static getType(){return"root"}static clone(){return new jd}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){se(51)}getTextContent(){const t=this.__cachedText;return t===null||!bd()&&qt()._dirtyType!==0?super.getTextContent():t}remove(){se(52)}replace(t){se(53)}insertBefore(t){se(54)}insertAfter(t){se(55)}updateDOM(t,r){return!1}splice(t,r,n){for(const i of n)K(i)||dt(i)||se(282);return super.splice(t,r,n)}static importJSON(t){return dn().updateFromJSON(t)}collapseAtStart(){return!0}}function jr(e){return e instanceof jd}function h4(e){return new Tp(ZM(e._nodeMap),null,e._slotsUsed)}function Ow(){return new Tp(new Map([["root",new jd]]),null,!1)}function cx(e){const t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&se(130,r.name),K(e)){const i=t.children;Array.isArray(i)||se(59,r.name);const o=e.getChildren();for(let a=0;a<o.length;a++){const s=cx(o[a]);i.push(s)}}const n=Ro(e);if(n.length>0){const i={};for(const o of n){const a=Lu(e,o);a===null&&se(366,r.name,o),i[o]=cx(a)}t.$slots=i}return t}function fre(e){return e instanceof Tp}class Tp{_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 oT(r&&r.editor||null,this,t)}clone(t){const r=new Tp(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return oT(null,this,()=>({root:cx(dn())}))}}class Mw extends Mi{static getType(){return"artificial"}createDOM(t){return br().createElement("div")}}class qd extends Zi{static getType(){return"linebreak"}static clone(t){return new qd(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
27
|
+
`}createDOM(){return br().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>p4(t)||m4(t)?null:{conversion:hre,priority:0}}}static importJSON(t){return na().updateFromJSON(t)}}function hre(e){return{node:na()}}function na(){return fa(new qd)}function _i(e){return e instanceof qd}function p4(e){const t=e.parentElement;if(t!==null&&Sd(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&b0(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&b0(n))return!0}}return!1}function m4(e){const t=e.parentElement;if(t!==null&&Sd(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&b0(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&b0(n))return!0}return!1}function b0(e){return zi(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class Vd extends Mi{static getType(){return"paragraph"}static clone(t){return new Vd(t.__key)}createDOM(t){const r=br().createElement("p"),n=nd(t.theme,"paragraph");return n!==void 0&&r.classList.add(...n),r}updateDOM(t,r,n){return!1}static importDOM(){return{p:t=>({conversion:pre,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(rt(r)){this.isEmpty()&&r.append(br().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return Wt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(ce);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=Wt();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||ce(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 pre(e){const t=Wt();if(Ha(t,e),Zu(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in o0&&t.setFormat(r)}return Lo(t,e),{node:t}}function Wt(){return fa(new Vd)}function Gd(e){return e instanceof Vd}function mre(e){console.warn(e)}const ut=0,Dc=1,gre=4,vre=-8;function g4(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=Ow(),e._pendingEditorState=n,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(s,l){const u=`__lexicalKey_${l._key}`;delete s[u]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),x4(r,e,"root"))}function bre(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of Jw(e)){const o=n.transform;if(!r.has(o)){r.add(o);const a=n.transform();a&&t.add(a)}if(i){const a=i.$transform;a&&t.add(a)}}return t}const _0={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=Uw(t,e.getType());return r&&r.exportDOM!==void 0?r.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,r,n,i)=>K(e)&&e.extractWithChild(t,r,n),$getDOMSlot:(e,t,r)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,r,n)=>null,$shouldExclude:(e,t,r)=>K(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,r)=>!t||e.isSelected(t),$updateDOM:(e,t,r,n)=>e.updateDOM(t,r,n._config)};function Lw(e){const t=e||{},r=c4(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,a=Ow(),s=t.namespace||(i!==null?i._config.namespace:E4()),l=t.editorState,u=[jd,Ps,qd,zd,Vd,Mw,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&r!==null)m=r._nodes;else{m=new Map;for(let v=0;v<u.length;v++){let b=u[v],_=null,S=null;if(b&&typeof b=="object"){const A=b;b=A.replace,_=A.with,S=A.withKlass||null}if(typeof b!="function"||!b.prototype||!(b===Zi||b.prototype instanceof Zi)){let A="<unknown>";try{A=JSON.parse(XM)}catch{}se(365,String(v-u.length+(t.nodes?t.nodes.length:0)),typeof b=="function"?`${b.name}${typeof b.getType=="function"?` (type ${String(b.getType())})`:""}`:String(b),String(A))}Ww(b);const E=b.getType(),C=bre(b);m.set(E,{exportDOM:h&&h.export?h.export.get(b):void 0,klass:b,replace:_,replaceWithKlass:S,sharedNodeState:yte(u[v]),transforms:C})}}const g=new _d(a,i,m,{disableEvents:o,dom:{..._0,...e&&e.dom},namespace:s,theme:n},d||console.error,f||mre,(function(v,b){const _=new Map,S=new Set,E=C=>{Object.keys(C).forEach(A=>{let T=_.get(A);T===void 0&&(T=[],_.set(A,T)),T.push(C[A])})};return v.forEach(C=>{const A=C.klass.importDOM;if(A==null||S.has(A))return;S.add(A);const T=A.call(C.klass);T!==null&&E(T)}),b&&E(b),_})(m,h?h.import:void 0),p,e);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),(function(v){v.registerCommand(v6,Bte,ut),v.registerCommand(b6,jte,ut),v.registerCommand(_6,qte,ut),v.registerCommand(y6,Vte,ut),v.registerCommand(x6,Gte,ut)})(g),g}function _re(e,t){const r=e.get(t);e.delete(t),r&&r()}function xf(e,t,r){return e.set(t,r),_re.bind(null,e,t)}class _d{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,r,n,i,o,a,s,l,u){this._createEditorArgs=u,this._parentEditor=r,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new K1,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=E4(),this._onError=o,this._onWarn=a,this._htmlConversions=s,this._editable=l,this._headless=r!==null&&r._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){return xf(this._listeners.update,t)}registerEditableListener(t){return xf(this._listeners.editable,t)}registerDecoratorListener(t){return xf(this._listeners.decorator,t)}registerTextContentListener(t){return xf(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return Dl(xf(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const a=n.get(i);a&&a(),n.set(i,i(...o)||void 0)})(r,t,[null,this._rootElement]))}registerCommand(t,r,n){n===void 0&&se(35);const i=this._commands;i.has(t)||i.set(t,[new _f,new _f,new _f,new _f,new _f]);const o=i.get(t);o===void 0&&se(36,String(t));const a=(function(l){return 7&l})(n),s=o[a];return a!==n?s.addFront(r):s.addBack(r),()=>{s.delete(r),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,r,n){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;let a=o.get(r);a===void 0&&(a=new Set,o.set(r,a)),a.add(i);const s=n&&n.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(r,i),()=>{a.delete(i),a.size===0&&o.delete(r)}}getRegisteredNode(t){const r=this._nodes.get(t.getType());return r===void 0&&se(37,t.name),r}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,r){const n=this._editorState,i=mT(n).get(r.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,r){const n=this.getRegisteredNode(t);return n.transforms.add(r),n}registerNodeTransform(t,r){const n=this.registerNodeTransformToKlass(t,r),i=[n],o=n.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,r);i.push(a)}return(function(a,s){const l=mT(a.getEditorState()),u=[];for(const d of s){const f=l.get(d);f&&u.push(f)}u.length!==0&&a.update(()=>{for(const d of u)for(const f of d.keys()){const h=gr(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:rh}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return Te(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=nd(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,g4(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||Kte(r),n!=null&&r.classList.remove(...n)),t!==null){const o=Hw(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,n6(this),this._updateTags.add(rh),pl(this),this._config.disableEvents||(function(s,l){const u=s.ownerDocument;nx.set(s,u);let d=l0.get(u);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},l0.set(u,d)),d.editors.add(l),d.hasShadowEditor=void 0,s.__lexicalEditor=l;const f=U6(s);f.push(Ute.register(u));for(let h=0;h<rx.length;h++){const[p,m]=rx[h],g=typeof m=="function"?v=>{BA(v)||(UA(v),(l.isEditable()||p==="click")&&m(v,l))}:v=>{if(BA(v))return;UA(v);const b=l.isEditable();switch(p){case"cut":return b&&Te(l,Nw,v);case"copy":return Te(l,Iv,v);case"paste":return b&&Te(l,Tw,v);case"dragstart":return b&&Te(l,F6,v);case"dragover":return b&&Te(l,I6,v);case"dragend":return b&&Te(l,Dte,v);case"focus":return b&&Te(l,Pte,v);case"blur":return b&&Te(l,Ote,v);case"drop":return b&&Te(l,D6,v)}};f.push(zte(s,p,g))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(rh),pl(this);nh("root",this,!1,t,r)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,r){t.isEmpty()&&se(38);let n=t;n._readOnly&&(n=h4(t),n._selection=t._selection?t._selection.clone():null),r6(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),pl(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||t._slotsUsed,Co(this,()=>{if(o&&this._updateTags.add(o),t._parsed)for(const[a,s]of n._nodeMap.entries())K(s)?this._dirtyElements.set(a,!0):this._dirtyLeaves.add(a)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const a=Ow(),s=Nn,l=Ni,u=nn,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,Nn=a,Ni=!1,nn=i,zw(null);try{const m=i._nodes;v0(n.root,m),o&&o(),a._readOnly=!0,a._parsed=!0}catch(m){m instanceof Error&&i._onError(m)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,Nn=s,Ni=l,nn=u}return a})(typeof t=="string"?JSON.parse(t):t,this,r)}read(...t){const[r,n]=t.length===1?["force-commit",t[0]]:t;return r==="force-commit"&&pl(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]):Ov(n,i,o)})(this,t,r)}focus(t,r={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),Co(this,()=>{const i=ye(),o=dn();i!==null?i.dirty||On(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),Ou("focus"),Cre(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const r=xi(this._window);r!==null&&r.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,nh("editable",this,!0,t),this._slotsUsed&&this.update(()=>ure()))}toJSON(){return{editorState:this._editorState.toJSON()}}}_d.version=XM;let dx=null;function zw(e){dx=e}let yre=1;function v4(e,t){const r=Uw(e,t);return r===void 0&&se(30,t),r}function Uw(e,t){return e._nodes.get(t)}const xre=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function Bw(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return Yu(o)||Ts(o)?Vh(o):null})();if(!rt(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=Pu(r),i=r.nodeName;return j6(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&Np(r)==null)}function $p(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 rd(t)===e&&e.read("latest",()=>!Bw(t))}function Mv(e){return e instanceof _d}function rd(e){let t=e;for(;t!=null;){const r=Np(t);if(Mv(r))return r;t=Xu(t)}return null}function Np(e){return e?e.__lexicalEditor:null}function bu(e){return Fu(e)||e.isToken()}function Wi(e){return bu(e)||e.isSegmented()}function zi(e){return Hd(e)&&e.nodeType===3}function Yu(e){return Hd(e)&&e.nodeType===9}function Sre(e){let t=e;for(;t!=null;){if(zi(t))return t;t=t.firstChild}return null}function Iu(e,t,r){const n=As[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 b4(e){return ce(e)||_i(e)||dt(e)}function _4(e,t){const r=(function(){const a=dx;return dx=null,a})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);An(),l4();const n=qt(),i=Os(),o=""+yre++;i._nodeMap.set(o,e),K(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType===0&&(n._dirtyType=1),e.__key=o}function hs(e){Wn(e)!==null&&se(380,e.__key,String(Wn(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=o!==null?o.getWritable():null;i===null&&(n.__first=a),o===null&&(n.__last=s),l!==null&&(l.__next=a),u!==null&&(u.__prev=s),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function y0(e){l4(),c0(e)&&se(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:Mu(t)?t.__slotHost:null,n=Os(),i=qt(),o=n._nodeMap,a=i._dirtyElements;r!==null&&(function(l,u,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=u.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent!==null?h.__parent:Mu(h)?h.__slotHost:null}})(r,o,a);const s=t.__key;i._dirtyType===0&&(i._dirtyType=1),K(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function Tn(e){An();const t=qt(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=gr(r);n!==null&&n.getWritable()}if(e!==null){const n=gr(e);n!==null&&n.getWritable()}}}function ps(){return bd()?null:qt()._compositionKey}function gr(e,t){const r=(t||Os())._nodeMap.get(e);return r===void 0?null:r}function y4(e,t){const r=Kd(e,qt());return r!==void 0?gr(r,t):null}function x4(e,t,r){e[`__lexicalKey_${t._key}`]=r}function Kd(e,t){return e[`__lexicalKey_${t._key}`]}function Pu(e,t){let r=e;for(;r!=null;){const n=y4(r,t);if(n!==null)return n;r=Xu(r)}return null}function S4(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function uT(e){return e.read(()=>dn().getTextContent())}function dn(){return Os()._nodeMap.get("root")}function On(e){An();const t=Os();e!==null&&(e.dirty=!0,e.setCachedNodes(null),le(e)&&qt()._slotsUsed&&i4(e)),t._selection=e}function cT(){An(),r6(qt())}function zc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=Kd(i,n);if(o!==void 0)return o;i=Xu(i)}return null})(e,qt());return t===null?null:gr(t)}function w4(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function jw(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function E4(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function k4(e){return zi(e)?e.nodeValue:null}function qw(e,t,r){const n=xi(Ui(t));if(n===null)return;const i=Io(n,t._rootElement),o=i.anchorNode;let{anchorOffset:a,focusOffset:s}=i;if(o!==null){let l=k4(o);const u=Pu(o);if(l!==null&&ce(u)){if((l===Dh||l===Rw)&&r){const d=r.length;l=r,a=d,s=d}l!==null&&Vw(u,l,a,s,e)}}}function Vw(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();if(o.isToken()&&a)return;let s=t;if((a||i)&&(t.endsWith(Dh)&&(s=t.slice(0,-Dh.length)),i)){const u=Rw;let d;for(;(d=s.indexOf(u))!==-1;)s=s.slice(0,d)+s.slice(d+u.length),r!==null&&r>d&&(r=Math.max(d,r-u.length)),n!==null&&n>d&&(n=Math.max(d,n-u.length))}const l=o.getTextContent();if(i||s!==l){const u=ye();if(s===""){if(Tn(null),kp||Tl||Cp)o.remove();else{const g=qt();D_(o,"",u),setTimeout(()=>{g.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=Bd(),h=o.getTextContentSize(),p=ps(),m=o.getKey();if(o.isToken()&&!a||p!==null&&m===p&&!a||le(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!a))return void o.markDirty();if(!le(u)||r===null||n===null)return void D_(o,s,u);if(u.setTextNodeRange(o,r,o,n),o.isSegmented()){const g=Ur(o.getTextContent());o.replace(g),o=g}D_(o,s,u)}}}function D_(e,t,r){if(e.setTextContent(t),le(r)){const n=e.getKey();let i=!1;for(const o of["anchor","focus"]){const a=r[o];a.type==="text"&&a.key===n&&(a.offset=Pa(e,a.offset,"clamp"),i=!0)}i&&(r._cachedNodes=null,r._cachedIsBackward=null)}}function Sm(e,t,r){const n=t[r]||!1;return n==="any"||n===e[r]}function wre(e,t){return Sm(e,t,"altKey")&&Sm(e,t,"ctrlKey")&&Sm(e,t,"shiftKey")&&Sm(e,t,"metaKey")}function nr(e,t,r){if(!wre(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 ts={ctrlKey:!Vo,metaKey:Vo},dT={altKey:Vo,ctrlKey:!Vo};function fT(e){return e.key==="Backspace"}function Ere(e){const t=dn();if(le(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(jr(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),hl(e),e;const o=i.getTopLevelElementOrThrow(),a=o.getParent();if(a===null)return K(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),hl(e)),e;const s=a;return r.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),hl(e),e}{const r=t.select(0,t.getChildrenSize());return On(hl(r)),r}}function nd(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=_s(i);return r[t]=o,o}return i}function Gw(e,t,r,n,i){if(r.size===0)return;const o=n.__type,a=n.__key,s=t.get(o);s===void 0&&se(33,o);const l=s.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const d=u.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&u.set(a,f?"updated":i)}function hT(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 kre(e,t){const r=e.offset;if(e.type==="element")return hT(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?hT(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function C4(e){const t=Ui(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function Te(e,t,r){return f4(e,t,r,e)}function yd(e,t){const r=e._keyToDOMMap.get(t);return r===void 0&&se(75,t),r}function Xu(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const r=e.parentNode;return Ts(r)?r.host:null}function Kw(e){return Yu(e)?e:rt(e)?e.ownerDocument:null}function Ou(e){An(),qt()._updateTags.add(e)}function Cre(e){An(),qt()._deferred.push(e)}function xd(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function Hw(e){const t=Kw(e);return t?t.defaultView:null}function Ui(e){const t=e._window;return t===null&&se(78),t}function Rre(e){return K(e)&&e.isInline()||dt(e)&&e.isInline()}function R4(e){let t=e.getLatest();for(;t!==null;){if(Wn(t)!==null&&K(t))return t;const r=t.getParentOrThrow();if(yr(r))return r;t=r}return t}function id(e){return K(e)&&e.isShadowRoot()}function yr(e){return jr(e)||id(e)}function ii(e,t=!1){const r=e.constructor.clone(e);return _4(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function fa(e){const t=qt(),r=e.getType(),n=Uw(t,r);n===void 0&&se(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const a=i(e),s=a.constructor;return o!==null?a instanceof o||se(201,o.name,o.getType(),s.name,s.getType(),e.constructor.name,r):a instanceof e.constructor&&s!==e.constructor||se(202,s.name,s.getType(),e.constructor.name,r),a.__key===e.__key&&se(203,e.constructor.name,r,s.name,s.getType()),a}return e}function F_(e,t){!jr(e.getParent())||K(t)||dt(t)||se(99)}function Are(e){const t=gr(e);return t===null&&se(63,e),t}function Ng(e){if(!e||e.isInline())return!1;if(dt(e))return!0;if(K(e)){if(e.isShadowRoot()){const t=e.getParent();return!(K(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function x0(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function xi(e){return da?(e||window).getSelection():null}function Tre(e){const t=Hw(e);return t?t.getSelection():null}function Ts(e){return hx(e)&&"host"in e}const $re=[];function A4(e){const t=e.getRootNode();if(t===e||!Ts(t))return $re;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!Ts(i))break;r.push(i),n=i.host}return r}function*T4(e){const t=[e];let r;for(;r=t.pop();){yield*r.querySelectorAll('[data-lexical-editor="true"]');const n=(Yu(r)?r:r.ownerDocument).createTreeWalker(r,NodeFilter.SHOW_ELEMENT);let i;for(;i=n.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}function $4(e){return e!==null?e.ownerDocument:document}function br(){const e=c4();return $4(e!==null?e._rootElement:null)}function Lv(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=A4(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 Nre(e,t){const r=Lv(e,t);if(r!==null){const n=Dre(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function Io(e,t){const r=Lv(e,t);return r===null?e:Fre(r,Ire(e))}function Dre(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 Fre(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 Ire(e){return e.direction}function fx(e){const t=e.getRootNode();return Yu(t)||Ts(t)?t.activeElement:null}function Vh(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 N4(e){const t=e.target;if(t!==null&&rt(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function D4(e){return rt(e)&&e.tagName==="A"}function rt(e){return Hd(e)&&e.nodeType===1}function Hd(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function hx(e){return Hd(e)&&e.nodeType===11}const Pre=/^(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 S0(e){return!(!rt(e)||!e.style.display.startsWith("inline"))||Pre.test(e.nodeName)}const Ore=/^(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 Sd(e){return(!rt(e)||!e.style.display.startsWith("inline"))&&Ore.test(e.nodeName)}function Vn(e){if(dt(e)&&!e.isInline())return!0;if(!K(e)||yr(e))return!1;const t=e.getFirstChild(),r=t===null||_i(t)||ce(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function Or(){return qt()}function zv(e=Or()){return e._config.dom||_0}function Po(e,t,r=Or()){const n=zv(r).$getDOMSlot(e,t,r);return K(e)&&(Mre(n)||se(344,e.getKey(),e.getType())),n}function Mre(e){return e instanceof Qc}function wl(e,t,r=Or()){return Sre(Po(e,t,r).element)}const pT=new WeakMap,Lre=new Map;function mT(e){if(!e._readOnly&&e.isEmpty())return Lre;e._readOnly||se(192);let t=pT.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const a=o.__type;let s=n.get(a);s||(s=new Map,n.set(a,s)),s.set(i,o)}return n})(e),pT.set(e,t)),t}function F4(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function zre(e){return(t=F4(e))[B6]=!0,t;var t}function Zu(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 Lo(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function Ha(e,t){const r=t.style.textAlign;return r&&r in o0?e.setFormat(r):e}function Ure(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function I4(e){return e.__lexicalUnmanaged===!0}function Bre(e,t=Or()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function w0(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(rt(r)&&r.hasAttribute("data-lexical-slot")||Kd(r,t)!==void 0)return!1;r=Xu(r)}return!1}function Sf(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==Zi[t]}const gT=new WeakMap;function Ww(e){const t=gT.get(e);if(t)return t;const r=e.prototype!=null&&mA in e.prototype?e.prototype[mA]():void 0,n=(function(l){if(!(l===Zi||l.prototype instanceof Zi)){let u="<unknown>",d="<unknown>";try{u=l.getType()}catch{}try{_d.version&&(d=JSON.parse(_d.version))}catch{}se(290,l.name,u,d)}return l===Pw||l===Mi||l===Zi})(e),i=!n&&Sf(e,"getType")?e.getType():void 0;let o,a=i;if(r)if(i)o=r[i];else{for(const[l,u]of Object.entries(r))a=l,o=u;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const u=r[l];if(u){o=u;break}}}if(!n&&a&&(Sf(e,"getType")||(e.getType=()=>a),Sf(e,"clone")||(e.clone=l=>(zw(l),new e)),Sf(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!Sf(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const s={klass:e,ownNodeConfig:o,ownNodeType:a};return gT.set(e,s),s}function*Jw(e){for(let t=e;t&&(t===Zi||j6(t.prototype));){const r=Ww(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||O4(t)}}function P4(e){const t=Or();return An(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const lr=(e,t)=>{let r=e;for(;r!=null&&!jr(r);){if(t(r))return r;r=r.getParent()}return null};function E0(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?gr(n):t.get(n);i==null&&se(174),r.push(n),n=i.__next}return r}function O4(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 M4=new Map;function bs(e){return K(e)||dt(e)}function Mu(e){return K(e)||dt(e)}function Wn(e){const t=e.getLatest();return Mu(t)?t.__slotHost:null}function Qo(e){const t=Wn(e);if(t===null)return null;const r=gr(t);return K(r)||dt(r)||se(370),r}function jre(e){const t=Qo(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of Bv(t))if(i===r)return n;return null}function Uv(e){let t=e.getLatest();for(;t!==null;){if(Wn(t)!==null)return t;t=t.getParent()}return null}function Bv(e){const t=e.getLatest();return bs(t)&&t.__slots!==null?t.__slots:M4}function Ro(e){return Array.from(Bv(e).keys())}function Lu(e,t){const r=Bv(e).get(t);return r===void 0?null:gr(r)}const qre=["__proto__","constructor","prototype"],vT=Symbol("slotMapOwner");function px(e){let t=e.__slots;return t!==null&&t[vT]===e||(t=new Map(t),t[vT]=e,e.__slots=t),t}const bT=new WeakMap,Vre=[];function Gre(e){for(const{ownNodeConfig:t}of Jw(e)){const r=t&&t.slots;if(r)return r}return Vre}function L4(e){let t="";for(const r of Ro(e)){const n=Lu(e,r);n!==null&&(t+=n.getTextContent())}return t}function _T(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 Kre(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(a){let s=bT.get(a);if(s===void 0){const l=Gre(a),u=new Map;for(const d of l)qre.includes(d)&&se(371,a.name,d),u.has(d)&&se(372,a.name,d),u.set(d,u.size);s=u,bT.set(a,s)}return s})(e.constructor);let n=null,i=!0;for(const a of t.keys()){if(n!==null&&_T(n,a,r)>0){i=!1;break}n=a}if(i)return;const o=Array.from(t).sort(([a],[s])=>_T(a,s,r));t.clear();for(const[a,s]of o)t.set(a,s)}function z4(e,t,r){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||se(373,t);const n=e.getLatest();if(n.__slots!==null&&n.__slots.get(t)===r.getLatest().__key)return n;(!K(r)&&!dt(r)||r.isInline())&&se(374,r.__key);const i=e.getWritable(),o=px(i),a=o.get(t);a!==void 0&&U4(a);const s=r.getWritable(),l=Qo(s);if(l!==null){const u=jre(s);u!==null&&px(l.getWritable()).delete(u),s.__slotHost=null}return hs(s),s.__slotHost=i.__key,o.set(t,s.__key),Kre(i),(function(){const u=Or();u._slotsUsed=!0,u._pendingEditorState&&(u._pendingEditorState._slotsUsed=!0)})(),i}function Hre(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(U4(n),px(r).delete(t)),r}function U4(e){const t=gr(e);if(t===null)return;const r=t.getWritable();Mu(r)||se(377,e),r.__slotHost=null,r.remove()}const Wre={next:"previous",previous:"next"};class Qw{origin;constructor(t){this.origin=t}[Symbol.iterator](){return B4({hasNext:$l,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Bt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Bt(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,r){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(n===null?this.insert(t):n.replace(t,r)),this}splice(t,r,n="next"){const i=n===this.direction?r:Array.from(r).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();s.set(u.getKey(),u)}for(const l of i){if(s.size>0){const u=o.getNodeAtCaret();if(u){if(s.delete(u.getKey()),s.delete(l.getKey()),!(u.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),u.replace(l)}}else u===null&&se(263,Array.from(s).join(" "))}else o.insert(l);o=Bt(l,this.direction)}for(const l of s.values())l.remove();return this}}class Gh extends Qw{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Oo(t,this.direction)}getParentCaret(t="root"){return Bt(Yw(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=jl(this.direction);return Bt(this.getNodeAtCaret(),t)||Oo(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof Gh&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Jre={root:jr,shadowRoot:yr};function jl(e){return Wre[e]}function Yw(e,t="root"){return e===null||Jre[t](e)?null:Wn(e)===null?e:null}class zu extends Qw{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Bt(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return K(this.origin)?Oo(this.origin,this.direction):null}getParentCaret(t="root"){return Bt(Yw(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=jl(this.direction);return Bt(this.getNodeAtCaret(),t)||Oo(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof zu&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof zu||t instanceof Uu)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Uu extends Qw{type="text";offset;constructor(t,r){super(t),this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Nl(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Bt(Yw(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Nl(this.origin,jl(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Uu&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof zu||t instanceof Uu)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Bt(this.origin,this.direction)}}function Ao(e){return e instanceof Uu}function $l(e){return e instanceof zu}function To(e){return e instanceof Gh}const Qre={next:class extends Uu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Uu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},Yre={next:class extends zu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends zu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},Xre={next:class extends Gh{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Gh{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Bt(e,t){return e?new Yre[t](e):null}function Nl(e,t,r){return e?new Qre[t](e,Pa(e,r)):null}function Pa(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&HM(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function yT(e,t){return new ene(e,t)}function Oo(e,t){return K(e)?new Xre[t](e):null}function Zre(e){return e&&e.getChildCaret()||e}function Xw(e){return e&&Zre(e.getAdjacentCaret())}class Zw{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 Zw(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return Ao(o)?(function(a,s){const{direction:l,origin:u}=a,d=Pa(u,s==="focus"?jl(l):l);return yT(a,d-a.offset)})(o,i):null},r=t("anchor"),n=t("focus");if(r&&n){const{caret:i}=r,{caret:o}=n;if(i.isSameNodeCaret(o))return[yT(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=Ao(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=Ao(n),o=a=>a.isSameNodeCaret(n)?null:Xw(a)||a.getParentCaret(t);return B4({hasNext:a=>a!==null&&!(i&&n.isSameNodeCaret(a)),initial:r.isSameNodeCaret(n)?null:o(r),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class ene{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 Nl(t.setTextContent(o.slice(0,n)+o.slice(i)),r,n)}}function jv(e){return Zo(e,Bt(dn(),e.direction))}function qv(e){return Zo(e,e)}function Zo(e,t){return e.direction!==t.direction&&se(265),new Zw(e,t,e.direction)}function B4(e){const{initial:t,hasNext:r,step:n,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!r(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=n(o),a}}}function Kh(e,t){const r=mx(e.origin,t.origin);switch(r===null&&se(275,e.origin.getKey(),t.origin.getKey()),r.type){case"same":{const n=e.type==="text",i=t.type==="text";return n&&i?(function(o,a){return Math.sign(o-a)})(e.offset,t.offset):e.type===t.type?0:n?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return j4(r)}}function j4(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,a=r;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===n)return 1}return o===null?1:-1}function wm(e,t){return t.is(e)}function xT(e){return K(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function mx(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=xT(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=xT(t);n;i=n,n=n.getParent()){const o=r.get(n);if(o!==void 0)return o===null?(wm(e,n)||se(276),{commonAncestor:n,type:"ancestor"}):i===null?(wm(t,n)||se(277),{commonAncestor:n,type:"descendant"}):((K(o)||wm(e,o))&&(K(i)||wm(t,i))&&n.is(o.getParent())&&n.is(i.getParent())||se(278),{a:o,b:i,commonAncestor:n,type:"branch"})}return null}function Di(e,t){const{type:r,key:n,offset:i}=e,o=Are(e.key);return r==="text"?(ce(o)||se(266,o.getType(),n),Nl(o,t,i)):(K(o)||se(267,o.getType(),n),vx(o,e.offset,t))}function Bu(e,t){const{origin:r,direction:n}=t,i=n==="next";Ao(t)?e.set(r.getKey(),t.offset,"text"):$l(t)?ce(r)?e.set(r.getKey(),Pa(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(To(t)&&K(r)||se(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function Hh(e){const t=ye(),r=le(t)?t:Fw();return Dg(r,e),On(r),r}function Dg(e,t){Bu(e.anchor,t.anchor),Bu(e.focus,t.focus)}function gx(e){const{anchor:t,focus:r}=e,n=Di(t,"next"),i=Di(r,"next"),o=Kh(n,i)<=0?"next":"previous";return Zo($s(n,o),$s(i,o))}function ec(e){const{direction:t,origin:r}=e,n=Bt(r,jl(t)).getNodeAtCaret();return n?Bt(n,t):Oo(r.getParentOrThrow(),t)}function ST(e,t="root"){const r=[e];for(let n=To(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push(ec(n));return r}function I_(e){return!!e&&e.origin.isAttached()}function tne(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=tE(e,n),a=ST(o.anchor,r),s=ST(o.focus.getFlipped(),r),l=new Set,u=[];for(const m of o.iterNodeCarets(r))if(To(m))l.add(m.origin.getKey());else if($l(m)){const{origin:g}=m;K(g)&&!l.has(g.getKey())||u.push(g)}for(const m of u)m.remove();for(const m of o.getTextSlices()){if(!m)continue;const{origin:g}=m.caret,v=g.getTextContentSize(),b=ec(Bt(g,n)),_=g.getMode();if(Math.abs(m.distance)===v&&i==="removeEmptySlices"||_==="token"&&m.distance!==0)b.remove();else if(m.distance!==0){i="removeEmptySlices";let S=m.removeTextSlice();const E=m.caret.origin;if(_==="segmented"){const C=S.origin,A=Ur(C.getTextContent()).setStyle(C.getStyle()).setFormat(C.getFormat());b.replaceOrInsert(A),S=Nl(A,n,S.offset)}E.is(a[0].origin)&&(a[0]=S),E.is(s[0].origin)&&(s[0]=S.getFlipped())}}let d,f;for(const m of a)if(I_(m)){d=Ji(m);break}for(const m of s)if(I_(m)){f=Ji(m);break}const h=(function(m,g,v){if(!m||!g)return null;const b=m.getParentAtCaret(),_=g.getParentAtCaret();if(!b||!_)return null;const S=b.getParents().reverse();S.push(b);const E=_.getParents().reverse();E.push(_);const C=Math.min(S.length,E.length);let A;for(A=0;A<C&&S[A]===E[A];A++);const T=(I,M)=>{let P;for(let U=A;U<I.length;U++){const j=I[U];if(yr(j))return;!P&&M(j)&&(P=j)}return P},R=T(S,Vn),N=R&&T(E,I=>v.has(I.getKey())&&Vn(I));return N&&Ro(N).length>0?null:R&&N?[R,N]:null})(d,f,l);if(h){const[m,g]=h;Oo(m,"previous").splice(0,g.getChildren());let v=g.getParent();for(g.remove(!0);v&&v.isEmpty();){const b=v;v=v.getParent(),b.remove(!0)}}else if(f){const m=(function(b){if(To(b)){const _=b.origin;if(Vn(_))return _}else{const _=b.getParentAtCaret();if(_&&Vn(_))return _}return null})(f),g=m&&m.getParent(),v=m&&m.getParents().findLast(id);if(m&&g&&!jr(g)&&m.isEmpty()&&l.has(m.getKey())&&Ro(m).length===0&&(!v||l.has(v.getKey()))){m.remove(!0);let b=g;for(;b&&!jr(b)&&b.isEmpty();){const _=b.getParent();if(_&&jr(_)&&_.getChildrenSize()<=1)break;const S=b;b=_,S.remove(!0)}}}const p=[d,f,...a,...s].find(I_);if(p)return qv($s(Ji(p),e.direction));se(269,JSON.stringify(a.map(m=>m.origin.__key)))}function Ji(e){const t=(function(i){let o=i;for(;To(o);){const a=Xw(o);if(!To(a))break;o=a}return o})(e.getLatest()),{direction:r}=t;if(ce(t.origin))return Ao(t)?t:Nl(t.origin,r,r);const n=t.getAdjacentCaret();return $l(n)&&ce(n.origin)?Nl(n.origin,r,jl(r)):t}function eE(e){return Ao(e)&&e.offset!==Pa(e.origin,e.direction)}function $s(e,t){return e.direction===t?e:e.getFlipped()}function tE(e,t){return e.direction===t?e:Zo($s(e.focus,t),$s(e.anchor,t))}function vx(e,t,r){let n=Oo(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return $s(n,r)}function rne(e){const{origin:t,offset:r,direction:n}=e;if(r===Pa(t,n))return e.getSiblingCaret();if(r===Pa(t,jl(n)))return ec(e.getSiblingCaret());const[i]=t.splitText(r);return ce(i)||se(281),$s(Bt(i,"next"),n)}function nne(e,t){return!0}function q4(e,{$copyElementNode:t=ii,$splitTextPointCaretNext:r=rne,rootMode:n="shadowRoot",$shouldSplit:i=nne,removeEmptyDestination:o=!1}={}){if(Ao(e))return r(e);const a=e.getParentCaret(n);if(a){const{origin:s}=a;if(To(e)){const u=ec(a);if(o&&s.isEmpty())return s.remove(),u;if(!s.canBeEmpty()||!i(s,"first"))return u}const l=(function(u){const d=[];for(let f=u.getAdjacentCaret();f;f=f.getAdjacentCaret())d.push(f.origin);return d})(e);(l.length>0||!o&&s.canBeEmpty()&&i(s,"last"))&&a.insert(t(s).splice(0,0,l))}return a}function V4(e,t,r){let n=$s(t,"next");Ao(n)&&(n.offset===0?n=Bt(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=Bt(n.origin,"next"))),n.origin.is(e)&&($l(n)||se(342,e.getKey(),e.getType()),n=ec(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=q4(i,r))n=i;return Ao(n)&&se(283),n.insert(e.isInline()?Wt().append(e):e),$s(Bt(e.getLatest(),"next"),t.direction)}function rE(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function _s(...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 Ua(e,...t){const r=_s(...t);r.length>0&&e.classList.add(...r)}function nE(e,...t){const r=_s(...t);r.length>0&&e.classList.remove(...r)}function Dl(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function G4(e){const t=Or().getElementByKey(e.getKey());if(t===null)return null;const r=t.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(t)}function K4(e){return G4(jr(e)?e:e.getParentOrThrow())}function Em(e){const t=K4(e);return t!==null&&t.direction==="rtl"}function H4(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!Wi(t)&&n!==null){const[i,o]=n,a=e.isBackward(),s=i.getNode(),l=o.getNode(),u=t.is(s),d=t.is(l);if(u||d){const[f,h]=sx(e),p=s.is(l),m=t.is(a?l:s),g=t.is(a?s:l);let v,b=0;p?(b=f>h?h:f,v=f>h?f:h):m?(b=a?h:f,v=void 0):g&&(b=0,v=a?f:h);const _=t.__text.slice(b,v);_!==t.__text&&(r==="clone"&&(t=zre(t)),t.__text=_)}}return t}function ine(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function one(e,t,r){let n=Di(e,r);if(eE(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 ane(e,t,r=ine){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const a=new Map;if(n){const[s,l]=n,u=lr(s.getNode(),Vn);o=lr(l.getNode(),Vn);const d=e.isBackward()?"previous":"next";i=K(o)&&!o.is(u)&&(function(f,h,p){const m=f.getNode();return(!K(m)||!m.isEmpty())&&one(f,h,p)})(l,o,jl(d)),K(u)&&a.set(u.getKey(),u),K(o)&&!i&&a.set(o.getKey(),o)}for(const s of e.getNodes())if(K(s)&&Vn(s)){if(i&&s.is(o))continue;a.set(s.getKey(),s)}else if(!n){const l=lr(s,Vn);K(l)&&a.set(l.getKey(),l)}for(const s of a.values()){const l=t();r(s,l),s.replace(l,!0)}}function W4(e){const t=J4(e);return t!==null&&t.writingMode==="vertical-rl"}function J4(e){const t=e.anchor.getNode();return K(t)?G4(t):K4(t)}function wT(e,t){let r=W4(e)?!t:t;Q4(e)&&(r=!r);const n=Di(e.focus,r?"previous":"next");if(eE(n))return!1;if(Ao(n)&&!Fu(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(ce(i)&&!Fu(i))return!0}for(const i of jv(n)){if(To(i))return!i.origin.isInline();if(!K(i.origin)){if(dt(i.origin))return!0;break}}return!1}function sne(e,t,r,n){e.modify(t?"extend":"move",r,n)}function Q4(e){const t=J4(e);return t!==null&&t.direction==="rtl"}function ET(e,t,r){const n=Q4(e);let i;i=W4(e)||n?!r:r,sne(e,t,i,"character")}function lne(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 une(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function cne(e){const t=lr(e,r=>K(r)&&!r.isInline());return K(t)||lne(4,e.__key),t}function ml(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function km(e){let t=null;if(ml(e,DragEvent)?t=e.dataTransfer:ml(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 kT(e){const t=ye();if(!le(t))return!1;const r=new Set,n=t.getNodes();for(let i=0;i<n.length;i++){const o=n[i],a=o.getKey();if(r.has(a))continue;const s=lr(o,u=>K(u)&&!u.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!r.has(l)&&(r.add(l),e(s))}return r.size>0}const dne=Symbol.for("preact-signals");function iE(){if(_u>1)return void _u--;let e,t=!1;for(!(function(){let r=k0;for(k0=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();ih!==void 0;){let r=ih;for(ih=void 0,C0++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&Y4(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(C0=0,_u--,t)throw e}let Xt,ih;function CT(e){const t=Xt;Xt=void 0;try{return e()}finally{Xt=t}}let k0,_u=0,C0=0,RT=0,Fg=0;function AT(e){if(Xt===void 0)return;let t=e.n;return t===void 0||t.t!==Xt?(t={i:0,S:e,p:Xt.s,n:void 0,t:Xt,e:void 0,x:void 0,r:t},Xt.s!==void 0&&(Xt.s.n=t),Xt.s=t,e.n=t,32&Xt.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=Xt.s,t.n=void 0,Xt.s.n=t,Xt.s=t),t):void 0}function ci(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 fne(e,t){return new ci(e,t)}function Y4(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 TT(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 X4(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 yc(e,t){ci.call(this,void 0),this.x=e,this.s=void 0,this.g=Fg-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Z4(e){const t=e.m;if(e.m=void 0,typeof t=="function"){_u++;const r=Xt;Xt=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,oE(e),n}finally{Xt=r,iE()}}}function oE(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Z4(e)}function hne(e){if(Xt!==this)throw new Error("Out-of-order effect");X4(this),Xt=e,this.f&=-2,8&this.f&&oE(this),iE()}function Fc(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 pne(e,t){const r=new Fc(e,t);try{r.c()}catch(i){throw r.d(),i}const n=r.d.bind(r);return n[Symbol.dispose]=n,n}ci.prototype.brand=dne,ci.prototype.h=function(){return!0},ci.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:CT(()=>{var r;(r=this.W)==null||r.call(this)}))},ci.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&&CT(()=>{var n;(n=this.Z)==null||n.call(this)}))}},ci.prototype.subscribe=function(e){return pne(()=>{const t=this.value,r=Xt;Xt=void 0;try{e(t)}finally{Xt=r}},{name:"sub"})},ci.prototype.valueOf=function(){return this.value},ci.prototype.toString=function(){return this.value+""},ci.prototype.toJSON=function(){return this.value},ci.prototype.peek=function(){const e=Xt;Xt=void 0;try{return this.value}finally{Xt=e}},Object.defineProperty(ci.prototype,"value",{get(){const e=AT(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(C0>100)throw new Error("Cycle detected");(function(t){_u!==0&&C0===0&&t.l!==RT&&(t.l=RT,k0={S:t,v:t.v,i:t.i,o:k0})})(this),this.v=e,this.i++,Fg++,_u++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{iE()}}}}),yc.prototype=new ci,yc.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Fg))return!0;if(this.g=Fg,this.f|=1,this.i>0&&!Y4(this))return this.f&=-2,!0;const e=Xt;try{TT(this),Xt=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 Xt=e,X4(this),this.f&=-2,!0},yc.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)}ci.prototype.S.call(this,e)},yc.prototype.U=function(e){if(this.t!==void 0&&(ci.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)}},yc.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(yc.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=AT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Fc.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()}},Fc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Z4(this),TT(this),_u++;const e=Xt;return Xt=this,hne.bind(this,e)},Fc.prototype.N=function(){2&this.f||(this.f|=2,this.u=ih,ih=this)},Fc.prototype.d=function(){this.f|=8,1&this.f||oE(this)},Fc.prototype.dispose=function(){this.d()};function mne(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function mr(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 eL;try{eL="0.48.0+prod.esm"}catch{}const gne=eL??'"<unknown>+source"',vne=new Set(["__proto__","constructor","prototype"]);function tL(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!vne.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=tL(r[i],n[i]));return e}return t}const aE=0,bx=1,rL=2,P_=3,Cm=4,xc=5,O_=6,wf=7;function M_(e){return e.id===aE}function nL(e){return e.id===rL}function bne(e){return(function(t){return t.id===bx})(e)||mr(305,String(e.id),String(bx)),Object.assign(e,{id:rL})}const _ne=new Set;let yne=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:aE}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):rE;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;nL(r)||mr(306,String(r.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,u){return Object.assign(s,{config:l,id:P_,registerState:u})})(r,this.mergeConfigs(),n);let a;this.state=o,this.extension.init&&(a=this.extension.init(t,o.config,n)),this.state=(function(s,l,u){return Object.assign(s,{id:Cm,initResult:l,registerState:u})})(o,a,i)}build(t){const r=this.state;let n;r.id!==Cm&&mr(307,String(r.id),String(xc)),this.extension.build&&(n=this.extension.build(t,r.config,r.registerState));const i={...r.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:xc,output:a,registerState:s})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==xc&&mr(308,String(n.id),String(xc));const i=this.extension.register&&this.extension.register(t,n.config,n.registerState);return this.state=(function(o){return Object.assign(o,{id:O_})})(n),()=>{const o=this.state;o.id!==wf&&mr(309,String(n.id),String(wf)),this.state=(function(a){return Object.assign(a,{id:xc})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==O_&&mr(310,String(r.id),String(O_)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:wf})})(r),n}getSignal(){return this._signal===void 0&&mr(311),this._signal}getInitResult(){this.extension.init===void 0&&mr(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Cm})(t)||mr(313,String(t.id),String(Cm)),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>=P_})(t)||mr(314,String(t.id),String(P_)),{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&&mr(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&mr(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=wf})(t)||mr(316,String(t.id),String(wf)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||_ne}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>=xc})(t)||mr(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const $T={tag:rh};function xne(){const e=dn();e.isEmpty()&&e.append(Wt())}const Sne={config:{setOptions:$T,updateOptions:$T},init:({$initialEditorState:e=xne})=>({$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(fre(o))e.setEditorState(o,r);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const a=e.parseEditorState(o);e.setEditorState(a,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[jd,Ps,qd,zd,Vd]},NT=Symbol.for("@lexical/extension/LexicalBuilder");function DT(){}function wne(e){throw e}function Rm(e){return Array.isArray(e)?e:[e]}const L_=gne;class oh{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=L_,this.roots=t;for(const r of t)this.addExtension(r)}static fromExtensions(t){const r=[Rm(Sne)];for(const n of t)r.push(Rm(n));return new oh(r)}static maybeFromEditor(t){const r=t[NT];return r&&(r.PACKAGE_VERSION!==L_&&mr(292,r.PACKAGE_VERSION,L_),r instanceof oh||mr(293)),r}static fromEditor(t){const r=oh.maybeFromEditor(t);return r===void 0&&mr(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(Lw({...i,...r?{onError:a=>{r(a,o)}}:{},...n?{onWarn:a=>{n(a,o)}}:{}}),{[NT]:this});for(const a of this.sortedExtensionReps())a.build(o);return o}buildEditor(){let t=DT;function r(){try{t()}finally{t=DT}}const n=Object.assign(this.constructEditor(),{dispose:r,[Symbol.dispose]:r});return t=Dl(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&&mr(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&&mr(296);const r=Rm(t),[n]=r;typeof n.name!="string"&&mr(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&mr(298,n.name),!i){i=new yne(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&mr(299,n.name,o);for(const a of n.conflictsWith||[])this.extensionNameMap.has(a)&&mr(299,n.name,a),this.conflicts.set(a,n.name);for(const a of n.dependencies||[]){const s=Rm(a);this.addEdge(n.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of n.peerDependencies||[])this.addEdge(n.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(nL(o))return;const a=n.extension.name;var s;M_(o)||mr(300,a,i||"[unknown]"),M_(s=o)||mr(304,String(s.id),String(aE)),o=Object.assign(s,{id:bx}),n.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const u of l.keys()){const d=this.extensionNameMap.get(u);d&&r(d,a)}o=bne(o),n.state=o,t.push(n)};for(const n of this.extensionNameMap.values())M_(n.state)&&r(n);for(const n of t)for(const[i,o]of this.outgoingConfigEdges.get(n.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&mr(301,n.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const a of r){const s=a.register(t,o);s&&i.push(s)}for(const a of r){const s=a.afterRegistration(t);s&&i.push(s)}return Dl(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of mne(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&mr(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&&tL(a,f.theme)}Object.keys(a).length>0&&(t.theme=a),r.size&&(t.nodes=[...r]);const l=Object.keys(o).length>0,u=i.size>0;(l||u)&&(t.html={},l&&(t.html.import=o),u&&(t.html.export=i));for(const d of s)d.init(t);return t.onError||(t.onError=wne),t}}function Dp(e,t){const r=oh.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function Ene(e){return Dp(Or(),e)}class Vv extends Pw{static getType(){return"horizontalrule"}static clone(t){return new Vv(t.__key)}static importJSON(t){return sE().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:kne,priority:0})}}exportDOM(){return{element:br().createElement("hr")}}createDOM(t){const r=br().createElement("hr");return Ua(r,t.theme.hr),r}getTextContent(){return`
|
|
28
|
+
`}isInline(){return!1}updateDOM(){return!1}}function kne(){return{node:sE()}}function sE(){return P4(Vv)}function Wd(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 od;function iL(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function oL(e){return od&&od.editor===e?od:void 0}function Cne(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n(iL(e,r))]}return t}function Rne(e,t){let r=t;for(const n of e){const[i,o]=Cne(r,n),a=i.key;if(r===t&&iL(r,i)===o)continue;const s=r===t||r===void 0?Ane(t):r;s[a]=o,r=s}return r}function Ane(e){return Object.create(e||null)}function aL(e,t){return[e,t]}function Tne(e,t,r,n=Or()){const i=od,o=oL(n);try{return od={...o,editor:n,[e]:t},r()}finally{od=i}}function $ne(e,t=()=>{}){return(r,n=Or())=>i=>{const o=oL(n),a=o&&o[e],s=Rne(r,a||t(n));return s&&s!==a?Tne(e,s,i,n):i()}}function sL(e,t,r,n){return Object.assign(Rp(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function Nne(e){if(!Yu(e))return;const t=e;if(t.querySelector("style")===null)return;const r=new Map;function n(i){let o=r.get(i);if(o===void 0){o=new Set;for(let a=0;a<i.style.length;a++)o.add(i.style[a]);r.set(i,o)}return o}try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const a of Array.from(o)){if(!ml(a,CSSStyleRule))continue;let s;try{s=t.querySelectorAll(a.selectorText)}catch{continue}for(const l of Array.from(s)){if(!rt(l))continue;const u=n(l);for(let d=0;d<a.style.length;d++){const f=a.style[d];u.has(f)||l.style.setProperty(f,a.style.getPropertyValue(f),a.style.getPropertyPriority(f))}}}}}catch{}}const lL="@lexical/html/DOM",uL=Symbol.for("@lexical/html/DOMExportContext"),Dne=Symbol.for("@lexical/html/DOMImportContext");function Fne(e,t,r){return sL(uL,e,t,r)}const Ine=Fne("isExport",Boolean);function Pne(e){const t=Dp(e,lL);return t?t.output.defaults:void 0}function One(e){const t=Dp(e,lL);return t?t.output.runtime:void 0}function Mne(e=Or()){const t=One(e);return t?t.getSessionConfig():zv(e)}const Lne=$ne(uL,Pne),Gv=Symbol.for("@lexical/html/SelectorImpl");function Wh(e,t){const r={kind:"element",predicate:(n=t,n.length===0?rt:n.length===1?n[0]:(o,a)=>{for(const s of n)if(!s(o,a))return!1;return!0}),tags:e};var n;const i=o=>Wh(e,[...t,o]);return{[Gv]:r,attr:(o,a,s)=>i(_x(o,a,s)),classAll:(...o)=>i(dL(o)),classAny:(...o)=>i((function(a){const s=cL(a);return s.length===0?()=>!1:l=>{if(!rt(l))return!1;const u=l.classList;for(const d of s)if(u.contains(d))return!0;return!1}})(o)),styleAny:(o,a,s)=>i((function(l,u,d){if(typeof u=="string")return f=>rt(f)&&f.style.getPropertyValue(l)===u;if(u instanceof RegExp){const f=d&&d.capture,h=u;return(p,m)=>{if(!rt(p))return!1;const g=p.style.getPropertyValue(l);if(!g)return!1;const v=g.match(h);return v!==null&&(f!==void 0&&(m[f]=v),!0)}}Wd(362,JSON.stringify(l))})(o,a,s))}}function cL(e){const t=[];for(const r of e)r&&t.push(r);return t}function dL(e){const t=cL(e);return t.length===0?()=>!0:r=>{if(!rt(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function _x(e,t,r){if(t===!0)return n=>rt(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>rt(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,a)=>{if(!rt(o))return!1;const s=o.getAttribute(e);if(s==null)return!1;const l=s.match(i);return l!==null&&(n!==void 0&&(a[n]=l),!0)}}Wd(361,JSON.stringify(e))}const zne={kind:"text",predicate:zi,tags:new Set},Une={[Gv]:zne},Bne={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},jne={[Gv]:Bne},Uc={any:()=>Wh(new Set,[]),comment:()=>jne,tag(...e){e.length>0||Wd(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return Wh(t,[])},text:()=>Une};function fL(e,t){return rt(e)&&e.nodeName===t.toUpperCase()}const hL=/[A-Za-z0-9_-]/;let qne=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()&&hL.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||Wd(364,String(this.pos+1),r,this.source)}};function Vne(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(hL.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(_x("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let a=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const s=e.peek();s==='"'||s==="'"?a=e.readQuoted():(a=e.readIdent(),e.assert(a!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(_x(o,a))}}}return n.length>0&&r.push(dL(n)),{predicates:r,tags:t}}function Gne(e){const t=new qne(e,0),r=[];for(;;){const i=Vne(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 Wh(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 Wh(n,[(i,o)=>{for(const a of r){const s=i.nodeName;if(a.tags.size>0&&!a.tags.has(s))continue;let l=!0;for(const u of a.predicates)if(!u(i,o)){l=!1;break}if(l)return!0}return!1}])}function lE(e,t,r){return sL(Dne,e,t,r)}const yx=lE("textFormat",()=>0),Kne=lE("textStyle",()=>({}));function Hne(e){if(!rt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function Wne(e){if(zi(e))return!0;if(!rt(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Sd(e)&&S0(e)}const Jne=lE("whitespaceConfig",()=>({isInline:Wne,preservesWhitespace:Hne}));function uE(e){return vd(e)||dt(e)&&!e.isInline()}function pL(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(uE(o)){if(i(),K(o)){const a=pL(o.getChildren(),t);o.splice(0,o.getChildrenSize(),a)}r.push(o)}else n.push(o);return i(),r}function mL(e,t){if(!rt(t))return e;const r=t.style.textAlign;if(!cE(r))return e;for(const n of e)vd(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function Qne(e,t,r){e.length===1&&_i(e[0])&&(e=[]);const n=Wt();if(rt(r)){const i=r.style.textAlign;cE(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const gL={$accepts:uE,$packageRun:Qne,name:"BlockSchema"},tc=Uc,Yne=new Set(["center","end","justify","left","right","start"]);function cE(e){return Yne.has(e)}const Xne={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"}},Zne={CODE:nte,MARK:Cw},eie=new Set(["font-weight","font-style","text-decoration","vertical-align"]),tie={$import:(e,t)=>{const r=e.get(yx),n=Xne[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=n?(a=n,{fontStyle:(s=i).fontStyle||a.fontStyle,fontWeight:s.fontWeight||a.fontWeight,textDecoration:s.textDecoration||a.textDecoration,verticalAlign:s.verticalAlign||a.verticalAlign}):i;var a,s;let l=(u=r,d=(function(h){let p=0,m=0;const{fontWeight:g,fontStyle:v,textDecoration:b,verticalAlign:_}=h;if(g==="700"||g==="bold"?p|=dA:g!=="normal"&&g!=="400"||(m|=dA),v==="italic"?p|=fA:v==="normal"&&(m|=fA),b){const S=b.split(" ");S.includes("underline")&&(p|=pA),S.includes("line-through")&&(p|=hA),S.includes("none")&&(m|=pA|hA)}return _==="sub"?(p|=x_,m|=S_):_==="super"?(p|=S_,m|=x_):_==="baseline"&&(m|=x_|S_),{clear:m,set:p}})(o),u&~d.clear|d.set);var u,d;const f=Zne[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[aL(yx,l)]})},match:tc.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function FT(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentNode;if(a===null)return null;n=a}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(zi(n))return n;if(n.nodeName==="BR")return null}}function IT(e,t){return t!==0&&ce(e)?e.setFormat(t):e}function PT(e,t){if(ce(e)){const r=(function(n){let i="";for(const o in n)eie.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const rie={$import:(e,t)=>{const r=e.get(yx),n=e.get(Kne),i=e.get(Jne);if((function(s,l){let u=s.parentNode;for(;u!==null;){if(l.preservesWhitespace(u))return!0;u=u.parentNode}return!1})(t,i)){const s=qh(t.textContent||"");for(const l of s)IT(l,r),PT(l,n);return s}const o=(function(s,l){let u=(s.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(u.length===0)return"";if(u[0]===" "){let d=s,f=!0;for(;d!==null&&(d=FT(d,!1,l))!==null;){const h=d.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(u=u.slice(1)),f=!1;break}}f&&(u=u.slice(1))}if(u.length>0&&u[u.length-1]===" "){let d=s,f=!0;for(;d!==null&&(d=FT(d,!0,l))!==null;)if((d.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(u=u.slice(0,-1))}return u})(t,i);if(o==="")return[];const a=Ur(o);return IT(a,r),PT(a,n),[a]},match:tc.text(),name:"@lexical/html/#text"},nie={$import:()=>[],match:tc.tag("script","style"),name:"@lexical/html/script-style-ignore"},iie={$import:(e,t)=>p4(t)||m4(t)?[]:[na()],match:tc.tag("br"),name:"@lexical/html/br"},oie={$import:(e,t)=>{const r=Wt();if(Ha(r,t),Zu(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&cE(n)&&r.setFormat(n)}return Lo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:tc.tag("p"),name:"@lexical/html/p"},aie={$import:(e,t,r)=>Or().hasNode(Vv)?[sE()]:r(),match:tc.tag("hr"),name:"@lexical/html/hr"};tc.any();function sie(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 lie(e){const t=[],r=new Map,n=[],i=[],o=[],a=new Set;e.forEach((l,u)=>{const d=(function(h){const p=h[Gv];return p===void 0&&Wd(360),p})(l.match),f=l.name||(function(h,p){return h.kind==="text"?`#text@${p}`:h.kind==="comment"?`#comment@${p}`:h.tags.size===0?`*@${p}`:`${Array.from(h.tags).join(",").toLowerCase()}@${p}`})(d,u);if(l.name&&a.add(l.name),t.push({$import:l.$import,name:f,predicate:d.predicate}),d.kind==="text")i.push(u);else if(d.kind==="comment")o.push(u);else if(d.tags.size===0)n.push(u);else for(const h of d.tags){let p=r.get(h);p||(p=[],r.set(h,p)),p.push(u)}});const s=new Map;if(n.length===0)for(const[l,u]of r)s.set(l,u);else for(const[l,u]of r)s.set(l,sie(u,n));return{byTag:s,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function uie(e){const t=[];for(const r of e)if(cie(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function cie(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function vL(e){const t=uie(e);return{__type:"CompiledOverlayRules",dispatch:lie(t),rules:t}}Uc.any();const Ln={any:Uc.any,comment:Uc.comment,css:Gne,tag:Uc.tag,text:Uc.text},bL=new Set(["STYLE","SCRIPT"]);function die(e,t){Nne(t);const r=Yu(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!bL.has(o.nodeName)){const a=yL(o,e,i,!1);if(a!==null)for(const s of a)n.push(s)}return(function(o){for(const a of o)a.getParent()&&a.getNextSibling()instanceof Mw&&a.insertAfter(na());for(const a of o){const s=a.getParent();s&&s.splice(a.getIndexWithinParent(),1,a.getChildren())}})(i),n}function fie(e,t=null,r=Or()){return Lne([aL(Ine,!0)],r)(()=>{const n=dn(),i=Mne(r),o=le(t)?Uv(t.anchor.getNode()):null,a=e.append.bind(e);for(const s of(K(o)?o:n).getChildren())_L(r,s,a,t,i);return e})}function hie(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&Wd(338),lre(e),fie(br().createElement("div"),t,e).innerHTML}function _L(e,t,r,n=null,i=zv(e)){let o=i.$shouldInclude(t,n,e);const a=i.$shouldExclude(t,n,e);let s=t;n!==null&&ce(t)&&(s=H4(n,t,"clone"));const l=i.$exportDOM(s,e),{element:u,after:d,append:f,$getChildNodes:h}=l;if(!u)return!1;const p=br().createDocumentFragment(),m=h?h():K(s)?s.getChildren():[],g=o&&hr(n)&&K(t)?null:n,v=p.append.bind(p);for(const b of m){const _=_L(e,b,v,g,i);!o&&_&&i.$extractWithChild(t,b,n,"html",e)&&(o=!0)}if(o&&!a){if((rt(u)||hx(u))&&(f?f(p):u.append(p)),r(u),d){const b=d.call(s,u);b&&(hx(u)?u.replaceChildren(b):u.replaceWith(b))}}else r(p);return o}function yL(e,t,r,n,i=new Map,o){const a=[];if(bL.has(e.nodeName))return a;let s=null;const l=(function(m,g){const{nodeName:v}=m,b=g._htmlConversions.get(v.toLowerCase());let _=null;if(b!==void 0)for(const S of b){const E=S(m);E!==null&&(_===null||(_.priority||0)<=(E.priority||0))&&(_=E)}return _!==null?_.conversion:null})(e,t),u=l?l(e):null;let d=null;if(u!==null){d=u.after;const m=u.node;if(s=Array.isArray(m)?m[m.length-1]:m,s!==null){for(const[,g]of i)if(s=g(s,o),!s)break;s&&a.push(...Array.isArray(m)?m:[s])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const f=e.childNodes;let h=[];const p=(s==null||!yr(s))&&(s!=null&&vd(s)||n);for(let m=0;m<f.length;m++)h.push(...yL(f[m],t,r,p,new Map(i),s));if(d!=null&&(h=d(h)),Sd(e)&&(h=pie(e,h,p?()=>{const m=new Mw;return r.push(m),m}:Wt)),s==null)if(h.length>0)for(const m of h)a.push(m);else Sd(e)&&(function(m){return m.nextSibling==null||m.previousSibling==null?!1:S0(m.nextSibling)&&S0(m.previousSibling)})(e)&&a.push(na());else K(s)&&s.append(...h);return a}function pie(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let a=0;a<t.length;a++){const s=t[a];if(vd(s))n&&!s.getFormat()&&s.setFormat(n),i.push(s);else if(o.push(s),a===t.length-1||a<t.length-1&&vd(t[a+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function ll(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 mie(e){let t=1,r=e.getParent();for(;r!=null;){if(Pt(r)){const n=r.getParent();if(lt(n)){t++,r=n.getParent();continue}ll(40)}return t}return t}function xx(e){const t=e.getParent();lt(t)||ll(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),lt(n)&&(r=n);return r}function xL(e){let t=[];const r=e.getChildren().filter(Pt);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();lt(o)?t=t.concat(xL(o)):t.push(i)}return t}function _o(e){return Pt(e)&<(e.getFirstChild())}function SL(e,t){return Pt(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function OT(e){const t=ye();if(t!==null){let r=t.getNodes();if(le(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),a=o.getParent();if(yr(o)){const s=o.getFirstChild();if(s)r=s.selectStart().getNodes();else{const l=Wt();o.append(l),r=l.select().getNodes()}}else if(SL(o,r)){const s=ea(e);if(yr(a)){o.replace(s);const l=Ba();K(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),s.append(l)}else if(Pt(o)){const l=o.getParentOrThrow();ju(s,l.getChildren()),l.replace(s)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(K(o)&&o.isEmpty()&&!Pt(o)&&!n.has(o.getKey())){MT(o,e);continue}let a=b4(o)?o.getParent():Pt(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(lt(a)){if(!n.has(s)){const l=ea(e);ju(l,a.getChildren()),a.replace(l),n.add(s)}break}{const l=a.getParent();if(yr(l)&&!n.has(s)){n.add(s),MT(a,e);break}a=l}}}}}function ju(e,t){e.splice(e.getChildrenSize(),0,t)}function MT(e,t){if(lt(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=Ba();let o;if(ju(i,e.getChildren()),lt(r)&&t===r.getListType())r.append(i),lt(n)&&t===n.getListType()&&(ju(r,n.getChildren()),n.remove()),o=r;else if(lt(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const s=ea(t);s.append(i),e.replace(s),o=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const a=ye();return le(a)&&(o.getKey()===a.anchor.key&&a.anchor.set(i.getKey(),a.anchor.offset,"element"),o.getKey()===a.focus.key&&a.focus.set(i.getKey(),a.focus.offset,"element")),e.remove(),o}function dE(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&_o(r)&&_o(n)&&(dE(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function gie(){const e=ye();if(le(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(SL(n,r))t.add(xx(n));else for(let i=0;i<r.length;i++){const o=r[i];if(b4(o)){const a=une(o,rc);a!=null&&t.add(xx(a))}}for(const i of t){let o=i;const a=xL(i);for(const s of a){const l=Wt().setTextStyle(e.style).setTextFormat(e.format);ju(l,s.getChildren()),o.insertAfter(l),o=l,s.__key===e.anchor.key&&Bu(e.anchor,Ji(Oo(l,"next"))),s.__key===e.focus.key&&Bu(e.focus,Ji(Oo(l,"next"))),s.remove()}i.remove()}}}function wL(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())Pt(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),lt(n.getFirstChild())||r++)}function vie(e){const t=new Set;if(_o(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(_o(n)&&_o(i)){const o=i.getFirstChild();if(lt(o)){o.append(e);const a=n.getFirstChild();lt(a)&&(ju(o,a.getChildren()),n.remove(),t.add(n.getKey()))}}else if(_o(n)){const o=n.getFirstChild();if(lt(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(e)}}else if(_o(i)){const o=i.getFirstChild();lt(o)&&o.append(e)}else if(lt(r)){const o=ii(e),a=ii(r);o.append(a),a.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function LT(e){if(_o(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(lt(r?r.getParent():void 0)&&Pt(r)&<(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=ii(e),a=ii(t);o.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const s=ii(e),l=ii(t);s.append(l),ju(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(s),r.replace(e)}}}function bie(e=!1){const t=ye();if(!le(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(Pt(r)&&r.getChildrenSize()===0)n=r;else if(ce(r)){const u=r.getParent();Pt(u)&&u.getChildren().every(d=>ce(d)&&d.getTextContent().trim()==="")&&(n=u)}if(n===null)return!1;const i=xx(n),o=n.getParent();lt(o)||ll(40);const a=o.getParent();let s;if(yr(a))s=Wt(),i.insertAfter(s);else{if(!Pt(a))return!1;s=ii(a),a.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=n.getNextSiblings();if(l.length>0){const u=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,n):1,d=ii(o).setStart(u);if(Pt(s)){const f=ii(s);f.append(d),s.insertAfter(f)}else s.insertAfter(d);d.append(...l)}return(function(u){let d=u;for(;d.getNextSibling()==null&&d.getPreviousSibling()==null;){const f=d.getParent();if(f==null||!Pt(f)&&!lt(f))break;d=f}d.remove()})(n),!0}let rc=class extends Mi{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(lt(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();lt(n)||ll(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:a}of Bt(t,o)){if(!Pt(a))break;i.push(a)}}t.insertBefore(n),n.splice(0,0,i),yr(r)||(V4(n,ec(Bt(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:Mi,importDOM:{li:()=>({conversion:_ie,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=br().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(a,s){const l=s.getParent();!lt(l)||l.getListType()!=="check"||lt(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(a,s,l){const u=s.list;if(!u)return;const d=u.listitem,f=u.nested&&u.nested.listitem,h=l.getParent(),p=lt(h)&&h.getListType()==="check",m=l.getChecked(),g=l.getChildren().some(_=>lt(_)),v=[];u.listitemChecked!==void 0&&v.push(u.listitemChecked),u.listitemUnchecked!==void 0&&v.push(u.listitemUnchecked),f!==void 0&&v.push(..._s(f)),v.length>0&&nE(a,...v);const b=[];if(d!==void 0&&b.push(..._s(d)),p){const _=m?u.listitemChecked:u.listitemUnchecked;_!==void 0&&b.push(_)}f!==void 0&&g&&b.push(..._s(f)),b.length>0&&Ua(a,...b)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&td(r.style,o,i),(function(a,s,l){const u=s.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===u)return;const f=f0(u);for(const h in f)a.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in f0(d))h in f||a.style.removeProperty(`--listitem-marker-${h}`)})(r,this,t)}updateDOM(t,r,n){const i=r;return this.updateListItemDOM(t,i,n),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const r=this.createDOM(t._config),n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();return i&&(r.dir=i),_o(this)?{after(o){if(rt(o)){const a=o.previousElementSibling;if(rt(a)&&a.nodeName==="LI"){for(;o.firstChild;)a.append(o.firstChild);o.remove()}}return o},element:r}:{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let r=0;r<t.length;r++){const n=t[r];if(K(n)&&this.canMergeWith(n)){const i=n.getChildren();this.append(...i),n.remove()}else super.append(n)}return this}replace(t,r){if(Pt(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!lt(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const a=ii(n);let s=this.getNextSibling();for(;s;){const l=s;s=s.getNextSibling(),a.append(l)}n.insertAfter(t),t.insertAfter(a)}const i=this.__key;let o=0;if(r&&(K(t)||ll(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&K(t)){const a=ye();if(le(a))for(const s of a.getStartEndPoints())s.key===i&&s.type==="element"&&s.set(t.getKey(),o+s.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(lt(n)||ll(39),Pt(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=ii(n);i.forEach(a=>o.append(a)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&_o(r)&&_o(n)&&(dE(r.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,r=!0){const n=ii(this);return this.insertAfter(n,r),n}collapseAtStart(t){if(_o(this))return!1;const r=this.getParentOrThrow();if(Pt(r.getParentOrThrow()))return LT(this),!0;const n=Wt().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=ii(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 lt(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(;Pt(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&ll(117),(t=Math.floor(t))>=0||ll(199);let r=this.getIndent();for(;r!==t;)r<t?(vie(this),r++):(LT(this),r--);return this}canInsertAfter(t){return Pt(t)}canReplaceWith(t){return Pt(t)}canMergeWith(t){return Pt(t)||Gd(t)}extractWithChild(t,r){if(!le(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 ea("bullet")}canMergeWhenEmpty(){return!0}};function _ie(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return zT(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 zT(n.children[0])}const t=e.getAttribute("aria-checked"),r=Ba(t==="true"||t!=="false"&&void 0);return Ha(r,e),{after:EL.bind(null,r),node:Lo(r,e)}}function zT(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=Ba(e.hasAttribute("checked"));return{after:EL.bind(null,t),node:t}}function EL(e,t){const r=t[0];return t.length===1&&Gd(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function Ba(e){return fa(new rc(void 0,e))}function Pt(e){return e instanceof rc}let Fp=class extends Mi{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();lt(n)&&r.getListType()===n.getListType()&&dE(r,n)})(t),wL(t)},extends:Mi,importDOM:{ol:()=>({conversion:BT,priority:0}),ul:()=>({conversion:BT,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=yie[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=br().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,UT(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(UT(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 rt(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,r,n){let i=n;for(let o=0;o<n.length;o++){const a=n[o];Pt(a)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!K(a)||lt(a)||a.isInline()?a:Ur(a.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return Pt(t)}createListItemNode(){return Ba()}};function UT(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const a=o[`${r.__tag}Depth`]||[],s=mie(r)-1,l=s%a.length,u=a[l],d=o[r.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&n.push(d),p!==void 0&&r.__listType==="check"&&n.push(p),u!==void 0){n.push(..._s(u));for(let m=0;m<a.length;m++)m!==l&&i.push(r.__tag+m)}if(f!==void 0){const m=_s(f);s>1?n.push(...m):i.push(...m)}}i.length>0&&nE(e,...i),n.length>0&&Ua(e,...n)}function BT(e){let t;if((function(r){return rt(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=ea("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(rt(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?ea("check"):ea("bullet");return Lo(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),a=[];for(let s=0;s<n.length;s++){const l=n[s];if(Pt(l)){a.push(l);const u=l.getChildren();u.length>1&&u.forEach(d=>{lt(d)&&a.push(o().append(d))})}else a.push(o().append(l))}return a})(r,t),node:t}}const yie={ol:"number",ul:"bullet"};function ea(e="number",t=1){return fa(new Fp(e,t))}function lt(e){return e instanceof Fp}function xie(e){const t=[];for(const r of e)if(Pt(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)lt(i)&&t.push(Ba().append(i))}else t.push(Ba().append(r));return t}const Sie={$import:(e,t)=>{let r;var n;return fL(t,"ol")?r=ea("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?ea("check"):ea("bullet"),Lo(r,t),[r.splice(0,0,mL(xie(e.$importChildren(t)),t))]},match:Ln.tag("ol","ul"),name:"@lexical/list/list"};function kL(e,t){if(t.length!==1)return t;const r=t[0];return Gd(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function CL(e){const t=a=>uE(a)&&!lt(a);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const a of e)t(a)?(i(),r.push(K(a)?a.getChildren():[a])):n.push(a);i();const o=[];for(const a of r)o.length>0&&o.push(na()),o.push(...a);return o}const wie={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=Ba(r==="true"||r!=="false"&&void 0);return Ha(n,t),Lo(n,t),[n.splice(0,0,CL(kL(n,e.$importChildren(t))))]},match:Ln.tag("li"),name:"@lexical/list/li"};function jT(e,t,r){const n=fL(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=Ba(n.hasAttribute("checked"));return Ha(i,t),Lo(i,t),[i.splice(0,0,CL(kL(i,e.$importChildren(t))))]}Ln.tag("li").classAll("task-list-item"),Ln.tag("li").classAll("joplin-checkbox");const Eie=Ve("UPDATE_LIST_START_COMMAND"),RL=Ve("INSERT_UNORDERED_LIST_COMMAND"),AL=Ve("INSERT_ORDERED_LIST_COMMAND"),kie=Ve("REMOVE_LIST_COMMAND");function Cie(e,t){return Dl(e.registerCommand(AL,()=>(OT("number"),!0),Dc),e.registerCommand(Eie,r=>{const{listNodeKey:n,newStart:i}=r,o=gr(n);return!!lt(o)&&(o.getListType()==="number"&&(o.setStart(i),wL(o)),!0)},Dc),e.registerCommand(RL,()=>(OT("bullet"),!0),Dc),e.registerCommand(kie,()=>(gie(),!0),Dc),e.registerCommand(Mh,()=>bie(!1),Dc),e.registerCommand($w,r=>{if((function(){const a=ye();if(!le(a)||!a.isCollapsed()||a.anchor.offset!==0)return!1;const s=a.anchor.getNode(),l=lr(s,Pt);if(!Pt(l))return!1;const u=l.getFirstDescendant();if(u===null||!l.is(s)&&!u.is(s))return!1;const d=l.getParent();if(!lt(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!dt(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Wt().append(...l.getChildren());return d.insertBefore(h),l.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return r.preventDefault(),!0;const n=ye();if(!le(n)||!n.isCollapsed())return!1;const{anchor:i}=n;if(i.offset!==0)return!1;let o=i.getNode();for(;!Pt(o);){if(o.getPreviousSibling()!==null)return!1;const a=o.getParent();if(a===null)return!1;o=a}return!(!Pt(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},vre),e.registerNodeTransform(rc,r=>{const n=r.getFirstChild();if(n){if(ce(n)){const i=n.getStyle(),o=n.getFormat();r.getTextStyle()!==i&&r.setTextStyle(i),r.getTextFormat()!==o&&r.setTextFormat(o)}}else{const i=ye();le(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(Ps,r=>{const n=r.getParent();if(Pt(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function Rie(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,a=e._selection;if(i)return 1;if(!(le(o)&&le(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(b,_,S){const E=b._nodeMap,C=[];for(const A of _){const T=E.get(A);T!==void 0&&C.push(T)}for(const[A,T]of S){if(!T)continue;const R=E.get(A);R===void 0||jr(R)||C.push(R)}return C})(t,r,n);if(s.length===0)return 0;if(s.length>1){const b=t._nodeMap,_=b.get(o.anchor.key),S=b.get(a.anchor.key);return _&&S&&!e._nodeMap.has(_.__key)&&ce(_)&&_.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],u=e._nodeMap.get(l.__key);if(!ce(u)||!ce(l)||u.__mode!==l.__mode)return 0;const d=u.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const m=h.offset,g=p.offset,v=f.length-d.length;return v===1&&g===m-1?2:v===-1&&g===m+1?3:v===-1&&g===m?4:0}function Aie(e,t,r){let n=r(),i=0,o=n,a=0,s=null;return(l,u,d,f,h,p)=>{const m=r();if(p.has(H6)&&(o=n,a=i,s=l),p.has(d0))return i=0,n=m,2;p.has(jh)&&s&&(n=o,i=a,l=s);const g=p.has(V6)||p.has(G6)?0:Rie(l,u,f,h,e.isComposing()),v=(()=>{const b=d===null||d.editor===e,_=p.has(q6);if(!_&&b&&p.has(rh))return 0;if(g===1)return 2;if(l===null)return 1;const S=u._selection;return f.size>0||h.size>0?_===!1&&g!==0&&g===i&&m<n+t&&b||f.size===1&&(function(C,A,T){const R=A._nodeMap.get(C),N=T._nodeMap.get(C),I=A._selection,M=T._selection;return!(le(I)&&le(M)&&I.anchor.type==="element"&&I.focus.type==="element"&&M.anchor.type==="text"&&M.focus.type==="text"||!ce(R)||!ce(N)||R.__parent!==N.__parent)&&JSON.stringify(A.read(()=>R.exportJSON()))===JSON.stringify(T.read(()=>N.exportJSON()))})(Array.from(f)[0],l,u)?0:1:S!==null?0:2})();return n=m,i=g,v}}function qT(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function Tie(e,t,r,n=Date.now,i,o=null){const a=Aie(e,r,n);return Dl(e.registerCommand(Dv,()=>((function(s,l,u){const d=l.redoStack,f=l.undoStack;if(f.length!==0){const h=l.current,p=f.pop();h!==null&&(d.push(h),s.dispatchCommand(_m,!0)),f.length===0&&s.dispatchCommand(ym,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:d0})}})(e,t),!0),ut),e.registerCommand(Fv,()=>((function(s,l,u){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),s.dispatchCommand(ym,!0));const p=d.pop();d.length===0&&s.dispatchCommand(_m,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:d0})}})(e,t),!0),ut),e.registerCommand(Fte,()=>(qT(t),!1),ut),e.registerCommand(Ite,()=>(qT(t),e.dispatchCommand(_m,!1),e.dispatchCommand(ym,!1),!0),ut),e.registerUpdateListener(({editorState:s,prevEditorState:l,dirtyLeaves:u,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,m=t.undoStack,g=h===null?null:h.editorState;if(h!==null&&s===g)return;const v=a(l,s,h,u,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(_m,!1)),h!==null){m.push({...h});const b=typeof o=="number"||o===null?o:o.peek();b!==null&&m.length>b&&m.splice(0,m.length-b),e.dispatchCommand(ym,!0)}}else if(v===2)return;t.current={editor:e,editorState:s}}))}function $ie(){return{current:null,redoStack:[],undoStack:[]}}function Nie(e,t){let r=e;for(let n=Bt(e,t);n&&(NL(n.origin)||Fu(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function Die(e){return Nie(e,"previous")}function TL(e,t){for(const r of e.childNodes)if(rt(r)&&r.tagName===t||TL(r,t))return!0;return!1}const qf="data-language",Ef="data-highlight-language",Am="data-theme";class Jd extends Mi{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new Jd(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=br().createElement("code");Ua(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(qf,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Ef,n));const i=this.getTheme();i&&r.setAttribute(Am,i);const o=this.getStyle();return o&&td(r.style,o),r}updateDOM(t,r,n){const i=this.__language,o=t.__language;i?i!==o&&r.setAttribute(qf,i):o&&r.removeAttribute(qf);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&r.setAttribute(Ef,i):r.removeAttribute(Ef):a&&i&&r.setAttribute(Ef,i);const s=this.__theme,l=t.__theme;s?s!==l&&r.setAttribute(Am,s):l&&r.removeAttribute(Am);const u=this.__style,d=t.__style;return u!==d&&td(r.style,u,d),!1}exportDOM(t){const r=br().createElement("pre");Ua(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(qf,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Ef,n));const i=this.getTheme();i&&r.setAttribute(Am,i);const o=this.getStyle();return o&&td(r.style,o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||TL(t,"BR"))?{conversion:VT,priority:1}:null,div:()=>({conversion:Fie,priority:1}),pre:()=>({conversion:VT,priority:0}),table:t=>z_(t)?{conversion:Iie,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&z_(n)?{conversion:GT,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&z_(r)?{conversion:GT,priority:3}:null}}}static importJSON(t){return pi().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(!Dp(Or(),"@lexical/code")){const a=Pie(t);if(a)return a}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(ce(o)){let a=Die(o);const s=[];for(;;)if(Fu(a))s.push(Ud()),a=a.getNextSibling();else{if(!NL(a))break;{let m=0;const g=a.getTextContent(),v=a.getTextContentSize();for(;m<v&&g[m]===" ";)m++;if(m!==0&&s.push($L(" ".repeat(m))),m!==v)break;a=a.getNextSibling()}}const l=o.splitText(n.offset)[0],u=n.offset===0?0:1,d=l.getIndexWithinParent()+u,f=o.getParentOrThrow(),h=[na(),...s];f.splice(d,0,h);const p=s[s.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(Jh(o)){const{offset:a}=t.anchor;o.splice(a,0,[na()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Wt();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 pi(e,t){return P4(Jd).setLanguage(e).setTheme(t)}function Jh(e){return e instanceof Jd}function VT(e){return{node:pi(e.getAttribute(qf))}}function Fie(e){const t=e,r=KT(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(KT(i))return!0;i=i.parentElement}return!1})(t)?{node:r?pi():null}:{node:null}}function Iie(){return{node:pi()}}function GT(){return{node:null}}function KT(e){return e.style.fontFamily.match("monospace")!==null}function z_(e){return e.classList.contains("js-file-line-container")}function Pie(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const r=t.getNode();if(Jh(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(_i(i)&&_i(i.getPreviousSibling())){const o=Wt();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class Kv extends Ps{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new Kv(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=U_(t.theme,this.__highlightType);return Ua(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=U_(n.theme,t.__highlightType),a=U_(n.theme,this.__highlightType);return o!==a&&(o&&nE(r,o),a&&Ua(r,a)),i}static importJSON(t){return $L().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 pi()}}function U_(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function $L(e="",t){return fa(new Kv(e,t))}function NL(e){return e instanceof Kv}const DL="data-language";function FL(e){return e.style.fontFamily.match("monospace")!==null}function Sx(e){let t=e.parentElement;for(;t!==null;){if(FL(t))return!0;t=t.parentElement}return!1}const Oie=vL([{$import:(e,t)=>e.$importChildren(t),match:Ln.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),Mie={$import:(e,t)=>[pi(t.getAttribute(DL)).splice(0,0,e.$importChildren(t))],match:Ln.tag("pre"),name:"@lexical/code/pre"},Lie={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[pi(t.getAttribute(DL)).splice(0,0,e.$importChildren(t))]:r()},match:Ln.tag("code"),name:"@lexical/code/code-multiline"};function Tm(e){if(!rt(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 zie(e){let t=!1;const r=[];let n="",i=!1;const o=()=>{i&&(r.push(n),n="",i=!1)};for(const a of Array.from(e.childNodes))if(rt(a))a.tagName==="DIV"?(o(),r.push(a.textContent||""),t=!0):a.tagName==="BR"?(o(),r.push(""),t=!0):(n+=a.textContent||"",i=!0);else if(zi(a)){const s=a.textContent||"";s.length>0&&(n+=s,i=!0)}return o(),t?r:null}Ln.tag("div"),Ln.tag("div","br");const Uie={$import:(e,t,r)=>FL(t)?[pi().splice(0,0,e.$importChildren(t))]:Sx(t)?e.$importChildren(t):r(),match:Ln.tag("div"),name:"@lexical/code/div"};Ln.tag("table").classAll("js-file-line-container"),Ln.tag("td").classAll("js-file-line");const HT=new Set(["http:","https:","mailto:","sms:","tel:"]);let Ip=class IL extends Mi{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new IL(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",r={},n){super(n);const{target:i=null,rel:o=null,title:a=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=a}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const r=br().createElement("a");return this.updateLinkDOM(null,r,t),Ua(r,t.theme.link),r}updateLinkDOM(t,r,n){if(D4(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];t&&t[o]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:Bie,priority:1})}}static importJSON(t){return wd().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=QT(t);try{const n=new URL(QT(t));if(!HT.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&&!HT.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=ii(this);return this.insertAfter(n,r),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,n){if(!le(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 Bie(e){let t=null;if(D4(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=wd(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function wd(e="",t){return fa(new Ip(e,t))}function Sa(e){return e instanceof Ip}let PL=class OL extends Ip{__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 OL(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?br().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return WT().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=WT(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function WT(e="",t){return fa(new PL(e,t))}function Ic(e){return e instanceof PL}function JT(e,t){if(e.type==="element"){const r=e.getNode();return K(r)||(function(n,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",n);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${n}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),r.getChildren()[e.offset+t]||null}return null}function jie(e,t={}){let r;if(e&&typeof e=="object"){const{url:d,...f}=e;r=d,t={...f,...t}}else r=e;const{target:n,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,a=ye();if(a===null||!le(a)&&!hr(a))return;if(hr(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=lr(f,p=>!Ic(p)&&Sa(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=lr(f,p=>!Ic(p)&&Sa(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=wd(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(a.isCollapsed()&&r===null)for(const d of a.getNodes()){const f=lr(d,h=>!Ic(h)&&Sa(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const s=a.extract();if(r===null){const d=new Set;return void s.forEach(f=>{const h=lr(f,p=>!Ic(p)&&Sa(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(m,g){const v=new Set(g.filter(R=>m.isParentOf(R)).map(R=>R.getKey())),b=m.getChildren(),_=R=>v.has(R.getKey())||K(R)&&g.some(N=>m.isParentOf(N)&&R.isParentOf(N)),S=b.filter(_);if(S.length===b.length)return b.forEach(R=>m.insertBefore(R)),void m.remove();const E=b.findIndex(_),C=b.findLastIndex(_),A=E===0,T=C===b.length-1;if(A)S.forEach(R=>m.insertBefore(R));else if(T)for(let R=S.length-1;R>=0;R--)m.insertAfter(S[R]);else{for(let N=S.length-1;N>=0;N--)m.insertAfter(S[N]);const R=b.slice(C+1);if(R.length>0){const N=ii(m);S[S.length-1].insertAfter(N),R.forEach(I=>N.append(I))}}})(h,s),d.add(p)}})}const l=new Set,u=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(r),n!==void 0&&d.setTarget(n),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=lr(d,Sa);if(f!==null)return u(f)}(function(d){const f=ye();if(!le(f))return d();const h=hl(f),p=h.isBackward(),m=JT(h.anchor,p?-1:0),g=JT(h.focus,p?0:-1);if(d(),m||g){const v=ye();if(le(v)){const b=v.clone();if(m){const _=m.getParent();_&&b.anchor.set(_.getKey(),m.getIndexWithinParent()+(p?1:0),"element")}if(g){const _=g.getParent();_&&b.focus.set(_.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}On(hl(b))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=lr(f,Sa);if(h){u(h);continue}if(K(f)){if(!f.isInline())continue;if(Sa(f)){if(!(Ic(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){u(f),d=f;continue}for(const m of f.getChildren())f.insertBefore(m);f.remove();continue}}const p=f.getPreviousSibling();Sa(p)&&p.is(d)?p.append(f):(d=wd(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const qie=/^\+?[0-9\s()-]{5,}$/;function QT(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:qie.test(e)?`tel:${e}`:`https://${e}`}Ln.tag("a");function R0(e,t,r=null){const n=$4(r),i=r?A4(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&(function(s,l){for(let u=s;u!==null;){if(u===l)return!0;u=Xu(u)}return!1})(a.offsetNode,r))return{node:a.offsetNode,offset:a.offset}}if(o){const a=r.getRootNode();if(Ts(a)){const s=a.elementFromPoint(e,t);if(s!==null&&r.contains(s)){const l=(function(u,d,f,h){const p=h.createRange(),m=T=>d<T.top?T.top-d:d>T.bottom?d-T.bottom:0,g=T=>u<T.left?T.left-u:u>T.right?u-T.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let b=null,_=1/0,S=1/0;for(let T=v.nextNode();T;T=v.nextNode()){p.selectNodeContents(T);for(const R of p.getClientRects()){const N=m(R),I=g(R);(N<_||N===_&&I<S)&&(_=N,S=I,b=T)}}if(b===null)return null;let E=0,C=1/0,A=1/0;for(let T=0;T<=b.length;T++){p.setStart(b,T),p.collapse(!0);const R=p.getBoundingClientRect(),N=m(R),I=Math.abs(u-R.left);(N<C||N===C&&I<A)&&(C=N,A=I,E=T)}return{node:b,offset:E}})(e,t,s,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const a=n.caretRangeFromPoint(e,t);return a===null?null:{node:a.startContainer,offset:a.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t);return a===null?null:{node:a.offsetNode,offset:a.offset}}return null}function Bc(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 wx={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function Vie(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const YT=(e,t)=>{if(!le(t))return t.insertRawText(e),!0;const r=n=>{const i=ye();le(i)&&n(i)};return s4(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([Ud()])),text:n=>r(i=>i.insertText(n))}),!0},Ex={"application/x-lexical-editor":[(e,t,r)=>{try{const n=Or(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return XT(n,Xie(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=Or(),i=new DOMParser().parseFromString(Vie(e),"text/html");return XT(n,die(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[YT],"text/uri-list":[YT]};function Gie(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 ML(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(a=>o.$importMimeType[a]!==void 0).sort((a,s)=>{const l=o.priority[a],u=o.priority[s];return l===void 0&&u===void 0?a<s?-1:a>s?1:0:l===void 0?1:u===void 0?-1:l-u})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==n)&&Gie(e.$importMimeType[i],o,r,t))return!0}return!1}const Kie={$importMimeType:Ex,$insertDataTransfer:(e,t)=>ML({$importMimeType:Ex,priority:wx},e,t),priority:wx},Hie={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>ML(t,r,n),priority:t.priority}),config:{$importMimeType:Ex,priority:wx},mergeConfig(e,t){const r=rE(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function LL(e,t=ye()){return t==null&&Bc(166),le(t)&&t.isCollapsed()||t.getNodes().length===0?"":hie(e,t)}function zL(e,t=ye()){return t==null&&Bc(166),le(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(Yie(e,t))}function kx(e,t,r){(function(){const n=Ene(Hie.name);return n?n.output:Kie})().$insertDataTransfer(e,t)}const UL="application/x-lexical-drag";function Wie(e,t){const r={editorKey:t.getKey()};e.setData(UL,JSON.stringify(r))}function Jie(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(u){const d=u.getData(UL);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=R0(u.clientX,u.clientY,d.getRootElement());if(f===null)return null;const h=Pu(f.node);if(h===null)return null;if(ce(h))return Nl(h,"next",f.offset);if(K(h))return vx(h,f.offset,"next");const p=h.getParent();return p===null?null:vx(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const a=q4(o);if(a===null)return!1;const s=i.editorKey===t.getKey(),l=ye();if(s){if(!le(l)||l.isCollapsed())return!1;if((function(u,d){const{anchor:f,focus:h}=tE(gx(d),"next");return Kh(f,u)<0&&Kh(u,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!a.origin.isAttached())return e.preventDefault(),!0;if(r(n,Hh(qv(a)),t),!s){const u=t.getRootElement(),d=u?u.ownerDocument:null,f=d?(function(h,p){for(const m of T4(p)){const g=Np(m);if(Mv(g)&&g.getKey()===h&&rt(m))return m}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function Qie(e,t){return Jie(e,t,kx)}function XT(e,t,r){e.dispatchCommand(Rte,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(le(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const a=Di(i,"previous");if(a)if(Ao(a))o=a.origin;else{const s=Zo(a,Oo(dn(),"next").getFlipped());for(const l of s){if(ce(l.origin)){o=l.origin;break}if(K(l.origin)&&!l.origin.isInline())break}}if(o&&ce(o)){const s=o.getFormat(),l=o.getStyle();n.format===s&&n.style===l||(n.format=s,n.style=l,n.dirty=!0)}}})(r))}function Cx(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=K(r)&&r.excludeFromCopy("html");let a=r;t!==null&&ce(a)&&(a=H4(t,a,"clone"));const s=K(a)?a.getChildren():[],l=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&Bc(58,h.name),K(d)){const p=f.children;Array.isArray(p)||Bc(59,h.name)}return f})(a);ce(a)&&a.getTextContentSize()===0&&(i=!1);const u=i&&hr(t)&&K(r)?null:t;for(let d=0;d<s.length;d++){const f=s[d],h=Cx(e,u,f,l.children);!i&&K(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=Ro(a);if(d.length>0){const f={};for(const h of d){const p=Lu(a,h);p===null&&Bc(366,a.constructor.name,h);const m=[];Cx(e,null,p,m),m.length===1&&m[0].type===p.getType()||Bc(385,h,a.constructor.name,String(m.length),String(m.length>0?m[0].type:"none")),f[h]=m[0]}l.$slots=f}}if(i&&!o)n.push(l);else if(Array.isArray(l.children))for(let d=0;d<l.children.length;d++){const f=l.children[d];n.push(f)}return i}function Yie(e,t){const r=[],n=dn(),i=le(t)?t.anchor.getNode():hr(t)?t.getNodes()[0]??null:null,o=i!==null?Uv(i):null,a=(K(o)?o:n).getChildren();for(let s=0;s<a.length;s++)Cx(e,t,a[s],r);return{namespace:e._config.namespace,nodes:r}}function Xie(e){const t=[];for(const r of e)t.push(cre(r));return t}let Sc=null;async function ZT(e,t,r){if(Sc!==null)return!1;if(t!==null)return new Promise((u,d)=>{e.update(()=>{u(e$(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,a=xi(i);if(n===null||a===null)return!1;const s=o.createElement("span");s.style.position="fixed",s.style.top="-1000px",s.append(o.createTextNode("#")),n.append(s);const l=o.createRange();return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((u,d)=>{const f=e.registerCommand(Iv,h=>(ml(h,ClipboardEvent)&&(f(),Sc!==null&&(i.clearTimeout(Sc),Sc=null),u(e$(e,h,r))),!0),gre);Sc=i.setTimeout(()=>{f(),Sc=null,u(!1)},50),o.execCommand("copy"),s.remove()})}function e$(e,t,r){if(r===void 0){const i=xi(e._window),o=ye();if(!o||o.isCollapsed()||!i)return!1;const a=Io(i,e.getRootElement()),s=a.anchorNode,l=a.focusNode;if(s!==null&&l!==null&&!$p(e,s,l))return!1;r=BL(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(jL(n,r),!0)}const Zie=[["text/html",LL],["application/x-lexical-editor",zL]];function BL(e=ye()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const a=toe(o,r);a!==null&&(n[i]=a)}return n})(eoe(),e)}function jL(e,t){for(const[r]of Zie)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function eoe(e=Or()){const t=Dp(e,roe.name);return t?t.output:qL}const qL={"application/x-lexical-editor":[(e,t)=>e?zL(Or(),e):t()],"text/html":[(e,t)=>e?LL(Or(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function toe(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const roe={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:qL},mergeConfig(e,t){const r=rE(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},noe={$import:(e,t)=>{const r=ys(t.nodeName.toLowerCase());return Zu(t,r),Ha(r,t),Lo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Ln.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},ioe={$import:(e,t)=>{const r=Yd();return Ha(r,t),Zu(t,r),Lo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:Ln.tag("blockquote"),name:"@lexical/rich-text/blockquote"};Ln.tag("blockquote");Ln.tag("p"),Ln.tag("span");const t$=Ve("DRAG_DROP_PASTE_FILE"),B_=Rp("shadowRoot",{parse:Boolean});class Qd extends Mi{static getType(){return"quote"}static clone(t){return new Qd(t.__key)}$config(){return this.config("quote",{extends:Mi,stateConfigs:[{flat:!0,stateConfig:B_}]})}isShadowRoot(){return Ap(this,B_)}setIsShadowRoot(t){return Yc(this,B_,t)}createDOM(t){const r=br().createElement("blockquote");return Ua(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:ooe,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(rt(r)){this.isEmpty()&&r.append(br().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 Yd().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=Wt(),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=Wt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Yd(e){const t=fa(new Qd);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function Rx(e){return e instanceof Qd}let Hv=class VL extends Mi{__tag;static getType(){return"heading"}static clone(t){return new VL(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=br().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];Ua(n,o)}return n}updateDOM(t,r,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:wc,priority:0}),h2:t=>({conversion:wc,priority:0}),h3:t=>({conversion:wc,priority:0}),h4:t=>({conversion:wc,priority:0}),h5:t=>({conversion:wc,priority:0}),h6:t=>({conversion:wc,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&r$(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>r$(t)?{conversion:r=>({node:ys("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(rt(r)){this.isEmpty()&&r.append(br().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 ys(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?Wt():ys(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const s=Wt();s.select(),this.replace(s,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Wt();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function r$(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function wc(e){const t=e.nodeName.toLowerCase();let r=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(r=ys(t),Zu(e,r),Ha(r,e),Lo(r,e)),{node:r}}function ooe(e){const t=Yd();return Ha(t,e),Zu(e,t),Lo(t,e),{node:t}}function ys(e="h1"){return fa(new Hv(e))}function aoe(e){return e instanceof Hv}function n$(e){const t=Pu(e);return dt(t)}function Ec(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const s=e.anchor.getNode();if(ce(s)){o=s;const l=e.anchor.offset,u=l===s.getTextContentSize()&&s.getNextSibling()===null,d=l===0&&s.getPreviousSibling()===null;i=r==="end"&&u||r==="start"&&d||r==="both"&&(u||d)}}let a=!1;for(const[s,l]of Object.entries(n)){if(l==null||!l[t])continue;const u=s;if(l.onlyAtBoundary){if(!(i&&o&&ce(o)&&o.hasFormat(u)))continue;a=!0}e.hasFormat(u)&&e.toggleFormat(u)}a&&e.setStyle("")}const soe={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function $m(e,t){return(function(r,n){if(!r.isCollapsed())return!1;const i=Di(r.focus,n),o=lr(i.origin,id);if(!o)return!1;const a=r.focus.getNode();if(!o.is(a)&&!xd(a,o))return!1;const s=Zo(i,Bt(o,n));if(s.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=Zo(s.anchor.getSiblingCaret(),s.focus);let u=l.anchor.origin;for(const f of l){if(!$l(f)||!f.origin.is(u.getParent()))return!1;u=f.origin}let d=o;for(const f of jv(Bt(o,n))){if(!f.origin.is(d.getParent())){if(Ng(f.origin)){const h=Bt(d,n);return Hh(Zo(h,h)),!0}break}if(!id(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=Di(r.anchor,n).getNodeAtCaret();return!(!id(i)||i.isInline()||(Hh(qv(Ji(Oo(i,n)))),0))})(e,t)}function i$(e){return dt(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function Nm(e){const t=h0();t.add(e),On(t)}function o$(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=Di(r,i);if(r.type==="element"&&K(n)&&(jr(n)||id(n))){const b=o.getNodeAtCaret();return!(b===null||!i$(b))&&(Nm(b.__key),!0)}const a=lr(K(n)?n:n.getParentOrThrow(),b=>K(b)&&!b.isInline()&&yr(b.getParent()));if(a===null)return!1;const s=Bt(a,i).getNodeAtCaret();if(s===null||!i$(s))return!1;if(a.getTextContentSize()===0)return Nm(s.__key),!0;const l=Or().getRootElement();if(l===null)return!1;const u=xi(l.ownerDocument.defaultView);if(u===null||u.rangeCount===0)return!1;const d=u.anchorNode,f=u.anchorOffset,h=u.focusNode,p=u.focusOffset;u.modify("move",t?"backward":"forward","line");const m=u.anchorNode,g=u.anchorOffset;if(m===null)return a$(u,d,f,h,p),!1;const v=Pu(m);return a$(u,d,f,h,p),v===null?!1:(m===d&&g===f||!v.is(a)&&!xd(v,a))&&(Nm(s.__key),!0)}function a$(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function s$(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=lr(K(r)?r:r.getParentOrThrow(),v=>K(v)&&!v.isInline());if(n===null)return!1;const i=Or(),o=i.getRootElement();if(o===null)return!1;const a=o.ownerDocument.defaultView;if(a===null)return!1;let s=!1;for(const v of n.getChildren())if(K(v)&&v.isInline()){const b=i.getElementByKey(v.getKey());if(b!==null){const _=a.getComputedStyle(b).display;if(_==="inline-grid"||_==="inline-flex"){s=!0;break}}}if(!s)return!1;const l=Bt(n,t?"previous":"next").getNodeAtCaret();if(l===null||!K(l)){if(t){const v=n.getFirstDescendant();ce(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(ce(v)){const b=v.getTextContentSize();v.select(b,b)}else{const b=n.getChildrenSize();n.select(b,b)}}return!0}const u=i.getElementByKey(l.getKey());if(u===null)return!1;const d=xi(a);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=u.getBoundingClientRect(),m=p.top+p.height/2;if(h.height>0){const v=R0(h.left,m,o);if(v!==null&&u.contains(v.node)){const b=o.ownerDocument.createRange();return b.setStart(v.node,v.offset),b.collapse(!0),e.applyDOMRange(b),e.dirty=!0,!0}}const g=t?l.getLastDescendant():l.getFirstDescendant();if(ce(g)){const v=t?g.getTextContentSize():0;g.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function Dm(e,t){const r=Bt(e,t),n=r.getAdjacentCaret();n!==null&&K(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?Hh(qv(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function l$(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>Bt(l,"next")).sort(Kh),o=(t?i[0]:i[i.length-1]).origin,a=lr(o,l=>l!==o&&K(l)&&!l.isInline())??dn(),s=t?0:a.getChildrenSize();return a.select(s,s),!0}function loe(e,t=fne(soe)){return Dl(e.registerCommand(g6,()=>{const r=ye();return hr(r)?(r.clear(),!0):(le(r)&&Ec(r,"click","both",t.peek()),!1)},ut),e.registerCommand(vu,r=>{const n=ye();return le(n)?(n.deleteCharacter(r),!0):!!hr(n)&&(n.deleteNodes(),!0)},ut),e.registerCommand(Lh,r=>{const n=ye();return!!le(n)&&(n.deleteWord(r),!0)},ut),e.registerCommand(zh,r=>{const n=ye();return!!le(n)&&(n.deleteLine(r),!0)},ut),e.registerCommand(Zc,r=>{const n=ye();if(typeof r=="string")n!==null&&n.insertText(r);else{if(n===null)return!1;const i=r.dataTransfer;if(i!=null)kx(i,n);else if(le(n)){const o=r.data;return o&&n.insertText(o),!0}}return!0},ut),e.registerCommand(Cg,()=>{const r=ye();return!!le(r)&&(r.removeText(),!0)},ut),e.registerCommand(Jo,r=>{const n=ye();return!(!le(n)&&!hr(n))&&(X6(n,r),!0)},ut),e.registerCommand(Ate,r=>{const n=ye();return!(!le(n)&&!hr(n))&&(nre(n,r),!0)},ut),e.registerCommand(Nte,r=>{const n=ye();if(!le(n)&&!hr(n))return!1;const i=n.getNodes();for(const o of i){const a=lr(o,s=>K(s)&&!s.isInline());a!==null&&a.setFormat(r)}return!0},ut),e.registerCommand(Xc,r=>{const n=ye();return!!le(n)&&(n.insertLineBreak(r),!0)},ut),e.registerCommand(Mh,()=>{const r=ye();return!!le(r)&&(r.insertParagraph(),!0)},ut),e.registerCommand(Tte,()=>{const r=Ud(),n=ye();return le(n)&&(r.setFormat(n.format),r.setStyle(n.style)),are([r]),!0},ut),e.registerCommand($te,()=>kT(r=>{const n=r.getIndent();r.setIndent(n+1)}),ut),e.registerCommand(IA,()=>kT(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),ut),e.registerCommand(C6,r=>{const n=ye();if(hr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Dm(i[0],"previous"),!0}else if(le(n)&&(!r.shiftKey&&$m(n,"previous")||!r.shiftKey&&o$(n,!0)||!r.shiftKey&&s$(n,!0)))return r.preventDefault(),!0;return!1},ut),e.registerCommand(R6,r=>{const n=ye();if(hr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Dm(i[0],"next"),!0}else if(le(n)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===dn().getChildrenSize()})(n)||!r.shiftKey&&$m(n,"next")||!r.shiftKey&&o$(n,!1)||!r.shiftKey&&s$(n,!1)))return r.preventDefault(),!0;return!1},ut),e.registerCommand(E6,r=>{const n=ye();if(hr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Dm(i[0],Em(i[0])?"next":"previous"),!0}if(!le(n))return!1;if(!r.shiftKey&&$m(n,Em(n.anchor.getNode())?"next":"previous"))return r.preventDefault(),!0;if(r.shiftKey||Ec(n,"arrow","start",t.peek()),wT(n,!0)){const i=r.shiftKey;return r.preventDefault(),ET(n,i,!0),!0}return!1},ut),e.registerCommand(S6,r=>{const n=ye();if(hr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Dm(i[0],Em(i[0])?"previous":"next"),!0}if(!le(n))return!1;if(!r.shiftKey&&$m(n,Em(n.anchor.getNode())?"previous":"next"))return r.preventDefault(),!0;if(r.shiftKey||Ec(n,"arrow","end",t.peek()),wT(n,!1)){const i=r.shiftKey;return r.preventDefault(),ET(n,i,!1),!0}return!1},ut),e.registerCommand($w,r=>{const n=ye();if(!hr(n)&&n$(r.target))return!1;if(le(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const a=o.getNode();if(jr(a))return!1;const s=cne(a);return s.getIndent()>0&&(s.is(a)||a.is(s.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(IA,void 0);if(Tl&&gd)return!1}else if(!hr(n))return!1;return r.preventDefault(),e.dispatchCommand(vu,!0)},ut),e.registerCommand($6,r=>{const n=ye();return!(!hr(n)&&n$(r.target))&&!(!le(n)&&!hr(n))&&(r.preventDefault(),e.dispatchCommand(vu,!1))},ut),e.registerCommand(Uh,r=>{let n=ye();if(hr(n)){const i=n.getNodes();i.length===1&&dt(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!le(n))return!1;if(Ec(n,"enter","both",t.peek()),r!==null){if((Tl||kp||Cp)&&gd)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(Xc,!1)}return e.dispatchCommand(Mh,void 0)},ut),e.registerCommand(T6,()=>{const r=ye();return!!le(r)&&(e.blur(),!0)},ut),e.registerCommand(D6,r=>{const[,n]=km(r);if(n.length>0){const i=r.clientX,o=r.clientY,a=R0(i,o,e.getRootElement());if(a!==null){const{offset:s,node:l}=a,u=Pu(l);if(u!==null){const d=Fw();if(ce(u))d.anchor.set(u.getKey(),s,"text"),d.focus.set(u.getKey(),s,"text");else{const h=u.getParentOrThrow().getKey(),p=u.getIndexWithinParent()+1;d.anchor.set(h,p,"element"),d.focus.set(h,p,"element")}const f=hl(d);On(f)}e.dispatchCommand(t$,n)}return r.preventDefault(),!0}return Qie(r,e)},ut),e.registerCommand(F6,r=>{const[n]=km(r),i=ye();return!(n&&!le(i))&&(le(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(jL(r.dataTransfer,BL(i)),Wie(r.dataTransfer,e)),!0)},ut),e.registerCommand(I6,r=>{const[n]=km(r),i=ye();if(n&&!le(i))return!1;const o=r.clientX,a=r.clientY,s=R0(o,a,e.getRootElement());if(s!==null){const l=Pu(s.node);dt(l)&&r.preventDefault()}return!0},ut),e.registerCommand(P6,()=>{const r=ye();return Ere(le(r)&&Uv(r.anchor.getNode())!==null?r:null),!0},ut),e.registerCommand(Iv,r=>(ZT(e,ml(r,ClipboardEvent)?r:null),!0),ut),e.registerCommand(Nw,r=>((async function(n,i){await ZT(i,ml(n,ClipboardEvent)?n:null),i.update(()=>{const o=ye();le(o)?o.removeText():hr(o)&&o.getNodes().forEach(a=>a.remove())},{tag:G6})})(r,e),!0),ut),e.registerCommand(Tw,r=>{const[,n,i]=km(r);return n.length>0&&!i?(e.dispatchCommand(t$,n),!0):Hd(r.target)&&Bw(r.target)?!1:ye()!==null&&((function(o,a){o.preventDefault(),a.update(()=>{const s=ye(),l=ml(o,InputEvent)||ml(o,KeyboardEvent)?null:o.clipboardData;l!=null&&s!==null&&kx(l,s)},{tag:V6})})(r,e),!0)},ut),e.registerCommand(A6,()=>{const r=ye();return le(r)&&Ec(r,"space","both",t.peek()),!1},ut),e.registerCommand(N6,()=>{const r=ye();return le(r)&&Ec(r,"tab","both",t.peek()),!1},ut),e.registerCommand(w6,r=>{const n=ye();if(hr(n))return l$(n,!1,r);if(!le(n))return!1;const{anchor:i}=n;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!K(o))return!1;const a=o.getFirstChild();if(!dt(a)||!a.isInline())return!1;const s=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(s,0,"element"),r.preventDefault(),r.stopPropagation(),!0},ut),e.registerCommand(k6,r=>{const n=ye();if(hr(n))return l$(n,!0,r);if(!le(n))return!1;const{anchor:i,focus:o}=n,a=lr(o.getNode(),u=>K(u)&&!u.isInline());if(a===null)return!1;const s=a.getFirstChild();if(!dt(s)||!s.isInline()||lr(i.getNode(),u=>K(u)&&!u.isInline())!==a)return!1;const l=a.getKey();return(o.type!=="element"||o.key!==l||o.offset!==0)&&(n.focus.set(l,0,"element"),r.shiftKey||n.anchor.set(l,0,"element"),r.preventDefault(),r.stopPropagation(),!0)},ut))}function Ax(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 fE(e){const t=Ax(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const u$=/[!-/:-@[-`{-~\s]/,c$=/\s/,Tx=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,uoe=/^\s{0,3}$/;function $x(e){if(!Gd(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&ce(t)&&uoe.test(t.getTextContent())}function Nx(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const GL=/^(\s*)(\d{1,})\.\s/,KL=/^(\s*)[-*+]\s/,coe=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,Dx=/^(#{1,6})\s/,HL=/^>\s/,WL=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,Fx=/^[ \t]*`{3,}$/,doe=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,foe=/^(?:\|)(.+)(?:\|)\s?$/;function hoe(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 d$=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,f$=/^<\/[a-z_][\w-]*\s*>/i,h$=e=>new RegExp(`(?:${e.source})$`,e.flags),Vf=Rp("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),p$=Rp("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),JL=Rp("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function Ix(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function poe(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!ce(n))return null;const i=n.getTextContent(),o=Ix(i);if(o!==null){const[a,s]=o;return n.setTextContent(a),s}return/^ {2,}$/.test(i)&&(function(a,s){for(let l=s-1;l>=0;l--){if(_i(a[l]))return!1;if(/\S/.test(a[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function QL(e){const t=na(),r=poe(e);return r!==null&&Yc(t,JL,r),t}const YL=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},XL=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),a=t.getNextSibling(),s=Ba(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],u=e!=="bullet"&&e!=="check"||l!==Vf.parse(l)?void 0:l;if(lt(a)&&a.getListType()===e){u&&Yc(a,Vf,u);const f=a.getFirstChild();f!==null?f.insertBefore(s):a.append(s),e==="number"&&a.setStart(Number(n[2])),t.remove()}else if(lt(o)&&o.getListType()===e)u&&Yc(o,Vf,u),o.append(s),t.remove();else{const f=ea(e,e==="number"?Number(n[2]):void 0);u&&Yc(f,Vf,u),f.append(s),t.replace(f)}s.append(...r),i||s.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let m=0;return h&&(m+=h.length),p&&(m+=Math.floor(p.length/4)),m})(n[1]);d&&s.setIndent(d)},hE=(e,t,r,n)=>{const i=[],o=e.getChildren();let a=0;for(const s of o)if(Pt(s)){if(s.getChildrenSize()===1){const p=s.getFirstChild();if(lt(p)){const m=hE(p,t,r+1,n);m&&i.push(m);continue}}if(n&&!s.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),u=e.getListType(),d=Ap(e,Vf),f=u==="number"?`${e.getStart()+a}. `:u==="check"?`${d} [${s.getChecked()?"x":" "}] `:d+" ";let h=t(s);u!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),a++}return i.join(`
|
|
29
|
+
`)},moe={dependencies:[Hv],export:(e,t)=>{if(!aoe(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:Dx,replace:YL(e=>{const t="h"+e[1].length;return ys(t)}),triggerOnEnter:!0,type:"element"},goe={dependencies:[Qd],export:(e,t)=>{if(!Rx(e))return null;const r=t(e).split(`
|
|
30
|
+
`),n=[];for(const i of r)n.push("> "+i);return n.join(`
|
|
31
|
+
`)},regExp:HL,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(Rx(o))return o.splice(o.getChildrenSize(),0,[QL(o),...t]),void e.remove()}const i=Yd();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},Ig={dependencies:[Jd],export:e=>{if(!Jh(e))return null;const t=e.getTextContent();let r=Ap(e,p$);if(t.indexOf(r)>-1){const n=t.match(/`{3,}/g);if(n){const i=Math.max(...n.map(o=>o.length));r="`".repeat(i+1)}}return r+(e.getLanguage()||"")+(t?`
|
|
32
|
+
`+t:"")+`
|
|
33
|
+
`+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:r,startMatch:n})=>{const i=n[1],o=i.trim().length,a=e[r],s=n.index+i.length,l=a.slice(s),u=new RegExp(`\`{${o},}$`);if(u.test(l)){const p=l.match(u),m=l.slice(0,l.lastIndexOf(p[0])),g=[...n];return g[2]="",Ig.replace(t,null,g,p,[m],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const m=e[p];if(d.test(m)){const g=m.match(d),v=e.slice(r+1,p),b=a.slice(n[0].length);return b.length>0&&v.unshift(b),Ig.replace(t,null,n,g,v,!0),[!0,p]}}const f=e.slice(r+1),h=a.slice(n[0].length);return h.length>0&&f.unshift(h),Ig.replace(t,null,n,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:Fx},regExpStart:WL,replace:(e,t,r,n,i,o)=>{let a,s;const l=r[1]?r[1].trim():"```",u=r[2]||void 0;if(!t&&i){if(i.length===1)n?(a=pi(u),s=i[0]):(a=pi(u),s=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(a=pi(u),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
|
|
34
|
+
`)}Yc(a,p$,l);const d=Ur(s);a.append(d),e.append(a)}else t&&YL(d=>pi(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},voe={dependencies:[Fp,rc],export:(e,t,r)=>lt(e)?hE(e,t,0,r):null,regExp:KL,replace:XL("bullet"),triggerOnEnter:!0,type:"element"},boe={dependencies:[Fp,rc],export:(e,t,r)=>lt(e)?hE(e,t,0,r):null,regExp:GL,replace:XL("number"),triggerOnEnter:!0,type:"element"},_oe={format:["code"],tag:"`",type:"text-format"},yoe={format:["highlight"],tag:"==",type:"text-format"},xoe={format:["bold","italic"],tag:"***",type:"text-format"},Soe={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},woe={format:["bold"],tag:"**",type:"text-format"},Eoe={format:["bold"],intraword:!1,tag:"__",type:"text-format"},koe={format:["strikethrough"],tag:"~~",type:"text-format"},Coe={format:["italic"],tag:"*",type:"text-format"},Roe={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Aoe={dependencies:[Ip],export:(e,t,r)=>{if(!Sa(e)||Ic(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(lr(e,Sa))return;const[,r,n,i]=t,o=n!=null?Nx(n):void 0,a=i!=null?Nx(i):void 0,s=wd(o,{title:a}),l=r.split("[").length-1,u=r.split("]").length-1;let d=r,f="";if(l<u)return;if(l>u){const p=r.split("[");f="["+p[0],d=p.slice(1).join("[")}const h=Ur(d);return h.setFormat(e.getFormat()),s.append(h),e.replace(s),f&&s.insertBefore(Ur(f)),h},trigger:")",type:"text-match"},Toe=[moe,goe,voe,boe],$oe=[Ig],Noe=[_oe,xoe,Soe,woe,Eoe,yoe,Coe,Roe,koe],Doe=[Aoe],El=[...Toe,...$oe,...Noe,...Doe];function Foe(e,t=!1){const r=e.split(`
|
|
35
|
+
`);let n=0;const i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a.trimEnd(),l=i[i.length-1],u=o<r.length-1?Ix(a):null,d=l!==void 0&&Ix(l)!==null;if(doe.test(s))i.push(s);else if(n===0){{const f=s.match(WL);if(f){n=f[1].trim().length,i.push(s);continue}}s===""||l===""||!l||Dx.test(l)||Dx.test(s)||HL.test(s)||GL.test(s)||KL.test(s)||coe.test(s)||foe.test(s)||hoe(s)||d||!t||d$.test(s)||f$.test(s)||h$(f$).test(l)||h$(d$).test(l)||Fx.test(l)?i.push(!t&&s!==""||u!==null?a:s):i[i.length-1]=l+" "+(u===null?s:a).trimStart()}else{if(Fx.test(s)&&s.trim().length>=n){n=0,i.push(s);continue}i.push(a)}}return i.join(`
|
|
36
|
+
`)}function Ioe(e,t,r,n,i){for(const o of t){if(!o.export)continue;const a=o.export(e,s=>A0(s,r,n,void 0,void 0,i));if(a!=null)return a}return K(e)?A0(e,r,n,void 0,void 0,i):dt(e)?e.getTextContent():null}function A0(e,t,r,n,i,o=!1){const a=[],s=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of s){for(const u of r){if(!u.export)continue;const d=u.export(l,f=>A0(f,t,r,n,[...i,...n],o),(f,h)=>m$(f,h,t,n,i,o));if(d!=null){a.push(d);continue e}}_i(l)?a.push(Poe(l)):ce(l)?a.push(m$(l,l.getTextContent(),t,n,i,o)):K(l)?a.push(A0(l,t,r,n,i,o)):dt(l)&&a.push(l.getTextContent())}return a.join("")}function Poe(e){return Ap(e,JL)+`
|
|
37
|
+
`}function m$(e,t,r,n,i,o=!1){const a=e.hasFormat("code");let s,l,u,d,f=t;if(a||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),a){const{fence:_,padded:S}=(function(E){const C=E.match(/`+/g),A=C?Math.max(...C.map(T=>T.length)):0;return{fence:"`".repeat(A+1),padded:E.length===0||E.includes("`")||/^\s/.test(E)&&/\s$/.test(E)?` ${E} `:E}})(t);s="",u="",l=_+S+_,d=!1}else{const _=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];s=_[1],l=_[2],u=_[3],d=l===""}let h="",p="",m="";const g=g$(e,!0),v=g$(e,!1),b=new Set;for(const _ of r){const S=_.format[0],E=_.tag;S!=="code"&&v$(e,S)&&!b.has(S)&&(b.add(S),v$(g,S)&&n.find(C=>C.tag===E)||(n.push({format:S,tag:E}),h+=E))}for(let _=0;_<n.length;_++){const S=Px(e,n[_].format),E=Px(v,n[_].format);if(S&&E)continue;const C=[...n];for(;C.length>_;){const A=C.pop();i&&A&&i.find(T=>T.tag===A.tag)||(A&&typeof A.tag=="string"&&(S?E||(m+=A.tag):p+=A.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+s+h+l+m+u}function g$(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return ce(r)?r:null}function Px(e,t){return ce(e)&&e.hasFormat(t)}function v$(e,t){return!!Px(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function Ooe(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=_=>{let S=0;for(let E=_-1;E>=0&&h[E]==="\\";E--)S++;return S%2==1},m=[];let g=0;for(;g<h.length;)if(h[g]==="`"){let _=1;for(;g+_<h.length&&h[g+_]==="`";)_++;m.push({index:g,length:_}),g+=_}else g++;const v=[];let b=0;for(;b<m.length;){const _=m[b];if(p(_.index)){b++;continue}let S=-1;for(let A=b+1;A<m.length;A++)if(m[A].length===_.length){S=A;break}if(S===-1){b++;continue}const E=m[S];let C=h.slice(_.index+_.length,E.index);C.length>=2&&C.startsWith(" ")&&C.endsWith(" ")&&/[^ ]/.test(C)&&(C=C.slice(1,-1)),v.push({content:C,endIndex:E.index+E.length,startIndex:_.index}),b=S+1}return v})(r);for(const h of f)o||(o={content:h.content,endIndex:h.endIndex,startIndex:h.startIndex,tag:"`"}),i.push({end:h.endIndex,start:h.startIndex})}const a=(function(f,h,p=[]){const m=[],g=new Set(Object.keys(h.transformersByTag).filter(S=>S[0]!=="`").map(S=>S[0])),v=S=>{let E=0;for(let C=S-1;C>=0&&f[C]==="\\";C--)E++;return E%2==1},b=S=>p.some(E=>S>=E.start&&S<E.end);let _=0;for(;_<f.length;){const S=f[_];if(!g.has(S)||v(_)||b(_)){_++;continue}let E=1;for(;_+E<f.length&&f[_+E]===S;)E++;const C=b$(S,f,_,E,!0),A=b$(S,f,_,E,!1);(C||A)&&m.push({active:!0,canClose:A,canOpen:C,char:S,index:_,length:E}),_+=E}return m})(r,t,i),s=a.length>0?(function(f,h,p){const m={};let g=0,v=null;for(;g<h.length;){const b=h[g];if(!b.active||!b.canClose||b.length===0){g++;continue}const _=`${b.char}${b.canOpen}${b.length%3}`,S=m[_]??-1;let E=!1;for(let C=g-1;C>S;C--){const A=h[C];if(!A.active||!A.canOpen||A.length===0||A.char!==b.char||(A.canClose||b.canOpen)&&(A.length+b.length)%3==0&&A.length%3!=0&&b.length%3!=0)continue;const T=Math.min(A.length,b.length),R=Object.keys(p.transformersByTag).filter(M=>M[0]===A.char&&M.length<=T).sort((M,P)=>P.length-M.length)[0];if(!R)continue;E=!0;const N=R.length,I={content:f.slice(A.index+A.length,b.index),endIndex:b.index+N,startIndex:A.index+(A.length-N),tag:R};(!v||I.startIndex<v.startIndex||I.startIndex===v.startIndex&&I.endIndex>v.endIndex)&&(v=I);for(let M=C+1;M<g;M++)h[M].active=!1;A.length-=N,b.length-=N,A.active=A.length>0,b.length>0?b.index+=N:(b.active=!1,g++);break}E||(m[_]=g-1,b.canOpen||(b.active=!1),g++)}return v})(r,a,t):null;let l=null,u=null;if(o&&s?s.startIndex<=o.startIndex&&s.endIndex>=o.endIndex?(l=s,u=t.transformersByTag[s.tag]):(l=o,u=n):o?(l=o,u=n):s&&(l=s,u=t.transformersByTag[s.tag]),!l||!u)return null;const d=[r.slice(l.startIndex,l.endIndex),l.tag,l.content];return d.index=l.startIndex,d.input=r,{endIndex:l.endIndex,isCodeSpan:u===n,match:d,startIndex:l.startIndex,transformer:u}}function b$(e,t,r,n,i){if(!_$(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!_$(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&Tx.test(o)}return!0}function _$(e,t,r,n){const i=e[t-1],o=e[t+r],[a,s]=n?[o,i]:[i,o];return a!==void 0&&!c$.test(a)&&(!Tx.test(a)||s===void 0||c$.test(s)||Tx.test(s))}function ol(e){return ce(e)&&!e.hasFormat("code")}function tu(e,t,r){let n=Ooe(e,t),i=(function(a,s){const l=a;let u,d,f,h;for(const p of s){if(!p.replace||!p.importRegExp)continue;const m=l.getTextContent().match(p.importRegExp);if(!m)continue;const g=m.index||0,v=p.getEndIndex?p.getEndIndex(l,m):g+m[0].length;v!==!1&&(u===void 0||d===void 0||g<u&&(v>d||v<=u))&&(u=g,d=v,f=p,h=m)}return u===void 0||d===void 0||f===void 0||h===void 0?null:{endIndex:d,match:h,startIndex:u,transformer:f}})(e,r);if(n&&i&&(n.isCodeSpan?i.startIndex<=n.startIndex&&i.endIndex>=n.endIndex?n=null:i=null:n.startIndex<=i.startIndex&&n.endIndex>=i.endIndex||i.startIndex>n.endIndex?i=null:n=null),n){const a=(function(s,l,u,d,f){const h=s.getTextContent();let p,m,g;if(f[0]===h?p=s:l===0?[p,m]=s.splitText(u):[g,p,m]=s.splitText(l,u),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:m,nodeBefore:g,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);ol(a.nodeAfter)&&tu(a.nodeAfter,t,r),ol(a.nodeBefore)&&tu(a.nodeBefore,t,r),ol(a.transformedNode)&&tu(a.transformedNode,t,r)}else if(i){const a=(function(s,l,u,d,f){let h,p,m;return l===0?[h,p]=s.splitText(u):[m,h,p]=s.splitText(l,u),d.replace?{nodeAfter:p,nodeBefore:m,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!a)return;ol(a.nodeAfter)&&tu(a.nodeAfter,t,r),ol(a.nodeBefore)&&tu(a.nodeBefore,t,r),ol(a.transformedNode)&&tu(a.transformedNode,t,r)}const o=Nx(e.getTextContent());e.setTextContent(o)}function Moe(e,t,r,n=!1){const i=fE(r),o=(function(u){const d={},f={},h=[];for(const p of u){const{tag:m}=p;d[m]=p;const g=m.replace(/(\*|\^|\+)/g,"\\$1");h.push(g),m.length===1?f[m]=m==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${g}])(${g})((\\\\${g})?.*?[^${g}\\s](\\\\${g})?)(${g})(?![\\\\${g}])`):f[m]=new RegExp(`(^|[^\\\\])(${g})((\\\\${g})?.*?[^\\s](\\\\${g})?)(${g})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),a=e.split(`
|
|
38
|
+
`),s=a.length;for(let u=0;u<s;u++){const d=a[u],[f,h]=Loe(a,u,i.multilineElement,t);f?u=h:zoe(d,t,i.element,o,i.textMatch,n)}const l=t.getChildren();for(const u of l)if(!n&&$x(u)&&t.getChildrenSize()>1)u.remove();else if(K(u))for(const d of u.getAllTextNodes())Uoe(d)}function Loe(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,u=e[t].match(s);if(!u)continue;if(o){const m=o({lines:e,rootNode:n,startLineIndex:t,startMatch:u,transformer:i});if(m===null)continue;if(m)return m}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=t;const p=e.length;for(;h<p;){const m=d?e[h].match(d):null;if(!m&&(!f||f&&h<p-1)){h++;continue}if(m&&t===h&&m.index===u.index){h++;continue}const g=[];if(m&&t===h)g.push(e[t].slice(u[0].length,-m[0].length));else for(let v=t;v<=h;v++)if(v===t){const b=e[v].slice(u[0].length);g.push(b)}else if(v===h&&m){const b=e[v].slice(0,-m[0].length);g.push(b)}else g.push(e[v]);if(l(n,null,u,m,g,!0)!==!1)return[!0,h];break}}return[!1,t]}function zoe(e,t,r,n,i,o){const a=Ur(e),s=Wt();s.append(a),t.append(s);for(const{regExp:l,replace:u}of r){const d=e.match(l);if(d&&(a.setTextContent(e.slice(d[0].length)),u(s,[a],d,!0)!==!1))break}if(tu(a,n,i),s.getParent()!==null&&e.length>0){const l=s.getPreviousSibling();if(!o&&(Gd(l)||Rx(l)||lt(l))){let u=l;if(lt(l)){const d=l.getLastDescendant();u=d==null?null:lr(d,Pt)}u!=null&&u.getTextContentSize()>0&&(u.splice(u.getChildrenSize(),0,[QL(u),...s.getChildren()]),s.remove())}}}function Uoe(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(Ud())})}function Boe(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 y$(e,t,r,n,i){const o=e.getParent();if(!yr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExp:s,replace:l}of n){const u=a.match(s),d=i||u&&u[0].endsWith(" ")?r:r-1;if(u&&u[0].length===d){const f=t.getNextSiblings(),[h,p]=t.splitText(r);if(l(e,p?[p,...f]:f,u,!1)!==!1)return h.remove(),!0}}return!1}function x$(e,t,r,n,i){const o=e.getParent();if(!yr(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExpStart:s,replace:l,regExpEnd:u}of n){if(u&&!("optional"in u)||u&&"optional"in u&&!u.optional)continue;const d=a.match(s);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,m]=t.splitText(r);if(l(e,m?[m,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function joe(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function S$(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(ZL(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function ZL(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function qoe(e,t=El){const r=fE(t),n=r.element.filter(l=>l.triggerOnEnter),i=Ax(r.textFormat,({tag:l})=>l[l.length-1]),o=Ax(r.textMatch,({trigger:l})=>l),a=new Set([" "]);for(const l of r.textFormat)a.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&a.add(l.trigger);for(const l of t){const u=l.type;if(u==="element"||u==="text-match"||u==="multiline-element"){const d=l.dependencies;for(const f of d)e.hasNode(f)||Boe(173,f.getType())}}const s=(l,u,d)=>!!y$(l,u,d,r.element)||!!x$(l,u,d,r.multilineElement)||!!(function(f,h,p){let m=f.getTextContent();const g=p[m[h-1]];if(g==null)return!1;h<m.length&&(m=m.slice(0,h));for(const v of g){if(!v.replace||!v.regExp)continue;const b=m.match(v.regExp);if(b===null)continue;const _=b.index||0,S=_+b[0].length;let E;return _===0?[E]=f.splitText(S):[,E]=f.splitText(_,S),E.selectNext(0,0),v.replace(E,b),!0}return!1})(u,d,o)||!!(function(f,h,p){const m=f.getTextContent(),g=h-1,v=m[g],b=p[v];if(!b)return!1;for(const _ of b){const{tag:S}=_,E=S.length,C=g-E+1;if(E>1&&!ZL(m,C,S,0,E)||m[C-1]===" ")continue;const A=m[g+1];if(_.intraword===!1&&A&&!u$.test(A))continue;const T=f;let R=T,N=S$(m,C,S),I=R;for(;N<0&&(I=I.getPreviousSibling())&&!_i(I);)if(ce(I)){if(I.hasFormat("code"))continue;const oe=I.getTextContent();R=I,N=S$(oe,oe.length,S)}if(N<0||R===T&&N+E===C)continue;const M=R.getTextContent();if(N>0&&M[N-1]===v)continue;const P=M[N-1];if(_.intraword===!1&&P&&!u$.test(P)||!_.format.includes("code")&&joe(R,N))continue;const U=T.getTextContent(),j=U.slice(0,C)+U.slice(g+1);T.setTextContent(j);const V=R===T?j:M;R.setTextContent(V.slice(0,N)+V.slice(N+E));const Y=ye(),J=Fw();On(J);const X=g-E*(R===T?2:1)+1;J.anchor.set(R.__key,N,"text"),J.focus.set(T.__key,X,"text");for(const oe of _.format)J.formatText(oe,As[oe]);J.anchor.set(J.focus.key,J.focus.offset,J.focus.type);for(const oe of _.format)J.hasFormat(oe)&&J.toggleFormat(oe);return le(Y)&&(J.format=Y.format),!0}return!1})(u,d,i);return Dl(e.registerUpdateListener(({tags:l,dirtyLeaves:u,editorState:d,prevEditorState:f})=>{if(l.has(K6)||l.has(d0)||e.isComposing())return;const h=l.has(jh),p=d.read(ye),m=f.read(ye);if(!le(m)||!le(p)||!p.isCollapsed()||p.is(m)&&!h)return;const g=p.anchor.key,v=p.anchor.offset,b=d._nodeMap.get(g);if(ce(b)&&u.has(g)&&(h||v===1||!(v>m.anchor.offset+1))){if(h){const _=d.read(()=>b.getTextContent())[v-1];if(!a.has(_))return}e.update(()=>{if(!ol(b))return;const _=b.getParent();_===null||Jh(_)||s(_,b,p.anchor.offset)&&Ou(q6)})}}),e.registerCommand(Uh,l=>{if(l!==null&&l.shiftKey)return!1;const u=ye();if(!le(u)||!u.isCollapsed())return!1;const d=u.anchor.offset,f=u.anchor.getNode();if(!ce(f)||!ol(f))return!1;const h=f.getParent();return h===null||Jh(h)?!1:d===f.getTextContent().length&&!(!x$(h,f,d,r.multilineElement,!0)&&!y$(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},Dc))}function e8(e,t=El,r,n=!1,i=!1){const o=n?e:Foe(e,i),a=dn();a.clear(),Moe(o,a,t,n),ye()!==null&&a.selectStart()}function t8(e=El,t,r=!1){return(function(i,o=!1){const a=fE(i),s=[...a.multilineElement,...a.element],l=!o,u=a.textFormat.filter(d=>d.format.length===1).sort((d,f)=>Number(d.format.includes("code"))-Number(f.format.includes("code")));return d=>{const f=[],h=(d||dn()).getChildren();for(let p=0;p<h.length;p++){const m=h[p],g=Ioe(m,s,u,a.textMatch,o);g!=null&&f.push(l&&p>0&&!$x(m)&&!$x(h[p-1])?`
|
|
39
|
+
`.concat(g):g)}return f.join(`
|
|
40
|
+
`)}})(e,r)(t)}let r8=[Hv,Qd,Fp,rc,Ip,Jd];function Ti(e){return"var("+e+")"}let Voe=w([z("flex"),ai("wrap"),ee("center"),c("gap","2px"),c("padding","var("+O.xs+")"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),j_=w([c("background","none"),c("border","1px solid transparent"),c("border-radius",Ti(Z.sm)),c("color",Ti(x.textSecondary)),c("font-family","inherit"),c("font-size",Ti($.sizeSm)),c("line-height","1"),c("min-width","26px"),c("padding","5px 6px"),Ce("pointer"),qe([c("background",Ti(x.surfaceSubtle))])]),Goe=w([c("background",Ti(x.surfaceSubtle)),c("border-color",Ti(x.border)),c("color",Ti(x.textPrimary))]),Koe=w([vs(.4),Ce("notAllowed")]),q_=w([c("width","1px"),c("align-self","stretch"),c("background",Ti(x.borderSubtle)),c("margin","2px 4px")]),Hoe=w([z("flex"),ee("center"),c("gap",Ti(O.xs)),c("padding","var("+O.xs+")"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),Woe=w([Yn(1),c("background",Ti(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Ti(Z.sm)),c("color",Ti(x.textPrimary)),c("font-family","inherit"),c("font-size",Ti($.sizeSm)),c("padding","3px 6px"),c("outline","none"),Is([c("border-color",Ti(x.brand))])]);function Joe(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=de(()=>{}),a=o[1],s=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},u=h=>{n.update(()=>{let p=ye();if(p!=null&&le(p)){ane(p,h);return}})},d=(h,p,m,g)=>{let v=m!==void 0?m:!1,b=i?j_+" "+Koe:v?j_+" "+Goe:j_;return y("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:b,title:p,disabled:i,type:"button",onClick:_=>g(),onMouseDown:_=>{_.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{jie(p===""?null:p)}),a(m=>{})};return L(cr,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(Jo,"bold")),d("I","Italic",r.italic,()=>l(Jo,"italic")),d("</>","Inline code",r.code,()=>l(Jo,"code")),y("span",{className:q_}),d("H1","Heading 1",void 0,()=>u(()=>ys("h1"))),d("H2","Heading 2",void 0,()=>u(()=>ys("h2"))),d("¶","Paragraph",void 0,()=>u(()=>Wt())),y("span",{className:q_}),d("•","Bulleted list",void 0,()=>l(RL,void 0)),d("1.","Numbered list",void 0,()=>l(AL,void 0)),d("“","Quote",void 0,()=>u(()=>Yd())),d("🔗","Link",void 0,()=>a(h=>{if(!ke(h))return""})),y("span",{className:q_}),d("↩","Undo",void 0,()=>l(Dv,void 0)),d("↪","Redo",void 0,()=>l(Fv,void 0))],"aria-label":"Formatting",className:Voe,role:"toolbar"}),s!==void 0?L("div",{children:[y("input",{"aria-label":"Link URL",className:Woe,autoFocus:!0,placeholder:"https://…",type:"url",value:s,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(s);case"Escape":return a(m=>{});default:return}},onChange:h=>{let p=h.target.value;a(m=>p)}}),d("Apply","Apply link",void 0,()=>f(s)),d("Remove","Remove link",void 0,()=>f(""))],className:Hoe}):null]})}let w$={bold:!1,italic:!1,code:!1},Qoe=Joe;function Yoe(e){return e.trim()===""}let E$={contents:void 0};function Xoe(){let e=E$.contents;if(e!==void 0)return jt(e);let t=Lw({namespace:"reventless-rich-text-probe",nodes:r8,onError:r=>{}});return E$.contents=Jt(t),t}function Zoe(e){let t=Xoe(),r={contents:""};return t.update(()=>{e8(e,El)},{discrete:!0}),t.read(()=>{r.contents=t8(El)}),r.contents}function eae(e){return e.trim()!==""?e.trimEnd()!==Zoe(e).trimEnd():!1}function at(e){return"var("+e+")"}let k$=w([z("flex"),_e("column"),c("background",at(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",at(Z.sm)),c("box-sizing","border-box"),c("transition","border-color 120ms"),la({NAME:"percent",VAL:100}),Ds("hidden"),pO([c("border-color",at(x.brand))])]),tae=w([c("border-color",at(x.error)),pO([c("border-color",at(x.error))])]),rae=w([z("flex"),ee("center"),c("gap","2px"),c("justify-content","flex-end"),c("padding","var("+O.xs+")"),c("border-bottom","1px solid var("+x.borderSubtle+")")]);function nae(e){return w([c("background",e?at(x.surfaceSubtle):"transparent"),c("border","1px solid "+(e?at(x.border):"transparent")),c("border-radius",at(Z.sm)),c("color",at(e?x.textPrimary:x.textSecondary)),c("font-family","inherit"),c("font-size",at($.sizeXs)),c("padding","2px var("+O.sm+")"),Ce("pointer")])}let iae=w([c("background",at(x.surfaceSubtle)),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("color",at(x.textSecondary)),c("font-size",at($.sizeXs)),c("line-height",at($.lineHeightNormal)),c("padding","var("+O.xs+") var("+O.sm+")")]),oae=w([Mt("relative"),z("flex"),_e("column")]),aae=w([Mt("absolute"),c("top","var("+O.sm+")"),c("left","var("+O.sm+")"),c("color",at(x.textDisabled)),c("font-size",at($.sizeSm)),c("pointer-events","none"),c("user-select","none")]);function sae(e){return w([c("color",at(x.textPrimary)),c("font-size",at($.sizeSm)),c("line-height",at($.lineHeightRelaxed)),c("min-height",e),c("outline","none"),c("padding",at(O.sm)),c("word-break","break-word"),c("overflow-y","auto"),c("tab-size","4")])}let lae=w([c("margin","0 0 var("+O.sm+")")]),uae=w([c("font-size",at($.sizeXl)),c("font-weight",at($.weightBold)),c("line-height",at($.lineHeightTight)),c("margin","var("+O.sm+") 0 var("+O.xs+")")]),cae=w([c("font-size",at($.sizeLg)),c("font-weight",at($.weightBold)),c("line-height",at($.lineHeightTight)),c("margin","var("+O.sm+") 0 var("+O.xs+")")]),dae=w([c("font-size",at($.sizeMd)),c("font-weight",at($.weightBold)),c("margin","var("+O.sm+") 0 var("+O.xs+")")]),fae=w([c("border-left","3px solid var("+x.border+")"),c("color",at(x.textSecondary)),c("margin","var("+O.xs+") 0"),c("padding-left",at(O.md))]),C$=w([c("margin","var("+O.xs+") 0"),c("padding-left","1.5em")]),hae=w([c("margin","2px 0")]),pae=w([c("color",at(x.brand)),c("text-decoration","underline")]),mae=w([c("font-weight",at($.weightBold))]),gae=w([c("font-style","italic")]),vae=w([c("text-decoration","line-through")]),bae=w([c("background",at(x.surfaceSubtle)),c("border-radius",at(Z.sm)),c("font-family",at($.fontFamilyMono)),c("font-size","0.9em"),c("padding","1px 4px")]),_ae=w([c("background",at(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",at(Z.md)),c("display","block"),c("font-family",at($.fontFamilyMono)),c("font-size","0.9em"),c("margin","var("+O.xs+") 0"),c("padding",at(O.sm)),c("white-space","pre-wrap")]);function yae(e){return w([c("background","transparent"),c("border","none"),c("color",at(x.textPrimary)),c("font-family",at($.fontFamilyMono)),c("font-size",at($.sizeSm)),c("line-height",at($.lineHeightNormal)),c("min-height",e),c("outline","none"),c("padding",at(O.sm)),c("resize","vertical"),c("box-sizing","border-box"),la({NAME:"percent",VAL:100})])}let xae=Object.fromEntries([["paragraph",lae],["quote",fae],["link",pae],["code",_ae],["heading",Object.fromEntries([["h1",uae],["h2",cae],["h3",dae]])],["list",Object.fromEntries([["ul",C$],["ol",C$],["listitem",hae]])],["text",Object.fromEntries([["bold",mae],["italic",gae],["strikethrough",vae],["code",bae]])]]);function Sae(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,a=e.onChange,s=e.value,l=o!==void 0?o:()=>{},u=i!==void 0?i:"Write markdown…",d=n!==void 0?n:"180px",f=r!==void 0?r:!1,h=t!==void 0?t:!1,p=de(()=>"Rich"),m=p[1],g=p[0],v=de(()=>w$),b=v[1],_=de(()=>s.trim()===""),S=_[1],E=de(()=>!1),C=E[1],A=Pe(null),T=Pe(s),R=Pe(s),N=Pe(!1),I=Pe(a);I.current=a;let M=Tt(()=>Lw({namespace:"reventless-rich-text",nodes:r8,onError:X=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",X)},theme:xae}),[]),P=()=>{let X={contents:""};return M.read(()=>{X.contents=t8(El)}),X.contents},U=X=>{R.current=X,T.current=X,N.current=!0,C(oe=>eae(X)),M.update(()=>{e8(X,El)})},j=()=>{let X=P();if(S(oe=>X.trim()===""),b(oe=>{let ge={contents:w$};return M.read(()=>{let H=ye();if(H!=null&&le(H)){ge.contents={bold:H.hasFormat("bold"),italic:H.hasFormat("italic"),code:H.hasFormat("code")};return}}),ge.contents}),N.current){N.current=!1,T.current=X;return}else return X!==T.current?(T.current=X,I.current(X)):void 0},V=g==="Rich";De(()=>{if(!V)return;M.setRootElement(A.current);let X=Dl(loe(M),Cie(M),Tie(M,$ie(),300),qoe(M,El),M.registerUpdateListener(oe=>j()));return U(s),()=>{X(),M.setRootElement(null)}},[V]),De(()=>{V&&s!==T.current&&s!==R.current&&U(s)},[s]),De(()=>{M.setEditable(!h)},[h]);let Y=(X,oe)=>y("button",{children:oe,"aria-pressed":g===X?"true":"false",className:nae(g===X),type:"button",onClick:ge=>{if(m(H=>X),X==="Source")return C(H=>!1)}}),J;return J=g==="Rich"?L("div",{children:[y("div",{ref:Jt(A),"aria-label":"Rich text editor","aria-multiline":!0,className:sae(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:X=>l(),suppressContentEditableWarning:!0}),_[0]&&!h?y("div",{children:u,className:aae}):null],className:oae}):y("textarea",{"aria-label":"Markdown source",className:yae(d),spellCheck:!1,placeholder:u,readOnly:h,value:s,onBlur:X=>l(),onChange:X=>{let oe=X.target.value;T.current=oe,R.current=oe,a(oe)}}),L("div",{children:[L("div",{children:[Y("Rich","Rich text"),Y("Source","Markdown")],className:rae}),!h&&V?y(Qoe,{editor:M,formats:v[0]}):null,E[0]&&V?y("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:iae}):null,J],className:f?k$+" "+tae:k$})}let wae=Sae;function Fl(e){return"var("+e+")"}let n8=w([z("inlineFlex"),ee("center"),Je("center"),c("background",Fl(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("color",Fl(x.textDisabled))]),R$=Wr([n8,w([c("width","24px"),c("height","24px"),c("border-radius",Fl(Z.sm)),c("font-size",Fl($.sizeSm)),c("vertical-align","middle")])]),i8=Wr([n8,w([c("border-radius",Fl(Z.md)),c("font-size",Fl($.sizeSm))])]),Eae=Wr([i8,w([_e("column"),c("gap",Fl(O.xs)),c("aspect-ratio","4 / 3")])]),kae=Wr([i8,w([_e("row"),c("gap",Fl(O.sm)),c("padding","var("+O.sm+") var("+O.md+")")])]),Cae=w([c("width","240px"),c("max-width","100%")]),Rae=w([c("width","100%")]),Aae=w([c("width","100%"),c("height","100%"),c("aspect-ratio","auto")]),A$=w([c("font-size","20px"),c("line-height","1")]),Tae=w([c("position","absolute"),c("width","1px"),c("height","1px"),c("padding","0"),c("margin","-1px"),Ds("hidden"),c("clip","rect(0, 0, 0, 0)"),c("white-space","nowrap"),c("border","0")]);function Fm(e){return e==="Media"?"⬚":"▤"}function $ae(e){return e==="Media"?"No image":"No file"}function T$(e){switch(e){case"Thumb":case"Detail":return Cae;case"Tile":return Rae;case"Fill":return Aae}}function Nae(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=D(e.label,$ae(n)),a;return a=n==="Media"?Eae:kae,n==="Media"?i==="Thumb"?y("span",{children:Fm(n),"aria-label":o,className:R$,role:"img",title:o}):L("span",{children:[y("span",{children:Fm(n),"aria-hidden":!0,className:A$}),o],"aria-label":o,className:Wr([a,T$(i)]),role:"img"}):i==="Thumb"?L("span",{children:[y("span",{children:Fm(n),"aria-hidden":!0}),y("span",{children:o,className:Tae})],className:R$,title:o}):L("span",{children:[y("span",{children:Fm(n),"aria-hidden":!0,className:A$}),o],className:Wr([a,T$(i)])})}let Ox=Nae;function It(e){return"var("+e+")"}let Mx=w([c("color",It(x.brand)),c("text-decoration","none"),qe([c("text-decoration","underline")])]),Dae=w([z("inlineBlock"),c("width","12px"),c("height","12px"),c("border-radius","3px"),c("border","1px solid var("+x.border+")"),c("vertical-align","-1px")]),Xd=w([z("inlineFlex"),ee("center"),c("gap","6px")]),Fae=w([c("height","24px"),c("width","24px"),c("object-fit","cover"),c("border-radius",It(Z.sm)),c("border","1px solid var("+x.borderSubtle+")"),c("vertical-align","middle")]),Iae=w([c("max-height","160px"),c("max-width","240px"),c("object-fit","cover"),c("border-radius",It(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),Ce("zoomIn")]),Pae=w([c("color",It(x.error)),c("font-size",It($.sizeXs)),c("font-weight",It($.weightMedium)),c("white-space","nowrap"),vp(Ae(6))]),Oae=w([z("inlineBlock"),c("background",It(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius","3px"),c("color",It(x.textSecondary)),c("font-size",It($.sizeXs)),c("font-weight",It($.weightMedium)),c("letter-spacing","0.03em"),c("padding","1px 4px"),c("line-height","1.2")]),Mae=w([z("inlineBlock"),c("background",It(x.surfaceSubtle)),c("border-radius",It(Z.full)),c("width","64px"),c("height","6px"),Ds("hidden")]);function Lae(e){return w([c("background",It(x.brand)),c("border-radius",It(Z.full)),c("height","100%"),c("width",e.toString()+"%")])}let pE=w([c("color",It(x.textSecondary)),c("font-size",It($.sizeXs)),c("font-variant-numeric","tabular-nums")]),zae=w([c("width","220px"),c("max-width","100%")]),Uae=w([z("flex"),_e("column"),c("gap","1px"),c("line-height","1.35")]),Bae=w([c("background","none"),c("border","none"),c("padding","0"),Ce("zoomIn")]),jae=w([z("inlineFlex"),c("background","none"),c("border","none"),c("padding","0"),c("line-height","0"),c("max-width","100%"),Ce("pointer"),qe([c("opacity","0.75")])]),qae=w([z("flex"),_e("column"),c("gap",It(O.xs)),c("width","100%")]),Vae=w([c("background","none"),c("border","none"),c("padding","0"),c("color",It(x.textSecondary)),c("font-size",It($.sizeXs)),c("text-decoration","underline"),Ce("pointer"),qe([c("color",It(x.brand))])]),o8=w([z("flex"),_e("column"),ee("flexStart"),c("gap","6px")]),a8=w([c("color",It(x.textSecondary)),c("font-family",It($.fontFamilyMono)),c("font-size",It($.sizeXs))]),Gae=w([z("inlineBlock"),c("background","#ffffff"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",It(Z.md)),c("padding","4px"),c("line-height","0")]),Kae=w([c("display","block"),c("max-width","260px"),c("height","auto")]),Hae=w([z("flex"),ee("center"),c("gap",It(O.xs))]);function ah(e){return w([c("background",It(x.surface)),c("border","1px solid var("+(e?x.error:x.border)+")"),c("border-radius",It(Z.sm)),c("color",It(x.textPrimary)),c("font-family","inherit"),c("font-size",It($.sizeSm)),c("padding","6px 8px")])}let $$=w([c("flex","1 1 auto"),c("min-width","0")]),N$=w([c("flex","0 0 auto")]),Wae=w([c("color",It(x.textSecondary)),c("font-size",It($.sizeXs)),c("font-variant-numeric","tabular-nums")]),Jae=w([z("inlineFlex"),ee("center"),c("gap","6px")]);function s8(e){return w([c("color",It(e?x.error:x.textSecondary)),c("font-size",It($.sizeXs)),c("font-variant-numeric","tabular-nums")])}let Qae=w([z("flex"),_e("column"),c("gap","4px")]),Yae=w([z("flex"),ee("center"),c("gap",It(O.xs))]);function Zd(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function mE(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),o=D(n[1],"00"),a=s=>{let l=s.length;return l<=3?s:a(s.slice(0,l-3|0))+","+s.slice(l-3|0)};return(t?"-":"")+a(i)+"."+o}function Xae(e){return/^[A-Z]{3}$/.test(e)}function l8(e){if(Xae(e))try{return Jt(new Intl.NumberFormat("en-US",{style:"currency",currency:e}))}catch{return}}function u8(e,t){let r=l8(t);if(r===void 0)return mE(e)+" "+t;let n=jt(r),i=n.resolvedOptions().maximumFractionDigits;return n.format(e/Math.pow(10,i))}function Wv(e){return k(G(e),t=>{let r=k(F(t,"amount"),Ii),n=k(F(t,"currency"),ie);if(r!==void 0&&n!==void 0)return[r,n]})}function Zae(e,t){let r=l8(t);return r!==void 0?e/Math.pow(10,jt(r).resolvedOptions().maximumFractionDigits):e}function c8(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function d8(e){let t=["B","KB","MB","GB","TB","PB"],n=((s,l)=>{for(;;){let u=l,d=s;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function gE(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 vE(e){return k(G(e),t=>{let r=o=>k(k(F(t,o),ie),a=>{if(a!=="")return a}),n=r("start"),i=r("end");if(n!==void 0&&i!==void 0)return[n,i]})}function bE(e,t){let r=Qn(e),n=Qn(t);return r!==void 0&&n!==void 0?n<r?"Ends before it starts":void 0:"Not a date-time"}function f8(e,t){let r=Qn(e),n=Qn(t);if(r!==void 0&&n!==void 0&&n>=r)return gE((n-r)/1e3)}function ese(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 tse(e,t){return tt(t,e,(r,n)=>D(r.split(n)[0],r))}function T0(e){let r=tse(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 rse(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 _E(e){return/^[A-Za-z]{2}$/.test(e)}function h8(e){if(_E(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let D$={contents:void 0};function nse(){let e=D$.contents;if(e!==void 0)return jt(e);let t;try{t=Jt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return D$.contents=Jt(t),t}function yE(e){if(!_E(e))return e;let t=nse();if(t===void 0)return e;try{let r=jt(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let ise=["street","streetaddress","line1","addressline1","address1"],ose=["line2","addressline2","address2","apartment","unit","suite"],ase=["postalcode","zip","zipcode","postcode"],sse=["city","town","locality"],lse=["state","region","province","county"],use=["country","countrycode"];function cse(e){let t=We(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 p8(e){let t=We(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=$e(t._0),i=u=>k(n.find(d=>u.includes(d[0].toLowerCase())),d=>cse(d[1])),o=i(ase),a=i(sse),s=o!==void 0?a!==void 0?o+" "+a:o:a!==void 0?a:void 0,l=Q([i(ise),i(ose),s,i(lse),i(use)],u=>u).map(u=>u.trim()).filter(u=>u!=="");return l.length===0?void 0:l;default:return}}function dse(e){return q(p8(e),t=>t.map(r=>_E(r)?yE(r):r).join(", "))}function fse(e){let t=h8(e);return t!==void 0?t+" "+yE(e):e}function hse(e){return k(G(e),t=>{let r=o=>k($e(t).find(a=>o(a[0].toLowerCase())),a=>Ii(a[1])),n=r(dw),i=r(fw);if(n!==void 0&&i!==void 0)return[n,i]})}function F$(e){let r=e.toFixed(5).replace(/\.?0+$/,"");return r===""||r==="-"?"0":r}function Im(e){return ne(q(Ch(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function I$(e,t){let r=Ch(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let Jv={};function Rr(e,t){Jv[Md(e)]=t}function pse(e){return F(Jv,Md(e))}function m8(e,t){return k(hd(e,t),r=>F(Jv,Md(r.semantic)))}function g8(e,t,r){return k(m8(e,t),n=>n.cell(e,t,r))}function Pg(e,t,r){return k(m8(e,t),n=>n.detail(e,t,r))}function mse(e,t){return g8(e,t,null)}function gse(e,t){return Pg(e,t,null)}function xE(e,t){return k(LO(e,t),r=>F(Jv,Md(r.semantic)))}function vse(e,t){return ne(xE(e,t),!1,r=>ke(r.input))}function bse(e,t,r,n,i,o,a){return q(k(xE(e,t),s=>s.input),s=>s(e,t,r,n,i,o,a))}function _se(e,t,r,n){return k(k(xE(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function $0(e){e.stopPropagation()}function N0(e,t,r){return r?y("a",{children:t,className:Mx,href:e,rel:"noopener noreferrer",target:"_blank",onClick:$0}):y("a",{children:t,className:Mx,href:e,onClick:$0})}function yi(e){return k(ie(e),t=>{if(t!=="")return t})}function SE(e){let t=(r,n,i)=>q(yi(i),e);return{cell:t,detail:t}}function Qv(e){let t=(r,n,i)=>q(Ii(i),o=>e(o));return{cell:t,detail:t}}Rr("Email",SE(e=>N0("mailto:"+e,e,!1)));Rr("Phone",SE(e=>N0("tel:"+e,e,!1)));Rr("Url",{cell:(e,t,r)=>q(yi(r),n=>N0(n,Zd(n,40),!0)),detail:(e,t,r)=>q(yi(r),n=>N0(n,n,!0))});Rr("Currency",Qv(mE));Rr("Percent",Qv(c8));Rr("Bytes",Qv(d8));Rr("Duration",Qv(gE));Rr("Color",SE(e=>L("span",{children:[y("span",{className:Dae,style:{background:e}}),e],className:Xd})));function yse(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function D0(e){let t=e.size,r=e.kind,n=AJ(e.field);if(n===void 0)return y(Ox,{kind:r,size:t});let i=yse(r);return y("button",{children:y(Ox,{kind:r,size:t,label:i[1]}),className:jae,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function xse(e){let t=e.alt,r=e.src,n=de(()=>!1);if(r===void 0)return y(D0,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(cr,{children:[y("button",{children:y("img",{className:Iae,alt:t,src:r}),className:Bae,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(a=>!0)}}),n[0]?y(YO,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function F0(e){let t=We(e);if(typeof t!="object")return t==="JSONNull"?Jt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Jt(r===""?void 0:r)}Rr("Image",{cell:(e,t,r)=>q(F0(r),n=>n!==void 0?y("img",{className:Fae,alt:e,src:Ru(n),onClick:$0}):y(D0,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>q(F0(r),n=>y(xse,{src:q(n,Ru),alt:e,field:e}))});function Sse(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 wse(e){return L("span",{children:[y(Od,{name:e,size:"Small"}),e],className:Xd})}function P$(e,t,r){return k(yi(r),n=>{if(!Sse(n))return wse(n)})}Rr("UserRef",{cell:P$,detail:P$});Rr("Markdown",{cell:(e,t,r)=>q(yi(r),n=>Zd(ese(n),80)),detail:(e,t,r)=>q(yi(r),n=>y(qM,{source:n})),input:(e,t,r,n,i,o,a)=>y(wae,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&Yoe(r))return"Required"}});Rr("Rating",{cell:(e,t,r)=>q(Ii(r),n=>y(h_,{value:n,max:Im(t)})),detail:(e,t,r)=>q(Ii(r),n=>y(h_,{value:n,max:Im(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,a)=>y(h_,{value:D(ks(r),0),max:Im(t),size:"Medium",showValue:!0,onChange:s=>n(s<=0?"":s.toString()),onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=ks(r);if(i===void 0)return"Invalid rating";let o=Im(t);if(i<0||i>o)return"Must be between 0 and "+o.toString()}});function Ese(e){return e<0?0:e>100?100:e}Rr("Progress",{cell:(e,t,r)=>q(Ii(r),n=>{let i=Ese(I$(t,n));return L("span",{children:[y("span",{children:y("span",{className:Lae(i)}),className:Mae}),y("span",{children:Math.round(i).toString()+"%",className:pE})],className:Xd})}),detail:(e,t,r)=>q(Ii(r),n=>y("div",{children:y(uM,{value:I$(t,n)}),className:zae}))});function wE(e,t){let r=Ru(e),n=rse(t);return L("span",{children:[n!==void 0?y("span",{children:n,className:Oae}):null,y("a",{children:t,className:Mx,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:$0})],className:Xd})}function v8(e){let t=e.name,r=e.href,n=de(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[wE(r,t),ZQ(r)?y("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:Vae,type:"button",onClick:a=>{a.stopPropagation(),i(s=>!s)}}):null],className:Xd}),o?y(tY,{src:Ru(r),title:t,height:"60vh"}):null],className:qae})}Rr("FileUrl",{cell:(e,t,r)=>q(yi(r),n=>wE(n,Zd(T0(n),40))),detail:(e,t,r)=>q(yi(r),n=>y(v8,{href:n,name:T0(n)}))});Rr("File",{cell:(e,t,r)=>q(F0(r),n=>n!==void 0?wE(n,Zd(T0(n),40)):y(D0,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>q(F0(r),n=>n!==void 0?y(v8,{href:n,name:T0(n)}):y(D0,{field:e,kind:"Document",size:"Detail"}))});function kse(e){return D(k(Pr(e).find(t=>t[0].toLowerCase()==="currency"),t=>Wu(t[1])),[])}function Cse(e,t){return y("span",{children:u8(e,t),className:pE})}function O$(e,t,r){return q(Wv(r),n=>Cse(n[0],n[1]))}function Rse(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o=kse(e.propSchema),a;if(i==="")a=void 0;else try{a=Wv(JSON.parse(i))}catch{a=void 0}let s=a!==void 0?[a[0].toString(),a[1]]:["",D(o[0],"")],l=s[1],u=s[0],d=(h,p)=>{let m=ks(h);n(m!==void 0&&p!==""?JSON.stringify(Oe([["amount",m],["currency",p]])):"")},f=ks(u);return L("span",{children:[L("span",{children:[y("input",{"aria-label":"Amount in minor units",className:ah(t)+" "+$$,step:1,type:"number",value:u,onBlur:h=>r(),onChange:h=>d(h.target.value,l)}),y("span",{children:f!==void 0&&l!==""?"= "+u8(f,l):"minor units",className:Wae})],className:$$}),o.length===0?y("input",{"aria-label":"Currency",className:ah(t)+" "+N$,placeholder:"EUR",value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)}):y("select",{children:o.map(h=>y("option",{children:h,value:h},h)),"aria-label":"Currency",className:ah(t)+" "+N$,value:l,onBlur:h=>r(),onChange:h=>d(u,h.target.value)})],className:Hae})}Rr("Money",{cell:O$,detail:O$,input:(e,t,r,n,i,o,a)=>y(Rse,{propSchema:t,value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=Wv(i);if(o===void 0)return"Invalid amount";let a=o[0];if(a!==Math.trunc(a))return"An amount is a whole number of minor units"}});function Ase(e,t){let r=bE(e,t),n=f8(e,t),i=r!==void 0?r:n!==void 0?n:"";return L("span",{children:[D(Eh(e),e)+" → "+D(Eh(t),t),i===""?null:y("span",{children:i,className:s8(ke(r))})],className:Jae})}function M$(e,t,r){return q(vE(r),n=>Ase(n[0],n[1]))}function Pm(e){if(e==="")return;let t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toISOString()}function L$(e){let t=xv(e);return t===e?"":t.slice(0,10)+"T"+t.slice(11,16)}function Tse(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o;if(i==="")o=void 0;else try{o=vE(JSON.parse(i))}catch{o=void 0}let a=o!==void 0?[L$(o[0]),L$(o[1])]:["",""],s=a[1],l=a[0],u=(p,m)=>{let g=Pm(p),v=Pm(m);n(g!==void 0&&v!==void 0?JSON.stringify(Oe([["start",g],["end",v]])):"")},d=Pm(l),f=Pm(s),h;if(d!==void 0&&f!==void 0){let p=bE(d,f);h=p!==void 0?[p,!0]:[D(f8(d,f),""),!1]}else h=["start and end",!1];return L("span",{children:[L("span",{children:[y("input",{"aria-label":"Start",className:ah(t),type:"datetime-local",value:l,onBlur:p=>r(),onChange:p=>u(p.target.value,s)}),y("span",{children:"→","aria-hidden":!0}),y("input",{"aria-label":"End",className:ah(t),type:"datetime-local",value:s,onBlur:p=>r(),onChange:p=>u(l,p.target.value)})],className:Yae}),y("span",{children:h[0],className:s8(h[1])})],className:Qae})}Rr("DateRange",{cell:M$,detail:M$,input:(e,t,r,n,i,o,a)=>y(Tse,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=vE(i);return o!==void 0?bE(o[0],o[1]):"Invalid range"}});function $se(e){let t=h8(e);return t!==void 0?L("span",{children:[y("span",{children:t,"aria-hidden":!0}),yE(e)],className:Xd}):e}function z$(e,t,r){return q(yi(r),$se)}Rr("Country",{cell:z$,detail:z$});Rr("Address",{cell:(e,t,r)=>q(dse(r),n=>Zd(n,60)),detail:(e,t,r)=>q(p8(r),n=>y("span",{children:n.map((i,o)=>y("span",{children:fse(i)},o.toString())),className:Uae}))});function U$(e,t,r){return q(hse(r),n=>F$(n[0])+", "+F$(n[1]))}let Nse={cell:U$,detail:U$};Rr("GeoPoint",Nse);function Dse(e){return q(k(k(G(e),t=>F(t,"maxLength")),Ii),t=>t|0)}function V_(e){let t=k(Do(e).channel,n=>bY(n).maxLength),r=Dse(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}Rr("ChannelText",{cell:(e,t,r)=>q(yi(r),n=>{let i=k(V_(t),o=>{if(Jc(n)>o)return Jc(n)-o|0});return L("span",{children:[Zd(n,80),i!==void 0?y("span",{children:i.toString()+" over",className:Pae}):null]})}),detail:(e,t,r)=>{let n=yi(r),i=Do(t).channel;if(n!==void 0&&i!==void 0)return y(Xee,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,a)=>{let s=k(Do(t).channel,dM);return y(zee,{value:r,onChange:n,onBlur:i,maxLength:V_(t),channelLabel:q(s,l=>l.label),hasError:a,note:k(s,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":k(V_(t),i=>{let o=Jc(r);if(o>i)return GM(o-i|0)+" over the "+i.toString()+"-character limit"})});Rr("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>q(yi(r),n=>L("span",{children:[y(RQ,{value:n}),y("span",{children:n,className:a8})],className:o8}))});Rr("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>q(yi(r),n=>L("span",{children:[y(LQ,{value:n}),y("span",{children:n,className:a8})],className:o8}))});Rr("Signature",{cell:(e,t,r)=>k(yi(r),n=>{if(UR(n))return y("span",{children:"✓ Signed",className:pE})}),detail:(e,t,r)=>k(yi(r),n=>{if(UR(n))return y("span",{children:y("img",{className:Kae,alt:"Signature",src:mM(n)}),className:Gae})}),input:(e,t,r,n,i,o,a)=>y(AY,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function Qh(e){return"var("+e+")"}let Fse=w([z("inlineFlex"),ee("center"),ai("wrap"),c("gap","4px"),c("font-size",Qh($.sizeSm)),c("min-width","0")]),Ise=w([c("color",Qh(x.textDisabled)),c("font-size",Qh($.sizeXs))]),Pse=w([c("color",Qh(x.brand)),c("text-decoration","none"),qe([c("text-decoration","underline")])]),Ose=w([c("color",Qh(x.textPrimary))]);function Mse(e){let t=e.segments,r=Ns();return y("span",{children:t.map((n,i)=>{let o=i===(t.length-1|0),a=n.href;return L(ov,{children:[a!==void 0?y("a",{children:n.label,className:Pse,href:a,onClick:s=>{if(!(s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.button!==0))return s.preventDefault(),s.stopPropagation(),r(a)}}):y("span",{children:n.label,className:Ose}),o?null:y("span",{children:" › ",className:Ise})]},i.toString()+":"+n.label)}),className:Fse})}let Lse=Mse;function B$(e){return k(k(G(e),t=>F(t,"type")),ie)}function EE(e){return k(k(G(e),t=>F(t,"format")),ie)}function zse(e){return k(G(e),t=>F(t,"items"))}function j$(e){return ke(k(k(G(e),t=>F(t,"properties")),G))}function qu(e){let t=e.toLowerCase(),r=e.length,n=o=>{let a=o.length;if(r>a&&t.endsWith(o))return e.slice(0,r-a|0)},i=n("ids");return i!==void 0?i:n("id")}function Use(e,t,r){let n=yn(t);if(e==="compositeId")return"KCompositeId";let i=Ul(n);if(i!==void 0)return{TAG:"KUnion",_0:i};let o=Wu(n);if(o!==void 0)return{TAG:"KEnum",_0:o};let a=B$(n),s=0;if(a!==void 0)switch(a){case"array":let l=zse(n);if(l===void 0)return"KArrayOfStrings";if(j$(l)||Re(B$(l),"object"))return{TAG:"KArrayOfObjects",_0:l};let u=qu(e);return u!==void 0?{TAG:"KArrayOfEntityIds",_0:u}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return j$(n)?{TAG:"KNestedObject",_0:n}:"KString";default:s=1}else s=1;if(s===1){let l=EE(n),u=0;if(l!==void 0)switch(l){case"date":case"date-time":return"KDate";default:u=2}else u=2;if(u===2){if(r.isId)return"KString";let d=qu(e);return d!==void 0?{TAG:"KEntityId",_0:d}:"KString"}}}function Ed(e,t,r){let n=Va(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function Bse(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function jse(e,t){return e==="id"||e==="compositeId"?!0:t.isId}function qse(e,t,r,n){return t.hidden||Bse(e)?!1:jse(e,t)?Re(n,e):r?t.summary:!0}function Vse(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;case"KUnion":return 14}}function Gse(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";default:return"240px"}}function q$(e,t){let r=Do(t),n=Use(e,t,r),i=D(k(k(G(t),o=>F(o,"title")),ie),ct(e));return{key:e,label:i,kind:n,ann:r,propSchema:t,priority:Vse(e,n,r),width:Gse(n,e)}}function hi(e,t,r,n,i,o){let a=t!==void 0?t:"List",s=r!==void 0?r:[],l=D(q(k(k(G(e),m=>F(m,"properties")),G),$e),[]),u=Sv(e),d=a==="List"&&u.length!==0,f=gi(Jn(i,xn(e,void 0,void 0).labelField),m=>m!=="id"),h=Q(l,m=>{let g=m[0],v=q$(g,m[1]),b=v.kind,_;if(typeof b!="object")_=!1;else switch(b.TAG){case"KEntityId":case"KArrayOfEntityIds":_=Ed(b._0,s,n);break;default:_=!1}let S=Re(g,o);if(qse(g,v.ann,d,f)&&!_&&!S)return v}),p;if(h.length===0){let m=g=>l.find(v=>v[0]===g);p=ne(Jn(Jn(k(EO(e),m),m("compositeId")),m("id")),[],g=>[q$(g[0],g[1])])}else p=h;return p.toSorted((m,g)=>m.priority-g.priority|0)}function Kse(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function Yh(e){return y(Xo,{variant:"Neutral",label:e,dot:!1})}function V$(e,t,r,n,i){let o=Va(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[La(o.pluginId,o.name,t,[]),t]}function Lx(e,t,r,n){let i=Va(r,e);return i!==void 0?t?mp(i.name):xo(i.name):n}function yu(e,t,r){let n=e.kind;if(typeof n!="object")return e.label;switch(n.TAG){case"KEntityId":let i=n._0;return Ed(i,t,r)?e.label:Lx(i,!1,t,e.label);case"KArrayOfEntityIds":let o=n._0;return Ed(o,t,r)?e.label:Lx(o,!0,t,e.label);default:return e.label}}function G$(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 I0(e,t,r,n,i,o,a,s,l){let u=l!==void 0?l:!1,d=Ed(t,n,a),f=D(s,OO(t)),h=g=>{let v=V$(t,g,n,i,a),b=v[1],_=d?[b,!1]:G$(t,b,o),S=_[0],E;if(o!==void 0){let N=o.retiredBadge;E=N!==void 0&&!d?N(t,b):void 0}else E=void 0;let C;if(o!==void 0){let N=o.linkable;C=N!==void 0&&!d?N(t,b):!0}else C=!0;let A=C?y(JW,{href:v[0],label:S,rawValue:b}):y("span",{children:S,title:S+" is not available to open"}),T=E!==void 0?L("span",{children:[A,E],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):A,R=f&&S!==b?L("span",{children:[y(Od,{name:S,size:"Small"}),T],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):T;return _[1]?y("span",{children:R,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+b+")"}):R},p=g=>{let v=Q(g,b=>{let S=V$(t,b,n,i,a)[1],C=G$(t,S,o)[0];if(C!==S)return{name:C}});if(u&&f&&!d&&g.length>=2&&v.length===g.length)return y(RO,{members:v,size:"Small"})},m=We(r);if(typeof m!="object")return JSON.stringify(r);switch(m.TAG){case"JSONString":return h(m._0);case"JSONArray":let g=m._0,v=Q(g,ie),b=v.length===g.length?p(v):void 0;return b!==void 0?b:y("span",{children:g.map((_,S)=>{let E=We(_);return typeof E!="object"||E.TAG!=="JSONString"?null:L("span",{children:[h(E._0),S<(g.length-1|0)?", ":null]},S.toString())})});default:return JSON.stringify(r)}}function Hse(e){let t=We(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 y(Lse,{segments:r})}function Go(e,t,r){let n=We(r);if(typeof n!="object")switch(n){case"JSONFalse":return y(Xo,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return y(Xo,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=xO(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return xv(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function zx(e,t,r,n,i,o){let a=G(t);if(a===void 0)return;let s=F(a,"name");if(s!==void 0&&We(s)!=="JSONNull")return Go("name",void 0,s);let l=hi(e,"Drill",r,o,void 0,void 0),u=Q(l,m=>{let g=m.kind,v;if(typeof g!="object")v=g!=="KArrayOfStrings";else switch(g.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":case"KUnion":v=!1;break;default:v=!0}let b=F(a,m.key);if(!v||b===void 0)return;let _=We(b);if(!(typeof _!="object"&&_==="JSONNull"))return[m,b]});if(u.length===0)return;let d=u.slice(0,2),f=l.length-d.length|0,h=d.map((m,g)=>{let v=m[1],b=m[0],_=b.kind,S;if(typeof _!="object")S=_==="KDate"?Go(b.key,EE(b.propSchema),v):Go(b.key,void 0,v);else switch(_.TAG){case"KEnum":let E=We(v);S=typeof E!="object"||E.TAG!=="JSONString"?Go(b.key,void 0,v):Yh(E._0);break;case"KEntityId":S=I0(b.key,_._0,v,r,n,i,o,void 0,void 0);break;default:S=Go(b.key,void 0,v)}return L("span",{children:[g>0?" · ":null,S]},g.toString())}),p=f>0?y("span",{children:"+"+f.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return L("span",{children:[h,p],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function Wse(e,t,r,n,i,o){let a=cw(t);if(a===void 0)return JSON.stringify(t);let s=a[1],l=a[0],u=HS(e,l),d=ne(u,l,h=>h.tag),f=D(k(u,h=>zx(WP(h),s,r,n,i,o)),null);return L("span",{children:[Yh(d),f],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:"6px"}})}function gl(e,t,r,n,i,o,a,s,l){let u=i!==void 0?i:SO,d=gi(n,p=>We(p)!=="JSONNull");if(d===void 0)return D(mse(e,r),"—");let f=g8(e,r,d);if(f!==void 0)return f;if(typeof t!="object")switch(t){case"KCompositeId":return Hse(d);case"KDate":return Go(e,EE(r),d);case"KBoolean":case"KNumber":return Go(e,void 0,d);case"KString":let p=We(d);if(typeof p!="object"||p.TAG!=="JSONString")return Go(e,void 0,d);let m=p._0;return m.length>60?y("span",{children:Kse(m,60),title:m}):Go(e,void 0,d);case"KArrayOfStrings":let g=D(q(_t(d),v=>Q(v,ie)),[]);return y(yO,{items:g})}else switch(t.TAG){case"KEnum":let p=We(d);return typeof p!="object"||p.TAG!=="JSONString"?Go(e,void 0,d):Yh(p._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let m=t._0,g=D(_t(d),[]),v=g.length;if(u.collapsed){let C=g[0];return C!==void 0?K$(m,C,o,a,s,l):y(Zf,{count:v,label:"items"})}let b=k(g[0],C=>zx(m,C,o,a,s,l));return b!==void 0?L("span",{children:[b,v>1?y("span",{children:"+"+(v-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):y(Zf,{count:v,label:"items"});case"KNestedObject":let _=t._0;if(u.collapsed)return K$(_,d,o,a,s,l);let S=zx(_,d,o,a,s,l);if(S!==void 0)return S;let E=D(q(G(d),C=>Object.keys(C).length),0);return y(Zf,{count:E,label:"fields"});case"KUnion":return Wse(t._0,d,o,a,s,l)}let h=ne(hd(e,r),!1,p=>p.semantic==="UserRef");return I0(e,t._0,d,o,a,s,l,h?!0:void 0,!0)}function K$(e,t,r,n,i,o){let a=D(G(t),{}),s=hi(e,"Drill",r,o,void 0,void 0).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 y("div",{children:s.map(l=>L("div",{children:[y("span",{children:yu(l,r,o),style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),y("span",{children:gl(l.key,l.kind,l.propSchema,F(a,l.key),l.ann,r,n,i,o)})],style:{display:"flex",alignItems:"baseline",gap:"6px"}},l.key)),style:{display:"flex",maxHeight:"120px",overflow:"auto",flexDirection:"column",gap:"2px"}})}function Jse(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":case"KUnion":return!1;default:return!0}}function Qse(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function b8(e,t,r,n,i,o,a,s,l,u){let d=i!==void 0?i:!1,f=Jn(gi(u,h=>e.some(p=>p.key===h)),q(e[0],h=>h.key));return e.map(h=>{let p=yu(h,t,a),m=ne(hd(h.key,h.propSchema),!1,g=>g.semantic==="Image"?!0:g.semantic==="File");return{key:h.key,label:p,render:g=>{let v=gl(h.key,h.kind,h.propSchema,n(g,h.key),h.ann,t,r,o,a),b=s!==void 0&&m?y(TO.make,{fill:S=>s(g,S),children:v}):v;if(l===void 0)return b;if(ke(l.values)&&h.key===l.field){let S=kh(l,n(g,l.field));return S!==void 0?S:b}if(l.values!==void 0||!Re(f,h.key))return b;let _=kh(l,n(g,l.field));return _!==void 0?L("span",{children:[b,_],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):b},sortable:d&&Jse(h.kind),width:h.width}})}function _8(e){return(t,r)=>e(t,r).then(n=>n.data)}let y8=or(void 0),x8=or(void 0),Yse={contents:void 0},Xse=y8.Provider,Zse=x8.Provider;function ele(e){let t=e.executeResult,r=e.execute,n=Tt(()=>{if(r!==void 0)return r;if(t!==void 0)return _8(t);console.error('AutoGraphQL.Provider: neither `execute` nor `executeResult` was supplied — every query below this provider will report "Not connected".')},[r,t]);return _r(Xse,{value:n,children:_r(Zse,{value:t,children:e.children})})}let tle={make:ele};function si(){return Et(y8)}function Pp(){return Et(x8)}let S8={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function w8(e,t){let r=G(e),n=k(k(k(r,i=>F(i,"data")),G),i=>F(i,t));return n!==void 0?n:k(r,i=>F(i,t))}function kE(e,t){let r=w8(e,t),n=k(r,_t);return n!==void 0?n:Q(D(k(k(k(r,G),i=>F(i,"edges")),_t),[]),i=>k(G(i),o=>F(o,"node")))}function E8(e,t){return Q(kE(e,t),G)}function k8(e,t){let r=(i,o)=>D(k(F(i,o),dv),!1),n=(i,o)=>k(F(i,o),ie);return ne(k(k(k(w8(e,t),G),i=>F(i,"pageInfo")),G),S8,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function rle(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function nle(e,t){return e.hasNextPage?!0:t==="Backward"}function ile(e,t){return e.hasPreviousPage?!0:t==="Forward"}let C8={};function ef(e,t,r,n){return k(Va(r,t),i=>k(F(e,i.queryField),o=>F(o.labels,n)))}function Op(e,t,r,n){return k(Va(r,t),i=>k(i.namedRetirement,o=>k(k(F(e,i.queryField),a=>F(a.states,n)),a=>{let s=o.values;return kh(o,s!==void 0?a:!0)})))}function Mp(e,t,r,n,i){if(i)return!0;let o=Va(r,t);if(o===void 0)return!0;let a=F(e,o.queryField);return a!==void 0?vr(F(a.states,n)):!0}function Lp(e,t,r,n){let i=Va(r,t);if(i===void 0)return!1;let o=F(e,i.queryField);return o!==void 0&&o.loaded&&ne(o.asked,!0,a=>ke(F(a,n)))?vr(F(o.labels,n)):!1}function ole(e){let t=We(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return Q(t._0,ie).filter(n=>n!=="");default:return[]}}function ale(e,t,r,n){let i={},o=(l,u)=>Q(l,d=>k(F(d,u),G)),a=(l,u)=>l.map(d=>Q(D(k(F(d,u),_t),[]),G)).flat(),s=(l,u,d)=>{u.forEach(f=>{let h=f.kind;if(typeof h!="object")return;switch(h.TAG){case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":return d>0?s(a(l,f.key),hi(h._0,"Drill",r,n,void 0,void 0),d-1|0):void 0;case"KNestedObject":return d>0?s(o(l,f.key),hi(h._0,"Drill",r,n,void 0,void 0),d-1|0):void 0;default:return}let p=h._0;if(Ed(p,r,n))return;let m=Va(r,p);if(m!==void 0){l.forEach(g=>re(F(g,f.key),v=>{ole(v).forEach(b=>{let _=m.queryField,S=D(F(i,_),[]);S.some(E=>E===b)||S.push(b),i[_]=S})}));return}})};return s(e,t,3),i}function sle(e){return $e(e).toSorted((r,n)=>dd(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(dd).join(",")).join("|")}function R8(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 lle(e,t){let r={},n={};return D(k(k(G(D(k(G(e),i=>F(i,"data")),e)),i=>F(i,t+"Refs")),_t),[]).forEach(i=>{let o=G(i);if(o===void 0)return;let a=k(F(o,"id"),ie);if(a===void 0)return;let s=D(k(F(o,"label"),ie),a),l=D(k(F(o,"retired"),dv),!1),u=D(k(F(o,"retiredState"),ie),""),d=f=>{if(r[f]=s,l){n[f]=u;return}};d(a),re(R8(a),d)}),[r,n]}function ule(e,t){return ke(k(k(G(D(k(G(e),r=>F(r,"data")),e)),r=>F(r,t+"Refs")),_t))}function cle(e,t,r){let n={};return E8(e,t).forEach(i=>{let o=k(F(i,"id"),ie),a=D(k(F(i,r),ie),"");if(o===void 0)return;let s=R8(o),l=r==="id"?s!==void 0?s:o:a===""?o:a;if(n[o]=l,s!==void 0){n[s]=l;return}}),n}function CE(e,t,r){let n=t.queryField,i=t.labelField,o=i==="id"?"id":"id "+i,a="query($ids: [ID!]!) { "+n+"Refs(ids: $ids) { id label retired retiredState } }",s="query($ids: [ID!]) { "+n+"(first: "+r.length.toString()+", filter: {ids: $ids}) { edges { node { "+o+" } } } }",l={};return l.ids=r.map(u=>u),e(a,l).then(u=>ule(u,n)?Promise.resolve(lle(u,n)):e(s,l).then(d=>[cle(d,n,i),{}]))}let zp=or(void 0);function dle(){return Et(zp)}function fle(){let e=Et(zp);return e!==void 0?e.invalidate:t=>{}}let A8=zp.Provider;function hle(e){let t=si(),r=de(()=>C8),n=r[1],i=r[0],o=Pe({}),a=(g,v)=>n(b=>{let _=Oe($e(b)),S=Oe(ne(F(o.current,g),[],C=>C.ids).map(C=>[C,!0])),E={...v(F(b,g))};return E.asked=S,_[g]=E,_}),s=(g,v)=>{let b=Oe($e(g));return $e(v).forEach(_=>{b[_[0]]=_[1]}),b},l=(g,v,b,_)=>a(g,S=>{let E=_?void 0:S;return{loaded:!0,labels:s(ne(E,{},C=>C.labels),v),states:s(ne(E,{},C=>C.states),b)}}),u=Pe(g=>{}),d=(g,v,b)=>{let _=g.queryField;if(t===void 0)return;let S=(E,C)=>{l(_,E,C,b);let A=F(o.current,_);if(A!==void 0)return o.current[_]={entity:A.entity,ids:A.ids,refetching:!1,stale:!1},A.stale?u.current(_):void 0};Ft(CE(t,g,v).then(E=>S(E[0],E[1])),E=>(console.warn("[AutoUI] RefLabel batch "+_+" failed; cells fall back to raw ids",E),S({},{}),Promise.resolve()))},f=g=>{let v=F(o.current,g);if(v!==void 0&&v.ids.length!==0)if(v.refetching){o.current[g]={entity:v.entity,ids:v.ids,refetching:v.refetching,stale:!0};return}else return o.current[g]={entity:v.entity,ids:v.ids,refetching:!0,stale:!1},a(g,b=>{if(b===void 0)return{loaded:!1,labels:{},states:{}};let _={...b};return _.loaded=!1,_}),d(v.entity,v.ids,!0)};u.current=f;let h=qr((g,v)=>{$e(g).forEach(b=>{let _=b[0],S=F(o.current,_),E=ne(S,[],T=>T.ids),C=b[1].filter(T=>!E.includes(T));if(C.length===0)return;let A=v.find(T=>T.queryField===_);if(A!==void 0)return o.current[_]={entity:A,ids:E.concat(C),refetching:ne(S,!1,T=>T.refetching),stale:ne(S,!1,T=>T.stale)},a(_,T=>{if(T===void 0)return{loaded:!1,labels:{},states:{}};let R={...T};return R.loaded=!1,R}),d(A,C,!1)})},[t]),p=qr(f,[t]),m=Tt(()=>({entries:i,request:h,invalidate:p}),[i,h,p]);return _r(A8,{value:m,children:e.children})}let ple={provider:A8,make:hle},T8={context:zp,use:dle,useInvalidate:fle,Provider:ple};function tf(e,t,r,n,i){let o=i!==void 0?i:!0,a=si(),s=Et(zp),l=de(()=>C8),u=l[1],d=o?ale(e,t,r,n):{},f=sle(d);return De(()=>{let h={contents:!1};return f!==""&&(s!==void 0?s.request(d,r):a!==void 0&&$e(d).forEach(p=>{let m=p[1];if(m.length===0)return;let g=p[0],v=r.find(b=>b.queryField===g);if(v!==void 0){Ft(CE(a,v,m).then(b=>{if(h.contents)return;let _=b[1],S=b[0];u(E=>{let C=Oe($e(E));return C[g]={loaded:!0,labels:S,states:_},C})}),b=>(h.contents||(console.warn("[AutoUI] RefLabel batch "+g+" failed; cells fall back to raw ids",b),u(_=>{let S=Oe($e(_));return S[g]={loaded:!0,labels:{},states:{}},S})),Promise.resolve()));return}})),()=>{h.contents=!0}},[f,a]),s!==void 0?s.entries:l[0]}let ia="table",ul={contents:[]};function ha(e){ul.contents.some(t=>t.id===e.id)?ul.contents=ul.contents.map(t=>t.id===e.id?e:t):ul.contents=ul.contents.concat([e])}function $8(e){return ul.contents.find(t=>t.id===e)}function P0(){return ul.contents}function RE(e){let t=xn(e,void 0,void 0),r=ul.contents.filter(n=>{let i=n.arity;return typeof i!="object"||i.TAG==="Multi"?n.isCapable(e,t):!1});return r.filter(n=>n.id===ia).concat(r.filter(n=>n.id!==ia))}function AE(e){return $W(e.map(t=>t.window))}function mle(e){return tt(e,0,(t,r)=>t+r.rows.length|0)}function Up(e,t,r){let n=r!==void 0?r:"item";return gO(AE(e),mle(e),t,n)}function Yv(e){try{return ro(localStorage.getItem(e))}catch{return}}function TE(e,t){try{return localStorage.setItem(e,t)}catch{return}}function $E(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+ne(r,"",n=>"."+n)}function vl(e){return"var("+e+")"}let N8=w([z("inlineFlex"),ee("center"),c("border","1px solid var("+x.border+")"),c("border-radius",vl(Z.md)),c("overflow","hidden")]),NE=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","2px var("+O.sm+")"),c("color",vl(x.textSecondary)),c("font-size",vl($.sizeSm)),Ce("pointer"),qe([c("background",vl(x.surfaceSubtle)),c("color",vl(x.textPrimary))])]),D8=Wr([NE,w([c("background",vl(x.surfaceSubtle)),c("color",vl(x.textPrimary)),c("font-weight",vl($.weightMedium))])]),gle={group:N8,btn:NE,btnActive:D8};function vle(e){let t=e.onSelect,r=e.activeId;return y("div",{children:e.modes.map(n=>L("button",{children:[n.icon,y("span",{children:n.label})],className:n.id===r?D8:NE,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:N8,role:"group"})}let ms={Style:gle,make:vle};function ble(e){let t=e.source,r=ua(),n=hp(),i=hi(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),o=t.rows.map((d,f)=>{let h=D(G(d),{});return{rowKey:D(k(F(h,"id"),ie),"#"+f.toString()),json:d,dict:h}}),a=tf(o.map(d=>d.dict),i,r,t.ownEntity,vr(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(d,f)=>ef(a,d,r,f),isMissing:(d,f)=>Lp(a,d,r,f),retiredBadge:(d,f)=>Op(a,d,r,f),linkable:(d,f)=>Mp(a,d,r,f,!1)},u=i.map(d=>({key:d.key,label:yu(d,r,t.ownEntity),render:f=>gl(d.key,d.kind,d.propSchema,F(f.dict,d.key),d.ann,r,n,l,t.ownEntity),sortable:!1,width:d.width}));return y(Sh,{columns:u,data:o,keyFn:d=>d.rowKey,onRowClick:d=>t.onOpenRow(d.rowKey,d.json)})}let _le=y("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});ha({id:ia,label:"Table",icon:_le,arity:"Single",isCapable:(e,t)=>!0,render:e=>{let t=e[0];return t!==void 0?y(ble,{source:t}):null},capability:"always — the universal default"});let H$=["resources","events"],W$=["split","full"],J$=["funnel","scatter"],Og={};function vn(e,t){return k(e.views,r=>F(r,t))}function ja(e,t){return k(e.fields,r=>F(r,t))}function zn(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function Kr(e,t,r){let n=e[t];if(n===void 0)return;let i=he.string(n);if(i!==void 0)return i;zn(r+"."+t,"expected a string — dropped")}function Ux(e,t,r){let n=e[t];if(n===void 0)return;let i=he.bool(n);if(i!==void 0)return i;zn(r+"."+t,"expected a boolean — dropped")}function yle(e,t,r){let n=e[t];if(n===void 0)return;let i=he.float(n);if(i!==void 0){if(i===Math.trunc(i))return i|0;zn(r+"."+t,"expected a whole number — dropped");return}else{zn(r+"."+t,"expected a number — dropped");return}}function Q$(e,t,r){let n=e[t];if(n===void 0)return;let i=he.array(n);if(i!==void 0)return Q(i,he.string);zn(r+"."+t,"expected an array of strings — dropped")}function Y$(e,t,r,n){let i=e[t];if(i===void 0)return;let o=he.object(i);if(o!==void 0){let a={};return Object.entries(o).forEach(s=>{let l=s[0];re(n(s[1],r+"."+t+'["'+l+'"]'),u=>{a[l]=u})}),a}zn(r+"."+t,"expected an object — dropped")}function F8(e,t){let r=he.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],a=he.string(i[1]);if(a!==void 0){n[o]=a;return}else return zn(t+"."+o,"expected a string — dropped")}),n}zn(t,"expected an object of string values — dropped")}function xle(e,t){let r=he.object(e);if(r!==void 0)return{label:Kr(r,"label",t),scopedLabel:Kr(r,"scopedLabel",t),group:Kr(r,"group",t),order:yle(r,"order",t),hidden:Ux(r,"hidden",t)};zn(t,"expected an object — dropped")}function Sle(e,t){let r=he.object(e);if(r!==void 0){let n=Kr(r,"pluginId",t),i=Kr(r,"slice",t),o=Kr(r,"command",t),a=Kr(r,"field",t);if(n!==void 0&&i!==void 0&&o!==void 0&&a!==void 0)return{label:Kr(r,"label",t),pluginId:n,slice:i,command:o,field:a,then:Kr(r,"then",t)};zn(t,"a row action needs pluginId, slice, command and field — dropped");return}zn(t,"expected an object — dropped")}function wle(e,t){let r=he.object(e);if(r!==void 0){let n=r.nav,i=r.rowActions,o;if(i!==void 0){let s=he.array(i);s!==void 0?o=KS(s,(l,u)=>Sle(l,t+".rowActions["+u.toString()+"]")):(zn(t+".rowActions","expected an array of row actions — dropped"),o=void 0)}else o=void 0;let a=r.transitions;return{mode:Kr(r,"mode",t),layout:Kr(r,"layout",t),canvas:Kr(r,"canvas",t),role:Kr(r,"role",t),resourceRef:Kr(r,"resourceRef",t),accent:Kr(r,"accent",t),audit:Ux(r,"audit",t),presence:Ux(r,"presence",t),related:Q$(r,"related",t),nav:n!==void 0?xle(n,t+".nav"):void 0,rowActions:o,retiredLabel:Kr(r,"retiredLabel",t),suppress:Q$(r,"suppress",t),transitions:a!==void 0?F8(a,t+".transitions"):void 0}}zn(t,"expected an object — dropped")}function Ele(e,t){let r=he.object(e);if(r!==void 0){let n=Kr(r,"view",t);if(n!==void 0)return{view:n,label:Kr(r,"label",t),field:Kr(r,"field",t),aggregate:Kr(r,"aggregate",t),viz:Kr(r,"viz",t),xField:Kr(r,"xField",t)};zn(t,"metric without a `view` — dropped");return}zn(t,"expected an object — dropped")}function kle(e,t){let r=e!==void 0?e:"ui-hints",n=he.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let a=he.array(i);a!==void 0?o=KS(a,(s,l)=>Ele(s,r+".dashboard["+l.toString()+"]")):(zn(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:Y$(n,"views",r,wle),fields:Y$(n,"fields",r,F8),dashboard:o}}return zn(r,"expected an object — no hints applied"),Og}function Cle(e){let t=he.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=kle('ui-hints["'+i+'"]',n[1])}),r}return zn("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function Rle(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];ke(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function ru(e){return D(q(k(k(G(yn(e)),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Ale(e,t){return k(k(q(k(k(k(G(yn(e)),r=>F(r,"properties")),G),r=>F(r,t)),yn),G),r=>F(r,"items"))}function G_(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(a=>a.name===n),o=i!==void 0?i.schema:q(e.stateViewSlices.find(a=>a.name===n),a=>a.schema);return o!==void 0?tt(r.slice(1),{TAG:"Ok",_0:{schema:o}},(a,s)=>{if(a.TAG!=="Ok")return a;let l=a._0.schema,u=Ale(l,s);return u!==void 0?{TAG:"Ok",_0:{schema:u}}:ru(l).includes(s)?ne(k(k(k(G(yn(l)),d=>F(d,"properties")),G),d=>F(d,s)),{TAG:"Error",_0:'unresolvable path segment "'+s+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+s+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(a=>a.name).concat(e.stateViewSlices.map(a=>a.name)).join(", ")}}function Tle(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 I8(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.lifecycleField:k(e.stateViewSlices.find(n=>n.name===t),n=>n.lifecycleField)}function $le(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.ownerField:k(e.stateViewSlices.find(n=>n.name===t),n=>n.ownerField)}function Nle(e,t,r){let n=Jn(I8(e,t),xn(r,void 0,void 0).statusField);return n!==void 0?ao(r,n):[]}function Dle(e){return Pr(e).filter(t=>Cs(t[1])).map(t=>t[0])}function X$(e,t){if($8(e)!==void 0)return;let n=P0().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function Fle(e,t){let r=e.aggregates.find(i=>i.name===t);if(r!==void 0)return{TAG:"Ok",_0:r.commands};let n=e.stateChangeSlices.find(i=>i.name===t);return n!==void 0?{TAG:"Ok",_0:n.commands}:{TAG:"Error",_0:e.aggregates.map(i=>i.name).concat(e.stateChangeSlices.map(i=>i.name))}}function Ile(e,t,r){let n=r!==void 0?r:[],i=n.length===0?[t]:n,o=[],a=s=>{o.push("[AutoUI] uiHints ("+t.id+"): "+s)};return re(e.views,s=>{$e(s).forEach(l=>{let u=l[1],d=l[0],f=G_(t,d);f.TAG!=="Ok"&&a('views["'+d+'"]: '+f._0),re(u.role,h=>{if(!H$.includes(h))return a('views["'+d+'"].role: unknown role "'+h+'" — expected '+H$.join(" or "));if(h!=="events")return;let p=u.resourceRef;return p!==void 0?f.TAG==="Ok"&&!ru(f._0.schema).includes(p)?a('views["'+d+'"].resourceRef: unknown field "'+p+'"'):void 0:a('views["'+d+'"]: role "events" requires a resourceRef field')}),re(u.resourceRef,h=>{if(Ma(u.role,"events"))return a('views["'+d+'"].resourceRef: only meaningful with role "events"')}),re(u.transitions,h=>{let p=Tle(t),m=I8(t,d),g;g=f.TAG==="Ok"?m!==void 0?ao(f._0.schema,m):[]:[],g.length===0&&a('views["'+d+'"].transitions: the view declares no status enum, so no transition can apply'),$e(h).forEach(v=>{let b=v[1],_=v[0];if(p.includes(b)||a('views["'+d+'"].transitions["'+_+'"]: unknown command "'+b+'" — known commands: '+p.join(", ")),g.length!==0&&!g.includes(_))return a('views["'+d+'"].transitions: unknown target state "'+_+'" — known states: '+g.join(", "))})}),re(u.nav,h=>{d.includes(".")&&a('views["'+d+'"].nav: a nested path has no menu entry of its own — nav belongs on the top-level view'),[["label",h.label],["scopedLabel",h.scopedLabel],["group",h.group]].forEach(p=>{let m=p[0];re(p[1],g=>{if(g.trim()==="")return a('views["'+d+'"].nav.'+m+": blank — an empty "+m+" renders nothing, so it is ignored")})}),re(h.scopedLabel,p=>{if(!d.includes(".")&&vr($le(t,d)))return a('views["'+d+'"].nav.scopedLabel: the view declares no @owner field, so no caller is narrowed to their own rows and this label never renders')})}),re(u.rowActions,h=>{d.includes(".")&&h.length!==0&&a('views["'+d+'"].rowActions: a nested path is rendered by the detail producer, which offers no row actions — they belong on the top-level view'),h.forEach((p,m)=>{let g='views["'+d+'"].rowActions['+m.toString()+"]",v=i.find(b=>b.id===p.pluginId);if(v!==void 0){let b=Fle(v,p.slice);if(b.TAG==="Ok"){let _=b._0,S=_.find(E=>E.name===p.command);if(S!==void 0){let E=ru(S.schema);E.includes(p.field)||a(g+': unknown field "'+p.field+'" on command "'+p.command+'" — known fields: '+E.join(", "))}else a(g+': unknown command "'+p.command+'" in "'+p.slice+'" — known commands: '+_.map(E=>E.name).join(", "))}else a(g+': unknown slice "'+p.slice+'" in plugin "'+p.pluginId+'" — known aggregates and slices: '+b._0.join(", "))}else a(g+': unknown plugin "'+p.pluginId+'" — known plugins: '+i.map(b=>b.id).join(", "));re(p.then,b=>{if(b.trim()==="")return a(g+".then: blank — an empty route navigates nowhere, so it is ignored")})})}),re(u.retiredLabel,h=>{if(h.trim()==="")return a('views["'+d+'"].retiredLabel: blank — an empty label renders an empty badge, so it is ignored');if(f.TAG!=="Ok")return;let p=yp(f._0.schema);return p!==void 0?p[1].values!==void 0?a('views["'+d+'"].retiredLabel: "'+p[0]+'" retires the row by its lifecycle state, so each row badges by the state it is in — rename the states themselves to change the word'):void 0:a('views["'+d+'"].retiredLabel: the view declares no @retired field, so there is no retirement state to label')}),re(u.mode,h=>re(X$(h,'views["'+d+'"].mode'),a)),re(u.layout,h=>{if(!W$.includes(h))return a('views["'+d+'"].layout: unknown layout "'+h+'" — expected '+W$.join(" or "))}),re(u.suppress,h=>{h.forEach(p=>{if(re(X$(p,'views["'+d+'"].suppress'),a),p===ia)return a('views["'+d+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),re(e.fields,s=>{$e(s).forEach(l=>{let u=l[0],d=G_(t,u);if(d.TAG!=="Ok")return a('fields["'+u+'"]: '+d._0);let f=ru(d._0.schema);$e(l[1]).forEach(h=>{let p=h[1],m=h[0];if(f.includes(m)||a('fields["'+u+'"]: unknown field "'+m+'"'),vr(lw(p)))return a('fields["'+u+'"].'+m+': unknown semantic "'+p+'"')})})}),re(e.dashboard,s=>{s.forEach(l=>{let u=D(l.aggregate,"count");["count","sum","avg"].includes(u)?u!=="count"&&vr(l.field)&&a('dashboard metric on "'+l.view+'": aggregate "'+u+'" requires a field'):a('dashboard metric on "'+l.view+'": unknown aggregate "'+u+'" — expected count, sum, or avg');let d=G_(t,l.view);if(d.TAG!=="Ok")return a("dashboard metric: "+d._0);let f=d._0.schema;re(l.field,h=>{if(!ru(f).includes(h))return a('dashboard metric on "'+l.view+'": unknown field "'+h+'"')}),re(l.xField,h=>{if(!ru(f).includes(h))return a('dashboard metric on "'+l.view+'": unknown xField "'+h+'"')}),re(l.viz,h=>{if(!J$.includes(h))return a('dashboard metric on "'+l.view+'": unknown viz "'+h+'" — expected '+J$.join(", "));if(h==="funnel"&&Nle(t,l.view,f).length===0)return a('dashboard metric on "'+l.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(h!=="scatter")return;let p=l.field,m=l.xField;if(p!==void 0&&m!==void 0){let g=ru(f),v=Dle(f);[["field",p],["xField",m]].forEach(b=>{let _=b[1];if(g.includes(_)&&!v.includes(_))return a('dashboard metric on "'+l.view+'": viz "scatter" '+b[0]+' "'+_+'" is not a numeric field')});return}a('dashboard metric on "'+l.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),o.forEach(s=>{console.error(s)}),o}function DE(e,t){let r=RE(e),n=k(t,i=>i.suppress);return n!==void 0?r.filter(i=>i.id===ia?!0:!n.includes(i.id)):r}function FE(e,t,r,n){let i=l=>k(l,u=>n.find(d=>d.id===u)),o=i(e);if(o!==void 0)return o;let a=i(k(t,l=>l.mode));if(a!==void 0)return a;let s=i(r);return s!==void 0?s:n[0]}function K_(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function Ple(e,t,r,n){if(!n)return"Full";let i=k(e,K_);if(i!==void 0)return i;let o=k(k(t,a=>a.layout),K_);return o!==void 0?o:D(k(r,K_),"Full")}function Ole(e,t){return D(k(e,r=>r.audit),!1)?!0:t}function Mle(e){return D(k(e,t=>t.presence),!1)}function Lle(e){return k(e,t=>t.related)}function zle(e){return e.toLowerCase()==="hide"?"Hide":"Lock"}function jc(e,t){return t!==void 0&&t.length!==0?t.some(r=>e.includes(r)):!0}function P8(e){return k(e,t=>t[0])}function Ule(e,t){let r=n=>n.filter(i=>jc(e,i.requiredAccess));return t.map(n=>{let i={...n};return i.internalQueryables=q(n.internalQueryables,o=>o.filter(a=>jc(e,a.requiredAccess))),i.stateChangeSlices=n.stateChangeSlices.map(o=>{let a={...o};return a.commands=r(o.commands),a}),i.stateViewSlices=n.stateViewSlices.filter(o=>jc(e,o.requiredAccess)),i.aggregates=n.aggregates.map(o=>{let a={...o};return a.commands=r(o.commands),a}),i.readModels=n.readModels.filter(o=>jc(e,o.requiredAccess)).map(o=>{let a={...o};return a.commands=r(o.commands),a}),i})}function Ble(e,t){let r={},n=(i,o)=>{let a=!jc(e,o),s=P8(o);if(a&&s!==void 0){r[i]=s;return}};return t.forEach(i=>{i.readModels.forEach(o=>n(o.name,o.requiredAccess)),i.stateViewSlices.forEach(o=>n(o.name,o.requiredAccess))}),r}function jle(e,t){let r={},n=(i,o)=>{if(o.length!==0&&o.every(a=>!jc(e,a.requiredAccess)))return re(k(o[0],a=>P8(a.requiredAccess)),a=>{r[i]=a})};return t.forEach(i=>{i.aggregates.forEach(o=>n(o.name,o.commands)),i.stateChangeSlices.forEach(o=>n(o.name,o.commands))}),r}function qle(e,t,r){return e==="Lock"?[r,Ble(t,r),jle(t,r)]:[Ule(t,r),{},{}]}let Vle=[c(x.background,"#0d1117"),c(x.surface,"#161b22"),c(x.surfaceSubtle,"#1c2128"),c(x.surfaceElevated,"#21262d"),c(x.brand,"#2f81f7"),c(x.brandSubtle,"#1f4b8e"),c(x.success,"#3fb950"),c(x.warning,"#d29922"),c(x.error,"#f85149"),c(x.info,"#58a6ff"),c(x.textPrimary,"#e6edf3"),c(x.textSecondary,"#8b949e"),c(x.textDisabled,"#484f58"),c(x.textOnBrand,"#ffffff"),c(x.border,"#30363d"),c(x.borderSubtle,"#21262d"),c(O.xs,"4px"),c(O.sm,"8px"),c(O.md,"16px"),c(O.lg,"24px"),c(O.xl,"32px"),c(O.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(Pn.sm,"0 1px 3px rgba(0,0,0,0.4)"),c(Pn.md,"0 4px 12px rgba(0,0,0,0.5)"),c(Pn.lg,"0 8px 24px rgba(0,0,0,0.6)")],Gle=[c(x.background,"#ffffff"),c(x.surface,"#f6f8fa"),c(x.surfaceSubtle,"#eaeef2"),c(x.surfaceElevated,"#ffffff"),c(x.brand,"#0969da"),c(x.brandSubtle,"#ddf4ff"),c(x.success,"#1a7f37"),c(x.warning,"#9a6700"),c(x.error,"#cf222e"),c(x.info,"#0550ae"),c(x.textPrimary,"#1f2328"),c(x.textSecondary,"#636c76"),c(x.textDisabled,"#bec1c5"),c(x.textOnBrand,"#ffffff"),c(x.border,"#d0d7de"),c(x.borderSubtle,"#eaeef2"),c(O.xs,"4px"),c(O.sm,"8px"),c(O.md,"16px"),c(O.lg,"24px"),c(O.xl,"32px"),c(O.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(Pn.sm,"0 1px 3px rgba(0,0,0,0.08)"),c(Pn.md,"0 4px 12px rgba(0,0,0,0.12)"),c(Pn.lg,"0 8px 24px rgba(0,0,0,0.16)")],Kle=[c(x.background,"#f5f5f5"),c(x.surface,"#ffffff"),c(x.surfaceSubtle,"#eeeeee"),c(x.surfaceElevated,"#ffffff"),c(x.brand,"#424242"),c(x.brandSubtle,"#e0e0e0"),c(x.success,"#388e3c"),c(x.warning,"#f57c00"),c(x.error,"#d32f2f"),c(x.info,"#1976d2"),c(x.textPrimary,"#212121"),c(x.textSecondary,"#757575"),c(x.textDisabled,"#bdbdbd"),c(x.textOnBrand,"#ffffff"),c(x.border,"#bdbdbd"),c(x.borderSubtle,"#e0e0e0"),c(O.xs,"4px"),c(O.sm,"8px"),c(O.md,"16px"),c(O.lg,"24px"),c(O.xl,"32px"),c(O.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(Pn.sm,"0 1px 3px rgba(0,0,0,0.12)"),c(Pn.md,"0 4px 12px rgba(0,0,0,0.14)"),c(Pn.lg,"0 8px 24px rgba(0,0,0,0.18)")],Hle=[c(x.background,"#000000"),c(x.surface,"#0a0a0a"),c(x.surfaceSubtle,"#111111"),c(x.surfaceElevated,"#1a1a1a"),c(x.brand,"#ffdd00"),c(x.brandSubtle,"#332b00"),c(x.success,"#00ff00"),c(x.warning,"#ffaa00"),c(x.error,"#ff4444"),c(x.info,"#44aaff"),c(x.textPrimary,"#ffffff"),c(x.textSecondary,"#cccccc"),c(x.textDisabled,"#555555"),c(x.textOnBrand,"#000000"),c(x.border,"#ffffff"),c(x.borderSubtle,"#888888"),c(O.xs,"4px"),c(O.sm,"8px"),c(O.md,"16px"),c(O.lg,"24px"),c(O.xl,"32px"),c(O.xxl,"48px"),c($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),c($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),c($.sizeXs,"11px"),c($.sizeSm,"12px"),c($.sizeMd,"14px"),c($.sizeLg,"16px"),c($.sizeXl,"20px"),c($.sizeXxl,"24px"),c($.weightNormal,"400"),c($.weightMedium,"500"),c($.weightBold,"600"),c($.lineHeightTight,"1.25"),c($.lineHeightNormal,"1.5"),c($.lineHeightRelaxed,"1.75"),c(Z.sm,"4px"),c(Z.md,"6px"),c(Z.lg,"12px"),c(Z.full,"9999px"),c(Pn.sm,"0 1px 3px rgba(255,255,255,0.1)"),c(Pn.md,"0 4px 12px rgba(255,255,255,0.15)"),c(Pn.lg,"0 8px 24px rgba(255,255,255,0.2)")];function Om(e,t){let r=t!==void 0?[c(x.brand,t.primaryColor)]:[];return w(e.concat(r))}function Wle(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=Om(Vle,t.brand);break;case"Light":n=Om(Gle,t.brand);break;case"Neutral":n=Om(Kle,t.brand);break;case"HighContrast":n=Om(Hle,t.brand);break}return y("div",{children:e.children,className:n})}let Jle=Wle;function Qle(e){}let Yle={preset:"Light",setPreset:Qle},O8=or(Yle),Xle=O8.Provider;function Zle(){return Et(O8)}let M8="reventless-ui:theme",eue=["Light","Dark","Neutral","HighContrast"];function tue(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Light":return"Light";case"Neutral":return"Neutral";default:return}}function L8(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function Bx(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function rue(e){let t=localStorage.getItem(M8);return t==null?e:L8(t)}function nue(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=de(()=>rue(r)),i=n[1],o=n[0],a=qr(l=>{localStorage.setItem(M8,Bx(l)),i(u=>l)},[]),s=Tt(()=>({preset:o,setPreset:a}),[o,a]);return y(Xle,{value:s,children:y(Jle,{theme:{preset:o,brand:e.brand},children:e.children})})}let iue={make:nue};function z8(e){return e.startsWith("/")?!e.startsWith("//"):!1}function oue(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):z8(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 aue(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):z8(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function sue(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function lue(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+sue(r)}function uue(e){return e===4401?!0:e===4403}function Mg(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,re(e.onReconnect,a=>a(o))}break}n===1&&r==="Open"&&(e.disconnectedSince=Date.now()),re(e.onStateChange,i=>i(t))}function cue(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 due='{"type":"connection_init"}';function jx(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{jt(r).send(o);return}catch{return}}function fue(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{jt(r).send(n);return}catch{return}}function hue(e){e.subscriptions.forEach(t=>jx(e,t))}function pue(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=k(r,he.object);if(n===void 0)return;let i=k(n.type,he.string);if(i!==void 0)switch(i){case"connection_ack":Mg(e,"Open"),e.reconnectAttempts=0;let o=e.pendingPostAck;return e.pendingPostAck=[],o.forEach(h=>h()),hue(e);case"data":let a=k(n.id,he.string),s=D(n.event,null),l=h=>{let p=he.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},u=he.array(s),d=u!==void 0?u.map(l):[l(s)],f=k(a,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function U8(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([lue(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Jt(i),Mg(e,"Connecting"),i.onopen=()=>{try{i.send(due);return}catch{return}},i.onmessage=o=>pue(e,o.data),i.onclose=o=>{if(e.ws=void 0,uue(o.code))return Mg(e,"Unauthorized"),re(e.onAuthFailure,s=>{try{return s()}catch{return}});if(Mg(e,"Closed"),e.disposed)return;let a=e.reconnectAttempts+1|0;e.reconnectAttempts=a,e.reconnectTimer=setTimeout(()=>U8(e),cue(a))},i.onerror=o=>{}}function mue(e,t,r,n,i,o){let a={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,onAuthFailure:o};return U8(a),a}function gue(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};return e.subscriptions.set(n,i),e.state==="Open"?jx(e,i):e.pendingPostAck.push(()=>jx(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),fue(e,n)}}function Z$(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{jt(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function vue(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(a=>JSON.stringify(a))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let a=await fetch(e,{method:"POST",headers:o,body:i});return a.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+a.status.toString()}}catch(a){let s=ws(a);return s.RE_EXN_ID===av?{TAG:"Error",_0:D(s._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function eN(){return ne(ro(globalThis.document),!1,e=>e.hidden)}function bue(e){let t=ro(globalThis.document);if(t===void 0)return()=>{};let r=jt(t);return r.addEventListener("visibilitychange",e),()=>{r.removeEventListener("visibilitychange",e)}}let B8=["Platform_"];function tN(e,t){let r=t.toLowerCase();return e.some(n=>r.startsWith(n.toLowerCase()))?"Platform":"Domain"}let j8=or(void 0);function Bp(){return Et(j8)}function rN(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[],torndown:!1}}let _ue=j8.Provider;function yue(e){let t=e.getToken,r=e.platformReadModelPrefixes,n=e.onAuthFailure,i=e.clientEventsNamespace,o=e.liveReconnectRefetch,a=e.liveUpdates,s=e.platformEventsEndpoint,l=e.domainEventsEndpoint,u=o!==void 0?o:!0,d=r!==void 0?r:B8,f=Pe(t);De(()=>{f.current=t},[t]);let h=()=>f.current(),p=Pe(rN()),m=Pe(rN()),g=Pe(eN()),v=de(()=>"Closed"),b=v[1],_=v[0],S=de(()=>"Closed"),E=S[1],C=S[0],A=H=>H==="Domain"?p:m,T=H=>H==="Domain"?l:s,R=H=>{let ae=A(H).current;if(!u)return;ae.reconnectListeners.slice().forEach(ue=>{try{return ue()}catch{return}})},N=H=>{let ae=A(H).current,te=ae.client;if(te!==void 0)return te;let ue=T(H);if(ue===void 0)return;let Se=oue(ue),pe=aue(ue),be=mue(Se,pe,h,Ie=>H==="Domain"?b($t=>Ie):E($t=>Ie),Ie=>{if(Ie>=2e3)return R(H)},n);return ae.client=be,be},I=H=>{let ae=A(H).current,te=ae.idleTimer;if(te!==void 0){clearTimeout(te),ae.idleTimer=void 0;return}},M=(H,ae,te)=>{if(!vr(te.underlyingUnsub))return;let ue=N(H);if(ue===void 0)return;let Se=gue(ue,ae,pe=>{te.callbacks.forEach(be=>be(pe))});te.underlyingUnsub=Se},P=(H,ae,te)=>{let ue=A(H).current;if(!a||vr(T(H)))return()=>{};I(H),ue.refcount=ue.refcount+1|0;let Se=ue.registry.get(ae),pe;if(Se!==void 0){let be=Se.drainTimer;be!==void 0&&(clearTimeout(be),Se.drainTimer=void 0),pe=Se}else{let be={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};ue.registry.set(ae,be),pe=be}return pe.callbacks.push(te),pe.refcount=pe.refcount+1|0,pe.refcount===1&&!g.current&&M(H,ae,pe),()=>{if(pe.callbacks=pe.callbacks.filter(be=>be!==te),pe.refcount=pe.refcount-1|0,ue.torndown?(pe.underlyingUnsub=void 0,ue.registry.delete(ae)):pe.refcount===0&&(pe.drainTimer=setTimeout(()=>{let be=pe.underlyingUnsub;be!==void 0&&be(),pe.underlyingUnsub=void 0,pe.drainTimer=void 0,ue.registry.delete(ae)},5e3)),ue.refcount=ue.refcount-1|0,ue.refcount===0&&!ue.torndown){let be=A(H).current,Ie=be.idleTimer;Ie!==void 0&&clearTimeout(Ie),be.idleTimer=setTimeout(()=>{let $t=be.client;$t!==void 0&&(Z$($t),be.client=void 0),be.idleTimer=void 0},3e4);return}}},U=H=>a?ke(T(tN(d,H))):!1,j=()=>{["Domain","Platform"].forEach(H=>{A(H).current.registry.forEach(te=>{let ue=te.underlyingUnsub;if(ue!==void 0){ue(),te.underlyingUnsub=void 0;return}})})},V=()=>{["Domain","Platform"].forEach(H=>{let ae=A(H).current,te={contents:!1};if(ae.registry.forEach((ue,Se)=>{if(ue.refcount>0&&vr(ue.underlyingUnsub))if(M(H,Se,ue),ke(ue.underlyingUnsub)){te.contents=!0;return}else return}),te.contents)return R(H)})};De(()=>bue(()=>{let ae=eN();if(ae!==g.current)return g.current=ae,ae?j():V()}),[]),De(()=>(()=>{["Domain","Platform"].forEach(H=>{let ae=A(H).current,te=ae.idleTimer;te!==void 0&&clearTimeout(te),ae.idleTimer=void 0,ae.registry.forEach(Se=>{let pe=Se.drainTimer;if(pe!==void 0){clearTimeout(pe),Se.drainTimer=void 0;return}});let ue=ae.client;ue!==void 0&&Z$(ue),ae.client=void 0,ae.torndown=!0})}),[]);let Y=H=>H==="Domain"?_:C,J=(H,ae)=>{let te=A(H).current;return te.reconnectListeners.push(ae),()=>{te.reconnectListeners=te.reconnectListeners.filter(ue=>ue!==ae)}},X=()=>a&&ke(i)?ke(l):!1,oe=async(H,ae,te)=>{let ue=T(H);return ue!==void 0?await vue(ue,f.current(),ae,te):{TAG:"Error",_0:"no events endpoint configured"}},ge=Tt(()=>({subscribe:P,isLive:U,apiForReadModel:H=>tN(d,H),statusFor:Y,registerReconnect:J,publish:oe,clientChannelsAvailable:X,clientNamespace:()=>i,liveUpdatesEnabled:()=>a}),[a,l,s,_,C,i,d]);return _r(_ue,{value:ge,children:e.children})}let xue={make:yue};function q8(e,t){if(e.length===0)return"Unknown";let r=t.filter(n=>e.includes(n));return r.length!==0?{TAG:"Elevated",_0:r}:"Scoped"}function V8(e,t){let r=G(e);if(r===void 0)return e;let n=k(F(r,"properties"),G);if(n===void 0)return e;let i=k(F(n,t),G);if(i===void 0)return e;let o=Oe($e(i));o["x-reventless-ui-hidden"]=!0;let a=Oe($e(n));a[t]=o;let s=Oe($e(r));return s.properties=a,s}function Sue(e,t,r){let n=G(e);if(n===void 0)return e;let i={};i.field=t,i.as=r.map(a=>a);let o=Oe($e(n));return o["x-reventless-owner-unscoped"]=i,o}function wue(e,t,r){if(typeof e!="object"){if(e==="Unknown"||t==="")return r;let n=o=>o.map(a=>{if(a.ownerField===void 0)return a;let l={...a};return l.ownerValue=t,l}),i=(o,a)=>a!==void 0?V8(o,a):o;return r.map(o=>{let a={...o};return a.internalQueryables=q(o.internalQueryables,s=>s.map(l=>{let u={...l};return u.schema=i(l.schema,l.ownerField),u})),a.stateChangeSlices=o.stateChangeSlices.map(s=>{let l={...s};return l.commands=n(s.commands),l}),a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.aggregates=o.aggregates.map(s=>{let l={...s};return l.commands=n(s.commands),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.commands=n(s.commands),l.schema=i(s.schema,s.ownerField),l}),a})}else{let n=e._0,i=(o,a)=>a!==void 0?Sue(o,a,n):o;return r.map(o=>{let a={...o};return a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a})}}function Eue(e,t){return re(k(k(G(t),r=>F(r,"properties")),G),r=>{pp(r).forEach(n=>re(k(k(G(n),i=>F(i,"x-reventless-semantic-target")),G),i=>{let o=F(i,"store"),a=F(i,"plugin");if(o!==void 0&&a===void 0){i.plugin=e;return}}))}),t}function kue(e){let t=yp(e);return t!==void 0&&t[1].values===void 0?V8(e,t[0]):e}function qx(e,t){let r=ie(t);return kue(Eue(e,r!==void 0?JSON.parse(r):t))}function nN(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function iN(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function Cue(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function oN(e){if(Re(k(F(e,"type"),ie),"object"))return k(F(e,"x-reventless-graphql-input"),ie)}function Rue(e){return k(F(e,"x-reventless-graphql-type"),ie)}function Aue(e,t){let r=D(k(F(t,"type"),ie),"string");if(r==="array"){let i=k(F(t,"items"),G),o=k(i,oN);return"["+(o!==void 0?o:D(q(k(k(i,s=>F(s,"type")),ie),s=>s==="string"&&(Cue(e)||iN(e))?"ID":nN(s)),"String"))+"!]"}let n=oN(t);return n!==void 0?n:iN(e)&&r==="string"?"ID":nN(r)}function G8(e){return q(k(k(G(e),t=>F(t,"required")),_t),t=>Q(t,ie))}function Tue(e,t,r){let n=G8(t),i=D(q(k(k(G(t),d=>F(d,"properties")),G),d=>Object.keys(d).filter(f=>f!=="TAG").map(f=>{let h=k(F(d,f),G),p=k(h,Rue),m;if(p!==void 0)m=p;else{let g=ne(h,"String",v=>Aue(f,v));m=n!==void 0?n.includes(f)?g+"!":g:g+"!"}return[f,m]})),[]),a=(r!==void 0?[]:[["id","ID!"]]).concat(i),s="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(a.length===0)return"mutation { "+e+" { "+s+" } }";let l=a.map(d=>"$"+d[0]+": "+d[1]).join(", "),u=a.map(d=>{let f=d[0];return f+": $"+f}).join(", ");return"mutation "+e+"("+l+") { "+e+"("+u+") { "+s+" } }"}function $ue(e){let t=e.split(".");return D(t[t.length-1|0],e)}function Nue(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Due(e){return Q(D(_t(e),[]),t=>q(G(t),r=>{let n=i=>D(k(F(r,i),ie),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:k(F(r,"plugin"),ie)}}))}function Vx(e){return Ma(k(F(e,"apiExposed"),dv),!1)}function Gx(e,t,r){return Q(D(_t(r),[]),n=>q(k(G(n),i=>{if(t(i))return i}),i=>{let o=v=>D(k(F(i,v),ie),""),a=o("name"),l=o("level")==="Instance"?"Instance":"Collection",u=D(q(F(i,"schema"),v=>qx(e,v)),null),d=o("mutationField"),f=k(F(i,"aggregateIdField"),ie),h=D(q(F(i,"references"),Due),[]),p=q(k(F(i,"allowedStates"),_t),v=>Q(v,ie)),m=k(F(i,"targetState"),ie),g=k(q(k(F(i,"requiredAccess"),_t),v=>Q(v,ie)),v=>{if(v.length!==0)return v});return{name:a,label:Nue($ue(a)),schema:u,mutationDocument:d===""?"":Tue(d,u,f),requiredRole:void 0,level:l,aggregateIdField:f,refFields:[],references:h,allowedStates:p,targetState:m,requiredAccess:g,ownerField:k(F(i,"ownerField"),ie)}}))}function aN(e,t){return Gx(e,r=>!Vx(r),t)}function Kx(e){return Q(D(_t(e),[]),t=>q(G(t),r=>{let n=g=>D(k(F(r,g),ie),""),i=g=>D(k(F(r,g),_t),[]),o=(g,v)=>Q(D(k(F(g,v),_t),[]),ie),a=n("pluginId"),s=g=>k(q(k(F(g,"requiredAccess"),_t),v=>Q(v,ie)),v=>{if(v.length!==0)return v}),l=Q(i("readModels"),g=>q(G(g),v=>{let b=_=>D(k(F(v,_),ie),"");return{name:b("name"),schema:D(q(F(v,"schema"),_=>qx(a,_)),null),queryDocument:"",queryField:b("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(v,"linkedWriteSide"),labelField:b("labelField"),labelFieldSource:k(F(v,"labelFieldSource"),ie),searchableFields:o(v,"searchableFields"),lifecycleField:k(F(v,"lifecycleField"),ie),requiredAccess:s(v),ownerField:k(F(v,"ownerField"),ie)}})),u=Q(i("aggregates"),g=>q(G(g),v=>({name:(_=>D(k(F(v,_),ie),""))("name"),schema:null,commands:Gx(a,Vx,D(F(v,"commands"),[])),systemCommands:aN(a,D(F(v,"commands"),[])),linkedViews:o(v,"linkedViews")}))),d=g=>Q(i(g),v=>q(G(v),b=>{let _=S=>D(k(F(b,S),ie),"");return{name:_("name"),schema:D(q(F(b,"schema"),S=>qx(a,S)),null),queryField:_("queryField"),sortIndex:0,linkedWriteSide:o(b,"linkedWriteSide"),labelField:_("labelField"),labelFieldSource:k(F(b,"labelFieldSource"),ie),searchableFields:o(b,"searchableFields"),lifecycleField:k(F(b,"lifecycleField"),ie),requiredAccess:s(b),ownerField:k(F(b,"ownerField"),ie)}})),f=d("stateViewSlices"),h=d("internalQueryables"),p=Q(i("stateChangeSlices"),g=>q(G(g),v=>({name:(_=>D(k(F(v,_),ie),""))("name"),commands:Gx(a,Vx,D(F(v,"commands"),[])),systemCommands:aN(a,D(F(v,"commands"),[])),linkedViews:o(v,"linkedViews"),consistencyRead:k(F(v,"consistencyRead"),ie)}))),m=q(k(F(r,"derivedPages"),_t),g=>Q(g,ie));return{id:a,name:a,readModels:l,aggregates:u,stateViewSlices:f,stateChangeSlices:p,internalQueryables:h,derivedPages:m}}))}function Fue(e){return D(q(k(k(k(he.object(e),t=>t.data),he.object),t=>t.Platform_ComponentDefinitions),Kx),[])}function Iue(e){if(he.array(e)!==void 0)return{TAG:"Ok",_0:Kx(e)};let r=gi(k(k(k(he.object(e),n=>n.data),he.object),n=>n.Platform_ComponentDefinitions),n=>ke(he.array(n)));return r!==void 0?{TAG:"Ok",_0:Kx(r)}:{TAG:"Error",_0:"expected a JSON array of component-definition entries (or a `{data:{Platform_ComponentDefinitions:[…]}}` envelope)"}}let Pue=`{
|
|
42
|
+
Platform_ComponentDefinitions {
|
|
43
|
+
pluginId
|
|
44
|
+
readModels { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
45
|
+
aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews }
|
|
46
|
+
stateViewSlices { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
47
|
+
internalQueryables { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
48
|
+
stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews consistencyRead }
|
|
49
|
+
}
|
|
50
|
+
}`;function Oue(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 Mue="/ui-hints.json",Lue="Reventless";function zue(e){let t=e.appName,r=e.platformName;return t!==void 0&&t.trim()!==""?t.trim():r!==void 0&&r.trim()!==""?ct(r):Lue}function Uue(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function Bue(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function jue(e){let t=he.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=s=>k(t[s],he.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=D(r("platformApiEndpoint"),n),o=s=>k(t[s],he.bool),a=s=>D(q(k(t[s],he.object),l=>Object.fromEntries(Q(Object.entries(l),u=>{let d=u[0];return q(he.string(u[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),Oue(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),clientEventsNamespace:r("clientEventsNamespace"),liveUpdates:D(o("liveUpdates"),!0),liveReconnectRefetch:D(o("liveReconnectRefetch"),!0),platformReadModelPrefixes:D(q(k(t.platformReadModelPrefixes,he.array),s=>Q(s,he.string)),B8),region:r("region"),authMode:D(q(r("authMode"),Bue),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:D(o("autoRedirectFirstPage"),!1),home:r("home"),mode:D(q(r("mode"),Uue),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:Q(D(k(t.accessTiers,he.array),[]),he.string),viewModes:Q(D(k(t.viewModes,he.array),[]),he.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),assetOrigins:a("assetOrigins"),uiHintsUrl:D(r("uiHintsUrl"),Mue),manifestUrl:r("manifestUrl"),journeyManifestUrls:ne(k(t.journeyManifestUrls,he.object),{},s=>{let l={};return eV(s,(u,d)=>re(he.string(u),f=>{l[d]=f})),l}),deniedSurfaces:D(q(r("deniedSurfaces"),zle),"Lock"),appName:r("appName"),logoUrl:r("logoUrl"),theme:k(r("theme"),s=>{let l=tue(s);if(l!==void 0)return l;console.warn('[Shell] config.json: unknown theme "'+s+'" — expected '+eue.join(", ")+". Opening on the default instead.")}),elevatedGroups:Q(D(k(t.elevatedGroups,he.array),[]),he.string)}}}function que(e){return Ft(fetch(e).then(t=>t.ok?t.json().then(Cle):(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 K8(e){return Ft(fetch(e).then(t=>t.ok?Ft(t.json().then(r=>{let n=Iue(r);return n.TAG==="Ok"?n:{TAG:"Error",_0:e+": "+n._0}}),r=>Promise.resolve({TAG:"Error",_0:e+": not valid JSON — "+String(r)})):Promise.resolve({TAG:"Error",_0:e+": fetch failed with status "+t.status.toString()})),t=>Promise.resolve({TAG:"Error",_0:e+": fetch threw — "+String(t)}))}function Vue(){return Ft(fetch("/config.json").then(e=>e.ok?e.json().then(jue):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 Gue(e){let t=he.string(e);return t!==void 0?t:q(he.float(e),r=>r.toString())}function Kue(e){return q(he.object(e),t=>({message:D(k(t.message,he.string),""),path:Q(D(k(t.path,he.array),[]),Gue),code:k(k(k(t.extensions,he.object),r=>r.code),he.string),errorType:k(t.errorType,he.string)}))}function IE(e){let t=he.object(e);return{data:D(k(t,r=>r.data),null),errors:Q(D(k(k(t,r=>r.errors),he.array),[]),Kue)}}function Hue(e,t){return e.errors.find(r=>Re(r.path[0],t))}function H8(e,t){let r=k(he.object(e.data),n=>n[t]);if(!(r!==void 0&&We(r)!=="JSONNull"))return Hue(e,t)}function W8(e){return e.errors.some(t=>Re(t.code,"UNAUTHORIZED"))}function Wue(e){return e.errors.some(t=>Re(t.code,"FORBIDDEN")?!0:Re(t.errorType,"Unauthorized"))}function Jue(e){return t=>((r,n)=>{let i={contents:void 0};return e((a,s)=>t(a,s).then(l=>(i.contents=l,l.data)))(r,n).then(a=>{let s=i.contents;return s!==void 0?s:{data:a,errors:[]}})})}function Que(e,t,r,n){return(i,o)=>{let a=i.includes("Platform")||i.includes("platform")?t:e,s=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(s.Authorization="Bearer "+l),fetch(a,{method:"POST",headers:s,body:D(JSON.stringify({query:i,variables:o}),"")}).then(u=>(u.status===401&&n(),u.json())).then(u=>{let d=IE(u);return W8(d)&&n(),Promise.resolve(d)})}}let Yue=_8;class Gf extends Error{}Gf.prototype.name="InvalidTokenError";function Xue(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 Zue(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 Xue(t)}catch{return atob(t)}}function ece(e,t){if(typeof e!="string")throw new Gf("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 Gf(`Invalid token specified: missing part #${r+1}`);let i;try{i=Zue(n)}catch(o){throw new Gf(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new Gf(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let tce=(function(e){return e&&e.name?String(e.name):"UnknownError"}),rce=(function(e){return e&&e.message?String(e.message):""});function Xv(e){return{name:tce(e),message:rce(e)}}function Zv(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 nce=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),ice=e=>({httpHandler:e.httpHandler()});var Xh;(function(e){e.HTTP="http",e.HTTPS="https"})(Xh||(Xh={}));var Zh;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(Zh||(Zh={}));const Hx="__smithy_context";class oo{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 oo({...t,headers:{...t.headers}});return r.query&&(r.query=oce(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 oo.clone(this)}}function oce(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class kd{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 ace=e=>t=>async r=>{if(!oo.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)},sce={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},lce=e=>({applyToStack:t=>{t.add(ace(e),sce)}}),uce=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=s,d=l??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return a?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l}=s,u=l??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:o,input:u(r.input),error:n,metadata:n.$metadata}),n}},cce={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},dce=e=>({applyToStack:t=>{t.add(uce(),cce)}}),fce={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},hce=()=>e=>async t=>e(t),pce=e=>({applyToStack:t=>{t.add(hce(),fce)}}),rf=e=>e[Hx]||(e[Hx]={}),xs=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},mce=(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 gce(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const vce=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),a=e.authSchemePreference?await e.authSchemePreference():[],s=mce(o,a),l=gce(e.httpAuthSchemes),u=rf(n),d=[];for(const f of s){const h=l.get(f.schemeId);if(!h){d.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const p=h.identityProvider(await t.identityProviderConfigProvider(e));if(!p){d.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},m),f.signingProperties=Object.assign(f.signingProperties||{},g),u.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(d.join(`
|
|
51
|
+
`));return r(i)},bce={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},_ce=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(vce(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),bce)}}),yce=e=>t=>{throw t},xce=(e,t)=>{},Sce=e=>(t,r)=>async n=>{if(!oo.isInstance(n.request))return t(n);const o=rf(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:s,signer:l}=o,u=await t({...n,request:await l.sign(n.request,s,a)}).catch((l.errorHandler||yce)(a));return(l.successHandler||xce)(u.response,a),u},wce={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Ece=e=>({applyToStack:t=>{t.addRelativeTo(Sce(),wce)}}),sh=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},J8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sN=Object.entries(J8).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),kce=J8.split(""),ad=6,lh=8,Cce=63,eb=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let i=0;i<e.length;i+=4){let o=0,a=0;for(let u=i,d=i+3;u<=d;u++)if(e[u]!=="="){if(!(e[u]in sN))throw new TypeError(`Invalid character ${e[u]} in base64 string.`);o|=sN[e[u]]<<(d-u)*ad,a+=ad}else o>>=ad;const s=i/4*3;o>>=a%lh;const l=Math.floor(a/lh);for(let u=0;u<l;u++){const d=(l-u-1)*lh;n.setUint8(s+u,(o&255<<d)>>d)}}return new Uint8Array(r)},Cd=e=>new TextEncoder().encode(e),ep=e=>typeof e=="string"?Cd(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),PE=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 O0(e){let t;typeof e=="string"?t=Cd(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let o=0;o<t.length;o+=3){let a=0,s=0;for(let u=o,d=Math.min(o+3,t.length);u<d;u++)a|=t[u]<<(d-u-1)*lh,s+=lh;const l=Math.ceil(s/ad);a<<=l*ad-s;for(let u=1;u<=l;u++){const d=(l-u)*ad;i+=kce[(a&Cce<<d)>>d]}i+="==".slice(0,4-l)}return i}class xu extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?xu.mutate(eb(t)):xu.mutate(Cd(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,xu.prototype),t}transformToString(t="utf-8"){return t==="base64"?O0(this):PE(this)}}const Su=e=>encodeURIComponent(e).replace(/[!'()*]/g,Rce),Rce=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Ace(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=Su(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${Su(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${Su(n)}`),t.push(i)}}return t.join("&")}function lN(e,t){return new Request(e,t)}function Tce(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 H_={supported:void 0};class OE{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new OE(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),H_.supported===void 0&&(H_.supported=typeof Request<"u"&&"keepalive"in lN("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(r?.aborted){const _=uN(r);return Promise.reject(_)}let s=t.path;const l=Ace(t.query||{});l&&(s+=`?${l}`),t.fragment&&(s+=`#${t.fragment}`);let u="";if(t.username!=null||t.password!=null){const _=t.username??"",S=t.password??"";u=`${_}:${S}@`}const{port:d,method:f}=t,h=`${t.protocol}//${u}${t.hostname}${d?`:${d}`:""}${s}`,p=f==="GET"||f==="HEAD"?void 0:t.body,m={body:p,headers:new Headers(t.headers),method:f,credentials:a};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),typeof AbortController<"u"&&(m.signal=r),H_.supported&&(m.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(m,this.config.requestInit(t));let g=()=>{};const v=lN(h,m),b=[fetch(v).then(_=>{const S=_.headers,E={};for(const A of S.entries())E[A[0]]=A[1];return _.body!=null?{response:new kd({headers:E,reason:_.statusText,statusCode:_.status,body:_.body})}:_.blob().then(A=>({response:new kd({headers:E,reason:_.statusText,statusCode:_.status,body:A})}))}),Tce(i)];return r&&b.push(new Promise((_,S)=>{const E=()=>{const C=uN(r);S(C)};if(typeof r.addEventListener=="function"){const C=r;C.addEventListener("abort",E,{once:!0}),g=()=>C.removeEventListener("abort",E)}else r.onabort=E})),Promise.race(b).finally(g)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function uN(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 $ce=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):Nce(e):Dce(e);async function Nce(e){const t=await Fce(e),r=eb(t);return new Uint8Array(r)}async function Dce(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:s,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=s}const o=new Uint8Array(i);let a=0;for(const s of t)o.set(s,a),a+=s.length;return o}function Fce(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const Q8={},Wx={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),Q8[e]=t,Wx[t]=e}function Ice(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 Wx)t[r/2]=Wx[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function wu(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Q8[e[r]];return t}const Jx=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return xu.mutate(e);if(!e)return xu.mutate(new Uint8Array);const r=t.streamCollector(e);return xu.mutate(await r)},Lg=e=>typeof e=="function"?e():e,Y8=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),Pce=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=rf(r),[,a,s,l,u,d]=o??[];try{const f=await e.protocol.deserializeResponse(Y8(a,s,l,u,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
|
|
52
|
+
`+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(kd.isInstance(i)){const{headers:p={}}=i,m=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:W_(/^x-[\w-]+-request-?id$/,m),extendedRequestId:W_(/^x-[\w-]+-id-2$/,m),cfId:W_(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw f}},W_=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function Oce(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 Rd=e=>{if(typeof e=="string")return Rd(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let a;return o&&(a=Oce(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:a}},Mce=e=>{if(typeof e=="object"){if("url"in e){const t=Rd(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 Rd(e)},Lce=e=>(t,r)=>async n=>{const{operationSchema:i}=rf(r),[,o,a,s,l,u]=i??[],d=r.endpointV2?async()=>Mce(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(Y8(o,a,s,l,u),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},zce={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Uce={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Bce(e){return{applyToStack:t=>{t.add(Lce(e),Uce),t.add(Pce(e),zce),e.protocol.setSerdeContext(e)}}}const J_=[];function Kf(e){if(typeof e=="object")return e;if(e=e|0,J_[e])return J_[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 J_[e]=t}const kf={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},Q_=[],Y_={};class Dn{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=Dn.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;X_(i);)n.push(i[1]),i=i[0],o=Lg(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){const s=n[a];Object.assign(this.memberTraits,Kf(s))}}else this.memberTraits=0;if(o instanceof Dn){const a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=Lg(o),jce(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(Q_[t])return Q_[t]}else if(typeof t=="string"){if(Y_[t])return Y_[t]}else if(r&&t[kf.ns])return t[kf.ns];const n=Lg(t);if(n instanceof Dn)return n;if(X_(n)){const[o,a]=n;if(o instanceof Dn)return Object.assign(o.getMergedTraits(),Kf(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new Dn(n);return r?t[kf.ns]=i:typeof n=="string"?Y_[n]=i:typeof n=="number"?Q_[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 Kf(this.memberTraits)}getOwnTraits(){return Kf(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 Cf([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 Cf([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 Cf(X_(i)?i:[i,0],t)}if(this.isDocumentSchema())return Cf([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[kf.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],a=Cf([t[5][i],0],o);yield n[i]=[o,a]}t[kf.it]=n}}function Cf(e,t){if(e instanceof Dn)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=Dn;return new r(e,t)}const X_=e=>Array.isArray(e)&&e.length===2,jce=e=>Array.isArray(e)&&e.length>=5;class Gi{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 Gi.registries.has(t)||Gi.registries.set(t,new Gi(t)),Gi.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,Gi.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,Gi.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):Gi.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 Qx=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Yce.warn(Qce(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},qce=Math.ceil(2**127*(2-2**-23)),cN=e=>{const t=Qx(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>qce)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Vce=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},dN=e=>X8(e,16),fN=e=>X8(e,8),X8=(e,t)=>{const r=Vce(e);if(r!==void 0&&Gce(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Gce=(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]}},Kce=e=>Qx(typeof e=="string"?tb(e):e),Hce=e=>cN(typeof e=="string"?tb(e):e),Wce=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,tb=e=>{const t=e.match(Wce);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},M0=e=>dN(typeof e=="string"?tb(e):e),Jce=e=>fN(typeof e=="string"?tb(e):e),Qce=e=>String(new TypeError(e).stack||e).split(`
|
|
53
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
54
|
+
`),Yce={warn:console.warn},Xce=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ME=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Zce(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,f=s<10?`0${s}`:`${s}`;return`${Xce[n]}, ${l} ${ME[r]} ${t} ${u}:${d}:${f} GMT`}const ede=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),tde=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=ede.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,a,s,l,u,d]=t,f=M0(tp(n)),h=kl(i,"month",1,12),p=kl(o,"day",1,31),m=zg(f,h,p,{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&m.setTime(m.getTime()-hde(d)),m},rde=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$/),nde=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$/),ide=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})$/),Z8=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=rde.exec(e);if(t){const[r,n,i,o,a,s,l,u]=t;return zg(M0(tp(o)),Z_(i),kl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u})}if(t=nde.exec(e),t){const[r,n,i,o,a,s,l,u]=t;return lde(zg(ade(o),Z_(i),kl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:u}))}if(t=ide.exec(e),t){const[r,n,i,o,a,s,l,u]=t;return zg(M0(tp(u)),Z_(n),kl(i.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},ode=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=Kce(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))},zg=(e,t,r,n)=>{const i=t-1;return cde(e,i,r),new Date(Date.UTC(e,i,r,kl(n.hours,"hour",0,23),kl(n.minutes,"minute",0,59),kl(n.seconds,"seconds",0,60),fde(n.fractionalMilliseconds)))},ade=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+M0(tp(e));return r<t?r+100:r},sde=50*365*24*60*60*1e3,lde=e=>e.getTime()-new Date().getTime()>sde?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Z_=e=>{const t=ME.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},ude=[31,28,31,30,31,30,31,31,30,31,30,31],cde=(e,t,r)=>{let n=ude[t];if(t===1&&dde(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${ME[t]} in ${e}: ${r}`)},dde=e=>e%4===0&&(e%100!==0||e%400===0),kl=(e,t,r,n)=>{const i=Jce(tp(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},fde=e=>e==null?0:Hce("0."+e)*1e3,hde=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},tp=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},hN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Zn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),e5=()=>{if(hN)return hN();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Zn[e[0]]+Zn[e[1]]+Zn[e[2]]+Zn[e[3]]+"-"+Zn[e[4]]+Zn[e[5]]+"-"+Zn[e[6]]+Zn[e[7]]+"-"+Zn[e[8]]+Zn[e[9]]+"-"+Zn[e[10]]+Zn[e[11]]+Zn[e[12]]+Zn[e[13]]+Zn[e[14]]+Zn[e[15]]},bl=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};bl.from=e=>e&&typeof e=="object"&&(e instanceof bl||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?bl(String(e)):bl(JSON.stringify(e));bl.fromObject=bl.from;const pN=/^-?\d*(\.\d+)?$/;class Da{string;type;constructor(t,r){if(this.string=t,this.type=r,!pN.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 Da.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&pN.test(r.string)}}class pde{serdeContext;setSerdeContext(t){this.serdeContext=t}}class mde extends pde{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=Gi.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return oo}getResponseType(){return kd}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=Dn.of(r.input),o=Kf(r.traits??{});if(o.endpoint){let a=o.endpoint?.[0];if(typeof a=="string"){for(const[s,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const u=n[s];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${s} in input must be a string as hostLabel.`);a=a.replace(`{${s}}`,u)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await jf(async()=>{const{EventStreamSerde:r}=await import("./index-DMFzPDvN.js");return{EventStreamSerde:r}},__vite__mapDeps([5]));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 gde extends mde{async serializeRequest(t,r,n){const i=this.serializer,o={},a={},s=await n.endpoint(),l=Dn.of(t?.input),u=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new oo({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:a,body:void 0});if(s&&(this.updateServiceEndpoint(h,s),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const m={};for(const[g,v]of l.structIterator())g!==p&&f[g]&&(i.write(v,f[g]),m[g]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:m})}}else i.write(u,f),d=i.flush()}return h.headers=Object.assign(h.headers,a),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=Dn.of(t.output),a={};if(n.statusCode>=300){const l=await Jx(n.body,r);throw l.byteLength>0&&Object.assign(a,await i.read(15,l)),await this.handleError(t,r,n,a,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const u=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=u}const s=o.getEventStreamMember();if(s)a[s]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:a});else{const l=await Jx(n.body,r);l.byteLength>0&&Object.assign(a,await i.read(o,l))}return a.$metadata=this.deserializeMetadata(n),a}}function t5(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 vde(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 bde{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 _de{async sign(t,r,n){return t}}const yde=e=>function(r){return r5(r)&&r.expiration.getTime()-Date.now()<e},xde=3e5,Sde=yde(xde),r5=e=>e.expiration!==void 0,wde=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,a,s=!1;const l=async u=>{o||(o=n(u));try{i=await o,a=!0,s=!1}finally{o=void 0}return i};return t===void 0?async u=>((!a||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!a||u?.forceRefresh)&&(i=await l(u)),s?i:r(i)?(t(i)&&await l(u),i):(s=!0,i))},Ede=void 0;function kde(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Cde(e){const t=sh(e.userAgentAppId??Ede),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!kde(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 LE{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 LE(t,r,n,i)}}class Rde{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let o=0;for(;;){const{value:a,done:s}=i.next();if(this.data.delete(a),s||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const o=String(t[i]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}class oa extends Error{constructor(t){super(t),this.name="EndpointError"}}const Ade="endpoints";function L0(e){return typeof e!="object"||e==null?e:"ref"in e?`$${L0(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(L0).join(", ")})`:JSON.stringify(e,null,2)}const zE={},Tde=(e,t)=>e===t;function $de(...e){for(const t of e)if(t!=null)return t}const Nde=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 oa(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new oa(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},n5=(e,t)=>Nde(t).reduce((r,n)=>{if(typeof r!="object")throw new oa(`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),Dde=e=>e!=null,Fde=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),rb=(e,t=!1)=>{if(!t)return Fde.test(e);const r=e.split(".");for(const n of r)if(!rb(n))return!1;return!0};function Ide(e,t,r){return e?t:r}const Pde=e=>!e,Ode=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}$"),i5=e=>Ode.test(e)||e.startsWith("[")&&e.endsWith("]"),ey={[Xh.HTTP]:80,[Xh.HTTPS]:443},Mde=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:m="",path:g="",query:v={}}=e,b=new URL(`${m}//${h}${p?`:${p}`:""}${g}`);return b.search=Object.entries(v).map(([_,S])=>`${_}=${S}`).join("&"),b}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:s}=t;if(s)return null;const l=a.slice(0,-1);if(!Object.values(Xh).includes(l))return null;const u=i5(i),d=r.includes(`${n}:${ey[l]}`)||typeof e=="string"&&e.includes(`${n}:${ey[l]}`),f=`${n}${d?`:${ey[l]}`:""}`;return{scheme:l,authority:f,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}};function Lde(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 zde=(e,t)=>e===t,Ude=(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),Bde=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),jde={booleanEquals:Tde,coalesce:$de,getAttr:n5,isSet:Dde,isValidHostLabel:rb,ite:Ide,not:Pde,parseURL:Mde,split:Lde,stringEquals:zde,substring:Ude,uriEncode:Bde},o5=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const a=e.indexOf("{",o);if(a===-1){r.push(e.slice(o));break}r.push(e.slice(o,a));const s=e.indexOf("}",a);if(s===-1){r.push(e.slice(a));break}e[a+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(a+1,s)),o=s+2);const l=e.substring(a+1,s);if(l.includes("#")){const[u,d]=l.split("#");r.push(n5(n[u]??i[u],d))}else r.push(n[l]??i[l]);o=s+1}return r.join("")},qde=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],nb=(e,t,r)=>{if(typeof e=="string")return o5(e,r);if(e.fn)return s5.callFunction(e,r);if(e.ref)return qde(e,r);throw new oa(`'${t}': ${String(e)} is not a string, function or reference.`)},a5=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let a=0;a<n.length;++a){const s=t[a];typeof s=="boolean"||typeof s=="number"?n[a]=s:n[a]=s5.evaluateExpression(s,"arg",r)}const i=e.indexOf(".");if(i!==-1){const s=zE[e.slice(0,i)]?.[e.slice(i+1)];if(typeof s=="function")return s(...n)}const o=jde[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},s5={evaluateExpression:nb,callFunction:a5},Vde=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new oa(`'${r}' is already defined in Reference Record.`);const n=a5(e,t);t.logger?.debug?.(`${Ade} evaluateCondition: ${L0(e)} = ${L0(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},Gde=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const a=nb(o,"Header value entry",t);if(typeof a!="string")throw new oa(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),l5=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=c5.getEndpointProperty(i,t),r),{}),u5=(e,t)=>{if(Array.isArray(e))return e.map(r=>u5(r,t));switch(typeof e){case"string":return o5(e,t);case"object":if(e===null)throw new oa(`Unexpected endpoint property: ${e}`);return c5.getEndpointProperties(e,t);case"boolean":return e;default:throw new oa(`Unexpected endpoint property type: ${typeof e}`)}},c5={getEndpointProperty:u5,getEndpointProperties:l5},Kde=(e,t)=>{const r=nb(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 oa(`Endpoint URL must be a string, got ${typeof r}`)},ty=1e8,Hde=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let a=n;const s={},l={referenceRecord:s,endpointParams:t.endpointParams,logger:t.logger};for(;a!==1&&a!==-1&&a<ty;){const u=3*(Math.abs(a)-1),[d,f,h]=[r[u],r[u+1],r[u+2]],[p,m,g]=o[d],v=Vde({fn:p,assign:g,argv:m},l);if(v.toAssign){const{name:b,value:_}=v.toAssign;s[b]=_}a=a>=0===v.result?f:h}if(a>=ty){const u=i[a-ty];if(u[0]===-1){const[,p]=u;throw new oa(nb(p,"Error",l))}const[d,f,h]=u;return{url:Kde(d,l),properties:l5(f,l),headers:Gde(h??{},l)}}throw new oa("No matching endpoint.")},d5=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!d5(r))return!1;return!0}return!(!rb(e)||e.length<3||e.length>63||e!==e.toLowerCase()||i5(e))},mN=":",Wde="/",Jde=e=>{const t=e.split(mN);if(t.length<6)return null;const[r,n,i,o,a,...s]=t;if(r!=="arn"||n===""||i===""||s.join(mN)==="")return null;const l=s.map(u=>u.split(Wde)).flat();return{partition:n,service:i,region:o,accountId:a,resourceId:l}},Qde=[{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)"}}}],Yde={partitions:Qde};let Xde=Yde;const Zde=e=>{const{partitions:t}=Xde;for(const n of t){const{regions:i,outputs:o}=n;for(const[a,s]of Object.entries(i))if(a===e)return{...o,...s}}for(const n of t){const{regionRegex:i,outputs:o}=n;if(new RegExp(i).test(e))return{...o}}const r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},f5={isVirtualHostableS3Bucket:d5,parseArn:Jde,partition:Zde};zE.aws=f5;function efe(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function rs(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 Il;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Il||(Il={}));const uh=3,tfe=Il.STANDARD,rfe=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],nfe=["TimeoutError","RequestTimeout","RequestTimeoutException"],ife=[500,502,503,504],ofe=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],afe=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],sfe=e=>e?.$retryable!==void 0,lfe=e=>e.$metadata?.clockSkewCorrected,ufe=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},h5=e=>e.$metadata?.httpStatusCode===429||rfe.includes(e.name)||e.$retryable?.throttling==!0,UE=(e,t=0)=>sfe(e)||lfe(e)||nfe.includes(e.name)||ofe.includes(e?.code||"")||afe.includes(e?.code||"")||ife.includes(e.$metadata?.httpStatusCode||0)||ufe(e)||dfe(e)||e.cause!==void 0&&t<=10&&UE(e.cause,t+1),cfe=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!UE(e)}return!1};function dfe(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class BE{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"||h5(n?.error??t)){const a=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=a,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(a),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){const r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>BE.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 p5=20*1e3,gN=500,ffe=1,hfe="amz-sdk-invocation-id",pfe="amz-sdk-request";var mfe={};class fi{static v2026=typeof process<"u"&&mfe?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return fi.v2026?50:100}static throttlingDelay(){return fi.v2026?1e3:500}static cost(){return fi.v2026?14:5}static throttlingCost(){return fi.v2026?5:10}static modifiedCostType(){return fi.v2026?"THROTTLING":"TRANSIENT"}}class gfe{x=fi.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,p5);return Math.floor(i)}setDelayBase(t){this.x=t}}class vN{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(p5,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class Yx{mode=Il.STANDARD;capacity=gN;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()=>uh,this.baseDelay??=fi.delay(),this.retryBackoffStrategy??=new gfe}async acquireInitialRetryToken(t){return new vN(fi.delay(),0,void 0,fi.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"?fi.throttlingDelay():this.baseDelay);const a=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let s=a;if(r.retryAfterHint instanceof Date&&(s=Math.max(a,Math.min(r.retryAfterHint.getTime()-Date.now(),a+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new vN(s,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:fi.v2026?s:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(gN,this.capacity+(t.getRetryCost()??ffe))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${uh}`),uh}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===fi.modifiedCostType()?fi.throttlingCost():fi.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class vfe{mode=Il.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new BE,this.standardRetryStrategy=r?new Yx({maxAttempts:typeof t=="number"?t:3,...r}):new Yx(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 bfe=/\d{12}\.ddb/;async function _fe(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&rs(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();if(typeof o.mode=="string")switch(o.mode){case Il.ADAPTIVE:rs(e,"RETRY_MODE_ADAPTIVE","F");break;case Il.STANDARD:rs(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(bfe)&&rs(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":rs(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":rs(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":rs(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&rs(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,s]of Object.entries(o.$source??{}))rs(e,a,s)}}const bN="user-agent",ry="x-amz-user-agent",_N=" ",ny="/",yfe=/[^!$%&'*+\-.^_`|~\w]/g,xfe=/[^!$%&'*+\-.^_`|~\w#]/g,yN="-",Sfe=1024;function wfe(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Sfe){t.length?t+=","+n:t+=n;continue}break}return t}const Efe=e=>(t,r)=>async n=>{const{request:i}=n;if(!oo.isInstance(i))return t(n);const{headers:o}=i,a=r?.userAgent?.map(Mm)||[],s=(await e.defaultUserAgentProvider()).map(Mm);await _fe(r,e,n);const l=r;s.push(`m/${wfe(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Mm)||[],d=await e.userAgentAppId();d&&s.push(Mm(["app",`${d}`]));const f=[].concat([...s,...a,...u]).join(_N),h=[...s.filter(p=>p.startsWith("aws-sdk-")),...u].join(_N);return e.runtime!=="browser"?(h&&(o[ry]=o[ry]?`${o[bN]} ${h}`:h),o[bN]=f):o[ry]=f,t({...n,request:i})},Mm=e=>{const t=e[0].split(ny).map(a=>a.replace(yfe,yN)).join(ny),r=e[1]?.replace(xfe,yN),n=t.indexOf(ny),i=t.substring(0,n);let o=t.substring(n+1);return i==="api"&&(o=o.toLowerCase()),[i,o,r].filter(a=>a&&a.length>0).reduce((a,s,l)=>{switch(l){case 0:return s;case 1:return`${a}/${s}`;default:return`${a}#${s}`}},"")},kfe={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Cfe=e=>({applyToStack:t=>{t.add(Efe(e),kfe)}}),Rfe=!1,Afe=!1,xN=new Set,Tfe=(e,t=rb)=>{if(!xN.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 xN.add(e)},m5=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),$fe=e=>m5(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Nfe=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=$fe(n);return Tfe(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return m5(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},SN="content-length";function Dfe(e){return t=>async r=>{const n=r.request;if(oo.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(a=>a.toLowerCase()).indexOf(SN)===-1)try{const a=e(i);n.headers={...n.headers,[SN]:String(a)}}catch{}}return t({...r,request:n})}}const Ffe={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Ife=e=>({applyToStack:t=>{t.add(Dfe(e.bodyLengthChecker),Ffe)}}),Pfe=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Ufe(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!zfe(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},Ofe=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Mfe=/(\d+\.){3}\d+/,Lfe=/\.\./,zfe=e=>Ofe.test(e)&&!Mfe.test(e)&&!Lfe.test(e),Ufe=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,a=!!(o&&r&&n&&i);if(o&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},Bfe=(e,t,r,n=!1)=>{const i=async()=>{let o;return n?o=r.clientContextParams?.[e]??r[e]??r[t]:o=r[e]??r[t],typeof o=="function"?o():o};return e==="credentialScope"||t==="CredentialScope"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const o=await i();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){const{protocol:a,hostname:s,port:l,path:u}=o;return`${a}//${s}${l?":"+l:""}${u}`}}return o}:i},g5=async e=>{},v5=e=>{if(typeof e=="object"){if("url"in e){const t=Rd(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 Rd(e)},jfe=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await g5(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(v5(a)),r.isCustomEndpoint=!0)}const i=await qfe(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const a=await r.endpoint();if(a?.headers){o.headers??={};for(const[s,l]of Object.entries(a.headers))o.headers[s]=Array.isArray(l)?l:[l]}}return o},qfe=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=e[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await Bfe(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Pfe(n),n},Vfe=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&vde(n,"ENDPOINT_OVERRIDE","N");const o=await jfe(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const a=n.authSchemes?.[0];if(a){n.signing_region=a.signingRegion,n.signing_service=a.signingName;const l=rf(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},Gfe={name:"serializerMiddleware"},Kfe={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Gfe.name},Hfe=(e,t)=>({applyToStack:r=>{r.addRelativeTo(Vfe({config:e,instructions:t}),Kfe)}}),Wfe=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>v5(await xs(r)()):void 0,s=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:xs(n??!1),useFipsEndpoint:xs(i??!1)});let l;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=g5(e.serviceId)),l),s},Jfe=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}`),Qfe=e=>{const{retryStrategy:t,retryMode:r}=e,n=xs(e.maxAttempts??uh);let i=t?Promise.resolve(t):void 0;const o=async()=>await xs(r)()===Il.ADAPTIVE?new vfe(n):new Yx(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},Zl=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},el=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,z0=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>wN[p.step]-wN[h.step]||EN[p.priority||"normal"]-EN[h.priority||"normal"]),o=f=>{let h=!1;const p=m=>{const g=Zl(m.name,m.aliases);if(g.includes(f)){h=!0;for(const v of g)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=f=>{let h=!1;const p=m=>{if(m.middleware===f){h=!0;for(const g of Zl(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>(e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),l=f=>{const h=[];return f.before.forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h.push(f),f.after.reverse().forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h},u=(f=!1)=>{const h=[],p=[],m={};return e.forEach(v=>{const b={...v,before:[],after:[]};for(const _ of Zl(b.name,b.aliases))m[_]=b;h.push(b)}),t.forEach(v=>{const b={...v,before:[],after:[]};for(const _ of Zl(b.name,b.aliases))m[_]=b;p.push(b)}),p.forEach(v=>{if(v.toMiddleware){const b=m[v.toMiddleware];if(b===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${el(v.name,v.aliases)} middleware ${v.relation} ${v.toMiddleware}`)}v.relation==="after"&&b.after.push(v),v.relation==="before"&&b.before.push(v)}}),i(h).map(l).reduce((v,b)=>(v.push(...b),v),[])},d={add:(f,h={})=>{const{name:p,override:m,aliases:g}=h,v={step:"initialize",priority:"normal",middleware:f,...h},b=Zl(p,g);if(b.length>0){if(b.some(_=>n.has(_))){if(!m)throw new Error(`Duplicate middleware name '${el(p,g)}'`);for(const _ of b){const S=e.findIndex(C=>C.name===_||C.aliases?.some(A=>A===_));if(S===-1)continue;const E=e[S];if(E.step!==v.step||v.priority!==E.priority)throw new Error(`"${el(E.name,E.aliases)}" middleware with ${E.priority} priority in ${E.step} step cannot be overridden by "${el(p,g)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(S,1)}}for(const _ of b)n.add(_)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:m,aliases:g}=h,v={middleware:f,...h},b=Zl(p,g);if(b.length>0){if(b.some(_=>n.has(_))){if(!m)throw new Error(`Duplicate middleware name '${el(p,g)}'`);for(const _ of b){const S=t.findIndex(C=>C.name===_||C.aliases?.some(A=>A===_));if(S===-1)continue;const E=t[S];if(E.toMiddleware!==v.toMiddleware||E.relation!==v.relation)throw new Error(`"${el(E.name,E.aliases)}" middleware ${E.relation} "${E.toMiddleware}" middleware cannot be overridden by "${el(p,g)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(S,1)}}for(const _ of b)n.add(_)}t.push(v)},clone:()=>s(z0()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):a(f),removeByTag:f=>{let h=!1;const p=m=>{const{tags:g,name:v,aliases:b}=m;if(g&&g.includes(f)){const _=Zl(v,b);for(const S of _)n.delete(S);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=s(z0());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:s,identify:()=>u(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return el(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of u().map(m=>m.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},wN={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},EN={high:3,normal:2,low:1};class Yfe{config;middlewareStack=z0();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){const i=typeof r!="function"?r:void 0,o=typeof r=="function"?r:n,a=i===void 0&&this.config.cacheMiddleware===!0;let s;if(a){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?s=l.get(t.constructor):(s=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,s))}else delete this.handlers,s=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)s(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return s(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const iy="***SensitiveInformation***";function Xx(e,t){if(t==null)return t;const r=Dn.of(e);if(r.getMergedTraits().sensitive)return iy;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return iy}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return iy}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[o,a]of r.structIterator())n[o]!=null&&(i[o]=Xx(a,n[o]));return i}return t}let b5=class{middlewareStack=z0();schema;static classBuilder(){return new Xfe}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:d,CommandCtor:f}){for(const b of i.bind(this)(f,t,r,n))this.middlewareStack.use(b);const h=t.concat(this.middlewareStack),{logger:p}=r,m={logger:p,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[Hx]:{commandInstance:this,...u},...d},{requestHandler:g}=r;let v=n??{};return u.eventStream&&(v={isEventStream:!0,...v}),h.resolve(b=>g.handle(b.request,v),m)}};class Xfe{_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 b5{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,o){const a=t._operationSchema,s=a?.[4]??a?.input,l=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?Xx.bind(null,s):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?Xx.bind(null,l):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class qc 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 qc.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===qc?qc.isInstance(t):qc.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const kN=(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},Zfe=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{}}},_5=Object.values(Zh),ehe=e=>{const t=[];for(const r in Zh){const n=Zh[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();_5.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},the=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();_5.includes(n)&&(t[n]=r.checksumConstructor())}),t},rhe=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),nhe=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},ihe=e=>Object.assign(ehe(e),rhe(e)),ohe=e=>Object.assign(the(e),nhe(e));class y5{trace(){}debug(){}info(){}warn(){}error(){}}const ahe=e=>e?.body instanceof ReadableStream;function she(e,t){if(kd.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=(Z8(i).getTime()-Date.now())/1e3}catch(a){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(a)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?o=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?o=Number(i):Date.parse(i)>=Date.now()&&(o=(Date.parse(i)-Date.now())/1e3);return isNaN(o)?void 0:new Date(Date.now()+o*1e3)}else if(n==="x-amz-retry-after"){const i=e.headers[r],o=Number(i);if(isNaN(o)){t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+o)}}}const lhe=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(uhe(i)){i=i;let a=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),s=new Error,l=0,u=0;const{request:d}=n,f=oo.isInstance(d);for(f&&(d.headers[hfe]=e5());;)try{f&&(d.headers[pfe]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=u,{response:h,output:p}}catch(h){const p=che(h,e.logger);if(s=Jfe(h),f&&ahe(d))throw(r.logger instanceof y5?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{a=await i.refreshRetryTokenForRetry(a,p)}catch(g){throw typeof g.$backoff=="number"&&await CN(g.$backoff),s.$metadata||(s.$metadata={}),s.$metadata.attempts=l+1,s.$metadata.totalRetryDelay=u,s}l=a.getRetryCount();const m=a.getRetryDelay();u+=m,await CN(m)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},CN=e=>new Promise(t=>setTimeout(t,e)),uhe=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",che=(e,t)=>{const r={error:e,errorType:dhe(e)},n=she(e.$response,t);return n&&(r.retryAfterHint=n),r},dhe=e=>h5(e)?"THROTTLING":UE(e)?"TRANSIENT":cfe(e)?"SERVER_ERROR":"CLIENT_ERROR",fhe={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},hhe=e=>({applyToStack:t=>{t.add(lhe(e),fhe)}}),RN=e=>kd.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,x5=e=>new Date(Date.now()+e),phe=(e,t)=>Math.abs(x5(t).getTime()-e)>=3e5,AN=(e,t)=>{const r=Date.parse(e);return phe(r,t)?r-Date.now():t},ch=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},mhe=async e=>{const t=ch("context",e.context),r=ch("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await ch("signer",r.signer)(n),a=e?.signingRegion,s=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:a,signingRegionSet:s,signingName:l}};class ghe{async sign(t,r,n){if(!oo.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await mhe(n),{config:o,signer:a}=i;let{signingRegion:s,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[f,h]=u.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(s=h?.signingRegion??s,l=h?.signingName??l)}return await a.sign(t,{signingDate:x5(o.systemClockOffset),signingRegion:s,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??RN(r.$response);if(n){const i=ch("config",t.config),o=i.systemClockOffset;i.systemClockOffset=AN(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=RN(t);if(n){const i=ch("config",r.config);i.systemClockOffset=AN(n,i.systemClockOffset)}}}const vhe=(e,t,r)=>{let n,i,o,a=!1;const s=async()=>{i||(i=e());try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await s()),n)},bhe="X-Amz-Algorithm",_he="X-Amz-Credential",S5="X-Amz-Date",yhe="X-Amz-SignedHeaders",xhe="X-Amz-Expires",w5="X-Amz-Signature",E5="X-Amz-Security-Token",k5="authorization",C5=S5.toLowerCase(),She="date",whe=[k5,C5,She],Ehe=w5.toLowerCase(),Zx="x-amz-content-sha256",khe=E5.toLowerCase(),Che={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},Rhe=/^proxy-/,Ahe=/^sec-/,oy="AWS4-HMAC-SHA256",The="AWS4-HMAC-SHA256-PAYLOAD",$he="UNSIGNED-PAYLOAD",Nhe=50,R5="aws4_request",Dhe=3600*24*7,Lm={},ay=[],sy=(e,t,r)=>`${e}/${t}/${r}/${R5}`,Fhe=async(e,t,r,n,i)=>{const o=await TN(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${wu(o)}:${t.sessionToken}`;if(a in Lm)return Lm[a];for(ay.push(a);ay.length>Nhe;)delete Lm[ay.shift()];let s=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,R5])s=await TN(e,s,l);return Lm[a]=s},TN=(e,t,r)=>{const n=new e(t);return n.update(ep(r)),n.digest()},$N=({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 Che||t?.has(o)||Rhe.test(o)||Ahe.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},Ihe=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",ly=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===Zx)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Ihe(t)){const n=new r;return n.update(ep(t)),wu(await n.digest())}return $he};class Phe{format(t){const r=[];for(const o of Object.keys(t)){const a=Cd(o);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,a)=>o+a.byteLength,0));let i=0;for(const o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(t.value,3),a;case"string":const s=Cd(t.value),l=new DataView(new ArrayBuffer(3+s.byteLength));l.setUint8(0,7),l.setUint16(1,s.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(s,3),u;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(jE.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Ohe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Ice(t.value.replace(/\-/g,"")),1),f}}}var NN;(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"})(NN||(NN={}));const Ohe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class jE{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&&DN(r),new jE(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&DN(t),parseInt(wu(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function DN(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Mhe=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},Lhe=(e,t={})=>{const{headers:r,query:n={}}=oo.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}},FN=e=>{e=oo.clone(e);for(const t of Object.keys(e.headers))whe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},zhe=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===Ehe)continue;const i=Su(n);t.push(i);const o=e[n];typeof o=="string"?r[i]=`${i}=${Su(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((a,s)=>a.concat([`${i}=${Su(s)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},Uhe=e=>Bhe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Bhe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class jhe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=xs(n),this.credentialProvider=xs(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
55
|
+
${this.getCanonicalPath(t)}
|
|
56
|
+
${zhe(t)}
|
|
57
|
+
${i.map(o=>`${o}:${r[o]}`).join(`
|
|
58
|
+
`)}
|
|
59
|
+
|
|
60
|
+
${i.join(";")}
|
|
61
|
+
${n}`}async createStringToSign(t,r,n,i){const o=new this.sha256;o.update(ep(n));const a=await o.digest();return`${i}
|
|
62
|
+
${t}
|
|
63
|
+
${r}
|
|
64
|
+
${wu(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const o of t.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));const n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return Su(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=Uhe(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class IN extends jhe{headerFormatter=new Phe;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:s,hoistableHeaders:l,signingRegion:u,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=u??await this.regionProvider(),{longDate:p,shortDate:m}=this.formatDate(n);if(i>Dhe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=sy(m,h,d??this.service),v=Lhe(FN(t),{unhoistableHeaders:a,hoistableHeaders:l});f.sessionToken&&(v.query[E5]=f.sessionToken),v.query[bhe]=oy,v.query[_he]=`${f.accessKeyId}/${g}`,v.query[S5]=p,v.query[xhe]=i.toString(10);const b=$N(v,o,s);return v.query[yhe]=this.getCanonicalHeaderList(b),v.query[w5]=await this.getSignature(p,g,this.getSigningKey(f,h,m,d),this.createCanonicalRequest(v,b,await ly(t,this.sha256))),v}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:a,eventStreamCredentials:s}){const l=o??await this.regionProvider(),{shortDate:u,longDate:d}=this.formatDate(n),f=sy(u,l,a??this.service),h=await ly({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const m=wu(await p.digest()),g=[The,d,f,i,m,h].join(`
|
|
65
|
+
`);return this.signString(g,{signingDate:n,signingRegion:l,signingService:a,eventStreamCredentials:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature,eventStreamCredentials:o}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(a,s,l,i));return u.update(ep(t)),wu(await u.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:a}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const l=o??await this.regionProvider(),u=FN(t),{longDate:d,shortDate:f}=this.formatDate(r),h=sy(f,l,a??this.service);u.headers[C5]=d,s.sessionToken&&(u.headers[khe]=s.sessionToken);const p=await ly(u,this.sha256);!Mhe(Zx,u.headers)&&this.applyChecksum&&(u.headers[Zx]=p);const m=$N(u,i,n),g=await this.getSignature(d,h,this.getSigningKey(s,l,f,a),this.createCanonicalRequest(u,m,p));return u.headers[k5]=`${oy} Credential=${s.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${g}`,u}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,oy),a=new this.sha256(await n);return a.update(ep(o)),wu(await a.digest())}getSigningKey(t,r,n,i){return Fhe(this.sha256,t,n,r,i||this.service)}}const qhe=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=Vhe(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=Ghe(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const g=await f(p);return h&&(!g.$source||Object.keys(g.$source).length===0)?efe(g,"CREDENTIALS_CODE","e"):g},n.memoized=f.memoized,n.configBound=f.configBound,n.attributed=!0}else n=f},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:a}=e;let s;return e.signer?s=sh(e.signer):e.regionInfoProvider?s=()=>sh(e.region)().then(async u=>[await e.regionInfoProvider(u,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:f,signingService:h}=u;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||h||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},m=e.signerConstructor||IN;return new m(p)}):s=async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await sh(e.region)(),properties:{}},u);const d=u.signingRegion,f=u.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},p=e.signerConstructor||IN;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:s})};function Vhe(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=wde(t,Sde,r5):r?n=sh(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 Ghe(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 Khe=async(e,t,r)=>({operation:rf(t).operation,region:await xs(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Hhe(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function zt(e){return{schemeId:"smithy.api#noAuth"}}const Whe=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(zt());break}case"ChangePassword":{t.push(zt());break}case"CompleteWebAuthnRegistration":{t.push(zt());break}case"ConfirmDevice":{t.push(zt());break}case"ConfirmForgotPassword":{t.push(zt());break}case"ConfirmSignUp":{t.push(zt());break}case"DeleteUser":{t.push(zt());break}case"DeleteUserAttributes":{t.push(zt());break}case"DeleteWebAuthnCredential":{t.push(zt());break}case"ForgetDevice":{t.push(zt());break}case"ForgotPassword":{t.push(zt());break}case"GetDevice":{t.push(zt());break}case"GetTokensFromRefreshToken":{t.push(zt());break}case"GetUser":{t.push(zt());break}case"GetUserAttributeVerificationCode":{t.push(zt());break}case"GetUserAuthFactors":{t.push(zt());break}case"GlobalSignOut":{t.push(zt());break}case"InitiateAuth":{t.push(zt());break}case"ListDevices":{t.push(zt());break}case"ListWebAuthnCredentials":{t.push(zt());break}case"ResendConfirmationCode":{t.push(zt());break}case"RespondToAuthChallenge":{t.push(zt());break}case"RevokeToken":{t.push(zt());break}case"SetUserMFAPreference":{t.push(zt());break}case"SetUserSettings":{t.push(zt());break}case"SignUp":{t.push(zt());break}case"StartWebAuthnRegistration":{t.push(zt());break}case"UpdateAuthEventFeedback":{t.push(zt());break}case"UpdateDeviceStatus":{t.push(zt());break}case"UpdateUserAttributes":{t.push(zt());break}case"VerifySoftwareToken":{t.push(zt());break}case"VerifyUserAttribute":{t.push(zt());break}default:t.push(Hhe(e))}return t},Jhe=e=>{const t=qhe(e);return Object.assign(t,{authSchemePreference:xs(e.authSchemePreference??[])})},Qhe=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),Yhe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Xhe="3.1033.0",Zhe={version:Xhe},epe=e=>new TextEncoder().encode(e);var tpe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:epe;function rp(e){return e instanceof Uint8Array?e:typeof e=="string"?tpe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function eS(e){return typeof e=="string"?e.length===0:e.byteLength===0}var A5={name:"SHA-256"},PN={name:"HMAC",hash:A5},rpe=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 npe={};function Ug(){return typeof window<"u"?window:typeof self<"u"?self:npe}var ipe=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!eS(t)){var r=rp(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 Ug().crypto.subtle.sign(PN,r,t.toHash).then(function(n){return new Uint8Array(n)})}):eS(this.toHash)?Promise.resolve(rpe):Promise.resolve().then(function(){return Ug().crypto.subtle.digest(A5,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){Ug().crypto.subtle.importKey("raw",rp(t.secret),PN,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function ope(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{u(n.next(d))}catch(f){a(f)}}function l(d){try{u(n.throw(d))}catch(f){a(f)}}function u(d){d.done?o(d.value):i(d.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function ape(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var fo=64,spe=32,lpe=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]),upe=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],cpe=Math.pow(2,53)-1,Bg=(function(){function e(){this.state=Int32Array.from(upe),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>cpe)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===fo&&(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%fo>=fo-8){for(var i=this.bufferLength;i<fo;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<fo-8;i++)r.setUint8(i,0);r.setUint32(fo-8,Math.floor(t/4294967296),!0),r.setUint32(fo-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(spe),i=0;i<8;i++)o[i*4]=this.state[i]>>>24&255,o[i*4+1]=this.state[i]>>>16&255,o[i*4+2]=this.state[i]>>>8&255,o[i*4+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],u=n[5],d=n[6],f=n[7],h=0;h<fo;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var p=this.temp[h-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(m+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var v=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&d)|0)+(f+(lpe[h]+this.temp[h]|0)|0)|0,b=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&a^o&a)|0;f=d,d=u,u=l,l=s+v|0,s=a,a=o,o=i,i=v+b|0}n[0]+=i,n[1]+=o,n[2]+=a,n[3]+=s,n[4]+=l,n[5]+=u,n[6]+=d,n[7]+=f},e})(),dpe=(function(){function e(t){this.secret=t,this.hash=new Bg,this.reset()}return e.prototype.update=function(t){if(!(eS(t)||this.error))try{this.hash.update(rp(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 ope(this,void 0,void 0,function(){return ape(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Bg,this.secret){this.outer=new Bg;var t=fpe(this.secret),r=new Uint8Array(fo);r.set(t);for(var n=0;n<fo;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 fpe(e){var t=rp(e);if(t.byteLength>fo){var r=new Bg;r.update(t),t=r.digest()}var n=new Uint8Array(fo);return n.set(t),n}var hpe=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ppe(e){if(mpe(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return gpe(t)}return!1}function mpe(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function gpe(e){return e&&hpe.every(function(t){return typeof e[t]=="function"})}var vpe=(function(){function e(t){ppe(Ug())?this.hash=new ipe(t):this.hash=new dpe(t)}return e.prototype.update=function(t,r){this.hash.update(rp(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const bpe=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??ON.os(i)??"other",a=void 0,s=n?.userAgentData?.brands??[],l=s[s.length-1],u=l?.brand??ON.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,a],["lang/js"],["md/browser",`${u}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},ON={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"}},_pe=e=>()=>Promise.reject(e),MN=typeof TextEncoder=="function"?new TextEncoder:null,ype=e=>{if(typeof e=="string"){if(MN)return MN.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}`)},xpe=["in-region","cross-region","mobile","standard","legacy"],Spe=({defaultsMode:e}={})=>vhe(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(wpe()?"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 ${xpe.join(", ")}, got ${t}`)}}),wpe=()=>{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 Epe{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const n=r.getMemberSchemas(),i=Object.values(n).find(o=>!!o.getMergedTraits().httpPayload);if(i){const o=i.getMergedTraits().mediaType;return o||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(a=>{const{httpQuery:s,httpQueryParams:l,httpHeader:u,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!s&&!l&&!u&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,a){let s=t;t.includes("#")&&([,s]=t.split("#"));const l={$metadata:o,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:a?.(this.errorRegistry,s)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const m=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:s}),l),i)}const h=i,p=h?.message??h?.Message??h?.Error?.Message??h?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(p),{name:s},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=Gi.for(i),a=Gi.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(a),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=kN(t,r);n&&(i.message=n);const o=i.Error??{};o.Type=i.Error?.Type,o.Code=i.Error?.Code,o.Message=i.Error?.message??i.Error?.Message??n,i.Error=o;const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return kN(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),a=Object.keys(t),s={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<a.length;l++){const u=a[l];s[u==="message"?"Message":u]=t[u]}delete s.__type,t.Error=s}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>Dn.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class qE{serdeContext;setSerdeContext(t){this.serdeContext=t}}class kpe{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 Cpe(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 Da(n,"bigDecimal"):BigInt(n)}return t}const Rpe=(e,t)=>Jx(e,t).then(r=>(t?.utf8Encoder??PE)(r)),Ape=(e,t)=>Rpe(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{}}),LN=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),uy=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},Tpe=(e,t)=>{const r=LN(e.headers,"x-amzn-errortype");if(r!==void 0)return uy(e.headers[r]);if(t&&typeof t=="object"){const n=LN(t,"code");if(n&&t[n]!==void 0)return uy(t[n]);if(t.__type!==void 0)return uy(t.__type)}};class $pe extends qE{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,Cpe):await Ape(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=Dn.of(t);if(n){if(i.isStructSchema()){const a=r,s=i.isUnionSchema(),l={};let u;const{jsonName:d}=this.settings;d&&(u={});let f;s&&(f=new kpe(a,l));for(const[h,p]of i.structIterator()){let m=h;d&&(m=p.getMergedTraits().jsonName??m,u[m]=h),s&&f.mark(m),a[m]!=null&&(l[h]=this._read(p,a[m]))}if(s)f.writeUnknown();else if(typeof a.__type=="string")for(const h in a){const p=a[h],m=d?u[h]??h:h;m in l||(l[m]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const a=i.getValueSchema(),s=[];for(const l of r)s.push(this._read(a,l));return s}if(i.isMapSchema()){const a=i.getValueSchema(),s={};for(const l in r)s[l]=this._read(a,r[l]);return s}}if(i.isBlobSchema()&&typeof r=="string")return eb(r);const o=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&o)return o==="application/json"||o.endsWith("+json")?bl.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(t5(i,this.settings)){case 5:return tde(r);case 6:return Z8(r);case 7:return ode(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 Da)return r;const a=r;return a.type==="bigDecimal"&&"string"in a?new Da(a.string,a.type):new Da(String(r),"bigDecimal")}if(i.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(i.isDocumentSchema())if(n){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof Da?a[s]=l:a[s]=this._read(i,l)}return a}else return structuredClone(r);return r}}const zN="Ν";class Npe{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 Da){const n=`${zN+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${zN+"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 Dpe extends qE{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=Dn.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 Npe;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=Dn.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=Dn.of(t);if(i){if(o.isStructSchema()){const a=r,s={},{jsonName:l}=this.settings;let u;l&&(u={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,a[f],o);if(p!==void 0){let m=f;l&&(m=h.getMergedTraits().jsonName??f,u[f]=m),s[m]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=a;if(Array.isArray(f)){const[h,p]=f;s[h]=this._write(15,p)}}else if(typeof a.__type=="string")for(const f in a){const h=a[f],p=l?u[f]??f:f;p in s||(s[p]=this._write(15,h))}return s}if(Array.isArray(r)&&o.isListSchema()){const a=o.getValueSchema(),s=[],l=!!o.getMergedTraits().sparse;for(const u of r)(l||u!=null)&&s.push(this._write(a,u));return s}if(o.isMapSchema()){const a=o.getValueSchema(),s={},l=!!o.getMergedTraits().sparse;for(const u in r){const d=r[u];(l||d!=null)&&(s[u]=this._write(a,d))}return s}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??O0)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(t5(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return Zce(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof Da&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return e5();const a=o.getMergedTraits().mediaType;return r!=null&&a&&(a==="application/json"||a.endsWith("+json"))?bl.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??O0)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof Da?(this.useReplacer=!0,a[s]=l):a[s]=this._write(o,l)}return a}else return structuredClone(r);return r}}}class Fpe extends qE{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Dpe(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new $pe(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Ipe extends gde{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 Fpe({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new Epe(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"),(Lg(t.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(t,r,n,i,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const a=Tpe(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);const{errorSchema:s,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=Dn.of(s),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(s)??Error,h=new f(d),p={},m=this.codec.createDeserializer();for(const[g,v]of u.structIterator())i[g]!=null&&(p[g]=m.readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:u.getMergedTraits().error,message:d},p),i)}}class Ppe extends Ipe{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 np="ref",eu=-1,zm=!0,UN="isSet",T5="PartitionResult",Um="booleanEquals",cy="getAttr",Rf="stringEquals",BN={[np]:"Endpoint"},dy={[np]:T5},Hf={[np]:"Region"},ya={},jN=[Hf],qN={conditions:[[UN,[BN]],[UN,jN],["aws.partition",jN,T5],[Um,[{[np]:"UseFIPS"},zm]],[Um,[{fn:cy,argv:[dy,"supportsFIPS"]},zm]],[Um,[{[np]:"UseDualStack"},zm]],[Um,[{fn:cy,argv:[dy,"supportsDualStack"]},zm]],[Rf,[{fn:cy,argv:[dy,"name"]},"aws"]],[Rf,[Hf,"us-east-1"]],[Rf,[Hf,"us-east-2"]],[Rf,[Hf,"us-west-1"]],[Rf,[Hf,"us-west-2"]]],results:[[eu],[eu,"Invalid Configuration: FIPS and custom endpoint are not supported"],[eu,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[BN,ya],["https://cognito-idp-fips.us-east-1.amazonaws.com",ya],["https://cognito-idp-fips.us-east-2.amazonaws.com",ya],["https://cognito-idp-fips.us-west-1.amazonaws.com",ya],["https://cognito-idp-fips.us-west-2.amazonaws.com",ya],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",ya],[eu,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",ya],[eu,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",ya],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",ya],[eu,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",ya],[eu,"Invalid Configuration: Missing Region"]]},Ope=2,En=1e8,Mpe=new Int32Array([-1,1,-1,0,17,3,1,4,En+16,2,5,En+16,3,9,6,5,7,En+15,6,8,En+14,7,En+12,En+13,4,11,10,5,En+9,En+11,5,12,En+10,6,13,En+9,8,En+4,14,9,En+5,15,10,En+6,16,11,En+7,En+8,3,En+1,18,5,En+2,En+3]),Lpe=LE.from(Mpe,Ope,qN.conditions,qN.results),zpe=new Rde({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Upe=(e,t={})=>zpe.get(e,()=>Hde(Lpe,{endpointParams:e,logger:t.logger}));zE.aws=f5;class Me extends qc{constructor(t){super(t),Object.setPrototypeOf(this,Me.prototype)}}class VE extends Me{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,VE.prototype)}}class GE extends Me{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,GE.prototype)}}class KE extends Me{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,KE.prototype),this.reasonCode=t.reasonCode}}class HE extends Me{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,HE.prototype)}}class WE extends Me{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,WE.prototype)}}class JE extends Me{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,JE.prototype)}}class QE extends Me{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,QE.prototype)}}class YE extends Me{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,YE.prototype)}}class XE extends Me{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,XE.prototype)}}class ZE extends Me{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,ZE.prototype)}}class e2 extends Me{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,e2.prototype)}}class t2 extends Me{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,t2.prototype)}}class r2 extends Me{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,r2.prototype)}}class n2 extends Me{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,n2.prototype)}}class i2 extends Me{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,i2.prototype)}}class o2 extends Me{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,o2.prototype)}}class a2 extends Me{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,a2.prototype)}}class s2 extends Me{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,s2.prototype)}}class l2 extends Me{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,l2.prototype)}}class u2 extends Me{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,u2.prototype)}}class c2 extends Me{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,c2.prototype)}}class d2 extends Me{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,d2.prototype)}}class f2 extends Me{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,f2.prototype)}}class h2 extends Me{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,h2.prototype)}}class p2 extends Me{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,p2.prototype)}}class m2 extends Me{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,m2.prototype)}}class g2 extends Me{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,g2.prototype)}}class v2 extends Me{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,v2.prototype)}}class b2 extends Me{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,b2.prototype)}}class _2 extends Me{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,_2.prototype)}}class y2 extends Me{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,y2.prototype)}}class x2 extends Me{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,x2.prototype)}}class S2 extends Me{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,S2.prototype)}}class w2 extends Me{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,w2.prototype)}}class E2 extends Me{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,E2.prototype)}}class k2 extends Me{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,k2.prototype)}}class C2 extends Me{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,C2.prototype)}}class R2 extends Me{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,R2.prototype)}}class A2 extends Me{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,A2.prototype)}}class T2 extends Me{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,T2.prototype)}}class $2 extends Me{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,$2.prototype)}}class N2 extends Me{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,N2.prototype)}}class D2 extends Me{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,D2.prototype)}}class F2 extends Me{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,F2.prototype)}}class I2 extends Me{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,I2.prototype)}}class P2 extends Me{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,P2.prototype)}}class O2 extends Me{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,O2.prototype)}}class M2 extends Me{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,M2.prototype)}}class L2 extends Me{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,L2.prototype)}}class z2 extends Me{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,z2.prototype)}}class U2 extends Me{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,U2.prototype)}}class B2 extends Me{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,B2.prototype)}}class j2 extends Me{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,j2.prototype)}}class q2 extends Me{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,q2.prototype)}}class V2 extends Me{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,V2.prototype)}}class G2 extends Me{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,G2.prototype)}}class K2 extends Me{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,K2.prototype)}}const Bpe="AvailableChallenges",jpe="AccessDeniedException",qpe="AliasExistsException",Vpe="AnalyticsEndpointId",Gpe="AuthFlow",Kpe="AnalyticsMetadata",Hpe="AnalyticsMetadataType",Wpe="AuthParameters",Jpe="AuthParametersType",Qpe="AuthenticationResult",Ype="AuthenticationResultType",Xpe="AccessToken",Zpe="CodeDeliveryFailureException",eme="ClientId",tme="ClientIdType",rme="ClientMetadata",nme="CodeMismatchException",ime="ConcurrentModificationException",ome="ChallengeName",ame="ChallengeParameters",sme="DeviceGroupKey",lme="DeviceKey",ume="DeviceKeyExistsException",cme="DuplicateProviderException",dme="ExpiredCodeException",fme="EncodedData",hme="ExpiresIn",pme="EnableSoftwareTokenMFAException",mme="ForbiddenException",gme="FeatureUnavailableInTierException",vme="GroupExistsException",bme="IpAddress",_me="InitiateAuthRequest",yme="InitiateAuthResponse",xme="InitiateAuth",Sme="InternalErrorException",wme="InvalidEmailRoleAccessPolicyException",Eme="InvalidLambdaResponseException",kme="InvalidOAuthFlowException",Cme="InvalidParameterException",Rme="InvalidPasswordException",Ame="InternalServerException",Tme="InvalidSmsRoleAccessPolicyException",$me="InvalidSmsRoleTrustRelationshipException",Nme="IdToken",Dme="InvalidUserPoolConfigurationException",Fme="LimitExceededException",Ime="MFAMethodNotFoundException",Pme="ManagedLoginBrandingExistsException",Ome="NotAuthorizedException",Mme="NewDeviceMetadata",Lme="NewDeviceMetadataType",zme="PasswordHistoryPolicyViolationException",Ume="PreconditionNotMetException",Bme="PasswordResetRequiredException",jme="ResourceNotFoundException",qme="RefreshToken",Vme="RefreshTokenReuseException",$5="Session",Gme="ScopeDoesNotExistException",Kme="SessionType",Hme="SoftwareTokenMFANotFoundException",Wme="TierChangeNotAllowedException",Jme="TermsExistsException",Qme="TooManyFailedAttemptsException",Yme="TooManyRequestsException",Xme="TokenModelType",Zme="TokenType",ege="UserContextDataType",tge="UserContextData",rge="UnauthorizedException",nge="UsernameExistsException",ige="UserImportInProgressException",oge="UnsupportedIdentityProviderException",age="UnexpectedLambdaException",sge="UserLambdaValidationException",lge="UserNotConfirmedException",uge="UserNotFoundException",cge="UnsupportedOperationException",dge="UserPoolAddOnNotEnabledException",fge="UserPoolTaggingException",hge="UnsupportedTokenTypeException",pge="UnsupportedUserStateException",mge="WebAuthnClientMismatchException",gge="WebAuthnConfigurationMissingException",vge="WebAuthnChallengeNotFoundException",bge="WebAuthnCredentialNotSupportedException",_ge="WebAuthnNotEnabledException",yge="WebAuthnOriginNotAllowedException",xge="WebAuthnRelyingPartyMismatchException",Ge="client",Ue="error",Ke="httpError",Be="message",Sge="reasonCode",N5="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",D5="server",Ne="com.amazonaws.cognitoidentityprovider",F5=Gi.for(N5);var wge=[-3,N5,"CognitoIdentityProviderServiceException",0,[],[]];F5.registerError(wge,Me);const ze=Gi.for(Ne);var Ege=[-3,Ne,jpe,{[Ue]:Ge,[Ke]:403},[Be],[0]];ze.registerError(Ege,VE);var kge=[-3,Ne,qpe,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(kge,d2);var Cge=[-3,Ne,Zpe,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Cge,i2);var Rge=[-3,Ne,nme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Rge,_2);var Age=[-3,Ne,ime,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Age,w2);var Tge=[-3,Ne,ume,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Tge,N2);var $ge=[-3,Ne,cme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError($ge,F2);var Nge=[-3,Ne,pme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Nge,K2);var Dge=[-3,Ne,dme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Dge,y2);var Fge=[-3,Ne,gme,{[Ue]:Ge,[Ke]:403},[Be],[0]];ze.registerError(Fge,O2);var Ige=[-3,Ne,mme,{[Ue]:Ge,[Ke]:403},[Be],[0]];ze.registerError(Ige,E2);var Pge=[-3,Ne,vme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Pge,D2);var Oge=[-3,Ne,Sme,{[Ue]:D5},[Be],[0]];ze.registerError(Oge,GE);var Mge=[-3,Ne,Ame,{[Ue]:D5},[Be],[0]];ze.registerError(Mge,YE);var Lge=[-3,Ne,wme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Lge,h2);var zge=[-3,Ne,Eme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(zge,e2);var Uge=[-3,Ne,kme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Uge,z2);var Bge=[-3,Ne,Cme,{[Ue]:Ge,[Ke]:400},[Be,Sge],[0,0]];ze.registerError(Bge,KE);var jge=[-3,Ne,Rme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(jge,o2);var qge=[-3,Ne,Tme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(qge,a2);var Vge=[-3,Ne,$me,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Vge,s2);var Gge=[-3,Ne,Dme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Gge,f2);var Kge=[-3,Ne,Fme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Kge,XE);var Hge=[-3,Ne,Pme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Hge,I2);var Wge=[-3,Ne,Ime,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Wge,p2);var Jge=[-3,Ne,Ome,{[Ue]:Ge,[Ke]:403},[Be],[0]];ze.registerError(Jge,HE);var Qge=[-3,Ne,zme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Qge,x2);var Yge=[-3,Ne,Bme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Yge,m2);var Xge=[-3,Ne,Ume,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Xge,l2);var Zge=[-3,Ne,Vme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(Zge,j2);var e0e=[-3,Ne,jme,{[Ue]:Ge,[Ke]:404},[Be],[0]];ze.registerError(e0e,WE);var t0e=[-3,Ne,Gme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(t0e,U2);var r0e=[-3,Ne,Hme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(r0e,S2);var n0e=[-3,Ne,Jme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(n0e,P2);var i0e=[-3,Ne,Wme,{[Ue]:Ge,[Ke]:403},[Be],[0]];ze.registerError(i0e,M2);var o0e=[-3,Ne,Qme,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(o0e,t2);var a0e=[-3,Ne,Yme,{[Ue]:Ge,[Ke]:429},[Be],[0]];ze.registerError(a0e,JE);var s0e=[-3,Ne,rge,{[Ue]:Ge,[Ke]:401},[Be],[0]];ze.registerError(s0e,q2);var l0e=[-3,Ne,age,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(l0e,r2);var u0e=[-3,Ne,oge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(u0e,B2);var c0e=[-3,Ne,cge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(c0e,g2);var d0e=[-3,Ne,hge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(d0e,V2);var f0e=[-3,Ne,pge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(f0e,u2);var h0e=[-3,Ne,ige,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(h0e,QE);var p0e=[-3,Ne,sge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(p0e,n2);var m0e=[-3,Ne,nge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(m0e,c2);var g0e=[-3,Ne,lge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(g0e,v2);var v0e=[-3,Ne,uge,{[Ue]:Ge,[Ke]:404},[Be],[0]];ze.registerError(v0e,ZE);var b0e=[-3,Ne,dge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(b0e,b2);var _0e=[-3,Ne,fge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(_0e,L2);var y0e=[-3,Ne,vge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(y0e,k2);var x0e=[-3,Ne,mge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(x0e,C2);var S0e=[-3,Ne,gge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(S0e,G2);var w0e=[-3,Ne,bge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(w0e,R2);var E0e=[-3,Ne,_ge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(E0e,A2);var k0e=[-3,Ne,yge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(k0e,T2);var C0e=[-3,Ne,xge,{[Ue]:Ge,[Ke]:400},[Be],[0]];ze.registerError(C0e,$2);const R0e=[F5,ze];var A0e=[0,Ne,tme,8,0],I5=[0,Ne,Kme,8,0],fy=[0,Ne,Xme,8,0],T0e=[3,Ne,Hpe,0,[Vpe],[0]],$0e=[3,Ne,Ype,0,[Xpe,hme,Zme,qme,Nme,Mme],[[()=>fy,0],1,0,[()=>fy,0],[()=>fy,0],()=>F0e]],N0e=[3,Ne,_me,0,[Gpe,eme,Wpe,rme,Kpe,tge,$5],[0,[()=>A0e,0],[()=>P0e,0],128,()=>T0e,[()=>I0e,0],[()=>I5,0]],2],D0e=[3,Ne,yme,0,[ome,$5,ame,Qpe,Bpe],[0,[()=>I5,0],128,[()=>$0e,0],64]],F0e=[3,Ne,Lme,0,[lme,sme],[0,0]],I0e=[3,Ne,ege,8,[bme,fme],[0,0]],P0e=[2,Ne,Jpe,8,0,0],O0e=[9,Ne,xme,0,()=>N0e,()=>D0e];const M0e=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??eb,base64Encoder:e?.base64Encoder??O0,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Upe,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Whe,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new ghe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _de}],logger:e?.logger??new y5,protocol:e?.protocol??Ppe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:R0e,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??Rd,utf8Decoder:e?.utf8Decoder??Cd,utf8Encoder:e?.utf8Encoder??PE}),L0e=e=>{const t=Spe(e),r=()=>t().then(Zfe),n=M0e(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??ype,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??bpe({serviceId:n.serviceId,clientVersion:Zhe.version}),maxAttempts:e?.maxAttempts??uh,region:e?.region??_pe("Region is missing"),requestHandler:OE.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||tfe),sha256:e?.sha256??vpe,streamCollector:e?.streamCollector??$ce,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Rfe)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Afe))}},z0e=e=>({setRegion(t){e.region=t},region(){return e.region}}),U0e=e=>({region:e.region()}),B0e=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(a=>a.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},j0e=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),q0e=(e,t)=>{const r=Object.assign(z0e(e),ihe(e),nce(e),B0e(e));return t.forEach(n=>n.configure(r)),Object.assign(e,U0e(r),ohe(r),ice(r),j0e(r))};class P5 extends Yfe{config;constructor(...[t]){const r=L0e(t||{});super(r),this.initConfig=r;const n=Qhe(r),i=Cde(n),o=Qfe(i),a=Nfe(o),s=a,l=Wfe(s),u=Jhe(l),d=q0e(u,t?.extensions||[]);this.config=d,this.middlewareStack.use(Bce(this.config)),this.middlewareStack.use(Cfe(this.config)),this.middlewareStack.use(hhe(this.config)),this.middlewareStack.use(Ife(this.config)),this.middlewareStack.use(lce(this.config)),this.middlewareStack.use(dce(this.config)),this.middlewareStack.use(pce(this.config)),this.middlewareStack.use(_ce(this.config,{httpAuthSchemeParametersProvider:Khe,identityProviderConfigProvider:async f=>new bde({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Ece(this.config))}destroy(){super.destroy()}}class O5 extends b5.classBuilder().ep(Yhe).m(function(t,r,n,i){return[Hfe(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(O0e).build(){}let V0e="reventless.auth.v1",U0="reventless.role-switched",G0e=300*1e3,H2="activeRole",W2="availableRoles",J2="activeRoleStale";function M5(e){return e.split(",").map(t=>t.trim()).filter(t=>t!=="")}function tS(e){let t=i=>D(k(e[i],he.string),""),r=Q(D(k(e.groups,he.array),[]),he.string),n=i=>k(k(k(e.claims,he.object),o=>o[i]),he.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider"),activeRole:n(H2),availableRoles:ne(n(W2),[],M5),staleRole:n(J2)}}function K0e(e){let t=[["userId",e.userId],["username",e.username],["groups",e.groups.map(s=>s)],["provider",e.provider]],r=e.activeRole,n=e.availableRoles,i=e.staleRole,o,a=0;if(r!==void 0||n.length!==0||i!==void 0?a=1:o=[],a===1){let s=[];re(r,l=>{s.push([H2,l])}),n.length!==0&&s.push([W2,n.join(",")]),re(i,l=>{s.push([J2,l])}),o=[["claims",Object.fromEntries(s)]]}return Object.fromEntries(t.concat(o))}function H0e(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=he.object(r);if(n===void 0)return;let i=k(n.token,he.string),o=n.identity,a=k(n.refreshToken,he.string),s=k(n.expiresAt,he.float);return i!==void 0&&o!==void 0?q(he.object(o),l=>({token:i,identity:tS(l),refreshToken:a,expiresAt:s})):void 0}catch{return}}function Af(e,t){let r=[["token",t.token],["identity",K0e(t.identity)]],n=t.refreshToken,i=n!==void 0?r.concat([["refreshToken",n]]):r,o=t.expiresAt,a=o!==void 0?i.concat([["expiresAt",o]]):i,s=JSON.stringify(Object.fromEntries(a));localStorage.setItem(e,s)}function W0e(){return sessionStorage.getItem(U0)==null?!1:(sessionStorage.removeItem(U0),!0)}function J0e(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function Q0e(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/switch-role"}function L5(e){let t=n=>k(e[n],he.string),r=Q(D(k(e["cognito:groups"],he.array),[]),he.string);return{userId:D(t("sub"),""),username:D(Jn(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito",activeRole:t(H2),availableRoles:ne(t(W2),[],M5),staleRole:t(J2)}}let Y0e=`mutation SetActiveRole($activeRole: String) {
|
|
66
|
+
Platform_SetActiveRole(activeRole: $activeRole) {
|
|
67
|
+
activeRole
|
|
68
|
+
availableRoles
|
|
69
|
+
}
|
|
70
|
+
}`;async function rS(e){try{let t=await e.text();return JSON.parse(t)}catch{return}}function VN(e,t){let r=e.status;return t+" (HTTP "+r.toString()+")"}function X0e(e){return JSON.stringify(e!==void 0?Object.fromEntries([["activeRole",e]]):{})}async function GN(e,t,r){try{let n=JSON.stringify(Object.fromEntries([["query",Y0e],["variables",Object.fromEntries([["activeRole",ne(r,null,l=>l)]])]])),i=await fetch(e,{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+t},body:n}),o=await rS(i),a=k(k(k(k(k(k(k(o,he.object),l=>l.errors),he.array),l=>l.at(0)),he.object),l=>l.message),he.string),s=i.ok;return a!==void 0?{TAG:"Error",_0:a}:s?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"Could not switch role"}}catch(n){let i=ws(n);return{TAG:"Error",_0:Zv(Xv(i))}}}function z5(e){try{return ece(e)}catch{return}}function Z0e(e){let t=e.IdToken;if(t===void 0)return;let r=z5(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:L5(r),refreshToken:e.RefreshToken,expiresAt:i}}async function eve(e,t,r,n){try{let i=new P5({region:t}),o=new O5({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),a=await i.send(o),s=k(a.AuthenticationResult,Z0e);return s!==void 0?{TAG:"Ok",_0:s}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=ws(i);return{TAG:"Error",_0:Zv(Xv(o))}}}async function KN(e,t,r,n){try{let i=new P5({region:t}),o=new O5({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),s=(await i.send(o)).AuthenticationResult;if(s===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=s.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let u=z5(l),d=D(q(u,L5),n),f=s.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=s.RefreshToken;return{TAG:"Ok",_0:{token:l,identity:d,refreshToken:p!==void 0?p:r,expiresAt:h}}}catch(i){let o=ws(i);return{TAG:"Error",_0:Zv(Xv(o))}}}function tve(e){switch(e){case"Anonymous":return!1;case"Local":case"Cognito":return!0}}let U5=or(void 0),rve=U5.Provider;function nve(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,a=t!==void 0?t:V0e,s=de(()=>H0e(a)),l=s[1],u=s[0];De(()=>{if(u===void 0)return;let _=u.refreshToken;if(_===void 0)return;let S=u.expiresAt;if(S===void 0)return;let E=u.identity;switch(o){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let C=Math.max(0,S-Date.now()-G0e),A=setTimeout(()=>{KN(n,r,_,E).then(T=>{if(T.TAG==="Ok"){let R=T._0;return Af(a,R),l(N=>R)}localStorage.removeItem(a),l(R=>{})})},C);return()=>{clearTimeout(A)}}},[u,o,n,r]);let d=q(u,_=>_.identity),f=ke(u),h=async(_,S)=>{try{let E=0;switch(o){case"Anonymous":case"Local":E=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 C=await eve(n,r,_,S);if(C.TAG!=="Ok")return{TAG:"LoginErr",_0:C._0};let A=C._0;return Af(a,A),l(T=>A),"LoginOk"}if(E===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let C=await fetch(J0e(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:_,password:S}),"")}),A=await rS(C);if(C.ok){let R=k(A,he.object);if(R===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=k(R.token,he.string),I=k(R.identity,he.object);if(N===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(I===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let M=tS(I),P={token:N,identity:M,refreshToken:void 0,expiresAt:void 0};return Af(a,P),l(U=>P),"LoginOk"}return{TAG:"LoginErr",_0:D(k(k(k(A,he.object),R=>R.error),he.string),VN(C,"Login failed"))}}}catch(E){let C=ws(E);return{TAG:"LoginErr",_0:Zv(Xv(C))}}},p=async _=>{try{let S=0;switch(o){case"Anonymous":case"Local":S=1;break;case"Cognito":if(u===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let E=u.refreshToken;if(i===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(n===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(r===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(E===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};let C=await GN(i,u.token,_);if(C.TAG!=="Ok")return{TAG:"LoginErr",_0:C._0};let A=await KN(n,r,E,u.identity),T=0;if(A.TAG==="Ok"){let R=A._0;if(Re(R.identity.activeRole,_))return Af(a,R),sessionStorage.setItem(U0,"1"),l(N=>R),"LoginOk";T=2}else T=2;if(T===2)return await GN(i,u.token,u.identity.activeRole),A.TAG==="Ok"?{TAG:"LoginErr",_0:"The server did not narrow this session to that role"}:{TAG:"LoginErr",_0:A._0};break}if(S===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};if(u===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let E=await fetch(Q0e(i),{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+u.token},body:X0e(_)}),C=await rS(E);if(!E.ok)return{TAG:"LoginErr",_0:D(k(k(k(C,he.object),M=>M.error),he.string),VN(E,"Could not switch role"))};let A=k(C,he.object);if(A===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let T=k(A.token,he.string),R=k(A.identity,he.object);if(T===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};if(R===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let N=tS(R),I={token:T,identity:N,refreshToken:void 0,expiresAt:void 0};return Af(a,I),sessionStorage.setItem(U0,"1"),l(M=>I),"LoginOk"}}catch(S){let E=ws(S);return console.error("[AuthProvider] switchRole threw; session left as it was",E),{TAG:"LoginErr",_0:"Could not switch role. You are still acting as the role you had."}}},m=tve(o);return _r(rve,{value:{identity:d,isAuthenticated:f,login:h,switchRole:p,canSwitchRoles:m,logout:()=>{localStorage.removeItem(a),l(_=>{})},getToken:()=>q(u,_=>_.token)},children:e.children})}let ive={make:nve};function pa(){return Et(U5)}let ove={background:"var("+x.surface+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+$.fontFamily+")",fontSize:"var("+$.sizeSm+")",fontWeight:"var("+$.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+Z.md+")",alignItems:"center",gap:"0.375rem"},ave={color:"var("+x.textSecondary+")",fontSize:"0.625rem"},sve={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+$.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+Z.md+")",boxShadow:"var("+Pn.md+")"},lve={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",display:"inline-block",fontSize:"var("+$.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+Z.full+")"},HN={border:"none",borderTop:"1px solid var("+x.borderSubtle+")",margin:"0.5rem 0"},uve={background:"transparent",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",fontSize:"var("+$.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+Z.sm+")"},cve={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")",letterSpacing:"0.04em",marginBottom:"0.25rem",textTransform:"uppercase"};function dve(e){return{background:"transparent",border:"none",color:"var("+x.textPrimary+")",cursor:e?"default":"pointer",display:"flex",fontSize:"var("+$.sizeSm+")",fontWeight:"var("+(e?$.weightMedium:$.weightNormal)+")",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Z.sm+")",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"}}let fve={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")"},hve={color:"var("+x.textSecondary+")",fontWeight:"var("+$.weightNormal+")"},pve={background:"transparent",border:"none",color:"var("+x.textSecondary+")",cursor:"pointer",display:"block",fontFamily:"var("+$.fontFamily+")",fontSize:"var("+$.sizeSm+")",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Z.sm+")"},mve={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")",marginBottom:"0.25rem"},gve={color:"var("+x.error+")",fontSize:"var("+$.sizeXs+")",marginTop:"0.25rem"},vve={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")",marginBottom:"0.25rem"};function B5(e,t){if(!e)return[];let r=t.availableRoles;return r.length!==0?r:t.groups}let bve="Stop acting as one role",_ve="All of them — choose one to narrow.";function yve(e,t){let r=e.length;if(r!==1&&r!==0)return t.activeRole}function xve(e){let t=pa(),r=de(()=>!1),n=r[1],i=r[0],o=de(()=>!1),a=o[1],s=o[0],l=de(()=>{});if(t===void 0)return null;let u=l[1],d=l[0],f=t.identity;if(f===void 0)return null;let h=B5(t.canSwitchRoles,f),p=yve(h,f),m=v=>{a(b=>!0),u(b=>{}),t.switchRole(v).then(b=>{if(a(S=>!1),typeof b!="object")return n(S=>!1);let _=b._0;u(S=>_)})},g;if(i){let v=f.staleRole,b=h.length,_;if(b!==1&&b!==0){let S=f.activeRole,E=f.activeRole;_=L(cr,{children:[L("div",{children:[y("div",{children:"Acting as",style:cve}),S!==void 0?null:y("div",{children:_ve,style:mve}),h.map(C=>{let A=Re(f.activeRole,C);return L("button",{children:[C,A?y("span",{children:"✓",style:fve}):null],"aria-checked":A?"true":"false",role:"radio",style:dve(A),disabled:s,onClick:T=>{if(!A)return m(C)}},C)})],"aria-label":"Acting as",role:"radiogroup"}),E!==void 0?L(cr,{children:[y("hr",{style:HN}),y("button",{children:bve,style:pve,disabled:s,onClick:C=>m(void 0)})]}):null,d!==void 0?y("div",{children:d,style:gve}):null]})}else _=null;g=L("div",{children:[y("div",{children:f.username,style:{fontSize:"var("+$.sizeMd+")",fontWeight:"var("+$.weightMedium+")",marginBottom:"0.25rem"}}),f.groups.length!==0&&h.length<=1?y("div",{children:f.groups.map(S=>y("span",{children:S,style:lve},S)),style:{marginBottom:"0.25rem"}}):null,v!==void 0?y("div",{children:v+" is no longer one of your roles, so you are acting as all of them.",style:vve}):null,_,y("hr",{style:HN}),y("button",{children:"Sign out",style:uve,onClick:S=>{n(E=>!1),t.logout()}})],style:sve})}else g=null;return L("div",{children:[L("button",{children:[f.username,p!==void 0?y("span",{children:"· "+p,style:hve}):null,y("span",{children:i?"▴":"▾",style:ave})],"aria-label":p!==void 0?"Signed in as "+f.username+", acting as "+p:"Signed in as "+f.username,style:ove,onClick:v=>n(b=>!b)}),g],style:{position:"relative"}})}let Sve=xve,wve={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+$.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+Z.md+")"},WN={color:"var("+x.textSecondary+")",display:"block",fontSize:"var("+$.sizeSm+")",marginBottom:"0.25rem"},JN={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",fontSize:"var("+$.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+Z.sm+")",boxSizing:"border-box"};function Eve(e){return{background:e?"var("+x.textDisabled+")":"var("+x.brand+")",border:"none",color:"var("+x.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+$.sizeMd+")",fontWeight:"var("+$.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+Z.sm+")"}}let kve={color:"var("+x.error+")",fontSize:"var("+$.sizeSm+")",marginBottom:"0.75rem"};function Cve(e){let t=pa(),r=de(()=>""),n=r[1],i=r[0],o=de(()=>""),a=o[1],s=o[0],l=de(()=>{}),u=l[1],d=l[0],f=de(()=>!1),h=f[1],p=f[0],m=g=>{g.preventDefault(),u(v=>{}),h(v=>!0),t!==void 0?Ft(t.login(i,s).then(v=>{if(h(_=>!1),typeof v!="object")return;let b=v._0;u(_=>b)}),v=>(h(b=>!1),u(b=>"Unexpected error during sign-in"),Promise.resolve())):(u(v=>"Auth provider missing"),h(v=>!1),Promise.resolve())};return L("div",{children:[y("h1",{children:"Sign in",style:{fontSize:"var("+$.sizeXl+")",fontWeight:"var("+$.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[y("label",{children:"Username",style:WN}),y("input",{style:JN,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:g=>{let v=g.target.value;n(b=>v)}}),y("label",{children:"Password",style:WN}),y("input",{style:JN,autoComplete:"current-password",type:"password",value:s,onChange:g=>{let v=g.target.value;a(b=>v)}}),d!==void 0?y("div",{children:d,style:kve}):null,y("button",{children:p?"Signing in…":"Sign in",style:Eve(p),disabled:p,type:"submit"})],onSubmit:m})],style:wve})}let QN=Cve;function Rve(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(Vq(e.routes,n),i)}let Ave=Rve;function Tve(e){return e.button===0&&!e.altKey&&!e.ctrlKey&&!e.metaKey?!e.shiftKey:!1}function $ve(e){let t=Et(sv),r=FP(t.prefix,e.route),n=i=>{if(!i.defaultPrevented&&Tve(i))return i.preventDefault(),Es(r)};return y("a",{children:e.children,href:r,onClick:n})}let Nve=$ve,jp=or(void 0),Dve=jp.Provider;function Fve(e){let t=e.initialPages,r=t!==void 0?t:[],n=de(()=>r),i=n[1],o=de(()=>[]),a=o[1],s=n[0].concat(o[0]);return _r(Dve,{value:{register:m=>i(g=>g.concat(m)),deregister:m=>i(g=>g.filter(v=>v.fragmentId!==m)),setPluginPages:m=>a(g=>m),getPages:()=>s,getPage:m=>s.find(g=>g.fragmentId===m)},children:e.children})}let Ive={make:Fve};function j5(){let e=Et(jp);return e!==void 0?e.getPages():[]}function q5(e){return!D(e.menuEntry.hidden,!1)}let Pve=[];function Ove(e){return!1}let Mve={activeAccess:Pve,hasAccess:Ove},V5=or(Mve),Lve=V5.Provider;function zve(e){let t=e.access;return _r(Lve,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function Ms(){return Et(V5).hasAccess}let Uve=zve;function pu(e){return"var("+e+")"}let Bve=w([z("flex"),ee("center"),c("gap",pu(O.sm)),c("padding","6px var("+O.sm+") 6px 14px"),c("border-radius",pu(Z.md)),c("color",pu(x.textDisabled)),c("font-size",pu($.sizeSm)),Ce("notAllowed"),fO("none")]),jve=w([c("font-size","14px"),Un(0)]),qve=w([Yn(1),c("font-weight",pu($.weightMedium))]),Vve=w([c("font-size",pu($.sizeXs)),c("color",pu(x.brand)),Ce("pointer"),c("text-decoration","none"),Un(0)]);function Gve(e){return L("div",{children:[y("span",{children:"[locked]",className:jve}),y("span",{children:e.label,className:qve}),y("span",{children:"Upgrade",className:Vve})],className:Bve})}let Kve=Gve;function Hve(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function Gn(e){return"var("+e+")"}let Wve=w([z("flex"),_e("column"),c("gap","2px"),c("padding","var("+O.sm+")"),fr("& a",[c("text-decoration","none"),c("color","inherit"),c("display","block"),c("outline-offset","2px")])]),Jve=w([c("color",Gn(x.textDisabled)),c("font-size",Gn($.sizeXs)),c("font-weight",Gn($.weightBold)),c("letter-spacing","0.08em"),c("text-transform","uppercase"),c("padding","var("+O.xs+") var("+O.sm+")"),sa(Ae(12)),bp(Ae(2))]),YN=w([Mt("relative"),z("flex"),ee("center"),c("gap",Gn(O.sm)),c("padding","6px var("+O.sm+") 6px 14px"),c("color",Gn(x.textSecondary)),c("font-size",Gn($.sizeMd)),c("line-height","1.4"),Ce("pointer"),c("border-radius",Gn(Z.md)),c("text-decoration","none"),c("transition","background-color 140ms ease, color 140ms ease, transform 140ms ease"),fr("&::before",[c("content","''"),Mt("absolute"),c("left","4px"),c("top","50%"),c("width","3px"),c("height","0"),c("border-radius",Gn(Z.full)),c("background",Gn(x.brand)),c("transform","translateY(-50%)"),c("transition","height 160ms ease")]),qe([c("background",Gn(x.surfaceSubtle)),c("color",Gn(x.textPrimary)),c("transform","translateX(2px)")]),nw("(prefers-reduced-motion: reduce)",[c("transition","none"),qe([c("transform","none")]),fr("&::before",[c("transition","none")])])]),Qve=w([c("background",Gn(x.brandSubtle)),c("color",Gn(x.textPrimary)),c("font-weight",Gn($.weightMedium)),fr("&::before",[c("height","56%")]),qe([c("background",Gn(x.brandSubtle)),c("color",Gn(x.textPrimary)),c("transform","none")])]),Yve=w([c("font-size","14px"),c("line-height","1"),Un(0)]),Xve=w([c("white-space","nowrap"),c("overflow","hidden"),c("text-overflow","ellipsis")]),Zve=w([c("font-size","12px"),c("color",Gn(x.textDisabled)),vp("auto"),Un(0)]);function ebe(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function tbe(e){let t=e.hasAccess,r=e.isActive,n=e.page,i=ne(n.requiredAccess,!1,l=>!t(l)),o=r?YN+" "+Qve:YN,a=L(cr,{children:[ne(n.menuEntry.icon,null,l=>y("span",{children:l,"aria-hidden":!0,className:Yve})),y("span",{children:n.menuEntry.label,className:Xve}),i?y("span",{children:"[locked]",className:Zve}):null]}),s=n.url;return!i&&s!==void 0?y(Nve,{route:s,children:y("span",{children:a,"aria-current":r?"page":void 0,className:o})}):y("div",{children:a,className:o,role:"button"})}function XN(e){let t=e.hasAccess,r=e.currentUrl,n=e.pages.toSorted((i,o)=>GS(i.menuEntry.sortOrder,o.menuEntry.sortOrder));return L(cr,{children:[ne(e.label,null,i=>y("div",{children:i,className:Jve})),n.map(i=>y(tbe,{page:i,isActive:ebe(i,r),hasAccess:t},i.fragmentId))]})}function rbe(e){let t=e.currentUrl,r=j5(),n=Ms(),i=r.filter(q5),o={};i.forEach(l=>{let u=D(l.menuEntry.group,""),d=D(o[u],[]);o[u]=d.concat([l])});let a=D(o[""],[]),s=Object.entries(o).filter(l=>l[0]!=="").toSorted((l,u)=>{let d=tt(l[1],999,(h,p)=>h<p.menuEntry.sortOrder?h:p.menuEntry.sortOrder),f=tt(u[1],999,(h,p)=>h<p.menuEntry.sortOrder?h:p.menuEntry.sortOrder);return GS(d,f)});return L("nav",{children:[a.length!==0?y(XN,{label:void 0,pages:a,currentUrl:t,hasAccess:n}):null,s.map(l=>{let u=l[1],d=l[0];switch(Hve(u,n)){case"Active":return y(XN,{label:d,pages:u,currentUrl:t,hasAccess:n},d);case"Locked":return y(Kve,{label:d},d);case"Absent":return null}})],"aria-label":"primary navigation",className:Wve})}let nbe=rbe,G5=or(void 0),ibe=G5.Provider;function obe(e){return _r(ibe,{value:e.target,children:e.children})}let abe={make:obe};function sbe(){return Et(G5)}function ZN(e,t){return e!==void 0?DP(t,jt(e)):t}function Eo(e){return"var("+e+")"}let K5="52px",lbe=w([z("flex"),_e("row"),cO({NAME:"vh",VAL:100}),c("overflow","hidden"),c("background",Eo(x.background)),c("font-family",Eo($.fontFamily)),c("color",Eo(x.textPrimary))]),ube=w([z("flex"),_e("column"),c("width","236px"),Un(0),c("background",Eo(x.surface)),c("border-right","1px solid var("+x.borderSubtle+")"),c("overflow","hidden")]),cbe=w([z("flex"),ee("center"),c("gap",Eo(O.sm)),c("height",K5),Un(0),c("padding","0 var("+O.md+")"),c("color",Eo(x.textPrimary)),c("font-size",Eo($.sizeLg)),c("font-weight",Eo($.weightBold)),c("letter-spacing","-0.01em")]),dbe=w([c("white-space","nowrap"),c("overflow","hidden"),c("text-overflow","ellipsis")]),fbe=w([Yn(1),c("overflow-y","auto"),c("min-height","0")]),hbe=w([z("flex"),_e("column"),Yn(1),c("min-width","0"),c("overflow","hidden")]),pbe=w([z("flex"),ee("center"),c("flex-wrap","nowrap"),c("gap",Eo(O.md)),c("min-height",K5),Un(0),c("padding","var("+O.xs+") var("+O.lg+")"),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("background",Eo(x.surface))]),mbe=w([z("flex"),ee("center"),Yn(1),c("min-width","0")]),gbe=w([z("flex"),ee("center"),c("gap",Eo(O.sm)),Un(0),c("margin-left","auto")]),vbe=w([z("flex"),_e("column"),Yn(1),c("overflow","auto"),c("padding","var("+O.md+") var("+O.lg+")"),c("background",Eo(x.background))]);function bbe(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",a=n!==void 0?n:"404 — Page not found",s=r!==void 0?r:!0,l=t!==void 0?t:null,u=IP(),d=de(()=>{}),f=d[1],h=p=>{let m=p==null?void 0:Jt(p);f(g=>g!==void 0&&p!=null&&jt(g)===p?g:m)};return L("div",{children:[L("aside",{children:[L("div",{children:[ne(e.logoUrl,null,p=>y("img",{style:{height:"22px"},alt:o,src:p})),y("span",{children:o,className:dbe,title:o})],className:cbe}),y("div",{children:y(nbe,{currentUrl:u}),className:fbe})],className:ube}),L("main",{children:[L("div",{children:[y("div",{ref:Jt(h),className:mbe}),ne(e.headerSlot,null,p=>y("div",{children:p,className:gbe}))],className:pbe}),y("div",{children:y(abe.make,{target:d[0],children:s?y(Ave,{url:u,routes:e.router,children:a}):l}),className:vbe})],className:hbe})],className:lbe})}let _be=bbe,qp=or(void 0),ybe=qp.Provider;function xbe(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=de(()=>n),a=o[1],s=de(()=>[]),l=s[1],u=o[0].concat(s[0]);return _r(ybe,{value:{register:b=>a(_=>_.concat(b)),deregister:b=>a(_=>_.filter(S=>S.extensionPackage!==b)),setPluginPanels:b=>l(_=>b),getPanel:b=>u.find(_=>_.fragmentId===b),getPanelsForPosition:b=>u.filter(_=>_.positions.some(S=>S===b)),hasAccess:b=>i.some(_=>_===b)},children:e.children})}let Sbe={make:xbe};function wbe(e){let t=Et(qp);return t!==void 0?t.getPanelsForPosition(e):[]}function Ebe(e){let t=Et(qp);if(t!==void 0)return t.getPanel(e)}function Q2(e){return"/"+e.environment+"/"+e.platformName}function H5(e){let t=e.split("?")[0],r=t.split("/").filter(l=>l!==""),n=r[0],i=r[1];if(n===void 0||i===void 0)return;let o={environment:n,platformName:i},a=Q2(o),s=t.startsWith(a)?t.slice(a.length):"/";return[o,s===""?"/":s]}let kbe=or(void 0),Cbe=kbe.Provider;function Rbe(e){return _r(Cbe,{value:e.scope,children:e.children})}let W5={make:Rbe};function Abe(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 J5=or(void 0),Q5=or({routes:[],publicLinks:Cu()}),Y5=or(!1),Tbe=J5.Provider;function $be(e){return _r(Tbe,{value:e.value,children:e.children})}let Nbe=Q5.Provider;function Dbe(e){return _r(Nbe,{value:e.value,children:e.children})}let Fbe=Y5.Provider;function Ibe(e){return _r(Fbe,{value:e.value,children:e.children})}function Pbe(e){let t=de(()=>({routes:[],publicLinks:Cu()})),r=t[1],n=t[0],i=de(()=>({routes:[],publicLinks:Cu()})),o=i[1],a=i[0],s=de(()=>!1),l=s[1],u=n.routes.concat(a.routes),d=M1(n.publicLinks,a.publicLinks),f={routes:u,publicLinks:d};return y($be,{value:{register:(g,v)=>r(b=>({routes:b.routes.concat(g),publicLinks:M1(b.publicLinks,v)})),setPluginRoutes:(g,v)=>{o(b=>({routes:g,publicLinks:v})),l(b=>!0)}},children:y(Ibe,{value:s[0],children:y(Dbe,{value:f,children:y(Qq.make,{registry:d,children:e.children})})})})}let Obe={make:Pbe};function Y2(){return Et(J5)}function Mbe(){return Et(Y5)}function Lbe(){let e=Et(Q5).routes;return Tt(()=>jq(Abe(e.toReversed())),[e])}function Tf(e){return"var("+e+")"}let zbe=w([c("background",Tf(x.surface)),c("color",Tf(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",Tf(Z.sm)),c("padding","4px 8px"),c("font-size",Tf($.sizeSm)),c("font-family",Tf($.fontFamily)),Ce("pointer")]);function Ube(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}let Bbe=["Light","Dark","Neutral","HighContrast"];function jbe(e){let t=Zle(),r=t.setPreset,n=i=>{let o=i.target.value;r(L8(o))};return y("select",{children:Bbe.map(i=>{let o=Bx(i);return y("option",{children:Ube(i),value:o},o)}),className:zbe,value:Bx(t.preset),onChange:n})}let qbe=jbe;function e3(e){return Object.fromEntries([["eq",e]])}function Vbe(e,t){let r=he.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=k(n.filter,he.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=e3(t.environment),o.platformName=e3(t.platformName),n.filter=o,n}let Gbe=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,Kbe=/\$filter\s*:/,t3={};function Hbe(e){if(t3[e]===void 0){t3[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 Wbe(e){return t=>((r,n)=>Gbe.test(r)?t(r,Vbe(n,e)):(Kbe.test(r)&&Hbe(r),t(r,n)))}let Jbe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+$.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+Z.md+")"},Qbe={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+$.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+Z.sm+")",alignItems:"center",justifyContent:"space-between"},Ybe={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",fontSize:"var("+$.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+Z.full+")"};function Xbe(e){let t=e.discover,r=si(),n=de(()=>"Loading"),i=n[1],o=n[0];De(()=>{r!==void 0?(i(s=>"Loading"),Ft(t(r).then(s=>i(l=>({TAG:"Loaded",_0:s}))),s=>{let l=D(k(tq(s),u=>u.message),"Platform discovery failed");return i(u=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(s=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[ke(r)]);let a;if(typeof o!="object")a=y("div",{children:"Discovering platforms…",style:{color:"var("+x.textSecondary+")"}});else if(o.TAG==="Loaded"){let s=o._0;a=s.length!==0?s.map(l=>L("button",{children:[l.platformName,y("span",{children:l.environment,style:Ybe})],style:Qbe,onClick:u=>Es(Q2(l)+"/")},l.environment+"/"+l.platformName)):y("div",{children:"No platforms discovered.",style:{color:"var("+x.textSecondary+")"}})}else a=y("div",{children:o._0,style:{color:"var("+x.error+")",fontSize:"var("+$.sizeSm+")"}});return L("div",{children:[y("h1",{children:"Select a platform",style:{fontSize:"var("+$.sizeXl+")",fontWeight:"var("+$.weightBold+")",margin:"0 0 1.5rem"}}),a],style:Jbe})}let Zbe=Xbe;function hy(e){return k(e,t=>{if(t.trim()!=="")return t})}function $f(e,t,r,n,i){let o=i!==void 0?i:!1,a=k(n,u=>u.nav),s=o?hy(k(a,u=>u.scopedLabel)):void 0,l=s!==void 0?s:hy(k(a,u=>u.label));return{label:D(l,t),icon:void 0,group:D(hy(k(a,u=>u.group)),e),sortOrder:D(k(a,u=>u.order),r),hidden:k(a,u=>u.hidden)}}function e_e(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function t_e(e,t){return e+"_"+t+"EventHistory"}function r_e(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
|
|
71
|
+
`+e+`(
|
|
72
|
+
filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
|
|
73
|
+
first: $first
|
|
74
|
+
after: $after
|
|
75
|
+
) {
|
|
76
|
+
edges {
|
|
77
|
+
node {
|
|
78
|
+
position
|
|
79
|
+
eventType
|
|
80
|
+
payload
|
|
81
|
+
tags { key value }
|
|
82
|
+
meta { user time correlationId causationId }
|
|
83
|
+
recordedAt
|
|
84
|
+
}
|
|
85
|
+
cursor
|
|
86
|
+
}
|
|
87
|
+
pageInfo { hasNextPage endCursor }
|
|
88
|
+
}
|
|
89
|
+
}`}function n_e(e){return ne(k(G(e),t=>F(t,"x-reventless-audit")),!1,t=>{let r=We(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let r3={contents:[]};function n3(e){if(!r3.contents.includes(e)){r3.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 i_e(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=e_e(e.queryField);if(r!==void 0){if(n!==void 0){let i=t_e(n,r);return{queryField:i,queryDocument:r_e(i),displayName:r}}n3(e.name);return}n3(e.name)}function tl(e,t){return k(F(e,t),ie)}function o_e(e){let t=D(G(e),{}),r=D(k(F(t,"meta"),G),{}),n=Q(D(k(F(t,"tags"),_t),[]),s=>{let l=D(G(s),{}),u=tl(l,"key"),d=tl(l,"value");if(u!==void 0&&d!==void 0)return[u,d]}),i=tl(t,"position"),o=tl(t,"eventType");if(i===void 0||o===void 0)return;let a=D(tl(r,"time"),D(tl(t,"recordedAt"),""));return{position:i,eventType:o,payload:D(F(t,"payload"),{}),tags:n,actor:tl(r,"user"),time:a,recordedAt:D(tl(t,"recordedAt"),a)}}function a_e(e,t){return Q(kE(e,t),o_e)}function s_e(e,t){let r=k8(e,t);return[r.hasNextPage,r.endCursor]}function l_e(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return ct(r).toLowerCase()}function u_e(e){return D(q(G(e),$e),[]).filter(t=>t[0]!=="TAG")}function c_e(e){let t={};return e.map(r=>{let n=JSON.stringify(Oe($e(t)),null,2);u_e(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(Oe($e(t)),null,2);return[n,i]})}let d_e="System";function f_e(e,t){let r=c_e(e);return e.map((n,i)=>{let o=D(r[i],["",""]),a=ne(n.tags[0],t,s=>t+" "+s[1]);return{id:n.position,verb:l_e(n.eventType,t),subject:a,actor:D(n.actor,d_e),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function h_e(e){let t=[];return e.forEach(r=>re(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(dd)}function p_e(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(dd)}function Hi(e){return"var("+e+")"}let m_e=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap",Hi(O.lg)),c("padding",Hi(O.xxl)),la({NAME:"percent",VAL:100}),cO({NAME:"percent",VAL:100}),qa("center"),c("min-height","400px")]),g_e=w([c("font-size","48px"),c("line-height","1")]),v_e=w([c("color",Hi(x.textPrimary)),c("font-size",Hi($.sizeXxl)),c("font-weight",Hi($.weightBold)),hn(Ae(0))]),b_e=w([c("color",Hi(x.textSecondary)),c("font-size",Hi($.sizeLg)),c("line-height",Hi($.lineHeightRelaxed)),c("max-width","480px"),hn(Ae(0))]),__e=w([c("background",Hi(x.brand)),c("color",Hi(x.textOnBrand)),c("border-radius",Hi(Z.md)),c("padding","var("+O.sm+") var("+O.lg+")"),c("font-size",Hi($.sizeMd)),c("font-weight",Hi($.weightMedium)),c("border","none"),c("cursor","pointer"),sa(Ae(8))]);function y_e(e){let t=e.definition;return L("div",{children:[y("div",{children:"[locked]",className:g_e}),y("h2",{children:t.title,className:v_e}),y("p",{children:ne(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:b_e}),y("button",{children:"Upgrade to unlock",className:__e})],className:m_e})}let x_e=y_e;function S_e(e){let t=e.children,r=e.definition,n=Ms(),i=r.requiredAccess;return i!==void 0&&!n(i)?y(x_e,{definition:r}):t}let Bm=S_e,w_e=F;function i3(e,t){let r=k(t[0],n=>F(e,n));if(r!==void 0&&t.every(n=>Re(F(e,n),r)))return r}function B0(e,t,r){let n=F(e,t);return n!==void 0?r(n):!0}function X2(e,t,r){return Q(t,n=>{let i=F(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}let Z2=["body","text","message","comment","content"],E_e=["author","createdby","user","commenter","postedby"],k_e=["createdat","postedat","at","commentedat"];function X5(e){return Q(Pr(e),t=>{if(xp(t[1]))return t[0]})}function ek(e,t){return X5(e).find(r=>t.includes(r.toLowerCase()))}function C_e(e){let t=xn(e,void 0,void 0),r=Pr(e).map(n=>n[0]).find(n=>ne(F(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:ek(e,E_e)}function R_e(e){return Q(Pr(e),t=>{if(wv(t[1]))return t[0]}).find(t=>k_e.includes(t.toLowerCase()))}function Z5(e){return X5(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function ez(e,t){let r=xo(t).toLowerCase();return Z5(e).find(n=>n.toLowerCase()===r+"id")}function A_e(e){let t=Z5(e);if(t.length===1)return t[0]}function T_e(e){return ne(k(G(e),t=>F(t,"x-reventless-comments")),!1,t=>{let r=We(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function o3(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=xo(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let $_e=["addcomment","postcomment","comment","writecomment","leavecomment"];function N_e(e,t){let r=Q(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>$_e.some(i=>n.name.toLowerCase().startsWith(i)))}let a3={contents:[]};function D_e(e){if(!a3.contents.includes(e)){a3.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 '+Z2.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function F_e(e,t){return Q(e.readModels.filter(r=>r.name!==t?T_e(r.schema)?!0:o3(r.name,t):!1),r=>{let n=ez(r.schema,t),i=n!==void 0?n:o3(r.name,t)?A_e(r.schema):void 0,o=ek(r.schema,Z2);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:C_e(r.schema),timestampField:R_e(r.schema),postCommand:N_e(r,e)}:void 0;D_e(r.name)})[0]}function kc(e,t){return k(F(e,t),ie)}function I_e(e,t,r){let n=Q(t,o=>{let a=D(G(o),{});if(Re(kc(a,e.entityField),r))return a}),i=o=>k(k(e.timestampField,a=>kc(o,a)),Qn);return n.toSorted((o,a)=>{let s=i(o),l=i(a);return s!==void 0?l!==void 0?s-l:-1:l!==void 0?1:0}).map((o,a)=>({id:D(kc(o,"id"),"#"+a.toString()),body:D(kc(o,e.bodyField),""),author:k(e.authorField,s=>kc(o,s)),timestamp:k(e.timestampField,s=>kc(o,s))}))}function P_e(e,t,r){let n=e.postCommand,i=D(k(n,a=>a.aggregateIdField),e.entityField),o=D(k(n,a=>ek(a.schema,Z2)),e.bodyField);return Oe([[i,t],[o,r]])}function Vp(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||ke(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||ke(e.index)||e.scanSort;return{filter:t,sort:r}}function s3(e){return Vp(e.ann)}function tz(e){let t=ke(EO(e)),r=Sv(e).length!==0,n=kO(e).length!==0;return{search:t||r||n}}function nS(e){let r=D(q(k(k(G(e),a=>F(a,"properties")),G),$e),[]).map(a=>Vp(Do(a[1]))),n=r.some(a=>a.filter),i=r.some(a=>a.sort),o=tz(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function l3(e,t){let r={},n={};return $e(e).forEach(i=>{let o=i[1];if(o==="")return;let a=i[0],s=t.find(l=>l.key===a);if(s!==void 0){Vp(s.ann).filter?r[a]=o:n[a]=o;return}n[a]=o}),[r,n]}function u3(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?Vp(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function rz(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),$e(e).forEach(o=>{let a=o[1],s=o[0],l=n.find(f=>f.key===s),u=q(l,f=>f.kind),d;if(u!==void 0&&typeof u!="object")switch(u){case"KBoolean":d=a==="true";break;case"KNumber":d=D(q(ks(a),f=>f),a);break;default:d=a}else d=a;i[s+"Eq"]=d}),$e(i).length!==0)return i}function O_e(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return Oe([["field",e._0],["direction",t]])}function M_e(e,t){return ne(Pr(e).find(r=>r[0]===t),!1,r=>Vp(Do(r[1])).filter)}let c3={contents:[]};function L_e(e,t,r){let n=e+"."+t;if(!c3.contents.includes(n)){c3.contents.push(n),console.error('[AutoUI] View "'+e+'" references "'+r+'" through "'+t+'", but the server cannot filter on that field — so "'+r+'" gets no "'+e+'" panel on its detail page. Annotate '+t+" with @index (or @scan, for a small view) on the read model's state so the connection gains a "+t+"Eq filter; see docs/guides/related-rows.md.");return}}function z_e(e,t){return Q(e.readModels.filter(r=>r.name!==t),r=>{let n=ez(r.schema,t);if(n!==void 0){if(M_e(r.schema,n))return{readModel:r,refField:n};L_e(r.name,n,t);return}})}function U_e(e,t,r){return t!==void 0?Q(t,n=>{let i=e.find(o=>o.readModel.name===n);if(i!==void 0)return i;console.error("[AutoUI] uiHints.views."+r+'.related names "'+n+'", which does not reference '+r+" through a filterable field — no panel for it. Detected: "+e.map(o=>o.readModel.name).join(", ")+".")}):e}function B_e(e,t){return e+"."+t.readModel.name}function j_e(e,t){let r=G(e);if(r===void 0)return e;let n=Oe($e(r)),i=k(F(n,"properties"),G);if(i===void 0)return e;let o=Oe($e(i).filter(s=>s[0]!==t));n.properties=o;let a=k(F(n,"required"),_t);return a!==void 0&&(n.required=a.filter(s=>Ma(ie(s),t))),n}function q_e(e,t){let r={};return re(rz(Oe([[e.refField,t]]),"",{search:!1},[]),n=>{r.filter=n}),r}function Ca(e){return"var("+e+")"}function nz(e){switch(e){case"Success":return x.success;case"Warning":return x.warning;case"Error":return x.error;case"Info":return x.info}}function V_e(e){return w([z("flex"),ee("flexStart"),c("gap",Ca(O.sm)),c("padding","var("+O.sm+") var("+O.md+")"),c("border-radius",Ca(Z.md)),c("border-left","3px solid var("+nz(e)+")"),c("background",Ca(x.surfaceElevated)),c("font-size",Ca($.sizeMd)),c("line-height",Ca($.lineHeightNormal))])}function G_e(e){return w([c("color",Ca(nz(e))),c("font-size","16px"),Un(0),sa(Ae(1))])}let K_e=w([Yn(1)]),H_e=w([c("font-weight",Ca($.weightMedium)),c("color",Ca(x.textPrimary)),bp(Ae(2))]),W_e=w([c("color",Ca(x.textSecondary))]),J_e=w([c("background","none"),rW(Ae(0),"none",sW),Ce("pointer"),c("color",Ca(x.textSecondary)),c("font-size","16px"),c("line-height","1"),c("padding","0"),Un(0)]);function Q_e(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function Y_e(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[y("span",{children:Q_e(r),className:G_e(r)}),L("div",{children:[ne(e.title,null,n=>y("div",{children:n,className:H_e})),y("div",{children:e.message,className:W_e})],className:K_e}),ne(e.onDismiss,null,n=>y("button",{children:"×","aria-label":"Dismiss",className:J_e,onClick:i=>n()}))],className:V_e(r),role:"alert"})}let tk=Y_e;function Oa(e){return"var("+e+")"}let X_e=w([Mt("fixed"),Fs(Ae(0)),Id(Ae(0)),Bl(Ae(0)),tw(Ae(0)),c("background","rgba(0,0,0,0.5)"),z("flex"),ee("center"),Je("center"),c("z-index","1000"),c("backdrop-filter","blur(2px)")]),Z_e=w([c("background",Oa(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Oa(Z.lg)),c("box-shadow",Oa(Pn.lg)),z("flex"),_e("column"),c("max-height","90vh"),c("max-width","90vw"),c("min-width","400px"),c("overflow","hidden")]),eye=w([z("flex"),ee("center"),Je("spaceBetween"),c("padding","var("+O.md+") var("+O.lg+")"),c("border-bottom","1px solid var("+x.borderSubtle+")"),Un(0)]),tye=w([c("color",Oa(x.textPrimary)),c("font-size",Oa($.sizeLg)),c("font-weight",Oa($.weightMedium)),hn(Ae(0))]),rye=w([c("background","none"),c("border","none"),c("cursor","pointer"),c("color",Oa(x.textSecondary)),c("font-size","18px"),c("padding","0"),c("line-height","1"),qe([c("color",Oa(x.textPrimary))])]),nye=w([c("padding",Oa(O.lg)),c("overflow-y","auto"),Yn(1)]),iye=w([z("flex"),ee("center"),Je("flexEnd"),c("gap",Oa(O.sm)),c("padding","var("+O.md+") var("+O.lg+")"),c("border-top","1px solid var("+x.borderSubtle+")"),Un(0)]);function oye(e){let t=e.onClose,r=e.isOpen;return De(()=>{if(!r)return;let n=i=>{if(i.key==="Escape")return t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[r]),r?y("div",{children:L("div",{children:[L("div",{children:[y("h2",{children:e.title,className:tye}),y("button",{children:"x",className:rye,onClick:n=>t()})],className:eye}),y("div",{children:e.children,className:nye}),ne(e.footer,null,n=>y("div",{children:n,className:iye}))],className:Z_e,style:ne(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:X_e,onClick:n=>t()}):null}let rk=oye;function aye(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function sye(e){let t=he.object(e);if(t===void 0)return;let r=s=>k(t[s],he.string),n=t.state,i=n!==void 0&&ke(he.object(n))?n:void 0,o=k(r("changeKind"),aye),a=r("id");if(o!==void 0&&a!==void 0)return{changeKind:o,id:a,sortKeyValue:r("sortKeyValue"),state:i,seq:r("seq")}}function d3(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let f3="default";function lye(e,t){let r=d3(e);return typeof t!="object"?"/"+f3+"/"+r+"/*":"/"+f3+"/"+r+"/"+d3(t._0)}function iS(e,t,r,n,i){let o=r!==void 0?r:!0,a=Bp(),s=lye(e,t),l=Pe(n);De(()=>{l.current=n},[n]);let u=Pe(i);De(()=>{u.current=i},[i]),De(()=>{if(!o||a===void 0)return;let d=a.apiForReadModel(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let m=a.subscribe(d,s,v=>{let b=sye(v);if(b!==void 0)return l.current(b)});f.contents=m;let g=a.registerReconnect(d,()=>re(u.current,v=>v()));h.contents=g},100);return()=>{clearTimeout(p);let m=f.contents;m!==void 0&&m();let g=h.contents;if(g!==void 0)return g()}},[s,o,a])}function eo(e){return"var("+e+")"}let uye=w([z("flex"),_e("column"),c("gap",eo(O.sm))]),cye=w([c("overflow-x","auto")]),dye=w([c("border-collapse","collapse"),c("font-size",eo($.sizeSm)),c("min-width","min-content")]),nk=[c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("background",eo(x.surfaceSubtle)),c("white-space","nowrap"),c("font-weight",eo($.weightMedium))],fye=w(nk.concat([c("text-align","left"),c("color",eo(x.textSecondary))])),hye=w(nk.concat([c("text-align","right"),c("color",eo(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",eo($.sizeXs))])),pye=w(nk.concat([c("text-align","left"),c("color",eo(x.textPrimary))]));function mye(e){return w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("text-align","right"),c("white-space","nowrap"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("color",e>=.55?eo(x.textOnBrand):e<=0?eo(x.textDisabled):eo(x.textPrimary))])}let gye=w([z("flex"),ee("center"),c("gap","6px"),c("font-size",eo($.sizeXs)),c("color",eo(x.textSecondary))]);function vye(e){return w([c("width","18px"),c("height","10px"),c("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),c("border","1px solid var("+x.borderSubtle+")")])}function iz(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function bye(e){return tt(e,0,(t,r)=>tt(r,t,(n,i)=>i.value>n?i.value:n))}let oz=[.12,.35,.6,.85,1];function _ye(e){let t=e.cells,r=e.colHeaders,n=bye(t);return L("div",{children:[y("div",{children:L("table",{children:[y("thead",{children:L("tr",{children:[y("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:fye,scope:"col"}),r.map(i=>y("th",{children:i.label,className:hye,scope:"col"},i.value))]})}),y("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[y("th",{children:i.label,className:pye,scope:"row"}),r.map((a,s)=>{let l=D(k(t[o],u=>u[s]),{value:0,display:""});return y("td",{children:y("span",{children:l.display,title:i.label+" × "+a.label+": "+l.display}),className:mye(iz(l.value,n))},i.value+":"+a.value)})]},i.value))})],className:dye}),className:cye}),L("div",{children:["0",oz.map(i=>y("span",{className:vye(i)},i.toString())),e.maxLabel],className:gye})],className:uye})}let yye=_ye;function xye(e,t){let r=a=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(a,s,l)=>{if(typeof a!="object")switch(a){case"Function":case"Lazy":s[l]=r;return;case"Class":s[l]=[r,r,r,0];return}else{if(a.TAG!=="Module"){s[l]=a._0;return}let u=a._0,d={};s[l]=d;let f=u.length;for(let h=0;h<f;++h){let p=u[h];n(p[0],d,p[1])}return}},i={},o="dummy";return n(t,i,o),i[o]}function Sye(e,t,r){let n=(i,o,a,s,l)=>{if(typeof i!="object")switch(i){case"Function":s[l]=a;return;case"Lazy":case"Class":Object.assign(o,a);return}else{if(i.TAG!=="Module")return;let u=i._0;for(let d=0,f=u.length;d<f;++d){let h=u[d],p=h[1];n(h[0],o[p],a[p],o,p)}return}};if(typeof e!="object")throw{RE_EXN_ID:"Assert_failure",_1:["Primitive_module.res",68,9],Error:new Error};{let i=e._0;for(let o=0,a=i.length;o<a;++o){let s=i[o],l=s[1];n(s[0],t[l],r[l],t,l)}return}}function oS(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function wye(e,t,r){let n=k(F(e,t),oS);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let a=o,s=i;if(a>r)return!0;let l=k(F(e,s),oS);if(l===void 0)return!1;if(l===t)return!0;o=a+1|0,i=l}}}else return!1}function Eye(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},a={contents:0};e.forEach(l=>{let u=oS(l);if(u!==void 0){if(F(t,u)!==void 0){if(wye(t,l.key,r)){a.contents=a.contents+1|0,i.push(l.key);return}let f=D(F(n,u),[]);n[u]=f.concat([l.key]);return}o.contents=o.contents+1|0,i.push(l.key);return}i.push(l.key)});let s=(l,u)=>{let d=F(t,l);if(d===void 0)return;let f=u>=r?[]:Q(D(F(n,l),[]),h=>s(h,u+1|0));return{node:d,children:f}};return{roots:Q(i,l=>s(l,0)),detached:o.contents,cycles:a.contents}}function az(e){return tt(e.children,e.children.length,(t,r)=>t+az(r)|0)}let kye="14px";function In(e){return"var("+e+")"}let Cye=w([z("flex"),_e("column"),c("gap",In(O.sm))]),Rye=w([c("overflow-x","auto"),c("padding-bottom","4px")]),Aye=w([z("flex"),ee("flexStart"),Je("center"),c("gap",In(O.lg)),c("min-width","min-content"),c("padding","var("+O.xs+") 0")]),Tye=w([z("flex"),_e("column"),ee("center"),c("min-width","min-content")]);function $ye(e){return w([z("flex"),_e("column"),c("gap","2px"),c("min-width","132px"),c("max-width","180px"),c("padding","var("+O.xs+") var("+O.sm+")"),c("border","1px solid var("+x.borderSubtle+")"),c("border-top","3px solid "+e),c("border-radius",In(Z.md)),c("background",In(x.surface)),c("text-align","left"),Ce("pointer"),qe([c("background",In(x.surfaceSubtle))])])}let Nye=w([c("font-size",In($.sizeSm)),c("font-weight",In($.weightMedium)),c("color",In(x.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Dye=w([c("font-size",In($.sizeXs)),c("color",In(x.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Fye=w([c("margin-top","2px"),c("padding","0 6px"),c("border","1px solid var("+x.border+")"),c("border-radius","10px"),c("background",In(x.surface)),c("color",In(x.textSecondary)),c("font-size",In($.sizeXs)),c("line-height","16px"),Ce("pointer"),qe([c("color",In(x.textPrimary))])]),h3=w([c("width","1px"),c("height",kye),c("background",In(x.border))]),Iye=w([z("flex"),ee("flexStart"),c("min-width","min-content")]),Pye=w([z("flex"),_e("column"),ee("center"),c("min-width","min-content")]),Oye=w([c("padding","0 var("+O.xs+")")]),Mye=w([z("flex"),c("width","100%"),c("height","1px")]);function p3(e){return w([c("flex","1 1 50%"),c("background",e?In(x.border):"transparent")])}let Lye=w([c("font-size",In($.sizeXs)),c("color",In(x.textDisabled))]),zye="var("+x.brand+")",ik=xye(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function Uye(e){let t=e.depth,r=e.tree,n=de(()=>!1),i=n[1],o=n[0],a=az(r),s=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[y("span",{children:r.node.title,className:Nye}),l!==void 0&&l!==""?y("span",{children:l,className:Dye}):null],className:$ye(D(r.node.accent,zye)),title:r.node.title,onClick:u=>re(r.node.onOpen,d=>d())}),s===0?null:L(cr,{children:[y("button",{children:o?"+"+a.toString():"−","aria-expanded":!o,className:Fye,title:o?"Expand":"Collapse",onClick:u=>i(d=>!d)}),o?null:L(cr,{children:[y("div",{className:h3}),y("div",{children:r.children.map((u,d)=>L("div",{children:[L("div",{children:[y("div",{className:p3(d>0)}),y("div",{className:p3(d<(s-1|0))})],className:Mye}),y("div",{className:h3}),y("div",{children:y(ik.make,{tree:u,depth:t+1|0}),className:Oye})],className:Pye},u.node.key)),className:Iye})]})]})],className:Tye})}Sye({_0:[["Function","make"]]},ik,{make:Uye});function Bye(e){let t=Eye(e.nodes);if(t.roots.length===0)return y(Pd,{title:"Nothing to chart",description:"No rows in this window."});let r=Q([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:[y("div",{children:y("div",{children:t.roots.map(n=>y(ik.make,{tree:n,depth:0},n.node.key)),className:Aye}),className:Rye}),r.length===0?null:y("span",{children:r.join(" · "),className:Lye})],className:Cye})}let jye=Bye;function to(e){return"var("+e+")"}let qye=w([Mt("relative"),c("padding-left","28px"),z("flex"),_e("column"),c("gap",to(O.md))]),Vye=w([Mt("absolute"),Id(Ae(7)),Fs(Ae(8)),tw(Ae(0)),c("width","2px"),c("background",to(x.borderSubtle))]),Gye=w([Mt("absolute"),Id(Ae(-21)),Fs(Ae(6)),c("width","10px"),c("height","10px"),c("border-radius","50%"),c("background",to(x.brand)),c("border","2px solid var("+x.surface+")"),Un(0)]),sz=w([Mt("relative"),z("flex"),_e("column"),c("gap","2px")]),Kye=Wr([sz,w([c("background","none"),c("border","none"),c("padding","0"),qa("left"),Ce("pointer"),qe([c("opacity","0.85")])])]),Hye=w([z("flex"),ee("center"),c("gap",to(O.sm))]),Wye=w([c("color",to(x.textDisabled)),c("font-size",to($.sizeXs)),c("font-family",to($.fontFamilyMono))]),Jye=w([c("color",to(x.textPrimary)),c("font-size",to($.sizeMd)),c("font-weight",to($.weightMedium))]),Qye=w([c("color",to(x.textSecondary)),c("font-size",to($.sizeSm)),c("line-height",to($.lineHeightNormal)),vp(Ae(0))]);function Yye(e){let t=e.onSelect,r=n=>L(cr,{children:[y("div",{className:Gye,style:q(n.accent,i=>({background:i}))}),L("div",{children:[y("span",{children:n.timestamp,className:Wye}),ne(n.variant,null,i=>y(Xo,{variant:i,label:n.label})),ne(n.variant,y("span",{children:n.label,className:Jye}),i=>null)],className:Hye}),ne(n.detail,null,i=>y("div",{children:i,className:Qye}))]});return L("div",{children:[y("div",{className:Vye}),e.entries.map(n=>t!==void 0?y("button",{children:r(n),className:Kye,type:"button",onClick:i=>t(n.id)},n.id):y("div",{children:r(n),className:sz},n.id))],className:qye})}let Xye=Yye,Zye="The server did not confirm this command. It may not have been applied.";function lz(e){let t=k(k(G(e),n=>pp(n)[0]),G),r=k(k(t,n=>F(n,"__typename")),ie);if(r===void 0)return{TAG:"NotExecuted",_0:Zye};switch(r){case"CommandAccepted":return"Accepted";case"CommandPending":return"Pending";case"CommandRejected":let n=k(k(t,o=>F(o,"errorCode")),ie),i=k(k(t,o=>F(o,"errorDetail")),ie);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return{TAG:"NotExecuted",_0:"The server answered with an unexpected result type ("+r+")."}}}function e1e(e){let t=lz(e.data);if(typeof t!="object"||t.TAG!=="NotExecuted")return t;let r=t._0,n=e.errors[0];return n!==void 0&&n.message!==""?{TAG:"NotExecuted",_0:n.message}:{TAG:"NotExecuted",_0:r}}function ma(e,t){let r=F(e,t);if(r===void 0)return;let n=ie(r);return n!==void 0?n:k(k(G(r),i=>F(i,"TAG")),ie)}function uz(e,t,r){if(r===void 0)return e;let n=ma(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function t1e(e){let t=e[0];if(t===void 0)return;let r=tt(e,t.start,(i,o)=>o.start<i?o.start:i),n=tt(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[vi(r),ko(vi(n),1)]}function r1e(e,t){let r=(t-e)/aM;return r<=21?"Days":r<=120?"Weeks":"Months"}function m3(e){let t=new Date(e).getMonth()|0;return D(iM[t],"").slice(0,3)}function n1e(e,t){switch(t){case"Days":return Rs(e);case"Weeks":return oM(e).toString()+" "+m3(e);case"Months":let r=new Date(e).getFullYear().toString();return m3(e)+" '"+r.slice(2)}}function i1e(e,t,r){let n=l=>{switch(r){case"Days":return ko(vi(e),l);case"Weeks":return ko(Ev(e),l*7|0);case"Months":return XO(ZO(e),l)}},i=[],o=0;for(;n(o)<t&&o<2e3;){let l=n(o);l>=e&&i.push(l),o=o+1|0}let a=i.length,s=a<=40?1:(a/40|0)+1|0;return KS(i,(l,u)=>{if(No(u,s)===0)return[l,n1e(l,r)]})}function j0(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function dh(e){return e<0?0:e>100?100:e}function aS(e,t,r){let n=dh(j0(e.start,t,r)),o=dh(j0(e.end_>e.start?e.end_:e.start,t,r))-n,a=o<.6?.6:o;return[n+a>100?100-a:n,a]}function cz(e){return e.map(t=>Q(t.dependsOn,r=>q(e.find(n=>n.key===r?n.key!==t.key:!1),n=>({from:n.key,to_:t.key,violated:t.start<n.end_})))).flat()}function o1e(e){return tt(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function dz(e){return cz(e).filter(t=>t.violated)}function a1e(e,t){return dz(e).some(r=>r.to_===t)}let ok="184px";function ur(e){return"var("+e+")"}let s1e=w([z("flex"),_e("column"),c("gap",ur(O.sm))]),l1e=w([z("flex"),ee("center"),Je("spaceBetween"),ai("wrap"),c("gap",ur(O.sm))]),u1e=w([z("inlineFlex"),ee("center"),c("gap",ur(O.xs))]),fz=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",ur(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",ur(x.textSecondary)),c("font-size",ur($.sizeSm)),Ce("pointer"),qe([c("background",ur(x.surfaceSubtle)),c("color",ur(x.textPrimary))])]),c1e=Wr([fz,w([c("background",ur(x.surfaceSubtle)),c("color",ur(x.textPrimary)),c("font-weight",ur($.weightMedium))])]),d1e=w([c("font-size",ur($.sizeMd)),c("font-weight",ur($.weightMedium)),c("color",ur(x.textPrimary))]),f1e=w([c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",ur(Z.md)),c("overflow","hidden")]),hz=w([z("flex"),ee("stretch")]),h1e=Wr([hz,w([c("background",ur(x.surfaceSubtle)),c("border-bottom","1px solid var("+x.borderSubtle+")")])]),p1e=w([c("flex","0 0 "+ok),c("padding","4px var("+O.sm+")"),c("font-size",ur($.sizeXs)),c("color",ur(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),m1e=w([Mt("relative"),c("flex","1 1 auto"),c("height","22px"),c("overflow","hidden")]),g1e=w([Mt("absolute"),c("top","4px"),c("padding-left","3px"),c("border-left","1px solid var("+x.borderSubtle+")"),c("font-size",ur($.sizeXs)),c("color",ur(x.textSecondary)),c("white-space","nowrap"),c("pointer-events","none")]),v1e=w([Mt("relative")]),b1e=Wr([hz,w([c("height","30px"),c("border-top","1px solid var("+x.borderSubtle+")")])]),_1e=w([c("flex","0 0 "+ok),z("flex"),ee("center"),c("gap","4px"),c("padding","0 var("+O.sm+")"),c("font-size",ur($.sizeSm)),c("color",ur(x.textPrimary)),c("border-right","1px solid var("+x.borderSubtle+")"),c("overflow","hidden")]),y1e=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),x1e=w([c("color",ur(x.warning)),c("font-size",ur($.sizeXs)),c("flex","0 0 auto")]),S1e=w([Mt("relative"),c("flex","1 1 auto")]),w1e=w([Mt("absolute"),c("top","0"),c("bottom","0"),c("width","1px"),c("background",ur(x.borderSubtle)),c("opacity","0.6"),c("pointer-events","none")]);function E1e(e){return w([Mt("absolute"),c("top","5px"),c("height","19px"),c("border","none"),c("border-radius",ur(Z.sm)),c("background",e),c("padding","0"),Ce("pointer"),qe([c("filter","brightness(1.12)")])])}let k1e=w([c("outline","2px solid var("+x.warning+")"),c("outline-offset","1px")]),C1e=w([Mt("absolute"),c("top","0"),c("left",ok),c("right","0"),c("bottom","0"),c("pointer-events","none")]),R1e=w([c("display","block"),c("width","100%"),c("height","100%")]),A1e=w([c("font-size",ur($.sizeXs)),c("color",ur(x.textDisabled))]),T1e="var("+x.brand+")";function _l(e){return(Math.round(e*100)/100).toString()}function $1e(e,t){let r=ko(t,-1);return bo(e)===bo(r)?bo(e):bo(e)+" – "+bo(r)}function N1e(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=E=>n.findIndex(C=>C.key===E),a=o(i.from),s=o(i.to_),l=n[a],u=n[s];if(l===void 0||u===void 0)return null;let d=aS(l,r,t),h=aS(u,r,t)[0],p=d[0]+d[1],m=a*30+30/2,g=s*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,b;if(h>p){let E=dh((p+h)/2);b=[[p,m],[E,m],[E,g],[h,g]]}else{let E=dh(p+1.4),C=dh(h-1.4),A=(m+g)/2;b=[[p,m],[E,m],[E,A],[C,A],[C,g],[h,g]]}let _=i.violated?"var("+x.warning+")":"var("+x.border+")",S=b.length-2|0;return y("g",{children:b.map((E,C)=>{let A=b[C+1|0];return A!==void 0?y("line",{markerEnd:C===S?"url(#"+v+")":void 0,stroke:_,strokeWidth:"1.5",x1:_l(E[0])+"%",x2:_l(A[0])+"%",y1:_l(E[1]),y2:_l(A[1])},C.toString()):null})})}function D1e(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=Wj(),o=de(()=>t),a=o[1],s="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,u=t1e(n);if(u===void 0)return y(Pd,{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],r1e(f,d)),p=i1e(f,d,h),m=cz(n),g=o1e(n),v=dz(n).length,b=(E,C)=>y("button",{children:C,className:h===E?c1e:fz,onClick:A=>a(T=>E)}),_,S=0;if(r!==void 0||g!==0||v!==0?S=1:_=null,S===1){let E=Q([r,g>0?g.toString()+" dependency link(s) outside this window":void 0,v>0?v.toString()+" start(s) before a dependency ends":void 0],C=>C);_=y("span",{children:E.join(" · "),className:A1e})}return L("div",{children:[L("div",{children:[y("span",{children:$1e(f,d),className:d1e}),L("div",{children:[b("Days","Days"),b("Weeks","Weeks"),b("Months","Months")],className:u1e})],className:l1e}),L("div",{children:[L("div",{children:[y("div",{children:"Task",className:p1e}),y("div",{children:p.map(E=>{let C=E[0];return y("span",{children:E[1],className:g1e,style:{left:_l(j0(C,f,d))+"%"}},C.toString())}),className:m1e})],className:h1e}),L("div",{children:[n.map(E=>{let C=aS(E,f,d),A=a1e(n,E.key),T=E1e(D(E.accent,T1e)),R=A?T+" "+k1e:T;return L("div",{children:[L("div",{children:[A?y("span",{children:"▲",className:x1e,title:"Starts before a dependency ends"}):null,y("span",{children:E.title,className:y1e,title:E.title})],className:_1e}),L("div",{children:[p.map(N=>{let I=N[0];return y("div",{className:w1e,style:{left:_l(j0(I,f,d))+"%"}},I.toString())}),y("button",{className:R,style:{left:_l(C[0])+"%",width:_l(C[1])+"%"},title:E.title+" · "+Rs(E.start)+" → "+Rs(E.end_),onClick:N=>E.onOpen()})],className:S1e})],className:b1e},E.key)}),y("div",{children:L("svg",{children:[L("defs",{children:[y("marker",{children:y("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+x.border+")"}),id:s,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"}),y("marker",{children:y("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+x.warning+")"}),id:l,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"})]}),m.map(E=>y(N1e,{edge:E,tasks:n,from:f,to_:d,arrowId:s,arrowBadId:l},E.from+"->"+E.to_))],className:R1e}),className:C1e})],className:v1e})],className:f1e}),_],className:s1e})}let F1e=D1e;function oi(e){return"var("+e+")"}let I1e=w([c("overflow-x","auto")]),P1e=w([c("border-collapse","collapse"),c("font-size",oi($.sizeSm)),c("color",oi(x.textPrimary)),c("min-width","min-content")]),ak=[c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("text-align","right"),c("white-space","nowrap")],O1e=w(ak),M1e=w(ak.concat([c("color",oi(x.textDisabled))])),L1e=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("text-align","left"),c("color",oi(x.textSecondary)),c("font-weight",oi($.weightMedium)),c("white-space","nowrap")]),z1e=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("text-align","right"),c("background",oi(x.surfaceSubtle)),c("color",oi(x.textSecondary)),c("font-weight",oi($.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("font-size",oi($.sizeXs)),c("white-space","nowrap")]),U1e=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("text-align","left"),c("background",oi(x.surfaceSubtle)),c("color",oi(x.textPrimary)),c("font-weight",oi($.weightMedium)),c("white-space","nowrap")]),py=w(ak.concat([c("font-weight",oi($.weightMedium))])),g3=w([c("border","1px solid var("+x.borderSubtle+")"),c("padding","4px var("+O.sm+")"),c("background",oi(x.surfaceSubtle)),c("color",oi(x.textSecondary)),c("font-weight",oi($.weightMedium)),c("white-space","nowrap")]),v3="Total";function B1e(e){let t=e.colTotals,r=e.rowTotals,n=e.cells,i=e.colHeaders;return y("div",{children:L("table",{children:[y("thead",{children:L("tr",{children:[y("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:L1e,scope:"col"}),i.map(o=>y("th",{children:o.label,className:z1e,scope:"col"},o.value)),y("th",{children:v3,className:g3,scope:"col"})]})}),y("tbody",{children:e.rowHeaders.map((o,a)=>{let s=D(n[a],[]);return L("tr",{children:[y("th",{children:o.label,className:U1e,scope:"row"}),i.map((l,u)=>{let d=D(s[u],{display:"",empty:!0});return y("td",{children:d.empty?"—":d.display,className:d.empty?M1e:O1e},l.value)}),y("td",{children:D(r[a],""),className:py})]},o.value)})}),y("tfoot",{children:L("tr",{children:[y("th",{children:v3,className:g3,scope:"row"}),i.map((o,a)=>y("td",{children:D(t[a],""),className:py},o.value)),y("td",{children:e.grandTotal,className:py})]})})],className:P1e}),className:I1e})}let j1e=B1e;function q1e(e){let t=e.label,r=e.size;return y(Ox,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let sS=q1e;function Fi(e){return"var("+e+")"}let V1e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",Fi(O.md))]),G1e=w([z("flex"),_e("column"),ee("stretch"),c("gap",Fi(O.xs)),c("padding","0"),c("background","none"),c("border","none"),c("text-align","left"),Ce("pointer"),qe([c("opacity","0.88")])]),K1e=w([c("width","100%"),c("aspect-ratio","4 / 3"),c("object-fit","cover"),c("background",Fi(x.surfaceSubtle)),c("border","1px solid var("+x.border+")"),c("border-radius",Fi(Z.md))]),H1e=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",Fi(O.sm))]),W1e=w([c("color",Fi(x.textPrimary)),c("font-size",Fi($.sizeSm)),c("font-weight",Fi($.weightMedium)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),J1e=w([c("color",Fi(x.textSecondary)),c("font-size",Fi($.sizeXs)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Q1e=w([c("background","rgba(255,255,255,0.12)"),c("border","1px solid rgba(255,255,255,0.25)"),c("border-radius",Fi(Z.md)),c("color","#f5f5f5"),c("padding","4px var("+O.sm+")"),c("font-size",Fi($.sizeSm)),Ce("pointer"),qe([c("background","rgba(255,255,255,0.22)")])]),Y1e=w([c("color",Fi(x.textDisabled)),c("font-size",Fi($.sizeSm))]);function X1e(e){return Q(e,t=>q(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function Z1e(e){let t=e.onOpen,r=e.items,n=de(()=>{}),i=n[1],o=n[0],a=X1e(r);if(r.length===0)return y("span",{children:"(empty)",className:Y1e});let s;if(o!==void 0){let l=k(t,u=>q(a[o],d=>y("button",{children:"Open record →",className:Q1e,type:"button",onClick:f=>{i(h=>{}),u(d.key)}})));s=y(YO,{slides:a,index:o,onIndexChange:u=>i(d=>u),onClose:()=>i(u=>{}),action:l})}else s=null;return L(cr,{children:[y("div",{children:r.map(l=>{let u=l.src,d=l.onUpload,f=l.caption;return L("button",{children:[u!==void 0?y("img",{className:K1e,alt:l.title,src:u}):d!==void 0?y(sS,{size:"Tile",label:"Add image"}):y(sS,{size:"Tile"}),L("div",{children:[y("span",{children:l.title,className:W1e}),D(l.badge,null)],className:H1e}),f!==void 0?y("span",{children:f,className:J1e}):null],className:G1e,title:vr(l.src)&&ke(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,m=l.onUpload;if(p===void 0)return m!==void 0?m():re(t,v=>v(l.key));let g=a.findIndex(v=>v.key===l.key);return g!==-1?i(v=>g):re(t,v=>v(l.key))}},l.key)}),className:V1e}),s]})}let exe=Z1e;const ib=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function sk(e){return"nodeType"in e}function Bi(e){var t,r;return e?nf(e)?e:sk(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function lk(e){const{Document:t}=Bi(e);return e instanceof t}function Gp(e){return nf(e)?!1:e instanceof Bi(e).HTMLElement}function pz(e){return e instanceof Bi(e).SVGElement}function of(e){return e?nf(e)?e.document:sk(e)?lk(e)?e:Gp(e)||pz(e)?e.ownerDocument:document:document:document}const Pl=ib?NP:De;function uk(e){const t=Pe(e);return Pl(()=>{t.current=e}),qr(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 txe(){const e=Pe(null),t=qr((n,i)=>{e.current=setInterval(n,i)},[]),r=qr(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function ip(e,t){t===void 0&&(t=[e]);const r=Pe(e);return Pl(()=>{r.current!==e&&(r.current=e)},t),r}function Kp(e,t){const r=Pe();return Tt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function q0(e){const t=uk(e),r=Pe(null),n=qr(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function lS(e){const t=Pe();return De(()=>{t.current=e},[e]),t.current}let my={};function ob(e,t){return Tt(()=>{if(t)return t;const r=my[e]==null?0:my[e]+1;return my[e]=r,e+"-"+r},[e,t])}function mz(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[l,u]of s){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const sd=mz(1),V0=mz(-1);function rxe(e){return"clientX"in e&&"clientY"in e}function gz(e){if(!e)return!1;const{KeyboardEvent:t}=Bi(e.target);return t&&e instanceof t}function nxe(e){if(!e)return!1;const{TouchEvent:t}=Bi(e.target);return t&&e instanceof t}function uS(e){if(nxe(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 rxe(e)?{x:e.clientX,y:e.clientY}:null}const b3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ixe(e){return e.matches(b3)?e:e.querySelector(b3)}const oxe={display:"none"};function axe(e){let{id:t,value:r}=e;return go.createElement("div",{id:t,style:oxe},r)}function sxe(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 go.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function lxe(){const[e,t]=de("");return{announce:qr(n=>{n!=null&&t(n)},[]),announcement:e}}const vz=or(null);function uxe(e){const t=Et(vz);De(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function cxe(){const[e]=de(()=>new Set),t=qr(n=>(e.add(n),()=>e.delete(n)),[e]);return[qr(n=>{let{type:i,event:o}=n;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const dxe={draggable:`
|
|
90
|
+
To pick up a draggable item, press the space bar.
|
|
91
|
+
While dragging, use the arrow keys to move the item.
|
|
92
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
93
|
+
`},fxe={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 hxe(e){let{announcements:t=fxe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=dxe}=e;const{announce:o,announcement:a}=lxe(),s=ob("DndLiveRegion"),[l,u]=de(!1);if(De(()=>{u(!0)},[]),uxe(Tt(()=>({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=go.createElement(go.Fragment,null,go.createElement(axe,{id:n,value:i.draggable}),go.createElement(sxe,{id:s,announcement:a}));return r?DP(d,r):d}var bn;(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"})(bn||(bn={}));function G0(){}function _3(e,t){return Tt(()=>({sensor:e,options:t??{}}),[e,t])}function pxe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Tt(()=>[...t].filter(n=>n!=null),[...t])}const aa=Object.freeze({x:0,y:0});function mxe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function gxe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function vxe(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const l=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(l+u-d);return Number(f.toFixed(4))}return 0}const bxe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const l=vxe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(mxe)};function _xe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function bz(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:aa}function yxe(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...r})}}const xxe=yxe(1);function Sxe(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 wxe(e,t,r){const n=Sxe(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,l=e.left-a-(1-i)*parseFloat(r),u=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l}}const Exe={ignoreTransform:!1};function Hp(e,t){t===void 0&&(t=Exe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Bi(e).getComputedStyle(e);u&&(r=wxe(r,u,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}function y3(e){return Hp(e,{ignoreTransform:!0})}function kxe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Cxe(e,t){return t===void 0&&(t=Bi(e).getComputedStyle(e)),t.position==="fixed"}function Rxe(e,t){t===void 0&&(t=Bi(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 ck(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(lk(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Gp(i)||pz(i)||r.includes(i))return r;const o=Bi(e).getComputedStyle(i);return i!==e&&Rxe(i,o)&&r.push(i),Cxe(i,o)?r:n(i.parentNode)}return e?n(e):r}function _z(e){const[t]=ck(e,1);return t??null}function gy(e){return!ib||!e?null:nf(e)?e:sk(e)?lk(e)||e===of(e).scrollingElement?window:Gp(e)?e:null:null}function yz(e){return nf(e)?e.scrollX:e.scrollLeft}function xz(e){return nf(e)?e.scrollY:e.scrollTop}function cS(e){return{x:yz(e),y:xz(e)}}var Rn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Rn||(Rn={}));function Sz(e){return!ib||!e?!1:e===document.scrollingElement}function wz(e){const t={x:0,y:0},r=Sz(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const Axe={x:.2,y:.2};function Txe(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=Axe);const{isTop:u,isBottom:d,isLeft:f,isRight:h}=wz(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(p.y=Rn.Backward,m.y=n*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=Rn.Forward,m.y=n*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=Rn.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=Rn.Backward,m.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function $xe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Ez(e){return e.reduce((t,r)=>sd(t,cS(r)),aa)}function Nxe(e){return e.reduce((t,r)=>t+yz(r),0)}function Dxe(e){return e.reduce((t,r)=>t+xz(r),0)}function Fxe(e,t){if(t===void 0&&(t=Hp),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);_z(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ixe=[["x",["left","right"],Nxe],["y",["top","bottom"],Dxe]];class dk{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=ck(r),i=Ez(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of Ixe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=s(n),d=i[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class fh{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 Pxe(e){const{EventTarget:t}=Bi(e);return e instanceof t?e:of(e)}function vy(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var po;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(po||(po={}));function x3(e){e.preventDefault()}function Oxe(e){e.stopPropagation()}var pr;(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"})(pr||(pr={}));const kz={start:[pr.Space,pr.Enter],cancel:[pr.Esc],end:[pr.Space,pr.Enter,pr.Tab]},Mxe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case pr.Right:return{...r,x:r.x+25};case pr.Left:return{...r,x:r.x-25};case pr.Down:return{...r,y:r.y+25};case pr.Up:return{...r,y:r.y-25}}};class fk{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 fh(of(r)),this.windowListeners=new fh(Bi(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(po.Resize,this.handleCancel),this.windowListeners.add(po.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(po.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Fxe(n),r(aa)}handleKeyDown(t){if(gz(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=kz,coordinateGetter:a=Mxe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:aa;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=V0(f,d),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const v=t.code,{isTop:b,isRight:_,isLeft:S,isBottom:E,maxScroll:C,minScroll:A}=wz(g),T=$xe(g),R={x:Math.min(v===pr.Right?T.right-T.width/2:T.right,Math.max(v===pr.Right?T.left:T.left+T.width/2,f.x)),y:Math.min(v===pr.Down?T.bottom-T.height/2:T.bottom,Math.max(v===pr.Down?T.top:T.top+T.height/2,f.y))},N=v===pr.Right&&!_||v===pr.Left&&!S,I=v===pr.Down&&!E||v===pr.Up&&!b;if(N&&R.x!==f.x){const M=g.scrollLeft+h.x,P=v===pr.Right&&M<=C.x||v===pr.Left&&M>=A.x;if(P&&!h.y){g.scrollTo({left:M,behavior:s});return}P?p.x=g.scrollLeft-M:p.x=v===pr.Right?g.scrollLeft-C.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(I&&R.y!==f.y){const M=g.scrollTop+h.y,P=v===pr.Down&&M<=C.y||v===pr.Up&&M>=A.y;if(P&&!h.x){g.scrollTo({top:M,behavior:s});return}P?p.y=g.scrollTop-M:p.y=v===pr.Down?g.scrollTop-C.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,sd(V0(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()}}fk.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=kz,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function S3(e){return!!(e&&"distance"in e)}function w3(e){return!!(e&&"delay"in e)}class hk{constructor(t,r,n){var i;n===void 0&&(n=Pxe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=of(a),this.documentListeners=new fh(this.document),this.listeners=new fh(n),this.windowListeners=new fh(Bi(a)),this.initialCoordinates=(i=uS(o))!=null?i:aa,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(po.Resize,this.handleCancel),this.windowListeners.add(po.DragStart,x3),this.windowListeners.add(po.VisibilityChange,this.handleCancel),this.windowListeners.add(po.ContextMenu,x3),this.documentListeners.add(po.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(w3(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(S3(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(po.Click,Oxe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(po.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(r=uS(t))!=null?r:aa,u=V0(i,l);if(!n&&s){if(S3(s)){if(s.tolerance!=null&&vy(u,s.tolerance))return this.handleCancel();if(vy(u,s.distance))return this.handleStart()}if(w3(s)&&vy(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===pr.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Lxe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class pk extends hk{constructor(t){const{event:r}=t,n=of(r.target);super(t,Lxe,n)}}pk.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 zxe={move:{name:"mousemove"},end:{name:"mouseup"}};var dS;(function(e){e[e.RightClick=2]="RightClick"})(dS||(dS={}));class Uxe extends hk{constructor(t){super(t,zxe,of(t.event.target))}}Uxe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===dS.RightClick?!1:(n?.({event:r}),!0)}}];const by={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Bxe extends hk{constructor(t){super(t,by)}static setup(){return window.addEventListener(by.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(by.move.name,t)};function t(){}}}Bxe.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 hh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(hh||(hh={}));var K0;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(K0||(K0={}));function jxe(e){let{acceleration:t,activator:r=hh.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=K0.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=Vxe({delta:f,disabled:!o}),[m,g]=txe(),v=Pe({x:0,y:0}),b=Pe({x:0,y:0}),_=Tt(()=>{switch(r){case hh.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case hh.DraggableRect:return i}},[r,i,l]),S=Pe(null),E=qr(()=>{const A=S.current;if(!A)return;const T=v.current.x*b.current.x,R=v.current.y*b.current.y;A.scrollBy(T,R)},[]),C=Tt(()=>s===K0.TreeOrder?[...u].reverse():u,[s,u]);De(()=>{if(!o||!u.length||!_){g();return}for(const A of C){if(n?.(A)===!1)continue;const T=u.indexOf(A),R=d[T];if(!R)continue;const{direction:N,speed:I}=Txe(A,R,_,t,h);for(const M of["x","y"])p[M][N[M]]||(I[M]=0,N[M]=0);if(I.x>0||I.y>0){g(),S.current=A,m(E,a),v.current=I,b.current=N;return}}v.current={x:0,y:0},b.current={x:0,y:0},g()},[t,E,n,g,o,a,JSON.stringify(_),JSON.stringify(p),m,u,C,d,JSON.stringify(h)])}const qxe={x:{[Rn.Backward]:!1,[Rn.Forward]:!1},y:{[Rn.Backward]:!1,[Rn.Forward]:!1}};function Vxe(e){let{delta:t,disabled:r}=e;const n=lS(t);return Kp(i=>{if(r||!n||!i)return qxe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Rn.Backward]:i.x[Rn.Backward]||o.x===-1,[Rn.Forward]:i.x[Rn.Forward]||o.x===1},y:{[Rn.Backward]:i.y[Rn.Backward]||o.y===-1,[Rn.Forward]:i.y[Rn.Forward]||o.y===1}}},[r,t,n])}function Gxe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return Kp(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function Kxe(e,t){return Tt(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var op;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(op||(op={}));var fS;(function(e){e.Optimized="optimized"})(fS||(fS={}));const E3=new Map;function Hxe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=de(null),{frequency:s,measure:l,strategy:u}=i,d=Pe(e),f=v(),h=ip(f),p=qr(function(b){b===void 0&&(b=[]),!h.current&&a(_=>_===null?b:_.concat(b.filter(S=>!_.includes(S))))},[h]),m=Pe(null),g=Kp(b=>{if(f&&!r)return E3;if(!b||b===E3||d.current!==e||o!=null){const _=new Map;for(let S of e){if(!S)continue;if(o&&o.length>0&&!o.includes(S.id)&&S.rect.current){_.set(S.id,S.rect.current);continue}const E=S.node.current,C=E?new dk(l(E),E):null;S.rect.current=C,C&&_.set(S.id,C)}return _}return b},[e,o,r,f,l]);return De(()=>{d.current=e},[e]),De(()=>{f||p()},[r,f]),De(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),De(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...n]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(u){case op.Always:return!1;case op.BeforeDragging:return r;default:return!r}}}function Cz(e,t){return Kp(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Wxe(e,t){return Cz(e,t)}function Jxe(e){let{callback:t,disabled:r}=e;const n=uk(t),i=Tt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return De(()=>()=>i?.disconnect(),[i]),i}function ab(e){let{callback:t,disabled:r}=e;const n=uk(t),i=Tt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return De(()=>()=>i?.disconnect(),[i]),i}function Qxe(e){return new dk(Hp(e),e)}function k3(e,t,r){t===void 0&&(t=Qxe);const[n,i]=de(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??r)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=Jxe({callback(l){if(e)for(const u of l){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=ab({callback:o});return Pl(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),n}function Yxe(e){const t=Cz(e);return bz(e,t)}const C3=[];function Xxe(e){const t=Pe(e),r=Kp(n=>e?n&&n!==C3&&e&&t.current&&e.parentNode===t.current.parentNode?n:ck(e):C3,[e]);return De(()=>{t.current=e},[e]),r}function Zxe(e){const[t,r]=de(null),n=Pe(e),i=qr(o=>{const a=gy(o.target);a&&r(s=>s?(s.set(a,cS(a)),new Map(s)):null)},[]);return De(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(l=>{const u=gy(l);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,cS(u)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const u=gy(l);u?.removeEventListener("scroll",i)})}},[i,e]),Tt(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>sd(o,a),aa):Ez(e):aa,[e,t])}function R3(e,t){t===void 0&&(t=[]);const r=Pe(null);return De(()=>{r.current=null},t),De(()=>{const n=e!==aa;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?V0(e,r.current):aa}function eSe(e){De(()=>{if(!ib)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 tSe(e,t){return Tt(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function Rz(e){return Tt(()=>e?kxe(e):null,[e])}const A3=[];function rSe(e,t){t===void 0&&(t=Hp);const[r]=e,n=Rz(r?Bi(r):null),[i,o]=de(A3);function a(){o(()=>e.length?e.map(l=>Sz(l)?n:new dk(t(l),l)):A3)}const s=ab({callback:a});return Pl(()=>{s?.disconnect(),a(),e.forEach(l=>s?.observe(l))},[e]),i}function nSe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Gp(t)?t:e}function iSe(e){let{measure:t}=e;const[r,n]=de(null),i=qr(u=>{for(const{target:d}of u)if(Gp(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=ab({callback:i}),a=qr(u=>{const d=nSe(u);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[s,l]=q0(a);return Tt(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const oSe=[{sensor:pk,options:{}},{sensor:fk,options:{}}],aSe={current:{}},jg={draggable:{measure:y3},droppable:{measure:y3,strategy:op.WhileDragging,frequency:fS.Optimized},dragOverlay:{measure:Hp}};class ph 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 sSe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ph,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:G0},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:jg,measureDroppableContainers:G0,windowRect:null,measuringScheduled:!1},lSe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:G0,draggableNodes:new Map,over:null,measureDroppableContainers:G0},sb=or(lSe),uSe=or(sSe);function cSe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ph}}}function dSe(e,t){switch(t.type){case bn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case bn.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 bn.DragEnd:case bn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case bn.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new ph(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case bn.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new ph(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case bn.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new ph(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function fSe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=Et(sb),o=lS(n),a=lS(r?.id);return De(()=>{if(!t&&!n&&o&&a!=null){if(!gz(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const f=ixe(d);if(f){f.focus();break}}})}},[n,t,i,a,o]),null}function hSe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function pSe(e){return Tt(()=>({draggable:{...jg.draggable,...e?.draggable},droppable:{...jg.droppable,...e?.droppable},dragOverlay:{...jg.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function mSe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=Pe(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Pl(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const d=r(u),f=bz(d,n);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=_z(u);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,n,r])}const Az=or({...aa,scaleX:1,scaleY:1});var al;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(al||(al={}));const Tz=Jj(function(t){var r,n,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:u,sensors:d=oSe,collisionDetection:f=bxe,measuring:h,modifiers:p,...m}=t;const g=Qj(dSe,void 0,cSe),[v,b]=g,[_,S]=cxe(),[E,C]=de(al.Uninitialized),A=E===al.Initialized,{draggable:{active:T,nodes:R,translate:N},droppable:{containers:I}}=v,M=T!=null?R.get(T):null,P=Pe({initial:null,translated:null}),U=Tt(()=>{var ar;return T!=null?{id:T,data:(ar=M?.data)!=null?ar:aSe,rect:P}:null},[T,M]),j=Pe(null),[V,Y]=de(null),[J,X]=de(null),oe=ip(m,Object.values(m)),ge=ob("DndDescribedBy",a),H=Tt(()=>I.getEnabled(),[I]),ae=pSe(h),{droppableRects:te,measureDroppableContainers:ue,measuringScheduled:Se}=Hxe(H,{dragging:A,dependencies:[N.x,N.y],config:ae.droppable}),pe=Gxe(R,T),be=Tt(()=>J?uS(J):null,[J]),Ie=Yt(),$t=Wxe(pe,ae.draggable.measure);mSe({activeNode:T!=null?R.get(T):null,config:Ie.layoutShiftCompensation,initialRect:$t,measure:ae.draggable.measure});const Lt=k3(pe,ae.draggable.measure,$t),Ar=k3(pe?pe.parentElement:null),Qr=Pe({activatorEvent:null,active:null,activeNode:pe,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),li=I.getNodeFor((r=Qr.current.over)==null?void 0:r.id),Sn=iSe({measure:ae.dragOverlay.measure}),lo=(n=Sn.nodeRef.current)!=null?n:pe,wr=A?(i=Sn.rect)!=null?i:Lt:null,Qe=!!(Sn.nodeRef.current&&Sn.rect),st=Yxe(Qe?null:Lt),Nt=Rz(lo?Bi(lo):null),Ct=Xxe(A?li??pe:null),ve=rSe(Ct),Ye=hSe(p,{transform:{x:N.x-st.x,y:N.y-st.y,scaleX:1,scaleY:1},activatorEvent:J,active:U,activeNodeRect:Lt,containerNodeRect:Ar,draggingNodeRect:wr,over:Qr.current.over,overlayNodeRect:Sn.rect,scrollableAncestors:Ct,scrollableAncestorRects:ve,windowRect:Nt}),At=be?sd(be,N):null,yt=Zxe(Ct),pn=R3(yt),Xn=R3(yt,[Lt]),mn=sd(Ye,pn),W=wr?xxe(wr,Ye):null,xe=U&&W?f({active:U,collisionRect:W,droppableRects:te,droppableContainers:H,pointerCoordinates:At}):null,je=gxe(xe,"id"),[Fe,we]=de(null),mt=Qe?Ye:sd(Ye,Xn),nt=_xe(mt,(o=Fe?.rect)!=null?o:null,Lt),ot=Pe(null),Vt=qr((ar,dr)=>{let{sensor:Tr,options:St}=dr;if(j.current==null)return;const Mr=R.get(j.current);if(!Mr)return;const Er=ar.nativeEvent,$r=new Tr({active:j.current,activeNode:Mr,event:Er,options:St,context:Qr,onAbort(Gt){if(!R.get(Gt))return;const{onDragAbort:sn}=oe.current,Yr={id:Gt};sn?.(Yr),_({type:"onDragAbort",event:Yr})},onPending(Gt,Lr,sn,Yr){if(!R.get(Gt))return;const{onDragPending:wi}=oe.current,ui={id:Gt,constraint:Lr,initialCoordinates:sn,offset:Yr};wi?.(ui),_({type:"onDragPending",event:ui})},onStart(Gt){const Lr=j.current;if(Lr==null)return;const sn=R.get(Lr);if(!sn)return;const{onDragStart:Yr}=oe.current,Xr={activatorEvent:Er,active:{id:Lr,data:sn.data,rect:P}};dm(()=>{Yr?.(Xr),C(al.Initializing),b({type:bn.DragStart,initialCoordinates:Gt,active:Lr}),_({type:"onDragStart",event:Xr}),Y(ot.current),X(Er)})},onMove(Gt){b({type:bn.DragMove,coordinates:Gt})},onEnd:kr(bn.DragEnd),onCancel:kr(bn.DragCancel)});ot.current=$r;function kr(Gt){return async function(){const{active:sn,collisions:Yr,over:Xr,scrollAdjustedTranslate:wi}=Qr.current;let ui=null;if(sn&&wi){const{cancelDrop:ba}=oe.current;ui={activatorEvent:Er,active:sn,collisions:Yr,delta:wi,over:Xr},Gt===bn.DragEnd&&typeof ba=="function"&&await Promise.resolve(ba(ui))&&(Gt=bn.DragCancel)}j.current=null,dm(()=>{b({type:Gt}),C(al.Uninitialized),we(null),Y(null),X(null),ot.current=null;const ba=Gt===bn.DragEnd?"onDragEnd":"onDragCancel";if(ui){const uo=oe.current[ba];uo?.(ui),_({type:ba,event:ui})}})}}},[R]),Ze=qr((ar,dr)=>(Tr,St)=>{const Mr=Tr.nativeEvent,Er=R.get(St);if(j.current!==null||!Er||Mr.dndKit||Mr.defaultPrevented)return;const $r={active:Er};ar(Tr,dr.options,$r)===!0&&(Mr.dndKit={capturedBy:dr.sensor},j.current=St,Vt(Tr,dr))},[R,Vt]),Qt=Kxe(d,Ze);eSe(d),Pl(()=>{Lt&&E===al.Initializing&&C(al.Initialized)},[Lt,E]),De(()=>{const{onDragMove:ar}=oe.current,{active:dr,activatorEvent:Tr,collisions:St,over:Mr}=Qr.current;if(!dr||!Tr)return;const Er={active:dr,activatorEvent:Tr,collisions:St,delta:{x:mn.x,y:mn.y},over:Mr};dm(()=>{ar?.(Er),_({type:"onDragMove",event:Er})})},[mn.x,mn.y]),De(()=>{const{active:ar,activatorEvent:dr,collisions:Tr,droppableContainers:St,scrollAdjustedTranslate:Mr}=Qr.current;if(!ar||j.current==null||!dr||!Mr)return;const{onDragOver:Er}=oe.current,$r=St.get(je),kr=$r&&$r.rect.current?{id:$r.id,rect:$r.rect.current,data:$r.data,disabled:$r.disabled}:null,Gt={active:ar,activatorEvent:dr,collisions:Tr,delta:{x:Mr.x,y:Mr.y},over:kr};dm(()=>{we(kr),Er?.(Gt),_({type:"onDragOver",event:Gt})})},[je]),Pl(()=>{Qr.current={activatorEvent:J,active:U,activeNode:pe,collisionRect:W,collisions:xe,droppableRects:te,draggableNodes:R,draggingNode:lo,draggingNodeRect:wr,droppableContainers:I,over:Fe,scrollableAncestors:Ct,scrollAdjustedTranslate:mn},P.current={initial:wr,translated:W}},[U,pe,xe,W,R,lo,wr,te,I,Fe,Ct,mn]),jxe({...Ie,delta:N,draggingRect:W,pointerCoordinates:At,scrollableAncestors:Ct,scrollableAncestorRects:ve});const xt=Tt(()=>({active:U,activeNode:pe,activeNodeRect:Lt,activatorEvent:J,collisions:xe,containerNodeRect:Ar,dragOverlay:Sn,draggableNodes:R,droppableContainers:I,droppableRects:te,over:Fe,measureDroppableContainers:ue,scrollableAncestors:Ct,scrollableAncestorRects:ve,measuringConfiguration:ae,measuringScheduled:Se,windowRect:Nt}),[U,pe,Lt,J,xe,Ar,Sn,R,I,te,Fe,ue,Ct,ve,ae,Se,Nt]),gn=Tt(()=>({activatorEvent:J,activators:Qt,active:U,activeNodeRect:Lt,ariaDescribedById:{draggable:ge},dispatch:b,draggableNodes:R,over:Fe,measureDroppableContainers:ue}),[J,Qt,U,Lt,b,ge,R,Fe,ue]);return go.createElement(vz.Provider,{value:S},go.createElement(sb.Provider,{value:gn},go.createElement(uSe.Provider,{value:xt},go.createElement(Az.Provider,{value:nt},u)),go.createElement(fSe,{disabled:s?.restoreFocus===!1})),go.createElement(hxe,{...s,hiddenTextDescribedById:ge}));function Yt(){const ar=V?.autoScrollEnabled===!1,dr=typeof l=="object"?l.enabled===!1:l===!1,Tr=A&&!ar&&!dr;return typeof l=="object"?{...l,enabled:Tr}:{enabled:Tr}}}),gSe=or(null),T3="button",vSe="Draggable";function $z(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=ob(vSe),{activators:a,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:h}=Et(sb),{role:p=T3,roleDescription:m="draggable",tabIndex:g=0}=i??{},v=l?.id===t,b=Et(v?Az:gSe),[_,S]=q0(),[E,C]=q0(),A=tSe(a,t),T=ip(r);Pl(()=>(f.set(t,{id:t,key:o,node:_,activatorNode:E,data:T}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const R=Tt(()=>({role:p,tabIndex:g,"aria-disabled":n,"aria-pressed":v&&p===T3?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[n,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:R,isDragging:v,listeners:n?void 0:A,node:_,over:h,setNodeRef:S,setActivatorNodeRef:C,transform:b}}const bSe="Droppable",_Se={timeout:25};function Nz(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=ob(bSe),{active:a,dispatch:s,over:l,measureDroppableContainers:u}=Et(sb),d=Pe({disabled:r}),f=Pe(!1),h=Pe(null),p=Pe(null),{disabled:m,updateMeasurementsFor:g,timeout:v}={..._Se,...i},b=ip(g??n),_=qr(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),p.current=null},v)},[v]),S=ab({callback:_,disabled:m||!a}),E=qr((R,N)=>{S&&(N&&(S.unobserve(N),f.current=!1),R&&S.observe(R))},[S]),[C,A]=q0(E),T=ip(t);return De(()=>{!S||!C.current||(S.disconnect(),f.current=!1,S.observe(C.current))},[C,S]),De(()=>(s({type:bn.RegisterDroppable,element:{id:n,key:o,disabled:r,node:C,rect:h,data:T}}),()=>s({type:bn.UnregisterDroppable,key:o,id:n})),[n]),De(()=>{r!==d.current.disabled&&(s({type:bn.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:h,isOver:l?.id===n,node:C,over:l,setNodeRef:A}}function Dz(e,t){re(ro(e.onPointerDown),r=>r(t))}function Fz(e,t){re(ro(e.onKeyDown),r=>r(t))}function Iz(e){return q(e==null?void 0:Jt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}let $3=[{bg:"#d1fae5",border:"#059669",fg:"#065f46"},{bg:"#fef3c7",border:"#d97706",fg:"#78350f"},{bg:"#ede9fe",border:"#7c3aed",fg:"#4c1d95"},{bg:"#ccfbf1",border:"#0d9488",fg:"#134e4a"},{bg:"#fce7f3",border:"#db2777",fg:"#831843"},{bg:"#ffedd5",border:"#ea580c",fg:"#7c2d12"},{bg:"#ecfccb",border:"#65a30d",fg:"#365314"}],Pz={bg:"#e2e8f0",border:"#64748b",fg:"#1e293b"};function ySe(e){return e<0?Pz:$3[No(e,$3.length)]}function mk(e,t){let r=e.indexOf(t);return r!==-1?ySe(r):Pz}let xSe={bg:"#dbeafe",border:"#2563eb",fg:"#1e3a8a"};function Ad(e){return"var("+e+")"}let Oz=[z("inlineFlex"),ee("center"),c("gap","4px"),c("font-size",Ad($.sizeXs)),c("font-weight",Ad($.weightMedium)),c("line-height","1.5"),c("white-space","nowrap")];function Mz(e,t){return w(Oz.concat([c("background",e.bg),c("border","1px solid "+e.border),c("color",e.fg)]).concat(t))}function SSe(e){return Mz(e,[c("padding","2px 8px"),c("border-radius",Ad(Z.full))])}let wSe=Mz(xSe,[c("padding","2px 8px"),c("border-radius",Ad(Z.sm))]),ESe=w(Oz.concat([c("padding","2px 0"),c("color",Ad(x.textSecondary)),c("font-weight",Ad($.weightNormal)),c("font-style","italic"),c("border-bottom","1px dashed var("+x.border+")")]));function kSe(e){return{background:e.border,display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}function CSe(e){let t=e.dot,r=e.swatch;return L("span",{children:[(t!==void 0?t:!0)?y("span",{style:kSe(r)}):null,e.label],className:SSe(r)})}let gk={make:CSe};function RSe(e){return y("span",{children:e.label,className:wSe})}let ASe={make:RSe};function TSe(e){let t=e.label;return y("span",{children:t,className:ESe,title:t+" — run by the platform, not callable"})}let $Se={make:TSe};function Hr(e){return"var("+e+")"}let NSe=w([z("flex"),ee("stretch"),c("gap",Hr(O.md)),c("overflow-x","auto"),c("padding-bottom",Hr(O.sm))]),Lz=[z("flex"),_e("column"),c("gap",Hr(O.sm)),c("flex","0 0 240px"),c("padding",Hr(O.sm)),c("background",Hr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Hr(Z.md)),c("min-height","120px")],DSe=w(Lz);function FSe(e){return w(Lz.concat([c("border-top","3px solid "+e.border)]))}let ISe=w([c("border-color",Hr(x.brand))]),PSe=w([vs(.45)]),OSe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",Hr(O.sm)),c("font-size",Hr($.sizeSm)),c("font-weight",Hr($.weightMedium)),c("color",Hr(x.textSecondary))]),MSe=w([c("text-transform","uppercase"),c("letter-spacing","0.04em")]),N3=w([z("flex"),_e("column"),ee("stretch"),c("gap","4px"),c("padding",Hr(O.sm)),c("background",Hr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Hr(Z.sm)),c("text-align","left"),Ce("pointer"),qe([c("border-color",Hr(x.brand))])]),LSe=w([Ce("grab")]),zSe=w([vs(.85),c("z-index","10"),Ce("grabbing")]),USe=w([c("font-size",Hr($.sizeSm)),c("font-weight",Hr($.weightMedium)),c("color",Hr(x.textPrimary))]),BSe=w([c("font-size",Hr($.sizeXs)),c("color",Hr(x.textSecondary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),jSe=w([c("color",Hr(x.textDisabled)),c("font-size",Hr($.sizeSm))]);function qSe(e){let t=e.onClick,r=e.draggable,n=e.card,i=$z({id:n.key,disabled:!r}),o=r?N3+" "+LSe:N3,a=i.isDragging?o+" "+zSe:o,s=Iz(i.transform),l=s!==void 0?{transform:s}:void 0,u=i.listeners,d=u==null?void 0:Jt(u),f=n.meta;return L("div",{children:[y("span",{children:n.title,className:USe}),f!==void 0?y("span",{children:f,className:BSe,title:f}):null],ref:Jt(i.setNodeRef),className:a,role:"button",style:l,tabIndex:0,onKeyDown:h=>re(d,p=>Fz(p,h)),onClick:h=>re(t,p=>p(n.key)),onPointerDown:h=>re(d,p=>Dz(p,h))})}function VSe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,a=Nz({id:i.value,disabled:!o}),s=i.swatch,l=s!==void 0?FSe(s):DSe,u=a.isOver,d=o?u?l+" "+ISe:l:l+" "+PSe,f=i.swatch;return L("div",{children:[L("div",{children:[f!==void 0?y(gk.make,{swatch:f,label:i.label}):y("span",{children:i.label,className:MSe}),y(Zf,{count:i.cards.length,label:""})],className:OSe}),i.cards.length===0?y("span",{children:"—",className:jSe}):i.cards.map(h=>y(qSe,{card:h,draggable:n,onClick:r},h.key))],ref:Jt(a.setNodeRef),className:d})}function GSe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=ke(r),a=pxe(_3(pk,{activationConstraint:{distance:5}}),_3(fk,{})),s=de(()=>{}),l=s[1],u=s[0],d=h=>t!==void 0&&u!==void 0?t(u,h.value):!0,f=h=>{l(v=>{});let p=h.over;if(r===void 0||p==null)return;let m=i.find(v=>v.cards.some(b=>b.key===h.active.id));if(ne(t,!0,v=>v(h.active.id,p.id))&&ne(m,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return y(Tz,{sensors:Jt(a),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:y("div",{children:i.map(h=>y(VSe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:NSe})})}let KSe=GSe;function pt(e){return"var("+e+")"}let HSe=w([z("flex"),_e("column"),c("gap",pt(O.sm))]),WSe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",pt(O.sm))]),D3=w([z("inlineFlex"),ee("center"),c("gap",pt(O.xs))]),Wf=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",pt(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",pt(x.textSecondary)),c("font-size",pt($.sizeSm)),Ce("pointer"),qe([c("background",pt(x.surfaceSubtle)),c("color",pt(x.textPrimary))])]),JSe=Wr([Wf,w([c("background",pt(x.surfaceSubtle)),c("color",pt(x.textPrimary)),c("font-weight",pt($.weightMedium))])]),QSe=w([c("font-size",pt($.sizeMd)),c("font-weight",pt($.weightMedium)),c("color",pt(x.textPrimary))]),YSe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px")]),XSe=w([c("font-size",pt($.sizeXs)),c("color",pt(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),c("padding","2px var("+O.xs+")")]),ZSe=w([z("grid"),c("grid-template-columns","repeat(7, 1fr)"),c("gap","1px"),c("background",pt(x.borderSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",pt(Z.md)),c("overflow","hidden")]),zz=w([z("flex"),_e("column"),c("gap","2px"),c("min-height","96px"),c("padding","4px"),c("background",pt(x.surface))]),ewe=Wr([zz,w([c("opacity","0.55")])]),Uz=w([c("font-size",pt($.sizeXs)),c("color",pt(x.textSecondary))]),twe=Wr([Uz,w([c("color",pt(x.brand)),c("font-weight",pt($.weightMedium))])]);function rwe(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",pt(Z.sm)),c("background",pt(x.surfaceSubtle)),c("color",pt(x.textPrimary)),c("font-size",pt($.sizeXs)),c("padding","1px var("+O.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Ce("pointer"),qe([c("background",pt(x.surfaceElevated))])])}let nwe=w([c("background","none"),c("border","none"),c("padding","0"),c("text-align","left"),c("font-size",pt($.sizeXs)),c("color",pt(x.brand)),Ce("pointer"),qe([c("text-decoration","underline")])]);function iwe(e){return w([z("grid"),c("grid-template-columns","repeat("+e.toString()+", 1fr)"),c("gap","1px"),c("background",pt(x.borderSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",pt(Z.md)),c("overflow","hidden")])}let owe=w([z("flex"),_e("column"),c("gap","2px"),c("min-height","200px"),c("padding","4px"),c("background",pt(x.surface))]),awe=w([c("font-size",pt($.sizeXs)),c("color",pt(x.textSecondary)),c("padding-bottom","2px"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),swe=w([z("flex"),ai("wrap"),ee("center"),c("gap",pt(O.md)),c("font-size",pt($.sizeXs)),c("color",pt(x.textSecondary))]);function lwe(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e),c("margin-right","4px")])}let uwe=w([c("font-size",pt($.sizeXs)),c("color",pt(x.textDisabled))]),cwe="var("+x.brand+")";function dwe(e){return D(e.end_,e.start)}function F3(e,t){return e.filter(r=>tM(r.start,dwe(r),t)).toSorted((r,n)=>r.start-n.start)}function fwe(e,t){return nM(e.start)||!eM(e.start,t)?e.title:rM(e.start)+" "+e.title}function hwe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],a=de(()=>"Month"),s=a[1],l=a[0],u=de(()=>vi(D(t,Date.now()))),d=u[1],f=u[0],h=vi(Date.now()),p=E=>d(C=>{switch(l){case"Month":return XO(C,E);case"Week":return ko(C,E*7|0);case"Day":return ko(C,E)}}),m=(E,C)=>y("button",{children:fwe(E,C),className:rwe(D(E.accent,cwe)),title:E.title,onClick:A=>E.onOpen()},E.key),g=()=>{let E=WQ(f);return L(cr,{children:[y("div",{children:gw.map(C=>y("div",{children:C,className:XSe},C)),className:YSe}),y("div",{children:E.map(C=>{let A=F3(i,C),T=A.slice(0,3),R=A.length-T.length|0;return L("div",{children:[y("span",{children:oM(C).toString(),className:C===h?twe:Uz}),T.map(N=>m(N,C)),R>0?y("button",{children:"+"+R.toString()+" more",className:nwe,onClick:N=>{d(I=>C),s(I=>"Day")}}):null],className:JQ(C,f)?zz:ewe},C.toString())}),className:ZSe})]})},v=E=>y("div",{children:E.map(C=>L("div",{children:[y("div",{children:Rs(C),className:awe}),F3(i,C).map(A=>m(A,C))],className:owe},C.toString())),className:iwe(E.length)}),b;switch(l){case"Month":b=g();break;case"Week":b=v(Cl(7,E=>ko(Ev(f),E)));break;case"Day":b=v([vi(f)]);break}let _;switch(l){case"Month":case"Week":_=bo(f);break;case"Day":_=Rs(f)+" — "+bo(f);break}let S=(E,C)=>y("button",{children:C,className:l===E?JSe:Wf,onClick:A=>s(T=>E)});return L("div",{children:[L("div",{children:[L("div",{children:[y("button",{children:"‹",className:Wf,onClick:E=>p(-1)}),y("button",{children:"Today",className:Wf,onClick:E=>d(C=>h)}),y("button",{children:"›",className:Wf,onClick:E=>p(1)}),y("span",{children:_,className:QSe})],className:D3}),L("div",{children:[S("Month","Month"),S("Week","Week"),S("Day","Day")],className:D3})],className:WSe}),o.length!==0?y("div",{children:o.map(E=>L("span",{children:[y("span",{className:lwe(E.accent)}),E.label]},E.label)),className:swe}):null,b,r!==void 0?y("span",{children:r,className:uwe}):null],className:HSe})}let pwe=hwe;function Cr(e){return"var("+e+")"}let mwe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),c("gap",Cr(O.md))]),gwe=w([z("flex"),_e("column"),ee("stretch"),c("gap",Cr(O.sm)),c("padding",Cr(O.md)),c("background",Cr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Cr(Z.md)),c("text-align","left"),qe([c("border-color",Cr(x.brand)),c("background",Cr(x.surfaceSubtle))])]),vwe=w([z("flex"),_e("column"),ee("stretch"),c("gap",Cr(O.sm)),c("background","none"),c("border","none"),c("padding","0"),c("font","inherit"),c("color","inherit"),c("text-align","left"),Ce("pointer")]),bwe=w([z("flex"),ai("wrap"),c("gap","4px")]),_we=w([c("background",Cr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Cr(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",Cr(x.textPrimary)),c("font-size",Cr($.sizeSm)),Ce("pointer"),qe([c("border-color",Cr(x.brand)),c("color",Cr(x.brand))])]),ywe=w([c("width","100%"),c("height","96px"),c("object-fit","cover"),c("border-radius",Cr(Z.sm))]),xwe=w([c("width","100%"),c("height","96px")]),Swe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",Cr(O.sm))]),wwe=w([c("font-size",Cr($.sizeMd)),c("font-weight",Cr($.weightMedium)),c("color",Cr(x.textPrimary)),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Ewe=w([z("flex"),ee("baseline"),c("gap",Cr(O.sm)),c("font-size",Cr($.sizeSm))]),kwe=w([c("color",Cr(x.textSecondary)),c("white-space","nowrap"),Un(0)]),Cwe=w([c("color",Cr(x.textPrimary)),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis")]),Rwe=w([c("color",Cr(x.textDisabled)),c("font-size",Cr($.sizeSm))]);function Awe(e){let t=e.cards;if(t.length===0)return y("span",{children:"(empty)",className:Rwe});let r=e.onCardClick;return y("div",{children:t.map(n=>{let i=n.media,o;o=i!==void 0?typeof i!="object"?y("span",{children:y(sS,{size:"Fill"}),className:xwe}):y("img",{className:ywe,alt:n.title,src:i._0}):null;let a=n.actions;return L("div",{children:[L("button",{children:[o,L("div",{children:[y("span",{children:n.title,className:wwe,title:n.title}),D(n.badge,null)],className:Swe}),n.fields.map(s=>L("div",{children:[y("span",{children:s.label,className:kwe}),y("span",{children:s.value,className:Cwe})],className:Ewe},s.label))],className:vwe,onClick:s=>re(r,l=>l(n.key))}),a!==void 0&&a.length!==0?y("div",{children:a.map(s=>y("button",{children:s.label,className:_we,onClick:l=>s.onClick()},s.label)),className:bwe}):null],className:gwe},n.key)}),className:mwe})}let Twe=Awe;function $we(e,t){let r=e.length,n=t.length,i=PP((r+1|0)*(n+1|0)|0,0),o=(u,d)=>i[(u*(n+1|0)|0)+d|0];for(let u=0;u<r;++u)for(let d=0;d<n;++d)i[((u+1|0)*(n+1|0)|0)+(d+1|0)|0]=e[u]===t[d]?o(u,d)+1|0:o(u,d+1|0)>o(u+1|0,d)?o(u,d+1|0):o(u+1|0,d);let a=[],s=r,l=n;for(;s>0||l>0;){let u=e[s-1|0],d=t[l-1|0];s>0&&l>0&&u===d?(a=[{kind:"Unchanged",text:u}].concat(a),s=s-1|0,l=l-1|0):l>0&&(s===0||o(s,l-1|0)>=o(s-1|0,l))?(a=[{kind:"Added",text:d}].concat(a),l=l-1|0):(a=[{kind:"Removed",text:u}].concat(a),s=s-1|0)}return a}function mu(e){return"var("+e+")"}let Nwe=w([c("font-family",mu($.fontFamilyMono)),c("font-size",mu($.sizeSm)),c("line-height",mu($.lineHeightNormal)),c("border","1px solid var("+x.border+")"),c("border-radius",mu(Z.md)),Ds("auto")]),_y=w([z("flex"),c("padding","1px var("+O.md+")")]),Dwe=w([c("background","rgba(248,81,73,0.12)"),c("color",mu(x.error))]),Fwe=w([c("background","rgba(63,185,80,0.12)"),c("color",mu(x.success))]),Iwe=w([c("color",mu(x.textSecondary))]),Pwe=w([c("width","16px"),Un(0),c("user-select","none"),dO(Ae(8))]);function Owe(e){let t=e.before.split(`
|
|
94
|
+
`),r=e.after.split(`
|
|
95
|
+
`),n=$we(t,r);return y("div",{children:n.map((i,o)=>{let a=i.kind,s;switch(a){case"Removed":s=[_y+" "+Dwe,"-"];break;case"Added":s=[_y+" "+Fwe,"+"];break;case"Unchanged":s=[_y+" "+Iwe," "];break}return L("div",{children:[y("span",{children:s[1],className:Pwe}),y("span",{children:i.text})],className:s[0]},o.toString())}),className:Nwe})}let Mwe=Owe;function lb(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 bi(e){return"var("+e+")"}let Lwe=w([z("flex"),_e("column"),c("gap","2px"),c("font-family",bi($.fontFamily)),c("font-size",bi($.sizeSm))]),I3=w([z("flex"),ee("flexStart"),c("gap","10px"),c("padding",bi(O.xs)+" "+bi(O.sm)),c("border-radius",bi(Z.sm))]),zwe=w([Ce("pointer"),qe([c("background",bi(x.surfaceSubtle))])]),Uwe=w([z("flex"),_e("column"),c("gap","2px"),c("min-width","0"),c("flex","1")]),Bwe=w([c("color",bi(x.textPrimary))]),jwe=w([c("font-weight",bi($.weightMedium))]),qwe=w([c("color",bi(x.textSecondary))]),Vwe=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("color",bi(x.textSecondary)),c("font-size",bi($.sizeXs)),c("white-space","nowrap")]),Gwe=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("flex-shrink","0")]),Kwe=w([c("background","none"),c("border","none"),c("padding","0"),c("color",bi(x.brand)),c("font-size",bi($.sizeXs)),Ce("pointer"),c("text-align","left"),qe([c("text-decoration","underline")])]),Hwe=w([c("margin-top","4px"),c("max-width","560px")]),Wwe=w([c("color",bi(x.textSecondary)),c("padding",bi(O.md)),qa("center")]);function Jwe(e){let t=e.onClick,r=e.entry,n=de(()=>!1),i=n[1],o=n[0],a=ke(r.before)&&ke(r.after),s=D(r.actor,r.subject),l=t!==void 0?I3+" "+zwe:I3,u=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[y(Od,{name:s,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[u!==void 0?y("span",{children:u+" ",className:jwe}):null,y("span",{children:r.verb+" ",className:qwe}),r.subject],className:Bwe}),L("span",{children:[d!==void 0?y("span",{className:Gwe,style:{background:d}}):null,f!==void 0?lb(e.nowMs,f):null],className:Vwe}),a?y("button",{children:o?"Hide changes":"Show changes",className:Kwe,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&a?y("div",{children:y(Mwe,{before:D(r.before,""),after:D(r.after,"")}),className:Hwe}):null],className:Uwe})],className:l,onClick:h=>re(t,p=>p(r))})}function Qwe(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",a=t!==void 0?t:Date.now();return i.length===0?y("div",{children:o,className:Wwe}):y("div",{children:i.map(s=>y(Jwe,{entry:s,nowMs:a,onClick:r},s.id)),className:Lwe})}let Ywe=Qwe;function Xwe(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 Zwe(e,t,r){return Xwe(ao(e,t),r).map(n=>{let i=n[0];return{key:i,label:ct(i),state:n[1]}})}function Mo(e){return"var("+e+")"}let eEe=w([z("flex"),ee("flexStart"),c("gap","0"),c("width","100%")]),tEe=w([z("flex"),_e("column"),ee("center"),c("gap","4px"),c("flex","0 0 auto")]);function rEe(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?x.brand:x.borderSubtle))])}let vk=[z("inlineFlex"),ee("center"),Je("center"),c("width","24px"),c("height","24px"),c("border-radius","50%"),c("font-size",Mo($.sizeXs)),c("font-weight",Mo($.weightMedium)),c("box-sizing","border-box")],nEe=w(vk.concat([c("background",Mo(x.brand)),c("color","#fff")])),iEe=w(vk.concat([c("background",Mo(x.surface)),c("color",Mo(x.brand)),c("border","2px solid var("+x.brand+")")])),oEe=w(vk.concat([c("background",Mo(x.surface)),c("color",Mo(x.textDisabled)),c("border","1px solid var("+x.border+")")])),Bz=[c("font-size",Mo($.sizeXs)),c("text-align","center"),c("max-width","96px")],aEe=w(Bz.concat([c("color",Mo(x.textPrimary))])),sEe=w(Bz.concat([c("color",Mo(x.textDisabled))])),lEe=w([c("display","none")]);function uEe(e){switch(e){case"Done":return nEe;case"Current":return iEe;case"Upcoming":return oEe}}function cEe(e){switch(e){case"Done":case"Current":return aEe;case"Upcoming":return sEe}}function dEe(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function fEe(e){let t=e.compact,r=t!==void 0?t:!1;return y("div",{children:e.steps.map((n,i)=>{let o=i===0?null:y("div",{className:rEe(n.state==="Done"||n.state==="Current")},n.key+":c"),a=r?lEe:cEe(n.state);return L(ov,{children:[o,L("div",{children:[y("span",{children:dEe(n.state,i),className:uEe(n.state)}),y("span",{children:n.label,className:a})],className:tEe,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:eEe,role:"list"})}let jz=fEe;function qz(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 hEe(e){if(typeof e=="object")return ct(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function pEe(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 mEe(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function gEe(e){if(typeof e=="object")return"var("+x.border+")";switch(e){case"Approved":return"var("+x.success+")";case"Rejected":return"var("+x.error+")";case"Pending":return"var("+x.info+")";case"Skipped":return"var("+x.border+")"}}function Mn(e){return"var("+e+")"}let vEe=w([z("flex"),_e("column"),c("gap",Mn(O.md)),c("font-family",Mn($.fontFamily))]),bEe=w([z("flex"),_e("column")]),_Ee=w([z("flex"),ee("stretch"),c("gap",Mn(O.sm))]),yEe=w([z("flex"),_e("column"),ee("center"),c("flex","0 0 22px")]);function xEe(e){return w([z("inlineFlex"),ee("center"),Je("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",Mn(x.surface)),c("font-size","11px"),c("line-height","1"),c("flex","0 0 auto")])}let SEe=w([c("flex","1 1 auto"),c("width","1px"),c("min-height","12px"),c("background",Mn(x.borderSubtle))]),P3=w([z("flex"),_e("column"),c("gap","2px"),c("flex","1 1 auto"),c("min-width","0"),c("padding-bottom",Mn(O.sm))]),wEe=w([Ce("pointer"),qe([c("background",Mn(x.surfaceSubtle))]),c("border-radius",Mn(Z.sm)),c("padding-left","4px"),c("margin-left","-4px")]),EEe=w([z("flex"),ee("center"),ai("wrap"),c("gap",Mn(O.xs))]),kEe=w([c("font-size",Mn($.sizeSm)),c("font-weight",Mn($.weightMedium)),c("color",Mn(x.textPrimary))]),CEe=w([z("flex"),ee("center"),c("gap","6px"),c("font-size",Mn($.sizeXs)),c("color",Mn(x.textSecondary))]),REe=w([c("font-size",Mn($.sizeSm)),c("color",Mn(x.textSecondary)),c("white-space","pre-wrap")]),AEe=w([c("font-size",Mn($.sizeXs)),c("color",Mn(x.textDisabled))]);function TEe(e){let t=e.entries;if(t.length===0)return y(Pd,{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?y(jz,{steps:i}):null,y("div",{children:t.map((a,s)=>{let l=ke(a.onOpen),u=a.actor,d=a.at,f,h=0;u!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[u!==void 0?L(cr,{children:[y(Od,{name:u,src:a.actorImageUrl,size:"Small"}),y("span",{children:u})]}):null,d!==void 0?y("span",{children:lb(D(n,Date.now()),d),title:D(Eh(d),d)}):null],className:CEe}));let p=a.note;return L("div",{children:[L("div",{children:[y("span",{children:mEe(a.decision),className:xEe(gEe(a.decision))}),s===o?null:y("div",{className:SEe})],className:yEe}),L("div",{children:[L("div",{children:[y("span",{children:a.step,className:kEe}),y(Xo,{variant:pEe(a.decision),label:hEe(a.decision)})],className:EEe}),f,p!==void 0&&p!==""?y("div",{children:p,className:REe}):null],className:l?P3+" "+wEe:P3,onClick:m=>re(a.onOpen,g=>g())})],className:_Ee},a.key)}),className:bEe}),r!==void 0?y("span",{children:r,className:AEe}):null],className:vEe})}let $Ee=TEe;function ta(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let NEe=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],DEe=["decision","outcome","verdict","approval","approvalstatus","result"],FEe=["step","stage","level","tier","approvalstep","approvallevel","phase"],IEe=["note","notes","comment","comments","reason","remarks","justification","rationale"];function PEe(e){let t=Wu(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function OEe(e){return e.filter(t=>NEe.includes(ta(t))).length>=2}function Vz(e){return Q(Pr(e),t=>{let r=t[1],n=t[0];if(xp(r))return q(PEe(r),i=>[n,i])})}function MEe(e){let t=Vz(e),r=t.find(n=>DEe.includes(ta(n[0])));return r!==void 0?r:t.find(n=>OEe(n[1]))}function LEe(e,t){let r=Pr(e).map(n=>n[0]).find(n=>ne(F(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:Pr(e).map(n=>n[0]).find(n=>ne(qu(n),!1,OO))}function Gz(e,t){let r=D(t,xn(e,void 0,void 0)),n=MEe(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],a=Vz(e).find(s=>{let l=s[0];return l!==o?FEe.includes(ta(l)):!1});return{decisionField:o,dateSpan:i,stepField:q(a,s=>s[0]),stepValues:ne(a,[],s=>s[1]),actorField:LEe(e,r),noteField:Q(Pr(e),s=>{let l=s[0];if(xp(s[1])&&IEe.includes(ta(l)))return l})[0]}}function zEe(e){return ke(Gz(e,void 0))}function bk(e){return e.rows.map((t,r)=>{let n=D(G(t),{});return{key:D(k(F(n,"id"),ie),"#"+r.toString()),json:t,dict:n}})}function cu(e,t){return k(F(e,t),ie)}function O3(e,t){return k(Ju(t,e),Qn)}function M3(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>ta(n)===ta(t));return r!==-1?r:e.length}function UEe(e,t,r){let n=r!==void 0?r:f=>f,a=bk(e).map(f=>{let h=k(t.stepField,m=>cu(f.dict,m)),p=cu(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?a.sort((f,h)=>M3(t.stepValues,f[1])-M3(t.stepValues,h[1])|0):a.sort((f,h)=>{let p=O3(f[0].dict,t.dateSpan),m=O3(h[0].dict,t.dateSpan);return p!==void 0?m!==void 0?p-m:-1:m!==void 0?1:0});let l=a.map(f=>{let h=f[0];return{key:h.key,step:D(q(f[1],ct),D(k(e.semantics.labelField,p=>cu(h.dict,p)),"Decision")),decision:ne(f[2],"Pending",qz),actor:q(k(t.actorField,p=>cu(h.dict,p)),n),at:Ju(t.dateSpan,h.dict),note:k(t.noteField,p=>cu(h.dict,p)),onOpen:()=>e.onOpenRow(h.key,h.json)}}),u=Q(a,f=>q(f[1],ta)),d=t.stepValues.filter(f=>!u.includes(ta(f))).map(f=>({key:"pending:"+f,step:ct(f),decision:"Pending"}));return l.concat(d)}function BEe(e,t){let r=t.stepField;if(r===void 0)return[];let n=bk(e),i=Q(n,a=>{let s=cu(a.dict,r),l=cu(a.dict,t.decisionField);if(s===void 0||l===void 0)return;let u=qz(l);if(!(typeof u!="object"&&u==="Pending"))return ta(s)}),o=t.stepValues.find(a=>!i.includes(ta(a)));return t.stepValues.map(a=>({key:a,label:ct(a),state:i.includes(ta(a))?"Done":Re(o,a)?"Current":"Upcoming"}))}function Ls(e){return e.rows.map((t,r)=>{let n=D(G(t),{});return{key:D(k(F(n,"id"),ie),"#"+r.toString()),json:t,dict:n}})}function af(e,t){return k(F(e,t),ie)}function Kz(e,t,r){return q(af(t,r),n=>{let i=qu(r);return i!==void 0?D(k(e.refLabels,o=>o.lookupLabel(i,n)),n):n})}function nc(e,t){return D(k(e.semantics.labelField,r=>af(t.dict,r)),t.key)}function jEe(e,t){return q(e.semantics.imageField,r=>{let n=k(af(t.dict,r),i=>{if(i!=="")return i});return n!==void 0?{TAG:"Picture",_0:Ru(n)}:"EmptySlot"})}function Hz(e,t,r){re(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function Wz(e,t,r){return y("span",{children:Up(e,t,r!==void 0?r:"item"),style:{color:"var("+x.textDisabled+")",fontSize:"var("+$.sizeXs+")"}})}function ub(e,t,r,n){return L("div",{children:[e,Wz(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+O.sm+")"}})}function qEe(e){let t=e.source,r=ua(),n=hp(),i=Ls(t),o=hi(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),a=tf(i.map(h=>h.dict),o,r,t.ownEntity,vr(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(h,p)=>ef(a,h,r,p),isMissing:(h,p)=>Lp(a,h,r,p),retiredBadge:(h,p)=>Op(a,h,r,p),linkable:(h,p)=>Mp(a,h,r,p,!1)},u=Q([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField],h=>h),d=o.filter(h=>!u.includes(h.key)).slice(0,4),f=i.map(h=>{let p=q(k(t.semantics.statusField,_=>ma(h.dict,_)),_=>y(Xo,{variant:"Neutral",label:ct(_),dot:!1})),m=k(t.retired,_=>kh(_,F(h.dict,_.field))),g=p!==void 0?m!==void 0?L(cr,{children:[p,m]}):p:m!==void 0?m:void 0,v=jEe(t,h),b=q(t.rowActionsFor,_=>_(h.key,h.json).map(S=>({label:S.label,onClick:S.run})));return{key:h.key,title:nc(t,h),media:v,badge:g,fields:d.map(_=>({label:yu(_,r,t.ownEntity),value:gl(_.key,_.kind,_.propSchema,F(h.dict,_.key),_.ann,r,n,l,t.ownEntity)})),actions:b}});return ub(y(Twe,{cards:f,onCardClick:h=>Hz(t,i,h)}),[t],void 0,void 0)}function VEe(e){let t=Ls(e),r=D(e.semantics.statusField,""),n=ao(e.schema,r),i=s=>D(ma(s.dict,r),""),o=s=>s.map(l=>({value:l,label:l===""?"(no status)":ct(l),cards:t.filter(u=>i(u)===l).map(u=>{let d=Q(Sv(e.schema),f=>{if(f!==r)return Kz(e,u.dict,f)})[0];return{key:u.key,title:nc(e,u),meta:d}}),swatch:mk(n,l)})),a=tt(t.map(i).filter(s=>!n.includes(s)),[],(s,l)=>s.includes(l)?s:s.concat([l]));return o(n).concat(o(a))}function GEe(e){let t=e.source,r=Ls(t),n=D(t.semantics.statusField,""),i=VEe(t),o=f=>D(k(r.find(h=>h.key===f),h=>ma(h.dict,n)),""),a=(f,h)=>k(t.statusCommandFor,p=>p(o(f),h)),s=t.onCommand,l=s!==void 0&&ke(t.statusCommandFor)?(f,h)=>re(a(f,h),p=>s(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>ke(a(f,h)):void 0;return ub(y(KSe,{columns:i,onCardClick:f=>Hz(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let Td=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function _k(e,t){return D(e.accent,Td[No(t,Td.length)])}function KEe(e){return e.map((t,r)=>{let n=_k(t,r),i=t.semantics.dateSpan;return i!==void 0?Q(Ls(t),o=>q(k(Ju(i,o.dict),Qn),a=>{let s=k(uw(i,o.dict),Qn);return{key:r.toString()+":"+o.key,title:nc(t,o),start:a,end_:s,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function HEe(e){let t=e.sources,r=KEe(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:_k(i,o)})):[];return y(pwe,{events:r,legend:n,windowNote:Up(t,void 0,void 0)})}function WEe(e){return e.map((r,n)=>{let i=r.semantics.dateSpan,o=_k(r,n);return Ls(r).map(a=>{let s=k(i,f=>Ju(f,a.dict)),l=k(s,Qn),u=s!==void 0?D(Eh(s),s):"",d=q(k(r.semantics.statusField,f=>ma(a.dict,f)),ct);return{entry:{id:n.toString()+":"+a.key,timestamp:u,label:nc(r,a),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(a.key,a.json)}})}).flat().toSorted((r,n)=>{let i=r.sort,o=n.sort;return i!==void 0?o!==void 0?o-i:-1:o!==void 0?1:0})}function JEe(e){let t=e.sources,r=WEe(t),n=i=>re(r.find(o=>o.entry.id===i),o=>o.open_());return ub(y(Xye,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function Jz(e,t){let r=F(e,t);if(r===void 0)return[];let n=ie(r);return n!==void 0?[n]:Q(D(_t(r),[]),ie)}function QEe(e,t){let r=t.map(n=>n.key);return Q(Pr(e.schema),n=>{let i=n[0];return q(qu(i),o=>i)}).filter(n=>t.some(i=>Jz(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function YEe(e){let t=Ls(e),r=QEe(e,t),n=gi(e.semantics.dateSpan,IO);return n!==void 0?Q(t,i=>q(k(Ju(n,i.dict),Qn),o=>{let a=D(k(uw(n,i.dict),Qn),o);return{key:i.key,title:nc(e,i),start:o,end_:a<o?o:a,accent:e.accent,dependsOn:r.map(s=>Jz(i.dict,s)).flat(),onOpen:()=>e.onOpenRow(i.key,i.json)}})):[]}function XEe(e){let t=e.source,r=YEe(t),n=t.rows.length,i=r.length,o=Up([t],i,void 0),a=i===n?o:o+" (the rest carry no start date)";return y(F1e,{tasks:r,windowNote:a})}function ZEe(e,t){let r=e.semantics.labelField,n=k(e.semantics.statusField,i=>af(t.dict,i));return n!==void 0?n:k(Sv(e.schema).find(i=>Ma(i,r)?Ma(i,e.semantics.parentField):!1),i=>Kz(e,t.dict,i))}function e2e(e){let t=Ls(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:nc(e,n),subtitle:ZEe(e,n),parent:k(r,i=>af(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function t2e(e){let t=e.source,r=e2e(t);return y(jye,{nodes:r,windowNote:Up([t],void 0,void 0)})}function r2e(e){let t=e.source,r=ua(),n=bk(t),i=hi(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),o=tf(n.map(h=>h.dict),i,r,t.ownEntity,vr(t.refLabels)),a=t.refLabels,s=a!==void 0?a.lookupLabel:(h,p)=>ef(o,h,r,p),l=Gz(t.schema,t.semantics);if(l===void 0)return null;let d=UEe(t,l,h=>{let p=k(l.actorField,qu);return p!==void 0?D(s(p,h),h):h}),f=BEe(t,l);return y($Ee,{entries:d,steps:f,windowNote:Up([t],void 0,"decision")})}function n2e(e){return Q(Pr(e),t=>{let r=Wu(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function Qz(e){let t=n2e(e),r=xn(e,void 0,void 0).statusField,n=r!==void 0&&t.some(a=>a[0]===r)?t.filter(a=>a[0]===r).concat(t.filter(a=>a[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function i2e(e){return q(Qz(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],a=o[1],s=o[0],l=Ls(e),u=(b,_)=>D(ma(b.dict,_),""),d=(b,_)=>tt(l.map(S=>u(S,b)).filter(S=>!_.includes(S)),[],(S,E)=>S.includes(E)?S:S.concat([E])),f=a.concat(d(s,a)),h=n.concat(d(i,n)),p=f.map(b=>h.map(_=>tt(l,0,(S,E)=>u(E,s)===b&&u(E,i)===_?S+1|0:S))),m=p.map(b=>tt(b,0,(_,S)=>_+S|0)),g=h.map((b,_)=>tt(p,0,(S,E)=>S+E[_]|0)),v=tt(m,0,(b,_)=>b+_|0);return{rowField:s,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:m,colTotals:g,grandTotal:v}})}function o2e(e,t){return vO(e.toString(),NW(t))}function a2e(e){let t=e.source,r=de(()=>"Numbers"),n=r[1],i=r[0],o=i2e(t);if(o===void 0)return null;let a=g=>g===""?"(none)":ct(g),s=ct(o.rowField),l=ct(o.colField),u=o.rowValues.map(g=>[g,a(g)]),d=o.colValues.map(g=>[g,a(g)]),f=tt(o.counts,0,(g,v)=>tt(v,g,(b,_)=>_>b?_:b)),h=g=>o2e(g,AE([t])),p=(g,v)=>y("button",{children:v,style:{background:"none",backgroundColor:i===g?"var("+x.surfaceSubtle+")":"transparent",border:"1px solid var("+x.border+")",color:i===g?"var("+x.textPrimary+")":"var("+x.textSecondary+")",cursor:"pointer",fontSize:"var("+$.sizeSm+")",padding:"2px var("+O.sm+")",borderRadius:"var("+Z.sm+")"},type:"button",onClick:b=>n(_=>g)}),m;return m=i==="Numbers"?y(j1e,{rowDimLabel:s,colDimLabel:l,rowHeaders:u.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):y(yye,{rowDimLabel:s,colDimLabel:l,rowHeaders:u.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({value:v,display:v.toString()}))),maxLabel:f.toString()}),L("div",{children:[L("div",{children:[p("Numbers","Numbers"),p("Heat","Heat")],style:{display:"inline-flex",alignSelf:"flex-end",gap:"var("+O.xs+")"}}),m,Wz([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+O.sm+")"}})}function s2e(e){return e.map((t,r)=>{let n=t.semantics.imageField;return Ls(t).map(i=>{let o=k(k(n,u=>af(i.dict,u)),u=>{if(u!=="")return Ru(u)}),a=q(k(t.semantics.statusField,u=>ma(i.dict,u)),ct),s=t.fillSlot,l=o!==void 0||s===void 0||n===void 0?void 0:s(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:nc(t,i),caption:a,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function l2e(e){let t=e.sources,r=s2e(t),n=i=>re(r.find(o=>o.item.key===i),o=>o.open_());return ub(y(exe,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function zs(e){return y("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function sf(e,t){let r=e[0];return r!==void 0?t(r):null}ha({id:"cards",label:"Cards",icon:zs("▤"),arity:"Single",isCapable:(e,t)=>!0,render:e=>sf(e,t=>y(qEe,{source:t})),capability:"always — richer with label/image semantics and summary fields"});ha({id:"board",label:"Board",icon:zs("▥"),arity:"Single",isCapable:(e,t)=>ne(t.statusField,!1,r=>ao(e,r).length!==0),render:e=>sf(e,t=>y(GEe,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});ha({id:"calendar",label:"Calendar",icon:zs("▣"),arity:{TAG:"Multi",min:1},isCapable:(e,t)=>ke(t.dateSpan),render:e=>y(HEe,{sources:e}),capability:"dateSpan — a `date-range` field, a start*/end* date-time pair, or a lone non-infrastructure date field"});ha({id:"timeline",label:"Timeline",icon:zs("▚"),arity:{TAG:"Multi",min:2},isCapable:(e,t)=>ke(t.dateSpan),render:e=>y(JEe,{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"});ha({id:"gantt",label:"Gantt",icon:zs("▬"),arity:"Single",isCapable:(e,t)=>ne(t.dateSpan,!1,IO),render:e=>sf(e,t=>y(XEe,{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"});ha({id:"hierarchy",label:"Hierarchy",icon:zs("⑂"),arity:"Single",isCapable:(e,t)=>ke(t.parentField),render:e=>sf(e,t=>y(t2e,{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"});ha({id:"approvals",label:"Approvals",icon:zs("✓"),arity:"Single",isCapable:(e,t)=>zEe(e),render:e=>sf(e,t=>y(r2e,{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"});ha({id:"pivot",label:"Pivot",icon:zs("⊞"),arity:"Single",isCapable:(e,t)=>ke(Qz(e)),render:e=>sf(e,t=>y(a2e,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});ha({id:"gallery",label:"Gallery",icon:zs("▨"),arity:"Single",isCapable:(e,t)=>ke(t.imageField),render:e=>y(l2e,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function L3(e,t){return e===t?0:e<t?-1:1}function u2e(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 Jf(e,t){if(t===void 0)return"";let r=We(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();default:n=2}if(n===2){if(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 r.TAG==="JSONObject"?JSON.stringify(t):Q(r._0,ie).join(", ");break}else if(e.TAG==="KUnion"&&typeof r=="object"){if(r.TAG!=="JSONObject")return JSON.stringify(t);let i=cw(t);if(i===void 0)return"";let o=i[0];return ne(HS(e._0,o),o,a=>a.tag)}}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function c2e(e,t,r){let n=a=>a!==void 0?We(a)==="JSONNull":!0,i=n(t),o=n(r);if(i)return o?0:1;if(o)return-1;if(typeof e!="object")switch(e){case"KBoolean":let a=u=>{if(u===void 0)return 0;let d=We(u);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return a(t)-a(r);case"KDate":return L3(Jf(e,t),Jf(e,r));case"KNumber":let s=D(k(t,Ii),0),l=D(k(r,Ii),0);return s-l}return L3(Jf(e,t),Jf(e,r))}function d2e(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?ne(k(t,ie),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=q(t,We);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 f2e(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>Jf(i.kind,F(e,i.key)).toLowerCase().includes(n))}function h2e(e,t,r){let n=$e(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let a=o[0],s=t.find(l=>l.key===a);return s!==void 0?d2e(s.kind,F(i,a),o[1]):!0}))}function p2e(e,t,r){return r===""?e:e.filter(n=>f2e(n,t,r))}function m2e(e,t,r,n){if(r===void 0)return e;let i=t.find(a=>a.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((a,s)=>c2e(i.kind,F(a,r),F(s,r))*o)}function g2e(e,t){return Q(e,r=>{if(!Qse(r.kind))return;let n=u2e(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(F(t,r.key),"")}})}function Ko(e){return"var("+e+")"}let v2e=w([Mt("relative"),z("inlineFlex"),ee("center")]),b2e=w([c("background",Ko(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Ko(Z.md)),c("padding","var("+O.xs+") var("+O.md+")"),c("padding-left","32px"),c("font-size",Ko($.sizeMd)),c("color",Ko(x.textPrimary)),c("outline","none"),c("width","240px"),Is([c("border-color",Ko(x.brand))]),tW([c("color",Ko(x.textDisabled))])]),_2e=w([Mt("absolute"),Id(Ae(10)),c("color",Ko(x.textDisabled)),c("font-size",Ko($.sizeSm)),c("pointer-events","none")]),y2e=w([Mt("absolute"),Bl(Ae(8)),c("background","none"),c("border","none"),c("cursor","pointer"),c("color",Ko(x.textDisabled)),c("font-size",Ko($.sizeSm)),c("padding","0"),c("line-height","1"),qe([c("color",Ko(x.textSecondary))])]);function x2e(e){let t=e.placeholder,r=e.onChange,n=e.value,i=t!==void 0?t:"Search...";return L("div",{children:[y("span",{children:"/",className:_2e}),y("input",{className:b2e,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?y("button",{children:"x",className:y2e,onClick:o=>r("")}):null],className:v2e})}let Yz=x2e;function cl(e){return"var("+e+")"}let S2e=w([z("flex"),ee("center"),c("gap",cl(O.sm)),ai("wrap")]),w2e=w([z("flex"),ee("center"),c("gap","4px")]),E2e=w([c("color",cl(x.textSecondary)),c("font-size",cl($.sizeSm)),c("white-space","nowrap")]),k2e=w([c("background",cl(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",cl(Z.sm)),c("padding","2px var("+O.sm+")"),c("font-size",cl($.sizeSm)),c("color",cl(x.textPrimary)),c("cursor","pointer"),c("outline","none"),Is([c("border-color",cl(x.brand))])]);function C2e(e){let t=e.onChange,r=e.filter;return L("div",{children:[y("span",{children:r.label+":",className:E2e}),L("select",{children:[y("option",{children:"All",value:""}),r.options.map(n=>y("option",{children:n.label,value:n.value},n.value))],className:k2e,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:w2e})}function R2e(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?y(Yz,{value:r,onChange:t}):null,e.filters.map(i=>y(C2e,{filter:i,onChange:n},i.key))],className:S2e})}let Xz=R2e;function yk(){let e=de(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(s=>{});let a=o._0;t(s=>a)};return{element:r!==void 0?y(tk,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function z3(e){try{return decodeURIComponent(e)}catch{return e}}function A2e(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function U3(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[z3(r),z3(n)]}function Qi(e){return"var("+e+")"}let T2e=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap",Qi(O.md)),Yn(1),c("min-height","160px"),qa("center"),c("padding",Qi(O.lg))]),$2e=w([c("font-size","32px"),c("color",Qi(x.error)),c("line-height","1")]),N2e=w([c("color",Qi(x.textPrimary)),c("font-size",Qi($.sizeLg)),c("font-weight",Qi($.weightMedium)),hn(Ae(0))]),D2e=w([c("color",Qi(x.textSecondary)),c("font-size",Qi($.sizeSm)),c("line-height",Qi($.lineHeightNormal)),hn(Ae(0))]),F2e=w([c("background",Qi(x.brand)),c("color",Qi(x.textOnBrand)),c("border","none"),c("border-radius",Qi(Z.md)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",Qi($.sizeSm)),c("cursor","pointer"),sa(Ae(4))]);function I2e(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[y("div",{children:"X",className:$2e}),y("h3",{children:r,className:N2e}),ne(e.detail,null,n=>y("p",{children:n,className:D2e})),ne(e.onRetry,null,n=>y("button",{children:"Try again",className:F2e,onClick:i=>n()}))],className:T2e})}let Ra=I2e;function Zz(e,t){return t!==void 0?(r,n)=>t(r,n).then(e1e):e!==void 0?(r,n)=>e(r,n).then(lz):void 0}function Wp(){let e=si(),t=Pp();return Zz(e,t)}let P2e=Oe([["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 O2e(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function B3(e,t){return ne(k(G(e),r=>F(r,t)),[],r=>{let n=We(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return Q(n._0,ie).filter(o=>o!=="");default:return[]}})}function M2e(e){return k(e,t=>{try{return JSON.parse(t)}catch{return}})}function j3(e,t){return tt($e(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function L2e(e,t,r,n){let i=Va(t,r);return i!==void 0?Ft(CE(e,i,n).then(o=>{let a=o[0];return n.map(s=>{let l=F(a,s);return l!==void 0?l:s})}),o=>Promise.resolve(n)):Promise.resolve(n)}function Jp(e,t,r,n){let i=O2e(r,n);if(r===void 0)return Promise.resolve(i);let o=F(P2e,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let a=M2e(n);if(a===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(u=>{let d=u.field,f=B3(a,d);return f.length===0?Promise.resolve([d,""]):L2e(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(j3(o.template,d))})}let s={};return o.idFields.forEach(l=>{let u=l.field,d=B3(a,u);s[u]=d.join(", ")}),Promise.resolve(j3(o.template,s))}let z2e="The request failed — the change was not sent.",q3="This command could not be sent. See the console for details.";function U2e(e,t,r){let n={};return $e(D(G(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[D(e.aggregateIdField,"id")]=t,n}function xk(e,t,r,n,i,o,a,s,l){let u=a!==void 0?a:[],d=s!==void 0?s:m=>{},f=l!==void 0?l:m=>{},h=r.filter(m=>m.level==="Instance"),p=Zz(e,t);return(m,g,v)=>{let b=h.find(_=>_.name===m);if(p!==void 0)if(b!==void 0){f(g),Ft(p(b.mutationDocument,U2e(b,g,v)).then(_=>{if(typeof _!="object")return _==="Accepted"?(i||o(),d("Cleared"),Promise.resolve()):(i||setTimeout(()=>o(),500),d("Cleared"),Promise.resolve());{if(_.TAG==="Rejected"){let E=_._0;return console.warn("[AutoUI] "+n+": command "+m+" rejected"+ne(E.errorCode,"",C=>" ("+C+")")),o(),Jp(e,u,E.errorCode,E.detail).then(C=>(d({TAG:"Failed",_0:{command:b.label,reason:C}}),Promise.resolve()))}let S=_._0;return console.error("[AutoUI] "+n+": command "+m+" not executed — "+S),o(),d({TAG:"Failed",_0:{command:b.label,reason:S}}),Promise.resolve()}}),_=>(console.error("[AutoUI] "+n+": command "+m+" failed to reach the server"),d({TAG:"Failed",_0:{command:b.label,reason:z2e}}),o(),Promise.resolve()));return}else return console.error("[AutoUI] "+n+': command "'+m+'" is not an instance command of this view'),d({TAG:"Failed",_0:{command:m,reason:q3}});else return console.error("[AutoUI] "+n+': command "'+m+'" not sent — no GraphQL executor in context'),d({TAG:"Failed",_0:{command:m,reason:q3}})}}let B2e=500;function yo(e){return"var("+e+")"}let j2e=w([Mt("relative"),z("inlineBlock")]),q2e=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",yo(Z.sm)),c("cursor","pointer"),c("color",yo(x.textSecondary)),c("padding","2px var("+O.sm+")"),c("font-size",yo($.sizeSm)),qe([c("background",yo(x.surfaceSubtle)),c("color",yo(x.textPrimary))])]),V2e=w([Mt("absolute"),Bl(Ae(0)),Fs({NAME:"percent",VAL:100}),sa(Ae(4)),c("background",yo(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",yo(Z.md)),c("box-shadow",yo(Pn.md)),c("min-width","160px"),c("z-index","200"),c("overflow","hidden"),ZH(Ae(4),Ae(0))]);function G2e(e){return w([z("block"),la({NAME:"percent",VAL:100}),c("background","none"),c("border","none"),c("text-align","left"),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",yo($.sizeMd)),c("color",yo(e?x.error:x.textPrimary)),Ce("pointer"),qe([c("background",yo(x.surfaceSubtle))])])}let K2e=w([c("border","none"),c("border-top","1px solid var("+x.borderSubtle+")"),HH(Ae(4),Ae(0))]);function H2e(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=de(()=>!1),i=n[1],o=n[0];return De(()=>{if(!o)return;let a=s=>i(l=>!1);return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[o]),L("div",{children:[y("button",{children:r,className:q2e,onClick:a=>{a.stopPropagation(),i(s=>!s)}}),o?y("div",{children:e.items.map((a,s)=>{if(typeof a!="object")return y("hr",{className:K2e},s.toString());let l=a.onClick,u=a.label;return y("button",{children:u,className:G2e(a.danger),onClick:d=>{i(f=>!1),l()}},u)}),className:V2e,onClick:a=>{a.stopPropagation()}}):null],className:j2e})}let W2e=H2e;function hS(e){return"var("+e+")"}let J2e=w([z("grid"),c("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),c("gap",hS(O.lg)),c("align-items","start"),nw("(max-width: 720px)",[c("grid-template-columns","minmax(0, 1fr)")])]),e9=w([c("min-width","0"),c("overflow","auto")]),Q2e=Wr([e9,w([c("border-left","1px solid var("+x.border+")"),c("padding-left",hS(O.lg)),nw("(max-width: 720px)",[c("border-left","none"),c("padding-left","0"),c("border-top","1px solid var("+x.border+")"),c("padding-top",hS(O.lg))])])]);function Y2e(e){return L("div",{children:[y("div",{children:e.master,className:e9}),y("div",{children:e.detail,className:Q2e})],className:J2e})}let X2e=Y2e;function ap(e){return"var("+e+")"}let Z2e=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap",ap(O.md)),Yn(1),c("min-height","160px"),c("color",ap(x.textSecondary))]),eke=w([c("width","32px"),c("height","32px"),c("border","3px solid var("+x.borderSubtle+")"),c("border-top-color",ap(x.brand)),c("border-radius","50%"),c("animation","rv-spin 0.7s linear infinite")]),tke=w([c("font-size",ap($.sizeSm)),c("color",ap(x.textSecondary))]);lW("@keyframes rv-spin",[fr("from",[c("transform","rotate(0deg)")]),fr("to",[c("transform","rotate(360deg)")])]);function rke(e){return L("div",{children:[y("div",{className:eke}),ne(e.label,null,t=>y("span",{children:t,className:tke}))],className:Z2e})}let ld=rke;function nke(e,t){return D(k(F(e,t),ie),"")}function ike(e,t,r){let n={},i=[];e.forEach(a=>{let s=nke(a,t),l=F(n,s);l!==void 0?l.push(a):(n[s]=[a],i.push(s))});let o=a=>{if(a==="")return r.length+1|0;let s=r.indexOf(a);return s!==-1?s:r.length};return i.toSorted((a,s)=>{let l=o(a),u=o(s);return l!==u?l-u|0:a<s?-1:a>s?1:0}).map(a=>[a,D(F(n,a),[])])}function ho(e){return k(k(G(e),t=>F(t,"id")),ie)}function t9(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function mh(e,t){return k(G(e),r=>F(r,t))}function oke(e,t,r,n){let i=n!==void 0?n:[],o=G(e),a=G(t);if(o===void 0||a===void 0)return e;let s=Oe($e(o));return r.filter(l=>!i.includes(l)).forEach(l=>{let u=F(a,l),d=F(o,l);if(u!==void 0){s[l]=u;return}else if(d!==void 0){s[l]=null;return}else return}),s}function r9(e){return e.startsWith("__")?!0:e.startsWith("$")}function ake(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")?!0:r>3?t.endsWith("ids"):!1}let n9="$offload";function pS(e){let t=We(e);if(typeof t!="object")return!1;switch(t.TAG){case"JSONObject":let r=t._0;return ke(F(r,n9))?!0:pp(r).some(pS);case"JSONArray":return t._0.some(pS);default:return!1}}function mS(e){let t=We(e);if(typeof t=="object")switch(t.TAG){case"JSONObject":let r=t._0,n=k(F(r,n9),G);if(n===void 0)return tt(pp(r),void 0,(o,a)=>Jn(o,mS(a)));let i=k(F(n,"hash"),ie);return i!==void 0?i:k(F(n,"key"),ie);case"JSONArray":return tt(t._0,void 0,(o,a)=>Jn(o,mS(a)));default:return}}function i9(e,t){return Q(t,r=>q(k(mh(e,r),mS),n=>[r,n]))}function ske(e,t,r,n){let i=n!==void 0?n:[],o=r.some(l=>i.includes(l)?!1:ne(mh(t,l),!1,pS)),s=ne(G(e),!1,l=>Object.keys(l).some(u=>r9(u)?!1:!r.includes(u)))&&r.some(l=>ake(l)?Ma(mh(e,l),mh(t,l)):!1);return o?!1:!s}let V3=new Map;function lke(e,t){let r=ne(G(e),[],i=>Object.keys(i).filter(o=>r9(o)?!1:!t.includes(o)));if(r.length===0)return;let n=r.join(",");if(vr(V3.get(n))){V3.set(n,!0),console.warn("AutoLiveApply: the live-update payload carries fields the state schema does not declare ("+n+") — they will not be merged. The persisted manifest is likely behind the deployed projection.");return}}function uke(e,t,r,n){return Q(i9(t,r),i=>{let o=i[1],a=i[0],s=n.some(u=>u[0]===a?u[1]===o:!1),l=ne(mh(e,a),!1,u=>We(u)!=="JSONNull");if(s&&l)return a})}function o9(e,t,r,n){let i=n!==void 0?n:[],o=t.state;if(o===void 0)return;let a=t9(r);if(a.length===0)return;lke(o,a);let s=uke(e,o,a,i),l=oke(e,o,a,s);if(ske(e,l,a,s))return l}function cke(e,t){return o9({},e,t,void 0)}function dke(e,t,r){return q(k(k(G(t),n=>F(n,r)),_t),n=>{let i=Q(n,ho);return{rows:n,gone:e.filter(o=>!i.includes(o))}})}function fke(e,t){let r=k(G(e),n=>F(n,t));if(r!==void 0)return We(r)==="JSONNull"?"Absent":{TAG:"Present",_0:r}}function hke(e,t){return t.length===0?e:e.filter(r=>{let n=ho(r);return n!==void 0?!t.includes(n):!0})}let yy={fromBatch:dke,fromSingle:fke,drop:hke},pke=/^[0-9]+$/;function G3(e){if(!pke.test(e))return;let t=e.length,r=n=>{for(;;){let i=n;if(!(i<(t-1|0)&&Re(e[i],"0")))return i;n=i+1|0}};return e.slice(r(0))}function mke(e,t){let r=G3(e),n=G3(t);if(r===void 0||n===void 0)return!0;let i=r.length,o=n.length;return i===o?r>n:i>o}function gke(){return new Map}function a9(e,t,r){if(r===void 0)return!0;let n=e.get(t);return n!==void 0?mke(r,n):!0}function vke(e,t,r){if(r!==void 0&&a9(e,t,r)){e.set(t,r);return}}let ss={make:gke,shouldApply:a9,record:vke};function bke(){return new Map}function s9(e,t){return D(e.get(t),[])}function l9(e,t,r){if(r.length!==0){e.set(t,r);return}}function _ke(e,t,r,n){let i=o9(t,r,n,s9(e,r.id)),o=r.state;return o!==void 0&&l9(e,r.id,i9(o,t9(n))),i}let Vc={make:bke,known:s9,record:l9,apply:_ke},K3=21;function u9(e,t,r){return Q(E8(e,t),n=>{let i=k(F(n,"id"),ie),o=D(k(F(n,r),ie),D(i,""));return q(i,a=>({id:a,label:o}))})}function yke(e,t){let r=si(),n=de(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return De(()=>{let o={contents:!1};if(i(a=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let a=t==="id"?"id":"id "+t,s="query { "+e+"(first: "+K3.toString()+") { edges { node { "+a+" } } } }";Ft(r(s,{}).then(l=>{if(!o.contents){let u=u9(l,e,t),d=u.length>=K3,f=d?u.slice(0,20):u;i(h=>({loading:!1,options:f,hasMore:d}))}return Promise.resolve()}),l=>(o.contents||(console.warn("[AutoUI] RefField "+e+" fetch failed",l),i(u=>({loading:!1,options:[],hasMore:!1}))),Promise.resolve()))}else o.contents||i(a=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function xke(e,t,r){let n=si(),i=de(()=>({loading:!1,options:[],error:!1})),o=i[1];return De(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let a={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let s=setTimeout(()=>{if(a.contents)return;if(n===void 0)return o(f=>({loading:!1,options:[],error:!1}));let l=t==="id"?"id":"id "+t,u="query($q: String!) { "+e+"(first: 20, filter: {searchPrefix: $q}) { edges { node { "+l+" } } } }",d={};d.q=r,Ft(n(u,d).then(f=>{if(!a.contents){let h=u9(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(a.contents||(console.warn("[AutoUI] RefField "+e+" searchPrefix failed; falling back to client-side filter",f),o(h=>({loading:!1,options:[],error:!0}))),Promise.resolve()))},250);return()=>{a.contents=!0,clearTimeout(s)}},[n,r,e]),i[0]}function Ske(e,t,r){let n=si(),i=de(()=>{}),o=i[1];return De(()=>{let a={contents:!1},s=0;if(n!==void 0&&t!==void 0&&t!==""){let l=r==="id"?"id":"id "+r,u="query($id: ID!) { "+e+"(id: $id) { "+l+" } }",d={};d.id=t,Ft(n(u,d).then(f=>{if(!a.contents){let h=G(f),p=D(k(k(h,b=>F(b,"data")),G),{}),m=F(p,e),g=m!==void 0?m:k(h,b=>F(b,e)),v=k(g,G);if(v!==void 0){let b=D(k(F(v,"id"),ie),t),_=D(k(F(v,r),ie),b);o(S=>({id:b,label:_}))}else o(b=>{})}return Promise.resolve()}),f=>Promise.resolve())}else s=1;return s===1&&o(l=>{}),()=>{a.contents=!0}},[n,t,r]),i[0]}function Fr(e){return"var("+e+")"}function Qf(e){if(e==="")return[];let t=_t(JSON.parse(e));return t!==void 0?Q(t,ie):[e]}function wke(e){return JSON.stringify(e.map(t=>t))}let Eke=w([Mt("relative"),la({NAME:"percent",VAL:100})]),H3=w([c("background",Fr(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Fr(Z.sm)),c("padding","var("+O.xs+") var("+O.sm+")"),c("font-size",Fr($.sizeMd)),c("color",Fr(x.textPrimary)),c("outline","none"),la({NAME:"percent",VAL:100}),QH(Ae(34)),z("flex"),ee("center"),ai("wrap"),c("gap","4px"),Ce("pointer"),qa("left"),Is([c("border-color",Fr(x.brand))])]),kke=w([c("border-color",Fr(x.brand))]),Cke=w([c("border-color",Fr(x.error))]),Rke=w([c("color",Fr(x.textSecondary))]),Ake=w([z("inlineFlex"),ee("center"),c("background",Fr(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Fr(Z.sm)),c("padding","2px 6px"),c("font-size",Fr($.sizeSm)),c("gap","4px")]),Tke=w([Ce("pointer"),c("color",Fr(x.textSecondary)),c("font-weight",Fr($.weightBold))]),$ke=w([c("border","none"),c("background","transparent"),c("outline","none"),c("color",Fr(x.textPrimary)),c("font-size",Fr($.sizeMd)),Yn(1),rw(Ae(40))]),Nke=w([Mt("absolute"),Fs({NAME:"percent",VAL:100}),Id("zero"),Bl("zero"),sa(Ae(2)),c("background",Fr(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",Fr(Z.sm)),c("box-shadow",Fr(Pn.md)),KH("none"),hn("zero"),XH("zero"),WH(Ae(240)),YH("auto"),eW(20)]),Dke=w([c("padding","var("+O.xs+") var("+O.sm+")"),Ce("pointer"),c("color",Fr(x.textPrimary)),c("font-size",Fr($.sizeMd))]),Fke=w([c("background",Fr(x.surfaceSubtle))]),Ike=w([c("background",Fr(x.brandSubtle))]),W3=w([c("padding","var("+O.xs+") var("+O.sm+")"),c("color",Fr(x.textSecondary)),c("font-size",Fr($.sizeSm))]),Pke=(function(e,t){return e.contains(t)});function Oke(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,a=Math.max(120,Math.min(240,i?n:r));return[i,a]}function Mke(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.required,s=e.multi,l=e.labelField,u=e.queryField,d=e.fieldKey,f=n!==void 0?n:()=>{},h=r!==void 0?r:!1,p=t!==void 0?t:!1,m=yke(u,l),g=m.options,v=m.loading,b=Pe(void 0),_;if(s)_="Search";else{let Qe=b.current;if(Qe!==void 0)_=Qe;else if(v)_="Inline";else{let st=m.hasMore?"Search":"Inline";b.current=st,_=st}}let S=de(()=>!1),E=S[1],C=S[0],A=de(()=>0),T=A[1],R=A[0],N=de(()=>""),I=N[1],M=N[0],P=de(()=>[!1,240]),U=P[1],j=P[0],V=Pe(null),Y=Pe(null),J=s||o===""?!1:!g.some(Qe=>Qe.id===o),X=Ske(e.singleQueryField,J?o:void 0,l),oe=Qe=>{let st=q(g.find(Ct=>Ct.id===Qe),Ct=>Ct.label),Nt=k(X,Ct=>{if(Ct.id===Qe)return Ct.label});return st!==void 0?st:Nt!==void 0?Nt:Qe};De(()=>{if(!C)return;let Qe=st=>{let Nt=st.target,Ct=V.current;if(Ct!=null&&!Pke(Ct,Nt))return E(ve=>!1)};return document.addEventListener("mousedown",Qe),()=>{document.removeEventListener("mousedown",Qe)}},[C]),NP(()=>{if(C){let Qe=V.current;Qe!=null&&U(st=>Oke(Qe))}},[C]);let ge=_==="Search"&&M!=="",H=xke(u,l,ge?M:""),ae;if(M==="")ae=g;else{let Qe=M.toLowerCase();ae=g.filter(st=>st.label.toLowerCase().startsWith(Qe))}let te=ge&&!H.error?H.options:ae,ue=te.length,Se=v||ge&&H.loading,pe=Qe=>{let st=Qf(o),Nt=st.some(ve=>ve===Qe)?st.filter(ve=>ve!==Qe):st.concat([Qe]);i(d,JSON.stringify(Nt.map(ve=>ve))),I(ve=>""),T(ve=>0);let Ct=Y.current;if(Ct!=null){Ct.focus();return}},be=Qe=>{let st=te[Qe];if(st!==void 0){if(s)return pe(st.id);{let Nt=st.id;return i(d,Nt),E(Ct=>!1),I(Ct=>"")}}},Ie=Qe=>{switch(Qe.key){case"ArrowDown":return Qe.preventDefault(),C?T(ve=>ue===0?0:No(ve+1|0,ue)):E(ve=>!0);case"ArrowUp":return Qe.preventDefault(),T(ve=>ue===0?0:No((ve-1|0)+ue|0,ue));case"Backspace":if(!(s&&M===""))return;let Nt=Qf(o);if(Nt.length===0)return;let Ct=Nt.slice(0,Nt.length-1|0);return i(d,JSON.stringify(Ct.map(ve=>ve)));case"Enter":return C?(Qe.preventDefault(),be(R)):void 0;case"Escape":return C?E(ve=>!1):void 0;default:return}},$t=C?H3+" "+kke:H3,Lt=h?$t+" "+Cke:$t,Ar=()=>Qf(o).map(st=>L("span",{children:[oe(st),y("span",{children:"×",className:Tke,onClick:Nt=>{Nt.stopPropagation(),pe(st)}})],className:Ake},st)),Qr=(j[1]|0).toString()+"px",li=j[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:Qr,top:"auto"}:{maxHeight:Qr},Sn;if(Se)Sn=y("li",{children:"Loading…",className:W3});else if(ue===0)Sn=y("li",{children:M===""?"No options":"No matches",className:W3});else{let Qe=s?Qf(o):o===""?[]:[o];Sn=te.map((st,Nt)=>{let Ct=Qe.some(At=>At===st.id),Ye=Aq([[Dke],Nt===R?[Fke]:[],Ct?[Ike]:[]]).join(" ");return y("li",{children:st.label,"aria-selected":Ct,className:Ye,role:"option",onMouseDown:At=>{At.preventDefault(),be(Nt)},onMouseEnter:At=>T(yt=>Nt)},st.id)})}let lo=y("ul",{children:Sn,className:Nke,role:"listbox",style:li}),wr;return wr=_==="Inline"?y("button",{children:o===""?y("span",{children:a?"Select…":"—",className:Rke}):oe(o),className:Lt,autoFocus:p,type:"button",onKeyDown:Ie,onBlur:Qe=>f(),onClick:Qe=>E(st=>!st)}):L("div",{children:[s?Ar():null,y("input",{ref:Jt(Y),className:$ke,autoFocus:p,placeholder:a?"Search…":"—",type:"text",value:s||C?M:o===""?"":oe(o),onKeyDown:Ie,onFocus:Qe=>E(st=>!0),onBlur:Qe=>f(),onChange:Qe=>{let st=Qe.target.value;I(Nt=>st)}})],className:Lt,onClick:Qe=>E(st=>!0)}),L("div",{children:[wr,C?lo:null],ref:Jt(V),className:Eke})}let Lke=Mke;function zke(e,t,r,n){return k(e.find(i=>i.id===t),i=>{let o=i.aggregates.find(a=>a.name===r);return o!==void 0?q(o.commands.find(a=>a.name===n),a=>({plugin:i,enclosingAggregate:o,command:a})):k(i.stateChangeSlices.find(a=>a.name===r),a=>q(a.commands.find(s=>s.name===n),s=>({plugin:i,enclosingAggregate:void 0,command:s})))})}function c9(e,t,r){return e}function Uke(e,t,r){let n=r!==void 0?r:c9;return q(zke(t,e.pluginId,e.slice,e.command),i=>{let o=i.plugin,a=n(i.command,i.enclosingAggregate,o.id);return{label:D(e.label,a.label),pluginId:o.id,command:a,field:e.field,navigateTo:k(e.then,s=>{if(s.trim()!=="")return s})}})}function Bke(e,t,r){let n=r!==void 0?r:c9;return Q(D(k(e,i=>i.rowActions),[]),i=>Uke(i,t,n))}function jke(e,t){let r=e.refFields.find(n=>n.propertyKey===t);return r!==void 0?r.multi:D(k(k(k(q(k(k(k(G(e.schema),n=>F(n,"properties")),G),n=>F(n,t)),yn),G),n=>F(n,"type")),ie),"")==="array"}function qke(e,t){return Oe([[e.field,jke(e.command,e.field)?wke([t]):t]])}function Ot(e){return"var("+e+")"}let d9="168px",Vke=w([z("flex"),_e("column"),c("gap",Ot(O.sm))]),Gke=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",Ot(O.sm))]),J3=w([z("inlineFlex"),ee("center"),c("gap",Ot(O.xs))]),Yf=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Ot(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",Ot(x.textSecondary)),c("font-size",Ot($.sizeSm)),Ce("pointer"),qe([c("background",Ot(x.surfaceSubtle)),c("color",Ot(x.textPrimary))])]),Kke=Wr([Yf,w([c("background",Ot(x.surfaceSubtle)),c("color",Ot(x.textPrimary)),c("font-weight",Ot($.weightMedium))])]),Hke=w([c("font-size",Ot($.sizeMd)),c("font-weight",Ot($.weightMedium)),c("color",Ot(x.textPrimary))]),Wke=w([c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",Ot(Z.md)),c("overflow","hidden")]),f9=w([z("flex"),ee("stretch")]),Jke=Wr([f9,w([c("background",Ot(x.surfaceSubtle)),c("border-bottom","1px solid var("+x.borderSubtle+")")])]),Qke=Wr([f9,w([c("border-top","1px solid var("+x.borderSubtle+")")])]),Yke=w([c("flex","0 0 "+d9),c("padding","4px var("+O.sm+")"),c("font-size",Ot($.sizeXs)),c("color",Ot(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),h9=w([c("flex","0 0 "+d9),c("padding","6px var("+O.sm+")"),c("font-size",Ot($.sizeSm)),c("font-weight",Ot($.weightMedium)),c("color",Ot(x.textPrimary)),c("border-right","1px solid var("+x.borderSubtle+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),Xke=Wr([h9,w([c("color",Ot(x.textDisabled)),c("font-style","italic")])]);function gS(e){return w([z("grid"),c("flex","1 1 auto"),c("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let Zke=w([c("background",Ot(x.surfaceSubtle))]),eCe=w([c("padding","4px var("+O.xs+")"),c("font-size",Ot($.sizeXs)),c("color",Ot(x.textSecondary)),c("border-left","1px solid var("+x.borderSubtle+")")]),p9=w([z("flex"),_e("column"),c("gap","2px"),c("min-height","48px"),c("padding","3px"),c("border-left","1px solid var("+x.borderSubtle+")")]),tCe=Wr([p9,w([c("background",Ot(x.surfaceSubtle))])]);function Q3(e){return w([z("block"),c("width","100%"),c("text-align","left"),c("border","none"),c("border-left","3px solid "+e),c("border-radius",Ot(Z.sm)),c("background",Ot(x.surfaceSubtle)),c("color",Ot(x.textPrimary)),c("font-size",Ot($.sizeXs)),c("padding","1px var("+O.xs+")"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap"),Ce("pointer"),qe([c("background",Ot(x.surfaceElevated))])])}let rCe=w([Ce("grab")]),nCe=w([vs(.85),c("z-index","10"),Ce("grabbing")]),iCe=w([c("font-size",Ot($.sizeXs)),c("color",Ot(x.textDisabled))]),Y3="var("+x.brand+")";function oCe(e){return D(e.end_,e.start)}function aCe(e,t){return e.filter(r=>tM(r.start,oCe(r),t)).toSorted((r,n)=>r.start-n.start)}function sCe(e,t){return nM(e.start)||!eM(e.start,t)?e.title:rM(e.start)+" "+e.title}function lCe(e){let t=e.draggable,r=e.event,n=$z({id:r.key,disabled:!t}),i=t?Q3(D(r.accent,Y3))+" "+rCe:Q3(D(r.accent,Y3)),o=n.isDragging?i+" "+nCe:i,a=q(Iz(n.transform),u=>({transform:u})),s=n.listeners,l=s==null?void 0:Jt(s);return y("button",{children:sCe(r,e.day),ref:Jt(n.setNodeRef),className:o,style:a,title:r.title,onKeyDown:u=>re(l,d=>Fz(d,u)),onClick:u=>r.onOpen(),onPointerDown:u=>re(l,d=>Dz(d,u))})}function uCe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,a=Nz({id:o}),s=!i.unassigned&&a.isOver?gS(n.length)+" "+Zke:gS(n.length);return L("div",{children:[y("div",{children:i.label,className:i.unassigned?Xke:h9}),y("div",{children:n.map(l=>y("div",{children:aCe(i.events,l).map(u=>y(lCe,{event:u,day:l,draggable:t},u.key)),className:l===r?tCe:p9},l.toString())),ref:Jt(a.setNodeRef),className:s})],className:Qke})}function cCe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=de(()=>"Week"),a=o[1],s=o[0],l=de(()=>vi(D(r,Date.now()))),u=l[1],d=l[0],f=vi(Date.now()),h=ke(t),p;p=s==="Week"?Cl(7,_=>ko(Ev(d),_)):[vi(d)];let m=_=>u(S=>s==="Week"?ko(S,_*7|0):ko(S,_)),g=_=>{let S=_.over;if(t===void 0||S==null||S.id==="")return;let E=i.find(C=>C.events.some(A=>A.key===_.active.id));if(ne(E,!0,C=>C.resourceId!==S.id))return t(_.active.id,S.id)},v=(_,S)=>y("button",{children:S,className:s===_?Kke:Yf,onClick:E=>a(C=>_)}),b;return b=s==="Week"?bo(d):Rs(d)+" — "+bo(d),L("div",{children:[L("div",{children:[L("div",{children:[y("button",{children:"‹",className:Yf,onClick:_=>m(-1)}),y("button",{children:"Today",className:Yf,onClick:_=>u(S=>f)}),y("button",{children:"›",className:Yf,onClick:_=>m(1)}),y("span",{children:b,className:Hke})],className:J3}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:J3})],className:Gke}),y(Tz,{onDragEnd:g,children:L("div",{children:[L("div",{children:[y("div",{children:"Resource",className:Yke}),y("div",{children:p.map(_=>y("div",{children:Rs(_),className:eCe},_.toString())),className:gS(p.length)})],className:Jke}),i.map(_=>y(uCe,{lane:_,days:p,today:f,draggable:h},_.unassigned?"\0unassigned":_.resourceId))],className:Wke})}),n!==void 0?y("span",{children:n,className:iCe}):null],className:Vke})}let dCe=cCe;function fCe(e){switch(e){case"Hints":return"hints";case"DeclaredTarget":return"declared-target";case"SchemaTarget":return"schema-target";case"Setter":return"setter"}}function m9(e,t){return e+"→"+t}function Sk(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function wk(e){return Q(D(k(k(G(e),t=>F(t,"required")),_t),[]),ie).filter(t=>t!=="TAG")}function hCe(e,t){let r=k(k(k(G(e),o=>F(o,"properties")),G),o=>F(o,t));if(r===void 0)return;let n=k(k(G(r),o=>F(o,"const")),ie);if(n!==void 0)return n;let i=Wu(r);if(i!==void 0&&i.length===1)return i[0]}function g9(e){return e.filter(t=>t.level==="Instance")}function xy(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function v9(e){let t=e.allowedStates,r=e.targetState;return t!==void 0?r===void 0:!1}function pCe(e,t,r){return Sk(e.schema).includes(t)?Oe([[t,r]]):{}}function mCe(e,t){let r=e.filter(n=>!v9(n)&&Sk(n.schema).includes(t)?wk(n.schema).every(i=>i===t||i==="id"?!0:Re(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function X3(e){if(e.length===1)return e[0]}function cb(e,t,r){let n=g9(t),i=mCe(n,e);return(o,a)=>{let s=(f,h)=>{if(xy(f,o))return{command:f.name,patch:pCe(f,e,a),tier:h}},l=k(k(k(r,f=>f[a]),f=>n.find(h=>h.name===f)),f=>s(f,"Hints"));if(l!==void 0)return l;let u=k(X3(n.filter(f=>xy(f,o)?Re(f.targetState,a):!1)),f=>s(f,"DeclaredTarget"));if(u!==void 0)return u;let d=k(X3(n.filter(f=>!v9(f)&&xy(f,o)?Re(hCe(f.schema,e),a):!1)),f=>s(f,"SchemaTarget"));return d!==void 0?d:k(i,f=>s(f,"Setter"))}}function gCe(e,t,r){let n=g9(r),i=ao(e,t),o={};return n.forEach(a=>{let s=a.targetState;if(s!==void 0){D(a.allowedStates,[]).forEach(l=>{if(i.includes(l)&&i.includes(s)){o[m9(l,s)]={command:a.name,patch:{},tier:"DeclaredTarget"};return}});return}}),o}function b9(e,t,r,n){let i=cb(t,r,n),o=ao(e,t),a={};return o.forEach(s=>{o.forEach(l=>re(i(s,l),u=>{a[m9(s,l)]=u}))}),a}function vCe(e,t,r){let n=t+"→",i=Q(Object.entries(e),o=>{let a=o[0];if(o[1].command===r&&a.startsWith(n))return a.slice(n.length)});if(i.length===1)return i[0]}let Vu="resources",Gu="events";function bCe(e){return e.find(t=>Re(t.role,Vu))}function _9(e){return e.filter(t=>Re(t.role,Gu))}function _Ce(e,t){return e.toString()+"::"+t}function yCe(e){let t=e.indexOf("::");if(t!==-1)return q(OP(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function Nf(e,t){return k(F(e,t),ie)}function xCe(e){let t=bCe(e),r=_9(e),n=t!==void 0?t.rows.map(d=>{let f=D(G(d),{}),h=D(Nf(f,"id"),""),p=D(k(t.semantics.labelField,m=>Nf(f,m)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>Q(d.rows,h=>{let p=D(G(h),{}),m=D(Nf(p,"id"),""),g=d.semantics.dateSpan;if(g!==void 0)return q(k(Ju(g,p),Qn),v=>{let b=k(uw(g,p),Qn),_=D(k(d.semantics.labelField,R=>Nf(p,R)),m),S=D(k(d.resourceRef,R=>Nf(p,R)),""),E=_Ce(f,m),C=d.accent;return[S,{key:E,title:_,start:v,end_:b,accent:C,onOpen:()=>d.onOpenRow(m,h)}]})})).flat(),a=d=>Q(o,f=>{if(d(f[0]))return f[1]}),s=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:a(h=>h===f)}}),l=a(d=>!i.includes(d)),u=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return s.concat(u)}function SCe(e){let t=e.sources,r=xCe(t),n=_9(t),o=n.some(l=>ke(l.onCommand)&&ke(l.assignCommand)?ke(l.resourceRef):!1)?(l,u)=>re(yCe(l),d=>{let f=d[1];re(n[d[0]],h=>{let p=h.onCommand,m=h.assignCommand,g=h.resourceRef;if(p!==void 0&&m!==void 0&&g!==void 0)return p(m,f,Oe([[g,u]]))})}):void 0,a=tt(n,0,(l,u)=>l+u.rows.length|0),s=gO(AE(t),a,void 0,"scheduled item");return y(dCe,{lanes:r,windowNote:s,onReassign:o})}let wCe=y("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),Xf="scheduler";function y9(e){return ke(xn(e,void 0,void 0).dateSpan)?Pr(e).some(t=>ke(qu(t[0]))):!1}function ECe(e,t,r){return r?!1:y9(t)}function x9(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>Sk(i.schema).includes(t)?wk(i.schema).every(o=>o===t||o==="id"?!0:Re(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function kCe(e,t,r){let n=r!==void 0?r:(o,a)=>{},i={};return P0().filter(o=>{let a=o.arity;return typeof a!="object"?!1:a.TAG!=="Multi"}).forEach(o=>{let a={},s={},l=(u,d,f)=>{let h=F(u,d);h!==void 0?h.push(f):u[d]=[f]};e.forEach(u=>{let d=k(t,p=>vn(p,u.name)),f=D(k(d,p=>p.canvas),o.label),h=k(d,p=>p.role);if(h!==void 0)return h===Vu?l(a,f,u):h===Gu?re(k(d,p=>p.resourceRef),p=>l(s,f,[u,p])):void 0}),$e(s).forEach(u=>{let d=u[0],f=D(F(a,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];u[1].forEach(m=>{i[m[0].name]={resource:p,resourceRef:m[1]}})})}),i}ha({id:Xf,label:"Scheduler",icon:wCe,arity:{TAG:"Slots",_0:[{role:Vu,min:1,max:1},{role:Gu,min:1}]},isCapable:(e,t)=>y9(e),render:e=>y(SCe,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function Ss(e){return"var("+e+")"}let jm=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",Ss(Z.full)),c("padding","2px var("+O.sm+")"),c("color",Ss(x.textSecondary)),c("font-size",Ss($.sizeXs)),c("line-height","1.5")]),Sy=w([Ce("pointer"),qe([c("background",Ss(x.surfaceSubtle)),c("color",Ss(x.textPrimary))])]),CCe=w([vs(.6),Ce("notAllowed")]);function Ek(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let RCe=Ek(Ss(x.success)),ACe=Ek(Ss(x.border)),TCe=Ek(Ss(x.border)),$Ce=uW([[0,[vs(.4)]],[50,[vs(1)]],[100,[vs(.4)]]]),NCe=w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",Ss(x.warning)),nW($Ce),iW({NAME:"ms",VAL:1200}),oW("infinite"),aW("easeInOut")]);function DCe(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,a=n?i&&o?[jm+" "+Sy,NCe,"Reconnecting…"]:i?[jm+" "+Sy,RCe,"Live"]:[jm+" "+Sy,ACe,"Snapshot"]:[jm+" "+CCe,TCe,"Off"],s=n?u=>t():void 0,l=n?i&&o?"Live updates on — reconnecting to the server":i?"Live updates on — click for snapshot mode":"Snapshot mode — click for live updates":"Live updates disabled globally";return L("button",{children:[y("span",{className:a[1]}),a[2]],className:a[0],title:l,disabled:!n,type:"button",onClick:s})}let FCe=DCe;function Df(e){return"var("+e+")"}let ICe=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("background",Df(x.brand)),c("color",Df(x.textOnBrand)),c("border","none"),c("border-radius",Df(Z.full)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",Df($.sizeSm)),c("font-weight",Df($.weightMedium)),Ce("pointer"),qe([c("opacity","0.85")])]),PCe=w([z("flex"),ee("center"),Je("center"),c("padding","var("+O.xs+") 0")]);function OCe(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 y("div",{children:y("button",{children:n,className:ICe,type:"button",onClick:i=>t()}),className:PCe})}let MCe=OCe;function kk(e,t,r,n,i,o){let a=t!==void 0?t:{},s=r!==void 0?r:"",l=n!==void 0?n:!0,u=i!==void 0?i:()=>{},d=si(),f=Pp(),h=de(()=>[]),p=h[1],m=de(()=>S8),g=m[1],v=m[0],b=de(()=>"Loading"),_=b[1],S=de(()=>0),E=S[1],C=de(()=>1),A=C[1],T=C[0],R=f!==void 0?(N,I)=>f(N,I).then(M=>[M.data,H8(M,e.queryField)]):d!==void 0?(N,I)=>d(N,I).then(M=>[M,void 0]):void 0;return De(()=>{if(l)if(R!==void 0){_(I=>"Loading"),u();let N;if(o!==void 0){let I=Oe(ne(G(a),[],$e));I.first=o*T|0,N=I}else N=a;Ft(R(e.queryDocument,N).then(I=>{let M=I[1],P=I[0];return M!==void 0?_(U=>({TAG:"Refused",_0:M.message})):(p(U=>kE(P,e.queryField)),g(U=>k8(P,e.queryField)),_(U=>"Loaded")),Promise.resolve()}),I=>(_(M=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else _(N=>({TAG:"Error",_0:"Not connected"}));else _(N=>"Loaded")},[S[0],s,l,T]),{rows:h[0],setRows:p,pageInfo:v,fetchState:b[0],refetch:()=>E(N=>N+1|0),loadMore:()=>A(N=>N+1|0),canLoadMore:v.hasNextPage}}function Ku(e,t,r){let n=t!==void 0?t:!0,o=kk(e,void 0,void 0,n,void 0,50),a=Pe(void 0),s=Pe(ss.make()),l=Pe(Vc.make()),u=()=>{let p=a.current;p!==void 0&&clearTimeout(p),a.current=setTimeout(()=>{a.current=void 0,o.refetch()},250)},d=p=>{if(!ss.shouldApply(s.current,p.id,p.seq))return;ss.record(s.current,p.id,p.seq);let m=p.changeKind,g;return g=m==="Updated"?k(o.rows.find(v=>Re(ho(v),p.id)),v=>Vc.apply(l.current,v,p,e.schema)):void 0,g!==void 0?o.setRows(v=>v.map(b=>Re(ho(b),p.id)?g:b)):u()},f=Bp(),h=n&&ne(f,!1,p=>p.isLive(e.queryField));return iS(e.queryField,"All",h,d,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:h,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let LCe=50;function S9(){try{return ro(globalThis.localStorage)}catch{return}}let w9="reventless.live.";function Z3(e){let t=S9();if(t===void 0)return!1;try{let r=jt(t).getItem(w9+e);return r==null?!1:r==="true"}catch{return!1}}function zCe(e,t){let r=S9();if(r!==void 0)try{jt(r).setItem(w9+e,t?"true":"false");return}catch{return}}function UCe(e){let t=de(()=>Z3(e)),r=t[1],n=t[0];De(()=>{r(o=>Z3(e))},[e]);let i=qr(()=>{let o=!n;zCe(e,o),r(a=>o)},[n,e]);return[n,i]}function BCe(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function jCe(e){return BCe(e)}function Ck(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function zo(e){return[e._0,Ck(e)]}function E9(e,t){return LP(t,e,(r,n)=>n(r))}function Uo(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}function k9(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function qCe(e){return t=>{let r=zo(t),n=r[0];return n>=e?Uo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+k9(e.toString()),tl:r[1]}}}}function VCe(e){return t=>{let r=zo(t),n=r[0];return n<=e?Uo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+k9(e.toString()),tl:r[1]}}}}function GCe(e){let t=zo(e),r=t[0];return isFinite(r)&&(r|0)===r?Uo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}function H0(e,t){let r=q(F(e,t),We);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function eD(e,t){let r=q(F(e,t),We);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function W0(e,t){let r=q(F(e,t),We);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function KCe(e){let t=W0(e,"format");if(W0(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 tD(e){let t=H0(e,"minLength"),r=H0(e,"maxLength"),n=q(W0(e,"pattern"),a=>new RegExp(a)),i=KCe(e),o=W0(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function rD(e,t){let r=eD(e,"minimum"),n=eD(e,"maximum");return{min:r,max:n,integer:t}}function HCe(e){let t=H0(e,"minItems"),r=H0(e,"maxItems");return{minItems:t,maxItems:r}}function db(e){if(typeof e!="object")return!1;switch(e.TAG){case"TextField":case"NumberField":return e.required;case"EnumField":return e.required;case"RefField":return e.required;case"ItemsField":return e.required}}function C9(e){let t=e.indexOf("[]");if(t===-1)return;let r=e.slice(0,t),n=e.slice(t+2|0),i=n.startsWith(".")?n.slice(1):n;if(!(r===""||i===""||i.includes("[]")))return[r,i]}function R9(e){return k(F(e,"items"),t=>{let r=k(G(t),n=>F(n,"type"));if(r!==void 0&&Re(ie(r),"object"))return t})}function Rk(e,t){let r=t!==void 0?t:[],n={},i={};r.forEach(f=>{let h=C9(f.propertyKey);if(h!==void 0){let p=h[0],m=D(F(i,p),[]);m.push({propertyKey:h[1],queryField:f.queryField,singleQueryField:f.singleQueryField,labelField:f.labelField,multi:f.multi,required:f.required,entityName:f.entityName,entityNamePlural:f.entityNamePlural}),i[p]=m;return}n[f.propertyKey]=f});let o=We(e);if(typeof o!="object")return[];if(o.TAG!=="JSONObject")return[];let a=o._0,s=F(a,"required"),l;if(s!==void 0){let f=We(s);l=typeof f!="object"?[]:f.TAG==="JSONArray"?Q(f._0,h=>{let p=We(h);if(!(typeof p!="object"||p.TAG!=="JSONString"))return p._0}):[]}else l=[];let u=F(a,"properties");if(u===void 0)return[];let d=We(u);return typeof d!="object"?[]:d.TAG==="JSONObject"?Q($e(d._0),f=>{let h=f[1],p=f[0],m=We(h);if(typeof m!="object"||m.TAG!=="JSONObject")return;let g=m._0;if(ke(F(g,"const")))return;let v=F(g,"type"),b;if(v!==void 0){let R=We(v);b=typeof R!="object"||R.TAG!=="JSONString"?"string":R._0}else b="string";let _=l.some(R=>R===p),S=F(n,p),E;if(S!==void 0)E=S.multi?S.entityNamePlural:S.entityName;else{let R=F(g,"title");if(R!==void 0){let N=We(R);E=typeof N!="object"||N.TAG!=="JSONString"?ct(p):N._0}else E=ct(p)}let C=F(g,"enum"),A;if(C!==void 0){let R=We(C);A=typeof R!="object"||R.TAG!=="JSONArray"?void 0:Q(R._0,N=>{let I=We(N);if(!(typeof I!="object"||I.TAG!=="JSONString"))return I._0})}else A=void 0;let T;if(S!==void 0)T={TAG:"RefField",queryField:S.queryField,singleQueryField:S.singleQueryField,labelField:S.labelField,multi:S.multi,required:_,constraints:S.multi?HCe(g):{}};else if(b==="boolean")T="BoolField";else if(A!==void 0)T={TAG:"EnumField",options:A,required:_};else switch(b){case"array":let R=R9(g);T=R!==void 0?{TAG:"ItemsField",itemSchema:R,itemRefFields:D(F(i,p),[]),required:_}:{TAG:"TextField",required:_,constraints:tD(g)};break;case"integer":T={TAG:"NumberField",required:_,constraints:rD(g,!0)};break;case"number":T={TAG:"NumberField",required:_,constraints:rD(g,!1)};break;default:T={TAG:"TextField",required:_,constraints:tD(g)}}return q(T,R=>({key:p,label:E,fieldType:R,propSchema:h}))}):[]}function Ak(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;if(typeof n!="object")i="false";else switch(n.TAG){case"EnumField":i=D(n.options[0],"");break;case"ItemsField":i="[]";break;default:i=""}t[r.key]=i}),t}function WCe(e){return D(k(k(G(e),t=>F(t,"properties")),G),{})}function A9(e,t){return k(q(F(e,t),yn),G)}function JCe(e,t){return D(k(k(A9(e,t),r=>F(r,"type")),ie),"string")}function QCe(e,t){return ke(k(k(A9(e,t),r=>F(r,"enum")),_t))}function YCe(e,t,r){let n=t!==void 0?t:!1,i=0,o=0,a=0;if(r===""){if(n)return null;a=3}else a=3;if(a===3)switch(e){case"array":if(r==="")return[];try{return JSON.parse(r)}catch{return[r]}case"boolean":case"integer":case"number":case"object":o=2;break;default:i=1}if(o===2){if(r==="")return null;i=1}if(i===1){let s=0;switch(e){case"boolean":return r==="true";case"integer":case"number":s=2;break;case"object":try{return JSON.parse(r)}catch{return null}default:return r}if(s===2)return D(q(ks(r),l=>l),r)}}function fb(e,t){let r=WCe(e),n=G8(e),i=a=>n!==void 0?!n.includes(a):!1,o={};return $e(t).forEach(a=>{let s=a[1],l=a[0],u=JCe(r,l),d=QCe(r,l);if(!(s===""&&i(l)&&(d||u!=="string"))){o[l]=YCe(u,d,s);return}}),o}function XCe(e){let t=We(e);if(typeof t!="object")switch(t){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return""}else switch(t.TAG){case"JSONString":return t._0;case"JSONNumber":return t._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function T9(e){let t={};return re(G(e),r=>{$e(r).forEach(n=>{t[n[0]]=XCe(n[1])})}),t}let ZCe="Must not be empty";function eRe(e){let t=zo(e),r=t[0];return r.length>0?Uo(e):{TAG:"Invalid",_0:r,_1:{hd:ZCe,tl:t[1]}}}let tRe=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function rRe(e){let t=zo(e),r=t[0];return tRe.exec(r)!==null?Uo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function nRe(e){let t=zo(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?Uo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let iRe=/^[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 oRe(e){let t=zo(e),r=t[0];return iRe.exec(r)!==null?Uo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let aRe=/^c[a-z0-9]{23,24}$/;function sRe(e){let t=zo(e),r=t[0];return aRe.exec(r)!==null?Uo(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function lRe(e){let t=zo(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]}}:Uo(e)}function uRe(e){return t=>{let r=zo(t),n=r[0];return n.length>=e?Uo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function cRe(e){return t=>{let r=zo(t),n=r[0];return n.length<=e?Uo(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function dRe(e,t){return r=>{let n=zo(r),i=n[0];return e.exec(i)!==null?Uo(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function Tk(e){let t=Ck(e);if(t!==0)return t.hd}function fRe(e){switch(e){case"Email":return rRe;case"Url":return nRe;case"Uuid":return oRe;case"Cuid":return sRe;case"DateTime":return lRe}}function hRe(e,t,r){if(e==="")return t?eRe({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return re(r.minLength,i=>{n.push(uRe(i))}),re(r.maxLength,i=>{n.push(cRe(i))}),re(r.format,i=>{n.push(fRe(i))}),re(r.pattern,i=>{n.push(dRe(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:E9({TAG:"Pending",_0:e},uv(n))}function pRe(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=ks(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(GCe),re(r.min,s=>{i.push(qCe(s))}),re(r.max,s=>{i.push(VCe(s))});let o=E9({TAG:"Pending",_0:n},uv(i)),a=Ck(o);return a!==0?{TAG:"Invalid",_0:e,_1:a}:{TAG:"Valid",_0:e}}function mRe(e,t,r){let i=Qf(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return re(r.maxItems,s=>{if(i>s){o.contents={hd:"Select at most "+s.toString()+" items",tl:o.contents};return}}),re(r.minItems,s=>{if(i<s&&(t||i>0)){o.contents={hd:"Select at least "+s.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function nD(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function $k(e,t){let r=e.propSchema;if(r!==void 0&&vse(e.key,r)){let i=db(e.fieldType),o=_se(e.key,r,t,i);return o!==void 0?{TAG:"Invalid",_0:t,_1:{hd:o,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 hRe(t,n.required,n.constraints);case"NumberField":return pRe(t,n.required,n.constraints);case"EnumField":return nD(t,n.required);case"RefField":return n.multi?mRe(t,n.required,n.constraints):nD(t,n.required);case"ItemsField":return gRe(t,n.required,n.itemSchema,n.itemRefFields)}}function gRe(e,t,r,n){let i;if(e==="")i=[];else try{i=_t(JSON.parse(e))}catch{i=void 0}if(i===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Not a valid list",tl:0}};if(i.length===0)return t?{TAG:"Invalid",_0:e,_1:{hd:"Add at least one row",tl:0}}:{TAG:"Valid",_0:e};let o=Rk(r,n),a=Q(i.map((s,l)=>{let u=T9(s);return Q(o,d=>q(Tk($k(d,D(F(u,d.key),""))),f=>"Row "+(l+1|0).toString()+": "+f))[0]}),s=>s);return a.length!==0?{TAG:"Invalid",_0:e,_1:uv(a)}:{TAG:"Valid",_0:e}}function Zt(e){return"var("+e+")"}let vRe=w([z("flex"),_e("column"),c("gap",Zt(O.md))]),bRe=w([z("flex"),_e("column"),c("gap","4px")]),$9=w([c("color",Zt(x.textSecondary)),c("font-size",Zt($.sizeSm)),c("font-weight",Zt($.weightMedium))]),_Re=w([c("color",Zt(x.error)),vp(Ae(2))]),iD=w([c("background",Zt(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Zt(Z.sm)),c("padding","var("+O.xs+") var("+O.sm+")"),c("font-size",Zt($.sizeMd)),c("color",Zt(x.textPrimary)),c("outline","none"),la({NAME:"percent",VAL:100}),c("transition","border-color 120ms, box-shadow 120ms"),Is([c("border-color",Zt(x.brand))])]),yRe=w([c("border-color",Zt(x.error)),Is([c("border-color",Zt(x.error)),c("box-shadow","0 0 0 2px color-mix(in srgb, var("+x.error+") 25%, transparent)")])]),xRe=w([c("color",Zt(x.error)),c("font-size",Zt($.sizeXs)),c("min-height","1.1em"),c("line-height","1.1"),sa(Ae(2))]),SRe=w([Ce("pointer"),dO(Ae(6))]),oD=w([c("background",Zt(x.brand)),c("color",Zt(x.textOnBrand)),c("border","none"),c("border-radius",Zt(Z.sm)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",Zt($.sizeMd)),Ce("pointer"),uO("flexStart"),c("transition","opacity 120ms")]),wRe=w([vs(.5),Ce("notAllowed")]),ERe=w([z("flex"),_e("column"),c("gap",Zt(O.sm)),c("border","1px solid var("+x.border+")"),c("border-radius",Zt(Z.sm)),c("padding",Zt(O.sm))]),kRe=w([c("color",Zt(x.textSecondary)),c("font-size",Zt($.sizeSm))]),CRe=w([z("flex"),ee("flexStart"),c("gap",Zt(O.sm)),c("padding-bottom",Zt(O.sm)),c("border-bottom","1px solid var("+x.border+")")]),RRe=w([z("flex"),ai("wrap"),c("gap",Zt(O.sm)),Yn(1),rw(Ae(0))]),aD=w([c("background",Zt(x.surface)),c("color",Zt(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",Zt(Z.sm)),c("padding","var("+O.xs+") var("+O.sm+")"),c("font-size",Zt($.sizeSm)),Ce("pointer")]),ARe=w([c("margin-top","1.4em")]),TRe=w([uO("flexStart")]);function N9(e){let t=e.error;return L("div",{children:[L("label",{children:[e.label,e.required?y("span",{children:"*",className:_Re}):null],className:$9}),e.children,y("div",{children:t!==void 0?t:null,className:xRe})],className:bRe})}function D9(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.field,s=r!==void 0?r:!1,l=t!==void 0?t:!1,u=db(a.fieldType),d=s?iD+" "+yRe:iD,f=g=>n(a.key),h=a.propSchema,p=h!==void 0?bse(a.key,h,o,g=>i(a.key,g),()=>n(a.key),u,s):void 0;if(p!==void 0)return p;let m=a.fieldType;if(typeof m!="object")return L("label",{children:[y("input",{className:SRe,checked:o==="true",type:"checkbox",onBlur:f,onChange:g=>i(a.key,g.target.checked?"true":"false")}),"Enabled"],className:$9});switch(m.TAG){case"TextField":let g=m.constraints.format,v;if(g!==void 0)switch(g){case"Email":v="email";break;case"Url":v="url";break;default:v="text"}else v="text";return y("input",{className:d,autoFocus:l,type:v,value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"NumberField":return y("input",{className:d,autoFocus:l,type:"number",value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"EnumField":return y("select",{children:m.options.map(b=>y("option",{children:b,value:b},b)),className:d,value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"RefField":return y(Lke,{fieldKey:a.key,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:m.multi,required:m.required,value:o,onChange:i,onBlur:()=>n(a.key),hasError:s,autoFocus:l});case"ItemsField":return y("input",{className:d,autoFocus:l,type:"text",value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)})}}function $Re(e,t){let r=Ak(t),n;if(e==="")n=[];else{let i;try{i=_t(JSON.parse(e))}catch{i=void 0}n=i!==void 0?i:[]}return n.map(i=>{let o=Oe($e(r));return $e(T9(i)).forEach(a=>{o[a[0]]=a[1]}),o})}function NRe(e,t){return JSON.stringify(e.map(r=>fb(t,r)))}function DRe(e){let t=e.showError,r=e.onBlur,n=e.onChange,i=e.itemRefFields,o=e.itemSchema,a=e.fieldKey,s=Tt(()=>Rk(o,i),[o,i]),l=$Re(e.value,s),u=f=>n(a,NRe(f,o)),d=f=>u(l.concat([Ak(s)]));return L("div",{children:[l.length===0?y("div",{children:"No rows yet.",className:kRe}):null,l.map((f,h)=>L("div",{children:[y("div",{children:s.map(p=>{let m=D(F(f,p.key),""),g=t?Tk($k(p,m)):void 0;return y(N9,{label:p.label,required:db(p.fieldType),error:g,children:y(D9,{field:p,value:m,onChange:(v,b)=>u(l.map((_,S)=>{if(S!==h)return _;let E=Oe($e(_));return E[v]=b,E})),onBlur:v=>r(a),hasError:ke(g)})},p.key)}),className:RRe}),y("button",{children:"Remove","aria-label":"Remove row "+(h+1|0).toString(),className:aD+" "+ARe,type:"button",onClick:p=>u(l.filter((m,g)=>g!==h))})],className:CRe},h.toString())),y("button",{children:"Add row",className:aD+" "+TRe,type:"button",onClick:d})],className:ERe})}function FRe(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,a=e.value,s=e.field,l=r!==void 0?r:!1,u=t!==void 0?t:!1,d=db(s.fieldType),f=l&&ke(n),h=s.fieldType,p,m=0;return typeof h!="object"||h.TAG!=="ItemsField"?m=1:p=y(DRe,{fieldKey:s.key,itemSchema:h.itemSchema,itemRefFields:h.itemRefFields,value:a,onChange:o,onBlur:i,showError:l}),m===1&&(p=y(D9,{field:s,value:a,onChange:o,onBlur:i,hasError:f,autoFocus:u})),y(N9,{label:s.label,required:d,error:f?n:void 0,children:p})}function IRe(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,a=n!==void 0?n:"Submit",s=t!==void 0?t:[],l=Tt(()=>Rk(o,s),[o,s]),u=de(()=>{let I=Ak(l);return re(r,M=>{$e(M).forEach(P=>{I[P[0]]=P[1]})}),I}),d=u[1],f=u[0],h=de(()=>({})),p=h[1],m=h[0],g=de(()=>!1),v=g[1],b=g[0],_=Tt(()=>l.map(I=>{let M=D(F(f,I.key),"");return[I.key,$k(I,M)]}),[l,f]),S=_.every(I=>jCe(I[1])),E={};_.forEach(I=>{let M=Tk(I[1]);if(M!==void 0){E[I[0]]=M;return}});let C=(I,M)=>d(P=>{let U=Oe($e(P));return U[I]=M,U}),A=I=>p(M=>{let P=Oe($e(M));return P[I]=!0,P}),T=I=>{if(I.preventDefault(),v(M=>!0),S)return i(f)},R=b&&!S,N=R?oD+" "+wRe:oD;return L("form",{children:[l.map((I,M)=>{let P=D(F(m,I.key),!1);return y(FRe,{field:I,value:D(F(f,I.key),""),onChange:C,onBlur:A,errorMessage:F(E,I.key),showError:P||b,autoFocus:M===0},I.key)}),y("button",{children:a,className:N,disabled:R,type:"submit"})],className:vRe,noValidate:!0,onSubmit:T})}let PRe=IRe;function wy(e){switch(e){case"SubmitStarted":return!1;case"FormOpened":case"SubmitFailed":return!0}}let F9=or(void 0),ORe=F9.Provider;function MRe(e){return _r(ORe,{value:e.session,children:e.children})}let LRe={make:MRe};function zRe(){return Et(F9)}function URe(e,t){return e.concat([t])}function BRe(e,t){return e.filter(r=>r!==t)}function jRe(e,t){return ne(e,[],r=>r.armed.current?t:[])}function qRe(e){return"var("+e+")"}let VRe=w([z("flex"),_e("column"),c("gap",qRe(O.md))]);function GRe(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.ownerValue,o=e.ownerField,a=e.injectNewId,s=e.aggregateIdField,l=e.aggregateId,u=e.schema,d=a!==void 0?a:!1,f=n!==void 0?n:[],h=t!==void 0?t:"Submit",p=de(()=>{}),m=p[1],g=de(()=>!1),v=g[1],_=de(()=>crypto.randomUUID())[0],S=Pe(wy("FormOpened")),E=Tt(()=>({armed:S}),[]),C=o!==void 0&&i!==void 0?[o,i]:void 0,A=I=>{let M=Oe($e(I));re(C,P=>{M[P[0]]=P[1]}),re(l,P=>{M[D(s,"id")]=P}),d&&(M[D(s,"id")]=_),v(P=>!0),m(P=>{}),S.current=wy("SubmitStarted"),r(M).then(P=>{if(v(U=>!1),typeof P=="object"){let U=P._0;S.current=wy("SubmitFailed"),m(j=>U)}return Promise.resolve()})},R=Q([l!==void 0?s!==void 0||d?s:void 0:d?s:void 0,q(C,I=>I[0])],I=>I),N=R.length===0?u:D(q(G(u),I=>{let M=Oe($e(I));return re(k(F(M,"properties"),G),P=>{let U=Oe($e(P).filter(j=>!R.includes(j[0])));M.properties=U}),M}),u);return y(LRe.make,{session:E,children:L("div",{children:[ne(p[0],null,I=>y(tk,{variant:"Error",message:I})),g[0]?y(ld,{label:"Submitting..."}):null,y(PRe,{schema:N,onSubmit:A,submitLabel:h,initialValues:e.initialValues,refFields:f})],className:VRe})})}let Nk=GRe;function KRe(e){let t={},r=e.startsWith("?")?e.slice(1):e;return r===""||r.split("&").forEach(n=>{let i=n.split("="),o=i.length;if(!(o>=3))switch(o){case 0:return;case 1:let a=i[0];if(a!==""){t[decodeURIComponent(a)]="";return}else return;case 2:let s=i[0],l=i[1];if(s!==""){t[decodeURIComponent(s)]=decodeURIComponent(l);return}else return}}),t}function HRe(e,t){return e===t?0:e<t?-1:1}function I9(e){let t=$e(e).filter(r=>r[1]!=="").toSorted((r,n)=>HRe(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function WRe(e){if(e.path===0)return"/";let r=[];return Rq(e.path,n=>{r.push(n)}),"/"+r.join("/")}function sD(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=$e(e).filter(o=>{let a=o[0];return r.includes(a)?!1:!n.some(s=>s[0]===a)});return Oe(i.concat(n))}function P9(){let e=hq(),t=KRe(e.search),r=WRe(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let u=I9(l);Es(r+u+n)};return{params:t,get:l=>F(t,l),set:(l,u)=>i(sD(t,[[l,u]])),setMany:l=>i(sD(t,l))}}function $o(e){return"var("+e+")"}let JRe=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap",$o(O.md)),Yn(1),c("min-height","160px"),qa("center"),c("padding",$o(O.lg))]),QRe=w([c("font-size","32px"),c("color",$o(x.warning)),c("line-height","1")]),YRe=w([c("color",$o(x.textPrimary)),c("font-size",$o($.sizeLg)),c("font-weight",$o($.weightMedium)),hn(Ae(0))]),XRe=w([c("color",$o(x.textSecondary)),c("font-size",$o($.sizeSm)),c("line-height",$o($.lineHeightNormal)),c("max-width","440px"),hn(Ae(0))]),ZRe=w([c("background","transparent"),c("color",$o(x.textSecondary)),c("border","1px solid var("+x.border+")"),c("border-radius",$o(Z.md)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",$o($.sizeSm)),c("cursor","pointer"),sa(Ae(4))]);function eAe(e){let t=e.title,r=t!==void 0?t:"Unavailable";return L("div",{children:[y("div",{children:"( ! )",className:QRe}),y("h3",{children:r,className:YRe}),y("p",{children:e.detail,className:XRe}),ne(e.onRetry,null,n=>y("button",{children:"Try again",className:ZRe,onClick:i=>n()}))],className:JRe})}let qg=eAe;function Dk(e){return ne(k(k(G(e),t=>F(t,"properties")),G),[],$e)}function tAe(e,t){return q(Dk(e).find(r=>r[0]===t),r=>r[1])}function Fk(e){if(e.length===1)return Jt(e[0])}function rAe(e,t){return wk(e.schema).every(r=>r===t||r==="id"?!0:Re(r,e.aggregateIdField))}function vS(e,t){return q(Fk(Dk(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function lD(e,t,r){return Fk(Q(e,n=>k(vS(n,r),i=>{if(rAe(n,i))return{command:n,argument:i,tier:t}})))}function O9(e,t){return Re(Do(e).storeTarget,t)}function nAe(e,t,r,n){let i=t.field;return i!==void 0?Dk(e.schema).some(o=>o[0]===i)?i:void 0:Jn(k(n,o=>vS(e,(a,s)=>O9(s,o))),vS(e,(o,a)=>o===r))}let uD={contents:[]};function cD(e,t,r){let n=e+"."+t.command+"."+D(t.field,"")+"."+r;if(!uD.contents.some(i=>i===n)){uD.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function iAe(e,t,r,n){let i=Fk(e.filter(o=>o.name===t.command));if(i!==void 0){let o=nAe(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};cD(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}cD(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function M9(e,t,r){return k(tAe(e,t),n=>{let i=Do(n),o=i.storeTarget,a=r.filter(u=>u.level==="Instance"),s=i.setter;if(s!==void 0)return iAe(a,s,t,o);let l=k(o,u=>lD(a,"StoreMatch",(d,f)=>O9(f,u)));return l!==void 0?l:lD(a,"NameMatch",(u,d)=>u===t)})}function L9(e,t){let r=e.requiredRole;return r!==void 0?t.includes(r):!0}function oAe(e){let t=e.resource,r=Ku(t,void 0),n=t.name,i=r.rows,o=t.schema,a=e.resourceSemantics,s=wh(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:a,window:s,onOpenRow:(R,N)=>{},role:Vu},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,m=e.eventSemantics,g=e.eventAccent,v=e.eventWindow,b=e.onOpenEvent,_=e.onCommand,S=Gu,E=e.resourceRef,C=e.assignCommand,A={readModelName:f,rows:h,schema:p,semantics:m,accent:g,window:v,onOpenRow:b,onCommand:_,role:S,resourceRef:E,assignCommand:C},T=r.fetchState;return typeof T!="object"?T==="Loading"?y(ld,{}):e.mode.render([d,A]):T.TAG==="Error"?y(Ra,{detail:T._0,onRetry:()=>r.refetch()}):y(qg,{detail:T._0,onRetry:()=>r.refetch()})}let aAe=oAe,z9=or(void 0),sAe=z9.Provider;function lAe(e){return _r(sAe,{value:e.refresh,children:e.children})}let dD={make:lAe};function uAe(){return Et(z9)}function cAe(e){try{return ro(localStorage.getItem(e))}catch{return}}function dAe(e,t){try{return localStorage.setItem(e,t)}catch{return}}function ir(e){return"var("+e+")"}let Ey=w([z("flex"),_e("column"),c("gap",ir(O.lg))]),fD=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",ir(O.md)),c("margin-bottom",ir(O.sm))]),hD=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",ir(O.md)),c("flex-wrap","wrap"),Yn(1),c("min-width","0")]),fAe=w([c("font-size",ir($.sizeXl)),c("font-weight",ir($.weightMedium)),c("color",ir(x.textPrimary)),hn(Ae(0)),c("white-space","nowrap"),c("overflow","hidden"),c("text-overflow","ellipsis")]),pD=w([z("flex"),ee("center"),c("flex-wrap","wrap"),c("gap",ir(O.sm))]),hAe=w([z("flex"),_e("column"),c("gap",ir(O.lg))]),pAe=w([z("flex"),_e("column"),c("gap",ir(O.sm))]),mAe=w([c("font-size",ir($.sizeSm)),c("font-weight",ir($.weightMedium)),c("color",ir(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em"),hn(Ae(0))]),gAe=w([z("flex"),ee("center"),c("gap",ir(O.sm)),c("flex-wrap","wrap")]),vAe=w([z("inlineFlex"),ee("center"),c("gap","6px"),c("margin-left","auto"),c("font-size",ir($.sizeSm)),c("color",ir(x.textSecondary)),c("cursor","pointer"),c("white-space","nowrap")]),bAe=w([c("background",ir(x.brand)),c("color",ir(x.textOnBrand)),c("border","none"),c("border-radius",ir(Z.md)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",ir($.sizeSm)),c("cursor","pointer")]),_Ae=w([z("inlineFlex"),ee("center"),c("gap","4px"),c("background","none"),c("border","none"),c("padding","0"),c("color",ir(x.brand)),c("font-size",ir($.sizeSm)),Ce("pointer"),c("text-decoration","none"),qe([c("text-decoration","underline")])]),yAe=w([z("flex"),ee("center"),Je("flexEnd"),c("gap",ir(O.xs)),c("padding-top",ir(O.sm))]),mD=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",ir(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",ir(x.textSecondary)),c("font-size",ir($.sizeSm)),Ce("pointer"),qe([c("background",ir(x.surfaceSubtle)),c("color",ir(x.textPrimary))]),hO([c("opacity","0.4"),Ce("notAllowed")])]);function xAe(e,t,r){return t!==void 0&&t!==""?[["before",t],["last",r]]:e!==void 0?e!==""?[["first",r],["after",e]]:[["first",r]]:[["first",r]]}let gD={contents:[]},vD={contents:[]};function SAe(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!gD.contents.some(i=>i===n)){gD.contents.push(n),console.warn("[AutoUI] Read model "+t+' declared lifecycleField="'+r+`" but the list-view rows don't include that field; per-row command filtering is disabled.`);return}}function wAe(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!vD.contents.some(i=>i===n)){vD.contents.push(n),console.warn("[AutoUI] Read model "+t+' lifecycleField="'+r+'" value is neither a string nor a TAG-shaped object; per-row command filter cannot match against allowedStates.');return}}let bD={contents:[]};function EAe(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!bD.contents.some(n=>n===r)){bD.contents.push(r),console.warn("[AutoUI] Read model "+t+" produced duplicate row keys — row identity is ambiguous and row clicks may open the wrong row. Give each row a unique id, or annotate the distinguishing field with @subId.");return}}function kAe(e){let t=e.archiveOffered,r=e.rowActions,n=e.schedulerJoin,i=e.uiHints,o=e.liveOffered,a=e.sortKeyField,s=e.byIdsQueryDocument,l=e.byIdsQueryField,u=e.detailQueryDocument,d=e.singleQueryField,f=e.drillPath,h=e.openRowId,p=e.pluginId,m=e.detailView,g=e.rows,v=e.readModel,b=f!==void 0?f:[],_=o!==void 0?o:!0,S=r!==void 0?r:[],E=t!==void 0?t:!1,C=si(),A=Pp(),T=Wp(),R=de(()=>{}),N=R[1],I=de(()=>{}),M=I[1],P=I[0],U=de(()=>({})),j=U[1],V=U[0],Y=de(()=>"Loaded"),J=Y[1],X=Y[0],oe=de(()=>{}),ge=oe[1],H=oe[0],ae=Bp(),te=ne(ae,!1,B=>B.isLive(v.queryField)),ue=UCe(D(p,"default")+"."+v.name),Se=ue[0],be=te&&_&&Se,Ie=k(i,B=>vn(B,v.name)),$t=DE(v.schema,Ie),Lt=ne(k(Ie,B=>B.suppress),!1,B=>B.includes(Xf)),Ar;if(n!==void 0&&ECe(!0,v.schema,Lt)){let B=$8(Xf);Ar=B!==void 0&&!$t.some(fe=>fe.id===B.id)?$t.concat([B]):$t}else Ar=$t;let Qr=$E(p,v.name,void 0),li=de(()=>Yv(Qr)),Sn=li[1],lo=B=>{TE(Qr,B),Sn(fe=>B)},wr=FE(li[0],Ie,ow(v.schema),Ar),Qe=n!==void 0&&wr!==void 0?wr.id===Xf:!1,st=ke(m)&&!Qe,Nt="reventless.layout."+D(p,"default")+"."+v.name,Ct=de(()=>cAe(Nt)),ve=Ct[1],Ye=Ple(Ct[0],Ie,mJ(v.schema),st),At=ae!==void 0&&be?ae.statusFor(ae.apiForReadModel(v.queryField))!=="Open":!1,yt=be&&!At,pn=de(()=>0),Xn=pn[1],mn=pn[0],W=Pe({}),xe=Pe(void 0),je=Pe(ss.make()),Fe=Pe(ss.make()),we=Pe(Vc.make()),mt=Pe(Vc.make()),nt=Pe(new Map),ot=B=>{nt.current.set(B,Date.now())},Vt=B=>{let fe=nt.current.get(B);return fe!==void 0?Date.now()-fe<6e4:!1},Ze=P9(),Qt=I9(Ze.params),xt=Ns(),gn=q(p,B=>ls(nl(B,v.name))+Qt),Yt=iw(v.schema),ar=B=>q(k(F(B,"id"),ie),fe=>{let me=k(Yt,Ee=>k(F(B,Ee),ie));return me!==void 0?A2e(fe,me):fe}),dr=B=>Yt!==void 0?U3(B)[0]:B,Tr=B=>{if(Yt===void 0)return Oe([["id",B]]);let fe=U3(B),me=fe[1],Ee=fe[0];return Oe(me!==void 0?[["id",Ee],["subId",me]]:[["id",Ee]])},St=h!==void 0?h:P,Mr=B=>p!==void 0?xt(La(p,v.name,B,[])+Qt):M(fe=>B),Er=()=>gn!==void 0?xt(gn):M(B=>{}),$r=nS(v.schema),kr=tz(v.schema),Gt=$r.hasFilter||$r.hasSort||$r.hasSearch,Lr=ua(),sn=q(p,B=>({pluginId:B,viewName:v.name})),Yr=xn(v.schema,k(i,B=>ja(B,v.name)),{field:v.labelField,source:v.labelFieldSource}),Xr=hi(v.schema,void 0,Lr,sn,Yr.labelField,Yr.projectedLabelField),wi=aw(v.schema,k(Ie,B=>B.retiredLabel)),ui=bc.offered(E,wi),ba=bc.showing(ui,Ze.get(bc.param)),uo=[];$e(Ze.params).forEach(B=>{let fe=B[1];if(fe==="")return;let me=B[0];if(me==="after"||me==="before"){uo.push(me+"="+fe);return}if(me===bc.param&&ui){uo.push(me+"="+fe);return}if(!Gt)return;if(me==="sort"||me==="dir"){uo.push(me+"="+fe);return}if(me==="q"&&kr.search){uo.push(me+"="+fe);return}if(!me.startsWith("f."))return;let Ee=me.slice(2);if(ne(Xr.find(et=>et.key===Ee),!1,et=>s3(et).filter)){uo.push(me+"="+fe);return}});let Gb=uo.toSorted((B,fe)=>B===fe?0:B<fe?-1:1).join("|"),Hl={};if(Gt){let B={};$e(Ze.params).forEach(wn=>{let sr=wn[0];if(sr.startsWith("f.")){B[sr.slice(2)]=wn[1];return}});let fe=l3(B,Xr),me=D(Ze.get("q"),""),Ee=rz(fe[0],me,kr,Xr),et=Ze.get("dir")==="desc"?"Desc":"Asc",Rt=u3(Ze.get("sort"),et,Xr),rr=O_e(Rt);re(Ee,wn=>{Hl.filter=wn}),re(rr,wn=>{Hl.orderBy=wn})}xAe(Ze.get("after"),Ze.get("before"),LCe).forEach(B=>{Hl[B[0]]=B[1]}),ui&&(Hl.includeRetired=ba);let Ks=kk(v,Hl,Gb,void 0,()=>j(B=>({})),void 0),zr=Ks.refetch,ji=Ks.fetchState,Hs=Ks.pageInfo,Wl=Ks.setRows,Ws=Ks.rows,am=(B,fe,me)=>A!==void 0?()=>A(B,Tr(me)).then(Ee=>[Ee.data,H8(Ee,fe)]):C!==void 0?()=>C(B,Tr(me)).then(Ee=>[Ee,void 0]):void 0,mc=B=>{if(u===void 0||d===void 0)return;let fe=am(u,d,B);if(fe!==void 0){J(me=>"Loading"),Ft(fe().then(me=>{let Ee=me[1],Xe=k(G(me[0]),Rt=>F(Rt,d)),et=0;return Ee!==void 0||Xe===void 0||We(Xe)==="JSONNull"?et=1:(j(Rt=>{let rr=Oe($e(Rt));return rr[B]=Xe,rr}),J(Rt=>"Loaded")),et===1&&(j(Rt=>Oe($e(Rt).filter(rr=>rr[0]!==B))),J(Rt=>Ee!==void 0?{TAG:"Refused",_0:Ee.message}:{TAG:"Error",_0:"Detail not found"})),Promise.resolve()}),me=>(J(Ee=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}},ft=()=>{if(re(St,mc),!yt)return zr()};De(()=>{let B=h!==void 0?h:P;B!==void 0&&(vr(F(V,B))?mc(B):J(fe=>"Loaded"))},[h,P]);let Qa=hp(),Jl=yk(),LC=ne(k(pa(),B=>B.identity),[],B=>B.groups),Kb=(B,fe)=>q(gi(M9(v.schema,fe,v.commands),me=>L9(me.command,LC)),me=>(()=>N(Ee=>({command:me.command,rowId:B,formKey:me.command.name+":"+B})))),sm=B=>{let fe=k(F(B,"id"),ie);return fe!==void 0?S.map(me=>({label:me.label,run:()=>N(Ee=>({command:me.command,rowId:void 0,initialValues:qke(me,fe),navigateTo:me.navigateTo,formKey:me.command.name+":"+fe}))})):[]},Js=(B,fe)=>sm(D(G(fe),{})),Hb=(B,fe)=>k(k(F(B,"id"),ie),me=>Kb(me,fe)),Jb=(g!==void 0?g:Ws).map(B=>D(G(B),{})),Qs=tf(Jb,Xr,Lr,sn,void 0),zC={lookupLabel:(B,fe)=>ef(Qs,B,Lr,fe),isMissing:(B,fe)=>Lp(Qs,B,Lr,fe),retiredBadge:(B,fe)=>Op(Qs,B,Lr,fe),linkable:(B,fe)=>Mp(Qs,B,Lr,fe,E)},UC=rle(Ze.get("after"),Ze.get("before")),Qb=nle(Hs,UC),Yb=ile(Hs,UC),BC=Qb||Yb,jC=b8(Xr,Lr,Qa,F,!0,zC,sn,Hb,wi,Yr.labelField).map(B=>{if(!B.sortable||!BC)return B;let fe=ne(Xr.find(me=>me.key===B.key),!1,me=>s3(me).sort);return{key:B.key,label:B.label,render:B.render,sortable:fe,width:B.width}}),qC=Ze.get("sort"),lm=Ze.get("dir")==="desc"?"Desc":"Asc",Xb=B=>Wl(fe=>fe.map(me=>{let Ee=ho(me);if(Ee===void 0)return me;let Xe=B.find(et=>Re(ho(et),Ee));return Xe!==void 0?Xe:me})),um=a!==void 0?Q(Ws,B=>k(k(G(B),fe=>F(fe,a)),ie)):[],VC=B=>{let fe=Hs.hasNextPage,me=um.length;if(B===void 0||a===void 0||!fe||me<=0)return!1;let Ee=um[0];if(lm==="Asc"){let et=tt(um,Ee,(Rt,rr)=>Rt>rr?Rt:rr);return B>et}let Xe=tt(um,Ee,(et,Rt)=>et<Rt?et:Rt);return B<Xe},GC=B=>{if(B.length!==0)return Wl(fe=>yy.drop(fe,B))},Ej=()=>{let B=Object.keys(W.current);if(W.current={},xe.current=void 0,B.length!==0){if(B.length>10)return zr();if(l!==void 0&&s!==void 0&&C!==void 0){let fe=Oe([["ids",B.map(me=>me)]]);Ft(C(s,fe).then(me=>{let Ee=yy.fromBatch(B,me,l);return Ee!==void 0&&(Xb(Ee.rows),vr(Yt)&&GC(Ee.gone)),Promise.resolve()}),me=>Promise.resolve());return}if(Yt!==void 0||d===void 0||u===void 0||C===void 0)return zr();B.forEach(fe=>{let me=Oe([["id",fe]]);Ft(C(u,me).then(Ee=>{let Xe=yy.fromSingle(Ee,d);return Xe!==void 0&&(typeof Xe!="object"?GC([fe]):Xb([Xe._0])),Promise.resolve()}),Ee=>Promise.resolve())})}},Zb=B=>{W.current[B]=!0;let fe=xe.current;fe!==void 0&&clearTimeout(fe),xe.current=setTimeout(Ej,150)},e_=B=>Wl(fe=>{let me=fe.map(et=>{let Rt=ho(et);if(Rt===void 0)return et;let rr=B.find(wn=>Re(ho(wn),Rt));return rr!==void 0?rr:et}),Ee=Q(me,ho),Xe=B.filter(et=>{let Rt=ho(et);return Rt!==void 0?!Ee.includes(Rt):!1});return me.concat(Xe)}),kj=B=>Ws.find(fe=>Re(ho(fe),B)),KC=T8.useInvalidate(),Cj=B=>{if(!ss.shouldApply(je.current,B.id,B.seq))return;ss.record(je.current,B.id,B.seq),KC(v.queryField);let fe=kj(B.id),me=ke(fe);switch(B.changeKind){case"Added":if(!Vt(B.id))return VC(B.sortKeyValue)?void 0:Xn(rr=>rr+1|0);if(nt.current.delete(B.id),me)return;let Xe=cke(B,v.schema);if(Yt!==void 0||Xe===void 0){let rr=B.id;if(Yt!==void 0)return zr();if(l!==void 0&&s!==void 0&&C!==void 0){let sr=Oe([["ids",[rr]]]);Ft(C(s,sr).then(Bn=>{let Xs=D(k(k(G(Bn),vc=>F(vc,l)),_t),[]);return e_(Xs),Promise.resolve()}),Bn=>Promise.resolve());return}if(d===void 0||u===void 0||C===void 0)return zr();let wn=Oe([["id",rr]]);Ft(C(u,wn).then(sr=>{let Bn=k(G(sr),Xs=>F(Xs,d));return Bn!==void 0&&We(Bn)!=="JSONNull"&&e_([Bn]),Promise.resolve()}),sr=>Promise.resolve());return}else return e_([Xe]);case"Updated":if(Yt!==void 0)return me?Zb(B.id):void 0;if(fe===void 0)return;let et=VC(B.sortKeyValue),Rt=Vc.apply(we.current,fe,B,v.schema);return et||Rt===void 0?Zb(B.id):Xb([Rt]);case"Removed":return me?Yt!==void 0?Zb(B.id):Wl(rr=>rr.filter(wn=>Ma(ho(wn),B.id))):void 0;case"BulkInvalidated":return Xn(rr=>0),zr()}},Rj=()=>zr();iS(v.queryField,"All",be,Cj,Rj);let Aj=B=>{if(St===void 0||B.id!==dr(St)||!ss.shouldApply(Fe.current,B.id,B.seq))return;ss.record(Fe.current,B.id,B.seq),KC(v.queryField);let fe=B.changeKind;if(Yt!==void 0)switch(fe){case"Updated":case"Removed":return mc(St);case"Added":case"BulkInvalidated":return}else switch(fe){case"Updated":let me=k(F(V,St),Ee=>Vc.apply(mt.current,Ee,B,v.schema));return me!==void 0?(j(Ee=>{let Xe=Oe($e(Ee));return Xe[St]=me,Xe}),J(Ee=>"Loaded")):mc(St);case"Removed":return ge(Ee=>St);case"Added":case"BulkInvalidated":return}},Tj=()=>{if(St!==void 0&&u!==void 0&&d!==void 0&&C!==void 0){Ft(C(u,Tr(St)).then(B=>{let fe=k(G(B),Ee=>F(Ee,d)),me=0;return fe!==void 0&&We(fe)!=="JSONNull"?(j(Ee=>{let Xe=Oe($e(Ee));return Xe[St]=fe,Xe}),J(Ee=>"Loaded")):me=1,me===1&&ge(Ee=>St),Promise.resolve()}),B=>Promise.resolve());return}};iS(v.queryField,{_0:D(q(St,dr),"")},be&&ke(St),Aj,Tj),De(()=>{ge(B=>{})},[D(St,"")]);let t_=D(Ze.get("q"),""),r_={};$e(Ze.params).forEach(B=>{let fe=B[0];if(fe.startsWith("f.")){r_[fe.slice(2)]=B[1];return}});let HC=g2e(Xr,r_),$j=HC.length!==0,Nj=q(qC,B=>({key:B,direction:lm==="Asc"?"Asc":"Desc"})),Dj=(B,fe)=>{let me=fe==="Asc"?"asc":"desc";Ze.setMany([["sort",B],["dir",me],["after",""],["before",""]])},WC=B=>Ze.setMany([["q",B],["after",""],["before",""]]),Fj=(B,fe)=>Ze.setMany([["f."+B,fe],["after",""],["before",""]]),Ij=()=>re(Hs.endCursor,B=>Ze.setMany([["after",B],["before",""]])),Pj=()=>re(Hs.startCursor,B=>Ze.setMany([["before",B],["after",""]])),mf=v.commands.filter(B=>B.level==="Instance"),Oj=mf.length!==0||S.length!==0,gc;if(Oj){let me={key:"__actions",label:"",render:Ee=>{let Xe=k(F(Ee,"id"),ie),et=v.lifecycleField;et!==void 0&&(F(Ee,et)!==void 0?ma(Ee,et)===void 0&&wAe(p,v.name,et):SAe(p,v.name,et));let rr=uz(mf,Ee,v.lifecycleField).map(sr=>({TAG:"Action",label:sr.label,onClick:()=>N(Bn=>({command:sr,rowId:Xe,formKey:sr.name+":"+D(Xe,"")})),danger:!1})),wn=sm(Ee).map(sr=>({TAG:"Action",label:sr.label,onClick:sr.run,danger:!1}));return y(W2e,{items:rr.concat(wn),triggerLabel:"..."})},sortable:!1,width:"56px"};gc=jC.concat([me])}else gc=jC;let Mj=v.commands.filter(B=>B.level==="Collection"),JC=B=>{let fe=B.map(rr=>D(G(rr),{})),me=l3(r_,Xr),Xe=Gt&&kr.search?"":t_,et=u3(qC,lm,Xr),Rt;return Rt=typeof et!="object"||et.TAG==="ServerSort"?[void 0,lm]:[et._0,et._1],m2e(p2e(h2e(fe,Xr,me[1]),Xr,Xe),Xr,Rt[0],Rt[1])},QC=B=>{if(wr!==void 0&&wr.id!==ia){let fe=q(Yr.statusField,Ya=>cb(Ya,mf,k(Ie,Zs=>Zs.transitions))),me=xk(C,A,mf,v.name,be,()=>zr(),Lr,Jl.onNotice,ot),Ee=JC(B).map(Ya=>Ya),Xe=TW(Yb,Qb);if(n!==void 0&&wr.id===Xf){let Ya=xn(n.resource.schema,k(i,Zs=>ja(Zs,n.resource.name)),{field:n.resource.labelField,source:n.resource.labelFieldSource});return y(aAe,{mode:wr,resource:n.resource,resourceSemantics:Ya,resourceRef:n.resourceRef,assignCommand:x9(mf,n.resourceRef),eventReadModelName:v.name,eventSchema:v.schema,eventRows:Ee,eventWindow:Xe,eventSemantics:Yr,eventAccent:k(Ie,Zs=>Zs.accent),onOpenEvent:(Zs,Gj)=>re(k(G(Gj),ar),Mr),onCommand:me})}let et=v.name,Rt=v.schema,rr=k(Ie,Ya=>Ya.accent),wn=Xe,sr=(Ya,Zs)=>re(k(G(Zs),ar),Mr),Bn=q(fe,Ya=>me),Xs=Kb,vc=S.length===0?void 0:Js,Vj={readModelName:et,rows:Ee,schema:Rt,semantics:Yr,accent:rr,window:wn,onOpenRow:sr,onCommand:Bn,statusCommandFor:fe,fillSlot:Xs,rowActionsFor:vc,ownEntity:sn,retired:wi,refLabels:zC};return wr.render([Vj])}else{let fe=JC(B),me=q(m,sr=>(Bn=>re(ar(Bn),Mr))),Ee=sr=>D(ar(sr),JSON.stringify(sr)),Xe=(sr,Bn)=>{let Xs=Bn.map(Ee),vc={};return Xs.forEach(tR=>{vc[tR]=!0}),Object.keys(vc).length!==Xs.length&&EAe(p,v.name),y(Sh,{columns:sr,data:Bn,keyFn:Ee,sortState:Nj,onSort:Dj,onRowClick:me,activeKey:St})},et=dJ(v.schema);if(et===void 0)return Xe(gc,fe);let Rt=ike(fe,et,ao(v.schema,et)),rr=Rt.length;if(rr===1||rr===0)return Xe(gc,fe);let wn=gc.filter(sr=>sr.key!==et);return y("div",{children:Rt.map(sr=>{let Bn=sr[0];return L("div",{children:[y("div",{children:ct(Bn),className:mAe}),Xe(wn,sr[1])],className:pAe},Bn)}),className:hAe})}},Lj=g!==void 0?QC(g):typeof ji!="object"?ji==="Loading"?y(ld,{}):QC(Ws):ji.TAG==="Error"?y(Ra,{detail:ji._0,onRetry:()=>zr()}):y(qg,{detail:ji._0,onRetry:()=>zr()}),Ys;if(St!==void 0&&m!==void 0){let fe=(g!==void 0?g:Ws).find(Xe=>Re(k(G(Xe),ar),St)),me=F(V,St);Ys=[St,m,me!==void 0?me:fe]}else Ys=void 0;let YC=B=>{let fe=B[2],me=B[0];if(Re(H,me))return y(Ra,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>Er()});if(fe!==void 0)return B[1](dr(me),b,jt(fe));let Ee=0,Xe=0,et=0;if(typeof ji!="object"){if(ji==="Loading")return y(ld,{});if(typeof X!="object"){if(X!=="Loading")return y(Ra,{title:"Row not found",detail:"The row data is no longer in the current page."});et=4}else{if(X.TAG!=="Error")return y(qg,{detail:X._0,onRetry:()=>zr()});Ee=2}}else et=4;if(et===4)if(typeof X!="object"){if(X==="Loading")return y(ld,{});Xe=3}else Xe=3;if(Xe===3&&typeof ji=="object"){if(ji.TAG==="Error")return y(Ra,{detail:ji._0,onRetry:()=>zr()});Ee=2}return Ee===2&&typeof X=="object"&&X.TAG==="Error"?y(Ra,{detail:X._0,onRetry:()=>zr()}):y(qg,{detail:ji._0,onRetry:()=>zr()})},zj=st?y("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(B=>{let fe=B[1],me=B[0],Ee;return Ee=Ye==="Full"?me==="full":me==="split",L("button",{children:[y("span",{children:B[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),y("span",{children:fe})],className:Ee?ms.Style.btnActive:ms.Style.btn,title:fe,onClick:Xe=>{dAe(Nt,me),ve(et=>me)}},me)}),"aria-label":"Layout",className:ms.Style.group,role:"group"}):null,cm=sbe(),XC=_?y(FCe,{live:Se,canBeLive:te,reconnecting:At,onToggle:ue[1]}):null,Uj=L("div",{children:[y("h2",{children:v.name,className:fAe}),L("div",{children:[Ar.length>1?y(ms.make,{modes:Ar,activeId:ne(wr,ia,B=>B.id),onSelect:lo}):null,zj,XC,Mj.map(B=>y("button",{children:"+ "+B.label,className:bAe,onClick:fe=>N(me=>({command:B,rowId:void 0,formKey:B.name}))},B.name))],className:pD})],className:ke(cm)?hD:fD}),ZC=ZN(cm,Uj),Bj=wi!==void 0&&ui?L("label",{children:[y("input",{checked:ba,type:"checkbox",onChange:B=>Ze.setMany(bc.toggleParams(ba))}),bc.label(wi)],className:vAe}):null,jj=L(cr,{children:[L("div",{children:[$j?y(Xz,{filters:HC,onFilterChange:Fj,searchValue:t_,onSearchChange:WC}):y(Yz,{value:t_,onChange:WC}),Bj],className:gAe}),mn>0?y(MCe,{count:mn,onClick:()=>{Xn(B=>0),Ze.setMany([["after",""],["before",""]]),zr()}}):null]}),qj=BC?L("div",{children:[y("button",{children:"‹ Prev",className:mD,disabled:!Yb,onClick:B=>Pj()}),y("button",{children:"Next ›",className:mD,disabled:!Qb,onClick:B=>Ij()})],className:yAe}):null,n_=gJ(v.schema),i_;if(n_!==void 0){let B=n_.matchedGroups,fe=B.length,me=fe!==1?fe!==0?B.join(" / "):"an elevated role":B[0];i_=y(tk,{variant:"Info",title:"Viewing as "+me,message:"This list is not filtered to you — it shows rows for every "+n_.ownerLabel+"."})}else i_=null;let eR=L(cr,{children:[jj,i_,Jl.element,Lj,qj]}),o_;if(Ye==="Full")o_=Ys!==void 0?y(dD.make,{refresh:ft,children:L("div",{children:[ZN(cm,L("div",{children:[y("button",{children:"← "+v.name,className:_Ae,onClick:B=>Er()}),y("div",{children:XC,className:pD})],className:ke(cm)?hD:fD})),YC([Ys[0],Ys[1],Ys[2]])],className:Ey})}):L("div",{children:[ZC,eR],className:Ey});else{let B=Ys!==void 0?YC(Ys):y(Pd,{title:"Select an item",description:"Choose a row on the left to see its details here."});o_=y(dD.make,{refresh:ft,children:L("div",{children:[ZC,y(X2e,{master:eR,detail:B})],className:Ey})})}return L(cr,{children:[o_,ne(R[0],null,B=>y(rk,{isOpen:!0,onClose:()=>N(fe=>{}),title:B.command.label,children:y(Nk,{schema:B.command.schema,aggregateId:B.rowId,aggregateIdField:B.command.aggregateIdField,injectNewId:B.command.level==="Collection",ownerField:B.command.ownerField,ownerValue:B.command.ownerValue,initialValues:B.initialValues,refFields:B.command.refFields,onSubmit:fe=>{if(T!==void 0){let me=B.rowId;return me!==void 0?ot(me):re(F(fe,D(B.command.aggregateIdField,"id")),ot),Ft(T(B.command.mutationDocument,fb(B.command.schema,fe)).then(Ee=>{if(typeof Ee!="object")return Ee==="Accepted"?(N(Xe=>{}),yt||zr(),re(B.navigateTo,Es),Promise.resolve("Ok")):(N(Xe=>{}),!yt&&vr(B.navigateTo)&&setTimeout(()=>zr(),B2e),re(B.navigateTo,Es),Promise.resolve("Ok"));{if(Ee.TAG==="Rejected"){let et=Ee._0;return Jp(C,Lr,et.errorCode,et.detail).then(Rt=>Promise.resolve({TAG:"Err",_0:Rt}))}let Xe=Ee._0;return console.error("[AutoUI] "+v.name+": command "+B.command.name+" not executed — "+Xe),Promise.resolve({TAG:"Err",_0:Xe})}}),Ee=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return N(me=>{}),Promise.resolve("Ok")},submitLabel:"Execute"},B.formKey)}))]})}let CAe=kAe;function RAe(e,t,r){if(e.length<2)return[];let n=tt(e,Number.MAX_VALUE,(s,l)=>s<l?s:l),o=tt(e,Number.MIN_VALUE,(s,l)=>s>l?s:l)-n,a=t/(e.length-1|0);return e.map((s,l)=>({x:l*a,y:o===0?r/2:r-(s-n)/o*r}))}function AAe(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function TAe(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,a=t!==void 0?t:"",s=RAe(e.values,i,o),l=a===""?"var("+x.brand+")":a;return s.length<2?null:y("svg",{children:y("polyline",{fill:"none",points:AAe(s),stroke:l,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),style:{display:"block",overflow:"visible"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let $Ae=TAe;function mi(e){return"var("+e+")"}let NAe=w([z("flex"),_e("column"),c("gap",mi(O.xs)),c("padding",mi(O.lg)),c("background",mi(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",mi(Z.md))]),DAe=w([c("color",mi(x.textSecondary)),c("font-size",mi($.sizeSm)),c("font-weight",mi($.weightMedium))]),FAe=w([z("flex"),ee("baseline"),c("gap",mi(O.sm))]),IAe=w([c("color",mi(x.textPrimary)),c("font-size",mi($.sizeXxl)),c("font-weight",mi($.weightBold)),c("line-height",mi($.lineHeightTight))]);function PAe(e){switch(e){case"Up":return x.success;case"Down":return x.error;case"Neutral":return x.textDisabled}}function OAe(e){return w([c("color",mi(PAe(e))),c("font-size",mi($.sizeSm)),c("font-weight",mi($.weightMedium))])}function MAe(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=y("span",{children:i+" "+t,className:OAe(r)})}else n=null;return L("div",{children:[y("div",{children:e.label,className:DAe}),L("div",{children:[y("span",{children:e.value,className:IAe}),n],className:FAe}),ne(e.sublabel,null,i=>y("div",{children:i,style:{color:"var("+x.textDisabled+")",fontSize:"var("+$.sizeXs+")"}})),D(e.footer,null)],className:NAe})}let LAe=MAe;function U9(e){return"var("+e+")"}let zAe=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),c("gap",U9(O.md))]),UAe=w([Ce("pointer"),c("border-radius",U9(Z.md)),qe([c("filter","brightness(0.98)")])]);function BAe(e){let t=e.kpis;return t.length===0?null:y("div",{children:t.map(r=>{let n=q(r.spark,a=>y($Ae,{values:a,width:120,height:24})),i=y(LAe,{label:r.label,value:r.value,trend:r.trend,trendLabel:r.trendLabel,sublabel:r.sublabel,footer:n}),o=r.onOpen;return o!==void 0?y("div",{children:i,className:UAe,role:"button",tabIndex:0,onKeyDown:a=>{if(a.key==="Enter")return o()},onClick:a=>o()},r.key):y("div",{children:i},r.key)}),className:zAe})}let jAe=BAe,J0=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function B9(e,t){return D(e.color,J0[No(t,J0.length)])}function qAe(e){let t=tt(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 qm(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function un(e){return(Math.round(e*1e3)/1e3).toString()}function ky(e,t,r,n,i,o){let a=qm(e,t,r,i),s=a[1],l=a[0],u=qm(e,t,r,o),d=u[1],f=u[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+un(e)+" "+un(t)+" L "+un(l)+" "+un(s)+" A "+un(r)+" "+un(r)+" 0 "+h+" 1 "+un(f)+" "+un(d)+" Z";let p=qm(e,t,n,i),m=qm(e,t,n,o);return"M "+un(l)+" "+un(s)+" A "+un(r)+" "+un(r)+" 0 "+h+" 1 "+un(f)+" "+un(d)+" L "+un(m[0])+" "+un(m[1])+" A "+un(n)+" "+un(n)+" 0 "+h+" 0 "+un(p[0])+" "+un(p[1])+" Z"}function VAe(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,a=qAe(n);if(a.length===0)return null;let s=i/2,l=i/2-1,u=o>0?l*o:0;return y("svg",{children:a.map((d,f)=>{let h=d[1],p=d[0],m=n[f],g=B9(m,f),v=h-p>=.999?ky(s,s,l,u,p,p+.5)+" "+ky(s,s,l,u,p+.5,h):ky(s,s,l,u,p,h);return y("path",{children:y("title",{children:m.label}),d:v,fill:g},m.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let GAe=VAe,KAe=["var("+x.brand+")","var("+x.success+")"];function HAe(e){let t=e.flatMap(i=>i.values),r=tt(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=tt(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function WAe(e){let t=e.height,r=e.width,n=e.series,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0||n.every(m=>m.values.length<2))return null;let a=HAe(n),s=a[0],l=a[1]-s,u=l===0?1:l,d=o-16,f=tt(n,0,(m,g)=>m>g.values.length?m:g.values.length),h=i/(f-1|0),p=8+d;return y("svg",{children:n.map((m,g)=>{let v=D(m.color,D(KAe[g],"var("+x.brand+")")),_=m.values.map((C,A)=>{let T=A*h,R=8+d-(C-s)/u*d;return[T,R]}).map(C=>C[0].toString()+","+C[1].toString()).join(" "),S=(m.values.length-1|0)*h,E="0,"+p.toString()+" "+_+(" "+S.toString()+","+p.toString());return L("g",{children:[y("polygon",{fill:v,fillOpacity:"0.15",points:E,stroke:"none"}),y("polyline",{fill:"none",points:_,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},m.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let JAe=WAe;function QAe(e){let t=e.size,r=t!==void 0?t:120;return y(GAe,{slices:e.slices,size:r,innerRatio:.6})}let YAe=QAe;function Eu(e){return"var("+e+")"}function XAe(e){return w([z("flex"),_e("column"),ee("center"),c("gap","2px"),c("width","100%"),c("max-width",e.toString()+"px")])}let ZAe=w([Mt("relative"),c("width","100%"),c("line-height","0")]),eTe=w([Mt("absolute"),c("left","0"),c("right","0"),c("bottom","0"),c("text-align","center"),c("line-height","1.1"),c("font-size",Eu($.sizeXl)),c("font-weight",Eu($.weightMedium)),c("color",Eu(x.textPrimary))]),tTe=w([z("flex"),Je("spaceBetween"),c("width","100%"),c("font-size",Eu($.sizeXs)),c("color",Eu(x.textDisabled))]),rTe=w([c("font-size",Eu($.sizeSm)),c("color",Eu(x.textSecondary))]);function nTe(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function jn(e){return(Math.round(e*100)/100).toString()}function _D(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function yD(e,t,r,n,i){let o=_D(e,t,r,n),a=_D(e,t,r,i);return"M "+jn(o[0])+" "+jn(o[1])+" A "+jn(r)+" "+jn(r)+" 0 0 1 "+jn(a[0])+" "+jn(a[1])}function iTe(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,a=i!==void 0?i:0,s=t!==void 0?t:160;if(n<=a)return null;let l=nTe(o,a,n),u=s*.09,d=s/2,f=s/2-u/2,h=f+u/2,p=h+u/2;return L("div",{children:[L("div",{children:[L("svg",{children:[y("path",{d:yD(d,h,f,0,1),fill:"none",stroke:"var("+x.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:jn(u)}),l<=0?null:y("path",{d:yD(d,h,f,0,l),fill:"none",stroke:"var("+x.brand+")",strokeLinecap:"round",strokeWidth:jn(u)})],"aria-label":jn(o)+" of "+jn(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:jn(p),width:jn(s),viewBox:"0 0 "+jn(s)+" "+jn(p)}),y("div",{children:D(e.display,jn(o)),className:eTe})],className:ZAe}),L("div",{children:[y("span",{children:jn(a)}),y("span",{children:jn(n)})],className:tTe}),r!==void 0?y("div",{children:r,className:rTe}):null],className:XAe(s)})}let oTe=iTe;function gh(e){return"var("+e+")"}let aTe=w([z("flex"),_e("column"),c("gap","6px")]),sTe=w([c("overflow-x","auto")]),lTe=w([z("flex"),c("gap","4px"),ee("flexStart")]);function uTe(e){return w([z("grid"),c("grid-template-rows","repeat(7, "+e.toString()+"px)"),c("gap","2px"),ee("center"),c("font-size",gh($.sizeXs)),c("color",gh(x.textDisabled)),c("line-height","1")])}function cTe(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 dTe(e){return w([c("border-radius","2px"),c("border","1px solid var("+x.borderSubtle+")"),c("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let fTe=w([c("visibility","hidden")]),hTe=w([z("flex"),ee("center"),ai("wrap"),c("gap",gh(O.md)),c("font-size",gh($.sizeXs)),c("color",gh(x.textSecondary))]),pTe=w([z("flex"),ee("center"),c("gap","4px")]);function mTe(e){return w([c("width","10px"),c("height","10px"),c("border-radius","2px"),c("border","1px solid var("+x.borderSubtle+")"),c("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function gTe(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function vTe(e){let t=e[0];if(t===void 0)return[];let r=Cl(gTe(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return Cl(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function bTe(e){return tt(e,0,(t,r)=>r.value>t?r.value:t)}function xD(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function _Te(e){return e%2===0?D(gw[e],""):""}function yTe(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=vTe(r);if(i.length===0)return null;let o=bTe(r),a=r[0],s=r[r.length-1|0],l=a!==void 0&&s!==void 0?bo(a.time)+" – "+bo(s.time):"";return L("div",{children:[y("div",{children:L("div",{children:[y("div",{children:Cl(7,u=>y("span",{children:_Te(u)},u.toString())),className:uTe(n)}),y("div",{children:i.map((u,d)=>u.map((f,h)=>f!==void 0?y("div",{className:dTe(iz(f.value,o)),title:Rs(f.time)+" "+bo(f.time)+": "+xD(f.value)},f.time.toString()):y("div",{className:fTe},"b:"+d.toString()+":"+h.toString()))),className:cTe(n)})],className:lTe}),className:sTe}),L("div",{children:[y("span",{children:l}),L("span",{children:["less",oz.map(u=>y("span",{className:mTe(u)},u.toString())),"more (max "+xD(o)+")"],className:pTe})],className:hTe})],className:aTe})}let xTe=yTe;function Li(e){return"var("+e+")"}let STe=w([z("flex"),_e("column"),c("gap","2px")]),wTe=w([z("flex"),_e("column"),c("gap","3px")]),ETe=w([z("flex"),Je("spaceBetween"),ee("baseline"),c("gap",Li(O.sm)),c("font-size",Li($.sizeSm))]),kTe=w([c("color",Li(x.textPrimary))]),CTe=w([c("color",Li(x.textPrimary)),c("font-weight",Li($.weightMedium)),c("white-space","nowrap")]),RTe=w([c("color",Li(x.textSecondary)),c("font-weight",Li($.weightNormal))]),ATe=w([c("background",Li(x.surfaceSubtle)),c("border-radius",Li(Z.sm)),c("height","14px"),Ds("hidden")]);function TTe(e,t){return w([c("background",t),c("border-radius",Li(Z.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let $Te=w([c("padding","2px 0 4px"),c("font-size",Li($.sizeXs)),c("color",Li(x.textDisabled))]),NTe=w([c("padding-top","4px"),c("font-size",Li($.sizeXs)),c("color",Li(x.textDisabled))]);function SD(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function DTe(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function FTe(e){let t=ne(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:SD(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?SD(i.value-r.value,i.value):void 0}})}function ITe(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=FTe(t),i=ne(t[0],0,o=>o.value);return L("div",{children:[t.map((o,a)=>{let s=n[a],l=i<=0?0:o.value/i*100,u=k(s,d=>d.dropOff);return L("div",{children:[u!==void 0?y("div",{children:"↓ "+u.toString()+"% drop-off",className:$Te}):null,L("div",{children:[L("div",{children:[y("span",{children:o.label,className:kTe}),L("span",{children:[DTe(o.value),a===0?null:y("span",{children:" · "+ne(s,0,d=>d.conversion).toString()+"%",className:RTe})],className:CTe})],className:ETe}),y("div",{children:y("div",{className:TTe(l,D(o.color,"var("+x.brand+")"))}),className:ATe})],className:wTe})]},o.label+":"+a.toString())}),r!==void 0?y("div",{children:r,className:NTe}):null],className:STe})}let PTe=ITe;function vh(e){return"var("+e+")"}let OTe=w([z("flex"),_e("column"),c("gap","2px")]),MTe=w([z("flex"),c("gap","4px")]),j9=[c("font-size",vh($.sizeXs)),c("color",vh(x.textDisabled)),c("white-space","nowrap")],LTe=w(j9.concat([z("flex"),_e("column"),Je("spaceBetween"),c("text-align","right")]));function zTe(e){return w(j9.concat([z("flex"),Je("spaceBetween"),c("margin-left",e.toString()+"px")]))}let UTe=w([z("flex"),Je("spaceBetween"),c("gap",vh(O.sm)),c("font-size",vh($.sizeXs)),c("color",vh(x.textSecondary))]);function BTe(e){let t=e[0];if(t!==void 0)return tt(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 Zr(e){return(Math.round(e*100)/100).toString()}function wD(e,t,r){return r<=t?.5:(e-t)/(r-t)}function jTe(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,a=r!==void 0?r:320,s=t!==void 0?t:200,l=BTe(o);if(l===void 0)return null;let u=3.5+1,d=a-u*2,f=s-u*2,h,p=0;return i!==void 0||n!==void 0?p=1:h=null,p===1&&(h=L("div",{children:[y("span",{children:"↑ "+D(n,"y")}),y("span",{children:D(i,"x")+" →"})],className:UTe})),L("div",{children:[L("div",{children:[L("div",{children:[y("span",{children:Zr(l.yMax)}),y("span",{children:Zr(l.yMin)})],className:LTe,style:{width:"34px"}}),L("svg",{children:[y("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Zr(u),x2:Zr(a-u),y1:Zr(s-u),y2:Zr(s-u)}),y("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Zr(u),x2:Zr(u),y1:Zr(u),y2:Zr(s-u)}),o.map((m,g)=>{let v=u+wD(m.x,l.xMin,l.xMax)*d,b=u+(1-wD(m.y,l.yMin,l.yMax))*f;return y("circle",{children:y("title",{children:m.label+" — "+D(i,"x")+": "+Zr(m.x)+", "+D(n,"y")+": "+Zr(m.y)}),cx:Zr(v),cy:Zr(b),fill:D(m.color,"var("+x.brand+")"),fillOpacity:"0.75",r:Zr(3.5)},m.label+":"+g.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Zr(s),width:Zr(a),viewBox:"0 0 "+Zr(a)+" "+Zr(s)})],className:MTe}),L("div",{children:[y("span",{children:Zr(l.xMin)}),y("span",{children:Zr(l.xMax)})],className:zTe(38)}),h],className:OTe})}let qTe=jTe;function ra(e){return"var("+e+")"}let VTe=w([z("flex"),_e("column"),c("gap","6px"),hn(Ae(0)),c("padding","0"),c("list-style","none")]),q9=[z("grid"),c("grid-template-columns","1.5rem 1fr auto"),ee("center"),c("gap",ra(O.sm)),c("font-size",ra($.sizeSm)),c("color",ra(x.textPrimary))],GTe=w(q9),KTe=w(q9.concat([Ce("pointer"),c("background","transparent"),c("border","none"),c("padding","2px 0"),c("text-align","left"),c("width","100%"),c("font","inherit"),qe([c("color",ra(x.brand))])])),HTe=w([c("align-self","start"),c("font-size",ra($.sizeXs)),c("color",ra(x.textDisabled)),c("text-align","right"),c("font-variant-numeric","tabular-nums")]),WTe=w([z("flex"),_e("column"),c("gap","3px"),rw(Ae(0))]),JTe=w([c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),QTe=w([c("background",ra(x.surfaceSubtle)),c("border-radius",ra(Z.sm)),c("height","6px"),Ds("hidden")]);function YTe(e){return w([c("background",ra(x.brand)),c("border-radius",ra(Z.sm)),c("height","100%"),c("width",e.toString()+"%"),c("min-width",e>0?"2px":"0")])}let XTe=w([c("align-self","start"),c("font-weight",ra($.weightMedium)),c("white-space","nowrap"),c("font-variant-numeric","tabular-nums")]);function ZTe(e,t){return t<=0||e<=0?0:e/t*100}function e$e(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=tt(n,0,(o,a)=>a.value>o?a.value:o);return y("ol",{children:n.map((o,a)=>{let s=L(cr,{children:[y("span",{children:(a+1|0).toString(),className:HTe}),L("span",{children:[y("span",{children:o.label,className:JTe,title:o.label}),y("span",{children:y("span",{className:YTe(ZTe(o.value,i))}),className:QTe})],className:WTe}),y("span",{children:o.display,className:XTe})]}),l=o.onOpen;return y("li",{children:l!==void 0?y("button",{children:s,className:KTe,type:"button",onClick:u=>l()}):y("div",{children:s,className:GTe})},o.key)}),className:VTe})}let t$e=e$e;function r$e(e){return tt(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function n$e(e){let t=e.height,r=e.width,n=e.bars,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0)return null;let a=tt(n,0,(f,h)=>{let p=r$e(h);return f>p?f:p}),s=a===0?1:a,l=n.length,u=(i-2*(l+1|0))/l,d=o-4;return y("svg",{children:n.map((f,h)=>{let p=2+h*(u+2),m={contents:o};return y("g",{children:f.segments.map((g,v)=>{let b=g.value>0?g.value:0,_=b/s*d,S=m.contents-_;return m.contents=S,b===0?null:y("rect",{children:y("title",{children:f.label+" — "+g.key+": "+b.toString()}),height:_.toString(),width:u.toString(),fill:D(g.color,"var("+x.brand+")"),x:p.toString(),y:S.toString()},g.key+":"+v.toString())})},f.label+":"+h.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let i$e=n$e;function Ir(e){return"var("+e+")"}let o$e=w([z("flex"),_e("column"),c("gap",Ir(O.lg))]),a$e=w([c("font-size",Ir($.sizeXl)),c("font-weight",Ir($.weightMedium)),c("color",Ir(x.textPrimary)),hn(Ae(0))]),s$e=w([z("grid"),c("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),c("gap",Ir(O.md))]),Pc=w([z("flex"),_e("column"),c("gap",Ir(O.sm)),c("padding",Ir(O.lg)),c("background",Ir(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Ir(Z.md))]),Oc=w([c("font-size",Ir($.sizeSm)),c("font-weight",Ir($.weightMedium)),c("color",Ir(x.textSecondary))]),l$e=w([z("flex"),ee("center"),c("gap",Ir(O.lg))]),ED=w([z("flex"),_e("column"),c("gap","4px"),c("font-size",Ir($.sizeSm)),c("color",Ir(x.textSecondary))]),kD=w([z("flex"),ee("center"),c("gap","6px")]);function CD(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let RD=w([c("font-size",Ir($.sizeXs)),c("color",Ir(x.textDisabled))]),u$e=w([z("flex"),Je("spaceBetween"),ee("center"),c("gap",Ir(O.sm))]),c$e=w([z("inlineFlex"),c("gap",Ir(O.xs))]);function d$e(e){return w([c("background",e?Ir(x.surfaceSubtle):"transparent"),c("border","1px solid var("+x.border+")"),c("border-radius",Ir(Z.sm)),c("padding","2px var("+O.sm+")"),c("font-size",Ir($.sizeXs)),c("color",Ir(e?x.textPrimary:x.textSecondary)),Ce("pointer")])}function Q0(e,t){return k(F(e,t),r=>{let n=Ii(r);return n!==void 0?n:q(Wv(r),i=>Zae(i[0],i[1]))})}function Qp(e){return e.map(t=>D(G(t),{}))}function bS(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=Q(Qp(e),o=>Q0(o,r)),i=tt(n,0,(o,a)=>o+a);return t==="sum"?i:n.length===0?0:i/n.length}function Y0(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function f$e(e,t,r){return vO(e,r&&(t==="count"||t==="sum"))}function h$e(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 ns(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 "+ct(n):e.view;case"sum":return n!==void 0?e.view+" — total "+ct(n):e.view;default:return e.view}}function V9(e,t,r,n){let i=Cl(r,o=>[]);return Qp(e).forEach(o=>re(k(Ju(t,o),Qn),a=>{let s=Math.floor((n-a)/864e5)|0;if(s>=0&&s<r)return re(i[(r-1|0)-s|0],l=>{l.push(o)})})),i}function _S(e,t,r,n,i,o){return V9(e,t,r,n).map(a=>bS(a.map(s=>s),i,o))}function G9(e,t){return Q(Qp(e),r=>ma(r,t))}function K9(e,t,r){let n=ao(t,r),i=tt(e.filter(o=>!n.includes(o)),[],(o,a)=>o.includes(a)?o:o.concat([a]));return n.concat(i)}function p$e(e,t,r){let n=G9(e,r);return Q(K9(n,t,r),i=>{let o=n.filter(a=>a===i).length;if(o!==0)return{label:ct(i),value:o}})}function H9(e){return J0[No(e,J0.length)]}function m$e(e,t,r,n,i,o){let a=V9(e,t,r,n),s=f=>Q(f,h=>ma(h,o)),l=a.flatMap(s),u=K9(l,i,o).filter(f=>l.some(h=>h===f)),d=a.map((f,h)=>{let p=s(f);return{label:Rs(n-((r-1|0)-h|0)*864e5),segments:u.map((m,g)=>({key:ct(m),value:p.filter(v=>v===m).length,color:H9(g)}))}});return{statuses:u,bars:d}}function g$e(e,t,r){let n=ao(t,r),i=G9(e,r),o=Q(i,a=>{let s=n.indexOf(a);if(!(s<0))return s});return{stages:n.map((a,s)=>({label:ct(a),value:o.filter(l=>l>=s).length})),excluded:i.length-o.length|0}}function v$e(e,t){return q(Pr(e).find(r=>r[0]===t),r=>r[1])}function W9(e,t){return q(F(e.semantics,t),r=>r.semantic)}function b$e(e,t,r){let n=v$e(e,t);if(n===void 0)return;let i=Ch(n,"maximum");if(i===void 0)return Re(W9(r,t),"Percent")?{min:0,max:100}:void 0;let o=D(Ch(n,"minimum"),0);if(i>o)return{min:o,max:i}}function AD(e,t,r){let n=W9(e,t);if(n===void 0)return Y0(r);switch(n){case"Percent":return c8(r);case"Bytes":return d8(r);case"Duration":return gE(r);case"Currency":case"Money":return mE(r);default:return Y0(r)}}function _$e(e,t,r,n){return Q(Qp(e),i=>q(Q0(i,t),o=>{let a=D(k(F(i,"id"),ie),"");return{id:a,label:D(k(F(i,r),ie),a===""?"—":a),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function y$e(e,t,r,n){return Q(Qp(e),i=>{let o=Q0(i,t),a=Q0(i,r);if(o!==void 0&&a!==void 0)return{label:D(k(F(i,n),ie),D(k(F(i,"id"),ie),"—")),x:o,y:a}})}function x$e(e,t,r,n,i,o){return _S(e,t,r,n,i,o).map((a,s)=>({time:vi(n-((r-1|0)-s|0)*aM),value:a}))}function S$e(e){let t=de(()=>"Days30"),r=t[1],n=t[0],i=(a,s)=>y("button",{children:s,className:d$e(n===a),type:"button",onClick:l=>r(u=>a)}),o;return o=n==="Days30"?e.body:y(xTe,{days:e.yearDays}),L("div",{children:[L("div",{children:[y("span",{children:e.title,className:Oc}),L("div",{children:[i("Days30","30 days"),i("Year","Year")],className:c$e})],className:u$e}),o],className:Pc})}function w$e(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,a=e.pluginId,s=t!==void 0?t:{},l=Ns(),u=Ms(),d=Q(tt(o.map(P=>P.view),[],(P,U)=>P.includes(U)?P:P.concat([U])),P=>i.find(U=>U.name===P)),f=d.map(P=>{let U=B0(s,P.name,u),j=Ku(P,U&&vr(r));return[P,U,j]}),h=P=>r!==void 0?D(F(r,P),[]):ne(f.find(U=>U[0].name===P),[],U=>U[2].rows),p=P=>r!==void 0?!1:ne(f.find(U=>U[0].name===P),!1,U=>U[2].canLoadMore),m=Date.now(),g=Q(o,P=>q(d.find(U=>U.name===P.view?B0(s,U.name,u):!1),U=>({metric:P,readModel:U,rows:h(U.name),partial:p(U.name),semantics:xn(U.schema,k(n,j=>ja(j,U.name)),{field:U.labelField,source:U.labelFieldSource})}))),v=g.map((P,U)=>{let j=D(P.metric.aggregate,"count"),V=q(P.semantics.dateSpan,Y=>_S(P.rows,Y,14,m,j,P.metric.field));return{key:U.toString()+":"+P.readModel.name,label:ns(P.metric),value:f$e(Y0(bS(P.rows,j,P.metric.field)),j,P.partial),sublabel:h$e(P.readModel.name,j,P.partial,P.rows.length),spark:V,onOpen:()=>l(ls(nl(a,P.readModel.name)))}}),b=P=>{let U=P.readModel.lifecycleField;return U!==void 0?U:P.semantics.statusField},_=Q(g,P=>q(P.semantics.dateSpan,U=>{let j=D(P.metric.aggregate,"count"),V=ns(P.metric)+" — trend",Y=b(P),J;if(j==="count"&&Y!==void 0){let oe=m$e(P.rows,U,30,m,P.readModel.schema,Y),ge=oe.statuses;J=ge.length===0?void 0:L(cr,{children:[y(i$e,{bars:oe.bars}),y("div",{children:ge.map((H,ae)=>L("span",{children:[y("span",{className:CD(H9(ae))}),ct(H)],className:kD},H)),className:ED})]})}else J=void 0;let X;if(J!==void 0)X=J;else{let oe=_S(P.rows,U,30,m,j,P.metric.field);X=y(JAe,{series:[{label:ns(P.metric),values:oe}]})}return y(S$e,{title:V,body:X,yearDays:x$e(P.rows,U,365,m,j,P.metric.field)},"trend:"+ns(P.metric))})),S=Q(g,P=>{let U=P.metric.aggregate,j=P.metric.field;if(U==="avg"&&j!==void 0)return q(b$e(P.readModel.schema,j,P.semantics),V=>{let Y=bS(P.rows,"avg",j);return L("div",{children:[y("span",{children:ns(P.metric),className:Oc}),y(oTe,{value:Y,min:V.min,max:V.max,display:AD(P.semantics,j,Y),caption:P.readModel.name+" · "+ct(j)})],className:Pc},"gauge:"+ns(P.metric))})}),E=[],C=Q(g,P=>{let U=P.metric.aggregate,j=P.metric.field;if(U===void 0)return;switch(U){case"avg":case"sum":break;default:return}if(j===void 0||E.includes(P.readModel.name+":"+j))return;E.push(P.readModel.name+":"+j);let V=_$e(P.rows,j,P.readModel.labelField,10).map(Y=>({key:Y.id===""?Y.label:Y.id,label:Y.label,display:AD(P.semantics,j,Y.value),value:Y.value,onOpen:Y.id===""?void 0:()=>l(La(a,P.readModel.name,Y.id,[]))}));if(V.length!==0)return L("div",{children:[y("span",{children:P.readModel.name+" — top by "+ct(j),className:Oc}),y(t$e,{entries:V})],className:Pc},"top:"+P.readModel.name+":"+j)}),A=Q(g,P=>{let U=P.metric.viz,j=P.metric.field,V=P.metric.xField;if(U===void 0||U!=="scatter"||j===void 0||V===void 0)return;let Y=y$e(P.rows,V,j,P.readModel.labelField);if(Y.length!==0)return L("div",{children:[y("span",{children:P.readModel.name+" — "+ct(j)+" by "+ct(V),className:Oc}),y(qTe,{points:Y,xLabel:ct(V),yLabel:ct(j)})],className:Pc},"scatter:"+ns(P.metric))}),T=Q(g,P=>{let U=P.metric.viz,j=b(P);if(U===void 0||U!=="funnel"||j===void 0)return;let V=g$e(P.rows,P.readModel.schema,j),Y=V.stages;if(Y.length===0)return;let J=V.excluded;return L("div",{children:[y("span",{children:ns(P.metric)+" — "+ct(j)+" funnel",className:Oc}),y(PTe,{stages:Y,note:J===0?void 0:J.toString()+" row(s) with an unlisted "+ct(j)+" excluded"})],className:Pc},"funnel:"+ns(P.metric))}),R=Q(g,P=>{let U=D(P.metric.aggregate,"count"),j=Re(P.metric.viz,"funnel")?void 0:b(P);if(U!=="count"||j===void 0)return;let V=p$e(P.rows,P.readModel.schema,j);if(V.length!==0)return L("div",{children:[y("span",{children:P.readModel.name+" — by "+ct(j),className:Oc}),L("div",{children:[y(YAe,{slices:V}),y("div",{children:V.map((Y,J)=>L("span",{children:[y("span",{className:CD(B9(Y,J))}),Y.label+" ("+Y0(Y.value)+")"],className:kD},Y.label)),className:ED})],className:l$e})],className:Pc},"status:"+P.readModel.name)}),N=(ke(r)?[]:Q(f,P=>{let U=P[0],j=P[2].fetchState;if(P[1])return typeof j!="object"?j==="Loading"?U.name+": loading…":void 0:(j.TAG,U.name+": "+j._0)})).concat(X2(s,d.map(P=>P.name),u)),I=[T,A,S,_,C,R].flatMap(P=>P),M=tt(Q(g,P=>{if(P.partial)return P.readModel.name}),[],(P,U)=>P.includes(U)?P:P.concat([U]));return L("div",{children:[y("h2",{children:"Dashboard",className:a$e}),y(jAe,{kpis:v}),I.length!==0?y("div",{children:I,className:s$e}):null,M.length!==0?y("span",{children:"Figures cover the rows loaded for: "+M.join(", "),className:RD}):null,N.length!==0?y("span",{children:N.join(" · "),className:RD}):null],className:o$e})}let E$e=w$e,J9={actor:"",eventType:"",timeFrom:"",timeTo:""};function TD(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function Fn(e){return"var("+e+")"}let k$e=w([z("flex"),_e("column"),c("gap",Fn(O.sm))]),C$e=w([z("flex"),ee("center"),c("gap",Fn(O.md)),ai("wrap"),c("padding-bottom",Fn(O.xs)),c("border-bottom","1px solid var("+x.border+")")]),R$e=w([z("flex"),ee("center"),c("gap","4px")]),$D=w([c("color",Fn(x.textSecondary)),c("font-size",Fn($.sizeSm)),c("white-space","nowrap")]),ND=w([c("background",Fn(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Fn(Z.sm)),c("padding","2px var("+O.sm+")"),c("font-size",Fn($.sizeSm)),c("color",Fn(x.textPrimary)),c("outline","none"),Is([c("border-color",Fn(x.brand))])]),A$e=w([c("background","none"),c("border","none"),c("padding","0"),c("color",Fn(x.brand)),c("font-size",Fn($.sizeSm)),Ce("pointer"),qe([c("text-decoration","underline")])]),T$e=w([z("flex"),Je("center"),c("padding-top",Fn(O.xs))]),$$e=w([c("background",Fn(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",Fn(Z.sm)),c("padding","4px var("+O.md+")"),c("font-size",Fn($.sizeSm)),c("color",Fn(x.textPrimary)),Ce("pointer"),qe([c("border-color",Fn(x.brand))])]);function N$e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,a=e.filter,s=i!==void 0?i:!1,l=n!==void 0?n:!1,u=t!==void 0?t:"No recorded history for this record",d=Q([["actor","Actor",e.actors.map(h=>({label:h,value:h})),a.actor],["eventType","Event",e.eventTypes.map(h=>({label:ct(h),value:h})),a.eventType]],h=>{let p=h[2];if(p.length!==0)return{key:h[0],label:h[1],options:p,value:h[3]}});return L("div",{children:[L("div",{children:[y(Xz,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:a.timeTo});case"eventType":return o({actor:a.actor,eventType:p,timeFrom:a.timeFrom,timeTo:a.timeTo});default:return}}}),L("div",{children:[y("span",{children:"From:",className:$D}),y("input",{className:ND,type:"date",value:a.timeFrom,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:h.target.value,timeTo:a.timeTo})}),y("span",{children:"To:",className:$D}),y("input",{className:ND,type:"date",value:a.timeTo,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:h.target.value})})],className:R$e}),TD(a)?y("button",{children:"Clear filters",className:A$e,onClick:h=>o(J9)}):null],className:C$e}),y(Ywe,{entries:e.entries,emptyLabel:TD(a)?"No events match these filters":u,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),s?y("div",{children:y("button",{children:l?"Loading…":"Load earlier events",className:$$e,disabled:l,onClick:h=>re(r,p=>p())}),className:T$e}):null],className:k$e})}let D$e=N$e;function F$e(e){if(e!=="")return e+"T00:00:00.000Z"}function I$e(e){if(e!=="")return e+"T23:59:59.999Z"}function P$e(e,t,r){let n={};return n.entityId=e,n.first=50,re(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),re(F$e(t.timeFrom),i=>{n.timeFrom=i}),re(I$e(t.timeTo),i=>{n.timeTo=i}),n}function O$e(e){let t=e.entityId,r=e.binding,n=si(),i=Ms(),o=ne(e.requiredAccess,!1,P=>!i(P)),a=de(()=>[]),s=a[1],l=a[0],u=de(()=>J9),d=u[1],f=u[0],h=de(()=>!0),p=h[1],m=de(()=>{}),g=m[1],v=m[0],b=de(()=>!1),_=b[1],E=de(()=>{})[1],C=de(()=>0),A=C[1],T=C[0],R=Pe(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;De(()=>{if(!o)if(n!==void 0){let P=T===0,U=P?void 0:R.current;p(j=>!0),g(j=>{}),Ft(n(r.queryDocument,P$e(t,f,U)).then(j=>{let V=a_e(j,r.queryField),Y=s_e(j,r.queryField),J=Y[1],X=Y[0];return s(oe=>P?V:V.concat(oe)),_(oe=>X),E(oe=>J),R.current=J,p(oe=>!1),Promise.resolve()}),j=>(p(V=>!1),g(V=>"Could not load the history for this record."),Promise.resolve()))}else g(P=>"Not connected")},[N,T,o]);let I=P=>{R.current=void 0,A(U=>0),s(U=>[]),d(U=>P)},M=()=>A(P=>P+1|0);return o?null:v!==void 0?y(Ra,{title:"History unavailable",detail:v,onRetry:()=>A(P=>P+1|0)}):y(D$e,{entries:f_e(l,r.displayName),actors:h_e(l),eventTypes:p_e(l),filter:f,onFilterChange:I,hasMore:b[0],loading:h[0],onLoadMore:M})}let M$e=O$e;function ri(e){return"var("+e+")"}let L$e=w([z("flex"),_e("column"),c("gap",ri(O.lg))]),z$e=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",ri(O.md))]),U$e=w([c("font-size",ri($.sizeXl)),c("font-weight",ri($.weightMedium)),c("color",ri(x.textPrimary)),hn(Ae(0))]),B$e=w([z("flex"),ai("wrap"),ee("center"),c("gap",ri(O.md)),c("font-size",ri($.sizeSm)),c("color",ri(x.textSecondary))]),j$e=w([z("inlineFlex"),ee("center"),c("gap","4px"),Ce("pointer")]);function q$e(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let DD=w([c("font-size",ri($.sizeXs)),c("color",ri(x.textDisabled))]),V$e=w([z("flex"),ee("center"),c("gap",ri(O.sm))]),G$e=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",ri(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",ri(x.textSecondary)),c("font-size",ri($.sizeSm)),Ce("pointer"),qe([c("background",ri(x.surfaceSubtle)),c("color",ri(x.textPrimary))])]);function K$e(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},a=Ns(),s=Ms(),l=si(),u=Pp(),d=ua(),f=yk(),h=de(()=>[]),p=h[1],m=h[0],g=n.map((C,A)=>{let T=B0(o,C.name,s),R=T&&!m.includes(C.name),N=Ku(C,R);return[C,A,R,T,N]}),v=(C,A)=>D(k(k(r,T=>vn(T,C.name)),T=>T.accent),Td[No(A,Td.length)]),b=Q(g,C=>{let A=C[4],T=C[0],R=k(r,P=>vn(P,T.name)),N=xn(T.schema,k(r,P=>ja(P,T.name)),{field:T.labelField,source:T.labelFieldSource}),I=q(N.statusField,P=>cb(P,T.commands,k(R,U=>U.transitions))),M=xk(l,u,T.commands,T.name,A.isLive,A.refetch,d,f.onNotice,void 0);if(C[2])return{readModelName:T.name,rows:A.rows,schema:T.schema,semantics:N,accent:v(T,C[1]),window:wh(A.canLoadMore),onOpenRow:(P,U)=>a(La(i,T.name,P,[])),onCommand:q(I,P=>M),statusCommandFor:I,ownEntity:{pluginId:i,viewName:T.name}}}),_=Q(g,C=>{if(C[2]&&C[4].canLoadMore)return C[0].name}),S=()=>{g.forEach(C=>{let A=C[4];if(C[2]&&A.canLoadMore)return A.loadMore()})},E=Q(g,C=>{let A=C[0],T=C[4].fetchState;if(C[2])return typeof T!="object"?T==="Loading"?A.name+": loading…":void 0:(T.TAG,A.name+": "+T._0)}).concat(X2(o,n.map(C=>C.name),s));return L("div",{children:[y("div",{children:y("h2",{children:e.canvasName,className:U$e}),className:z$e}),y("div",{children:g.filter(C=>C[3]).map(C=>{let A=C[0];return L("label",{children:[y("input",{checked:C[2],type:"checkbox",onChange:T=>{let R=A.name;p(N=>N.includes(R)?N.filter(I=>I!==R):N.concat([R]))}}),y("span",{className:q$e(v(A,C[1]))}),A.name],className:j$e},A.name)}),className:B$e}),f.element,e.mode.render(b),_.length!==0?L("div",{children:[y("button",{children:"Load more",className:G$e,onClick:C=>S()}),y("span",{children:"More rows available: "+_.join(", "),className:DD})],className:V$e}):null,E.length!==0?y("span",{children:E.join(" · "),className:DD}):null],className:L$e})}let H$e=K$e;function ku(e){return"var("+e+")"}let W$e=w([z("flex"),ee("center"),c("gap",ku(O.xs)),c("font-size",ku($.sizeSm)),c("color",ku(x.textSecondary))]),J$e=w([c("color",ku(x.brand)),c("text-decoration","none"),qe([c("text-decoration","underline")])]),Q$e=w([c("color",ku(x.textPrimary)),c("font-weight",ku($.weightMedium))]),Y$e=w([c("color",ku(x.textDisabled)),fO("none")]);function X$e(e){let t=e.crumbs;return y("nav",{children:t.map((r,n)=>{let i=n===(t.length-1|0);return L(ov,{children:[n>0?y("span",{children:"/","aria-hidden":!0,className:Y$e}):null,i||vr(r.href)?y("span",{children:r.label,className:Q$e}):y("a",{children:r.label,className:J$e,href:D(r.href,"#")})]},r.label)}),"aria-label":"breadcrumbs",className:W$e})}let Z$e=X$e;function vt(e){return"var("+e+")"}let eNe=w([z("flex"),_e("column"),c("gap",vt(O.lg)),c("padding","0 var("+O.md+")"),c("min-width","0")]),tNe=w([z("flex"),ee("center"),c("font-size",vt($.sizeMd)),c("padding","var("+O.sm+") 0"),c("border-bottom","1px solid var("+x.borderSubtle+")")]),rNe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",vt(O.md)),c("padding-bottom",vt(O.md)),c("border-bottom","1px solid var("+x.borderSubtle+")")]),nNe=w([z("flex"),ee("center"),c("gap",vt(O.sm)),c("min-width","0")]),iNe=w([c("font-size",vt($.sizeXl)),c("font-weight",vt($.weightMedium)),c("color",vt(x.textPrimary)),hn(Ae(0))]),oNe=w([z("flex"),ai("wrap"),c("gap",vt(O.sm)),c("padding-bottom",vt(O.sm))]),aNe=w([c("background",vt(x.surface)),c("color",vt(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",vt(Z.md)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",vt($.sizeSm)),Ce("pointer"),qe([c("background",vt(x.surfaceElevated))])]),sNe=w([z("flex"),_e("column"),c("gap",vt(O.sm)),c("min-width","0")]),Cy=w([z("flex"),ee("start"),c("gap",vt(O.md)),c("padding","var("+O.xs+") 0"),c("border-bottom","1px solid var("+x.borderSubtle+")"),mO([c("border-bottom","none")])]),Ry=w([c("color",vt(x.textSecondary)),c("font-size",vt($.sizeMd)),c("font-weight",vt($.weightMedium)),c("white-space","nowrap"),c("padding-top","2px"),Un(0),c("min-width","200px")]),Vm=w([c("color",vt(x.textPrimary)),c("font-size",vt($.sizeMd)),c("word-break","break-word"),c("min-width","0")]),FD=w([z("flex"),ee("start"),c("gap",vt(O.md)),c("padding","var("+O.xs+") 0"),c("border-bottom","1px solid var("+x.borderSubtle+")"),mO([c("border-bottom","none")])]),ID=w([c("color",vt(x.textSecondary)),c("font-size",vt($.sizeMd)),c("font-weight",vt($.weightMedium)),c("padding-top","2px"),Un(0),c("min-width","200px")]),PD=w([z("flex"),_e("column"),c("gap",vt(O.sm)),Yn(1),c("padding",vt(O.md)),c("background",vt(x.surfaceSubtle)),c("border-radius",vt(Z.md)),c("border","1px solid var("+x.borderSubtle+")"),c("min-width","0")]),lNe=w([z("flex"),_e("column"),c("gap",vt(O.sm)),c("min-width","0")]),uNe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",vt(O.md)),c("padding-bottom",vt(O.xs)),c("border-bottom","1px solid var("+x.borderSubtle+")")]),cNe=w([c("color",vt(x.textPrimary)),c("font-size",vt($.sizeMd)),c("font-weight",vt($.weightMedium))]),OD=w([c("overflow-x","auto"),c("max-width","100%"),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",vt(Z.md))]),Mc=w([c("color",vt(x.textDisabled)),c("font-size",vt($.sizeSm))]);function Q9(e,t){return D(k(k(G(e),r=>F(r,"title")),ie),ct(t))}function MD(e){return k(k(G(e),t=>F(t,"type")),ie)}function LD(e){return k(k(G(e),t=>F(t,"format")),ie)}function dNe(e){return k(G(e),t=>F(t,"items"))}function zD(e){return ke(k(k(G(e),t=>F(t,"properties")),G))}function fNe(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function UD(e){let t=e.toLowerCase(),r=e.length,n=a=>{let s=a.length;if(r>s&&t.endsWith(a))return e.slice(0,r-s|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function hNe(e,t){let r=yn(t),n=MD(r),i=Ul(r);if(i!==void 0)return{TAG:"TaggedUnion",_0:i};if(n!==void 0)switch(n){case"array":let a=dNe(r);if(a===void 0)return"ArrayOfScalars";let s=MD(a);if(zD(a)||Re(s,"object"))return{TAG:"ArrayOfObjects",_0:a};if(!Re(s,"string"))return"ArrayOfScalars";let l=UD(e);return l!==void 0?{TAG:"EntityRefArray",_0:l}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return zD(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!fNe(e))return{TAG:"Scalar",_0:D(n,"string"),_1:LD(r)};let o=UD(e);return o!==void 0?{TAG:"EntityRef",_0:o}:{TAG:"Scalar",_0:D(n,"string"),_1:LD(r)}}function Gm(e,t,r,n){let i=We(e);if(typeof i!="object")switch(i){case"JSONFalse":return y(Xo,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return y(Xo,{variant:"Success",label:"true",dot:!1});case"JSONNull":return y("span",{children:"—",className:Mc})}else switch(i.TAG){case"JSONString":let o=i._0;return t==="date-time"?xv(o):D(xO(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function pNe(e){return D(q(_t(e),t=>t.map(r=>{let n=We(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 BD(e){return D(q(_t(e),t=>Q(t,G)),[])}function Y9(e,t){let r=k(F(e,"id"),ie);if(r!==void 0)return r;let n=k(F(e,"compositeId"),ie);return n!==void 0?n:"#"+t.toString()}function jD(e){return e.map((t,r)=>({key:Y9(t,r),row:t}))}function mNe(e,t,r){for(;;){let n=t,i=n[0];if(i===void 0)return e;let o=e[e.length-1|0];if(o===void 0)return;let a=ke(G(o.data)),s=_t(o.data),l;if(a){let u=D(G(o.data),{}),d=k(k(G(o.schema),p=>F(p,"properties")),G),f=k(d,p=>F(p,i)),h=F(u,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:Q9(f,i)}:void 0}else if(ke(s)){let u=D(s,[]),d=D(k(G(o.schema),h=>F(h,"items")),o.schema),f=u.find((h,p)=>{let m=D(G(h),{});return Y9(m,p)===i});l=f!==void 0?{data:f,schema:d,label:i}:void 0}else l=void 0;if(l===void 0)return;e.push(l),r.push(i),t=n.slice(1)}}function gNe(e,t){if(t!==void 0&&t!=="id")return k(k(k(G(e),r=>F(r,t)),ie),r=>{if(r!=="")return r})}function vNe(e,t){let r=e.filter(n=>Ma(n.key,t));return r.length===0?e:r}function bNe(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,a=e.drillPath,s=e.labelField,l=e.aggregateId,u=e.lifecycleField,d=e.commands,f=e.rootLabel,h=e.schema,p=e.data,m=d!==void 0?d:[],g=a!==void 0?a:[],v=si(),b=Wp(),_=ua(),S=hp(),E=uAe(),C=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,A=Ns(),T=de(()=>[]),R=T[1],N=de(()=>{}),I=N[1],M=de(()=>({})),P=M[1],U=M[0],j=ke(o)&&ke(i),V=j?g:T[0],Y=ve=>{if(o!==void 0&&i!==void 0&&l!==void 0)return A(La(o,i,l,ve));R(Ye=>ve)},J=mNe([{data:p,schema:h,label:f}],V,[]),X=D(G(p),{}),oe=hi(h,"Drill",_,C,s,void 0),ge=tf([X],oe,_,C,void 0),Se={lookupLabel:(ve,Ye)=>ef(ge,ve,_,Ye),isMissing:(ve,Ye)=>Lp(ge,ve,_,Ye),retiredBadge:(ve,Ye)=>Op(ge,ve,_,Ye),linkable:(ve,Ye)=>Mp(ge,ve,_,Ye,!1)},pe=ne(k(pa(),ve=>ve.identity),[],ve=>ve.groups),be=ve=>{if(l!==void 0)return q(gi(M9(h,ve,m),Ye=>L9(Ye.command,pe)),Ye=>(()=>I(At=>Ye.command)))},Ie=(ve,Ye,At)=>L("div",{children:[y("div",{children:Ye,className:Ry}),y("div",{children:At,className:Vm})],className:Cy},ve),$t=(ve,Ye,At)=>Ed(ve,_,C)?At:Lx(ve,Ye,_,At),Lt=gNe(p,s),Ar=ve=>{let Ye=We(ve.data);if(typeof Ye!="object"){if(Ye==="JSONNull")return y("span",{children:"—",className:Mc})}else switch(Ye.TAG){case"JSONObject":let At=D(G(ve.data),{}),yt=V.length===0,pn=hi(ve.schema,"Drill",_,C,yt?s:void 0,void 0),Xn=yt&&ke(Lt)?vNe(pn,s):pn;return Xn.length===0?y("span",{children:"(no fields)",className:Mc}):y("div",{children:Xn.map(Fe=>{let we=Fe.key,mt=Fe.propSchema,nt=gi(F(At,we),Ze=>We(Ze)!=="JSONNull"),ot=Q9(mt,we),Vt=hNe(we,mt);if(nt===void 0)return Ie(we,ot,D(gse(we,mt),y("span",{children:"—",className:Mc})));if(typeof Vt!="object")switch(Vt){case"Bool":return Ie(we,ot,Gm(nt,void 0,we))}else switch(Vt.TAG){case"Scalar":let Ze=Pg(we,mt,nt);return Ze!==void 0?Ie(we,ot,Ze):Ie(we,ot,Gm(nt,Vt._1,we));case"EntityRef":let Qt=Vt._0;return Ie(we,$t(Qt,!1,ot),I0(we,Qt,nt,_,S,Se,C,void 0,void 0));case"EntityRefArray":let xt=Vt._0;return Ie(we,$t(xt,!0,ot),I0(we,xt,nt,_,S,Se,C,void 0,void 0));case"NestedObject":let gn=Pg(we,mt,nt);if(gn!==void 0)return Ie(we,ot,gn);let Yt=hi(Vt._0,"Drill",_,C,void 0,void 0),ar=D(k(F(At,we),G),{});return L("div",{children:[y("div",{children:ot,className:ID}),y("div",{children:Yt.map(ft=>{let Qa=F(ar,ft.key);return L("div",{children:[y("div",{children:yu(ft,_,C),className:Ry}),y("div",{children:gl(ft.key,ft.kind,ft.propSchema,Qa,void 0,_,S,Se,C),className:Vm})],className:Cy},ft.key)}),className:PD})],className:FD},we);case"ArrayOfObjects":let dr=Vt._0,Tr=jD(BD(nt)),St=Tr.length,Mr=D(i,f),Er=Mr+"."+we,$r=k(n,ft=>vn(ft,Er)),kr=DE(dr,$r),Gt=$E(o,Mr,we),Lr=F(U,we),sn=Lr!==void 0?Lr:Yv(Gt),Yr=FE(sn,$r,ow(dr),kr),Xr=ft=>{TE(Gt,ft),P(Qa=>{let Jl=Oe($e(Qa));return Jl[we]=ft,Jl})},wi=D(_t(nt),[]),ui=ft=>{let Qa=xn(dr,k(n,Js=>ja(Js,Er)),void 0),Jl=k($r,Js=>Js.accent),sm={readModelName:Er,rows:wi,schema:dr,semantics:Qa,accent:Jl,window:"Complete",onOpenRow:(Js,Hb)=>{let Wb=yq(wi,Qs=>Qs===Hb),Jb=Wb!==void 0?ne(Tr[Wb],Js,Qs=>Qs.key):Js;Y(V.concat([we,Jb]))}};return ft.render([sm])},uo=hi(dr,"Drill",_,C,void 0,void 0).map(ft=>({key:ft.key,label:ft.label,render:Qa=>gl(ft.key,ft.kind,ft.propSchema,F(Qa.row,ft.key),void 0,_,S,Se,C),sortable:!1,width:ft.width})),Gb=St===0?y("span",{children:"(empty)",className:Mc}):y("div",{children:y(Sh,{columns:uo,data:Tr,keyFn:ft=>ft.key,onRowClick:ft=>Y(V.concat([we,ft.key])),density:"Comfortable"}),className:OD}),Hl=Yr!==void 0&&Yr.id!==ia?ui(Yr):Gb;return L("div",{children:[L("div",{children:[y("span",{children:ot,className:cNe}),L("span",{children:[kr.length>1?y(ms.make,{modes:kr,activeId:ne(Yr,ia,ft=>ft.id),onSelect:Xr}):null,y(Zf,{count:St,label:"items",onClick:()=>Y(V.concat([we]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:uNe}),Hl],className:lNe},we);case"TaggedUnion":let Ks=Pg(we,mt,nt);if(Ks!==void 0)return Ie(we,ot,Ks);let zr=cw(nt);if(zr===void 0)return Ie(we,ot,Gm(nt,void 0,we));let ji=zr[1],Hs=zr[0],Wl=HS(Vt._0,Hs),Ws=ne(Wl,Hs,ft=>ft.tag),am=ne(Wl,[],ft=>hi(WP(ft),"Drill",_,C,void 0,void 0)),mc=L("span",{children:[ot,Yh(Ws)],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:"6px"}});return am.length!==0?L("div",{children:[y("div",{children:mc,className:ID}),y("div",{children:am.map(ft=>L("div",{children:[y("div",{children:yu(ft,_,C),className:Ry}),y("div",{children:gl(ft.key,ft.kind,ft.propSchema,F(ji,ft.key),void 0,_,S,Se,C),className:Vm})],className:Cy},ft.key)),className:PD})],className:FD},we):Ie(we,ot,Yh(Ws))}return Ie(we,ot,y(yO,{items:pNe(nt)}))}),className:sNe});case"JSONArray":let mn=jD(BD(ve.data)),W=D(k(G(ve.schema),Fe=>F(Fe,"items")),ve.schema),je=hi(W,"Drill",_,C,void 0,void 0).map(Fe=>({key:Fe.key,label:yu(Fe,_,C),render:we=>gl(Fe.key,Fe.kind,Fe.propSchema,F(we.row,Fe.key),void 0,_,S,Se,C),sortable:!1,width:Fe.width}));return mn.length===0?y("span",{children:"(empty)",className:Mc}):y("div",{children:y(Sh,{columns:je,data:mn,keyFn:Fe=>Fe.key,onRowClick:Fe=>Y(V.concat([Fe.key])),density:"Comfortable"}),className:OD})}return y("div",{children:Gm(ve.data,void 0,void 0),className:Vm})},Qr=D(Lt,D(l,f)),li=ve=>o!==void 0&&i!==void 0&&l!==void 0?La(o,i,l,V.slice(0,ve)):"#",Sn=J!==void 0?J.map((ve,Ye)=>{let At=Ye===(J.length-1|0);return{label:Ye===0?Qr:ve.label,href:At?void 0:li(Ye)}}):[{label:Qr,href:void 0}],lo=ve=>{let Ye=ve.target,At=Ye.tagName,yt=ve.metaKey||ve.ctrlKey||ve.shiftKey||ve.altKey||ve.button!==0;if(At!=="A"||yt)return;if(ve.preventDefault(),j){let xe=Ye.pathname,je=Ye.search;return A(xe+je)}let mn=Ye.parentNode.querySelectorAll("a").findIndex(xe=>xe===Ye),W=mn<0?0:mn;Y(V.slice(0,W))},wr;if(J!==void 0){let ve=J[J.length-1|0];wr=ve!==void 0?Ar(ve):null}else wr=y(Ra,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>Y([])});let Qe=V.length===0,st=Qe?uz(m.filter(ve=>ve.level==="Instance"),X,u):[],Nt;if(Qe&&u!==void 0){let ve=ao(h,u),Ye=cb(u,m,k(k(n,yt=>k(i,pn=>vn(yt,pn))),yt=>yt.transitions));if(ve.map((yt,pn)=>ve.slice(0,pn).some(Xn=>ke(Ye(yt,Xn)))).some(yt=>yt))Nt=void 0;else{let yt=Zwe(h,u,D(ma(X,u),""));Nt=yt.length!==0?y(jz,{steps:yt}):void 0}}else Nt=void 0;let Ct=Qe?D(k(aw(h,k(k(n,ve=>k(i,Ye=>vn(ve,Ye))),ve=>ve.retiredLabel)),ve=>kh(ve,F(X,ve.field))),null):null;return L("div",{children:[Qe?L("div",{children:[L("div",{children:[y("h2",{children:Qr,className:iNe}),Ct],className:nNe}),t!==void 0&&l!==void 0?t(l):null],className:rNe}):y("div",{children:y(Z$e,{crumbs:Sn}),className:tNe,onClick:lo}),D(Nt,null),st.length!==0?y("div",{children:st.map(ve=>y("button",{children:ve.label,className:aNe,onClick:Ye=>I(At=>ve)},ve.name)),className:oNe}):null,Qe?y(TO.make,{fill:be,children:wr}):wr,Qe&&r!==void 0&&l!==void 0?r(l):null,ne(N[0],null,ve=>y(rk,{isOpen:!0,onClose:()=>I(Ye=>{}),title:ve.label,children:y(Nk,{schema:ve.schema,aggregateId:l,aggregateIdField:ve.aggregateIdField,ownerField:ve.ownerField,ownerValue:ve.ownerValue,refFields:ve.refFields,onSubmit:Ye=>b!==void 0?Ft(b(ve.mutationDocument,fb(ve.schema,Ye)).then(At=>{if(typeof At!="object")return At==="Accepted"?(I(yt=>{}),re(E,yt=>yt()),Promise.resolve("Ok")):(I(yt=>{}),re(E,yt=>{setTimeout(yt,500)}),Promise.resolve("Ok"));{if(At.TAG==="Rejected"){let pn=At._0;return Jp(v,_,pn.errorCode,pn.detail).then(Xn=>Promise.resolve({TAG:"Err",_0:Xn}))}let yt=At._0;return console.error("[AutoUI] "+ve.name+": command not executed — "+yt),Promise.resolve({TAG:"Err",_0:yt})}}),At=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(I(At=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},ve.name+":"+D(l,""))}))],className:eNe})}let qD=bNe;function Fa(e){return"var("+e+")"}let _Ne=w([z("flex"),_e("column"),c("gap",Fa(O.md))]),yNe=w([z("flex"),ee("center"),Je("spaceBetween"),c("padding-bottom",Fa(O.sm)),c("border-bottom","1px solid var("+x.border+")")]),xNe=w([c("font-size",Fa($.sizeLg)),c("font-weight",Fa($.weightMedium)),c("color",Fa(x.textPrimary)),hn(Ae(0))]),SNe=w([z("flex"),ai("wrap"),c("gap",Fa(O.sm))]),wNe=w([c("background",Fa(x.surface)),c("color",Fa(x.textPrimary)),c("border","1px solid var("+x.border+")"),c("border-radius",Fa(Z.md)),c("padding","var("+O.xs+") var("+O.md+")"),c("font-size",Fa($.sizeSm)),c("cursor","pointer")]);function ENe(e){let t=e.contextId,r=e.slice,n=si(),i=Wp(),o=ua(),a=de(()=>{}),s=a[1];return L("div",{children:[y("div",{children:y("h2",{children:r.name,className:xNe}),className:yNe}),y("div",{children:r.commands.map(l=>y("button",{children:l.label,className:wNe,onClick:u=>s(d=>l)},l.name)),className:SNe}),ne(a[0],null,l=>y(rk,{isOpen:!0,onClose:()=>s(u=>{}),title:l.label,children:y(Nk,{schema:l.schema,aggregateId:t,aggregateIdField:l.aggregateIdField,injectNewId:l.level==="Collection",ownerField:l.ownerField,ownerValue:l.ownerValue,refFields:l.refFields,onSubmit:u=>i!==void 0?Ft(i(l.mutationDocument,fb(l.schema,u)).then(d=>{if(typeof d=="object"){if(d.TAG==="Rejected"){let h=d._0;return Jp(n,o,h.errorCode,h.detail).then(p=>Promise.resolve({TAG:"Err",_0:p}))}let f=d._0;return console.error("[AutoUI] "+l.name+": command not executed — "+f),Promise.resolve({TAG:"Err",_0:f})}return s(f=>{}),Promise.resolve("Ok")}),d=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(s(d=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},l.name+":"+D(t,""))}))],className:_Ne})}let kNe=ENe;function CNe(e){let t=e.uiHints,r=e.hostViewName,n=e.entityId,i=e.binding,o=ua(),a=hp(),s=Ns(),l=Ms(),u=ne(e.requiredAccess,!1,te=>!l(te)),d=kk(i.readModel,q_e(i,n),n,!u,void 0,25),f=d.rows.map(te=>D(G(te),{})),h=j_e(i.readModel.schema,i.refField),p=ZJ(o,i.readModel.name),m=q(p,te=>({pluginId:te.pluginId,viewName:i.readModel.name})),g=B_e(r,i),v=xn(h,k(t,te=>ja(te,g)),{field:i.readModel.labelField,source:i.readModel.labelFieldSource}),b=hi(h,"List",o,m,v.labelField,v.projectedLabelField),_=k(t,te=>vn(te,g)),S=DE(i.readModel.schema,_),E=$E(e.pluginId,r,i.readModel.name),C=de(()=>Yv(E)),A=C[1],T=te=>{TE(E,te),A(ue=>te)},R=FE(C[0],_,ow(i.readModel.schema),S),N=tf(f,b,o,m,void 0),j={lookupLabel:(te,ue)=>ef(N,te,o,ue),isMissing:(te,ue)=>Lp(N,te,o,ue),retiredBadge:(te,ue)=>Op(N,te,o,ue),linkable:(te,ue)=>Mp(N,te,o,ue,!1)},V=b8(b,o,a,F,void 0,j,m,void 0,void 0,void 0),Y=te=>k(F(te,"id"),ie),J=te=>D(Y(te),JSON.stringify(te)),X=te=>re(p,ue=>s(La(ue.pluginId,ue.name,te,[]))),oe=q(p,te=>(ue=>re(Y(ue),X))),ge=te=>{let ue=i.readModel.name,Se=d.rows,pe=k(_,Ar=>Ar.accent),be=wh(d.canLoadMore),Lt={readModelName:ue,rows:Se,schema:h,semantics:v,accent:pe,window:be,onOpenRow:(Ar,Qr)=>{let li=k(G(Qr),Y);return X(li!==void 0?li:Ar)},ownEntity:m,refLabels:j};return te.render([Lt])};if(u)return null;let H=d.fetchState,ae;if(typeof H!="object")if(H==="Loading")ae=y(ld,{});else{let te,ue=0;R!==void 0&&R.id!==ia?te=ge(R):ue=1,ue===1&&(te=y(Sh,{columns:V,data:f,keyFn:J,onRowClick:oe})),ae=L(cr,{children:[te,d.canLoadMore?y("button",{children:"Load more",onClick:Se=>d.loadMore()}):null]})}else ae=H.TAG==="Error"?y(Ra,{title:"Could not load related rows",detail:H._0,onRetry:d.refetch}):y(Ra,{title:"Not available",detail:H._0});return L("section",{children:[L("div",{children:[y("h3",{children:ct(i.readModel.name)}),S.length>1?y(ms.make,{modes:S,activeId:ne(R,ia,te=>te.id),onSelect:T}):null],style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"}}),ae]})}let RNe=CNe,Ik={contents:void 0};function zGe(e){Ik.contents=e}function ANe(){return ke(Ik.contents)}function TNe(e,t){return q(Ik.contents,r=>r(e,t))}function X0(e){return e.filter(t=>t.level==="Instance")}function $Ne(e,t,r,n){let i=n!==void 0?n:[];return t!==void 0&&ao(e,t).length!==0?X0(r.concat(i)).some(o=>{let a=o.allowedStates;return a!==void 0?a.length!==0:!1}):!1}function NNe(e,t,r,n,i){let o=n!==void 0?n:[],a=X0(r),s=X0(o),l=ao(e,t),u=b9(e,t,r,i),d=gCe(e,t,o),f=(v,b,_)=>({commandName:_.name,label:_.label,toState:v!==void 0?vCe(b?d:u,v,_.name):_.targetState,system:b}),h=(v,b,_)=>Q(_,S=>{let E=S.allowedStates;if(E!==void 0&&E.includes(v))return f(v,b,S)}),p=l.map(v=>{let b=h(v,!1,a).concat(h(v,!0,s));return{value:v,label:ct(v),terminal:b.length===0,outgoing:b}}),m=(v,b)=>b.filter(_=>vr(_.allowedStates)).map(_=>f(void 0,v,_)),g=m(!1,a).concat(m(!0,s));return{lifecycleField:t,states:p,anyState:g}}function DNe(e){return Q(X0(e),t=>t.targetState)}function FNe(e,t){let r=t!==void 0?t:[],n=e.states.flatMap(s=>Q(s.outgoing,l=>q(l.toState,u=>({fromState:s.value,toState:u,command:l.label,selfLoop:u===s.value,system:l.system})))),i=Q(n,s=>{if(!s.selfLoop)return s.toState}).concat(DNe(r)),o=q(e.states[0],s=>s.value);return{nodes:e.states.map(s=>({value:s.value,label:s.label,terminal:s.terminal,unreachable:!i.includes(s.value)&&Ma(s.value,o),unresolved:s.outgoing.filter(l=>vr(l.toState)).map(l=>l.label)})),edges:n,anyState:e.anyState.map(s=>({label:s.label,system:s.system,toState:s.toState}))}}function Br(e){return"var("+e+")"}let INe=w([z("flex"),_e("column"),c("gap",Br(O.md))]),PNe=w([c("font-size",Br($.sizeLg)),c("font-weight",Br($.weightMedium)),c("color",Br(x.textPrimary)),hn(Ae(0))]),ONe=w([c("font-size",Br($.sizeXs)),c("color",Br(x.textDisabled))]),MNe=w([z("flex"),c("flex-wrap","wrap"),ee("flexStart"),c("gap",Br(O.md))]);function LNe(e){return w([z("flex"),_e("column"),c("gap",Br(O.sm)),c("flex","0 1 240px"),c("padding",Br(O.md)),c("background",Br(x.surface)),c("border","1px solid var("+x.border+")"),c("border-left","3px solid "+e.border),c("border-radius",Br(Z.md))])}let zNe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",Br(O.sm))]),UNe=w([c("font-size",Br($.sizeXs)),c("color",Br(x.textDisabled)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),BNe=w([z("flex"),_e("column"),c("gap","6px")]),jNe=w([z("flex"),ee("center"),c("flex-wrap","wrap"),c("gap","4px")]),qNe=w([c("color",Br(x.textSecondary)),c("font-size",Br($.sizeSm))]),VNe=w([c("font-size",Br($.sizeXs)),c("color",Br(x.textDisabled))]),GNe=w([z("flex"),_e("column"),c("gap",Br(O.sm)),c("padding-top",Br(O.sm))]),KNe=w([c("font-size",Br($.sizeXs)),c("font-weight",Br($.weightMedium)),c("color",Br(x.textSecondary)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),HNe=w([z("flex"),c("flex-wrap","wrap"),c("gap","6px")]);function VD(e,t){let r=t.toState;return L("div",{children:[t.system?y($Se.make,{label:t.label}):y(ASe.make,{label:t.label}),r!==void 0?L(cr,{children:[y("span",{children:"→",className:qNe}),y(gk.make,{swatch:mk(e,r),label:ct(r),dot:!1})]}):null],className:jNe},t.commandName)}function WNe(e){let t=e.display,r=e.title,n=e.systemCommands,i=e.lifecycleField,o=n!==void 0?n:[],a=t!==void 0?t:"Lane",s=NNe(e.schema,i,e.commands,o,e.transitions),l=s.states.map(d=>d.value),u;return u=a==="Lane"?void 0:TNe(FNe(s,o),D(r,ct(i))),L("div",{children:[r!==void 0?y("h3",{children:r,className:PNe}):null,y("div",{children:"Lifecycle on “"+ct(i)+"”",className:ONe}),u!==void 0?u:L(cr,{children:[y("div",{children:s.states.map(d=>{let f=mk(l,d.value);return L("div",{children:[L("div",{children:[y(gk.make,{swatch:f,label:d.label}),d.terminal?y("span",{children:"end",className:UNe}):null],className:zNe}),d.terminal?y("span",{children:"No commands available",className:VNe}):y("div",{children:d.outgoing.map(h=>VD(l,h)),className:BNe})],className:LNe(f)},d.value)}),className:MNe}),s.anyState.length!==0?L("div",{children:[y("span",{children:"Any state",className:KNe}),y("div",{children:s.anyState.map(d=>VD(l,d)),className:HNe})],className:GNe}):null]})],className:INe})}let JNe=WNe;function gs(e){return"var("+e+")"}let QNe=w([z("flex"),_e("column"),c("gap",gs(O.xl))]),YNe=w([c("font-size",gs($.sizeXl)),c("font-weight",gs($.weightMedium)),c("color",gs(x.textPrimary)),hn(Ae(0))]),XNe=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",gs(O.md))]),ZNe=w([z("flex"),_e("column"),c("gap",gs(O.md)),c("padding",gs(O.lg)),c("background",gs(x.surfaceSubtle)),c("border","1px solid var("+x.borderSubtle+")"),c("border-radius",gs(Z.md))]);function X9(e){return e.filter(t=>$Ne(t.schema,t.lifecycleField,t.commands,D(t.systemCommands,[])))}let GD="lifecycle",KD="diagram";function e3e(e){let t=e.uiHints,r=P9(),n=X9(e.views),i=Re(r.get(GD),KD)?"Diagram":"Lane",o=(s,l,u)=>y("button",{children:s,"aria-pressed":u?"true":"false",className:u?ms.Style.btnActive:ms.Style.btn,onClick:d=>r.set(GD,l)},l),a=ANe()?L("div",{children:[o("Lane","",i==="Lane"),o("Diagram",KD,i==="Diagram")],"aria-label":"Lifecycle rendering",className:ms.Style.group,role:"group"}):null;return L("div",{children:[L("div",{children:[y("h2",{children:"Lifecycles",className:YNe}),a],className:XNe}),n.length!==0?n.map(s=>y("div",{children:y(JNe,{schema:s.schema,lifecycleField:D(s.lifecycleField,""),commands:s.commands,systemCommands:D(s.systemCommands,[]),title:s.name,transitions:k(k(t,l=>vn(l,s.name)),l=>l.transitions),display:i}),className:ZNe},s.name)):y(Pd,{title:"No lifecycles",description:"No view in this plugin declares a lifecycle enum with state-scoped commands."})],className:QNe})}let t3e=e3e;function wt(e){return"var("+e+")"}let r3e=w([z("flex"),_e("column"),c("gap",wt(O.md)),c("font-family",wt($.fontFamily))]),n3e=w([z("flex"),ee("center"),c("gap",wt(O.sm)),c("color",wt(x.textSecondary)),c("font-size",wt($.sizeSm)),c("font-weight",wt($.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),i3e=w([z("inlineFlex"),ee("center"),c("padding","0 6px"),c("border-radius",wt(Z.full)),c("background",wt(x.surfaceElevated)),c("color",wt(x.textPrimary)),c("font-size",wt($.sizeXs)),c("letter-spacing","0")]),o3e=w([z("flex"),_e("column"),c("gap",wt(O.md))]),a3e=w([z("flex"),ee("flexStart"),c("gap",wt(O.sm))]),s3e=w([z("flex"),_e("column"),c("gap","2px"),c("min-width","0"),Yn(1)]),l3e=w([z("flex"),ee("baseline"),c("gap",wt(O.sm))]),u3e=w([c("color",wt(x.textPrimary)),c("font-size",wt($.sizeSm)),c("font-weight",wt($.weightMedium))]),c3e=w([c("color",wt(x.textDisabled)),c("font-size",wt($.sizeXs))]),d3e=w([c("color",wt(x.textPrimary)),c("font-size",wt($.sizeSm)),c("line-height",wt($.lineHeightNormal)),c("white-space","pre-wrap"),c("word-break","break-word")]),f3e=w([c("color",wt(x.textDisabled)),c("font-size",wt($.sizeSm)),c("padding","var("+O.sm+") 0")]),h3e=w([z("flex"),_e("column"),ee("flexEnd"),c("gap",wt(O.sm))]),p3e=w([c("width","100%"),c("min-height","64px"),c("padding",wt(O.sm)),c("background",wt(x.surface)),c("border","1px solid var("+x.border+")"),c("border-radius",wt(Z.md)),c("color",wt(x.textPrimary)),c("font-family",wt($.fontFamily)),c("font-size",wt($.sizeSm)),c("resize","vertical")]),m3e=w([c("background",wt(x.brand)),c("border","none"),c("border-radius",wt(Z.md)),c("color",wt(x.textOnBrand)),c("padding","4px var("+O.md+")"),c("font-size",wt($.sizeSm)),c("font-weight",wt($.weightMedium)),Ce("pointer"),hO([c("opacity","0.5"),Ce("default")])]),g3e=w([c("color",wt(x.error)),c("font-size",wt($.sizeXs)),c("align-self","flex-start")]);function v3e(e){let t=e.comment,r=t.timestamp;return L("div",{children:[y(Od,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[y("span",{children:D(t.author,"Unknown"),className:u3e}),r!==void 0?y("span",{children:lb(e.nowMs,r),className:c3e}):null],className:l3e}),y("span",{children:t.body,className:d3e})],className:s3e})],className:a3e})}function b3e(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,a=e.title,s=e.comments,l=a!==void 0?a:"Comments",u=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=de(()=>""),p=h[1],m=h[0],g=m.trim(),v=g!==""&&!d,b=()=>{if(v)return re(i,_=>_(g)),p(_=>"")};return L("div",{children:[L("div",{children:[l,y("span",{children:s.length.toString(),className:i3e})],className:n3e}),s.length===0?y("div",{children:u,className:f3e}):y("div",{children:s.map(_=>y(v3e,{comment:_,nowMs:f},_.id)),className:o3e}),i!==void 0?L("div",{children:[y("textarea",{className:p3e,disabled:d,placeholder:"Write a comment…",value:m,onKeyDown:_=>{if(_.key==="Enter"&&(_.metaKey||_.ctrlKey))return _.preventDefault(),b()},onChange:_=>{let S=_.target.value;p(E=>S)}}),r!==void 0?y("span",{children:r,className:g3e}):null,y("button",{children:d?"Posting…":"Comment",className:m3e,disabled:!v,onClick:_=>b()})],className:h3e}):null],className:r3e})}let _3e=b3e;function y3e(e){let t=e.entityId,r=e.binding,n=si(),i=Wp(),o=ua(),a=Ms(),s=ne(e.requiredAccess,!1,b=>!a(b)),l=Ku(r.readModel,!s),u=de(()=>!1),d=u[1],f=de(()=>{}),h=f[1],p=b=>{let _=r.postCommand;if(i!==void 0&&_!==void 0){d(S=>!0),h(S=>{}),Ft(i(_.mutationDocument,P_e(r,t,b)).then(S=>{if(d(E=>!1),typeof S!="object")return l.refetch(),Promise.resolve();{if(S.TAG==="Rejected"){let C=S._0;return Jp(n,o,C.errorCode,C.detail).then(A=>(h(T=>A),Promise.resolve()))}let E=S._0;return console.error("[AutoUI] comment not posted — "+E),h(C=>E),Promise.resolve()}}),S=>(d(E=>!1),h(E=>"Could not post the comment."),Promise.resolve()));return}};if(s)return null;let m=I_e(r,l.rows,t),g=r.postCommand;return y(_3e,{comments:m,onPost:n!==void 0&&g!==void 0?p:void 0,posting:u[0],error:f[0]})}let x3e=y3e;function ni(e){return"var("+e+")"}let S3e=w([z("flex"),_e("column"),c("gap",ni(O.lg))]),w3e=w([z("flex"),ee("center"),Je("spaceBetween"),c("gap",ni(O.md))]),E3e=w([c("font-size",ni($.sizeXl)),c("font-weight",ni($.weightMedium)),c("color",ni(x.textPrimary)),hn(Ae(0))]),k3e=w([z("flex"),ai("wrap"),ee("center"),c("gap",ni(O.md)),c("font-size",ni($.sizeSm)),c("color",ni(x.textSecondary))]),C3e=w([z("inlineFlex"),ee("center"),c("gap","4px"),Ce("pointer")]);function R3e(e){return w([z("inlineBlock"),c("width","8px"),c("height","8px"),c("border-radius","50%"),c("background",e)])}let HD=w([c("font-size",ni($.sizeXs)),c("color",ni(x.textDisabled))]),A3e=w([z("flex"),ee("center"),c("gap",ni(O.sm))]),T3e=w([c("background","none"),c("border","1px solid var("+x.border+")"),c("border-radius",ni(Z.sm)),c("padding","2px var("+O.sm+")"),c("color",ni(x.textSecondary)),c("font-size",ni($.sizeSm)),Ce("pointer"),qe([c("background",ni(x.surfaceSubtle)),c("color",ni(x.textPrimary))])]);function $3e(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,a=t!==void 0?t:{},s=Ns(),l=Ms(),u=si(),d=Pp(),f=ua(),h=yk(),p=de(()=>[]),m=p[1],g=p[0],v=H=>xn(H.schema,k(r,ae=>ja(ae,H.name)),{field:H.labelField,source:H.labelFieldSource}),b=Ku(i,!0),_=i.name,S=b.rows,E=i.schema,C=v(i),A=wh(b.canLoadMore),T=(H,ae)=>s(La(o,i.name,H,[])),R=Vu,N={pluginId:o,viewName:i.name},I={readModelName:_,rows:S,schema:E,semantics:C,window:A,onOpenRow:T,role:R,ownEntity:N},M=n.map((H,ae)=>{let te=B0(a,H.readModel.name,l),ue=te&&!g.includes(H.readModel.name),Se=Ku(H.readModel,ue);return[H,ae,ue,te,Se]}),P=(H,ae)=>D(k(k(r,te=>vn(te,H.name)),te=>te.accent),Td[No(ae,Td.length)]),U=Q(M,H=>{let ae=H[4],te=H[0],ue=x9(te.readModel.commands,te.resourceRef),Se=xk(u,d,te.readModel.commands,te.readModel.name,ae.isLive,ae.refetch,f,h.onNotice,void 0);if(H[2])return{readModelName:te.readModel.name,rows:ae.rows,schema:te.readModel.schema,semantics:v(te.readModel),accent:P(te.readModel,H[1]),window:wh(ae.canLoadMore),onOpenRow:(pe,be)=>s(La(o,te.readModel.name,pe,[])),onCommand:q(ue,pe=>Se),role:Gu,resourceRef:te.resourceRef,assignCommand:ue,ownEntity:{pluginId:o,viewName:te.readModel.name}}}),j=[I].concat(U),V=(b.canLoadMore?[i.name]:[]).concat(Q(M,H=>{if(H[2]&&H[4].canLoadMore)return H[0].readModel.name})),Y=()=>{b.canLoadMore&&b.loadMore(),M.forEach(H=>{let ae=H[4];if(H[2]&&ae.canLoadMore)return ae.loadMore()})},J=b.fetchState,X,oe=0;typeof J!="object"?X=J==="Loading"?[i.name+": loading…"]:[]:oe=1,oe===1&&(X=[i.name+": "+J._0]);let ge=X.concat(Q(M,H=>{let ae=H[0],te=H[4].fetchState;if(H[2])return typeof te!="object"?te==="Loading"?ae.readModel.name+": loading…":void 0:(te.TAG,ae.readModel.name+": "+te._0)}).concat(X2(a,n.map(H=>H.readModel.name),l)));return L("div",{children:[y("div",{children:y("h2",{children:e.canvasName,className:E3e}),className:w3e}),y("div",{children:M.filter(H=>H[3]).map(H=>{let ae=H[0];return L("label",{children:[y("input",{checked:H[2],type:"checkbox",onChange:te=>{let ue=ae.readModel.name;m(Se=>Se.includes(ue)?Se.filter(pe=>pe!==ue):Se.concat([ue]))}}),y("span",{className:R3e(P(ae.readModel,H[1]))}),ae.readModel.name],className:C3e},ae.readModel.name)}),className:k3e}),h.element,e.mode.render(j),V.length!==0?L("div",{children:[y("button",{children:"Load more",className:T3e,onClick:H=>Y()}),y("span",{children:"More rows available: "+V.join(", "),className:HD})],className:A3e}):null,ge.length!==0?y("span",{children:ge.join(" · "),className:HD}):null],className:S3e})}let N3e=$3e;function D3e(e){return e}function WD(e){return e.map(t=>({name:t.name,schema:t.schema,commands:t.commands,declaredLabelField:t.labelField,declaredLabelSource:t.labelFieldSource}))}function Pk(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(b9(e.schema,t,e.commands,k(r,n=>n.transitions))):[]}function e7(e){return q(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function t7(e,t){return ne(gi(e.declaredLabelSource,r=>Re(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 ne(F(e.semantics,r),r,n=>r+" ("+Pk(n.provenance)+")")}function n7(e,t){if(t.TAG==="Paired")return t.latField+"/"+t.lngField;let r=t._0;return ne(F(e.semantics,r),r,n=>r+" ("+Pk(n.provenance)+")")}function F3e(e,t,r){let n=e.name,i=e.schema,o=xn(i,t,e7(e)),a=$e(o.semantics).map(d=>{let f=d[1];return Oe([["field",d[0]],["semantic",Md(f.semantic)],["provenance",Pk(f.provenance)]])}),s=[];re(o.geo,d=>{s.push(["geo",n7(o,d)])}),re(o.dateSpan,d=>{s.push(["dateSpan",r7(o,d)])}),re(o.statusField,d=>{s.push(["status",d])}),re(o.labelField,d=>{s.push(["label",t7(e,d)])}),re(o.imageField,d=>{s.push(["image",d])}),re(o.parentField,d=>{s.push(["parent",d])});let l=RE(i).map(d=>d.id),u=Z9(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+fCe(f.tier)+")"]});return Oe([["view",n],["capableModes",l],["roles",Oe(s)],["transitions",Oe(u)],["fields",a]])}function i7(e,t,r,n){return Oe([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(D3e)],["views",t.map(o=>F3e(o,k(r,a=>ja(a,o.name)),k(r,a=>vn(a,o.name))))]])}function I3e(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=xn(i,k(t,m=>ja(m,n)),e7(r)),a=RE(i).map(m=>m.id).join(", "),s=[];re(o.geo,m=>{s.push("geo="+n7(o,m))}),re(o.dateSpan,m=>{s.push("dateSpan="+r7(o,m))}),re(o.statusField,m=>{s.push("status="+m)}),re(o.labelField,m=>{s.push("label="+t7(r,m))}),re(o.imageField,m=>{s.push("image="+m)}),re(o.parentField,m=>{s.push("parent="+m)});let l=s.length===0?"":"; "+s.join("; "),u=Object.keys(o.semantics).length,d=Z9(r,o.statusField,k(t,m=>vn(m,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"";return n+": modes "+a+l+p+"; "+u.toString()+" field semantic(s)"})}function P3e(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),I3e(t,r).forEach(o=>{console.log(" "+o)}),console.log(JSON.stringify(i7(e,t,r,i),null,2))}function Ay(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function O3e(e,t,r){return"/"+Ay(e)+"/"+Ay(t)+"/"+Ay(r)}function M3e(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function L3e(e){let t=he.object(e);if(t===void 0)return;let r=o=>k(t[o],he.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:D(k(t.sentAt,he.float),0),body:D(t.body,null)}}function z3e(e,t,r,n,i){let o=n!==void 0?n:!0,a=Bp(),s=k(a,h=>h.clientNamespace()),l=o&&ke(s)&&ne(a,!1,h=>h.clientChannelsAvailable()),u=s!==void 0?O3e(s,e,t):void 0,d=Pe(i);return d.current=i,De(()=>{let h=l?a:void 0;if(h!==void 0&&u!==void 0)return h.subscribe("Domain",u,p=>{let m=L3e(p);if(m!==void 0&&m.senderId!==r)return d.current(m)})},[l,D(u,""),r]),{available:l,publish:(h,p)=>{let m=l?a:void 0;if(m===void 0||u===void 0)return;let g=Date.now(),v={kind:h,senderId:r,sentAt:g,body:p};m.publish("Domain",u,[M3e(v)]).then(b=>{b.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+u+" failed: "+b._0)})}}}let yS="heartbeat",xS="hello",o7="leave";function JD(e){let t=he.object(e);if(t===void 0)return;let r=i=>k(t[i],he.string),n=r("userId");if(n!==void 0&&n!=="")return[n,D(r("username"),n)]}function U3e(e,t,r){let n=t.kind;if(n===o7){let s=JD(t.body);if(s===void 0)return e;let l=s[0];return e.filter(u=>u.userId!==l)}if(n!==yS&&n!==xS)return e;let i=JD(t.body);if(i===void 0)return e;let o=i[0];return e.filter(s=>s.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function B3e(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function j3e(e,t){return Object.fromEntries([["userId",e],["username",t]])}function q3e(e,t,r,n,i){let o="presence",a=i!==void 0?i:!0,s=de(()=>[]),l=s[1],u=Pe(void 0),f=z3e(o,t,r,a&&r!=="",m=>{if(l(v=>U3e(v,m,Date.now())),m.kind!==xS)return;let g=u.current;if(g!==void 0){setTimeout(()=>g(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return De(()=>{if(!h)return;let m=j3e(r,n),g=()=>p(yS,m);u.current=g,p(xS,m),p(yS,m);let v=setInterval(g,1e4);return()=>{clearInterval(v),u.current=void 0,p(o7,m)}},[h,r,n,t]),De(()=>{if(!h)return;let m=setInterval(()=>l(g=>B3e(g,Date.now())),1e4);return()=>{clearInterval(m)}},[h]),h?s[0]:[]}function Vg(e){return"var("+e+")"}let V3e=w([z("inlineFlex"),ee("center"),c("gap",Vg(O.xs))]),G3e=w([c("font-family",Vg($.fontFamily)),c("font-size",Vg($.sizeSm)),c("color",Vg(x.textSecondary)),c("white-space","nowrap")]);function K3e(e){return e===1?"1 other here":e.toString()+" others here"}function H3e(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",a=r!==void 0?r:4,s=t!==void 0?t:!0;if(i.length===0)return null;let l=i.map(u=>({name:u.username,imageUrl:u.imageUrl}));return L("span",{children:[y(RO,{members:l,size:o,max:a}),s?y("span",{children:K3e(i.length),className:G3e}):null],className:V3e,title:i.map(u=>u.username).join(", ")})}let W3e=H3e;function J3e(e){let t=pa(),r=k(t,s=>s.identity),n=ne(r,"",s=>s.userId),i=ne(r,"",s=>s.username),a=q3e(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(s=>({userId:s.userId,username:s.username}));return y(W3e,{people:a})}let Q3e=J3e;function a7(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}let SS={contents:[]},wS={contents:[]};function s7(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!SS.contents.some(i=>i===n)){SS.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 l7(e,t,r,n){if(r==="id"||n.length!==0&&n.some(o=>o===r))return;let i=e+"."+t;if(!wS.contents.some(o=>o===i)){wS.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 u7(e){let t=[];return e.forEach(r=>{let n=(o,a,s,l,u)=>{s7(r.id,o,s),l7(r.id,o,s,l);let d=aw(u,void 0),f=d!==void 0&&d.namedWhenRetired?d:void 0;t.push({pluginId:r.id,name:o,queryField:a,singleQueryField:xo(a),labelField:s,namedRetirement:f})};r.readModels.forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields,o.schema)),r.stateViewSlices.concat(D(r.internalQueryables,[])).forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields,o.schema))}),t}function Gg(e,t){let r=e.toLowerCase(),n=o=>{let a=o.length,s=e.length;if(s>a&&r.endsWith(o))return e.slice(0,s-a|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function Ok(e){return[xo(e),mp(e)]}function $d(e,t){return e.find(r=>r.name===t)}function Mk(e,t){let r=a7(t),n=mp(r),i=$d(e,n);return i!==void 0?i:$d(e,r)}function Lk(e){return Q(D(k(k(G(e),t=>F(t,"required")),_t),[]),ie)}function c7(e,t,r,n){return Q(e.references,i=>{let o=i.fieldName.includes("[]"),a=C9(i.fieldName),s;if(a!==void 0){let g=a[1],v=k(k(F(n,a[0]),G),R9),b=k(k(k(k(v,G),_=>F(_,"properties")),G),_=>F(_,g));s=b!==void 0?[b,!0,D(q(v,Lk),[]).some(_=>_===g)]:[void 0,!1,!1]}else s=o?[void 0,!1,!1]:[F(n,i.fieldName),!0,r.some(g=>g===i.fieldName)];let l=k(s[0],G),u=k(k(l,g=>F(g,"type")),ie),d=Re(u,"array"),f=i.plugin,h=f!==void 0?t.filter(g=>g.pluginId===f):t,p=$d(h,i.entity),m=p!==void 0?p:Mk(h,i.entity);if(s[1]){if(m!==void 0){let g=Ok(m.name);return{propertyKey:i.fieldName,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:d,required:s[2],entityName:g[0],entityNamePlural:g[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.');return}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+": explicit @ref path does not name a property of a record array on this command. Falling back to text input.")})}function d7(e,t,r,n,i,o){let a=[];return i!==void 0&&$e(i).forEach(s=>{let l=s[0],u=G(s[1]);if(ke(k(u,S=>F(S,"const"))))return;let f=k(k(u,S=>F(S,"type")),ie),h=k(k(k(k(u,S=>F(S,"items")),G),S=>F(S,"type")),ie),p;if(f!==void 0)switch(f){case"array":p=h==="string"?!0:void 0;break;case"string":p=!1;break;default:p=void 0}else p=void 0;if(p===void 0)return;let m=!1;if(e.level==="Collection"&&!p){let S;if(t!==void 0)if(Re(e.aggregateIdField,l))S=!0;else{let E=Gg(l,!1);S=E!==void 0?E.toLowerCase()===t.name.toLowerCase():!1}else S=Re(e.aggregateIdField,l);m=S}if(m)return;let g=e.aggregateIdField,v;if(g!==void 0&&t!==void 0&&g===l&&!p){let S=$d(r,mp(t.name));v=S!==void 0?S:$d(r,t.name)}else v=void 0;let b;if(v!==void 0)b=v;else{let S=Gg(l,p);b=S!==void 0?Mk(r,S):void 0}if(b!==void 0){b.pluginId!==o&&console.warn("[AutoUI] Command "+e.name+" field "+l+' resolved cross-plugin to "'+b.name+'" in plugin "'+b.pluginId+'" via naming heuristic. Add @ref("'+b.pluginId+"."+b.name+'") to make the cross-plugin reference explicit, or @ref("<LocalEntity>") to target a same-plugin entity.');let S=Ok(b.name),E=b.queryField,C=b.singleQueryField,A=b.labelField,T=n.some(M=>M===l),R=S[0],N=S[1],I={propertyKey:l,queryField:E,singleQueryField:C,labelField:A,multi:p,required:T,entityName:R,entityNamePlural:N};a.push(I);return}if(Gg(l,p)!==void 0){console.warn("[AutoUI] Command "+e.name+" field "+l+" looks like a reference but no matching entity was registered. Falling back to text input.");return}}),a}function zk(e,t,r,n){let i=Lk(e.schema),o=k(k(G(e.schema),s=>F(s,"properties")),G);if(e.references.length===0)return d7(e,t,r,i,o,n);let a=D(o,{});return c7(e,r,i,a)}function f7(e,t){let r=(i,o)=>{let a={...i};return a.refFields=zk(i,o,t,e.id),a},n={...e};return n.stateChangeSlices=e.stateChangeSlices.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n.aggregates=e.aggregates.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,i)),o}),n.readModels=e.readModels.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n}let Y3e={capitalize:a7,singularize:xo,warnedIdLabel:SS,warnedUnsearchable:wS,warnIfIdLabel:s7,warnIfUnsearchable:l7,buildRegistry:u7,stemFromKey:Gg,entityDisplayNames:Ok,findByName:$d,findByStem:Mk,requiredSet:Lk,resolveExplicitRefs:c7,resolveByHeuristic:d7,resolveForCommand:zk,enrichPlugin:f7};function hb(e){let t=he.object(e);if(t===void 0||ke(Ul(e)))return;let r=k(t.properties,he.object);if(r!==void 0)return r;let n=k(k(k(t.items,he.object),i=>i.properties),he.object);return n!==void 0?n:tt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:k(k(t[o],he.array),a=>tt(a,void 0,(s,l)=>s!==void 0?s:hb(l))))}function Uk(e,t){let r=Q(Object.entries(e),n=>{if(!uJ(n[1]))return n[0]});return t&&!r.includes("id")?["id"].concat(r):r}let QD=new Map;function X3e(e){if(vr(QD.get(e))){QD.set(e,!0),console.error('AutoUI: the union field "'+e+'" carries no '+KP+" name, so its member types cannot be named. It will be selected as `"+e+" { __typename }` — the arm is readable, its fields are not. The platform emitting this schema is behind the union contract.");return}}function h7(e,t,r){let n=Q(t.arms,i=>{let o=HP(t,i);if(o===void 0)return;let a=r(i);if(a!=="")return"... on "+o+" { "+a+" }"});return vr(t.name)&&X3e(e),n.length!==0?e+" { __typename "+n.join(" ")+" }":e+" { __typename }"}function ES(e,t,r){let n=t!==void 0?t:3;return Uk(e,r!==void 0?r:!0).map(a=>{let s=k(e[a],Ul);if(s!==void 0)return h7(a,s,u=>n<=0?"":ES(u.properties,n-1|0,!1));if(n<=0)return a;let l=k(e[a],hb);return l!==void 0?a+" { "+ES(l,n-1|0,!1)+" }":a}).join(" ")}function YD(e,t){let r=Uk(e,t);return Q(r,n=>{let i=e[n];return i===void 0?n:Ul(i)!==void 0?n+" { __typename }":vr(hb(i))?n:void 0}).join(" ")}function p7(e,t,r){let i=Uk(e,!0);return Q(i,o=>{let a=e[o];if(a===void 0)return o;let s=Ul(a);if(s!==void 0)return h7(o,s,d=>YD(d.properties,!1));let l=hb(a);if(l===void 0)return o;let u=YD(l,!1);if(u!=="")return o+" { "+u+" }"}).join(" ")}function pb(e){return D(k(k(he.object(e),t=>t.properties),he.object),{})}function XD(e,t,r,n,i,o){let a=n!==void 0?n:!1,s=i!==void 0?i:!1,l=o!==void 0?o:!1,u=p7(pb(t)),d=a||l,f=["$first: Int","$after: String","$last: Int","$before: String"],h=["first: $first","after: $after","last: $last","before: $before"],p=ke(fJ(t)),m=p?f.concat(["$includeRetired: Boolean"]):f,g=p?h.concat(["includeRetired: $includeRetired"]):h,v;if(r!==void 0){let S=d?["$filter: "+r+"Filter"].concat(m):m,E=d?["filter: $filter"].concat(g):g,C=s?S.concat(["$orderBy: "+r+"OrderBy"]):S,A=s?E.concat(["orderBy: $orderBy"]):E;v=[C,A]}else v=[m,g];let b=v[0].join(", "),_=v[1].join(", ");return"query("+b+") { "+e+"("+_+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+u+" } } } }"}function ZD(e,t){let r=ES(pb(t),void 0,void 0),i=ne(yp(t),!1,a=>a[1].namedWhenRetired)?", includeRetired: true":"",o=iw(t);return o!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+o+": $subId"+i+") { "+r+" } }":"query($id: ID!) { "+e+"(id: $id"+i+") { "+r+" } }"}function Z3e(e,t){let r=p7(pb(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function eDe(e){return kO(e).length===0?vr(iw(e)):!1}function tDe(e){let t=Object.keys(pb(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function eF(e,t,r){return e==="Operator"?t:D(r,[])}function tF(e,t){let r={},n=(i,o)=>{let a=F(r,i);if(a!==void 0){let s=o.filter(l=>!a.some(u=>u.name===l.name));r[i]=a.concat(s);return}r[i]=o};return e.aggregates.forEach(i=>{i.linkedViews.forEach(o=>n(o,eF(t,i.commands,i.systemCommands)))}),e.stateChangeSlices.forEach(i=>{let o=eF(t,i.commands,i.systemCommands),a=o.filter(u=>u.level==="Collection"),s=o.filter(u=>u.level==="Instance");i.linkedViews.forEach(u=>n(u,a));let l=i.consistencyRead;if(l!==void 0)return n(l,s);i.linkedViews.forEach(u=>n(u,s))}),r}function rDe(e,t,r,n,i,o,a,s,l,u,d,f,h,p){let m=[],g=i!==void 0?i:[],v=o!==void 0?o:[],b=a!==void 0?a:[],_=s!==void 0?s:[],S={},E=u!==void 0?u:{},C=d!==void 0?d:{},A=f!==void 0?f:!1,T=ne(h,[],W=>Ile(W,e,v)),R=g.length===0?[e]:g,N=u7(R),I=f7(e,N),M=tF(I,"Operator"),P=tF(I,"System"),U=[],j=Cu(),V=I.id,Y=W=>{let xe=I.derivedPages;return xe!==void 0?xe.includes(W):!0},J=(W,xe,je,Fe,we,mt)=>{let nt=eDe(W.schema),ot=nt?W.queryField+"ByIds":void 0,Vt=nt?Z3e(W.queryField,W.schema):void 0,Ze=tDe(W.schema),Qt=pJ(W.schema),xt=W.name,gn=ls(nl(V,xt)),Yt=F(E,xt),ar=je+xt,dr=$f(I.name,xt,W.sortIndex,k(h,kr=>vn(kr,xt)),A&&ke(W.ownerField)),St={fragmentId:ar,title:xt,menuEntry:dr,requiredAccess:Yt,url:gn},Mr=Bke(k(h,kr=>vn(kr,xt)),R,(kr,Gt,Lr)=>{let sn={...kr};return sn.refFields=zk(kr,Gt,N,Lr),sn}),Er=V+"."+xt,$r=(kr,Gt)=>y(CAe,{readModel:W,detailView:xe,pluginId:V,openRowId:kr,drillPath:Gt,singleQueryField:Fe,detailQueryDocument:we,byIdsQueryField:ot,byIdsQueryDocument:Vt,sortKeyField:Ze,liveOffered:Qt,uiHints:h,schedulerJoin:mt,rowActions:Mr,archiveOffered:!A},Er);return U.push(Tc(Nc(V,xt),kr=>{let Gt=eQ(kr);return y(Bm,{definition:St,children:$r(Gt[0],Gt[1])})})),Hq(j,V,xt,nl(V,xt)),St},X=I.readModels.filter(W=>!b.includes(W.name)).map(W=>{let xe=D(F(M,W.name),W.commands),je=D(F(P,W.name),D(W.systemCommands,[])),Fe=xo(W.queryField),we=nS(W.schema);if(W.queryDocument===""){let nt={...W};return nt.systemCommands=je,nt.commands=xe,nt.queryDocument=XD(W.queryField,W.schema,Fe,we.hasFilter,we.hasSort,we.hasSearch),nt}let mt={...W};return mt.systemCommands=je,mt.commands=xe,mt}),oe=I.stateViewSlices.filter(W=>!b.includes(W.name)).map(W=>{let xe=D(F(M,W.name),[]),je=D(F(P,W.name),[]),Fe=xo(W.queryField),we=nS(W.schema),mt=XD(W.queryField,W.schema,Fe,we.hasFilter,we.hasSort,we.hasSearch);return{name:W.name,schema:W.schema,queryDocument:mt,queryField:W.queryField,sortIndex:W.sortIndex,commands:xe,linkedWriteSide:W.linkedWriteSide,labelField:W.labelField,labelFieldSource:W.labelFieldSource,searchableFields:W.searchableFields,lifecycleField:W.lifecycleField,ownerField:W.ownerField,systemCommands:je}}),ge=kCe(X.concat(oe),h,(W,xe)=>{console.warn("[AutoUI] "+I.id+': scheduler canvas "'+W+'" has '+xe.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),H={...I};H.readModels=X;let ae=W=>q(F_e(H,W),xe=>{let je=F(E,xe.readModel.name);return Fe=>y(x3e,{binding:xe,entityId:Fe,requiredAccess:je})}),te=W=>{let xe=D(h,Og),je=Ole(vn(xe,W.name),n_e(W.schema));return q(i_e(W,je),Fe=>{let we=F(E,W.name);return mt=>y(M$e,{binding:Fe,entityId:mt,requiredAccess:we})})},ue=W=>{let xe=D(h,Og);if(Mle(vn(xe,W.name)))return je=>y(Q3e,{readModel:W.name,entityId:je})},Se={...I};Se.readModels=X.concat(oe);let pe=W=>{let xe=D(h,Og);return U_e(z_e(Se,W.name),Lle(vn(xe,W.name)),W.name).map(je=>{let Fe=F(E,je.readModel.name);return we=>y(RNe,{binding:je,entityId:we,hostViewName:W.name,pluginId:V,uiHints:h,requiredAccess:Fe})})},be=W=>{let xe=Q([ae(W.name)].concat(pe(W).map(je=>je)).concat([te(W)]),je=>je);if(xe.length!==0)return je=>y(cr,{children:xe.map((Fe,we)=>y(ov,{children:Fe(je)},we.toString()))})},Ie=X.map(W=>{let xe=xo(W.queryField),je=ZD(xe,W.schema),Fe=D(q(Q(W.linkedWriteSide,nt=>I.aggregates.find(ot=>ot.name===nt))[0],nt=>nt.commands),W.commands),we=F(S,W.name);return J(W,we!==void 0?we:(nt,ot,Vt)=>y(qD,{data:Vt,schema:W.schema,rootLabel:W.name,commands:Fe,lifecycleField:W.lifecycleField,aggregateId:nt,labelField:W.labelField,drillPath:ot,pluginId:I.id,viewName:W.name,uiHints:h,entityPanel:be(W),headerAccessory:ue(W)}),I.id+".",xe,je,F(ge,W.name))}),$t=oe.map(W=>{let xe=xo(W.queryField),je=ZD(xe,W.schema),Fe=F(S,W.name);return J(W,Fe!==void 0?Fe:(mt,nt,ot)=>y(qD,{data:ot,schema:W.schema,rootLabel:W.name,commands:W.commands,lifecycleField:W.lifecycleField,aggregateId:mt,labelField:W.labelField,drillPath:nt,pluginId:I.id,viewName:W.name,uiHints:h,entityPanel:be(W),headerAccessory:ue(W)}),I.id+".slice.",xe,je,F(ge,W.name))}),Lt=I.stateChangeSlices.filter(W=>!_.includes(W.name)).map(W=>({fragmentId:I.id+".commands."+W.name,title:W.name,description:"Auto-generated command panel for "+W.name,extensionPackage:I.id,positions:m,component:xe=>y(kNe,{slice:W,contextId:xe.contextId}),requiredAccess:F(C,W.name),minWidth:void 0})),Ar=X.concat(oe).toSorted((W,xe)=>W.sortIndex===xe.sortIndex?dd(W.name,xe.name):GS(W.sortIndex,xe.sortIndex));ke(Yv("autoui.inferenceReport"))&&P3e(I.id,WD(Ar),h,T),re(p,W=>W(i7(I.id,WD(Ar),h,T)));let Qr=Ar.map(W=>[W,xn(W.schema,void 0,void 0)]),li=Q(P0(),W=>{let xe=W.arity;if(!(typeof xe!="object"||xe.TAG!=="Multi"))return[W,xe.min]}).flatMap(W=>{let xe=W[1],je=W[0],Fe={};return Qr.forEach(we=>{let mt=we[0],nt=k(h,Qt=>vn(Qt,mt.name)),ot=ne(k(nt,Qt=>Qt.suppress),!1,Qt=>Qt.includes(je.id));if(!(je.isCapable(mt.schema,we[1])&&!ot))return;let Vt=D(k(nt,Qt=>Qt.canvas),je.label),Ze=F(Fe,Vt);Ze!==void 0?Ze.push(mt):Fe[Vt]=[mt]}),Q($e(Fe),we=>{let mt=we[1];if(mt.length>=xe)return[je,we[0],mt]})}),Sn=(W,xe)=>li.some(je=>je[1]===xe?je[0].id!==W.id:!1)?xe+" — "+W.label:xe,lo=Y("canvas")?li.map(W=>{let xe=W[2],je=W[0],Fe=Sn(je,W[1]),we=I.id+".canvas."+Fe,mt=$f(I.name,Fe,900,void 0,void 0),nt=i3(E,xe.map(Ze=>Ze.name)),ot=ls(nl(V,Fe)),Vt={fragmentId:we,title:Fe,menuEntry:mt,requiredAccess:nt,url:ot};return U.push(Tc(Nc(V,Fe),Ze=>y(Bm,{definition:Vt,children:y(H$e,{pluginId:V,mode:je,canvasName:Fe,readModels:xe,uiHints:h,viewAccess:E})}))),Vt}):[],wr=Y("scheduler")?Q(P0(),W=>{let xe=W.arity;if(!(typeof xe!="object"||xe.TAG==="Multi"))return[W,xe._0]}).flatMap(W=>{let xe=W[1],je=W[0],Fe={},we={},mt=(Ze,Qt,xt)=>{let gn=F(Ze,Qt);gn!==void 0?gn.push(xt):Ze[Qt]=[xt]};Ar.forEach(Ze=>{let Qt=k(h,Yt=>vn(Yt,Ze.name)),xt=D(k(Qt,Yt=>Yt.canvas),je.label),gn=k(Qt,Yt=>Yt.role);if(gn!==void 0)return gn===Vu?mt(Fe,xt,Ze):gn===Gu?re(k(Qt,Yt=>Yt.resourceRef),Yt=>mt(we,xt,[Ze,Yt])):void 0});let nt=(Ze,Qt)=>ne(xe.find(xt=>xt.role===Ze),Qt,xt=>xt.min),ot=nt(Vu,1),Vt=nt(Gu,1);return Q($e(Fe),Ze=>{let Qt=Ze[1],xt=Ze[0],gn=D(F(we,xt),[]),Yt=Qt[0];if(Yt===void 0||!(Qt.length>=ot&&gn.length>=Vt))return;let ar=gn.map($r=>({readModel:$r[0],resourceRef:$r[1]})),dr=I.id+".scheduler."+xt,Tr=$f(I.name,xt,910,void 0,void 0),St=w_e(E,Yt.name),Mr=ls(nl(V,xt)),Er={fragmentId:dr,title:xt,menuEntry:Tr,requiredAccess:St,url:Mr};return U.push(Tc(Nc(V,xt),$r=>y(Bm,{definition:Er,children:y(N3e,{pluginId:V,canvasName:xt,mode:je,resource:Yt,events:ar,uiHints:h,viewAccess:E})}))),Er})}):[],Qe=X.concat(oe).flatMap(W=>cJ(W.schema).map(xe=>({view:W.name,label:xe[2],field:xe[0],aggregate:xe[1]}))),st=X.concat(oe).flatMap(W=>KJ(W.schema,k(h,xe=>ja(xe,W.name))).map(xe=>({view:W.name,field:xe,aggregate:"sum"}))),Nt=D(k(h,W=>W.dashboard),[]),Ct=Nt.map(W=>[W.view,D(W.field,"")]),ve=(W,xe)=>!W.some(je=>je[0]===xe.view?je[1]===D(xe.field,""):!1),Ye=Qe.filter(W=>ve(Ct,W)),At=Ct.concat(Ye.map(W=>[W.view,D(W.field,"")])),yt=Nt.concat(Ye).concat(st.filter(W=>ve(At,W))),pn;if(yt.length!==0&&Y("dashboard")){let W="Dashboard",xe=X.concat(oe),je=I.id+".dashboard",Fe=$f(I.name,W,-100,void 0,void 0),we=i3(E,tt(yt.map(ot=>ot.view),[],(ot,Vt)=>ot.includes(Vt)?ot:ot.concat([Vt])).filter(ot=>xe.some(Vt=>Vt.name===ot))),mt=ls(nl(V,W)),nt={fragmentId:je,title:W,menuEntry:Fe,requiredAccess:we,url:mt};U.push(Tc(Nc(V,W),ot=>y(Bm,{definition:nt,children:y(E$e,{pluginId:V,metrics:yt,readModels:xe,uiHints:h,viewAccess:E})}))),pn=[nt]}else pn=[];let Xn=X9(X.concat(oe)),mn;if(Xn.length!==0&&Y("lifecycles")){let W="Lifecycles",xe=I.id+".lifecycles",je=$f(I.name,W,-50,void 0,void 0),Fe=ls(nl(V,W)),we={fragmentId:xe,title:W,menuEntry:je,requiredAccess:void 0,url:Fe};U.push(Tc(Nc(V,W),mt=>y(t3e,{views:Xn,uiHints:h}))),mn=[we]}else mn=[];return{pages:pn.concat(mn.concat(Ie.concat($t.concat(lo.concat(wr))))),panels:Lt,routes:U,publicLinks:j}}function kS(e){return W8(IE(e))}function rF(e){return Wue(IE(e))}let nF=new Map;function nDe(e,t){let r=nF.get(e);if(!(r!==void 0?r===t:!1)){$P.registerRemotes([{name:e,entry:t}]),nF.set(e,t);return}}async function iDe(e,t,r){nDe(e,r);try{let n=await $P.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=ws(n);if(i.RE_EXN_ID!==av)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 oDe=or(null),Ty={didCatch:!1,error:null};class aDe extends Yj{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ty}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(Ty)}}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&&sDe(t.resetKeys,i)){var o,a;(o=(a=this.props).onReset)===null||o===void 0||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Ty)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:a}=this.state;let s=t;if(o){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(l);else if(n)s=_r(n,l);else if(i!==void 0)s=i;else throw a}return _r(oDe.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function sDe(){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 lDe(e){let t=D(e.error.message,"unknown error");return y("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function uDe(e,t){console.error("Fragment crashed:",e)}function cDe(e){let t=e.fallbackComponent;return _r(aDe,{FallbackComponent:t!==void 0?t:lDe,onError:uDe,children:e.children})}let dDe=cDe;function fDe(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=de(()=>"Loading"),o=i[1],a=i[0];return De(()=>{o(l=>"Loading");let s={contents:!1};return iDe(n,r,t).then(l=>{if(s.contents)return;if(l.TAG==="Ok"){let d=l._0;return o(f=>({TAG:"Loaded",_0:d}))}let u=l._0;o(d=>({TAG:"Failed",_0:u}))}),()=>{s.contents=!0}},[n,r,t]),typeof a!="object"?y("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):a.TAG==="Loaded"?y(dDe,{children:_r(a._0,e.panelProps)}):y("div",{children:"Panel error: "+a._0,style:{color:"#a00",padding:"0.75rem"}})}let hDe=fDe;function Ci(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function nu(e){return Ci(e)==="object"}function pDe(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function iF(e,t){return e.length<124?e:t}const mDe="graphql-transport-ws";var Vi;(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"})(Vi||(Vi={}));var rn;(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"})(rn||(rn={}));function m7(e){if(!nu(e))throw new Error(`Message is expected to be an object, but got ${Ci(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 ${Ci(e.type)}`);switch(e.type){case rn.ConnectionInit:case rn.ConnectionAck:case rn.Ping:case rn.Pong:{if(e.payload!=null&&!nu(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 rn.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ci(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!nu(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Ci(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 ${Ci(e.payload.query)}`);if(e.payload.variables!=null&&!nu(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 ${Ci(e.payload.variables)}`);if(e.payload.operationName!=null&&Ci(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 ${Ci(e.payload.operationName)}`);if(e.payload.extensions!=null&&!nu(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 ${Ci(e.payload.extensions)}`);break}case rn.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ci(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!nu(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Ci(e.payload)}`);break}case rn.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ci(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!pDe(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 rn.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ci(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 gDe(e,t){return m7(typeof e=="string"?JSON.parse(e,t):e)}function Ff(e,t){return m7(e),JSON.stringify(e,t)}var ud=function(e){return this instanceof ud?(this.v=e,this):new ud(e)},vDe=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(m){return Promise.resolve(m).then(p,f)}}function s(p,m){n[p]&&(i[p]=function(g){return new Promise(function(v,b){o.push([p,g,v,b])>1||l(p,g)})},m&&(i[p]=m(i[p])))}function l(p,m){try{u(n[p](m))}catch(g){h(o[0][3],g)}}function u(p){p.value instanceof ud?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,m){p(m),o.shift(),o.length&&l(o[0][0],o[0][1])}};function bDe(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:a=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(Y){let J=1e3;for(let X=0;X<Y;X++)J*=2;await new Promise(X=>setTimeout(X,J+Math.floor(Math.random()*2700+300)))},shouldRetry:f=$y,isFatalConnectionProblem:h,on:p,webSocketImpl:m,generateID:g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Y=>{const J=Math.random()*16|0;return(Y=="x"?J:J&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:b}=e;let _;if(m){if(!yDe(m))throw new Error("Invalid WebSocket implementation provided");_=m}else typeof WebSocket<"u"?_=WebSocket:typeof global<"u"?_=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(_=window.WebSocket||window.MozWebSocket);if(!_)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const S=_,E=(()=>{const V=(()=>{const J={};return{on(X,oe){return J[X]=oe,()=>{delete J[X]}},emit(X){var oe;"id"in X&&((oe=J[X.id])===null||oe===void 0||oe.call(J,X))}}})(),Y={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?[V.emit,p.message]:[V.emit],closed:p?.closed?[p.closed]:[],error:p?.error?[p.error]:[]};return{onMessage:V.on,on(J,X){const oe=Y[J];return oe.push(X),()=>{oe.splice(oe.indexOf(X),1)}},emit(J,...X){for(const oe of[...Y[J]])oe(...X)}}})();function C(V){const Y=[E.on("error",J=>{Y.forEach(X=>X()),V(J)}),E.on("closed",J=>{Y.forEach(X=>X()),V(J)})]}let A,T=0,R,N=!1,I=0,M=!1;async function P(){clearTimeout(R);const[V,Y]=await(A??(A=new Promise((oe,ge)=>(async()=>{if(N){if(await d(I),!T)return A=void 0,ge({code:1e3,reason:"All Subscriptions Gone"});I++}E.emit("connecting",N);const H=new S(typeof t=="function"?await t():t,mDe);let ae,te;function ue(){isFinite(a)&&a>0&&(clearTimeout(te),te=setTimeout(()=>{H.readyState===S.OPEN&&(H.send(Ff({type:rn.Ping})),E.emit("ping",!1,void 0))},a))}C(pe=>{A=void 0,clearTimeout(ae),clearTimeout(te),ge(pe),pe instanceof oF&&(H.close(4499,"Terminated"),H.onerror=null,H.onclose=null)}),H.onerror=pe=>E.emit("error",pe),H.onclose=pe=>E.emit("closed",pe),H.onopen=async()=>{try{E.emit("opened",H);const pe=typeof r=="function"?await r():r;if(H.readyState!==S.OPEN)return;H.send(Ff(pe?{type:rn.ConnectionInit,payload:pe}:{type:rn.ConnectionInit},v)),isFinite(l)&&l>0&&(ae=setTimeout(()=>{H.close(Vi.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),ue()}catch(pe){E.emit("error",pe),H.close(Vi.InternalClientError,iF(pe instanceof Error?pe.message:new Error(pe).message,"Internal client error"))}};let Se=!1;H.onmessage=({data:pe})=>{try{const be=gDe(pe,b);if(E.emit("message",be),be.type==="ping"||be.type==="pong"){E.emit(be.type,!0,be.payload),be.type==="pong"?ue():s||(H.send(Ff(be.payload?{type:rn.Pong,payload:be.payload}:{type:rn.Pong})),E.emit("pong",!1,be.payload));return}if(Se)return;if(be.type!==rn.ConnectionAck)throw new Error(`First message cannot be of type ${be.type}`);clearTimeout(ae),Se=!0,E.emit("connected",H,be.payload,N),N=!1,I=0,oe([H,new Promise((Ie,$t)=>C($t))])}catch(be){H.onmessage=null,E.emit("error",be),H.close(Vi.BadResponse,iF(be instanceof Error?be.message:new Error(be).message,"Bad response"))}}})())));V.readyState===S.CLOSING&&await Y;let J=()=>{};const X=new Promise(oe=>J=oe);return[V,J,Promise.race([X.then(()=>{if(!T){const oe=()=>V.close(1e3,"Normal Closure");isFinite(o)&&o>0?R=setTimeout(()=>{V.readyState===S.OPEN&&oe()},o):oe()}}),Y])]}function U(V){if($y(V)&&(_De(V.code)||[Vi.InternalServerError,Vi.InternalClientError,Vi.BadRequest,Vi.BadResponse,Vi.Unauthorized,Vi.SubprotocolNotAcceptable,Vi.SubscriberAlreadyExists,Vi.TooManyInitialisationRequests].includes(V.code)))throw V;if(M)return!1;if($y(V)&&V.code===1e3)return T>0;if(!u||I>=u||!f(V)||h?.(V))throw V;return N=!0}n||(async()=>{for(T++;;)try{const[,,V]=await P();await V}catch(V){try{if(!U(V))return}catch(Y){return i?.(Y)}}})();function j(V,Y){const J=g(V);let X=!1,oe=!1,ge=()=>{T--,X=!0};return(async()=>{for(T++;;)try{const[H,ae,te]=await P();if(X)return ae();const ue=E.onMessage(J,Se=>{switch(Se.type){case rn.Next:{Y.next(Se.payload);return}case rn.Error:{oe=!0,X=!0,Y.error(Se.payload),ge();return}case rn.Complete:{X=!0,ge();return}}});H.send(Ff({id:J,type:rn.Subscribe,payload:V},v)),ge=()=>{!X&&H.readyState===S.OPEN&&H.send(Ff({id:J,type:rn.Complete},v)),T--,X=!0,ae()},await te.finally(ue);return}catch(H){if(!U(H))return}})().then(()=>{oe||Y.complete()}).catch(H=>{Y.error(H)}),()=>{X||ge()}}return{on:E.on,subscribe:j,iterate(V){const Y=[],J={done:!1,error:null,resolve:()=>{}},X=j(V,{next(ge){Y.push(ge),J.resolve()},error(ge){J.done=!0,J.error=ge,J.resolve()},complete(){J.done=!0,J.resolve()}}),oe=(function(){return vDe(this,arguments,function*(){for(;;){for(Y.length||(yield ud(new Promise(ae=>J.resolve=ae)));Y.length;)yield yield ud(Y.shift());if(J.error)throw J.error;if(J.done)return yield ud(void 0)}})})();return oe.throw=async ge=>(J.done||(J.done=!0,J.error=ge,J.resolve()),{done:!0,value:void 0}),oe.return=async()=>(X(),{done:!0,value:void 0}),oe},async dispose(){if(M=!0,A){const[V]=await A;V.close(1e3,"Normal Closure")}},terminate(){A&&E.emit("closed",new oF)}}}class oF extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function $y(e){return nu(e)&&"code"in e&&"reason"in e}function _De(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function yDe(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function xDe(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return bDe({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function sp(e,t){return k(e[t],he.string)}function Yo(e,t){return D(sp(e,t),"")}function SDe(e,t){return q(k(e[t],he.float),r=>r|0)}function wDe(e,t){return Q(D(k(e[t],he.array),[]),he.string)}function EDe(e){let t=he.object(e);return t!==void 0?{label:Yo(t,"label"),icon:sp(t,"icon"),group:sp(t,"group"),sortOrder:D(SDe(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function kDe(e){return q(he.object(e),t=>({fragmentId:Yo(t,"fragmentId"),title:Yo(t,"title"),description:Yo(t,"description"),positions:wDe(t,"positions"),requiredAccess:sp(t,"requiredAccess")}))}function CDe(e){return q(he.object(e),t=>({fragmentId:Yo(t,"fragmentId"),title:Yo(t,"title"),menuEntry:D(q(t.menuEntry,EDe),{label:Yo(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:sp(t,"requiredAccess")}))}function RDe(e){return q(he.object(e),t=>({pluginId:Yo(t,"pluginId"),remoteEntryUrl:Yo(t,"remoteEntryUrl"),panels:Q(D(k(t.panels,he.array),[]),kDe),pages:Q(D(k(t.pages,he.array),[]),CDe),registeredAt:Yo(t,"registeredAt"),updatedAt:Yo(t,"updatedAt")}))}function ADe(e){return Q(D(k(k(k(k(he.object(e),t=>t.data),he.object),t=>t.Platform_UIFragments),he.array),[]),RDe)}let TDe=`{
|
|
96
|
+
Platform_UIFragments {
|
|
97
|
+
pluginId
|
|
98
|
+
remoteEntryUrl
|
|
99
|
+
panels { fragmentId title description positions requiredAccess }
|
|
100
|
+
pages {
|
|
101
|
+
fragmentId
|
|
102
|
+
title
|
|
103
|
+
menuEntry { label icon group sortOrder }
|
|
104
|
+
requiredAccess
|
|
105
|
+
}
|
|
106
|
+
registeredAt
|
|
107
|
+
updatedAt
|
|
108
|
+
}
|
|
109
|
+
}`,aF=["message","body","text","title","content"],g7=["userId","recipientId","recipient","user","targetUserId"],$De=["createdAt","sentAt","notifiedAt","at","timestamp"],NDe=["read","isRead","seen","acknowledged"];function Bk(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function v7(e){return Q(Pr(e),t=>{if(xp(t[1]))return t[0]})}function b7(e,t){return v7(e).find(r=>Bk(r,t))}function DDe(e){let t=b7(e,g7);if(t!==void 0)return t;let r=xn(e,void 0,void 0);return Pr(e).map(n=>n[0]).find(n=>ne(F(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function FDe(e){return Q(Pr(e),t=>{if(wv(t[1]))return t[0]}).find(t=>Bk(t,$De))}function IDe(e){return Q(Pr(e),t=>{if(Re(FJ(t[1]),"boolean"))return t[0]}).find(t=>Bk(t,NDe))}function PDe(e,t){return Q(v7(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 ODe(e){return ne(k(G(e),t=>F(t,"x-reventless-notifications")),!1,t=>{let r=We(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let MDe=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function LDe(e,t){let r=Q(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>MDe.some(i=>n.name.toLowerCase().startsWith(i)))}let sF={contents:[]};function lF(e,t,r){if(!sF.contents.includes(e)){sF.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 zDe(e){return Q(e.readModels.filter(t=>ODe(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=b7(t.schema,aF),n=DDe(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:FDe(t.schema),readField:IDe(t.schema),refFields:PDe(t.schema,n),markReadCommand:LDe(t,e)};lF(t.name,"recipient",g7);return}else{lF(t.name,"message",aF);return}})[0]}function Gc(e,t){return k(F(e,t),ie)}function UDe(e,t,r){let n=Gc(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function Z0(e,t){return k(k(t.timestampField,r=>Gc(e,r)),Qn)}function BDe(e,t,r){let n=t.readField;if(n!==void 0){let o=q(F(e,n),We);return o==="JSONTrue"&&typeof o!="object"}let i=Z0(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function jDe(e,t,r,n){return Q(t,i=>{let o=D(G(i),{});if(UDe(o,e,r))return o}).toSorted((i,o)=>{let a=Z0(i,e),s=Z0(o,e);return a!==void 0?s!==void 0?s-a:-1:s!==void 0?1:0}).map((i,o)=>({id:D(Gc(i,"id"),"#"+o.toString()),message:D(Gc(i,e.messageField),""),timestamp:k(e.timestampField,a=>Gc(i,a)),read:BDe(i,e,n),refs:Q(e.refFields,a=>q(Gc(i,a.field),s=>[a.stem,s]))}))}function qDe(e,t){return tt(t,void 0,(r,n)=>{let i=D(G(n),{}),o=Z0(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function VDe(e,t){let r=D(k(e.markReadCommand,n=>n.aggregateIdField),"id");return Oe([[r,t]])}let _7=or([]),y7=or(e=>{}),GDe=_7.Provider,KDe=y7.Provider;function HDe(e){let t=e.initial,r=t!==void 0?t:[],n=de(()=>r),i=n[1],o=qr(a=>i(s=>a),[]);return _r(KDe,{value:o,children:_r(GDe,{value:n[0],children:e.children})})}let WDe={make:HDe};function JDe(){return Et(_7)}function QDe(){return Et(y7)}function CS(e,t){return e+"/"+t}function YDe(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(CS(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(CS(r.pluginId,i.fragmentId),n)});return}}),t}function XDe(e,t,r){return e.get(CS(t,r))}function ZDe(e,t,r){return e.map(n=>{let i=XDe(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=>y(hDe,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function uF(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(q([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function eFe(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>uF(n.fragmentId,e)),r.panels.map(n=>uF(n.fragmentId,e))]:[[],[]]}let x7={contents:[]};function cF(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),Ft(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function S7(e,t,r,n,i,o,a){let s=YDe(t),l=qle(i,n,e),u=l[2],d=l[1],f=wue(o,a,l[0]),h;h=typeof o!="object"?o!=="Unknown":!1;let p=Y3e.buildRegistry(f),m=Q(f,S=>q(zDe(S),E=>({pluginId:S.id,binding:E}))),g=[],v=[],b=[],_={contents:Cu()};return f.forEach(S=>{let E=eFe(S.id,t),C=rDe(S,void 0,void 0,void 0,f,e,E[0],E[1],void 0,d,u,h,r[S.id],void 0),A=ZDe(C.panels,S.id,s);C.pages.forEach(T=>{g.push(T)}),A.forEach(T=>{v.push(T)}),C.routes.forEach(T=>{b.push(T)}),_.contents=M1(_.contents,C.publicLinks)}),t.forEach(S=>{}),{pages:g,panels:v,routes:b,publicLinks:_.contents,entities:p,notificationBindings:m}}function tFe(e,t,r,n,i,o,a,s,l,u,d,f){let h=S7(o,a,s,l,u,d,f);n(h.entities),i(h.notificationBindings),re(e,p=>p.setPluginPages(h.pages)),x7.contents=Q(h.pages,p=>p.url),re(t,p=>p.setPluginPanels(h.panels)),re(r,p=>p.setPluginRoutes(h.routes,h.publicLinks))}let ev="Admin";function rFe(e,t){return e?!1:t.includes(ev)}function nFe(e){return e!==void 0?"You are acting as "+e+", and this deployment has no surfaces configured for that role. Its pages are discovered from an admin-only query, which only the "+ev+" group can reach.":"This deployment has no surfaces configured for your roles. Its pages are discovered from an admin-only query, which only the "+ev+" group can reach."}function iFe(e,t){return Jn(k(t,r=>e.journeyManifestUrls[r]),e.manifestUrl)}function w7(e,t,r,n){if(e.manifestUrl!==void 0&&(typeof t!="object"||!r.includes(ev)))return iFe(e,n)}function RS(e,t){return t==="/"?!0:e.some(r=>t===r?!0:t.startsWith(r+"/"))}function oFe(){return"/"+cv(pq(void 0).path).join("/")}function aFe(e){if(!W0e())return;let t=x7.contents,r=i=>RS(t,i);if(RS(t,oFe()))return;let n=gi(k(q(e.home,i=>i.trim()),i=>{if(i!=="")return i}),r);Es(D(Jn(n,t[0]),"/"))}function sFe(e){return e.TAG==="ManifestUnreadable"?"Component manifest could not be loaded":"Nothing here for the role you are acting as"}function dF(e,t,r,n,i,o,a,s,l,u,d,f,h,p){let m=(_,S)=>tFe(n,i,o,a,s,_,S,l,u,e.deniedSurfaces,d,f),g=w7(e,d,h,p);if(g!==void 0)return K8(g).then(_=>{if(_.TAG!=="Ok")return{TAG:"ManifestUnreadable",_0:_._0};m(_._0,[])});let v=cF(e.platformApiEndpoint,Pue,t),b=cF(e.platformApiEndpoint,TDe,t);return Promise.all([v,b]).then(_=>{let S=_[1],E=_[0],C=rF(E)||rF(S),A=C||kS(E)||kS(S);if(m(Fue(E),ADe(S)),A)if(rFe(C,h)){r();return}else return{TAG:"NoSurfacesForCaller",_0:nFe(p)}})}let lFe=`subscription OnPluginStatusChange {
|
|
110
|
+
onPluginStatusChange { pluginId status }
|
|
111
|
+
}`,uFe=`subscription OnUIFragmentChange {
|
|
112
|
+
onUIFragmentChange { pluginId changeKind }
|
|
113
|
+
}`;function cFe(e,t,r,n){return vr(w7(e,t,r,n))}function dFe(e){return L("div",{children:[y("strong",{children:e.title}),y("p",{children:e.message,style:{margin:"0.5rem 0 0",whiteSpace:"pre-wrap"}})],role:"alert",style:{background:"var("+x.surfaceSubtle+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.error+")",margin:"1rem",padding:"1rem 1.25rem",borderRadius:"0.375rem"}})}function fFe(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=Et(jp),o=Et(qp),a=Y2(),s=YJ(),l=QDe(),u=pa(),d=k(u,S=>S.getToken()),f=ne(k(u,S=>S.identity),[],S=>S.groups),h=k(k(u,S=>S.identity),S=>S.activeRole),p=f.concat(r.accessTiers),m=q8(r.elevatedGroups,f),g=ne(k(u,S=>S.identity),"",S=>S.userId),v=de(()=>{}),b=v[1],_=v[0];return De(()=>{dF(r,d,()=>re(u,S=>S.logout()),i,o,a,s,l,n,p,m,g,f,h).then(S=>{re(S,E=>{console.error("[Shell] "+E._0)}),b(E=>S),aFe(r)})},[d,n]),De(()=>{if(cFe(r,m,f,h))try{let S=xDe(r.platformApiSubscriptionEndpoint,d),E=()=>{dF(r,d,()=>re(u,T=>T.logout()),i,o,a,s,l,n,p,m,g,f,h)},C=S.subscribe({query:lFe,variables:void 0},{next:T=>E(),error:T=>{},complete:()=>{}}),A=S.subscribe({query:uFe,variables:void 0},{next:T=>E(),error:T=>{},complete:()=>{}});return()=>{C(),A(),S.dispose()}}catch{return}},[d]),_!==void 0?y(dFe,{message:_._0,title:sFe(_)}):null}let hFe=fFe;function pFe(e,t,r){return Q(t,n=>{if(!Re(n,r))return q(e[n],i=>[n,i])})}async function mFe(e,t,r,n,i,o){let a=[],s=pFe(e.journeyManifestUrls,t,r);return(await Promise.all(s.map(u=>{let d=u[0];return K8(u[1]).then(f=>[d,f])}))).forEach(u=>{let d=u[1],f=u[0];if(d.TAG!=="Ok")return;let h=S7(d._0,[],i,[f].concat(e.accessTiers),e.deniedSurfaces,q8(e.elevatedGroups,[f]),o),p=Q(h.pages,m=>m.url);if(RS(p,n)){a.push(f);return}}),a}let gFe={display:"flex",padding:"2rem",alignItems:"flex-start",flexDirection:"column",gap:"var("+O.sm+")"},vFe={fontSize:"var("+$.sizeLg+")",fontWeight:"var("+$.weightMedium+")",margin:"0"},bFe={color:"var("+x.textSecondary+")",margin:"0"},_Fe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",cursor:"pointer",padding:"0.4rem 0.9rem",borderRadius:"0.375rem"},yFe={color:"var("+x.error+")",margin:"0"};function xFe(e){let t=e.uiHints,r=e.config,n=pa(),i=IP(),o=k(n,E=>E.identity),a=ne(n,!1,E=>E.canSwitchRoles),s=ne(o,[],E=>B5(a,E)),l=k(o,E=>E.activeRole),u=ne(o,"",E=>E.userId),d=de(()=>[]),f=d[1],h=d[0],p=de(()=>!1),m=p[1],g=p[0],v=de(()=>{}),b=v[1],_=v[0];De(()=>{let E={contents:!0};return mFe(r,s,l,i,t,u).then(C=>{if(E.contents)return f(A=>C)}),()=>{E.contents=!1}},[i,s.join(",")]);let S;if(h.length!==0){let E;h.length!==1?E="This page is part of another role you hold: "+h.join(", ")+".":E="This page is part of your "+h[0]+" role.",S=L(cr,{children:[y("p",{children:E,style:bFe}),h.map(C=>y("button",{children:"Act as "+C,style:_Fe,disabled:g,onClick:A=>re(n,T=>{m(R=>!0),b(R=>{}),T.switchRole(C).then(R=>{if(m(I=>!1),typeof R!="object")return;let N=R._0;b(I=>N)})})},C)),_!==void 0?y("p",{children:_,style:yFe}):null]})}else S=null;return L("div",{children:[y("h1",{children:"404 — Page not found",style:vFe}),S],style:gFe})}let SFe=xFe;function Ut(e){return"var("+e+")"}let wFe=w([Mt("relative"),z("inlineBlock")]),EFe=w([Mt("relative"),z("inlineFlex"),ee("center"),Je("center"),c("background","none"),c("border","none"),c("border-radius",Ut(Z.md)),c("cursor","pointer"),c("color",Ut(x.textSecondary)),c("padding","6px"),qe([c("background",Ut(x.surfaceSubtle)),c("color",Ut(x.textPrimary))])]),kFe=w([Mt("absolute"),Fs(Ae(0)),Bl(Ae(0)),z("inlineFlex"),ee("center"),Je("center"),c("min-width","16px"),c("height","16px"),c("padding","0 4px"),c("border-radius",Ut(Z.full)),c("background",Ut(x.brand)),c("color",Ut(x.textOnBrand)),c("font-family",Ut($.fontFamily)),c("font-size","10px"),c("font-weight",Ut($.weightBold)),c("line-height","1")]),CFe=w([Mt("absolute"),Bl(Ae(0)),Fs({NAME:"percent",VAL:100}),sa(Ae(4)),c("width","320px"),c("background",Ut(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",Ut(Z.md)),c("box-shadow",Ut(Pn.md)),c("z-index","200"),c("overflow","hidden"),c("font-family",Ut($.fontFamily))]),RFe=w([z("flex"),ee("center"),Je("spaceBetween"),c("padding","var("+O.sm+") var("+O.md+")"),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("color",Ut(x.textSecondary)),c("font-size",Ut($.sizeSm)),c("font-weight",Ut($.weightMedium)),c("text-transform","uppercase"),c("letter-spacing","0.04em")]),AFe=w([c("background","none"),c("border","none"),c("color",Ut(x.brand)),c("font-size",Ut($.sizeXs)),c("text-transform","none"),c("letter-spacing","0"),Ce("pointer"),qe([c("text-decoration","underline")])]),TFe=w([c("max-height","360px"),c("overflow-y","auto")]);function $Fe(e){return w([z("flex"),ee("flexStart"),c("gap",Ut(O.sm)),c("width","100%"),c("background","none"),c("border","none"),c("border-bottom","1px solid var("+x.borderSubtle+")"),c("text-align","left"),c("padding","var("+O.sm+") var("+O.md+")"),Ce(e?"pointer":"default"),qe(e?[c("background",Ut(x.surfaceSubtle))]:[])])}function NFe(e){return w([c("width","8px"),c("height","8px"),c("border-radius",Ut(Z.full)),c("margin-top","5px"),c("flex-shrink","0"),c("background",e?"transparent":Ut(x.brand))])}let DFe=w([z("flex"),_e("column"),c("gap","2px"),c("min-width","0")]);function FFe(e){return w([c("color",Ut(x.textPrimary)),c("font-size",Ut($.sizeSm)),c("font-weight",Ut(e?$.weightNormal:$.weightMedium)),c("line-height",Ut($.lineHeightNormal)),c("word-break","break-word")])}let IFe=w([c("color",Ut(x.textDisabled)),c("font-size",Ut($.sizeXs))]),PFe=w([c("color",Ut(x.textDisabled)),c("font-size",Ut($.sizeSm)),c("padding",Ut(O.md)),c("text-align","center")]);function OFe(e){return L("svg",{children:[y("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),y("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 MFe(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,a=e.onOpen,s=e.notifications,l=n!==void 0?n:"No notifications",u=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=de(()=>u),h=f[1],p=f[0],m=s.filter(v=>!v.read).length;De(()=>{if(!p)return;let v=_=>h(S=>!1),b=_=>{if(_.key==="Escape")return h(S=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",b),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",b)}},[p]);let g=()=>{let v=!p;v&&re(i,b=>b()),h(b=>v)};return L("div",{children:[L("button",{children:[y(OFe,{}),m>0?y("span",{children:m>99?"99+":m.toString(),className:kFe}):null],"aria-label":m>0?"Notifications ("+m.toString()+" unread)":"Notifications",className:EFe,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),g()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&m>0?y("button",{children:"Mark all read",className:AFe,type:"button",onClick:v=>o()}):null],className:RFe}),s.length===0?y("div",{children:l,className:PFe}):y("div",{children:s.map(v=>{let b=v.timestamp;return L("button",{children:[y("span",{className:NFe(v.read)}),L("span",{children:[y("span",{children:v.message,className:FFe(v.read)}),b!==void 0?y("span",{children:lb(d,b),className:IFe}):null],className:DFe})],className:$Fe(ke(a)),type:"button",onClick:_=>{re(a,S=>S(v)),h(S=>!1)}},v.id)}),className:TFe})],className:CFe,onClick:v=>{v.stopPropagation()}}):null],className:wFe})}let LFe=MFe;function E7(e){return"autoui.notifications.seen."+e}function zFe(e){let t=localStorage.getItem(E7(e));if(t!=null)return ks(t)}function UFe(e,t){localStorage.setItem(E7(e),t.toString())}function BFe(e){let t=e.onData,r=Ku(e.binding.readModel,void 0);return De(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function jFe(e){let t=JDe(),r=pa(),n=si(),i=Wp(),o=ua(),a=Ns(),s=de(()=>({})),l=s[1],u=s[0],f=de(()=>0)[1],h=C=>(A=>l(T=>{let R=Oe($e(T));return R[C]=A,R})),p=q(k(r,C=>C.identity),C=>({userId:C.userId,username:C.username})),m=t.flatMap(C=>{let A=ne(F(u,C.pluginId),[],T=>T.rows);return jDe(C.binding,A,p,zFe(C.pluginId)).map(T=>({key:C.pluginId+":"+T.id,appBinding:C,entry:T}))}).toSorted((C,A)=>{let T=k(C.entry.timestamp,Qn),R=k(A.entry.timestamp,Qn);return T!==void 0?R!==void 0?R-T:-1:R!==void 0?1:0}),g=(C,A)=>{let T=C.binding.markReadCommand;if(T!==void 0&&i!==void 0){Ft(i(T.mutationDocument,VDe(C.binding,A)).then(R=>{if(typeof R!="object"){let N=C.pluginId;return re(F(u,N),I=>I.refetch())}R.TAG!=="Rejected"&&console.error("[AutoUI] notification markRead not executed — "+R._0)}),R=>Promise.resolve());return}},v=C=>re(m.find(A=>A.key===C.id),A=>{A.entry.read||g(A.appBinding,A.entry.id);let T=A.entry;re(xq(T.refs,R=>{let N=R[1];return q(Va(o,R[0]),I=>[I,N])}),R=>{let N=R[0];a(La(N.pluginId,N.name,R[1],[]))})}),b=ke(n)&&t.some(C=>ke(C.binding.markReadCommand)),_=()=>{m.forEach(C=>{if(!C.entry.read)return g(C.appBinding,C.entry.id)})},S=()=>{t.forEach(C=>{let A=ne(F(u,C.pluginId),[],T=>T.rows);re(qDe(C.binding,A),T=>UFe(C.pluginId,T))}),f(C=>C+1|0)},E=m.map(C=>({id:C.key,message:C.entry.message,timestamp:C.entry.timestamp,read:C.entry.read}));return t.length===0?null:L(cr,{children:[t.map(C=>y(BFe,{binding:C.binding,onData:h(C.pluginId)},C.pluginId)),y(LFe,{notifications:E,onOpen:v,onMarkAllRead:b?_:void 0,onPanelOpen:S})]})}let qFe=jFe,VFe="/default/dev/uiHints";function GFe(e){let t=e.onChange,r=Bp(),n=e.config.authMode,i;switch(n){case"Local":i=!0;break;case"Anonymous":case"Cognito":i=!1;break}let o=Pe(t);return o.current=t,De(()=>{let a=i?r:void 0;if(a===void 0)return;let s=a.subscribe("Domain",VFe,u=>o.current()),l=a.registerReconnect("Domain",()=>o.current());return()=>{s(),l()}},[i?ke(r):!1]),null}let KFe=GFe;function HFe(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 WFe(e){let t=["B","KB","MB","GB"],n=((s,l)=>{for(;;){let u=l,d=s;if(!(d>=1024&&u<(t.length-1|0)))return[d,u];l=u+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function JFe(e,t){if(e)return[t,!1];let r=t.slice(0,1);return[r,r.length!==0]}function _n(e){return"var("+e+")"}let fF=w([z("flex"),_e("column"),ee("center"),Je("center"),c("gap","6px"),c("padding",_n(O.lg)),c("border","2px dashed var("+x.border+")"),c("border-radius",_n(Z.md)),c("color",_n(x.textSecondary)),c("font-family",_n($.fontFamily)),c("font-size",_n($.sizeSm)),Ce("pointer"),c("transition","border-color 120ms, background 120ms"),qa("center")]),QFe=w([c("border-color",_n(x.brand)),c("background",_n(x.brandSubtle))]),YFe=w([c("font-size",_n($.sizeXs))]),XFe=w([z("flex"),ee("center"),c("gap","8px"),c("padding",_n(O.xs)+" 0"),c("font-family",_n($.fontFamily)),c("font-size",_n($.sizeSm)),c("color",_n(x.textPrimary))]),ZFe=w([c("flex","1"),c("min-width","0"),c("overflow","hidden"),c("text-overflow","ellipsis"),c("white-space","nowrap")]),eIe=w([c("color",_n(x.textSecondary)),c("font-size",_n($.sizeXs)),c("white-space","nowrap")]),tIe=w([c("color",_n(x.success))]),hF=w([c("color",_n(x.error))]),rIe=w([c("width","120px")]),nIe=w([c("flex","0 0 auto"),c("border","none"),c("background","transparent"),c("padding","0 4px"),c("color",_n(x.textSecondary)),c("font-size",_n($.sizeMd)),GH({NAME:"abs",VAL:1}),Ce("pointer")]),iIe=w([c("width","40px"),c("height","40px"),c("flex","0 0 auto"),c("object-fit","cover"),c("border-radius",_n(Z.sm)),c("border","1px solid var("+x.border+")")]);function oIe(e){let t=e.onRemoved,r=e.onUploaded,n=e.label,i=e.multiple,o=e.accept,a=e.adapter,s=i!==void 0?i:!0,l=n!==void 0?n:"Drop files here or click to browse",u=de(()=>[]),d=u[1],f=u[0],h=de(()=>!1),p=h[1],m=Pe(null),g=Pe(0),v=Pe([]),b=Pe([]);De(()=>(()=>{v.current.forEach(M=>{URL.revokeObjectURL(M)})}),[]);let _=(M,P)=>d(U=>U.map(j=>j.key===M?{key:j.key,name:j.name,size:j.size,status:P,preview:j.preview}:j)),S=M=>re(M.preview,P=>{URL.revokeObjectURL(P),v.current=v.current.filter(U=>U!==P)}),E=M=>re(a.remove,P=>{Ft(P(M).then(U=>{U.TAG!=="Ok"&&console.error("[FileDropzone] could not remove "+M+": "+U._0)}),U=>(console.error("[FileDropzone] could not remove "+M),Promise.resolve()))}),C=M=>{b.current=b.current.concat([M.key]),S(M);let P=M.status;if(P.TAG!=="Done")return;let U=P._0;re(t,j=>j(U)),E(U)},A=M=>{let P=JFe(s,M),U=P[1];U&&f.forEach(C),P[0].forEach((j,V)=>{let Y=U&&V===0;g.current=g.current+1|0;let J=g.current.toString()+":"+j.name,X=HFe(o,j.name,j.type),oe=X?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"},ge=j.type,H;if(ge.toLowerCase().startsWith("image/")){let Se=URL.createObjectURL(j);v.current=v.current.concat([Se]),H=Se}else H=void 0;let ae=j.name,te=j.size,ue={key:J,name:ae,size:te,status:oe,preview:H};if(d(Se=>Y?[ue]:Se.concat([ue])),X){Ft(a.upload(j,Se=>_(J,{TAG:"Uploading",_0:Se})).then(Se=>{if(Se.TAG==="Ok"){let pe=Se._0;b.current.includes(J)?E(pe):(_(J,{TAG:"Done",_0:pe}),re(r,be=>be(j.name,pe)))}else _(J,{TAG:"Failed",_0:Se._0});return Promise.resolve()}),Se=>(_(J,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}})},T=M=>{M.preventDefault(),p(U=>!1);let P=M.dataTransfer;if(P!=null)return A(Array.from(P.files))},R=M=>{let P=M.target.files;P!=null&&A(Array.from(P)),M.target.value=""},N=()=>re(ro(m.current),M=>M.click()),I=h[0]?fF+" "+QFe:fF;return L("div",{children:[L("div",{children:[y("span",{children:l}),o!==void 0?y("span",{children:"Accepted: "+o,className:YFe}):null],className:I,role:"button",onClick:M=>N(),onDragLeave:M=>p(P=>!1),onDragOver:M=>{M.preventDefault(),p(P=>!0)},onDrop:T}),y("input",{ref:Jt(m),style:{display:"none"},accept:o,multiple:s,type:"file",onChange:R}),f.map(M=>{let P=M.preview,U=M.status,j;switch(U.TAG){case"Uploading":j=y("span",{children:y(uM,{value:U._0,showValue:!1}),className:rIe});break;case"Done":j=y("span",{children:"Uploaded",className:tIe});break;case"Rejected":j=y("span",{children:"Rejected",className:hF,title:U._0});break;case"Failed":j=y("span",{children:"Failed",className:hF,title:U._0});break}return L("div",{children:[P!==void 0?y("img",{className:iIe,alt:M.name,src:P}):null,y("span",{children:M.name,className:ZFe,title:M.name}),y("span",{children:WFe(M.size),className:eIe}),j,y("button",{children:"×","aria-label":"Remove "+M.name,className:nIe,title:"Remove "+M.name,type:"button",onClick:V=>{V.stopPropagation();let Y=M.key;re(f.find(J=>J.key===Y),C),d(J=>J.filter(X=>X.key!==Y))}})],className:XFe},M.key)})]})}let aIe=oIe;function k7(e){if(e==="")return[];let t;try{t=_t(JSON.parse(e))}catch{return[e]}return t!==void 0?Q(t,ie):[e]}function sIe(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 lIe(e,t){let r=LO(e,t);if(r!==void 0&&r.semantic==="Image")return"image/*"}function uIe(e){return Re(k(k(G(yn(e)),t=>F(t,"type")),ie),"array")}function C7(e){let t=r=>k(Do(r).storeTarget,iJ);return Jn(t(e),k(JP(e),t))}function cIe(e,t,r){return Jn(k(C7(e),r),t)}function dIe(e,t,r){return D(cIe(e,t,r),sIe(C7(e)))}function fIe(e){let t=e.onChange,r=e.value,n=e.multiple,i=e.adapter,o=Pe(n?k7(r):r===""?[]:[r]),a=Pe([]),s=zRe(),l=h=>n?JSON.stringify(h.map(p=>p)):D(h[0],""),u=(h,p)=>{let m=n?o.current.concat([p]):[p];o.current=m,a.current=URe(a.current,p),t(l(m))},d=h=>{let p=o.current.filter(m=>m!==h);o.current=p,a.current=BRe(a.current,h),t(l(p))},f=h=>re(i.remove,p=>{Ft(p(h).then(m=>{m.TAG!=="Ok"&&console.error("[FileDropzoneInput] could not release "+h+": "+m._0)}),m=>(console.error("[FileDropzoneInput] could not release "+h),Promise.resolve()))});return De(()=>(()=>{jRe(s,a.current).forEach(f)}),[]),y(aIe,{adapter:i,accept:e.accept,multiple:n,onUploaded:u,onRemoved:d})}function hIe(e,t,r,n){if(n&&k7(r).length===0)return"Required"}function pIe(e,t,r){let n=e!==void 0?e:a=>{},i=(a,s,l,u,d,f,h)=>y(fIe,{adapter:dIe(s,void 0,n),accept:Jn(t,lIe(a,s)),multiple:D(r,uIe(s)),value:l,onChange:u}),o=a=>{let l={...D(pse(a),{cell:(u,d,f)=>{},detail:(u,d,f)=>{}})};Rr(a,(l.validateInput=hIe,l.input=i,l))};o("File"),o("Image")}var mIe={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"},ic=mIe,gIe=function(e,t,r,n,i,o,a,s){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],d=0;l=new Error(t.replace(/%s/g,function(){return u[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Le=gIe;function mb(e){return function(){return e}}var lf=function(){};lf.thatReturns=mb;lf.thatReturnsFalse=mb(!1);lf.thatReturnsTrue=mb(!0);lf.thatReturnsNull=mb(null);lf.thatReturnsThis=function(){return this};lf.thatReturnsArgument=function(e){return e};var gb=ic,Yp=Le;function vIe(e){Yp(!1)}function Us(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function R7(e){var t=Us(e);return typeof t=="object"&&t!==null&&t.kind===gb.FRAGMENT}function A7(e){var t=Us(e);return typeof t=="object"&&t!==null&&t.kind===gb.REQUEST}function bIe(e){var t=Us(e);return typeof t=="object"&&t!==null&&t.kind===gb.UPDATABLE_QUERY}function T7(e){var t=Us(e);return typeof t=="object"&&t!==null&&t.kind===gb.INLINE_DATA_FRAGMENT}function jk(e){var t=Us(e);return R7(t)||Yp(!1),t}function _Ie(e){var t,r=jk(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 yIe(e){var t,r=jk(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function xIe(e){var t=Us(e);return A7(t)||Yp(!1),t}function SIe(e){var t=Us(e);return bIe(t)||Yp(!1),t}function wIe(e){var t=Us(e);return T7(t)||Yp(!1),t}var ga={getFragment:jk,getNode:Us,getPaginationFragment:_Ie,getRefetchableFragment:yIe,getRequest:xIe,getUpdatableQuery:SIe,getInlineDataFragment:wIe,graphql:vIe,isFragment:R7,isRequest:A7,isInlineDataFragment:T7},$7={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})($7);var He=$7.exports,N7={exports:{}},D7={exports:{}},F7={exports:{}},I7={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})(I7);var P7=I7.exports,O7={exports:{}};(function(e){var t=P7.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,i||"default");if(t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(O7);var EIe=O7.exports;(function(e){var t=P7.default,r=EIe;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})(F7);var M7=F7.exports;(function(e){var t=M7;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})(D7);var Si=D7.exports;(function(e){var t=Si;function r(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);o&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),a.push.apply(a,s)}return a}function n(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?r(Object(a),!0).forEach(function(s){t(i,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(a,s))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(N7);var tr=N7.exports,L7={exports:{}},z7={exports:{}},U7={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})(U7);var B7=U7.exports;(function(e){var t=B7;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})(z7);var j7=z7.exports;(function(e){var t=j7;function r(n,i){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!o){if(Array.isArray(n)||(o=t(n))||i&&n&&typeof n.length=="number"){o&&(n=o);var a=0,s=function(){};return{s,n:function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
114
|
+
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})(L7);var Jr=L7.exports,q7=He.default,pF=q7(tr),mF=q7(Jr),kIe=Le;function CIe(e,t,r){var n=(0,mF.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,pF.default)((0,pF.default)({},o),{},{uiContext:r}))}}catch(u){n.e(u)}finally{n.f()}var a=(0,mF.default)(t),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(V7(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,kIe(!1)}}}catch(u){a.e(u)}finally{a.f()}}function V7(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 RIe(e,t,r){t!=null&&CIe(e,t,r)}var Xp={handlePotentialSnapshotErrors:RIe,eventShouldThrow:V7},G7={exports:{}},K7={exports:{}};(function(e){var t=B7;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(K7);var AIe=K7.exports,H7={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})(H7);var TIe=H7.exports,W7={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
115
|
+
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})(W7);var $Ie=W7.exports;(function(e){var t=AIe,r=TIe,n=j7,i=$Ie;function o(a){return t(a)||r(a)||n(a)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(G7);var ql=G7.exports,J7={DEFAULT_HANDLE_KEY:""},NIe=J7,DIe=NIe.DEFAULT_HANDLE_KEY,FIe=Le;function IIe(e,t,r){return t&&t!==DIe?"__".concat(t,"_").concat(e):(r==null&&FIe(!1),"__".concat(r,"_").concat(e))}var Q7=IIe,PIe={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=PIe;function AS(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(AS);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=AS(e[t[n]]);return r}function Y7(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 Y7(i,r)})}var oc={stableCopy:AS,hasCycle:Y7},OIe=He.default,MIe=OIe(ql),LIe=Q7,vb=ic,zIe=Bo,UIe=oc,X7=UIe.stableCopy,BIe=Le,jIe=vb.VARIABLE,qIe=vb.LITERAL,VIe=vb.OBJECT_VALUE,GIe=vb.LIST_VALUE,KIe="__errors",HIe="__module_component_",WIe="__module_operation_";function TS(e,t){if(e.kind===jIe)return ZIe(e.variableName,t);if(e.kind===qIe)return e.value;if(e.kind===VIe){var r={};return e.fields.forEach(function(i){r[i.name]=TS(i,t)}),r}else if(e.kind===GIe){var n=[];return e.items.forEach(function(i){i!=null&&n.push(TS(i,t))}),n}}function qk(e,t,r){var n={};return r&&(n[eU.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=TS(i,t)}),n}function JIe(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,a=e.args,s=e.filters,l=LIe(n,i,o),u=null;return a&&s&&a.length!==0&&s.length!==0&&(u=a.filter(function(d){return s.indexOf(d.name)>-1})),r&&(u=u!=null?[r].concat((0,MIe.default)(u)):[r]),u===null?l:Vk(l,qk(u,t))}function Z7(e,t){if(e.storageKey)return e.storageKey;var r=YIe(e),n=e.name;return r&&r.length!==0?Vk(n,qk(r,t)):n}function QIe(e,t){var r=Z7(e,t);return zIe.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function YIe(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 XIe(e,t){return Vk(e,X7(t))}function Vk(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 ZIe(e,t){return t.hasOwnProperty(e)||BIe(!1),X7(t[e])}function ePe(e){return"".concat(HIe).concat(e)}function tPe(e){return"".concat(WIe).concat(e)}var eU={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:KIe,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:qk,getHandleStorageKey:JIe,getStorageKey:Z7,getReadTimeResolverStorageKey:QIe,getStableStorageKey:XIe,getModuleComponentKey:ePe,getModuleOperationKey:tPe},Sr=eU,rPe=He.default,tU=rPe(tr),nPe=Sr,iPe=nPe.getArgumentValues,oPe=Le;function aPe(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,tU.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:oPe(!1)}}),n||r}function sPe(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 lPe(e,t,r){if(t==null)return e;var n=(0,tU.default)({},e),i=r?iPe(r,e):{};return t.forEach(function(o){var a,s=(a=i[o.name])!==null&&a!==void 0?a:o.defaultValue;n[o.name]=s}),n}var Vl={getLocalVariables:lPe,getFragmentVariables:aPe,getOperationVariables:sPe},Ny=[],Dy=[];/**
|
|
116
|
+
* Checks if two values are equal. Values may be primitives, arrays, or objects.
|
|
117
|
+
* Returns true if both arguments have the same keys and values.
|
|
118
|
+
*
|
|
119
|
+
* @see http://underscorejs.org
|
|
120
|
+
* @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
121
|
+
* @license MIT
|
|
122
|
+
*/function uPe(e,t){var r=Ny.length?Ny.pop():[],n=Dy.length?Dy.pop():[],i=$S(e,t,r,n);return r.length=0,n.length=0,Ny.push(r),Dy.push(n),i}function $S(e,t,r,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;var i=Object.prototype.toString,o=i.call(e);if(o!=i.call(t))return!1;switch(o){case"[object String]":return e==String(t);case"[object Number]":return isNaN(e)||isNaN(t)?!1:e==Number(t);case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}for(var a=r.length;a--;)if(r[a]==e)return n[a]==t;r.push(e),n.push(t);var s=0;if(o==="[object Array]"){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!$S(e[s],t[s],r,n))return!1}else{if(e.constructor!==t.constructor)return!1;if(e.hasOwnProperty("valueOf")&&t.hasOwnProperty("valueOf"))return e.valueOf()==t.valueOf();var l=Object.keys(e);if(l.length!=Object.keys(t).length)return!1;for(var u=0;u<l.length;u++)if(!$S(e[l[u]],t[l[u]],r,n))return!1}return r.pop(),n.pop(),!0}var Bs=uPe,cPe=Vl,dPe=cPe.getFragmentVariables,Zp=Sr,fPe=Zp.CLIENT_EDGE_TRAVERSAL_PATH,hPe=Zp.FRAGMENT_OWNER_KEY,pPe=Zp.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,mPe=Zp.FRAGMENTS_KEY,rU=Zp.ID_KEY,nU=Bs,Ol=Le;function bb(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||Ol(!1);var r=t[rU],n=t[mPe],i=t[hPe],o=t[fPe];if(typeof r=="string"&&typeof n=="object"&&n!==null&&typeof n[e.name]=="object"&&n[e.name]!==null&&typeof i=="object"&&i!==null&&(o==null||Array.isArray(o))){var a=i,s=o,l=n[e.name],u=dPe(e,a.variables,l),d=l[pPe]===!0;return cU(e,r,u,a,d,s)}return null}function iU(e,t){var r=null;return t.forEach(function(n,i){var o=n!=null?bb(e,n):null;o!=null&&(r=r||[],r.push(o))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function oU(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||Ol(!1),iU(e,t)):(Array.isArray(t)&&Ol(!1),bb(e,t))}function gPe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=oU(i,o)}return r}function vPe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=aU(i,o)}return r}function aU(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||Ol(!1),bPe(e,t)):(Array.isArray(t)&&Ol(!1),sU(e,t))}function bPe(e,t){var r=null;return t.forEach(function(n){var i=n!=null?sU(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function sU(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||Ol(!1);var r=t[rU];return typeof r=="string"?r:null}function _Pe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],a=lU(i,o);Object.assign(r,a)}return r}function lU(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||Ol(!1),uU(e,t)):(Array.isArray(t)&&Ol(!1),Gk(e,t)||{})}function Gk(e,t){var r=bb(e,t);return r?r.variables:null}function uU(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=Gk(e,n);o!=null&&Object.assign(r,o)}}),r}function gF(e,t){return e.dataID===t.dataID&&e.node===t.node&&nU(e.variables,t.variables)&&yPe(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&xPe(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function yPe(e,t){return e===t?!0:e.identifier===t.identifier&&nU(e.cacheConfig,t.cacheConfig)}function xPe(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 SPe(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?gF(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return gF(r,t.selectors[n])}):!1}function cU(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 wPe(e,t,r){return{dataID:t,node:e,variables:r}}var va={areEqualSelectors:SPe,createReaderSelector:cU,createNormalizationSelector:wPe,getDataIDsFromFragment:aU,getDataIDsFromObject:vPe,getSingularSelector:bb,getPluralSelector:iU,getSelector:oU,getSelectorsFromObject:gPe,getVariablesFromSingularFragment:Gk,getVariablesFromPluralFragment:uU,getVariablesFromFragment:lU,getVariablesFromObject:_Pe},EPe=ga,kPe=EPe.getFragment,CPe=Xp,RPe=CPe.eventShouldThrow,APe=va,TPe=APe.getSelector,vF=Le,bh=[];function $Pe(e,t){bh.push(e);try{return t()}finally{bh.pop()}}function NPe(e,t){if(!bh.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=bh[bh.length-1],n=kPe(e),i=TPe(n,t);i==null&&vF(!1),i.kind!=="SingularReaderSelector"&&vF(!1);var o=r.getDataForResolverFragment(i,t),a=o.data,s=o.isMissingData,l=o.fieldErrors;if(s||l!=null&&l.some(RPe))throw dU;return a}var dU={},Kk={readFragment:NPe,withResolverContext:$Pe,RESOLVER_FRAGMENT_ERRORED_SENTINEL:dU},DPe=Kk;DPe.readFragment;var fU={exports:{}};(function(e){function t(n,i,o,a,s,l,u){try{var d=n[l](u),f=d.value}catch(h){return void o(h)}d.done?i(f):Promise.resolve(f).then(a,s)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(a,s){var l=n.apply(i,o);function u(f){t(l,a,s,u,d,"next",f)}function d(f){t(l,a,s,u,d,"throw",f)}u(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(fU);var hU=fU.exports;function FPe(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var pU=FPe,IPe=pU,os=UPe,lp=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){os=n},e.from=function(n){return PPe(n)?OPe(n):IPe(n)?MPe(n):LPe(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){a=d},next:o.next,complete:o.complete,error:o.error})}catch(u){o.error(u,!0)}}}),function(){return a.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,error:o.error,complete:function(){a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var a=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(u){os(u,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:a("start"),next:a("next"),error:a("error"),complete:a("complete"),unsubscribe:a("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var a=i.subscribe(o);return function(){a.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var a=!1,s;return s=i.subscribe({next:function(u){a=!0,o.next(u)},error:o.error,complete:function(){a?o.complete():s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.subscribe=function(n){return zPe(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var a=i.subscribe({complete:o.complete,error:o.error,next:function(l){try{var u=n(l);o.next(u)}catch(d){o.error(d,!0)}}});return function(){a.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var a=[];function s(u){this._sub=u,a.push(u)}function l(){a.splice(a.indexOf(this._sub),1),a.length===0&&o.complete()}return i.subscribe({start:s,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:s,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){a.forEach(function(u){return u.unsubscribe()}),a.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var a,s,l=function u(){a=i.subscribe({next:o.next,error:o.error,complete:function(){s=setTimeout(u,n)}})};return l(),function(){clearTimeout(s),a.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var a=!1;n.subscribe({next:function(l){a||(a=!0,i(l))},error:o,complete:i})})},e})();function PPe(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function OPe(e){return e instanceof lp?e:lp.create(function(t){return e.subscribe(t)})}function MPe(e){return lp.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function LPe(e){return lp.create(function(t){t.next(e),t.complete()})}function zPe(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){os(l,!0)}n=void 0}}var a=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(a)}catch(u){os(u,!0)}finally{o()}}}});try{t.start&&t.start(a)}catch(l){os(l,!0)}if(r)return a;var s=i({next:function(u){if(!r&&t.next)try{t.next(u)}catch(d){os(d,!0)}},error:function(u,d){if(r||!t.error)r=!0,os(u,d||!1),o();else{r=!0;try{t.error(u)}catch(f){os(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(u){os(u,!0)}finally{o()}}}});try{n=e(s)}catch(l){s.error(l,!0)}return r&&o(),a}function UPe(e,t){}var Gl=lp,mU=He.default,BPe=mU(Jr),Km=mU(Si),jPe=Gl,qPe=Le,VPe=(function(){function e(){var r=this;(0,Km.default)(this,"_complete",!1),(0,Km.default)(this,"_events",[]),(0,Km.default)(this,"_sinks",new Set),(0,Km.default)(this,"_subscription",[]),this._observable=jPe.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var a=i[o];switch(a.kind){case"complete":n.complete();break;case"error":n.error(a.error);break;case"next":n.next(a.data);break;default:a.kind,qPe(!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,BPe.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(a){n.e(a)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),gU=VPe,Hk=Gl,bF=gU,vU=Le,GPe=typeof WeakMap=="function",_F=GPe?new WeakMap:new Map;function KPe(e,t){return bU(e,t.request.identifier,function(){return e.execute({operation:t})})}function bU(e,t,r){return Hk.create(function(n){var i=Wk(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(s){o={identifier:t,subject:new bF,subjectForInFlightStatus:new bF,subscription:s,promise:null},i.set(t,o)},next:function(s){var l=Hm(i,t);l.subject.next(s),l.subjectForInFlightStatus.next(s)},error:function(s){var l=Hm(i,t);l.subject.error(s),l.subjectForInFlightStatus.error(s)},complete:function(){var s=Hm(i,t);s.subject.complete(),s.subjectForInFlightStatus.complete()},unsubscribe:function(s){var l=Hm(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&vU(!1),HPe(i,o).subscribe(n)})}function HPe(e,t){return Hk.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 _U(e,t,r){return Hk.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(a){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function WPe(e,t){var r=Wk(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,a){var s=!1;_U(e,r,n).subscribe({complete:o,error:a,next:function(u){s&&o(u)}}),s=!0});return i}function JPe(e,t){var r=Wk(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:_U(e,r,n)}function Wk(e){var t=_F.get(e);if(t!=null)return t;var r=new Map;return _F.set(e,r),r}function Hm(e,t){var r=e.get(t);return r==null&&vU(!1),r}var _b={fetchQuery:KPe,fetchQueryDeduped:bU,getPromiseForActiveRequest:WPe,getObservableForActiveRequest:JPe},QPe=He.default;hU.default;var YPe=QPe(Jr),yU=Gl,XPe=_b,ZPe=XPe.getObservableForActiveRequest,eOe=ga,tOe=eOe.getFragment,rOe=Xp,nOe=rOe.handlePotentialSnapshotErrors,iOe=va,oOe=iOe.getSelector,Kg=Le;function aOe(e,t,r){var n,i=tOe(t),o=oOe(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&Kg(!1),o==null&&Kg(!1),o.kind){case"SingularReaderSelector":return sOe(e,t,o);case"PluralReaderSelector":return lOe(e,t,o)}Kg(!1)}function sOe(e,t,r){var n=e.lookup(r);return yU.create(function(i){i.next(tv(e,t,r.owner,n));var o=e.subscribe(n,function(a){i.next(tv(e,t,r.owner,a))});return function(){return o.dispose()}})}function lOe(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return yU.create(function(i){var o=n.map(function(s,l){return tv(e,t,r.selectors[l].owner,s)});i.next(yF(o));var a=n.map(function(s,l){return e.subscribe(s,function(u){o[l]=tv(e,t,r.selectors[l].owner,u),i.next(yF(o))})});return function(){return a.forEach(function(s){return s.dispose()})}})}function tv(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&&(ZPe(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{nOe(e,n.fieldErrors)}catch(a){return{error:a,state:"error"}}return n.data==null&&Kg(!1),{state:"ok",value:n.data}}function yF(e){var t=[],r=(0,YPe.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 Jk={observeFragment:aOe};function xU(e){return uOe(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&xU(r)})),e}function uOe(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var SU=xU,cOe=oc,dOe=cOe.stableCopy,fOe=Le;function hOe(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&fOe(!1),r+JSON.stringify(dOe(t))}var wU=hOe,pOe=wU,mOe=Bo,gOe=oc,vOe=gOe.hasCycle,bOe=Vl,_Oe=bOe.getOperationVariables,EU=va,yOe=EU.createNormalizationSelector,xOe=EU.createReaderSelector,SOe=Sr,wOe=SOe.ROOT_ID,EOe=Le;function kOe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:wOe,i=e.operation,o=_Oe(i,e.params.providedVariables,t);mOe.ENABLE_CYLE_DETECTION_IN_VARIABLES&&vOe(o)&&EOe(!1);var a=kU(e,o,r),s={fragment:xOe(e.fragment,n,o,a),request:a,root:yOe(i,n,o)};return s}function kU(e,t,r){var n={identifier:pOe(e.params,t),node:e,variables:t,cacheConfig:r};return n}var Kl={createOperationDescriptor:kOe,createRequestDescriptor:kU},COe=He.default,ROe=COe(Si),AOe=Jk,TOe=AOe.observeFragment,$Oe=Kl,NOe=$Oe.createOperationDescriptor;function DOe(e,t,r){var n=NOe(t,r),i={__id:n.fragment.dataID,__fragments:(0,ROe.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return TOe(e,o,i)}var FOe={observeQuery:DOe},IOe=hU.default,POe=Jk,OOe=POe.observeFragment;function MOe(e,t,r){return NS.apply(this,arguments)}function NS(){return NS=IOe(function*(e,t,r){var n;try{var i,o=yield new Promise(function(s,l){n=OOe(e,t,r).subscribe({next:function(d){d.state==="ok"?s(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(s){var a;throw(a=n)===null||a===void 0||a.unsubscribe(),s}}),NS.apply(this,arguments)}var LOe={waitForFragmentData:MOe},zOe=Jk;zOe.observeFragment;var UOe=FOe;UOe.observeQuery;var BOe=LOe;BOe.waitForFragmentData;function jOe(e){return e.ok===!0}function qOe(e){return e.ok===!1}var VOe={isValueResult:jOe,isErrorResult:qOe},xF=new Map,GOe=1,KOe=HOe(),CU=" ",SF="\v";function HOe(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function WOe(e){return e[0]===CU&&KOe.has(e[1])||e[0]===SF?SF+e:e}function JOe(e,t){if(t==null||e.length<t)return WOe(e);var r=xF.get(e);return r!=null||(r=CU+GOe++,xF.set(e,r)),r}var RU={intern:JOe},wF=Bo,QOe=RU,YOe=QOe.intern,up="client:";function XOe(e,t,r){var n=wF.STRING_INTERN_LEVEL<=0?e:YOe(e,wF.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(up)!==0&&(i=up+i),i}function ZOe(e){return e.indexOf(up)===0}var eMe=0;function tMe(){return"".concat(up,"local:").concat(eMe++)}function rMe(e,t,r){var n="".concat(up).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var Wa={generateClientID:XOe,generateClientObjectClientID:rMe,generateUniqueClientID:tMe,isClientID:ZOe},nMe={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},EF={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"},iMe={inject:function(t){EF=t},get:function(){return EF},isConnectionCall:function(t){return nMe.hasOwnProperty(t.name)}},Qk=iMe,oMe=Wa,cp=oMe.generateClientID,aMe=Sr,sMe=aMe.getStableStorageKey,AU=Q7,ac=Qk,lMe=Le,TU="connection",DS="__connection_next_edge_index";function uMe(e,t){var r=e.get(t.dataID);if(r){var n=ac.get(),i=n.EDGES,o=n.END_CURSOR,a=n.HAS_NEXT_PAGE,s=n.HAS_PREV_PAGE,l=n.PAGE_INFO,u=n.PAGE_INFO_TYPE,d=n.START_CURSOR,f=r.getLinkedRecord(t.fieldKey),h=f&&f.getLinkedRecord(l);if(!f){r.setValue(null,t.handleKey,void 0,r.getErrors(t.fieldKey));return}var p=cp(r.getDataID(),t.handleKey),m=r.getLinkedRecord(t.handleKey),g=m??e.get(p),v=g&&g.getLinkedRecord(l);if(g){m==null&&r.setLinkedRecord(g,t.handleKey);var S=g,E=f.getLinkedRecords(i);E&&(E=E.map(function(X){return FS(e,S,X)}));var C=S.getLinkedRecords(i),A=S.getLinkedRecord(l);S.copyFieldsFrom(f),C&&S.setLinkedRecords(C,i),A&&S.setLinkedRecord(A,l);var T=[],R=t.args;if(C&&E)if(R.after!=null){var N,I=(N=v)===null||N===void 0?void 0:N.getValue(o),M=h?.getValue(o),P=v&&R.after===I,U=v&&I===M;if(P||U){var j=new Set;Wm(C,T,j),Wm(E,T,j)}else return}else if(R.before!=null)if(v&&R.before===v.getValue(d)){var V=new Set;Wm(E,T,V),Wm(C,T,V)}else return;else T=E;else E?T=E:T=C;if(T!=null&&T!==C&&S.setLinkedRecords(T,i),v&&h){if(R.after==null&&R.before==null)v.copyFieldsFrom(h);else if(R.before!=null||R.after==null&&R.last){v.setValue(!!h.getValue(s),s);var Y=h.getValue(d);typeof Y=="string"&&v.setValue(Y,d)}else if(R.after!=null||R.before==null&&R.first){v.setValue(!!h.getValue(a),a);var J=h.getValue(o);typeof J=="string"&&v.setValue(J,o)}}}else{var b=e.create(p,f.getType());b.setValue(0,DS),b.copyFieldsFrom(f);var _=f.getLinkedRecords(i);_&&(_=_.map(function(X){return FS(e,b,X)}),b.setLinkedRecords(_,i)),r.setLinkedRecord(b,t.handleKey),v=e.create(cp(b.getDataID(),l),u),v.setValue(!1,a),v.setValue(!1,s),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),b.setLinkedRecord(v,l)}}}function cMe(e,t,r){var n=AU(TU,t,null);return e.getLinkedRecord(n,r)}function dMe(e,t,r){var n=AU(TU,t,null),i=sMe(n,r);return cp(e,i)}function fMe(e,t,r){var n=ac.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=a.concat(t);else{s=[];for(var l=!1,u=0;u<a.length;u++){var d=a[u];if(s.push(d),d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}}l||s.push(t)}e.setLinkedRecords(s,o)}function hMe(e,t,r,n){var i=ac.get(),o=i.NODE,a=cp(t.getDataID(),r.getDataID()),s=e.get(a);return s||(s=e.create(a,n)),s.setLinkedRecord(r,o),s.getValue("cursor")==null&&s.setValue(null,"cursor"),s}function pMe(e,t,r){var n=ac.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=[t].concat(a);else{s=[];for(var l=!1,u=0;u<a.length;u++){var d=a[u];if(d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}s.push(d)}l||s.unshift(t)}e.setLinkedRecords(s,o)}function mMe(e,t){var r=ac.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var a,s=0;s<o.length;s++){var l=o[s],u=l&&l.getLinkedRecord(i);u!=null&&u.getDataID()===t?a===void 0&&(a=o.slice(0,s)):a!==void 0&&a.push(l)}a!==void 0&&e.setLinkedRecords(a,n)}}function FS(e,t,r){if(r==null)return r;var n=ac.get(),i=n.EDGES,o=t.getValue(DS);typeof o!="number"&&lMe(!1);var a=cp(t.getDataID(),i,o),s=e.create(a,r.getType());return s.copyFieldsFrom(r),s.getValue("cursor")==null&&s.setValue(null,"cursor"),t.setValue(o+1,DS),s}function Wm(e,t,r){for(var n=ac.get(),i=n.NODE,o=0;o<e.length;o++){var a=e[o];if(a){var s=a.getLinkedRecord(i),l=s&&s.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(a)}}}var yb={buildConnectionEdge:FS,createEdge:hMe,deleteNode:mMe,getConnection:cMe,getConnectionID:dMe,insertEdgeAfter:fMe,insertEdgeBefore:pMe,update:uMe},gMe=He.default,dp=gMe(Jr),sc=yb,$U=Qk,cd=Le;var vMe={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)})}}},bMe={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&cd(!1);var o=n.getValue(r.fieldKey),a=Array.isArray(o)?o:[o];a.forEach(function(s){if(typeof s=="string"){var l=(0,dp.default)(i),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=t.get(d);f!=null&&sc.deleteNode(f,s)}}catch(h){l.e(h)}finally{l.f()}}})}}},_Me={update:NU(sc.insertEdgeAfter)},yMe={update:NU(sc.insertEdgeBefore)},xMe={update:DU(sc.insertEdgeAfter)},SMe={update:DU(sc.insertEdgeBefore)};function NU(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs.connections;o==null&&cd(!1);var a,s;try{a=i.getLinkedRecord(r.fieldKey)}catch{}if(!a)try{s=i.getLinkedRecords(r.fieldKey)}catch{}if(!(a==null&&s==null)){var l=$U.get(),u=l.NODE,d=l.EDGES,f=(n=s)!==null&&n!==void 0?n:[a],h=(0,dp.default)(f),p;try{var m=function(){var _=p.value;if(_==null)return"continue";var S=_.getLinkedRecord("node");if(!S)return"continue";var E=S.getDataID(),C=(0,dp.default)(o),A;try{for(C.s();!(A=C.n()).done;){var T=A.value,R=t.get(T);if(R!=null){var N=(g=R.getLinkedRecords(d))===null||g===void 0?void 0:g.some(function(M){var P;return(M==null||(P=M.getLinkedRecord(u))===null||P===void 0?void 0:P.getDataID())===E});if(!N){var I=sc.buildConnectionEdge(t,R,_);I==null&&cd(!1),e(R,I)}}}}catch(M){C.e(M)}finally{C.f()}};for(h.s();!(p=h.n()).done;)var g,v=m()}catch(b){h.e(b)}finally{h.f()}}}}}function DU(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,a=o.connections,s=o.edgeTypeName;a==null&&cd(!1),s==null&&cd(!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=$U.get(),f=d.NODE,h=d.EDGES,p=(n=u)!==null&&n!==void 0?n:[l],m=(0,dp.default)(p),g;try{var v=function(){var E=g.value;if(E==null)return"continue";var C=E.getDataID(),A=(0,dp.default)(a),T;try{for(A.s();!(T=A.n()).done;){var R=T.value,N=t.get(R);if(N!=null){var I=(b=N.getLinkedRecords(h))===null||b===void 0?void 0:b.some(function(P){var U;return(P==null||(U=P.getLinkedRecord(f))===null||U===void 0?void 0:U.getDataID())===C});if(!I){var M=sc.createEdge(t,N,E,s);M==null&&cd(!1),e(N,M)}}}}catch(P){A.e(P)}finally{A.f()}};for(m.s();!(g=m.n()).done;)var b,_=v()}catch(S){m.e(S)}finally{m.f()}}}}}var wMe={AppendEdgeHandler:_Me,DeleteRecordHandler:vMe,PrependEdgeHandler:yMe,AppendNodeHandler:xMe,PrependNodeHandler:SMe,DeleteEdgeHandler:bMe},EMe=yb,Cc=wMe,kMe=Le;function CMe(e){switch(e){case"connection":return EMe;case"deleteRecord":return Cc.DeleteRecordHandler;case"deleteEdge":return Cc.DeleteEdgeHandler;case"appendEdge":return Cc.AppendEdgeHandler;case"prependEdge":return Cc.PrependEdgeHandler;case"appendNode":return Cc.AppendNodeHandler;case"prependNode":return Cc.PrependNodeHandler}kMe(!1)}var RMe=CMe;function AMe(e){return!!(e&&e["@@RelayModernEnvironment"])}var Yk=AMe,TMe=He.default,Xk=TMe(Jr),Kc=yb;var $Me=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),NMe=Object.freeze({APPEND:"append",PREPEND:"prepend"});function DMe(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(a){switch(a.type){case"NODE_DELETE":var s=FMe(a,t);s&&(i.push(s),o.push(s));break;case"RANGE_ADD":var l=IMe(a,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var u=PMe(a,t);u&&(i.push(u),o.push(u));break}}),{optimisticUpdater:function(s,l){i.forEach(function(u){u(s,l)})},updater:function(s,l){o.forEach(function(u){u(s,l)})}}}function FMe(e,t){var r=e.deletedIDFieldName,n=Zk(t);return n?function(i,o){var a=i.getRootField(n);if(a){var s=a.getValue(r),l=Array.isArray(s)?s:[s];l.forEach(function(u){u&&typeof u=="string"&&i.delete(u)})}}:null}function IMe(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=Zk(t);return!n||!o?null:function(a,s){var l=a.get(r);if(l){var u=a.getRootField(o);if(u){var d=u.getLinkedRecord(i),f=(0,Xk.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var m=Kc.getConnection(l,p.key,p.filters);if(m){var g=Kc.buildConnectionEdge(a,m,d);if(g)switch(p.rangeBehavior){case"append":Kc.insertEdgeAfter(m,g);break;case"prepend":Kc.insertEdgeBefore(m,g);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function PMe(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var a=Zk(t);return a?function(s,l){if(l){var u=[],d=l[a];if(d&&Array.isArray(o)){var f=(0,Xk.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(m){f.e(m)}finally{f.f()}Array.isArray(d)?d.forEach(function(m){m&&m.id&&typeof m=="object"&&typeof m.id=="string"&&u.push(m.id)}):d&&d.id&&typeof d.id=="string"&&u.push(d.id)}else d&&typeof o=="string"&&typeof d=="object"&&(d=d[o],typeof d=="string"?u.push(d):Array.isArray(d)&&d.forEach(function(m){typeof m=="string"&&u.push(m)}));OMe(r,n,i,s,u)}}:null}function OMe(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var a=o,s=1;s<r.length-1;s++)a&&(a=a.getLinkedRecord(r[s]));if(!(!t||!a)){var l=(0,Xk.default)(t),u;try{var d=function(){var h=u.value,p=Kc.getConnection(a,h.key,h.filters);p&&i.forEach(function(m){Kc.deleteNode(p,m)})};for(l.s();!(u=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function Zk(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var xb={MutationTypes:$Me,RangeOperations:NMe,convert:DMe},MMe=ga,LMe=MMe.getRequest,zMe=Yk,UMe=Kl,BMe=UMe.createOperationDescriptor,jMe=xb,qMe=Le;function VMe(e,t){zMe(e)||qMe(!1);var r=LMe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,a=t.variables,s=BMe(r,a);if(i){var l=jMe.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:s,response:o,updater:n})}var GMe=VMe;function KMe(e,t){e.commitUpdate(t)}var HMe=KMe,WMe=He.default;WMe(tr);var JMe=He.default,kF=JMe(ql),QMe=ga,YMe=QMe.getRequest,XMe=Wa,ZMe=XMe.generateUniqueClientID,e6e=Yk,t6e=Kl,r6e=t6e.createOperationDescriptor,n6e=xb,i6e=Le;function o6e(e,t){e6e(e)||i6e(!1);var r=YMe(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");if(r.kind!=="Request")throw new Error("commitMutation: Expected mutation to be of type request");var n=t.optimisticResponse,i=t.optimisticUpdater,o=t.updater,a=t.configs,s=t.cacheConfig,l=t.onError,u=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=r6e(r,d,s,ZMe());if(typeof n=="function"&&(n=n()),a){var p=n6e.convert(a,r,i,o);i=p.optimisticUpdater,o=p.updater}var m=[],g=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(b){var _;Array.isArray(b)?b.forEach(function(S){S.errors&&m.push.apply(m,(0,kF.default)(S.errors))}):b.errors&&m.push.apply(m,(0,kF.default)(b.errors)),(_=t.onNext)===null||_===void 0||_.call(t)},complete:function(){var b=t.onCompleted;if(b){var _=e.lookup(h.fragment);b(_.data,m.length!==0?m:null)}},error:l,unsubscribe:u});return{dispose:g.unsubscribe}}var a6e=o6e,s6e=typeof WeakMap=="function",Fy=s6e?new WeakMap:new Map;function FU(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(!Fy.has(i))Fy.set(i,o),r[n]=o;else{var a=Fy.get(i);r[n]=a}}),r}else return e}FU.tests_only_resetDebugCache=void 0;var l6e=FU,CF=Gl;function u6e(e){return function(r,n,i,o,a){var s=e(r,n,i,o,a);return s instanceof Error?CF.create(function(l){return l.error(s)}):CF.from(s)}}var c6e={convertFetch:u6e},d6e=l6e,f6e=c6e,h6e=f6e.convertFetch,Iy=Le;function p6e(e,t){var r=h6e(e);function n(i,o,a,s,l){var u=d6e(o,i.providedVariables);if(i.operationKind==="subscription")return t||Iy(!1),s&&Iy(!1),t(i,u,a);var d=a.poll;return d!=null?(s&&Iy(!1),r(i,u,{force:!0}).poll(d)):r(i,u,a,s,l)}return{execute:n}}var m6e={create:p6e},g6e=He.default;g6e(tr);var v6e=oc;v6e.stableCopy;var b6e=He.default,_6e=b6e(tr),y6e=Gl,x6e=Kl,S6e=x6e.createOperationDescriptor,w6e=Xp,E6e=w6e.handlePotentialSnapshotErrors,k6e=_b,C6e=ga,R6e=C6e.getRequest,A6e=Le;function T6e(e,t,r,n){var i,o=R6e(t);o.params.operationKind!=="query"&&A6e(!1);var a=(0,_6e.default)({force:!0},n?.networkCacheConfig),s=S6e(o,r,a),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function u(d){return E6e(e,d.fieldErrors),d.data}switch(l){case"network-only":return RF(e,s).map(u);case"store-or-network":return e.check(s).status==="available"?y6e.from(e.lookup(s.fragment)).map(u):RF(e,s).map(u);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function RF(e,t){return k6e.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var $6e=T6e,N6e=Kl,D6e=N6e.createOperationDescriptor,F6e=ga,I6e=F6e.getRequest;function P6e(e,t,r,n){var i=I6e(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=D6e(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var O6e=P6e,M6e=(function(){function e(){this._preloadableQueries=new Map,this._callbacks=new Map}var t=e.prototype;return t.set=function(n,i){this._preloadableQueries.set(n,i);var o=this._callbacks.get(n);o?.forEach(function(a){try{a(i)}catch(s){setTimeout(function(){throw s},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,a=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;a.add(i);var s=function(){a.delete(i)};return this._callbacks.set(n,a),{dispose:s}},t.clear=function(){this._preloadableQueries.clear()},e})(),L6e=new M6e,z6e=L6e,U6e=_b,B6e=U6e.getPromiseForActiveRequest;function j6e(e,t,r){var n,i,o=[],a=B6e(e,r);if(a!=null)o=[r];else{var s,l,u=e.getOperationTracker(),d=u.getPendingOperationsAffectingOwner(r);o=(s=d?.pendingOperations)!==null&&s!==void 0?s:[],a=(l=d?.promise)!==null&&l!==void 0?l:null}if(!a)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(m){return m.node.params.name}).join(","))!==null&&n!==void 0?n:null;(f==null||f.length===0)&&(f="Unknown pending operation");var h=t.name,p=f===h?"Relay(".concat(f,")"):"Relay(".concat(f,":").concat(h,")");return a.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:a,pendingOperations:o}}var IU=j6e;function q6e(e,t){return e===t&&(e===null||typeof e!="object")}var PU=q6e;function V6e(e,t){return IS(e,t,!0)}function IS(e,t,r){if(e===t||typeof e!="object"||!e||e.constructor!==Object&&!Array.isArray(e)||typeof t!="object"||!t||t.constructor!==Object&&!Array.isArray(t))return t;var n=!1,i=Array.isArray(e)?e:null,o=Array.isArray(t)?t:null;if(i&&o){var a=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,m){var g=i[m],v=IS(g,p,a);return v!==o[m]&&a&&(o[m]=v),h&&v===i[m]},!0)&&i.length===o.length}else if(!i&&!o){var s=e,l=t,u=Object.keys(s),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var m=s[p],g=IS(m,l[p],f);return g!==l[p]&&f&&(l[p]=g),h&&g===s[p]},!0)&&u.length===d.length}return n?e:t}var Sb=V6e,OU=He.default,AF=OU(tr),eC=OU(Si),G6e=IU,K6e=Xp,H6e=K6e.handlePotentialSnapshotErrors,W6e=PU,J6e=Sb,MU=Bo,Q6e=Kl,Y6e=Q6e.createRequestDescriptor,tC=va,X6e=tC.areEqualSelectors,Z6e=tC.createReaderSelector,e4e=tC.getSelectorsFromObject,t4e=Bs,TF=Le,r4e=(function(){function e(r,n,i,o,a){var s=this;(0,eC.default)(this,"_onChange",function(){s._stale=!0,typeof s._callback=="function"&&s._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=a,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&LU(this._resolvers[n])},t.resolve=function(){if(this._stale){var n=this._data,i;for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o],s=n[o];if(a){var l=a.resolve();(i||l!==s)&&(i=i||(0,AF.default)({},n),i[o]=l)}else{var u=this._props[o],d=u!==void 0?u:null;(i||!W6e(d,s))&&(i=i||(0,AF.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,MU.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=e4e(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var a=i[o],s=this._resolvers[o];a==null?(s?.dispose(),s=null):a.kind==="PluralReaderSelector"?s==null?s=new $F(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof $F||TF(!1),s.setSelector(a)):s==null?s=new PS(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof PS||TF(!1),s.setSelector(a)),this._props[o]=n[o],this._resolvers[o]=s}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o];a&&a.setVariables(n,i)}this._stale=!0},e})(),PS=(function(){function e(r,n,i,o,a){var s=this;(0,eC.default)(this,"_onChange",function(u){s._data=u.data,s._isMissingData=u.isMissingData,s._fieldErrors=u.fieldErrors,s._callback()});var l=r.lookup(i);this._callback=a,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,MU.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=G6e(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,a=(o=n?.pendingOperations)!==null&&o!==void 0?o:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:a}),i}}return H6e(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&X6e(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=J6e(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(!t4e(n,this._selector.variables)){var o=Y6e(i,n),a=Z6e(this._selector.node,this._selector.dataID,n,o);this.setSelector(a)}},e})(),$F=(function(){function e(r,n,i,o,a){var s=this;(0,eC.default)(this,"_onChange",function(l){s._stale=!0,s._callback()}),this._callback=a,this._data=[],this._environment=r,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=n,this._subscribeOnConstruction=o,this.setSelector(i)}var t=e.prototype;return t.dispose=function(){this._resolvers.forEach(LU)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var a=n[o],s=this._resolvers[o].resolve();(i||s!==a)&&(i=i||n.slice(0,o),i.push(s))}!i&&this._resolvers.length!==n.length&&(i=n.slice(0,this._resolvers.length)),this._data=i||n,this._stale=!1}return this._data},t.setSelector=function(n){for(var i=n.selectors;this._resolvers.length>i.length;){var o=this._resolvers.pop();o.dispose()}for(var a=0;a<i.length;a++)a<this._resolvers.length?this._resolvers[a].setSelector(i[a]):this._resolvers[a]=new PS(this._environment,this._rootIsQueryRenderer,i[a],this._subscribeOnConstruction,this._onChange);this._stale=!0},t.setVariables=function(n,i){this._resolvers.forEach(function(o){return o.setVariables(n,i)}),this._stale=!0},e})();function LU(e){e&&e.dispose()}var n4e=r4e,i4e=n4e;function o4e(e,t,r,n,i,o){return new i4e(e,r,n,o,i)}var a4e=o4e,s4e=Le,Py,NF;function l4e(e){return Py||(Py=e.createContext(null),NF=e),e!==NF&&s4e(!1),Py}var u4e=l4e,c4e=Le,Oy,DF;function d4e(e){return Oy||(Oy=e.createContext(null),DF=e),e!==DF&&c4e(!1),Oy}var f4e=d4e,zU=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function h4e(){return zU}function p4e(e){return e===zU}var wb={isSuspenseSentinel:p4e,suspenseSentinel:h4e},UU={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})(UU);var uf=UU.exports,Eb=He.default,m4e=Eb(Si),FF=Eb(uf),IF=Eb(M7),yl=Eb(tr),g4e=SU,BU=Wa,jU=BU.generateClientObjectClientID;BU.isClientID;var v4e=wb,qU=v4e.isSuspenseSentinel,js=Sr,OS=js.ACTOR_IDENTIFIER_KEY,Hn=js.ERRORS_KEY,rC=js.ID_KEY,b4e=js.INVALIDATED_AT_KEY,Ml=js.REF_KEY,Nd=js.REFS_KEY,VU=js.RELAY_RESOLVER_VALUE_KEY;js.ROOT_ID;var nC=js.TYPENAME_KEY,My=Bs,Hu=Le;function _4e(e){return(0,yl.default)({},e)}function y4e(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==rC&&r!==nC&&(t[r]=e[r])}function x4e(e,t){var r={};return r[rC]=e,r[nC]=t,r}function S4e(e){return e}function w4e(e){return e[rC]}function E4e(e){return Hn in e?Object.keys(e).filter(function(t){return t!==Hn}):Object.keys(e)}function k4e(e){return e[nC]}function C4e(e,t){var r;return(r=e[Hn])===null||r===void 0?void 0:r[t]}function iC(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(Ml)&&!r.hasOwnProperty(Nd)||Hu(!1)),r}function R4e(e,t){return t in e}function A4e(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[Ml]=="string"||Hu(!1),n[Ml]}function T4e(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[Ml]=="string"}function $4e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[Nd])||Hu(!1),r[Nd])}function N4e(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[Nd])&&r[Nd].every(function(n){return typeof n=="string"})}function D4e(e){if(e==null)return null;var t=e[b4e];return typeof t!="number"?null:t}function F4e(e,t){var r,n=e[Hn],i=t[Hn],o=null;if(n==null&&i==null){var a;for(var s in t)(o||!My(e[s],t[s]))&&(o=o!==null?o:(0,yl.default)({},e),o[s]=t[s]);return(a=o)!==null&&a!==void 0?a:e}for(var l in t)if(l!==Hn){var u=t[l],d=i?.[l];if(o==null){var f=e[l],h=n?.[l];if(My(f,u)&&My(h,d))continue;o=(0,yl.default)({},e),n!=null&&(o[Hn]=(0,yl.default)({},n))}KU(o,l,u),GU(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function I4e(e,t){if(Hn in e||Hn in t){var r=e[Hn],n=(0,FF.default)(e,[Hn].map(IF.default)),i=t[Hn],o=(0,FF.default)(t,[Hn].map(IF.default)),a=(0,yl.default)((0,yl.default)({},n),o);if(r==null&&i==null)return a;var s={};for(var l in r)o.hasOwnProperty(l)||(s[l]=r[l]);for(var u in i)s[u]=i[u];for(var d in s){a[Hn]=s;break}return a}else return(0,yl.default)((0,yl.default)({},e),t)}function P4e(e){g4e(e)}function GU(e,t,r){var n=e[Hn];if(r!=null&&r.length>0)n==null?e[Hn]=(0,m4e.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[Hn]}}function KU(e,t,r){e[t]=r}function O4e(e,t,r){var n={};n[Ml]=r,e[t]=n}function M4e(e,t,r){var n={};n[Nd]=r,e[t]=n}function L4e(e,t,r,n){var i={};i[Ml]=n,i[OS]=r,e[t]=i}function z4e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[Ml]=="string"&&r[OS]!=null||Hu(!1),[r[OS],r[Ml]])}function U4e(e,t){var r=iC(e,VU);return r==null||qU(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&Hu(!1),jU(t,r))}function B4e(e,t){var r=iC(e,VU);return r==null||qU(r)?null:(Array.isArray(r)||Hu(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&Hu(!1),jU(t,n))}))}function j4e(e){return e}var so={clone:_4e,copyFields:y4e,create:x4e,freeze:P4e,fromObject:S4e,getDataID:w4e,getErrors:C4e,getFields:E4e,getInvalidationEpoch:D4e,getLinkedRecordID:A4e,getLinkedRecordIDs:$4e,getType:k4e,getValue:iC,hasValue:R4e,hasLinkedRecordID:T4e,hasLinkedRecordIDs:N4e,merge:I4e,setErrors:GU,setValue:KU,setLinkedRecordID:O4e,setLinkedRecordIDs:M4e,update:F4e,getActorLinkedRecordID:z4e,setActorLinkedRecordID:L4e,getResolverLinkedRecordID:U4e,getResolverLinkedRecordIDs:B4e,toJSON:j4e},q4e={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},kb=q4e,V4e=He.default,G4e=V4e(Jr),PF=so,oC=kb,K4e=oC.EXISTENT,H4e=oC.NONEXISTENT,W4e=oC.UNKNOWN,J4e=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],a=PF.fromObject(o);n._records.set(i,a)})}e.create=function(n){return new e(n)};var t=e.prototype;return t.clear=function(){this._records=new Map},t.delete=function(n){this._records.set(n,null)},t.get=function(n){return this._records.get(n)},t.getRecordIDs=function(){return Array.from(this._records.keys())},t.getStatus=function(n){return this._records.has(n)?this._records.get(n)==null?H4e:K4e:W4e},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,G4e.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a[0],l=a[1];n[s]=PF.toJSON(l)}}catch(u){i.e(u)}finally{i.f()}return n},e})(),lc=J4e,Q4e=Le,HU="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function Y4e(e){e!==HU&&Q4e(!1)}var aC={assertInternalActorIdentifier:Y4e,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:HU},MS="actor_key",X4e=aC,Z4e=X4e.getActorIdentifier;function eLe(e){if(e!=null&&typeof e=="object"&&typeof e[MS]=="string")return Z4e(e[MS])}var tLe={ACTOR_IDENTIFIER_FIELD_NAME:MS,getActorIdentifierFromPayload:eLe},Cb=He.default,OF=Cb(tr),rLe=Cb(uf),WU=Cb(Jr),nLe=Cb(ql),iLe=["path","locations"],LS=Symbol("$SELF");function oLe(e){if(e==null)return null;var t=new Map,r=(0,WU.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,a=i.locations,s=(0,rLe.default)(i,iLe);if(o!=null){var l=o.length;if(l!==0){for(var u=l-1,d=t,f=0;f<u;f++){var h=o[f],p=d.get(h);if(p instanceof Map){d=p;continue}var m=new Map;Array.isArray(p)&&m.set(LS,p),d.set(h,m),d=m}var g=o[u],v=d.get(g);v instanceof Map&&(d=v,v=d.get(g),g=LS),Array.isArray(v)?v.push(s):d.set(g,[s])}}}}catch(b){r.e(b)}finally{r.f()}return t}function aLe(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return JU(r,n),n}function JU(e,t){var r=(0,WU.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],a=i[1],s=t.length;if(Array.isArray(a)?t.push.apply(t,(0,nLe.default)(a)):JU(a,t),o!==LS)for(var l=t.length,u=s;u<l;u++){var d=t[u];d.path==null?t[u]=(0,OF.default)((0,OF.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function sLe(e,t){var r=e.get(t);return r instanceof Map?r:null}var lLe={buildErrorTrie:oLe,getNestedErrorTrieByKey:sLe,getErrorsByKey:aLe},uLe="client:__type:",cLe="__TypeSchema";function dLe(e){return uLe+e}var Rb={generateTypeID:dLe,TYPE_SCHEMA_TYPE:cLe},QU=He.default,fLe=QU(Jr),If=QU(ql),YU=tLe;YU.ACTOR_IDENTIFIER_FIELD_NAME;var hLe=YU.getActorIdentifierFromPayload,MF=Bo,XU=Wa,Ly=XU.generateClientID,pLe=XU.isClientID,mLe=Vl,gLe=mLe.getLocalVariables,sC=lLe,vLe=sC.buildErrorTrie,bLe=sC.getErrorsByKey,LF=sC.getNestedErrorTrieByKey,gt=so,_Le=va,yLe=_Le.createNormalizationSelector,uc=Sr,xLe=uc.ROOT_ID,SLe=uc.TYPENAME_KEY,zF=uc.getArgumentValues,wLe=uc.getHandleStorageKey,ELe=uc.getModuleComponentKey,kLe=uc.getModuleOperationKey,zy=uc.getStorageKey,ZU=Rb,Uy=ZU.TYPE_SCHEMA_TYPE,By=ZU.generateTypeID,Ei=Le;function CLe(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,u=new RLe(e,l,n,o??!1);return u.normalizeResponse(s,a,r,i)}var RLe=(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,If.default)(i.path):[],this._recordSource=r,this._variables=n,this._shouldProcessClientComponents=i.shouldProcessClientComponents,this._log=i.log}var t=e.prototype;return t.normalizeResponse=function(n,i,o,a){var s=this._recordSource.get(i);return s||Ei(!1),this._assignClientAbstractTypes(n),this._errorTrie=vLe(a),this._traverseSelections(n,s,o),{errors:a,fieldPayloads:this._handleFieldPayloads,incrementalPlaceholders:this._incrementalPlaceholders,followupPayloads:this._followupPayloads,source:this._recordSource,isFinal:!1}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,fLe.default)(i[s]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=By(d),h=this._recordSource.get(f);h==null&&(h=gt.create(f,Uy),this._recordSource.set(f,h)),gt.setValue(h,s,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Ei(!1),this._variables[n]},t._getRecordType=function(n){var i=n[SLe];return i==null&&Ei(!1),i},t._traverseSelections=function(n,i,o){for(var a=0;a<n.selections.length;a++){var s=n.selections[a];switch(s.kind){case"ScalarField":case"LinkedField":this._normalizeField(s,i,o);break;case"Condition":var l=!!this._getVariableValue(s.condition);l===s.passingValue&&this._traverseSelections(s,i,o);break;case"FragmentSpread":{var u=this._variables;this._variables=gLe(this._variables,s.fragment.argumentDefinitions,s.args),this._traverseSelections(s.fragment,i,o),this._variables=u;break}case"InlineFragment":{var d=s.abstractKey;if(d==null){var f=gt.getType(i);f===s.type&&this._traverseSelections(s,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=gt.getType(i),m=By(p),g=this._recordSource.get(m);g==null&&(g=gt.create(m,Uy),this._recordSource.set(m,g)),gt.setValue(g,d,h),h&&this._traverseSelections(s,i,o)}break}case"TypeDiscriminator":{var v=s.abstractKey,b=Object.prototype.hasOwnProperty.call(o,v),_=gt.getType(i),S=By(_),E=this._recordSource.get(S);E==null&&(E=gt.create(S,Uy),this._recordSource.set(S,E)),gt.setValue(E,v,b);break}case"LinkedHandle":case"ScalarHandle":var C=s.args?zF(s.args,this._variables):{},A=zy(s,this._variables),T=wLe(s,this._variables);this._handleFieldPayloads.push({args:C,dataID:gt.getDataID(i),fieldKey:A,handle:s.handle,handleKey:T,handleArgs:s.handleArgs?zF(s.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(s,i,o);break;case"Defer":this._normalizeDefer(s,i,o);break;case"Stream":this._normalizeStream(s,i,o);break;case"ClientExtension":var R=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(s,i,o),this._isClientExtension=R;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(s.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(s,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(s,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(s.backingField,i,o);break;default:Ei(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var a=n.if===null||this._getVariableValue(n.if);a===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,If.default)(this._path),selector:yLe(n,gt.getDataID(i),this._variables),typeName:gt.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,o){this._traverseSelections(n,i,o);var a=n.if===null||this._getVariableValue(n.if);a===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,If.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||Ei(!1);var a=gt.getType(i),s=ELe(n.documentName),l=n.componentModuleProvider||o[s];gt.setValue(i,s,l??null);var u=kLe(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,If.default)(this._path),typeName:a,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||Ei(!1);var a=n.alias||n.name,s=zy(n,this._variables),l=o[a],u=MF.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(l)&&l.length===0;if(l==null||u){if(l===void 0){var d=this._isClientExtension||this._isUnmatchedAbstractType;if(d)return;if(!this._treatMissingFieldsAsNull)return}n.kind==="ScalarField"&&this._validateConflictingFieldsWithIdenticalId(i,s,null),u?n.kind==="LinkedField"?gt.setLinkedRecordIDs(i,s,[]):gt.setValue(i,s,[]):gt.setValue(i,s,null);var f=this._errorTrie;if(f!=null){var h=bLe(f,a);h!=null&>.setErrors(i,s,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,s,l),gt.setValue(i,s,l);else if(n.kind==="LinkedField"){this._path.push(a);var p=this._errorTrie;this._errorTrie=p==null?null:LF(p,a),n.plural?this._normalizePluralLink(n,i,s,l):this._normalizeLink(n,i,s,l),this._errorTrie=p,this._path.pop()}else Ei(!1)},t._normalizeActorChange=function(n,i,o){var a,s=n.linkedField;typeof o=="object"&&o||Ei(!1);var l=s.alias||s.name,u=zy(s,this._variables),d=o[l];if(d==null){if(d===void 0){var f=this._isClientExtension||this._isUnmatchedAbstractType;if(f)return;if(!this._treatMissingFieldsAsNull)return}gt.setValue(i,u,null);return}var h=hLe(d);if(h==null){gt.setValue(i,u,null);return}var p=(a=s.concreteType)!==null&&a!==void 0?a:this._getRecordType(d),m=this._getDataId(d,p)||gt.getLinkedRecordID(i,u)||Ly(gt.getDataID(i),u);typeof m!="string"&&Ei(!1),gt.setActorLinkedRecordID(i,u,h,m),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:m,path:[].concat((0,If.default)(this._path),[l]),typeName:p,variables:this._variables,node:s,actorIdentifier:h})},t._normalizeLink=function(n,i,o,a){var s;typeof a=="object"&&a||Ei(!1);var l=this._getDataId(a,(s=n.concreteType)!==null&&s!==void 0?s:this._getRecordType(a))||gt.getLinkedRecordID(i,o)||Ly(gt.getDataID(i),o);typeof l!="string"&&Ei(!1),this._validateConflictingLinkedFieldsWithIdenticalId(gt.getLinkedRecordID(i,o),l,o),gt.setLinkedRecordID(i,o,l);var u=this._recordSource.get(l);if(u)this._validateRecordType(u,n,a);else{var d=n.concreteType||this._getRecordType(a);u=gt.create(l,d),this._recordSource.set(l,u)}this._traverseSelections(n,u,a)},t._normalizePluralLink=function(n,i,o,a){var s=this;Array.isArray(a)||Ei(!1);var l=gt.getLinkedRecordIDs(i,o),u=[];a.forEach(function(d,f){var h;if(d==null){u.push(d);return}s._path.push(String(f));var p=s._errorTrie;s._errorTrie=p==null?null:LF(p,f),typeof d!="object"&&Ei(!1);var m=s._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:s._getRecordType(d))||l&&l[f]||Ly(gt.getDataID(i),o,f);typeof m!="string"&&Ei(!1),u.push(m);var g=s._recordSource.get(m);if(g)s._validateRecordType(g,n,d);else{var v=n.concreteType||s._getRecordType(d);g=gt.create(m,v),s._recordSource.set(m,g)}l&&s._validateConflictingLinkedFieldsWithIdenticalId(l[f],m,o),s._traverseSelections(n,g,d),s._errorTrie=p,s._path.pop()}),gt.setLinkedRecordIDs(i,o,u)},t._validateRecordType=function(n,i,o){if(MF.ENABLE_STORE_ID_COLLISION_LOGGING){var a,s=(a=i.concreteType)!==null&&a!==void 0?a:this._getRecordType(o),l=gt.getDataID(n),u=pLe(l)&&l!==xLe||gt.getType(n)===s;if(!u){var d={name:"idCollision.typename",previous_typename:gt.getType(n),new_typename:s};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),eB={normalize:CLe},Ab=He.default,UF=Ab(tr),ALe=Ab(so),TLe=Ab(lc),$Le=Ab(eB);function NLe(e,t,r,n,i){var o,a=e.data,s=e.errors,l=TLe.default.create(),u=ALe.default.create(t.dataID,r);l.set(t.dataID,u);var d=$Le.default.normalize(l,t,a,n,s,i);return(0,UF.default)((0,UF.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var DLe=NLe,FLe=ga,ILe=FLe.getInlineDataFragment,PLe=Sr,OLe=PLe.FRAGMENTS_KEY,BF=Le;function MLe(e,t){var r,n=ILe(e);if(t==null)return t;typeof t!="object"&&BF(!1);var i=(r=t[OLe])===null||r===void 0?void 0:r[n.name];return i==null&&BF(!1),i}var LLe=MLe,zLe=1e5;function ULe(){return zLe++}var tB=ULe,BLe=tB;function jLe(e,t){return{execute:function(n,i,o,a,s,l,u,d){var f=BLe(),h={start:function(g){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(g){e.__log({name:"network.next",networkRequestId:f,response:g})},error:function(g){e.__log({name:"network.error",networkRequestId:f,error:g})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(g){e.__log({name:"network.info",networkRequestId:f,info:g})};return t.execute(n,i,o,a,p,l,u,d).do(h)}}}var qLe=jLe,VLe=He.default,Pf=VLe(Jr),GLe=Le,KLe=(function(){function e(){this._ownersToPendingOperations=new Map,this._pendingOperationsToOwners=new Map,this._ownersToPendingPromise=new Map}var t=e.prototype;return t.update=function(n,i){if(i.size!==0){var o=n.identifier,a=new Set,s=(0,Pf.default)(i),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),a.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),a.add(d))}}catch(v){s.e(v)}finally{s.f()}if(a.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,Pf.default)(a),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;this._resolveOwnerResolvers(g),h.add(g)}}catch(v){p.e(v)}finally{p.f()}this._pendingOperationsToOwners.set(o,h)}}},t.complete=function(n){var i=n.identifier,o=this._pendingOperationsToOwners.get(i);if(o!=null){var a=new Set,s=new Set,l=(0,Pf.default)(o),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=this._ownersToPendingOperations.get(d);f&&(f.delete(i),f.size>0?s.add(d):a.add(d))}}catch(_){l.e(_)}finally{l.f()}var h=(0,Pf.default)(a),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;this._resolveOwnerResolvers(m),this._ownersToPendingOperations.delete(m)}}catch(_){h.e(_)}finally{h.f()}var g=(0,Pf.default)(s),v;try{for(g.s();!(v=g.n()).done;){var b=v.value;this._resolveOwnerResolvers(b)}}catch(_){g.e(_)}finally{g.f()}this._pendingOperationsToOwners.delete(i)}},t._resolveOwnerResolvers=function(n){var i=this._ownersToPendingPromise.get(n);i?.resolve(),this._ownersToPendingPromise.delete(n)},t.getPendingOperationsAffectingOwner=function(n){var i=n.identifier,o=this._ownersToPendingOperations.get(i);if(o==null||o.size===0)return null;var a=this._ownersToPendingPromise.get(i);if(a!=null)return{promise:a.promise,pendingOperations:a.pendingOperations};var s,l=new Promise(function(d){s=d});s==null&&GLe(!1);var u=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:s,pendingOperations:u}),{promise:l,pendingOperations:u}},e})(),HLe=KLe;function WLe(e){var t=typeof Jg<"u"?Jg:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var JLe=WLe,QLe=Wa,YLe=QLe.generateClientID,XLe=Sr,ZLe=XLe.ROOT_ID,e8e=YLe(ZLe,"viewer"),t8e="Viewer",lC={VIEWER_ID:e8e,VIEWER_TYPE:t8e},rB=lC,r8e=rB.VIEWER_ID,n8e=rB.VIEWER_TYPE;function i8e(e,t){return t===n8e&&e.id==null?r8e:e.id}var nB=i8e,o8e=function(t){},a8e=o8e,iB=ic,s8e=iB.REQUEST,l8e=iB.SPLIT_OPERATION;function u8e(e){switch(e.kind){case s8e:return e.operation;case l8e:default:return e}}var uC=u8e;function jF(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];var a=0,s=r.replace(/%s/g,function(){return String(i[a++])}),l=new Error(s),u=Object.assign(l,{name:t,messageFormat:r,messageParams:i,type:e,taalOpcodes:[2,2]});if(u.stack===void 0)try{throw u}catch{}return u}var c8e={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 jF.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 jF.apply(void 0,["warn",t,r].concat(i))}},jy,qy,d8e=typeof window<"u"&&typeof((jy=window)===null||jy===void 0||(qy=jy.performance)===null||qy===void 0?void 0:qy.now)=="function";function qF(){return d8e?window.performance.now():Date.now()}function f8e(e){var t=qF(),r=e();return[t,qF()-t,r]}var h8e=f8e,oB=He.default,Of=oB(Jr),Mf=oB(ql),Vy=Gl,p8e=tB,Gy=uC,m8e=c8e,Jm=Bo,g8e=oc,v8e=g8e.stableCopy,b8e=h8e,aB=Wa,VF=aB.generateClientID,_8e=aB.generateUniqueClientID,y8e=Vl,x8e=y8e.getLocalVariables,Qm=so,sB=va,Ky=sB.createNormalizationSelector,S8e=sB.createReaderSelector,Ym=lc,cC=Sr,GF=cC.ROOT_TYPE,w8e=cC.TYPENAME_KEY,E8e=cC.getStorageKey,en=Le;function k8e(e){return new C8e(e)}var C8e=(function(){function e(r){var n=this,i,o,a,s=r.actorIdentifier,l=r.getDataID,u=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,m=r.operationLoader,g=r.operationTracker,v=r.optimisticConfig,b=r.scheduler,_=r.shouldProcessClientComponents,S=r.sink,E=r.source,C=r.treatMissingFieldsAsNull,A=r.updater,T=r.log,R=r.normalizeResponse;this._actorIdentifier=s,this._getDataID=l,this._treatMissingFieldsAsNull=C,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=T,this._executeId=p8e(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=m,this._operationTracker=g,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(i=(o=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&o!==void 0?o:((a=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=u,this._scheduler=b,this._sink=S,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=A,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=_,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=R;var N=this._nextSubscriptionId++;Jm.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),E.subscribe({complete:function(){return n._complete(N)},error:function(M){return n._error(M)},next:function(M){try{n._next(N,M)}catch(P){S.error(P)}},start:function(M){var P;n._start(N,M),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(P=n._operation.request.cacheConfig)!==null&&P!==void 0?P:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!Jm.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,en(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,a=this._scheduler;if(a!=null){var s=this._nextSubscriptionId++;Vy.create(function(l){var u=a.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return a.cancel(u)}}).subscribe({complete:function(){return o._complete(s)},error:function(u){return o._error(u)},start:function(u){return o._start(s,u)}})}else n()},t._complete=function(n){this._subscriptions.delete(n),this._subscriptions.size===0&&(this.cancel(),this._sink.complete(),this._log({name:"execute.complete",executeId:this._executeId}))},t._error=function(n){this.cancel(),this._sink.error(n),this._log({name:"execute.error",executeId:this._executeId,error:n})},t._start=function(n,i){this._subscriptions.set(n,i),this._updateActiveState()},t._next=function(n,i){var o=this,a=this._state==="loading_incremental"?"low":"default";this._schedule(function(){o._log({name:"execute.next.start",executeId:o._executeId,response:i,operation:o._operation}),o._handleNext(i),o._maybeCompleteSubscriptionOperationTracking(),o._log({name:"execute.next.end",executeId:o._executeId,response:i,operation:o._operation})},a)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(a){if(!(a.data===null&&a.extensions!=null&&!a.hasOwnProperty("errors")))if(a.data==null){var s=a.hasOwnProperty("errors")&&a.errors!=null?a.errors:null,l=s?s.map(function(f){var h=f.message;return h}).join(`
|
|
123
|
+
`):"(No errors)",u=m8e.create("RelayNetwork","No data returned for operation `"+i._operation.request.node.params.name+"`, got error(s):\n"+l+"\n\nSee the error `source` property for more information.");throw u.source={errors:s,operation:i._operation.request.node,variables:i._operation.request.variables},u.stack,u}else{var d=a;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(s){var l;return((l=s.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&en(!1),!1;var o=n[0],a=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return a&&this._state!=="started"&&en(!1),a?(this._processOptimisticResponse(o,null,this._treatMissingFieldsAsNull),this._sink.next(o),!0):!1},t._handleNext=function(n){if(this._state!=="completed"){this._seenActors.clear();var i=Array.isArray(n)?n:[n],o=this._handleErrorResponse(i);if(o.length===0){var a=i.some(function(R){var N;return((N=R.extensions)===null||N===void 0?void 0:N.is_final)===!0});a&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var s=this._handleOptimisticResponses(o);if(!s){var l=R8e(o),u=l[0],d=l[1],f=l[2],h=u.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var m=_8e();this._operation={request:this._operation.request,fragment:S8e(this._operation.fragment.node,m,this._operation.fragment.variables,this._operation.fragment.owner),root:Ky(this._operation.root.node,m,this._operation.root.variables)}}var g=this._processResponses(u);this._processPayloadFollowups(g)}if(p)for(var v=[],b=0;b<f.length;b++){var _,S=f[b],E=new Ym(S.data),a=((_=S.extensions)===null||_===void 0?void 0:_.is_final)===!0,C={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:a,source:E};this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,this._updater),v.push(C),this._execTimeResolverResponseComplete=a,a&&this._updateActiveState()}if(d.length>0){var A=this._processIncrementalResponses(d);this._processPayloadFollowups(A)}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 T=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(T),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var a=this;if(this._optimisticUpdates!==null&&en(!1),!(n==null&&i==null)){var s=[];if(n){var l=this._normalizeResponse(n,this._operation.root,GF,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);KF(l),s.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,s)}else i&&s.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:Ym.create(),isFinal:!1},updater:i});this._optimisticUpdates=s,s.forEach(function(d){return a._getPublishQueueAndSaveActor().applyUpdate(d)});var u=this._runPublishQueue();Jm.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(u)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var o=n.followupPayloads,a=(0,Of.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;switch(l.kind){case"ModuleImportPayload":var u=this._expectOperationLoader(),d=u.get(l.operationReference);if(d==null)this._processAsyncOptimisticModuleImport(l);else{var f=this._processOptimisticModuleImport(d,l);i.push.apply(i,(0,Mf.default)(f))}break;case"ActorPayload":break;default:en(!1)}}}catch(h){a.e(h)}finally{a.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=x8e(n.variables,i.argumentDefinitions,n.args):o=n.variables;var a=Ky(i,n.dataID,o),s={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(s,a,n.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:n.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers)},t._processOptimisticModuleImport=function(n,i){var o=Gy(n),a=[],s=this._normalizeFollowupPayload(i,o);return KF(s),a.push({operation:this._operation,payload:s,updater:null}),this._processOptimisticFollowups(s,a),a},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var a=i._processOptimisticModuleImport(o,n);if(a.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var s;(s=i._optimisticUpdates).push.apply(s,(0,Mf.default)(a)),i._runPublishQueue()}}})},t._processResponses=function(n){var i=this;return this._log({name:"execute.normalize.start",operation:this._operation}),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(o){i._getPublishQueueAndSaveActor().revertUpdate(o)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),n.map(function(o){var a=i._normalizeResponse(o,i._operation.root,GF,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,a,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),a})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var a=o.incrementalPlaceholders,s=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),s&&s.length!==0&&s.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processFollowupPayload(d),i._actorIdentifier=h}),a&&a.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",a.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processIncrementalPlaceholder(o,d),i._actorIdentifier=h}),i._isClientPayload||i._state==="loading_final")){var u=[];a.forEach(function(d){d.kind==="defer"&&u.push(i._processDeferResponse(d.label,d.path,d,{data:d.data,extensions:{is_final:!0}}))}),u.length>0&&i._processPayloadFollowups(u)}})},t._maybeCompleteSubscriptionOperationTracking=function(){!this._isSubscriptionOperation&&!(this._useExecTimeResolvers&&this._execTimeResolverResponseComplete&&this._state==="loading_final")||this._pendingModulePayloadsCount===0&&this._incrementalPayloadsPending===!1&&this._completeOperationTracker()},t._processFollowupPayload=function(n){var i=this;switch(n.kind){case"ModuleImportPayload":var o=this._expectOperationLoader(),a=o.get(n.operationReference);if(a!=null)this._processFollowupPayloadWithNormalizationNode(n,Gy(a));else{var s=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},u=Vy.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));Vy.create(function(d){var f,h=u.subscribe({next:function(m){if(m!=null){var g=function(){try{var _=Gy(m),S=Jm.BATCH_ASYNC_MODULE_UPDATES_FN,E=S!=null&&i._pendingModulePayloadsCount>1,C=b8e(function(){if(i._handleFollowupPayload(n,_),E)i._scheduleAsyncStoreUpdate(S,d.complete);else{var R=i._runPublishQueue();i._updateOperationTracker(R)}}),A=C[0],T=C[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:_.name,duration:T}),E||d.complete()}catch(R){d.error(R)}},v=i._scheduler;v==null?g():f=v.schedule(g)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(s),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(s,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:en(!1)}},t._processFollowupPayloadWithNormalizationNode=function(n,i){this._handleFollowupPayload(n,i),this._maybeCompleteSubscriptionOperationTracking()},t._handleFollowupPayload=function(n,i){var o=this._normalizeFollowupPayload(n,i);this._getPublishQueueAndSaveActor().commitPayload(this._operation,o),this._processPayloadFollowups([o])},t._processIncrementalPlaceholder=function(n,i){var o,a=i.label,s=i.path,l=s.map(String).join("."),u=this._incrementalResults.get(a);u==null&&(u=new Map,this._incrementalResults.set(a,u));var d=u.get(l),f=d!=null&&d.kind==="response"?d.responses:null;u.set(l,{kind:"placeholder",placeholder:i});var h;i.kind==="stream"?h=i.parentID:i.kind==="defer"?h=i.selector.dataID:en(!1);var p=n.source.get(h),m=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(C){var A=VF(C.dataID,C.fieldKey);return C.dataID===h||A===h});p==null&&en(!1);var g,v,b=this._source.get(h);if(b!=null){g=Qm.update(b.record,p);var _=new Map,S=function(A){var T=A8e(A);_.set(T,A)};b.fieldPayloads.forEach(S),m.forEach(S),v=Array.from(_.values())}else g=p,v=m;if(this._source.set(h,{record:g,fieldPayloads:v}),f!=null){var E=this._processIncrementalResponses(f);this._processPayloadFollowups(E)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(a){var s=a.label,l=a.path,u=a.response,d=i._incrementalResults.get(s);if(d==null&&(d=new Map,i._incrementalResults.set(s,d)),s.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[a]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(a);return}var p=h.placeholder;p.kind!=="defer"&&en(!1),o.push(i._processDeferResponse(s,l,p,u))}else{var m=l.slice(0,-2).map(String).join("."),g=d.get(m);if(g==null){g={kind:"response",responses:[a]},d.set(m,g);return}else if(g.kind==="response"){g.responses.push(a);return}var v=g.placeholder;v.kind!=="stream"&&en(!1),o.push(i._processStreamResponse(s,l,v,u))}}),o},t._processDeferResponse=function(n,i,o,a){var s,l=o.selector.dataID,u=this._actorIdentifier;this._actorIdentifier=(s=o.actorIdentifier)!==null&&s!==void 0?s:this._actorIdentifier;var d=this._normalizeResponse(a,o.selector,o.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:o.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,d);var f=this._source.get(l);f==null&&en(!1);var h=f.fieldPayloads;if(h.length!==0){var p,m={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:Ym.create(),isFinal:((p=a.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,m)}return this._actorIdentifier=u,d},t._processStreamResponse=function(n,i,o,a){var s=o.parentID,l=o.node,u=o.variables,d=o.actorIdentifier,f=this._actorIdentifier;this._actorIdentifier=d??this._actorIdentifier;var h=l.selections[0];h!=null&&h.kind==="LinkedField"&&h.plural===!0||en(!1);var p=this._normalizeStreamItem(a,s,h,u,i,o.path),m=p.fieldPayloads,g=p.itemID,v=p.itemIndex,b=p.prevIDs,_=p.relayPayload,S=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,_,function(C){var A=C.get(s);if(A!=null){var T=A.getLinkedRecords(S);if(T!=null&&!(T.length!==b.length||T.some(function(N,I){return b[I]!==(N&&N.getDataID())}))){var R=(0,Mf.default)(T);R[v]=C.get(g),A.setLinkedRecords(R,S)}}}),m.length!==0){var E={errors:null,fieldPayloads:m,incrementalPlaceholders:null,followupPayloads:null,source:Ym.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,E)}return this._actorIdentifier=f,_},t._normalizeStreamItem=function(n,i,o,a,s,l){var u,d,f,h,p=n.data;typeof p!="object"&&en(!1);var m=(u=o.alias)!==null&&u!==void 0?u:o.name,g=E8e(o,a),v=this._source.get(i);v==null&&en(!1);var b=v.record,_=v.fieldPayloads,S=Qm.getLinkedRecordIDs(b,g);S==null&&en(!1);var E=s[s.length-1],C=parseInt(E,10);C===E&&C>=0||en(!1);var A=(d=o.concreteType)!==null&&d!==void 0?d:p[w8e];typeof A!="string"&&en(!1);var T=(f=(h=this._getDataID(p,A))!==null&&h!==void 0?h:S?.[C])!==null&&f!==void 0?f:VF(i,g,C);typeof T!="string"&&en(!1);var R=Ky(o,T,a),N=Qm.clone(b),I=(0,Mf.default)(S);I[C]=T,Qm.setLinkedRecordIDs(N,g,I),this._source.set(i,{record:N,fieldPayloads:_});var M=this._normalizeResponse(n,R,A,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,Mf.default)(l),[m,String(C)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:_,itemID:T,itemIndex:C,prevIDs:S,relayPayload:M,storageKey:g}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var a=o._runPublishQueue();o._updateOperationTracker(a);var s=(0,Of.default)(o._completeFns),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;u()}}catch(d){s.e(d)}finally{s.f()}o._completeFns=[]}))},t._updateOperationTracker=function(n){n!=null&&n.length>0&&this._operationTracker.update(this._operation.request,new Set(n))},t._completeOperationTracker=function(){this._operationTracker.complete(this._operation.request)},t._getPublishQueueAndSaveActor=function(){return this._seenActors.add(this._actorIdentifier),this._getPublishQueue(this._actorIdentifier)},t._getActorsToVisit=function(){return this._seenActors.size===0?new Set([this._actorIdentifier]):this._seenActors},t._runPublishQueue=function(n){var i=new Set,o=(0,Of.default)(this._getActorsToVisit()),a;try{for(o.s();!(a=o.n()).done;){var s=a.value,l=this._getPublishQueue(s).run(n);l.forEach(function(u){return i.add(u)})}}catch(u){o.e(u)}finally{o.f()}return Array.from(i)},t._retainData=function(){var n=(0,Of.default)(this._getActorsToVisit()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;this._retainDisposables.has(o)||this._retainDisposables.set(o,this._getStore(o).retain(this._operation))}}catch(a){n.e(a)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,Of.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(a){n.e(a)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||en(!1),n},e})();function R8e(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var a=i.label,s=i.path;(a==null||s==null)&&en(!1),r.push({label:a,path:s,response:i})}else((o=i.extensions)===null||o===void 0?void 0:o.is_normalized)===!0?n.push(i):t.push(i)}),[t,r,n]}function A8e(e){var t;return(t=JSON.stringify(v8e(e)))!==null&&t!==void 0?t:""}function KF(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&en(!1)}var T8e={execute:k8e},$8e=Promise.resolve();function N8e(e){$8e.then(e).catch(D8e)}function D8e(e){setTimeout(function(){throw e},0)}var F8e=N8e,kn=so,I8e=kb,HF=I8e.EXISTENT,Hy=Le,P8e=(function(){function e(r,n){this.__sources=[n,r],this._base=r,this._sink=n}var t=e.prototype;return t.unstable_getRawRecordWithChanges=function(n){var i=this._base.get(n),o=this._sink.get(n);if(o===void 0){if(i==null)return i;var a=kn.clone(i);return a}else{if(o===null)return null;if(i!=null){var s=kn.update(i,o);return s}else{var l=kn.clone(o);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var o=this._base.get(n);o||Hy(!1),i=kn.create(n,kn.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),a=this._base.get(n);o||a||Hy(!1);var s=this._getSinkRecord(i);a&&kn.copyFields(a,s),o&&kn.copyFields(o,s)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);kn.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==HF&&this._sink.getStatus(n)!==HF||Hy(!1);var o=kn.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 kn.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=kn.getValue(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setValue=function(n,i,o){var a=this._getSinkRecord(n);kn.setValue(a,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=kn.getErrors(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setErrors=function(n,i,o){var a=this._getSinkRecord(n);kn.setErrors(a,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=kn.getLinkedRecordID(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordID=function(n,i,o){var a=this._getSinkRecord(n);kn.setLinkedRecordID(a,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=kn.getLinkedRecordIDs(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var a=this._getSinkRecord(n);kn.setLinkedRecordIDs(a,i,o)},e})(),lB=P8e,O8e=He.default,Tb=O8e(Jr),M8e=Sr,Dd=M8e.getArgumentValues,L8e=["id","__id","__typename","js"];function z8e(e,t,r,n,i){var o={};return fp(o,e,t,r,n,i),o}function fp(e,t,r,n,i,o){var a,s=(0,Tb.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:j8e(p,r,t,i,o),set:U8e(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:q8e(p,r,t,i,o),set:B8e(p,r,t,i)});break;case"ScalarField":var m=(a=p.alias)!==null&&a!==void 0?a:p.name;Object.defineProperty(e,m,{get:function(){var v,b=Dd((v=p.args)!==null&&v!==void 0?v:[],r),_=t.getValue(p.name,b);return _==null&&(_=K8e(p,b,t,i,o)),_},set:L8e.includes(p.name)?void 0:function(g){var v,b=Dd((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(g,p.name,b)}});break;case"InlineFragment":t.getType()===p.type&&fp(e,t,r,p.selections,i,o);break;case"ClientExtension":fp(e,t,r,p.selections,i,o);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":case"RelayLiveResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw p.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(s.s();!(l=s.n()).done;){var d,f;u()}}catch(h){s.e(h)}finally{s.f()}}function U8e(e,t,r,n){return function(o){var a,s=Dd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=o.map(function(u){if(u==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var d=u.__id;if(d==null)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var f=n.get(d);if(f==null)throw new Error("Did not find item with data id ".concat(d," in the store."));return f});r.setLinkedRecords(l,e.name,s)}}function B8e(e,t,r,n){return function(o){var a,s=Dd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)r.setValue(o,e.name,s);else{var l=o.__id;if(l==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var u=n.get(l);if(u==null)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(u,e.name,s)}}}function j8e(e,t,r,n,i){return function(){var o,a=Dd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecords(e.name,a);return s===void 0&&(s=G8e(e,a,r,n,i)),s!=null?s.map(function(l){if(l!=null){var u={};return fp(u,l,t,e.selections,n,i),u}else return l}):s}}function q8e(e,t,r,n,i){return function(){var o,a=Dd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecord(e.name,a);if(s===void 0&&(s=V8e(e,a,r,n,i)),s!=null){var l={};return fp(l,s,t,e.selections,n,i),l}else return s}}function V8e(e,t,r,n,i){var o=(0,Tb.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="linked"){var l=s.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(u){o.e(u)}finally{o.f()}}function G8e(e,t,r,n,i){var o=(0,Tb.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="pluralLinked"){var l=s.handle(e,r,t,n);if(l!=null)return l.map(function(u){if(u!=null)return n.get(u)})}}}catch(u){o.e(u)}finally{o.f()}}function K8e(e,t,r,n,i){var o=(0,Tb.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="scalar"){var l=s.handle(e,r,t,n);if(l!==void 0)return l}}}catch(u){o.e(u)}finally{o.f()}}var uB={createUpdatableProxy:z8e},H8e=ga,W8e=H8e.getFragment,J8e=va,Q8e=J8e.getVariablesFromFragment,Y8e=Sr,X8e=Y8e.ID_KEY,Z8e=uB,e5e=Z8e.createUpdatableProxy,t5e=Le;function r5e(e,t,r,n){var i=W8e(e),o=Q8e(i,t),a=t[X8e],s=r.get(a);return s==null&&t5e(!1),{updatableData:e5e(s,o,i.selections,r,n)}}var cB={readUpdatableFragment:r5e},n5e=ga,i5e=n5e.getUpdatableQuery,o5e=uB,a5e=o5e.createUpdatableProxy;function s5e(e,t,r,n){var i=i5e(e);return{updatableData:a5e(r.getRoot(),t,i.fragment.selections,r,n)}}var dB={readUpdatableQuery:s5e},l5e=Wa,u5e=l5e.generateClientID,c5e=Sr,rl=c5e.getStableStorageKey,Xm=Le,d5e=(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&&Xm(!1),n},t.getValue=function(n,i){var o=rl(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,a){return fB(n)||Xm(!1),this.setValue__UNSAFE(n,i,o,a)},t.getErrors=function(n,i){var o=rl(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,a){var s=rl(i,o);return this._mutator.setValue(this._dataID,s,n),a!=null&&(a.length===0?this._mutator.setErrors(this._dataID,s):this._mutator.setErrors(this._dataID,s,a)),this},t.getLinkedRecord=function(n,i){var o=rl(n,i),a=this._mutator.getLinkedRecordID(this._dataID,o);return a!=null?this._source.get(a):a},t.setLinkedRecord=function(n,i,o){n instanceof e||Xm(!1);var a=rl(i,o),s=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,a,s),this},t.getOrCreateLinkedRecord=function(n,i,o){var a=this.getLinkedRecord(n,o);if(!a){var s,l=rl(n,o),u=u5e(this.getDataID(),l);a=(s=this._source.get(u))!==null&&s!==void 0?s:this._source.create(u,i),this.setLinkedRecord(a,n,o)}return a},t.getLinkedRecords=function(n,i){var o=this,a=rl(n,i),s=this._mutator.getLinkedRecordIDs(this._dataID,a);return s==null?s:s.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||Xm(!1);var a=rl(i,o),s=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,a,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function fB(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(fB)}var f5e=d5e,h5e=so,hB=kb,Wy=hB.EXISTENT,WF=hB.NONEXISTENT,pB=Sr,Jy=pB.ROOT_ID,JF=pB.ROOT_TYPE,p5e=cB,m5e=p5e.readUpdatableFragment,g5e=dB,v5e=g5e.readUpdatableQuery,b5e=f5e,Zm=Le,_5e=(function(){function e(r,n,i,o,a){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=a??function(s){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,a=n.getRecordIDs();a.forEach(function(s){var l=n.getStatus(s);if(l===Wy){var u=n.get(s);u&&(o.__mutator.getStatus(s)!==Wy&&o.create(s,h5e.getType(u)),o.__mutator.copyFieldsFromRecord(u,s))}else l===WF&&o.delete(s)}),i&&i.length&&i.forEach(function(s){var l=o._handlerProvider&&o._handlerProvider(s.handle);l||Zm(!1),l.update(o,s)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var o=this.get(n);return o||Zm(!1),o},t.delete=function(n){n===Jy&&Zm(!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===Wy?this._proxies[n]=new b5e(this,this.__mutator,n):this._proxies[n]=i===WF?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(Jy);return n||(n=this.create(Jy,JF)),n&&n.getType()===JF||Zm(!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 v5e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return m5e(n,i,this,this._missingFieldHandlers)},e})(),mB=_5e,y5e=ic,QF=y5e.LINKED_FIELD,x5e=Sr,S5e=x5e.getHandleStorageKey,w5e=Bs,E5e=Le;function k5e(e,t,r){var n=t.find(function(o){return o.kind===QF&&o.name===e.name&&o.alias===e.alias&&w5e(o.args,e.args)});n&&n.kind===QF||E5e(!1);var i=S5e(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var gB=k5e,C5e=ic,YF=C5e.SCALAR_FIELD,R5e=Sr,A5e=R5e.getHandleStorageKey,T5e=Bs,$5e=Le;function N5e(e,t,r){var n=t.find(function(o){return o.kind===YF&&o.name===e.name&&o.alias===e.alias&&T5e(o.args,e.args)});n&&n.kind===YF||$5e(!1);var i=A5e(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var D5e=N5e,F5e=He.default,eg=F5e(Jr),I5e=lB,P5e=mB,O5e=uC,M5e=Wa,L5e=M5e.isClientID,z5e=gB,U5e=D5e,B5e=Vl,XF=B5e.getLocalVariables,ZF=so,vB=kb,Qy=vB.EXISTENT,j5e=vB.UNKNOWN,dC=Sr,bB=Rb,q5e=bB.TYPE_SCHEMA_TYPE,Yy=bB.generateTypeID,Lf=Le,V5e=dC.getModuleOperationKey,tg=dC.getStorageKey,Xy=dC.getArgumentValues;function G5e(e,t,r,n,i,o,a,s,l,u){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new K5e(e,t,r,h,i,o,a,s,l,u),m=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),m}var K5e=(function(){function e(r,n,i,o,a,s,l,u,d,f){this._getSourceForActor=r,this._getTargetForActor=n,this._getDataID=l,this._source=r(i),this._mutatorRecordSourceProxyCache=new Map;var h=this._getMutatorAndRecordProxyForActor(i),p=h[0],m=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=a,this._mutator=p,this._operationLoader=s??null,this._recordSourceProxy=m,this._recordWasMissing=!1,this._variables=o,this._shouldProcessClientComponents=u,this._log=d}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(n){var i=this._mutatorRecordSourceProxyCache.get(n);if(i==null){var o=this._getTargetForActor(n),a=new I5e(this._getSourceForActor(n),o),s=new P5e(a,this._getDataID,void 0,this._handlers,this._log);i=[a,s],this._mutatorRecordSourceProxyCache.set(n,i)}return i},t.check=function(n,i){return this._assignClientAbstractTypes(n),this._traverse(n,i),this._recordWasMissing===!0?{status:"missing",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}:{status:"available",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Lf(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&L5e(i))){var o=n.args!=null?Xy(n.args,this._variables):{},a=(0,eg.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="scalar"){var u=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(u!==void 0)return u}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?Xy(n.args,this._variables):{},a=(0,eg.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="linked"){var u=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(u!==void 0&&(u===null||this._mutator.getStatus(u)===Qy))return u}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,a=n.args!=null?Xy(n.args,this._variables):{},s=(0,eg.default)(this._handlers),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(u.kind==="pluralLinked"){var d=u.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&o._mutator.getStatus(h)===Qy});if(f)return d}else if(d===null)return null}}}catch(h){s.e(h)}finally{s.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===j5e&&this._handleMissing(),o===Qy){var a=this._source.get(i),s=ZF.getInvalidationEpoch(a);s!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,s):s),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ScalarField":o._checkScalar(a,i);break;case"LinkedField":a.plural?o._checkPluralLink(a,i):o._checkLink(a,i);break;case"ActorChange":o._checkActorChange(a.linkedField,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":{var l=a.abstractKey;if(l==null){var u=o._mutator.getType(i);u===a.type&&o._traverseSelections(a.selections,i)}else{var d=o._mutator.getType(i);d==null&&Lf(!1);var f=Yy(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(a.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=z5e(a,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var m=U5e(a,n,o._variables);o._checkScalar(m,i);break}case"ModuleImport":o._checkModuleImport(a,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"FragmentSpread":var g=o._variables;o._variables=XF(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=g;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(a.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var b=a.abstractKey,_=o._mutator.getType(i);_==null&&Lf(!1);var S=Yy(_),E=o._mutator.getValue(S,b);E==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(a,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(a.backingField,i);break;default:Lf(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&Lf(!1);var a=V5e(n.documentName),s=this._mutator.getValue(i,a);if(s==null){s===void 0&&this._handleMissing();return}var l=o.get(s);if(l!=null){var u=O5e(l),d=this._variables;this._variables=XF(this._variables,u.argumentDefinitions,n.args),this._traverse(u,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=tg(n,this._variables),a=this._mutator.getValue(i,o);a===void 0&&(a=this._handleMissingScalarField(n,i),a!==void 0&&this._mutator.setValue(i,o,a))},t._checkLink=function(n,i){var o=tg(n,this._variables),a=this._mutator.getLinkedRecordID(i,o);a===void 0&&(a=this._handleMissingLinkField(n,i),a!=null?this._mutator.setLinkedRecordID(i,o,a):a===null&&this._mutator.setValue(i,o,null)),a!=null&&this._traverse(n,a)},t._checkPluralLink=function(n,i){var o=this,a=tg(n,this._variables),s=this._mutator.getLinkedRecordIDs(i,a);s===void 0&&(s=this._handleMissingPluralLinkField(n,i),s!=null?this._mutator.setLinkedRecordIDs(i,a,s):s===null&&this._mutator.setValue(i,a,null)),s&&s.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=tg(n,this._variables),a=this._source.get(i),s=a!=null?ZF.getActorLinkedRecordID(a,o):a;if(s==null)s===void 0&&this._handleMissing();else{var l=s[0],u=s[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),m=p[0],g=p[1];this._source=this._getSourceForActor(l),this._mutator=m,this._recordSourceProxy=g,this._assignClientAbstractTypes(n),this._traverse(n,u),this._source=d,this._mutator=f,this._recordSourceProxy=h}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,eg.default)(i[s]),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=Yy(d);this._source.get(f)==null&&this._mutator.create(f,q5e),this._mutator.getValue(f,s)==null&&this._mutator.setValue(f,s,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),H5e={check:G5e},W5e=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},J5e=so,Q5e=Sr,Y5e=Q5e.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,X5e=Le;function Z5e(e){var t=J5e.getValue(e,Y5e);return t==null?null:(t instanceof Set||X5e(!1),t)}var _B=Z5e;function eze(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var tze=eze,rze=He.default,ka=rze(Jr),nze=Sb,ize=ic,eI=ize.RELAY_LIVE_RESOLVER,oze=Bo,tI=W5e,yB=Wa,rg=yB.generateClientID,Zy=yB.generateClientObjectClientID,it=so,aze=va,sze=aze.createNormalizationSelector,ng=lc,lze=eB,uze=lze.normalize,cc=Sr,e1=cc.RELAY_RESOLVER_ERROR_KEY,zS=cc.RELAY_RESOLVER_INVALIDATION_KEY,cze=cc.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,t1=cc.RELAY_RESOLVER_SNAPSHOT_KEY,r1=cc.RELAY_RESOLVER_VALUE_KEY,dze=cc.getReadTimeResolverStorageKey,fze=cc.getStorageKey,hze=_B,pze=tze,mze=wb,rI=mze.isSuspenseSentinel,wa=Le,fC="__resolverLiveStateSubscription",ig="__resolverLiveStateValue",og="__resolverLiveStateDirty",xB="__RELAY_RESOLVER__",gze="__relay_model_instance";function n1(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var vze=(function(){function e(r,n){this._resolverIDToRecordIDs=new Map,this._recordIDToResolverIDs=new Map,this._getRecordSource=r,this._store=n,this._handlingBatch=!1,this._liveResolverBatchRecordSource=null}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){var l=this._getRecordSource(),u=_h(l,n),d=dze(i,o),f=it.getLinkedRecordID(u,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,s)){var m;h!=null&&wB(h),f=(m=f)!==null&&m!==void 0?m:rg(n,d),h=it.create(f,xB);var g=a();if(it.setValue(h,t1,g.snapshot),it.setValue(h,e1,g.error),i.kind===eI){if(g.resolverResult!=null){g.error!=null&&wa(!1);var v=g.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,g.resolverResult,i,o);l.set(f,h);var b=_h(l,n),_=it.clone(b);if(it.setLinkedRecordID(_,d,f),l.set(n,_),i.fragment!=null){var S,E=fze(i.fragment,o),C=rg(n,E);n1(this._resolverIDToRecordIDs,C,f),n1(this._recordIDToResolverIDs,n,C);var A=(S=g.snapshot)===null||S===void 0?void 0:S.seenRecords;if(A!=null){var T=(0,ka.default)(A),R;try{for(T.s();!(R=T.n()).done;){var N=R.value;n1(this._recordIDToResolverIDs,N,C)}}catch(J){T.e(J)}finally{T.f()}}}}else if(i.kind===eI&&it.getValue(h,og)){var I;f=(I=f)!==null&&I!==void 0?I:rg(n,d),h=it.clone(h);var M=it.getValue(h,ig);pze(M)||wa(!1),p=this._setLiveResolverValue(h,M,i,o),it.setValue(h,og,!1),l.set(f,h)}var P=this._getResolverValue(h),U=it.getValue(h,t1),j=it.getValue(h,e1),V=null;if(rI(P)){var Y;V=(Y=f)!==null&&Y!==void 0?Y:rg(n,d)}return[P,f,j,U,V,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&wa(!1);var a=it.getValue(o,ig);return new Promise(function(s){var l=a.subscribe(function(){l(),s()})})},t._setLiveStateValue=function(n,i,o,a,s){var l=this._makeLiveStateHandler(i),u=o.subscribe(l);it.setValue(n,ig,o);var d=this._setLiveResolverValue(n,o,a,s);return it.setValue(n,og,!1),it.setValue(n,fC,u),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),a=o.get(n);if(a&&it.hasValue(a,ig)){var s=it.clone(a);it.setValue(s,og,!0),i._setLiveResolverUpdate(n,s)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=ng.create()),this._liveResolverBatchRecordSource.set(n,i);else{var o=ng.create();o.set(n,i),this._store.publish(o),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&wa(!1),this._handlingBatch=!0;try{n()}finally{this._liveResolverBatchRecordSource!=null&&(this._store.publish(this._liveResolverBatchRecordSource),this._store.notify()),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1}},t._setLiveResolverValue=function(n,i,o,a){var s=null,l=null;try{s=i.read()}catch(u){l=u}return it.setValue(n,e1,l),this._setResolverValue(n,s,o,a)},t._setResolverValue=function(n,i,o,a){var s=o.normalizationInfo,l=null;if(i!=null&&s!=null&&!rI(i)){var u,d=hze(n),f=new Set,h=this._getRecordSource();if(s.plural){Array.isArray(i)||wa(!1),u=[];for(var p=ng.create(),m=0;m<i.length;m++){var g=i[m];if(g!=null){typeof g!="object"&&wa(!1);var v=iI(s,g),b=Zy(v,it.getDataID(n),m),_=this._normalizeOutputTypeValue(b,g,a,s,[o.path,String(m)],v),S=(0,ka.default)(_.getRecordIDs()),E;try{for(S.s();!(E=S.n()).done;){var C=E.value;p.set(C,_h(_,C)),f.add(C)}}catch(P){S.e(P)}finally{S.f()}u.push(b)}}l=nI(h,p,d)}else{typeof i!="object"&&wa(!1);var A=iI(s,i),T=Zy(A,it.getDataID(n)),R=this._normalizeOutputTypeValue(T,i,a,s,[o.path],A),N=(0,ka.default)(R.getRecordIDs()),I;try{for(N.s();!(I=N.n()).done;){var M=I.value;f.add(M)}}catch(P){N.e(P)}finally{N.f()}u=T,l=nI(h,R,d)}it.setValue(n,cze,f),tI(u),it.setValue(n,r1,u)}else tI(i),it.setValue(n,r1,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return it.getValue(n,r1)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,a=Array.from(n);a.length;){var s=a.pop();o.add(s),n.add(s);var l=this._recordIDToResolverIDs.get(s);if(l!=null){var u=(0,ka.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,ka.default)(h),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;SB(g,i),o.has(g)||(o.add(g),a.push(g))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){u.e(v)}finally{u.f()}}}},t._isInvalid=function(n,i){if(!it.getValue(n,zS))return!1;var o=it.getValue(n,t1),a=o?.data,s=o?.selector;if(a==null||s==null)return!0;var l=i(s),u=l.data,d=nze(a,u);if(d!==a)return!0;if(oze.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=it.clone(n);it.setValue(f,zS,!1);var h=this._getRecordSource();h.set(it.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,a,s,l){var u=ng.create();switch(a.kind){case"OutputType":{var d=it.create(n,l);u.set(n,d);var f=sze(a.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(s);return uze(u,f,i,p,void 0,h).source}case"WeakModel":{var m=it.create(n,l);return it.setValue(m,gze,i),u.set(n,m),u}default:a.kind,wa(!1)}},t.ensureClientRecord=function(n,i){var o=Zy(i,n),a=this._getRecordSource();if(!a.has(o)){var s=it.create(o,i);it.setValue(s,"id",n),a.set(o,s)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return yze(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,ka.default)(n),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=this._getRecordSource().get(a);s!=null&&hC(s)&&this._getRecordSource().delete(a)}}catch(l){i.e(l)}finally{i.f()}}},e})();function nI(e,t,r){var n=new Set;if(r!=null){var i=(0,ka.default)(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;t.has(a)||(n.add(a),e.remove(a))}}catch(p){i.e(p)}finally{i.f()}}var s=(0,ka.default)(t.getRecordIDs()),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=_h(t,u);if(e.has(u)){var f=_h(e,u),h=it.update(f,d);h!==f&&(n.add(u),e.set(u,h),_ze(f,e))}else e.set(u,d)}}catch(p){s.e(p)}finally{s.f()}return n}function bze(e){var t=new Set;return it.getFields(e).forEach(function(r){if(it.hasLinkedRecordID(e,r)){var n=it.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(it.hasLinkedRecordIDs(e,r)){var i;(i=it.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function SB(e,t){var r=t.get(e);if(r){var n=it.clone(r);it.setValue(n,zS,!0),t.set(e,n)}}function _ze(e,t){var r=bze(e),n=(0,ka.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,a=t.get(o);a!=null&&hC(a)&&SB(o,t)}}catch(s){n.e(s)}finally{n.f()}}function yze(e,t){if(t.size!==0){var r=(0,ka.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&hC(o)&&wB(o)}}catch(a){r.e(a)}finally{r.f()}}}function hC(e){return it.getType(e)===xB}function wB(e){var t=it.getValue(e,fC);t?.()}function _h(e,t){var r=e.get(t);return r==null&&wa(!1),r}function xze(e){return e}function iI(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&wa(!1),n}var Sze={LiveResolverCache:vze,getUpdatedDataIDs:xze,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:fC},wze=He.default,Eze=wze(tr),EB=so,oI=lc,kze=Le,i1=EB.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),kB=(function(){function e(r){this._base=r,this._sink=oI.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==i1}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===i1?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=oI.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,i1)},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,Eze.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var a=n.get(o);a===void 0?delete i[o]:i[o]=EB.toJSON(a)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function Cze(e){return new kB(e)}function Rze(e){return e instanceof kB||kze(!1),e.getOptimisticRecordIDs()}var Aze={create:Cze,getOptimisticRecordIDs:Rze},Tze=ic,$ze=Tze.RELAY_LIVE_RESOLVER,aI=Le,Nze=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){i.kind===$ze&&aI(!1);var l=a(),u=l.resolverResult,d=l.snapshot,f=l.error;return[u,void 0,f,d,void 0,void 0]},t.invalidateDataIDs=function(n){},t.ensureClientRecord=function(n,i){aI(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),Dze={NoopResolverCache:Nze},$b=He.default,sI=$b(tr),Fze=$b(Si),Ize=$b(uf),o1=$b(ql),Pze=["message"],lI=Bo,Oze=wb,Mze=Oze.isSuspenseSentinel,Lze=Vl,ki=so,Ja=Sr,uI=Ja.CLIENT_EDGE_TRAVERSAL_PATH,zze=Ja.FRAGMENT_OWNER_KEY,Uze=Ja.FRAGMENT_PROP_NAME_KEY,ag=Ja.FRAGMENTS_KEY,sg=Ja.ID_KEY,Bze=Ja.MODULE_COMPONENT_KEY,jze=Ja.ROOT_ID,Hg=Ja.getArgumentValues,qze=Ja.getModuleComponentKey,lg=Ja.getStorageKey,Vze=Dze,Gze=Vze.NoopResolverCache,CB=Kk,Kze=CB.RESOLVER_FRAGMENT_ERRORED_SENTINEL,Hze=CB.withResolverContext,Wze=Rb,Jze=Wze.generateTypeID,tn=Le;function RB(e,t,r,n){var i=new Qze(e,t,r??new Gze,n);return i.read()}var Qze=(function(){function e(r,n,i,o){var a,s,l,u;this._clientEdgeTraversalPath=(a=n.clientEdgeTraversalPath)!==null&&a!==void 0&&a.length?(0,o1.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(s=(l=this._owner.node.operation.use_exec_time_resolvers)!==null&&l!==void 0?l:((u=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||u===void 0?void 0:u.get())===!0)!==null&&s!==void 0?s:!1,this._recordSource=r,this._seenRecords=new Set,this._selector=n,this._variables=n.variables,this._resolverCache=i,this._fragmentName=n.node.name,this._updatedDataIDs=new Set,this._resolverContext=o}var t=e.prototype;return t.read=function(){var n,i=this._selector,o=i.node,a=i.dataID,s=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,u=this._recordSource.get(a),d=!s;if(d&&l==null&&u!=null&&(this._recordMatchesTypeCondition(u,o.type)||(d=!1)),d&&l!=null&&u!=null){var f=this._implementsInterface(u,l);f===!1&&(d=!1)}this._isWithinUnmatchedTypeRefinement=!d;var h=this._traverse(o,a,null),p=(n=this._selector.node.metadata)===null||n===void 0?void 0:n.catchTo;return p!=null&&(h=this._catchErrors(h,p,null)),this._updatedDataIDs.size>0&&(this._resolverCache.notifyUpdatedSubscribers(this._updatedDataIDs),this._updatedDataIDs.clear()),{data:h,isMissingData:this._isMissingData&&d,missingClientEdges:this._missingClientEdges.length?this._missingClientEdges:null,missingLiveResolverFields:this._missingLiveResolverFields,seenRecords:this._seenRecords,selector:this._selector,fieldErrors:this._fieldErrors}},t._maybeAddFieldErrors=function(n,i){var o=ki.getErrors(n,i);if(o!=null){var a=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var s=0;s<o.length;s++){var l,u,d,f=o[s];this._fieldErrors.push({kind:"relay_field_payload.error",owner:a,fieldPath:((l=f.path)!==null&&l!==void 0?l:[]).join("."),error:f,shouldThrow:(u=(d=this._selector.node.metadata)===null||d===void 0?void 0:d.throwOnFieldError)!==null&&u!==void 0?u:!1,handled:!1,uiContext:void 0})}}},t._markDataAsMissing=function(n){var i,o;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var a=this._fragmentName;if(this._fieldErrors.push((i=(o=this._selector.node.metadata)===null||o===void 0?void 0:o.throwOnFieldError)!==null&&i!==void 0&&i?{kind:"missing_expected_data.throw",owner:a,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:a,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var s=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];s!==null&&this._missingClientEdges.push({request:s.readerClientEdge.operation,clientEdgeDestinationID:s.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var a=this._recordSource.get(i);if(this._seenRecords.add(i),a==null)return a===void 0&&this._markDataAsMissing("<record>"),a;var s=o||{},l=this._traverseSelections(n.selections,a,s);return l?s:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||tn(!1),this._variables[n]},t._maybeReportUnexpectedNull=function(n){if(n.action!=="NONE"){var i=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var o;if(n.field.linkedField!=null){var a;o=(a=n.field.linkedField.alias)!==null&&a!==void 0?a:n.field.linkedField.name}else{var s;o=(s=n.field.alias)!==null&&s!==void 0?s:n.field.name}switch(n.action){case"THROW":this._fieldErrors.push({kind:"missing_required_field.throw",fieldPath:o,owner:i,handled:!1,uiContext:void 0});return;case"LOG":this._fieldErrors.push({kind:"missing_required_field.log",fieldPath:o,owner:i,uiContext:void 0});return;default:n.action}}},t._handleRequiredFieldValue=function(n,i){return i==null?(this._maybeReportUnexpectedNull(n),!1):!0},t._catchErrors=function(n,i,o){var a=n;switch(i){case"RESULT":a=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(a=null);break}var s=this._fieldErrors;if(this._fieldErrors=o,s!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<s.length;l++)this._fieldErrors.push(cI(s[l]))}return a},t._asResult=function(n){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:n};var i=this._fieldErrors.map(function(o){switch(o.kind){case"relay_field_payload.error":var a=o.error;a.message;var s=(0,Ize.default)(a,Pze);return s;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:o.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(o.fieldPath," in ").concat(o.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(o.fieldPath,"' in '").concat(o.owner,"'.")};case"missing_required_field.log":return null;default:o.kind,tn(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var a=0;a<n.length;a++){var s=n[a];switch(s.kind){case"RequiredField":var l=this._readClientSideDirectiveField(s,i,o);if(!this._handleRequiredFieldValue(s,l))return!1;break;case"CatchField":{var u,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(s,i,o),m=(u=(d=s.field)===null||d===void 0?void 0:d.backingField)!==null&&u!==void 0?u:s.field,g=(f=m?.alias)!==null&&f!==void 0?f:m?.name;g==null&&tn(!1),o[g]=this._catchErrors(p,s.to,h);break}case"ScalarField":this._readScalar(s,i,o);break;case"LinkedField":s.plural?this._readPluralLink(s,i,o):this._readLink(s,i,o);break;case"Condition":var v=!!this._getVariableValue(s.condition);if(v===s.passingValue){var b=this._traverseSelections(s.selections,i,o);if(!b)return!1}break;case"InlineFragment":{var _=this._readInlineFragment(s,i,o,!1);if(_===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(s,i,o):this._readResolverField(s,i,o);break}case"FragmentSpread":this._createFragmentPointer(s,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(s,i,o);break}case"ModuleImport":this._readModuleImport(s,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(s,i,o);break;case"Defer":case"ClientExtension":{var S=this._isMissingData,E=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var C=this._traverseSelections(s.selections,i,o);if(this._isMissingData=S||this._missingClientEdges.length>E||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!C)return!1;break}case"Stream":{var A=this._traverseSelections(s.selections,i,o);if(!A)return!1;break}case"ActorChange":this._readActorChange(s,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(s.backingField.kind==="RelayResolver"||s.backingField.kind==="RelayLiveResolver")){var T=s.linkedField;T.plural?this._readPluralLink(T,i,o):this._readLink(T,i,o)}else this._readClientEdge(s,i,o);break;default:tn(!1)}}return!0},t._readClientSideDirectiveField=function(n,i,o){switch(n.field.kind){case"ScalarField":return this._readScalar(n.field,i,o);case"LinkedField":return n.field.plural?this._readPluralLink(n.field,i,o):this._readLink(n.field,i,o);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(n.field,i,o):this._readResolverField(n.field,i,o);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(n.field.backingField.kind==="RelayResolver"||n.field.backingField.kind==="RelayLiveResolver")){var a=n.field;return a.linkedField.plural?this._readPluralLink(a.linkedField,i,o):this._readLink(a.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,tn(!1)}},t._readResolverField=function(n,i,o){var a,s=ki.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var u=this._readResolverFieldImpl(n,s),d=(a=n.alias)!==null&&a!==void 0?a:n.name;return this._prependPreviousErrors(l,d),o[d]=u,u},t._readResolverFieldImpl=function(n,i){var o=this,a=n.fragment,s,l=function(_){return s!=null?{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors}:(s=RB(o._recordSource,_,o._resolverCache),{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors})},u=function(){if(a!=null){var _={__id:i,__fragmentOwner:o._owner,__fragments:(0,Fze.default)({},a.name,a.args?Hg(a.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(_[uI]=(0,o1.default)(o._clientEdgeTraversalPath));var S={getDataForResolverFragment:l};return Hze(S,function(){var T=dI(n,o._variables,_,o._resolverContext),R=T[0],N=T[1];return{resolverResult:R,snapshot:s,error:N}})}else{var E=dI(n,o._variables,null,o._resolverContext),C=E[0],A=E[1];return{resolverResult:C,snapshot:void 0,error:A}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,u,l),f=d[0],h=d[1],p=d[2],m=d[3],g=d[4],v=d[5];return this._propagateResolverMetadata(n.path,m,p,h,g,v),f},t._propagateResolverMetadata=function(n,i,o,a,s,l){var u=this;if(i!=null){if(i.missingClientEdges!=null)for(var d=0;d<i.missingClientEdges.length;d++){var f=i.missingClientEdges[d];this._missingClientEdges.push(f)}if(i.missingLiveResolverFields!=null){this._isMissingData=this._isMissingData||i.missingLiveResolverFields.length>0;for(var h=0;h<i.missingLiveResolverFields.length;h++){var p=i.missingLiveResolverFields[h];this._missingLiveResolverFields.push(p)}}if(i.fieldErrors!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var m=0;m<i.fieldErrors.length;m++){var g,v=i.fieldErrors[m];((g=this._selector.node.metadata)===null||g===void 0?void 0:g.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(cI(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var b,_,S={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:o,shouldThrow:(b=(_=this._selector.node.metadata)===null||_===void 0?void 0:_.throwOnFieldError)!==null&&b!==void 0?b:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[S]:this._fieldErrors.push(S)}a!=null&&this._seenRecords.add(a),s!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(s)),l?.forEach(function(E){u._updatedDataIDs.add(E)})},t._readClientEdge=function(n,i,o){var a=this,s,l=n.backingField;l.kind==="ClientExtension"&&tn(!1);var u=(s=l.alias)!==null&&s!==void 0?s:l.name,d={};this._traverseSelections([l],i,d);var f=d[u];if(f==null||Mze(f))return o[u]=f,f;if(n.linkedField.plural){Array.isArray(f)||tn(!1);var h;n.kind!=="ClientEdgeToClientObject"&&tn(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var I,M=(I=n.concreteType)!==null&&I!==void 0?I:N.__typename;typeof M!="string"&&tn(!1);var P=a1(N,l.path,a._owner.identifier),U=a._resolverCache.ensureClientRecord(P,M),j=n.modelResolvers;if(j!=null){var V=j[M];V===void 0&&tn(!1);var Y=a._readResolverFieldImpl(V,U);return Y!=null?U:null}return U}):h=f.map(function(N){return a1(N,l.path,a._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var p=this._readLinkedIds(n.linkedField,h,i,o);return this._clientEdgeTraversalPath.pop(),o[u]=p,p}else{var m,g=a1(f,l.path,this._owner.identifier),v,b=(m=n.concreteType)!==null&&m!==void 0?m:f.__typename,_;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof b!="string"&&tn(!1),v=this._resolverCache.ensureClientRecord(g,b),_=null):(v=g,_=null):(v=g,_={readerClientEdge:n,clientEdgeDestinationID:g});var S=n.modelResolvers;if(S!=null){typeof b!="string"&&tn(!1);var E=S[b];E===void 0&&tn(!1);var C=this._readResolverFieldImpl(E,v);if(C==null)return o[u]=null,null}this._clientEdgeTraversalPath.push(_);var A=o[u];A==null||typeof A=="object"||tn(!1);var T=this._fieldErrors;this._fieldErrors=null;var R=this._traverse(n.linkedField,v,A);return this._prependPreviousErrors(T,u),this._clientEdgeTraversalPath.pop(),o[u]=R,R}},t._readScalar=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=lg(n,this._variables),u=ki.getValue(i,l);return u===null||lI.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(u)&&u.length===0?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(s),o[s]=u,u},t._readLink=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=lg(n,this._variables),u=ki.getLinkedRecordID(i,l);if(u==null)return o[s]=u,u===null?this._maybeAddFieldErrors(i,l):u===void 0&&this._markDataAsMissing(s),u;var d=o[s];d==null||typeof d=="object"||tn(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,u,d);return this._prependPreviousErrors(f,s),o[s]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var a=this._fieldErrors[o];a.owner===this._fragmentName&&(a.kind==="missing_expected_data.throw"||a.kind==="missing_expected_data.log"||a.kind==="missing_required_field.throw"||a.kind==="missing_required_field.log")&&(a.fieldPath="".concat(i,".").concat(a.fieldPath))}if(n!=null){for(var s=this._fieldErrors.length-1;s>=0;s--)n.push(this._fieldErrors[s]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=lg(n,this._variables),u=ki.getActorLinkedRecordID(i,l);if(u==null)return o[s]=u,u===void 0?this._markDataAsMissing(s):u===null&&this._maybeAddFieldErrors(i,l),o[s];var d=u[0],f=u[1],h={};return this._createFragmentPointer(n.fragmentSpread,ki.fromObject({__id:f}),h),o[s]={__fragmentRef:h,__viewer:d},o[s]},t._readPluralLink=function(n,i,o){var a=lg(n,this._variables),s=ki.getLinkedRecordIDs(i,a);return(s===null||lI.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(s)&&s.length===0)&&this._maybeAddFieldErrors(i,a),this._readLinkedIds(n,s,i,o)},t._readLinkedIds=function(n,i,o,a){var s=this,l,u=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return a[u]=i,i===void 0&&this._markDataAsMissing(u),i;var d=a[u];d==null||Array.isArray(d)||tn(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,m){if(p==null){p===void 0&&s._markDataAsMissing(String(m)),h[m]=p;return}var g=h[m];g==null||typeof g=="object"||tn(!1);var v=s._fieldErrors;s._fieldErrors=null,h[m]=s._traverse(n,p,g),s._prependPreviousErrors(v,m)}),this._prependPreviousErrors(f,u),a[u]=h,h},t._readModuleImport=function(n,i,o){var a=qze(n.documentName),s=ki.getValue(i,a),l=s!==void 0?s:n.componentModuleProvider;if(l==null){l===void 0&&this._markDataAsMissing("<module-import>");return}this._createFragmentPointer({kind:"FragmentSpread",name:n.fragmentName,args:n.args},i,o),o[Uze]=n.fragmentPropName,o[Bze]=l},t._readAliasedInlineFragment=function(n,i,o){var a=this._fieldErrors;this._fieldErrors=null;var s=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(a,n.name),s===!1&&(s=null),o[n.name]=s},t._readInlineFragment=function(n,i,o,a){if(n.type==null){var s=this._traverseSelections(n.selections,i,o);return s===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var s=this._traverseSelections(n.selections,i,o);if(!s)return!1}else return null;else{var u=this._implementsInterface(i,l);if(u===!1&&a)return null;var d=this._isMissingData,f=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=f||u===!1;var h=this._traverseSelections(n.selections,i,o);if(this._isWithinUnmatchedTypeRefinement=f,u===!1)return this._isMissingData=d,null;if(u==null)return;if(h===!1)return!1}return o},t._recordMatchesTypeCondition=function(n,i){var o=ki.getType(n);return o!=null&&o===i||ki.getDataID(n)===jze},t._createFragmentPointer=function(n,i,o){var a=o[ag];a==null&&(a=o[ag]={}),typeof a=="object"&&a!=null||tn(!1),o[sg]==null&&(o[sg]=ki.getDataID(i)),a[n.name]=Hg(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[zze]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[uI]=(0,o1.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var a=o[ag];a==null&&(a=o[ag]={}),typeof a=="object"&&a!=null||tn(!1),o[sg]==null&&(o[sg]=ki.getDataID(i));var s={},l=this._fragmentName;this._fragmentName=n.name;var u=this._variables,d=n.args?Hg(n.args,this._variables):{};this._variables=Lze.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,s),this._variables=u,this._fragmentName=l,a[n.name]=s},t._implementsInterface=function(n,i){var o=ki.getType(n),a=this._recordSource.get(Jze(o)),s=a!=null?ki.getValue(a,i):null;return s==null&&this._markDataAsMissing("<abstract-type-hint>"),s},e})();function cI(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,sI.default)((0,sI.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,tn(!1)}}function dI(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,a=null;try{var s=[];e.fragment!=null&&s.push(r);var l=e.args?Hg(e.args,t):void 0;s.push(l),s.push(n),o=i.apply(null,s)}catch(u){o=null,u!==Kze&&(a=u)}return[o,a]}function a1(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;tn(!1)}var pC={read:RB},Yze=He.default,fI=Yze(Jr),Xze=uC,Zze=gB,e9e=_B,t9e=Vl,hI=t9e.getLocalVariables,is=so,Nb=Sr,r9e=Rb,pI=r9e.generateTypeID,s1=Le,n9e=Nb.getReadTimeResolverStorageKey,mI=Nb.getStorageKey,i9e=Nb.getModuleOperationKey;function o9e(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,u=new a9e(e,l,r,n,i,o);u.mark(s,a)}var a9e=(function(){function e(r,n,i,o,a,s){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=s??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=a}var t=e.prototype;return t.mark=function(n,i){(n.kind==="Operation"||n.kind==="SplitOperation")&&(this._operationName=n.name),this._traverse(n,i)},t._traverse=function(n,i){this._references.add(i);var o=this._recordSource.get(i);o!=null&&this._traverseSelections(n.selections,o)},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||s1(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ActorChange":o._traverseLink(a.linkedField,i);break;case"LinkedField":a.plural?o._traversePluralLink(a,i):o._traverseLink(a,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":if(a.abstractKey==null){var l=is.getType(i);(l!=null&&l===a.type||l===Nb.ROOT_TYPE)&&o._traverseSelections(a.selections,i)}else{var u=is.getType(i),d=pI(u);o._references.add(d),o._traverseSelections(a.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=hI(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=Zze(a,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=is.getType(i),m=pI(p);o._references.add(m);break}case"ModuleImport":o._traverseModuleImport(a,i);break;case"ClientExtension":o._traverseSelections(a.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(a,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(a,i);break;default:s1(!1)}})},t._traverseClientEdgeToClientObject=function(n,i){if(this._useExecTimeResolvers){this._traverseLink(n.linkedField,i);return}var o=this._traverseResolverField(n.backingField,i);if(o!=null){var a=this._recordSource.get(o);if(a!=null)if(n.backingField.isOutputType){var s=e9e(a);if(s!=null){var l=(0,fI.default)(s),u;try{for(l.s();!(u=l.n()).done;){var d=u.value;this._references.add(d)}}catch(_){l.e(_)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=is.getResolverLinkedRecordIDs(a,h);if(p!=null){var m=(0,fI.default)(p),g;try{for(m.s();!(g=m.n()).done;){var v=g.value;v!=null&&this._traverse(f,v)}}catch(_){m.e(_)}finally{m.f()}}}else{var b=is.getResolverLinkedRecordID(a,h);b!=null&&this._traverse(f,b)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=n9e(n,this._variables),a=is.getLinkedRecordID(i,o);a!=null&&this._references.add(a);var s=n.fragment;return s!=null&&this._traverseSelections([s],i),a}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&s1(!1);var a=i9e(n.documentName),s=is.getValue(i,a);if(s!=null){var l=o.get(s);if(l!=null){var u=Xze(l),d=this._variables;this._variables=hI(this._variables,u.argumentDefinitions,n.args),this._traverseSelections(u.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=mI(n,this._variables),a=is.getLinkedRecordID(i,o);a!=null&&this._traverse(n,a)},t._traversePluralLink=function(n,i){var o=this,a=mI(n,this._variables),s=is.getLinkedRecordIDs(i,a);s?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),s9e={mark:o9e},l9e=Symbol.iterator;function u9e(e,t){for(var r=e[l9e](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var c9e=u9e,d9e=Sr,f9e=d9e.ROOT_ID,h9e=lC,p9e=h9e.VIEWER_ID,m9e=Symbol.iterator;function g9e(e,t){for(var r=e[m9e](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==f9e&&i!==p9e)return!0;n=r.next()}return!1}var v9e=g9e,gI=Sb,vI=Bo,b9e=c9e,_9e=v9e,bI=pC,y9e=(function(){function e(r,n,i){this._subscriptions=new Set,this.__log=r,this._resolverCache=n,this._resolverContext=i}var t=e.prototype;return t.subscribe=function(n,i){var o=this,a={backup:null,callback:i,snapshot:n,stale:!1},s=function(){o._subscriptions.delete(a)};return this._subscriptions.add(a),{dispose:s}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var a=o.snapshot,s=bI.read(n,a.selector,i._resolverCache,i._resolverContext),l=gI(a.data,s.data);s.data=l,o.backup=s})},t.restoreSubscriptions=function(){this._subscriptions.forEach(function(n){var i=n.backup;n.backup=null,i?(i.data!==n.snapshot.data&&(n.stale=!0),n.snapshot={data:n.snapshot.data,isMissingData:i.isMissingData,missingClientEdges:i.missingClientEdges,missingLiveResolverFields:i.missingLiveResolverFields,seenRecords:i.seenRecords,selector:i.selector,fieldErrors:i.fieldErrors}):n.stale=!0})},t.updateSubscriptions=function(n,i,o,a){var s=this,l=i.size!==0;this._subscriptions.forEach(function(u){var d=s._updateSubscription(n,u,i,l,a);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,a,s){var l=i.backup,u=i.callback,d=i.snapshot,f=i.stale,h=a&&b9e(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?bI.read(n,d.selector,this._resolverCache,this._resolverContext):l,m=gI(d.data,p.data);if(p={data:m,isMissingData:p.isMissingData,missingClientEdges:p.missingClientEdges,missingLiveResolverFields:p.missingLiveResolverFields,seenRecords:p.seenRecords,selector:p.selector,fieldErrors:p.fieldErrors},i.snapshot=p,i.stale=!1,p.data!==d.data)return this.__log&&vI.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:s,snapshot:d,nextSnapshot:p}),u(p),d.selector.owner;if(vI.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||_9e(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),x9e=y9e,AB=He.default,_I=AB(Jr),S9e=AB(Si),TB=aC,w9e=TB.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,yI=TB.assertInternalActorIdentifier,E9e=F8e,k9e=H5e,C9e=nB,mC=Sze,R9e=mC.LiveResolverCache,A9e=mC.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,T9e=mC.getUpdatedDataIDs,gu=so,xI=Aze,$9e=pC,N9e=s9e,D9e=x9e,F9e=Sr,$B=Sr,l1=$B.ROOT_ID,I9e=$B.ROOT_TYPE,u1=Le,P9e=10,O9e=(function(){function e(r,n){var i=this,o,a,s,l,u,d,f,h;(0,S9e.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:P9e,this._shouldRetainWithinTTL_EXPERIMENTAL=(a=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&a!==void 0?a:!1,this._gcRun=null,this._gcScheduler=(s=n?.gcScheduler)!==null&&s!==void 0?s:E9e,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:C9e,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 R9e(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new D9e(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,M9e(this._recordSource)}var t=e.prototype;return t.getSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getOperationLoader=function(){return this._operationLoader},t._getMutableRecordSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getLiveResolverPromise=function(n){return this._resolverCache.getLiveResolverPromise(n)},t.batchLiveStateUpdates=function(n){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});try{this._resolverCache.batchLiveStateUpdates(n)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}},t.check=function(n,i){var o,a,s,l,u,d,f,h=n.root,p=this._getMutableRecordSource(),m=this._globalInvalidationEpoch,g=(o=(a=n.request.node.operation.use_exec_time_resolvers)!==null&&a!==void 0?a:((s=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),b=v!=null?v.epoch:null;if(m!=null&&(b==null||b<=m))return{status:"stale"};var _=(l=i?.handlers)!==null&&l!==void 0?l:[],S=(u=i?.getSourceForActor)!==null&&u!==void 0?u:function(A){return yI(A),p},E=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(A){return yI(A),p},C=k9e.check(S,E,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:w9e,h,_,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,g);return z9e(C,b,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,a=!1,s=function(){if(!a){a=!0;var d=i._roots.get(o);if(d!=null&&(d.refCount--,d.refCount===0)){var f=i._queryCacheExpirationTime,h=d.fetchTime!=null&&f!=null&&d.fetchTime<=Date.now()-f;if(h)i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(o),i.scheduleGC();else if(i._releaseBuffer.push(o),i._releaseBuffer.length>i._gcReleaseBufferSize){var p=i._releaseBuffer.shift();i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(p),i.scheduleGC()}}}},l=this._roots.get(o);return l!=null?(l.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(u){return u!==o})),l.refCount+=1):this._roots.set(o,{operation:n,refCount:1,epoch:null,fetchTime:null}),{dispose:s}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),a=$9e.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),a},t.notify=function(n,i){var o=this,a=this.__log;a?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var s=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(s,this._updatedRecordIDs,l,n),this._invalidationSubscriptions.forEach(function(h){o._updateInvalidationSubscription(h,i===!0)}),n!=null){var u=n.request.identifier,d=this._roots.get(u);if(d!=null)d.epoch=this._currentWriteEpoch,d.fetchTime=Date.now();else if(n.request.node.params.operationKind==="query"&&this._gcReleaseBufferSize>0&&this._releaseBuffer.length<this._gcReleaseBufferSize){var f={operation:n,refCount:0,epoch:this._currentWriteEpoch,fetchTime:Date.now()};this._releaseBuffer.push(u),this._roots.set(u,f)}}return a?.({name:"store.notify.complete",sourceOperation:n,updatedRecordIDs:this._updatedRecordIDs,invalidatedRecordIDs:this._invalidatedRecordIDs,subscriptionsSize:this._storeSubscriptions.size(),updatedOwners:l}),this._updatedRecordIDs.clear(),this._invalidatedRecordIDs.clear(),l},t.publish=function(n,i){var o=this._getMutableRecordSource();L9e(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var a=this.__log;a?.({name:"store.publish",source:n,optimistic:o===this._optimisticSource})},t.subscribe=function(n,i){return this._storeSubscriptions.subscribe(n,i)},t.holdGC=function(){var n=this;this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._gcHoldCounter++;var i=function(){n._gcHoldCounter>0&&(n._gcHoldCounter--,n._gcHoldCounter===0&&n._shouldScheduleGC&&(n.scheduleGC(),n._shouldScheduleGC=!1))};return{dispose:i}},t.toJSON=function(){return"RelayModernStore()"},t.getEpoch=function(){return this._currentWriteEpoch},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t.lookupInvalidationState=function(n){var i=this,o=new Map;return n.forEach(function(a){var s,l=i.getSource().get(a);o.set(a,(s=gu.getInvalidationEpoch(l))!==null&&s!==void 0?s:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,a=n.invalidations;if(o.get("global")!==a.get("global"))return!0;var s=(0,_I.default)(n.dataIDs),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(o.get(u)!==a.get(u))return!0}}catch(d){s.e(d)}finally{s.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,a={callback:i,invalidationState:n},s=function(){o._invalidationSubscriptions.delete(a)};return this._invalidationSubscriptions.add(a),{dispose:s}},t._updateInvalidationSubscription=function(n,i){var o=this,a=n.callback,s=n.invalidationState,l=s.dataIDs,u=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});u&&a()},t.snapshot=function(){this._optimisticSource!=null&&u1(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=xI.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||u1(!1);var i=this.__log;i?.({name:"store.restore"});var o=xI.getOptimisticRecordIDs(n);this._resolverCache.unsubscribeFromLiveResolverRecords(o),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(o)},t.scheduleGC=function(){if(this._gcHoldCounter>0){this._shouldScheduleGC=!0;return}this._gcRun||(this._gcRun=this._collect(),this._gcScheduler(this._gcStep))},t.__gc=function(){if(this._optimisticSource==null)for(var n=this._collect();!n.next().done;);},t._collect=function*(){if(!(this._shouldRetainWithinTTL_EXPERIMENTAL&&this._queryCacheExpirationTime==null)){var n=this.__log;e:for(;;){n?.({name:"store.gc.start"});var i=this._currentWriteEpoch,o=new Set,a=(0,_I.default)(this._roots.entries()),s;try{for(a.s();!(s=a.n()).done;){var l,u,d,f=s.value,h=f[0],p=f[1],m=p.operation,g=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var b=this._queryCacheExpirationTime;b==null&&u1(!1);var _=v==null||v<=Date.now()-b,S=_&&g===0&&!this._releaseBuffer.includes(h);if(S)continue}var E=m.root,C=(l=(u=m.request.node.operation.use_exec_time_resolvers)!==null&&u!==void 0?u:((d=m.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(N9e.mark(this._recordSource,E,o,this._operationLoader,this._shouldProcessClientComponents,C),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(M){a.e(M)}finally{a.f()}for(var A=this._recordSource.getRecordIDs(),T=0;T<A.length;T++){var R=A[T];if(!o.has(R)){var N=this._recordSource.get(R);if(N!=null){var I=gu.getValue(N,A9e);I?.()}this._recordSource.remove(R),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(R)}}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=T9e(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function M9e(e){if(!e.has(l1)){var t=gu.create(l1,I9e);e.set(l1,t)}}function L9e(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),m=t.get(h);if(m!==null){var g;p!=null?g=gu.clone(p):g=m!=null?gu.clone(m):null,g&&(gu.setValue(g,F9e.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,g))}});for(var a=t.getRecordIDs(),s=0;s<a.length;s++){var l=a[s],u=t.get(l),d=e.get(l);if(u&&d){var f=gu.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 z9e(e,t,r,n){var i=e.mostRecentlyInvalidatedAt,o=e.status;if(typeof i=="number"&&(t==null||i>t))return{status:"stale"};if(o==="missing")return{status:"missing"};if(r!=null&&n!=null){var a=r<=Date.now()-n;if(a)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var gC=O9e,NB=Sr,U9e=NB.ROOT_TYPE,SI=NB.getStorageKey,B9e=cB,j9e=B9e.readUpdatableFragment,q9e=dB,V9e=q9e.readUpdatableQuery,wI=Le,G9e=(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,U9e)),n},t._getRootField=function(n,i,o){var a=n.node.selections.find(function(s){return s.kind==="LinkedField"&&s.name===i||s.kind==="RequiredField"&&s.field.name===i});return a&&a.kind==="RequiredField"&&(a=a.field),a&&a.kind==="LinkedField"||wI(!1),a.plural!==o&&wI(!1),a},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=SI(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=SI(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return V9e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return j9e(n,i,this,this._missingFieldHandlers)},e})(),K9e=G9e,c1,d1,f1=lB,h1=mB,EI=K9e,H9e=Bo,W9e=pC,kI=lc,ug=Le,p1=typeof Jg<"u"?Jg:typeof window<"u"?window:void 0,m1=(c1=p1==null||(d1=p1.ErrorUtils)===null||d1===void 0?void 0:d1.applyWithGuard)!==null&&c1!==void 0?c1:function(e,t,r,n,i){return e.apply(t,r)},J9e=(function(){function e(r,n,i,o,a){this._hasStoreSnapshot=!1,this._handlerProvider=n||null,this._pendingBackupRebase=!1,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=r,this._appliedOptimisticUpdates=new Set,this._gcHold=null,this._getDataID=i,this._missingFieldHandlers=o,this._log=a}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||ug(!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(H9e.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&ug(!1),this._isRunning=!0,o)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var a=this._commitData();return(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size)&&(this._hasStoreSnapshot||(this._store.snapshot(),this._hasStoreSnapshot=!0),this._applyUpdates()),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._isRunning=!1,this._store.notify(n,a)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,a=n.operation,s=n.updater,l=o.source,u=o.fieldPayloads,d=new f1(this._store.getSource(),l),f=new h1(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(u&&u.length&&u.forEach(function(v){var b=i._handlerProvider&&i._handlerProvider(v.handle);b||ug(!1),b.update(f,v)}),s){var h=a.fragment;h==null&&ug(!1);var p=new EI(d,f,h,this._missingFieldHandlers),m=CI(l,h);s(p,m)}var g=f.getIDsMarkedForInvalidation();return this._store.publish(l,g),f.isStoreMarkedForInvalidation()},t._commitData=function(){var n=this;if(!this._pendingData.size)return!1;var i=!1;return this._pendingData.forEach(function(o){if(o.kind==="payload"){var a=n._publishSourceFromPayload(o);i=i||a}else if(o.kind==="source"){var s=o.source;n._store.publish(s)}else{var l=o.updater,u=kI.create(),d=new f1(n._store.getSource(),u),f=new h1(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);m1(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=kI.create(),o=new f1(this._store.getSource(),i),a=new h1(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),s=function(u){if(u.storeUpdater){var d=u.storeUpdater;m1(d,null,[a],null,"RelayPublishQueue:applyUpdates")}else{var f=u.operation,h=u.payload,p=u.updater,m=h.source,g=h.fieldPayloads;if(m&&a.publishSource(m,g),p){var v;m&&(v=CI(m,f.fragment));var b=new EI(o,a,f.fragment,n._missingFieldHandlers);m1(p,null,[b,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(s),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){s(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function CI(e,t){var r=W9e.read(e,t).data;return r}var Q9e=J9e,Y9e=He.default,RI=Y9e(tr),X9e=RMe,DB=aC,AI=DB.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,cg=DB.assertInternalActorIdentifier,g1=Gl,TI=qLe,Z9e=HLe,e7e=JLe,t7e=nB,r7e=a8e,n7e=DLe,i7e=T8e,o7e=gC,a7e=Q9e,$I=lc,FB=(function(){function e(r){var n=this,i,o,a,s,l,u,d,f,h,p,m;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var g=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new o7e(new $I,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:l7e,this.relayFieldLogger=(a=r.relayFieldLogger)!==null&&a!==void 0?a:r7e,this._defaultRenderPolicy=(s=r.UNSTABLE_defaultRenderPolicy)!==null&&s!==void 0?s:"partial",this._operationLoader=g,this._operationExecutions=new Map,this._network=TI(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:t7e,this._missingFieldHandlers=(u=r.missingFieldHandlers)!==null&&u!==void 0?u:[],this._publishQueue=new a7e(v,(d=r.handlerProvider)!==null&&d!==void 0?d:X9e,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:n7e,this.__setNet=function(b){return n._network=TI(n,b)},this._operationTracker=(m=r.operationTracker)!==null&&m!==void 0?m:new Z9e,this._shouldProcessClientComponents=r.shouldProcessClientComponents,e7e(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 g1.create(function(a){})},isClientPayload:!1,operation:n.operation,optimisticConfig:n,updater:null}).subscribe({});return{dispose:function(){return i.unsubscribe()}}},t.check=function(n){return this._missingFieldHandlers.length===0&&!s7e(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return g1.from({data:i})},isClientPayload:!0,operation:n,optimisticConfig:null,updater:null}).subscribe({})},t.commitUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.commitUpdate(n),i._publishQueue.run()})},t.lookup=function(n){return this._store.lookup(n)},t.subscribe=function(n,i){return this._store.subscribe(n,i)},t.retain=function(n){return this._store.retain(n)},t.isServer=function(){return this._isServer},t._checkSelectorAndHandleMissingFields=function(n,i){var o=this,a=$I.create(),s=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:AI,getSourceForActor:function(d){return cg(d),s},getTargetForActor:function(d){return cg(d),a}});return a.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(a),o._publishQueue.run()}),l},t._scheduleUpdates=function(n){var i=this._scheduler;i!=null?i.schedule(n):n()},t.execute=function(n){var i=this,o=n.operation;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return i.check(o)})},isClientPayload:!1,operation:o,optimisticConfig:null,updater:null})},t.executeSubscription=function(n){var i=this,o=n.operation,a=n.updater;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null)},isClientPayload:!1,operation:o,optimisticConfig:null,updater:a})},t.executeMutation=function(n){var i=this,o=n.operation,a=n.optimisticResponse,s=n.optimisticUpdater,l=n.updater,u=n.uploadables,d;return(a||s)&&(d={operation:o,response:a,updater:s}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,RI.default)((0,RI.default)({},o.request.cacheConfig),{},{force:!0}),u)},isClientPayload:!1,operation:o,optimisticConfig:d,updater:l})},t.executeWithSource=function(n){var i=n.operation,o=n.source;return this._execute({createSource:function(){return o},isClientPayload:!1,operation:i,optimisticConfig:null,updater:null})},t.toJSON=function(){var n;return"RelayModernEnvironment(".concat((n=this.configName)!==null&&n!==void 0?n:"",")")},t._execute=function(n){var i=this,o=n.createSource,a=n.isClientPayload,s=n.operation,l=n.optimisticConfig,u=n.updater,d=this._publishQueue,f=this._store;return g1.create(function(h){var p=i7e.execute({actorIdentifier:AI,getDataID:i._getDataID,isClientPayload:a,log:i.__log,operation:s,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(g){return cg(g),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(g){return cg(g),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:u,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function s7e(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}FB.prototype["@@RelayModernEnvironment"]=!0;function l7e(){}var u7e=FB,c7e=xb,d7e=ga,f7e=d7e.getRequest,h7e=Kl,p7e=h7e.createOperationDescriptor,m7e=va,g7e=m7e.createReaderSelector;function v7e(e,t){var r=f7e(t.subscription);if(r.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var n=t.configs,i=t.onCompleted,o=t.onError,a=t.onNext,s=t.variables,l=t.cacheConfig,u=p7e(r,s,l),d=n?c7e.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:u,updater:f}).subscribe({next:function(m){if(a!=null){var g=u.fragment,v;if(Array.isArray(m)){var b,_;v=(b=m[0])===null||b===void 0||(_=b.extensions)===null||_===void 0?void 0:_.__relay_subscription_root_id}else{var S;v=(S=m.extensions)===null||S===void 0?void 0:S.__relay_subscription_root_id}typeof v=="string"&&(g=g7e(g.node,v,g.variables,g.owner));var E=e.lookup(g).data;a(E)}},error:o,complete:i});return{dispose:h.unsubscribe}}var b7e=v7e,_7e=He.default;_7e(tr);var IB=Sr;IB.getModuleComponentKey;IB.getModuleOperationKey;var y7e=Object.prototype.hasOwnProperty;function x7e(e){for(var t in e)if(y7e.call(e,t))return!1;return!0}var S7e=x7e,vC=va,w7e=vC.getDataIDsFromFragment,E7e=vC.getSelector,k7e=vC.getVariablesFromFragment,C7e=S7e,zf=Bo,R7e=oc,NI=R7e.stableCopy,A7e=RU,DI=A7e.intern;function T7e(e,t){var r=E7e(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(u){return u.owner.identifier}).join(",")+"]",i=k7e(e,t),o=w7e(e,t);if(zf.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var a=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return a=zf.STRING_INTERN_LEVEL<=1?a:DI(a,zf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||C7e(i)?"{}":JSON.stringify(NI(i)))+"/"+a}else{var s,l=(s=JSON.stringify(o))!==null&&s!==void 0?s:"missing";return l=zf.STRING_INTERN_LEVEL<=1?l:DI(l,zf.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(NI(i))+"/"+l}}var $7e=T7e,Uf=Le;function N7e(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&Uf(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&Uf(!1);var o=i.operation.default?i.operation.default:i.operation,a=i.fragmentPathInResult;typeof o=="string"&&Uf(!1);var s=i.identifierInfo;return s!=null&&(s.identifierField==null||typeof s.identifierField=="string"||Uf(!1),s.identifierQueryVariableName==null||typeof s.identifierQueryVariableName=="string"||Uf(!1)),{fragmentRefPathInResponse:a,identifierInfo:s,refetchableRequest:o,refetchMetadata:i}}var PB=N7e,D7e=PB,v1=Le;function F7e(e,t){var r,n,i=D7e(e),o=i.refetchableRequest,a=i.refetchMetadata,s=a.connection;s==null&&v1(!1);var l=s.path,u=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];u==null&&v1(!1);var d=a.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||v1(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:s,stream:u.stream===!0}}var I7e=F7e,OB=He.default,dg=OB(Si),Rc=OB(tr),FI=Le;function P7e(e,t,r,n,i,o){var a,s=o.backward,l=o.forward;if(e==="backward"){var u;s!=null&&s.count!=null&&s.cursor!=null||FI(!1);var d=(0,Rc.default)((0,Rc.default)((0,Rc.default)({},n),i),{},(u={},(0,dg.default)(u,s.cursor,r),(0,dg.default)(u,s.count,t),u));return l&&l.cursor&&(d[l.cursor]=null),l&&l.count&&(d[l.count]=null),d}l!=null&&l.count!=null&&l.cursor!=null||FI(!1);var f=(0,Rc.default)((0,Rc.default)((0,Rc.default)({},n),i),{},(a={},(0,dg.default)(a,l.cursor,r),(0,dg.default)(a,l.count,t),a));return s&&s.cursor&&(f[s.cursor]=null),s&&s.count&&(f[s.count]=null),f}var O7e=P7e,M7e=He.default,L7e=M7e(Jr),II=Le;function z7e(e,t){var r=e,n=(0,L7e.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)||II(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||II(!1),r=r[o])}}catch(a){n.e(a)}finally{n.f()}return r}var U7e=z7e,MB=VOe;MB.isErrorResult;MB.isValueResult;var B7e=yb,j7e=Qk,q7e=GMe,V7e=HMe,G7e=a6e,PI=xb,K7e=m6e,H7e=Gl,W7e=$6e,J7e=O6e,fg=_b,xa=ga,Q7e=z6e,bC=Wa;bC.generateClientID;bC.generateUniqueClientID;bC.isClientID;var Y7e=a4e,X7e=u4e,Z7e=f4e,eUe=Yk,LB=wb;LB.isSuspenseSentinel;LB.suspenseSentinel;var tUe=LLe,OI=Vl,rUe=u7e,MI=Kl,qi=va,nUe=gC,iUe=lc,co=Sr,oUe=Kk,LI=lC,aUe=b7e,sUe=SU,lUe=$7e,uUe=I7e,cUe=O7e,dUe=IU,fUe=PB,hUe=wU,pUe=U7e,mUe=Xp,gUe=mUe.handlePotentialSnapshotErrors,vUe=pU,bUe=PU,_Ue=Sb,yUe=J7,xUe=Bo,SUe=gU,zB=oc;zB.hasCycle;zB.stableCopy;var wUe={Environment:rUe,Network:K7e,Observable:H7e,RecordSource:iUe,ReplaySubject:SUe,Store:nUe,areEqualSelectors:qi.areEqualSelectors,createFragmentSpecResolver:Y7e,createNormalizationSelector:qi.createNormalizationSelector,createOperationDescriptor:MI.createOperationDescriptor,createReaderSelector:qi.createReaderSelector,createRequestDescriptor:MI.createRequestDescriptor,getArgumentValues:co.getArgumentValues,getDataIDsFromFragment:qi.getDataIDsFromFragment,getDataIDsFromObject:qi.getDataIDsFromObject,getNode:xa.getNode,getFragment:xa.getFragment,getInlineDataFragment:xa.getInlineDataFragment,getModuleComponentKey:co.getModuleComponentKey,getModuleOperationKey:co.getModuleOperationKey,getPaginationFragment:xa.getPaginationFragment,getPluralSelector:qi.getPluralSelector,getRefetchableFragment:xa.getRefetchableFragment,getRequest:xa.getRequest,getRequestIdentifier:hUe,getSelector:qi.getSelector,getSelectorsFromObject:qi.getSelectorsFromObject,getSingularSelector:qi.getSingularSelector,getStorageKey:co.getStorageKey,getVariablesFromFragment:qi.getVariablesFromFragment,getVariablesFromObject:qi.getVariablesFromObject,getVariablesFromPluralFragment:qi.getVariablesFromPluralFragment,getVariablesFromSingularFragment:qi.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:gUe,graphql:xa.graphql,isFragment:xa.isFragment,isInlineDataFragment:xa.isInlineDataFragment,isRequest:xa.isRequest,readInlineData:tUe,readFragment:oUe.readFragment,MutationTypes:PI.MutationTypes,RangeOperations:PI.RangeOperations,ConnectionHandler:B7e,VIEWER_ID:LI.VIEWER_ID,VIEWER_TYPE:LI.VIEWER_TYPE,applyOptimisticMutation:q7e,commitLocalUpdate:V7e,commitMutation:G7e,fetchQuery:W7e,fetchQuery_DEPRECATED:J7e,isRelayModernEnvironment:eUe,requestSubscription:aUe,ConnectionInterface:j7e,PreloadableQueryRegistry:Q7e,RelayFeatureFlags:xUe,DEFAULT_HANDLE_KEY:yUe.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:co.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:co.FRAGMENT_OWNER_KEY,ID_KEY:co.ID_KEY,REF_KEY:co.REF_KEY,REFS_KEY:co.REFS_KEY,ROOT_ID:co.ROOT_ID,ROOT_TYPE:co.ROOT_TYPE,TYPENAME_KEY:co.TYPENAME_KEY,deepFreeze:sUe,isPromise:vUe,isScalarAndEqual:bUe,recycleNodesInto:_Ue,getFragmentIdentifier:lUe,getRefetchMetadata:fUe,getPaginationMetadata:uUe,getPaginationVariables:cUe,getPendingOperationsForFragment:dUe,getValueAtPath:pUe,__internal:{createRelayContext:X7e,createRelayLoggingContext:Z7e,getOperationVariables:OI.getOperationVariables,getLocalVariables:OI.getLocalVariables,fetchQuery:fg.fetchQuery,fetchQueryDeduped:fg.fetchQueryDeduped,getPromiseForActiveRequest:fg.getPromiseForActiveRequest,getObservableForActiveRequest:fg.getObservableForActiveRequest}},bt=wUe,EUe=gC,UB=EUe;const BB=Zj(UB),kUe=eq({__proto__:null,default:BB},[UB]);let zI={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==bt.ROOT_TYPE))return o}};function CUe(e,t,r){return new bt.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function RUe(e,t,r){return new BB(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function AUe(e,t,r){return new kUe(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let TUe={make:CUe,makeLiveStore:RUe,_makeLiveStoreCjs:AUe};function $Ue(e,t,r,n,i,o,a){return new bt.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([zI]):[zI],relayFieldLogger:o,isServer:a})}function jB(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 NUe(e,t,r,n){let i=n!==void 0?n:[];bt.commitLocalUpdate(e,o=>{jB(e,t,r).forEach(a=>{if(!i.includes(a))return re(ro(o.get(a)),s=>{s.invalidateRecord()})})})}let DUe={make:$Ue,findAllConnectionIds:jB,invalidateAllOfConnection:NUe};var FUe=kt,IUe=bt,PUe=IUe.__internal.createRelayContext,cf=PUe(FUe),qB={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})(qB);var Db=qB.exports,VB={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})(VB);var Fb=VB.exports,GB={exports:{}},KB={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})(KB);var OUe=KB.exports;(function(e){var t=OUe;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})(GB);var Ib=GB.exports,UI=Le;function MUe(e,t){t&&typeof t=="object"||UI(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||UI(!1)}}var LUe=MUe;function HB(e){return e.displayName||e.name||"Component"}function zUe(e){return"Relay("+HB(e)+")"}var Pb={getComponentName:HB,getContainerName:zUe},UUe=kt,WB=UUe.createContext({rootIsQueryRenderer:!1}),BUe=He.default,jUe=BUe(Db),qUe=LUe,JB=Pb,VUe=JB.getComponentName,GUe=JB.getContainerName,KUe=cf,HUe=WB,WUe=Le,US=kt,JUe=bt,QUe=JUe.getFragment,BI=US.useContext;function YUe(e,t,r){var n=GUe(e);qUe(VUe(e),t);var i={};for(var o in t)i[o]=QUe(t[o]);var a=r(e,i);a.displayName=n;function s(u,d){var f,h=BI(KUe);h==null&&WUe(!1);var p=BI(HUe);return US.createElement(a,(0,jUe.default)({},u,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:u.componentRef||d}))}s.displayName=n;var l=US.forwardRef(s);return l}var _C=YUe;function XUe(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 ZUe=XUe,eBe=ZUe,tBe=Le;function rBe(e){return nBe(e)||tBe(!1),e}function nBe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&eBe(e.environment)}var yC={assertRelayContext:rBe},em=He.default,iBe=em(Db),oBe=em(uf),aBe=em(Fb),sBe=em(Ib),jI=em(Si),lBe=["componentRef","__relayContext","__rootIsQueryRenderer"],uBe=_C,cBe=Pb,dBe=cBe.getContainerName,fBe=yC,qI=fBe.assertRelayContext,hBe=Bs,VI=kt,xC=bt,GI=xC.createFragmentSpecResolver,KI=xC.getDataIDsFromObject,pBe=xC.isScalarAndEqual;function mBe(e,t){var r,n=dBe(e);return r=(function(i){(0,sBe.default)(o,i);function o(s){var l,u;u=i.call(this,s)||this,(0,jI.default)((0,aBe.default)(u),"_handleFragmentDataUpdate",function(){var p=u.state.resolver;u.setState(function(m){return p===m.resolver?{data:m.resolver.resolve(),relayProp:hg(m.relayProp.environment)}:null})});var d=qI(s.__relayContext),f=(l=s.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=GI(d,n,t,s,f);return u.state={data:h.resolve(),prevProps:s,prevPropsContext:d,relayProp:hg(d.environment),resolver:h},u}o.getDerivedStateFromProps=function(l,u){var d,f=u.prevProps,h=qI(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,m=KI(t,f),g=KI(t,l),v=u.resolver;if(u.prevPropsContext.environment!==h.environment||!hBe(m,g))return v=GI(h,n,t,l,p),{data:v.resolve(),prevPropsContext:h,prevProps:l,relayProp:hg(h.environment),resolver:v};v.setProps(l);var b=v.resolve();return b!==u.data?{data:b,prevProps:l,prevPropsContext:h,relayProp:hg(h.environment)}:null};var a=o.prototype;return a.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.componentDidUpdate=function(l,u){this.state.resolver!==u.resolver?(u.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.componentWillUnmount=function(){this.state.resolver.dispose()},a.shouldComponentUpdate=function(l,u){if(u.data!==this.state.data)return!0;for(var d=Object.keys(l),f=0;f<d.length;f++){var h=d[f];if(h==="__relayContext"){if(u.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(h)&&!pBe(l[h],this.props[h]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();u!==f&&this.setState({data:f})},a._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var l=this.state,u=l.data,d=l.resolver,f=d.resolve();d.setCallback(this.props,this._handleFragmentDataUpdate),u!==f&&this.setState({data:f})},a.render=function(){var l=this.props,u=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,oBe.default)(l,lBe);return VI.createElement(e,(0,iBe.default)({},d,this.state.data,{ref:u,relay:this.state.relayProp}))},o})(VI.Component),(0,jI.default)(r,"displayName",n),r}function hg(e){return{environment:e}}function gBe(e,t){return uBe(e,t,mBe)}var vBe={createContainer:gBe},Ob=kt,SC=bt;SC.createOperationDescriptor;SC.deepFreeze;SC.getRequest;Ob.useLayoutEffect;Ob.useState;Ob.useRef;Ob.useMemo;var bBe=He.default,HI=bBe(tr),_Be=bt,yBe=_Be.getSelector;function xBe(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,a,s=e[n],l=t[n],u=yBe(s,l),d=u!=null&&u.kind==="PluralReaderSelector"?(i=(o=u.selectors[0])===null||o===void 0?void 0:o.owner.variables)!==null&&i!==void 0?i:{}:(a=u?.owner.variables)!==null&&a!==void 0?a:{};r=(0,HI.default)((0,HI.default)({},r),d)}),r}var QB=xBe,SBe=He.default,WI=SBe(Si),b1=Le,wC=bt,wBe=wC.__internal.fetchQuery,EBe=wC.createOperationDescriptor,kBe=wC.isRelayModernEnvironment,CBe=(function(){function e(r){(0,WI.default)(this,"_selectionReferences",[]),(0,WI.default)(this,"_didFetchFinish",!1),r!=null&&(this._cacheSelectionReference=r.cacheSelectionReference,this._selectionReferences=r.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(n,i,o){return(o==="store-and-network"||o==="store-or-network")&&n.check(i).status==="available"?(this._retainCachedOperation(n,i),n.lookup(i.fragment)):null},t.getFetchResult=function(){if(this._didFetchFinish){if(this._error!=null)return{error:this._error};if(this._snapshot!=null)return{snapshot:this._snapshot}}else return null},t.execute=function(n){var i=this,o=n.environment,a=n.operation,s=n.preservePreviousReferences,l=s===void 0?!1:s,u=o.retain(a),d=function(){i._selectionReferences=i._selectionReferences.concat(u)},f=function(){l||i.disposeSelectionReferences(),i._selectionReferences=i._selectionReferences.concat(u)},h=function(){i._selectionReferences=i._selectionReferences.concat(u)};return kBe(o)?wBe(o,a).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:a}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||b1(!1),typeof n=="function"&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(n),this._didFetchFinish&&(this._error!=null?n({error:this._error}):this._snapshot!=null&&n({snapshot:this._snapshot})))},t.fetch=function(n,i){var o=this,a=n.environment,s=n.operation,l=n.onDataChange,u=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:a,onDataChangeCallbacks:f||[],operation:s},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?EBe(s.request.node,s.request.variables,i):s,p=this.execute({environment:a,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:u})},error:function(g){o._didFetchFinish=!0,o._error=g,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;u?v&&v.forEach(function(b){b({error:g})}):d=g}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},u=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||b1(!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||b1(!1);var a=this._fetchOptions,s=a.environment,l=a.onDataChangeCallbacks,u=a.operation;if(!this._snapshot&&(this._snapshot=s.lookup(u.fragment),this._rootSubscription=s.subscribe(this._snapshot,function(f){if(i._fetchOptions!=null){var h=i._fetchOptions.onDataChangeCallbacks;Array.isArray(h)&&h.forEach(function(p){return p({snapshot:f})})}}),this._snapshot&&o&&Array.isArray(l))){var d=this._snapshot;l.forEach(function(f){return f({snapshot:d})})}},e})(),EC=CBe,df=He.default,RBe=df(Db),_1=df(uf),Bf=df(Fb),ABe=df(Ib),iu=df(Si),di=df(tr),TBe=["componentRef"],$Be=["componentRef","__relayContext","__rootIsQueryRenderer"],NBe=["componentRef","__relayContext","__rootIsQueryRenderer"],DBe=_C,y1=QB,YB=Pb,FBe=YB.getComponentName,IBe=YB.getContainerName,PBe=cf,OBe=EC,MBe=yC,x1=MBe.assertRelayContext,S1=Bs,Aa=Le,w1=kt,qs=bt,JI=qs.ConnectionInterface,QI=qs.Observable,pg=qs.RelayFeatureFlags,mg=qs.createFragmentSpecResolver,LBe=qs.createOperationDescriptor,YI=qs.getDataIDsFromObject,zBe=qs.getRequest,UBe=qs.getVariablesFromObject,BBe=qs.isScalarAndEqual,XI="forward";function jBe(e){var t=e.path;return t||Aa(!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 qBe(e){var t=e.count;return t||Aa(!1),function(r,n){return(0,di.default)((0,di.default)({},r),{},(0,iu.default)({},t,n))}}function VBe(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&&Aa(!1),t&&Aa(!1),t=(0,di.default)((0,di.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||Aa(!1),t||{}}function ZI(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function GBe(e,t,r){var n;FBe(e);var i=IBe(e),o=VBe(t),a=r.getConnectionFromProps||jBe(o),s=r.direction||o.direction;s||Aa(!1);var l=r.getFragmentVariables||qBe(o);return n=(function(u){(0,ABe.default)(d,u);function d(h){var p,m;m=u.call(this,h)||this,(0,iu.default)((0,Bf.default)(m),"_handleFragmentDataUpdate",function(){m.setState({data:m._resolver.resolve()})}),(0,iu.default)((0,Bf.default)(m),"_hasMore",function(){var b=m._getConnectionData();return!!(b&&b.hasMore&&b.cursor)}),(0,iu.default)((0,Bf.default)(m),"_isLoading",function(){return!!m._refetchSubscription}),(0,iu.default)((0,Bf.default)(m),"_refetchConnection",function(b,_,S){if(!m._canFetchPage("refetchConnection"))return{dispose:function(){}};m._refetchVariables=S;var E={count:b,cursor:null,totalCount:b},C=m._fetchPage(E,ZI(_),{force:!0});return{dispose:C.unsubscribe}}),(0,iu.default)((0,Bf.default)(m),"_loadMore",function(b,_,S){if(!m._canFetchPage("loadMore"))return{dispose:function(){}};var E=ZI(_),C=m._getConnectionData();if(!C)return QI.create(function(M){return M.complete()}).subscribe(E),null;var A=C.edgeCount+b;if(S&&S.force)return m._refetchConnection(A,_);var T=JI.get();T.END_CURSOR,T.START_CURSOR;var R=C.cursor,N={count:b,cursor:R,totalCount:A},I=m._fetchPage(N,E,S);return{dispose:I.unsubscribe}});var g=x1(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return m._isARequestInFlight=!1,m._refetchSubscription=null,m._refetchVariables=null,pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?m._resolver=mg(g,i,t,h,v):m._resolver=mg(g,i,t,h,v,m._handleFragmentDataUpdate),m.state={data:m._resolver.resolve(),prevContext:g,contextForChildren:g,relayProp:m._buildRelayProp(g),resolverGeneration:0},m._isUnmounted=!1,m._hasFetched=!1,m}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,m){pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(m.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var m=this,g,v=x1(p.__relayContext),b=(g=p.__rootIsQueryRenderer)!==null&&g!==void 0?g:!1,_=YI(t,this.props),S=YI(t,p),E=y1(t,this.props),C=y1(t,p);v.environment!==this.state.prevContext.environment||!S1(E,C)||!S1(_,S)?(this._cleanup(),pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=mg(v,i,t,p,b):this._resolver=mg(v,i,t,p,b,this._handleFragmentDataUpdate),this.setState(function(T){return{prevContext:v,contextForChildren:v,relayProp:m._buildRelayProp(v),resolverGeneration:T.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var A=this._resolver.resolve();A!==this.state.data&&this.setState({data:A})},f.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},f.shouldComponentUpdate=function(p,m){if(m.data!==this.state.data||m.relayProp!==this.state.relayProp||m.resolverGeneration!==this.state.resolverGeneration)return!0;for(var g=Object.keys(p),v=0;v<g.length;v++){var b=g[v];if(b==="__relayContext"){if(m.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(b)&&!BBe(p[b],this.props[b]))return!0}return!1},f._buildRelayProp=function(p){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:p.environment}},f._rerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();p!==m&&this.setState({data:m})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==m&&this.setState({data:m})},f._getConnectionData=function(){var p=this.props;p.componentRef;var m=(0,_1.default)(p,TBe),g=(0,di.default)((0,di.default)({},m),this.state.data),v=a(g);if(v==null)return null;var b=JI.get(),_=b.EDGES,S=b.PAGE_INFO,E=b.HAS_NEXT_PAGE,C=b.HAS_PREV_PAGE,A=b.END_CURSOR,T=b.START_CURSOR;typeof v!="object"&&Aa(!1);var R=v[_],N=v[S];if(R==null||N==null)return null;Array.isArray(R)||Aa(!1),typeof N!="object"&&Aa(!1);var I=s===XI?N[E]:N[C],M=s===XI?N[A]:N[T];return typeof I!="boolean"||R.length!==0&&typeof M>"u"?null:{cursor:M,edgeCount:R.length,hasMore:I}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new OBe),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,m,g){var v=this,b=x1(this.props.__relayContext),_=b.environment,S=this.props;S.componentRef,S.__relayContext,S.__rootIsQueryRenderer;var E=(0,_1.default)(S,$Be),C=(0,di.default)((0,di.default)({},E),this.state.data),A,T=y1(t,E);A=UBe(t,E),A=(0,di.default)((0,di.default)((0,di.default)({},T),A),this._refetchVariables);var R=r.getVariables(C,{count:p.count,cursor:p.cursor},A);typeof R=="object"&&R!==null||Aa(!1),R=(0,di.default)((0,di.default)({},R),this._refetchVariables),A=(0,di.default)((0,di.default)({},R),A);var N=g?{force:!!g.force}:void 0;N!=null&&g?.metadata!=null&&(N.metadata=g?.metadata);var I=zBe(r.query),M=LBe(I,R,N),P=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var U=function(Y,J){var X=v._resolver.resolve();v._resolver.setVariables(l(A,p.totalCount),M.request.node);var oe=v._resolver.resolve();S1(X,oe)?J():v.setState({data:oe,contextForChildren:{environment:v.props.__relayContext.environment}},J)},j=function(){v._refetchSubscription===P&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,P=this._getQueryFetcher().execute({environment:_,operation:M,preservePreviousReferences:!0}).mergeMap(function(V){return QI.create(function(Y){U(V,function(){Y.next(),Y.complete()})})}).do({error:j,complete:j,unsubscribe:j}).subscribe(m||{}),this._refetchSubscription=this._isARequestInFlight?P:null,P},f._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},f.render=function(){var p=this.props,m=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var g=(0,_1.default)(p,NBe);return w1.createElement(PBe.Provider,{value:this.state.contextForChildren},w1.createElement(e,(0,RBe.default)({},g,this.state.data,{ref:m,relay:this.state.relayProp})))},d})(w1.Component),(0,iu.default)(n,"displayName",i),n}function KBe(e,t,r){return DBe(e,t,function(n,i){return GBe(n,i,r)})}var HBe={createContainer:KBe},Mb=He.default,XB=Mb(tr),WBe=Mb(Fb),JBe=Mb(Ib),QBe=Mb(Si),YBe=cf,rv=EC,XBe=WB,ZBe=Bs,E1=kt,kC=bt,eje=kC.createOperationDescriptor;kC.deepFreeze;var CC=kC.getRequest,mo={},tje={rootIsQueryRenderer:!0};E1.Component;function BS(){return{error:null,props:null,retry:null}}function rje(){return{error:null,props:{},retry:null}}function Wg(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(o){var a=r.retry(o);a&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:a}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function RC(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function eP(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=CC(r),a=RC(o.params,e.variables);i=mo[a]?mo[a].queryFetcher:new rv(n)}else i=new rv(n);return(0,XB.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},ZB(e,i,t.retryCallbacks))}function ZB(e,t,r,n){var i=e.environment,o=e.query,a=e.variables,s=e.cacheConfig,l=i;if(o){var u=CC(o),d=eje(u,a,s),f={environment:l};if(typeof n=="string"&&mo[n]){var h=mo[n].snapshot;return h?{error:null,relayContext:f,renderProps:Wg(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:BS(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),m=t.fetch({environment:l,onDataChange:null,operation:d}),g=m||p;return n=n||RC(u.params,e.variables),mo[n]={queryFetcher:t,snapshot:g},g?{error:null,relayContext:f,renderProps:Wg(null,g,t,r),snapshot:g,requestCacheKey:n}:{error:null,relayContext:f,renderProps:BS(),snapshot:null,requestCacheKey:n}}catch(b){return{error:b,relayContext:f,renderProps:Wg(b,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var v={environment:l};return{error:null,relayContext:v,renderProps:rje(),requestCacheKey:null}}}var ff=He.default,nje=ff(Db),ije=ff(uf),Ac=ff(tr),tP=ff(Fb),oje=ff(Ib),k1=ff(Si),aje=["componentRef","__relayContext","__rootIsQueryRenderer"],sje=_C,C1=QB,lje=Pb,uje=lje.getContainerName,cje=cf,dje=EC,fje=yC,R1=fje.assertRelayContext,rP=Bs,A1=kt,dc=bt,hje=dc.Observable,nP=dc.createFragmentSpecResolver,pje=dc.createOperationDescriptor,iP=dc.getDataIDsFromObject,mje=dc.getRequest,gje=dc.getVariablesFromObject,vje=dc.isScalarAndEqual;function bje(e,t,r){var n,i=uje(e);return n=(function(o){(0,oje.default)(a,o);function a(l){var u,d;d=o.call(this,l)||this,(0,k1.default)((0,tP.default)(d),"_handleFragmentDataUpdate",function(){var m=d.state.resolver;d.setState(function(g){return m===g.resolver?{data:g.resolver.resolve()}:null})}),(0,k1.default)((0,tP.default)(d),"_refetch",function(m,g,v,b){if(d._isUnmounted)return{dispose:function(){}};var _=R1(d.props.__relayContext),S=_.environment,E=C1(t,d.props),C=typeof m=="function"?m(d._getFragmentVariables()):m;C=(0,Ac.default)((0,Ac.default)({},E),C);var A=g?(0,Ac.default)((0,Ac.default)({},C),g):C,T=b?{force:!!b.force}:void 0;T!=null&&b?.metadata!=null&&(T.metadata=b?.metadata);var R=typeof v=="function"?{next:v,error:v}:v||{},N=mje(r),I=pje(N,C,T);d.state.localVariables=C,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var M,P=d._getQueryFetcher().lookupInStore(S,I,b?.fetchPolicy);return P!=null?(d.state.resolver.setVariables(A,I.request.node),d.setState(function(U){return{data:U.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){R.next&&R.next(),R.complete&&R.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:S,operation:I,preservePreviousReferences:!0}).mergeMap(function(U){return d.state.resolver.setVariables(A,I.request.node),hje.create(function(j){return d.setState(function(V){return{data:V.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){j.next(),j.complete()})})}).finally(function(){d._refetchSubscription===M&&(d._refetchSubscription=null)}).subscribe((0,Ac.default)((0,Ac.default)({},R),{},{start:function(j){d._refetchSubscription=M=j,R.start&&R.start(j)}})),{dispose:function(){M&&M.unsubscribe()}})});var f=R1(l.__relayContext),h=(u=l.__rootIsQueryRenderer)!==null&&u!==void 0?u:!1;d._refetchSubscription=null;var p=nP(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:oP(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var s=a.prototype;return s.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(u,d){this.state.resolver!==d.resolver?(d.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.getDerivedStateFromProps=function(u,d){var f,h=d.prevProps,p=R1(u.__relayContext),m=(f=u.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,g=iP(t,h),v=iP(t,u),b=C1(t,h),_=C1(t,u),S=d.resolver;if(d.prevPropsContext.environment!==p.environment||!rP(b,_)||!rP(g,v))return S=nP(p,i,t,u,m),{data:S.resolve(),localVariables:null,prevProps:u,prevPropsContext:p,contextForChildren:p,relayProp:oP(p.environment,d.relayProp.refetch),resolver:S};d.localVariables||S.setProps(u);var E=S.resolve();return E!==d.data?{data:E,prevProps:u}:null},s.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},s.shouldComponentUpdate=function(u,d){if(d.data!==this.state.data||d.relayProp!==this.state.relayProp)return!0;for(var f=Object.keys(u),h=0;h<f.length;h++){var p=f[h];if(p==="__relayContext"){if(this.state.prevPropsContext.environment!==d.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(p)&&!vje(u[p],this.props[p]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();d!==h&&this.setState({data:h})},s._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var u=this.state,d=u.data,f=u.resolver,h=f.resolve();f.setCallback(this.props,this._handleFragmentDataUpdate),d!==h&&this.setState({data:h})},s._getFragmentVariables=function(){return gje(t,this.props)},s._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new dje),this._queryFetcher},s.render=function(){var u=this.props,d=u.componentRef;u.__relayContext,u.__rootIsQueryRenderer;var f=(0,ije.default)(u,aje),h=this.state,p=h.relayProp,m=h.contextForChildren;return A1.createElement(cje.Provider,{value:m},A1.createElement(e,(0,nje.default)({},f,this.state.data,{ref:d,relay:p})))},a})(A1.Component),(0,k1.default)(n,"displayName",i),n}function oP(e,t){return{environment:e,refetch:t}}function _je(e,t,r){return sje(e,t,function(n,i){return bje(n,i,r)})}var yje={createContainer:_je},xje=kt;xje.createContext({wrapPrepareQueryResource:function(t){return t()}});var Sje=cf,wje=Le,Eje=kt,kje=Eje.useContext;function Cje(){var e=kje(Sje);return e==null&&wje(!1),e.environment}var ej=Cje,tj=kt;tj.useContext;tj.useEffect;var Rje=He.default,aP=Rje(tr),Aje=Le,fc=bt,sP=fc.__internal.fetchQueryDeduped,lP=fc.Observable,uP=fc.PreloadableQueryRegistry,cP=fc.ReplaySubject,dP=fc.createOperationDescriptor,Tje=fc.getRequest,$je=fc.getRequestIdentifier,fP=100001;function Nje(e,t,r,n,i){var o;fP++;var a=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",s=(0,aP.default)((0,aP.default)({},n?.networkCacheConfig),{},{force:!0}),l,u=!1,d=function(ge,H){return u=!0,e.executeWithSource({operation:ge,source:H})},f=new cP,h=lP.create(function(oe){return f.subscribe(oe)}),p,m=null,g=!1,v=function(ge,H){g=!0;var ae=new cP,te="raw-network-request-"+$je(ge,r),ue=sP(e,te,function(){var be=e.getNetwork();return be.execute(ge,r,s,void 0,void 0,void 0,void 0,H)}),Se=ue.subscribe({error:function(Ie){m=Ie,ae.error(Ie)},next:function(Ie){ae.next(Ie)},complete:function(){ae.complete()}}),pe=Se.unsubscribe;return p=pe,lP.create(function(be){var Ie=ae.subscribe(be);return function(){Ie.unsubscribe(),p()}})},b,_=function(ge,H){g=!0;var ae=sP(e,ge.request.identifier,H).subscribe({error:function(ue){f.error(ue)},next:function(ue){f.next(ue)},complete:function(){f.complete()}});b=ae.unsubscribe},S=function(ge){var H=dP(ge,r,s);if(l=e.retain(H),a!=="store-only"){var ae=a!=="store-or-network"||e.check(H).status!=="available";ae&&_(H,function(){var te=v(ge.params,function(){return e.check(H)}),ue=d(H,te);return ue})}},E,C,A;if(t.kind==="PreloadableConcreteRequest"){var T=t;E=T.params;var R=E;A=R.id,A===null&&Aje(!1);var N=uP.get(A);if(N!=null)S(N);else{var I=a==="store-only"?null:v(E),M=uP.onLoad(A,function(oe){C();var ge=dP(oe,r,s);l=e.retain(ge),I!=null&&_(ge,function(){return d(ge,I)})});C=M.dispose}}else{var P=t,U=Tje(P);E=U.params,A=E.cacheID!=null?E.cacheID:E.id,S(U)}var j=!1,V=!1,Y=!1,J=function(){V||(l&&l.dispose(),V=!0)},X=function(){Y||(u?b&&b():p&&p(),C&&C(),Y=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){j||(J(),X(),j=!0)},releaseQuery:J,cancelNetworkRequest:X,fetchKey:fP,id:A,get isDisposed(){return j||V},get networkError(){return m},name:E.name,networkCacheConfig:s,fetchPolicy:a,source:g?h:void 0,variables:r}}var Lb={loadQuery:Nje},Dje=Lb;Dje.loadQuery;var Fje=kt;Fje.useMemo;var Ije=Le,Pje=(function(){function e(r){this._capacity=r,this._capacity>0||Ije(!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 Oje(e){return new Pje(e)}var Mje={create:Oje},Lje=He.default,T1=Lje(Si),zje=300*1e3,Uje=(function(){function e(r){var n=this;(0,T1.default)(this,"_retainCount",0),(0,T1.default)(this,"_retainDisposable",null),(0,T1.default)(this,"_releaseTemporaryRetain",null),this._retain=function(i){return n._retainCount++,n._retainCount===1&&(n._retainDisposable=r(i)),{dispose:function(){n._retainCount=Math.max(0,n._retainCount-1),n._retainCount===0&&n._retainDisposable!=null&&(n._retainDisposable.dispose(),n._retainDisposable=null)}}}}var t=e.prototype;return t.temporaryRetain=function(n){var i=this,o;if(n.isServer())return{dispose:function(){}};var a=this._retain(n),s=null,l=function(){clearTimeout(s),s=null,i._releaseTemporaryRetain=null,a.dispose()};return s=setTimeout(l,zje),(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})(),Bje=Uje,rj=He.default,gg=rj(tr),nj=rj(Si),jje=Mje,qje=Bje,Vje=Le,Gje=bt,Kje=Gje.isPromise,Hje=1e3,ij="store-or-network",oj="store-and-network",Wje=typeof WeakMap=="function";function nv(e){return e.request.node.params.metadata.live!==void 0}function jS(e,t,r,n,i){var o=r??(nv(t)?oj:ij),a=n??e.UNSTABLE_getDefaultRenderPolicy(),s="".concat(o,"-").concat(a,"-").concat(t.request.identifier);return i!=null?"".concat(s,"-").concat(i):s}function hP(e,t){var r={__id:e.fragment.dataID,__fragments:(0,nj.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var Jje=2e5;function $1(e,t,r,n,i,o){var a=nv(t),s=n,l=i,u=new qje(function(f){var h=f.retain(t);return{dispose:function(){a&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:Jje++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return s},setValue:function(h){s=h},setNetworkSubscription:function(h){a&&l!=null&&l.unsubscribe(),l=h},temporaryRetain:function(h){return u.temporaryRetain(h)},permanentRetain:function(h){return u.permanentRetain(h)},releaseTemporaryRetain:function(){u.releaseTemporaryRetain()}};return d}var Qje=(function(){function e(r){var n=this;(0,nj.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=jje.create(Hje)}var t=e.prototype;return t.prepare=function(n,i,o,a,s,l,u){var d=jS(this._environment,n,o,a,l);return this.prepareWithIdentifier(d,n,i,o,a,s,u)},t.prepareWithIdentifier=function(n,i,o,a,s,l,u){var d=this._environment,f=a??(nv(i)?oj:ij),h=s??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),m=null,g=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,u,(0,gg.default)((0,gg.default)({},l),{},{unsubscribe:function(_){m?.dispose();var S=l?.unsubscribe;S&&S(_)}}))),m=p.temporaryRetain(d);var v=p.getValue();if(Kje(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:g,operation:i,queryAvailability:p.operationAvailability,renderPolicy:h}),v;if(v instanceof Error)throw v;return v},t.retain=function(n,i){var o=this._environment,a=n.cacheIdentifier,s=n.operation,l=this._getOrCreateCacheEntry(a,s,null,n,null),u=l.permanentRetain(o);return o.__log({name:"queryresource.retain",profilerContext:i,resourceID:l.id}),{dispose:function(){u.dispose()}}},t.releaseTemporaryRetain=function(n){var i=this._cache.get(n.cacheIdentifier);i?.releaseTemporaryRetain()},t.TESTS_ONLY__getCacheEntry=function(n,i,o,a){var s=this._environment,l=jS(s,n,i,o,a);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,a,s){var l=this._cache.get(n);return l==null&&(l=$1(n,i,o,a,s,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,a,s,l,u){var d=this,f=this._environment,h=f.check(i),p=h.status,m=p==="available",g=m||s==="partial"&&p!=="stale",v,b,_=function(){};switch(a){case"store-only":{v=!1,b=!0;break}case"store-or-network":{v=!m,b=g;break}case"store-and-network":{v=!0,b=g;break}case"network-only":default:{v=!0,b=!1;break}}if(b){var S=hP(i,n),E=$1(n,i,h,S,null,this._clearCacheEntry);this._cache.set(n,E)}if(v){var C=hP(i,n),A;o.subscribe({start:function(P){A=P;var U=d._cache.get(n);U&&U.setNetworkSubscription(A);var j=u?.start;if(j){var V=(0,gg.default)((0,gg.default)({},P),{},{unsubscribe:function(){nv(i)&&P.unsubscribe()}});j(V)}},next:function(){var P=d._getOrCreateCacheEntry(n,i,h,C,A);P.processedPayloadsCount+=1,P.setValue(C),_();var U=u?.next;if(U!=null){var j=f.lookup(i.fragment);U(j)}},error:function(P){var U=d._getOrCreateCacheEntry(n,i,h,P,A);U.processedPayloadsCount===0&&U.setValue(P),_(),A=null,U.setNetworkSubscription(null);var j=u?.error;j&&j(P)},complete:function(){_(),A=null;var P=d._cache.get(n);P&&P.setNetworkSubscription(null);var U=u?.complete;U&&U()},unsubscribe:u?.unsubscribe});var T=this._cache.get(n);if(!T){var R=new Promise(function(M){_=M});R.displayName="Relay("+i.fragment.node.name+")",T=$1(n,i,h,R,A,this._clearCacheEntry),this._cache.set(n,T)}}else{var N=u?.complete;N&&N()}var I=this._cache.get(n);return I==null&&Vje(!1),f.__log({name:"queryresource.fetch",resourceID:I.id,operation:i,profilerContext:l,fetchPolicy:a,renderPolicy:s,queryAvailability:h,shouldFetch:v}),I},e})();function Yje(e){return new Qje(e)}var pP=Wje?new WeakMap:new Map;function Xje(e){var t=pP.get(e);if(t)return t;var r=Yje(e);return pP.set(e,r),r}var tm={getQueryResourceForEnvironment:Xje,getQueryCacheIdentifier:jS},Zje=kt;Zje.useMemo;var aj=kt;aj.useCallback;aj.useEffect;var eqe=kt,tqe=bt,rqe=tqe.__internal.createRelayLoggingContext,nqe=rqe(eqe),iqe=nqe,oqe=kt,aqe=oqe.useContext;function sqe(){return aqe(iqe)}var sj=sqe,AC=He.default,mP=AC(tr),Ll=AC(Jr),lqe=AC(ql),uqe=tm,lj=uqe.getQueryResourceForEnvironment,cqe=ej,dqe=sj,ou=Le,rm=kt;rm.useDebugValue;var N1=rm.useEffect,D1=rm.useMemo,gP=rm.useRef,vg=rm.useState,Vs=bt,uj=Vs.__internal,fqe=uj.fetchQuery,hqe=uj.getPromiseForActiveRequest,bg=Vs.RelayFeatureFlags,vP=Vs.areEqualSelectors,pqe=Vs.createOperationDescriptor,mqe=Vs.getPendingOperationsForFragment,gqe=Vs.getSelector,vqe=Vs.getVariablesFromFragment,bP=Vs.handlePotentialSnapshotErrors,_P=Vs.recycleNodesInto;function bqe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function _qe(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,Ll.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Ll.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function yqe(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,Ll.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Ll.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function xqe(e,t,r){if(t.kind==="singular")bP(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Ll.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;bP(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function iv(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=_P(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=_P(u.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==u.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&ou(!1),[a,{kind:"plural",snapshots:s,epoch:r}]}}function Sqe(e,t,r,n,i){var o=vqe(t,r),a=(0,mP.default)((0,mP.default)({},o),{},{id:n.clientEdgeDestinationID}),s=pqe(n.request,a,i?.networkCacheConfig),l=lj(e),u=l.prepare(s,fqe(e,s),i?.fetchPolicy);return[u,hqe(e,s.request)]}function wqe(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(a){r(function(s){if(s.kind!=="singular"||s.snapshot.selector!==a.selector){var l=iv(e,s);if(l!=null){var u=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),n.current=u,u?d:s}else return s}return n.current=!0,{kind:"singular",snapshot:a,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(a,s){return e.subscribe(a,function(l){r(function(u){var d;if(u.kind!=="plural"||((d=u.snapshots[s])===null||d===void 0?void 0:d.selector)!==l.selector){var f=iv(e,u);if(f!=null){var h=f[0],p=f[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),n.current=n.current||h,h?p:u}else return u}var m=(0,lqe.default)(u.snapshots);return m[s]=l,n.current=!0,{kind:"plural",snapshots:m,epoch:e.getStore().getEpoch()}})})});return function(){var a=(0,Ll.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;l.dispose()}}catch(u){a.e(u)}finally{a.f()}}}}function yP(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 Eqe(e,t,r,n){var i,o,a=D1(function(){return gqe(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||ou(!1):Array.isArray(t)&&ou(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||ou(!1);var l=cqe(),u;bg.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=dqe());var d=vg(function(){return yP(l,a)}),f=d[0],h=d[1],p=f,m=vg(p),g=m[0],v=m[1],b=g,_=vg(a),S=_[0],E=_[1],C=vg(l),A=C[0],T=C[1];if(!vP(a,S)||l!==A){E(a),T(l);var R=yP(l,a);h(R),v(R),p=R,b=R}var N=gP(!1);if(N1(function(){N.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||bg.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var I=D1(function(){var ae=_qe(p),te,ue=[];if(ae!=null&&ae.length){te=[];var Se=(0,Ll.default)(ae),pe;try{for(Se.s();!(pe=Se.n()).done;){var be=pe.value,Ie=Sqe(l,e,t,be,n),$t=Ie[0],Lt=Ie[1];te.push($t),Lt!=null&&ue.push(Lt)}}catch(Ar){Se.e(Ar)}finally{Se.f()}}return[te,ue]},[p,l,e,t,n]),M=I[0],P=I[1];if(P.length)throw Promise.all(P);N1(function(){var ae=lj(l);if(M!=null&&M.length){var te=[],ue=(0,Ll.default)(M),Se;try{for(ue.s();!(Se=ue.n()).done;){var pe=Se.value;te.push(ae.retain(pe))}}catch(be){ue.e(be)}finally{ue.f()}return function(){for(var be=0,Ie=te;be<Ie.length;be++){var $t=Ie[be];$t.dispose()}}}},[l,M])}if(bqe(p)){var U=yqe(p);if(U!=null&&U.length>0)throw Promise.all(U.map(function(ae){return l.getStore().getLiveResolverPromise(ae)}));if(bg.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==A||!N.current||!vP(N.current,a)){a==null&&ou(!1);var j=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,V=mqe(l,e,j);if(V)throw V.promise}}xqe(l,p,u);var Y=gP(!1);if(N1(function(){var ae=b,te=iv(l,b);if(te!==null){var ue=te[0],Se=te[1];ue&&h(Se),ae=Se}return wqe(l,ae,h,Y)},[l,b]),Y.current){var J=iv(l,p);if(J!=null){var X=J[0],oe=J[1];X&&(h(oe),p=oe)}Y.current=!1}var ge;if(s){var H=t==null;ge=D1(function(){return p.kind==="bailout"?H?null:[]:(p.kind!=="plural"&&ou(!1),p.snapshots.map(function(ae){return ae.data}))},[p,H])}else p.kind==="bailout"?ge=null:(p.kind!=="singular"&&ou(!1),ge=p.snapshot.data);return bg.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(ge===void 0||Array.isArray(ge)&&ge.length>0&&ge.every(function(ae){return ae===void 0})),ge}var kqe=Eqe,TC=He.default,xP=TC(tr),zl=TC(Jr),Cqe=TC(ql),Rqe=tm,cj=Rqe.getQueryResourceForEnvironment,Aqe=ej,Tqe=sj,au=Le,nm=kt;nm.useDebugValue;var _g=nm.useEffect,F1=nm.useMemo,SP=nm.useRef,$qe=nm.useState,Gs=bt,dj=Gs.__internal,Nqe=dj.fetchQuery,Dqe=dj.getPromiseForActiveRequest,yg=Gs.RelayFeatureFlags,wP=Gs.areEqualSelectors,Fqe=Gs.createOperationDescriptor,Iqe=Gs.getPendingOperationsForFragment,Pqe=Gs.getSelector,Oqe=Gs.getVariablesFromFragment,EP=Gs.handlePotentialSnapshotErrors,kP=Gs.recycleNodesInto;function Mqe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function Lqe(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,zl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,zl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function zqe(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,zl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,zl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;r.push(u)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function Uqe(e,t,r){if(t.kind==="singular")EP(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,zl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;EP(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function qS(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=kP(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r,selector:t.selector,environment:t.environment}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var u=t.snapshots[l],d=e.lookup(u.selector),f=kP(u.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==u.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&au(!1),[a,{kind:"plural",snapshots:s,epoch:r,selector:t.selector,environment:t.environment}]}}function Bqe(e,t,r,n,i){var o=Oqe(t,r),a=(0,xP.default)((0,xP.default)({},o),{},{id:n.clientEdgeDestinationID}),s=Fqe(n.request,a,i?.networkCacheConfig),l=cj(e),u=l.prepare(s,Nqe(e,s),i?.fetchPolicy),d=Dqe(e,s.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[u,d]}function CP(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(a){var s=null;if(a.kind!=="singular"||a.snapshot.selector!==o.selector||a.environment!==e){var l=qS(a.environment,a);if(l!=null){var u=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:u}),s=u?d:a}else s=a}else s={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return s})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,a){return e.subscribe(o,function(s){r(function(l){var u,d=null;if(l.kind!=="plural"||((u=l.snapshots[a])===null||u===void 0?void 0:u.selector)!==s.selector||l.environment!==e){var f=qS(l.environment,l);if(f!=null){var h=f[0],p=f[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),d=h?p:l}else d=l}else{var m=(0,Cqe.default)(l.snapshots);m[a]=s,d={kind:"plural",snapshots:m,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,zl.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;s.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function RP(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 jqe(e,t,r,n){var i,o,a=F1(function(){return Pqe(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||au(!1):Array.isArray(t)&&au(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||au(!1);var l=Aqe(),u;yg.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(u=Tqe());var d=$qe(function(){return RP(l,a)}),f=d[0],h=d[1],p=f,m=p.environment;if(!wP(a,p.selector)||l!==p.environment){var g=RP(l,a);h(g),p=g}var v=SP(!1);if(_g(function(){v.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||yg.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var b=F1(function(){var P=Lqe(p),U,j=[];if(P!=null&&P.length){U=[];var V=(0,zl.default)(P),Y;try{for(V.s();!(Y=V.n()).done;){var J=Y.value,X=Bqe(l,e,t,J,n),oe=X[0],ge=X[1];U.push(oe),ge!=null&&j.push(ge)}}catch(H){V.e(H)}finally{V.f()}}return[U,j]},[p,l,e,t,n]),_=b[0],S=b[1];if(S.length){var E=Promise.all(S);throw E.displayName="RelayClientEdge(".concat(S.map(function(P){return P.displayName}).join(","),")"),E}_g(function(){var P=cj(l);if(_!=null&&_.length){var U=[],j=(0,zl.default)(_),V;try{for(j.s();!(V=j.n()).done;){var Y=V.value;U.push(P.retain(Y))}}catch(J){j.e(J)}finally{j.f()}return function(){for(var J=0,X=U;J<X.length;J++){var oe=X[J];oe.dispose()}}}},[l,_])}if(Mqe(p)){var C=zqe(p);if(C!=null&&C.length>0){var A=Promise.all(C.map(function(P){return l.getStore().getLiveResolverPromise(P)}));throw A.displayName="RelayLiveResolver("+e.name+")",A}if(yg.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==m||!v.current||!wP(v.current,a)){a==null&&au(!1);var T=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,R=Iqe(l,e,T);if(R)throw R.promise}}Uqe(l,p,u);var N=SP(null);_g(function(){var P=N.current;if(P!=null){if(p.environment===P.environment&&p.selector===P.selector)return;P.dispose()}if(p.kind!=="bailout"){var U=p,j=qS(p.environment,p);if(j!==null){var V=j[0],Y=j[1];if(V){h(Y);return}U=Y}var J=CP(p.environment,U,h);N.current={dispose:J,selector:p.selector,environment:p.environment}}},[p]),_g(function(){if(N.current==null&&p.kind!=="bailout"){var P=CP(p.environment,p,h);N.current={dispose:P,selector:p.selector,environment:p.environment}}return function(){var U;(U=N.current)===null||U===void 0||U.dispose(),N.current=null}},[]);var I;if(s){var M=t==null;I=F1(function(){return p.kind==="bailout"?M?null:[]:(p.kind!=="plural"&&au(!1),p.snapshots.map(function(P){return P.data}))},[p,M])}else p.kind==="bailout"?I=null:(p.kind!=="singular"&&au(!1),I=p.snapshot.data);return yg.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(I===void 0||Array.isArray(I)&&I.length>0&&I.every(function(P){return P===void 0})),I}var qqe=jqe,fj=He.default;fj(kqe);fj(qqe);var hj=tm;hj.getQueryCacheIdentifier;hj.getQueryResourceForEnvironment;var zb=kt;zb.useContext;zb.useEffect;zb.useState;zb.useRef;var Vqe=kt;Vqe.useState;var Gqe=kt,pj=bt;pj.createOperationDescriptor;pj.getRequest;Gqe.useMemo;var Kqe=bt;Kqe.__internal.fetchQuery;var Hqe=He.default;Hqe(tr);var mj=kt;mj.useEffect;mj.useRef;var Wqe=He.default;Wqe(Jr);var Ub=kt;Ub.useCallback;Ub.useEffect;Ub.useRef;Ub.useState;var Jqe=kt;Jqe.useDebugValue;var Qqe=bt;Qqe.getFragment;var Yqe=He.default;Yqe(tr);var Bb=kt,Xqe=bt;Xqe.commitMutation;Bb.useState;Bb.useEffect;Bb.useRef;Bb.useCallback;var gj=bt;gj.ConnectionInterface;gj.getValueAtPath;var $C=kt,vj=bt;vj.__internal.getObservableForActiveRequest;vj.getSelector;$C.useEffect;$C.useState;$C.useMemo;var Zqe=He.default;Zqe(tr);var NC=kt;NC.useCallback;NC.useRef;NC.useState;var im=bt;im.__internal.fetchQuery;im.createOperationDescriptor;im.getPaginationVariables;im.getRefetchMetadata;im.getSelector;var eVe=He.default;eVe(tr);var DC=kt;DC.useCallback;DC.useEffect;DC.useState;var hf=bt;hf.__internal.fetchQuery;hf.RelayFeatureFlags;hf.createOperationDescriptor;hf.getPaginationVariables;hf.getRefetchMetadata;hf.getSelector;var bj=He.default;bj(tr);bj(Jr);var tVe=tm;tVe.getQueryResourceForEnvironment;var hc=bt;hc.__internal.fetchQuery;hc.RelayFeatureFlags;hc.createOperationDescriptor;hc.getPendingOperationsForFragment;hc.getSelector;hc.getVariablesFromFragment;hc.handlePotentialSnapshotErrors;var rVe=He.default;rVe(Jr);var nVe=Lb;nVe.loadQuery;var om=kt;om.useCallback;om.useEffect;om.useInsertionEffect;om.useRef;om.useState;var iVe=bt;iVe.getRequest;var oVe=He.default;oVe(Jr);var aVe=Lb;aVe.loadQuery;var jb=kt;jb.useCallback;jb.useEffect;jb.useRef;jb.useState;var _j=bt;_j.RelayFeatureFlags;_j.getRequest;var sVe=He.default;sVe(tr);var lVe=tm;lVe.getQueryResourceForEnvironment;var FC=kt;FC.useCallback;FC.useContext;FC.useReducer;var pf=bt;pf.__internal.fetchQuery;pf.createOperationDescriptor;pf.getFragmentIdentifier;pf.getRefetchMetadata;pf.getSelector;pf.getValueAtPath;var uVe=He.default;uVe(tr);var IC=kt;IC.useCallback;IC.useDebugValue;IC.useState;var qb=bt;qb.RelayFeatureFlags;qb.getFragment;qb.getFragmentIdentifier;qb.getPaginationMetadata;var cVe=He.default;cVe(tr);var pc=kt;pc.useCallback;pc.useDebugValue;pc.useEffect;pc.useLayoutEffect;pc.useMemo;pc.useRef;pc.useState;var PC=bt;PC.getFragment;PC.getFragmentIdentifier;PC.getPaginationMetadata;var Vb=bt;Vb.ConnectionInterface;Vb.RelayFeatureFlags;Vb.getSelector;Vb.getValueAtPath;var dVe=kt;dVe.useDebugValue;var fVe=bt,yj=fVe.__internal;yj.fetchQueryDeduped;yj.fetchQuery;var hVe=kt;hVe.useDebugValue;var pVe=bt;pVe.getFragment;var xj=kt;xj.useEffect;xj.useRef;var mVe=kt;mVe.useEffect;var gVe=bt;gVe.requestSubscription;var vVe=cf,bVe=vBe,_Ve=HBe,yVe=yje,xVe=Lb;xVe.loadQuery;var jo=bt,SVe={ConnectionHandler:jo.ConnectionHandler,MutationTypes:jo.MutationTypes,RangeOperations:jo.RangeOperations,ReactRelayContext:vVe,applyOptimisticMutation:jo.applyOptimisticMutation,commitLocalUpdate:jo.commitLocalUpdate,commitMutation:jo.commitMutation,createFragmentContainer:bVe.createContainer,createPaginationContainer:_Ve.createContainer,createRefetchContainer:yVe.createContainer,fetchQuery_DEPRECATED:jo.fetchQuery_DEPRECATED,graphql:jo.graphql,readInlineData:jo.readInlineData,requestSubscription:jo.requestSubscription,fetchQuery:jo.fetchQuery},wVe=SVe;function EVe(e){let t=wVe.ReactRelayContext.Provider;return _r(t,{value:{environment:e.environment},children:e.children})}let kVe={make:EVe},CVe={Provider:kVe};function RVe(e,t,r){let n=async(i,o,a,s)=>{let l=D(ro(i.text),""),u=l.includes("Platform")||l.includes("platform")?e.platformApiEndpoint:e.apiEndpoint,d=Object.fromEntries([["content-type","application/json"]]),f=t();f!==void 0&&(d.Authorization="Bearer "+f);let p=(await fetch(u,{method:"POST",headers:d,body:D(JSON.stringify({query:l,variables:o}),"")})).json,m=await p();return kS(m)&&r(),m};return DUe.make(bt.Network.create(n),TUe.make(new bt.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function AVe(e){let t=e.config,r=pa(),n=Tt(()=>RVe(t,()=>k(r,i=>i.getToken()),()=>re(r,i=>i.logout())),[t,r]);return y(CVe.Provider.make,{environment:n,children:e.children})}let TVe=AVe;function Yi(e){return"var("+e+")"}let $Ve=w([c("background",Yi(x.surfaceElevated)),c("border","1px solid var("+x.border+")"),c("border-radius",Yi(Z.md)),c("padding",Yi(O.lg)),z("flex"),_e("column"),ee("center"),Je("center"),c("gap",Yi(O.sm)),c("min-height","160px"),qa("center"),la({NAME:"percent",VAL:100}),c("box-sizing","border-box")]),NVe=w([c("font-size","32px"),c("line-height","1"),bp(Ae(4))]),DVe=w([c("color",Yi(x.textPrimary)),c("font-size",Yi($.sizeMd)),c("font-weight",Yi($.weightMedium)),bp(Ae(4))]),FVe=w([c("color",Yi(x.textSecondary)),c("font-size",Yi($.sizeSm)),c("line-height",Yi($.lineHeightNormal))]),IVe=w([c("color",Yi(x.textDisabled)),c("font-size",Yi($.sizeXs)),c("font-family",Yi($.fontFamilyMono)),sa(Ae(8))]);function PVe(e){let t=e.definition;return L("div",{children:[y("div",{children:"[locked]",className:NVe}),y("div",{children:t.title,className:DVe}),y("div",{children:t.description,className:FVe}),y("div",{children:t.extensionPackage,className:IVe})],className:$Ve})}let OVe=PVe,MVe=w([z("flex"),ee("center"),Je("center"),c("min-height","160px"),c("color","var("+x.textSecondary+")"),c("font-size","var("+$.sizeSm+")")]);function LVe(e){return y("div",{children:"Loading…",className:MVe})}w([z("flex"),ee("center"),Je("center"),c("min-height","160px"),c("color","var("+x.error+")"),c("font-size","var("+$.sizeSm+")")]);function zVe(e){let t=Ms(),r=Ebe(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?y(OVe,{definition:r}):y(Xj,{children:r.component(e.props),fallback:y(LVe,{})})}let UVe=zVe;function BVe(e){let t=wbe(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?y("div",{children:t.map(o=>y(UVe,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let jVe=BVe;function qVe(e){return L("div",{children:[L("header",{children:[y("h1",{children:"Platform overview",style:{margin:"0"}}),y("p",{children:"Summary panels contributed by connected plugins appear below.",style:{color:"#666",margin:"0.25rem 0 0"}})]}),y(jVe,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let VVe=qVe,GVe="host.home",OC="/",KVe={label:"Home",icon:void 0,group:void 0,sortOrder:0},HVe=OC,WVe={fragmentId:GVe,title:"Home",menuEntry:KVe,requiredAccess:void 0,url:HVe};function JVe(e){return k(q(e.home,t=>t.trim()),t=>{if(!(t===""||t===OC))return t})}function QVe(e){let t=e.config,r=Et(jp),n=Y2(),i=j5(),o=lv(void 0),a=JVe(t);return De(()=>{!t.autoRedirectFirstPage&&vr(a)&&(re(r,s=>s.register([WVe])),re(n,s=>s.register([Tc(jP(l=>l),y(VVe,{}))],Cu())))},[]),De(()=>{if((o===""||o===OC)&&i.length!==0){if(a!==void 0)Es(a);else if(t.autoRedirectFirstPage){let l=i.find(u=>ke(u.url)?q5(u):!1);if(l!==void 0){let u=l.url;u!==void 0&&Es(u)}}}},[i.length,o]),null}let YVe=QVe,XVe=`mutation UploadPresign($store: ID!, $fileName: String!, $contentType: String) {
|
|
124
|
+
Upload_Presign(store: $store, fileName: $fileName, contentType: $contentType) {
|
|
125
|
+
uploadUrl
|
|
126
|
+
storageRef
|
|
127
|
+
}
|
|
128
|
+
}`,ZVe=`mutation UploadRelease($store: ID!, $storageRef: String!) {
|
|
129
|
+
Upload_Release(store: $store, storageRef: $storageRef) {
|
|
130
|
+
released
|
|
131
|
+
reason
|
|
132
|
+
}
|
|
133
|
+
}`;function Sj(e,t){return k(k(G(e),r=>F(r,t)),G)}function eGe(e){return k(Sj(e,"Upload_Presign"),t=>{let r=k(F(t,"uploadUrl"),ie),n=k(F(t,"storageRef"),ie);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function tGe(e){let t=Sj(e,"Upload_Release");return t!==void 0?Re(k(F(t,"released"),dv),!0)?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:D(k(F(t,"reason"),ie),"Could not release the uploaded file")}:{TAG:"Error",_0:"Could not release the uploaded file"}}function rGe(e,t,r,n,i){return new Promise((o,a)=>{let s=new XMLHttpRequest;s.open("PUT",e),s.setRequestHeader("Content-Type",n),s.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},s.onload=()=>{let l=s.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},s.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),s.send(r)})}function nGe(e,t){return{upload:(r,n)=>{let i=r.type;return Ft(e()(XVe,Oe([["store",t],["fileName",r.name],["contentType",i]])).then(o=>{let a=eGe(o);return a!==void 0?rGe(a.uploadUrl,a.storageRef,r,i,n):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})}),o=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))},remove:r=>Ft(e()(ZVe,Oe([["store",t],["storageRef",r]])).then(tGe),n=>Promise.resolve({TAG:"Error",_0:"Release request failed"}))}}let iGe=[],oGe=[],aGe=[],sGe={pages:iGe,panels:oGe,routes:aGe};function wj(e){return L("div",{children:[y("h1",{children:"Shell failed to boot"}),y("pre",{children:e.message})],style:{color:"#a00",fontFamily:"system-ui",padding:"2rem"}})}function MC(e){return y("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function lGe(e){let t=e.extensions,r=Et(jp),n=Et(qp),i=Y2();return De(()=>{t.pages.length!==0&&re(r,o=>o.register(t.pages)),t.panels.length!==0&&re(n,o=>o.register(t.panels)),t.routes.length!==0&&re(i,o=>o.register(t.routes,Cu()))},[]),null}function VS(e){let t=e.uiHints,r=e.config,n=Lbe(),i=Mbe(),o=zue(r),a=L(cr,{children:[y(qFe,{}),y(qbe,{}),y(Sve,{})]});return De(()=>{document.title=o},[o]),L(cr,{children:[y(YVe,{config:r}),y(hFe,{config:r,uiHints:t}),y(lGe,{extensions:e.extensions}),y(_be,{appName:o,logoUrl:r.logoUrl,router:n,headerSlot:a,fallback:y(SFe,{config:r,uiHints:t}),routesReady:i,loading:y(MC,{})})]})}function uGe(e){let t=e.discoverPlatforms,r=lv(void 0),n=H5(r);if(n===void 0)return t!==void 0?y(Zbe,{discover:t}):y(wj,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return y(W5.make,{scope:i,children:y(vq,{value:{prefix:Q2(i),path:n[1]},children:y(VS,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function AP(e){let t=e.access;return y(Uve,{access:t,children:y(Ive.make,{children:y(Sbe.make,{access:t,children:y(Obe.make,{children:y(QJ.make,{children:y(T8.Provider.make,{children:y(WDe.make,{children:e.children})})})})})})})}function cGe(e){let t=e.uiHints,r=e.extensions,n=e.config,i=pa(),o=n.mode,a;if(o==="Single"){let u=n.environment,d=n.platformName;a=u!==void 0&&d!==void 0?y(W5.make,{scope:{environment:u,platformName:d},children:y(VS,{config:n,extensions:r,uiHints:t})}):y(VS,{config:n,extensions:r,uiHints:t})}else a=y(uGe,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return y(AP,{access:n.accessTiers,children:a});if(i===void 0)return y(QN,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?y(AP,{access:l.groups.concat(n.accessTiers),children:a}):y(QN,{})}function dGe(e){let t=e.config,r=pa();Yq(t.assetOrigins);let n=lv(void 0),i=t.mode,o;o=i==="Single"?void 0:q(H5(n),p=>p[0]);let a=ne(o,"",p=>p.environment+"|"+p.platformName),s=Tt(()=>{let p=Que(t.apiEndpoint,t.platformApiEndpoint,()=>k(r,g=>g.getToken()),()=>re(r,g=>g.logout())),m=o!==void 0?Jue(Wbe(o))(p):p;return[Yue(m),m]},[t,r,a]),l=s[0],u=()=>k(r,p=>p.getToken()),d=Pe(l);d.current=l,Yse.contents=l,De(()=>{let p={},m=g=>{let v=p[g];if(v!==void 0)return v;let b=nGe(()=>d.current,g);return p[g]=b,b};pIe(g=>m(g),void 0,void 0)},[]);let f=D(t.theme,"Light"),h=ne(k(r,p=>p.identity),"anonymous",p=>p.userId+"|"+p.groups.toSorted(dd).join(","));return y(tle.make,{execute:l,executeResult:s[1],children:y(TVe,{config:t,children:L(xue.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,onAuthFailure:()=>re(r,p=>p.logout()),platformReadModelPrefixes:t.platformReadModelPrefixes,getToken:u,children:[y(KFe,{config:t,onChange:e.reloadUiHints}),y(iue.make,{initialPreset:f,children:y(cGe,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})]})})},h)}function fGe(e,t){let r=de(()=>{}),n=r[1],i=r[0],o=qr(()=>{que(e.uiHintsUrl).then(s=>n(l=>s))},[e.uiHintsUrl]);return De(()=>{o()},[e.uiHintsUrl]),[Tt(()=>q(i,s=>Rle(s,D(t.uiHints,{}))),[i]),o]}function hGe(e){let t=e.extensions,r=e.config,n=fGe(r,t),i=n[0];return y(ive.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:i!==void 0?y(dGe,{config:r,extensions:t,uiHints:i,reloadUiHints:n[1],discoverPlatforms:e.discoverPlatforms}):y(MC,{})})}function pGe(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:sGe,i=de(()=>"LoadingConfig"),o=i[1],a=i[0];return De(()=>{Vue().then(s=>{if(s.TAG==="Ok"){let u=s._0;return t!==void 0?Ft(t(u).then(()=>o(d=>({TAG:"Ready",_0:u}))),d=>(console.error("[ShellApp] optional view modes failed to register — continuing without them: "+String(d)),o(f=>({TAG:"Ready",_0:u})),Promise.resolve())):(o(d=>({TAG:"Ready",_0:u})),Promise.resolve())}let l=s._0;return o(u=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof a!="object"?y(MC,{}):a.TAG==="Ready"?y(hGe,{config:a._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):y(wj,{message:a._0})}let mGe={make:pGe},TP=document.querySelector("#root");TP!=null&&Kj(TP).render(y(mGe.make,{registerModes:oq}));export{Ft as $,q as A,No as B,ASe as C,x as D,O as E,$ as F,$Ge as G,G as H,ro as I,ke as J,Ii as K,Rr as L,Nse as M,Yse as N,PE as O,Cd as P,Z as R,gk as S,$Se as T,zGe as a,F as b,xSe as c,tt as d,Q as e,re as f,D as g,ct as h,Do as i,Use as j,Pr as k,ie as l,k as m,_t as n,Hz as o,Ls as p,ne as q,ha as r,mk as s,nc as t,af as u,Oe as v,Up as w,Zle as x,Jt as y,jt as z};
|