@reventlessdev/reventless-host-shell 3.0.0-alpha.46 → 3.0.0-alpha.48
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-ctooFY3D.js → Geocoder.res-C0MRLgw3.js} +1 -1
- package/dist/assets/{GraphMode.res-CrY9MAw8.js → GraphMode.res-D3XFRdxg.js} +23 -23
- package/dist/assets/{MapMode.res-DWS2dNTi.js → MapMode.res-BEYjdL-s.js} +10 -10
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__reventless_host_shell-CqUVBJDR.js → _virtual_mf-localSharedImportMap___mfe_internal__reventless_host_shell-Cku7ny5H.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-DcLr2OZX.js → _virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuHP-S1B.js} +1 -1
- package/dist/assets/{hostInit-CWXK6-Z2.js → hostInit-pu7ux4YL.js} +1 -1
- package/dist/assets/{index-DitK-9eG.js → index-B-TPa9BE.js} +1 -1
- package/dist/assets/index-DAJ2TyQG.js +117 -0
- package/dist/assets/{remoteEntry-p38iLS1x.js → remoteEntry-n7UDZlm9.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-CC6VO0eq.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-dsc9aHJC.js} +1 -1
- package/dist/config.json +2 -0
- package/dist/mf-entry-bootstrap-0.js +2 -2
- package/package.json +5 -5
- package/vite.config.mjs +8 -0
- package/dist/assets/index-tv-6hjXL.js +0 -94
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-CrY9MAw8.js","assets/MapMode.res-DWS2dNTi.js","assets/Geocoder.res-ctooFY3D.js","assets/index-DitK-9eG.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import"./virtualExposes-DN39MDG_.js";import{d as Z2}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-CC6VO0eq.js";import{_ as Pc}from"./preload-helper-BlTxHScW.js";import{_ as f$}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BzAfciYp.js";import{_ as P,a as g,b as jr}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 X,b as Re,c as Mt,d as Kt,e as bt,f as dr,g as Ke,h as xt,i as im,j as eE,k as Pn,l as h$,m as p$,n as m$,o as g$}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-DcLr2OZX.js";import{c as Qc,_ as st}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function v$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{a as Hu,b as b$}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Df1FMNLk.js";import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function _$(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 a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{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 a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();function Wt(e){return e===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:e!==null&&e.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function Fi(e){if(e!=null)return Wt(e)}function Ot(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 am="JsExn";function y$(e){if(e.RE_EXN_ID===am)return Wt(e._1)}function x$(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function qs(e){return x$(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let S$=["map","graph"];async function E$(e,t){switch(e){case"graph":return(await Pc(()=>import("./GraphMode.res-CrY9MAw8.js"),__vite__mapDeps([0])).then(o=>o.init))(t.graphLayout,void 0);case"map":let n=await Pc(()=>import("./MapMode.res-DWS2dNTi.js"),__vite__mapDeps([1])).then(o=>o.init),i=t.geocoderEndpoint,a;return i!==void 0?a=(await Pc(()=>import("./Geocoder.res-ctooFY3D.js"),__vite__mapDeps([2])).then(s=>s.fromEndpoint))(i):a=void 0,n(t.mapStyle,a,void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+S$.join(", "));return}}async function w$(e){await Promise.all(e.viewModes.map(async t=>{try{return await E$(t,e)}catch(r){let n=qs(r);if(n.RE_EXN_ID===am){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function R$(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function Ub(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),o=(i.length!==2?n:i[0]).split("/").filter(c=>c.length!==0),s=o.length-1|0,l=0;for(;;){let c=l,d=s;if(d<0)return c;l={hd:o[d],tl:c},s=d-1|0}}}function k$(e,t){let r=globalThis.window;return e!==void 0?Ub(e):r!==void 0?Ub(Ot(r).location.pathname):0}function A$(){let e=globalThis.window;if(e===void 0)return"";let t=Ot(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function qb(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function C$(e,t){let r=globalThis.window;return e!==void 0?qb(e):r!==void 0?qb(Ot(r).location.search):""}function As(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){Ot(t).pushState(null,"",e),Ot(r).dispatchEvent(R$("popstate"));return}}function D$(e,t){if(e.hash!==t.hash||e.search!==t.search)return!0;{let r=e.path,n=t.path;for(;;){let i=n,a=r;if(a===0)return i!==0;if(i===0||a.hd!==i.hd)return!0;n=i.tl,r=a.tl}}}function X0(e,t){return{path:k$(e),hash:A$(),search:C$(e)}}function $$(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(X0(void 0));return Ot(t).addEventListener("popstate",r),r}function F$(e){let t=globalThis.window;if(t!==void 0){Ot(t).removeEventListener("popstate",e);return}}function I$(e,t){let r=X(()=>X0(void 0)),n=r[1],i=r[0];return Re(()=>{let a=$$(s=>n(l=>s)),o=X0(void 0);return D$(o,i)&&n(s=>o),()=>F$(a)},[]),i}let Cd=Mt({prefix:"",path:""}),T$=Cd.Provider;function N$(e){return Kt(T$,{value:e.value,children:e.children})}let P$=N$;function Z0(){let e=globalThis.window;return e!==void 0?Ot(e).location.pathname:""}function O$(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(Z0());return Ot(t).addEventListener("popstate",r),r}function Dd(e,t){let r=X(()=>Z0()),n=r[1],i=r[0];return Re(()=>{let a=O$(s=>n(l=>s)),o=Z0();return o!==i&&n(s=>o),()=>{let s=globalThis.window;if(s!==void 0){Ot(s).removeEventListener("popstate",a);return}}},[]),i}function Qa(){let t=bt(Cd).prefix;return r=>t===""||r.startsWith(t)?As(r):As(t+r)}function M$(){let t=bt(Cd).path,r=Dd();return t===""?r:t}function Q(e,t){if(e!==void 0)return t(Ot(e))}function oe(e,t,r){return e!==void 0?r(Ot(e)):t}function B(e,t){if(e!==void 0)return Wt(t(Ot(e)))}function S(e,t){if(e!==void 0)return t(Ot(e))}function D(e,t){return e!==void 0?Ot(e):t}function tE(e,t){return e!==void 0?e:t}function He(e){return e!==void 0}function jn(e){return e===void 0}function yt(e,t){return e.catch(r=>t(qs(r)))}function om(e,t){return e<t?-1:e===t?0:1}function Ii(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function rE(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function Ma(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 rt(e,t,r){return e.reduce(r,t)}function L$(e,t){let r=e.findIndex(t);if(r!==-1)return r}function ee(e,t){let r=e.length,n=new Array(r),i=0;for(let a=0;a<r;++a){let o=e[a],s=t(o);s!==void 0&&(n[i]=Ot(s),i=i+1|0)}return n.length=i,n}function z$(e,t){let r=e.length,n=new Array(r),i=0;for(let a=0;a<r;++a){let o=e[a],s=t(o,a);s!==void 0&&(n[i]=Ot(s),i=i+1|0)}return n.length=i,n}function U$(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 q$(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function j$(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 B$(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return j$(e.tl,r).tl=t,r}function V$(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 H$(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 sm(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 lm(e){let t=V$(e),r=new Array(t);return H$(r,0,e),r}function G$(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function nE(e){return G$(e,0)}function K$(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function iE(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function W$(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 a=e[i];for(let o=0,s=a.length;o<s;++o)n[r]=a[o],r=r+1|0}return n}function Q$(e,t,r){let n=t;for(let i=0,a=e.length;i<a;++i)n=r(n,e[i]);return n}let aE=Q$;function ps(e){return e!==void 0?e.h:0}function pi(e,t,r,n){let i=ps(e),a=ps(n);return{k:t,v:r,h:i>=a?i+1|0:a+1|0,l:e,r:n}}function Y$(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function J$(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function jb(e,t,r,n){let i=e!==void 0?e.h:0,a=n!==void 0?n.h:0;if(i>(a+2|0)){let l=e.l,c=e.r;return ps(l)>=ps(c)?pi(l,e.k,e.v,pi(c,t,r,n)):pi(pi(l,e.k,e.v,c.l),c.k,c.v,pi(c.r,t,r,n))}if(a<=(i+2|0))return{k:t,v:r,h:i>=a?i+1|0:a+1|0,l:e,r:n};let o=n.l,s=n.r;return ps(s)>=ps(o)?pi(pi(e,t,r,o),n.k,n.v,s):pi(pi(e,t,r,o.l),o.k,o.v,pi(o.r,n.k,n.v,s))}function Vl(e,t){return e===t?0:e<t?-1:1}function X$(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Wt(r.v);e=t<n?r.l:r.r}}function ep(e,t,r){if(e===void 0)return Y$(t,r);let n=e.k;if(t===n)return J$(e,r);let i=e.v;return t<n?jb(ep(e.l,t,r),n,i,e.r):jb(e.l,n,i,ep(e.r,t,r))}let oE=X$;function sE(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=sm(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 tp={parsers:0,children:void 0,capture:void 0,wildcard:!1};function Z$(e,t){let r=e,n=t;for(;;){let i=n,a=r,o=a.parsers,s=0;if(o!==0)s=1;else{if(i===0)return 0;s=1}if(s===1){let l=a.capture,c=0;if(i===0)return o;if(i.hd===""){if(i.tl===0)return o;c=2}else c=2;if(c===2){if(a.wildcard)return o;let d=i.tl,f=oE(a.children,i.hd);if(f!==void 0){n=d,r=f;continue}if(l===void 0)return 0;n=d,r=l;continue}}}}function eF(e,t,r){let n=(i,a)=>{if(i===0)return{parsers:{hd:t,tl:a.parsers},children:a.children,capture:a.capture,wildcard:a.wildcard};let o=a.capture,s=a.children,l=i.tl,c=i.hd;if(typeof c!="object"){if(c!=="Capture")return{parsers:{hd:t,tl:a.parsers},children:a.children,capture:a.capture,wildcard:!0};let f=n(l,o!==void 0?o:tp);return{parsers:a.parsers,children:a.children,capture:f,wildcard:a.wildcard}}else{let d=c._0,f=oE(s,d),p=n(l,f!==void 0?f:tp);return{parsers:a.parsers,children:ep(s,d,p),capture:a.capture,wildcard:a.wildcard}}};return n(e,r)}function tF(e){return{prefix:0,matched:sE(e)}}function rF(e){return lm({hd:"",tl:e.matched}).join("/")}function nF(e){return lm({hd:"",tl:e.prefix}).join("/")}function iF(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function Yc(e,t){return{TAG:"Match",_0:e,_1:t}}function rp(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:rp(e._1)}:{hd:"Capture",tl:rp(e._1)}}function aF(e,t){let r=i=>e("/"+lm(i).join("/")),n=(i,a)=>{for(;;){let o=a,s=i;if(typeof o!="object")return o==="End"?s(0):d=>s(B$(d.matched,0));if(o.TAG==="Match"){let d=o._0;a=o._1,i=f=>s({hd:d,tl:f});continue}let l=o._1,c=o._0.to_;return d=>n(f=>s({hd:c(d),tl:f}),l)}};return n(r,t)}function oF(e){return aF(t=>t,e)}function sF(e,t,r){let n=e,i=t,a=0,o=r;for(;;){let s=o,l=a,c=i,d=n;if(typeof d!="object")return d==="End"?s!==0?s.hd===""&&s.tl===0?{TAG:"MatchWithTrailingSlash",_0:c}:"NoMatch":{TAG:"FullMatch",_0:c}:{TAG:"FullMatch",_0:c({prefix:nE(l),matched:s})};if(d.TAG==="Match"){if(s===0)return"NoMatch";let p=s.hd;if(d._0!==p)return"NoMatch";o=s.tl,a={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";o=s.tl,a={hd:f,tl:l},i=c(Ot(h)),n=d._1}}function lF(e){let t=nE(e);return iE(t,tp,(r,n)=>{let i=rp(n._0);return eF(i,n,r)})}function uF(e,t){let r=sE(t),i=Z$(e,r);for(;;){let a=i;if(a===0)return"NoMatch";let o=a.hd,s=o._2,l=sF(o._0,o._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:s(l._0)}:{TAG:"MatchWithTrailingSlash",_0:s(l._0)};i=a.tl}}function cF(e,t){let r=uF(e,t);if(typeof r=="object")return Wt(r._0)}function lE(e){return e("End")}let uE={prefix:nF,wildcard_match:rF,of_parts:tF},dF="Wildcard",Wi=oF,ss=iF;function Co(){return{}}let cE=Mt({});function fF(e,t){return e+("."+t)}function hF(e,t,r,n){return e[fF(t,r)]=Wi(n),e}function np(e,t){return Object.assign(Object.assign({},e),t)}function $d(){return bt(cE)}let pF=cE.Provider;function mF(e){return Kt(pF,{value:e.registry,children:e.children})}let gF={make:mF},dE={contents:{}};function vF(e){dE.contents=e}function bF(e){let t=e.startsWith("/")?e.slice(1):e,r=t.indexOf("/");if(r!==-1)return t.slice(0,r)}function Cs(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=bF(e);if(t===void 0)return e;let r=dE.contents[t];if(r===void 0)return e;let n=e.startsWith("/")?e:"/"+e;return(r.endsWith("/")?r.slice(0,r.length-1|0):r)+n}function _F(e){if(typeof e=="boolean")return e}function yF(e){if(e===null)return null}function xF(e){if(typeof e=="string")return e}function SF(e){if(typeof e=="number")return e}function EF(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function wF(e){if(Array.isArray(e))return e}let le={bool:_F,$$null:yF,string:xF,float:SF,object:EF,array:wF};function T(e,t){if(t in e)return Wt(e[t])}function ze(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i){let a=t[i];n[i]=[a,e[a]]}return n}function fE(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 it(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}function Be(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 ne(e){if(typeof e=="string")return e}function Ti(e){if(typeof e=="number")return e}function j(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function St(e){if(Array.isArray(e))return e}function hE(e){if(typeof e=="boolean")return e}let Bb=(function(e,t){for(var r in e)t(r)});function tt(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,a=t.TAG;if(i!==a)return!1;let o=e.length|0,s=t.length|0;if(o===s)if(Array.isArray(e)){let l=0;for(;;){let c=l;if(c===o)return!0;if(!tt(e[c],t[c]))return!1;l=c+1|0}}else{if(e instanceof Date&&t instanceof Date)return!(e>t||e<t);{let l={contents:!0},c=f=>{if(!Object.prototype.hasOwnProperty.call(t,f)){l.contents=!1;return}},d=f=>{if(!Object.prototype.hasOwnProperty.call(e,f)||!tt(t[f],e[f])){l.contents=!1;return}};return Bb(e,c),l.contents&&Bb(t,d),l.contents}}else return!1}function um(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!tt(e,t)}function RF(e,t){return t.startsWith(e)}function kF(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let Nr={initial:"initial",inherit_:"inherit_",unset:"unset",toString:kF};function AF(e){return{NAME:"var",VAL:e}}function CF(e,t){return{NAME:"varDefault",VAL:[e,t]}}function Vb(e){return RF("--",e)?e:"--"+e}function DF(e){if(e.NAME==="var")return"var("+Vb(e.VAL)+")";let t=e.VAL;return"var("+Vb(t[0])+","+t[1]+")"}function $F(e){return{NAME:"s",VAL:e}}function FF(e){return{NAME:"ms",VAL:e}}function IF(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let TF={s:$F,ms:FF,toString:IF};function NF(e){return e.VAL.toString()+"%"}function PF(e){return{NAME:"px",VAL:e}}function Hb(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 OF={px:PF};function MF(e,t){return{NAME:"min",VAL:[e,t]}}function LF(e,t){return{NAME:"max",VAL:[e,t]}}function Zn(e){if(typeof e!="object")return Hb(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+Zn(n[0])+" - "+Zn(n[1])+")"}if(t==="percent")return NF(e);if(t==="add"){let n=e.VAL;return"calc("+Zn(n[0])+" + "+Zn(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+Zn(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+Zn(n[0])+", "+Zn(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+Zn(n[0])+", "+Zn(n[1])+")"}if(t!=="mul")return Hb(e);let r=e.VAL;return"calc("+Zn(r[0])+" * "+r[1].toString()+")"}let Ir={min:MF,max:LF,toString:Zn};function zF(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let UF={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:zF};function qF(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let pE={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:qF};function jF(e){return"auto"}let BF={auto:"auto",toString:jF};function VF(e,t){return{NAME:"steps",VAL:[e,t]}}function HF(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function GF(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 KF(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 WF={toString:KF};function QF(e){return typeof e=="object"?e.VAL.toString():"infinite"}let YF={toString:QF};function JF(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 XF={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:JF};function ZF(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let eI={toString:ZF};function tI(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let rI={toString:tI};function nI(e){return"list-item"}let iI={toString:nI};function aI(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 oI={toString:aI};function sI(e){return e==="contents"?"contents":"none"}let lI={toString:sI};function uI(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let cI={toString:uI};function dI(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 cm={toString:dI};function fI(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let mE={toString:fI};function hI(e){return"normal"}let pI={toString:hI};function mI(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let gI={toString:mI};function vI(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let bI={toString:vI};function _I(e){return e==="normal"?"normal":"stretch"}let yI={toString:_I};function xI(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let SI={toString:xI};function EI(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let wI={toString:EI};function RI(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let kI={toString:RI};function AI(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let CI={toString:AI};function DI(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let gE={toString:DI};function $I(e){return"none"}let dm={toString:$I};function FI(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let fm={toString:FI},Pr={$$var:AF,varDefault:CF,toString:DF},II={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:VF,cubicBezier:HF,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:GF},TI=dm,NI=dm,PI=dm;function OI(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]=vo(t._1);break;case"PseudoClass":e[":"+t._0]=vo(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=vo(t._2);break}return e}function vo(e){return aE(e,{},OI)}function MI(e){let t=p=>e.injectRaw(p),r=(p,m)=>e.renderRaw(p,m),n=(p,m)=>e.injectRules(p,vo(m)),i=(p,m,b)=>e.renderRules(p,m,vo(b)),a=p=>e.make(vo(p)),o=p=>e.mergeStyles(p),s=(p,m)=>e.mergeStyles([p,m]),l=(p,m,b)=>e.mergeStyles([p,m,b]),c=(p,m,b,_)=>e.mergeStyles([p,m,b,_]),d=p=>aE(p,{},(m,b)=>(m[b[0].toString()+"%"]=vo(b[1]),m));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:a,merge:o,merge2:s,merge3:l,merge4:c,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,m)=>e.renderKeyframes(p,d(m))}}function Fd(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?Pr.toString(e):Ir.toString(e)}function LI(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?Pr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?mE.toString(e):e==="normal"||e==="stretch"?yI.toString(e):cm.toString(e)}}function zI(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?Pr.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?cm.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?mE.toString(e):SI.toString(e)}}function UI(e){return{TAG:"D",_0:"animationDuration",_1:TF.toString(e)}}function qI(e){return{TAG:"D",_0:"animationIterationCount",_1:YF.toString(e)}}function jI(e){return{TAG:"D",_0:"animationTimingFunction",_1:II.toString(e)}}function BI(e){return{TAG:"D",_0:"bottom",_1:Fd(e)}}function VI(e){return{TAG:"D",_0:"cursor",_1:XF.toString(e)}}function HI(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?Pr.toString(e):e==="table"||e==="grid"||e==="flex"?rI.toString(e):e==="contents"||e==="none"?lI.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?cI.toString(e):e==="block"||e==="inline"||e==="runIn"?eI.toString(e):e==="listItem"?iI.toString(e):oI.toString(e)}}function GI(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?Pr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):kI.toString(e)}}function KI(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function WI(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function QI(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?Pr.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?wI.toString(e):Nr.toString(e)}}function YI(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Pr.toString(e):Ir.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):fm.toString(e);return{TAG:"D",_0:"height",_1:t}}function JI(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?Pr.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?gI.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="normal"?pI.toString(e):cm.toString(e)}}function XI(e){return{TAG:"D",_0:"left",_1:Fd(e)}}function ZI(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?Pr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):WF.toString(e)}}function Do(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):BF.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?Pr.toString(e):Ir.toString(e)}function eT(e){return{TAG:"D",_0:"margin",_1:Do(e)}}function tT(e,t){return{TAG:"D",_0:"margin",_1:Do(e)+(" "+Do(t))}}function rT(e){return{TAG:"D",_0:"marginLeft",_1:Do(e)}}function nT(e){return{TAG:"D",_0:"marginRight",_1:Do(e)}}function iT(e){return{TAG:"D",_0:"marginTop",_1:Do(e)}}function aT(e){return{TAG:"D",_0:"marginBottom",_1:Do(e)}}function oT(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Pr.toString(e):Ir.toString(e)}else t=e==="none"?NI.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):fm.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function sT(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Pr.toString(e):Ir.toString(e)}else t=e==="none"?PI.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):fm.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function lT(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Pr.toString(e):Ir.toString(e)}else t=e==="none"?TI.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):gE.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function uT(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function cT(e){return{TAG:"D",_0:"overflow",_1:pE.toString(e)}}function dT(e){return{TAG:"D",_0:"overflowY",_1:pE.toString(e)}}function fT(e){return{TAG:"D",_0:"padding",_1:Ir.toString(e)}}function hT(e,t){return{TAG:"D",_0:"padding",_1:Ir.toString(e)+(" "+Ir.toString(t))}}function pT(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?Pr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):UF.toString(e)}}function mT(e){return{TAG:"D",_0:"right",_1:Fd(e)}}function gT(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?Pr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):bI.toString(e)}}function vT(e){return{TAG:"D",_0:"top",_1:Fd(e)}}function bT(e,t){return{TAG:"D",_0:e,_1:t}}function _T(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?Pr.toString(e):e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):CI.toString(e)}}function yT(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?Pr.toString(e):Ir.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?Nr.toString(e):e==="zero"?Ir.toString(e):gE.toString(e);return{TAG:"D",_0:"width",_1:t}}function xT(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function ST(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function ET(e,t){return{TAG:"S",_0:e,_1:t}}function wT(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function RT(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function kT(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function AT(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function CT(e){return{TAG:"S",_0:"::placeholder",_1:e}}let DT=OF.px;function $T(e){return{TAG:"D",_0:"animationName",_1:e}}function FT(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 IT(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 TT=(function(){function e(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),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(IT(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=FT(i);try{a.insertRule(n,a.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})(),zr="-ms-",Jc="-moz-",mt="-webkit-",vE="comm",hm="rule",pm="decl",NT="@import",bE="@keyframes",PT="@layer",OT=Math.abs,Id=String.fromCharCode,MT=Object.assign;function LT(e,t){return $r(e,0)^45?(((t<<2^$r(e,0))<<2^$r(e,1))<<2^$r(e,2))<<2^$r(e,3):0}function _E(e){return e.trim()}function zT(e,t){return(e=t.exec(e))?e[0]:e}function gt(e,t,r){return e.replace(t,r)}function ip(e,t){return e.indexOf(t)}function $r(e,t){return e.charCodeAt(t)|0}function Hl(e,t,r){return e.slice(t,r)}function _i(e){return e.length}function mm(e){return e.length}function Gu(e,t){return t.push(e),e}function UT(e,t){return e.map(t).join("")}var Td=1,Ds=1,yE=0,sn=0,sr=0,js="";function Nd(e,t,r,n,i,a,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:Td,column:Ds,length:o,return:""}}function ol(e,t){return MT(Nd("",null,null,"",null,null,0),e,{length:-e.length},t)}function qT(){return sr}function jT(){return sr=sn>0?$r(js,--sn):0,Ds--,sr===10&&(Ds=1,Td--),sr}function xn(){return sr=sn<yE?$r(js,sn++):0,Ds++,sr===10&&(Ds=1,Td++),sr}function ki(){return $r(js,sn)}function Oc(){return sn}function mu(e,t){return Hl(js,e,t)}function Gl(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 xE(e){return Td=Ds=1,yE=_i(js=e),sn=0,[]}function SE(e){return js="",e}function Mc(e){return _E(mu(sn-1,ap(e===91?e+2:e===40?e+1:e)))}function BT(e){for(;(sr=ki())&&sr<33;)xn();return Gl(e)>2||Gl(sr)>3?"":" "}function VT(e,t){for(;--t&&xn()&&!(sr<48||sr>102||sr>57&&sr<65||sr>70&&sr<97););return mu(e,Oc()+(t<6&&ki()==32&&xn()==32))}function ap(e){for(;xn();)switch(sr){case e:return sn;case 34:case 39:e!==34&&e!==39&&ap(sr);break;case 40:e===41&&ap(e);break;case 92:xn();break}return sn}function HT(e,t){for(;xn()&&e+sr!==57;)if(e+sr===84&&ki()===47)break;return"/*"+mu(t,sn-1)+"*"+Id(e===47?e:xn())}function GT(e){for(;!Gl(ki());)xn();return mu(e,sn)}function KT(e){return SE(Lc("",null,null,null,[""],e=xE(e),0,[0],e))}function Lc(e,t,r,n,i,a,o,s,l){for(var c=0,d=0,f=o,h=0,p=0,m=0,b=1,_=1,x=1,E=0,k="",w=i,C=a,$=n,A=k;_;)switch(m=E,E=xn()){case 40:if(m!=108&&$r(A,f-1)==58){ip(A+=gt(Mc(E),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:A+=Mc(E);break;case 9:case 10:case 13:case 32:A+=BT(m);break;case 92:A+=VT(Oc()-1,7);continue;case 47:switch(ki()){case 42:case 47:Gu(WT(HT(xn(),Oc()),t,r),l);break;default:A+="/"}break;case 123*b:s[c++]=_i(A)*x;case 125*b:case 59:case 0:switch(E){case 0:case 125:_=0;case 59+d:x==-1&&(A=gt(A,/\f/g,"")),p>0&&_i(A)-f&&Gu(p>32?Kb(A+";",n,r,f-1):Kb(gt(A," ","")+";",n,r,f-2),l);break;case 59:A+=";";default:if(Gu($=Gb(A,t,r,c,d,i,s,k,w=[],C=[],f),a),E===123)if(d===0)Lc(A,t,$,$,w,a,f,s,C);else switch(h===99&&$r(A,3)===110?100:h){case 100:case 108:case 109:case 115:Lc(e,$,$,n&&Gu(Gb(e,$,$,0,0,i,s,k,i,w=[],f),C),i,C,f,s,n?w:C);break;default:Lc(A,$,$,$,[""],C,0,s,C)}}c=d=p=0,b=x=1,k=A="",f=o;break;case 58:f=1+_i(A),p=m;default:if(b<1){if(E==123)--b;else if(E==125&&b++==0&&jT()==125)continue}switch(A+=Id(E),E*b){case 38:x=d>0?1:(A+="\f",-1);break;case 44:s[c++]=(_i(A)-1)*x,x=1;break;case 64:ki()===45&&(A+=Mc(xn())),h=ki(),d=f=_i(k=A+=GT(Oc())),E++;break;case 45:m===45&&_i(A)==2&&(b=0)}}return a}function Gb(e,t,r,n,i,a,o,s,l,c,d){for(var f=i-1,h=i===0?a:[""],p=mm(h),m=0,b=0,_=0;m<n;++m)for(var x=0,E=Hl(e,f+1,f=OT(b=o[m])),k=e;x<p;++x)(k=_E(b>0?h[x]+" "+E:gt(E,/&\f/g,h[x])))&&(l[_++]=k);return Nd(e,t,r,i===0?hm:s,l,c,d)}function WT(e,t,r){return Nd(e,t,r,vE,Id(qT()),Hl(e,2,-2),0)}function Kb(e,t,r,n){return Nd(e,t,r,pm,Hl(e,0,n),Hl(e,n+1,-1),n)}function bs(e,t){for(var r="",n=mm(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function QT(e,t,r,n){switch(e.type){case PT:if(e.children.length)break;case NT:case pm:return e.return=e.return||e.value;case vE:return"";case bE:return e.return=e.value+"{"+bs(e.children,n)+"}";case hm:e.value=e.props.join(",")}return _i(r=bs(e.children,n))?e.return=e.value+"{"+r+"}":""}function YT(e){var t=mm(e);return function(r,n,i,a){for(var o="",s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}function JT(e){return function(t){t.root||(t=t.return)&&e(t)}}function XT(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var ZT=function(t,r,n){for(var i=0,a=0;i=a,a=ki(),i===38&&a===12&&(r[n]=1),!Gl(a);)xn();return mu(t,sn)},e6=function(t,r){var n=-1,i=44;do switch(Gl(i)){case 0:i===38&&ki()===12&&(r[n]=1),t[n]+=ZT(sn-1,r,n);break;case 2:t[n]+=Mc(i);break;case 4:if(i===44){t[++n]=ki()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Id(i)}while(i=xn());return t},t6=function(t,r){return SE(e6(xE(t),r))},Wb=new WeakMap,r6=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&&!Wb.get(n))&&!i){Wb.set(t,!0);for(var a=[],o=t6(r,a),s=n.props,l=0,c=0;l<o.length;l++)for(var d=0;d<s.length;d++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[d]):s[d]+" "+o[l]}}},n6=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function EE(e,t){switch(LT(e,t)){case 5103:return mt+"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 mt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return mt+e+Jc+e+zr+e+e;case 6828:case 4268:return mt+e+zr+e+e;case 6165:return mt+e+zr+"flex-"+e+e;case 5187:return mt+e+gt(e,/(\w+).+(:[^]+)/,mt+"box-$1$2"+zr+"flex-$1$2")+e;case 5443:return mt+e+zr+"flex-item-"+gt(e,/flex-|-self/,"")+e;case 4675:return mt+e+zr+"flex-line-pack"+gt(e,/align-content|flex-|-self/,"")+e;case 5548:return mt+e+zr+gt(e,"shrink","negative")+e;case 5292:return mt+e+zr+gt(e,"basis","preferred-size")+e;case 6060:return mt+"box-"+gt(e,"-grow","")+mt+e+zr+gt(e,"grow","positive")+e;case 4554:return mt+gt(e,/([^-])(transform)/g,"$1"+mt+"$2")+e;case 6187:return gt(gt(gt(e,/(zoom-|grab)/,mt+"$1"),/(image-set)/,mt+"$1"),e,"")+e;case 5495:case 3959:return gt(e,/(image-set\([^]*)/,mt+"$1$`$1");case 4968:return gt(gt(e,/(.+:)(flex-)?(.*)/,mt+"box-pack:$3"+zr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+mt+e+e;case 4095:case 3583:case 4068:case 2532:return gt(e,/(.+)-inline(.+)/,mt+"$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(_i(e)-1-t>6)switch($r(e,t+1)){case 109:if($r(e,t+4)!==45)break;case 102:return gt(e,/(.+:)(.+)-([^]+)/,"$1"+mt+"$2-$3$1"+Jc+($r(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ip(e,"stretch")?EE(gt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if($r(e,t+1)!==115)break;case 6444:switch($r(e,_i(e)-3-(~ip(e,"!important")&&10))){case 107:return gt(e,":",":"+mt)+e;case 101:return gt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+mt+($r(e,14)===45?"inline-":"")+"box$3$1"+mt+"$2$3$1"+zr+"$2box$3")+e}break;case 5936:switch($r(e,t+11)){case 114:return mt+e+zr+gt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return mt+e+zr+gt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return mt+e+zr+gt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return mt+e+zr+e+e}return e}var i6=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case pm:t.return=EE(t.value,t.length);break;case bE:return bs([ol(t,{value:gt(t.value,"@","@"+mt)})],i);case hm:if(t.length)return UT(t.props,function(a){switch(zT(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bs([ol(t,{props:[gt(a,/:(read-\w+)/,":"+Jc+"$1")]})],i);case"::placeholder":return bs([ol(t,{props:[gt(a,/:(plac\w+)/,":"+mt+"input-$1")]}),ol(t,{props:[gt(a,/:(plac\w+)/,":"+Jc+"$1")]}),ol(t,{props:[gt(a,/:(plac\w+)/,zr+"input-$1")]})],i)}return""})}},a6=[i6],o6=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(b){var _=b.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=t.stylisPlugins||a6,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(b){for(var _=b.getAttribute("data-emotion").split(" "),x=1;x<_.length;x++)a[_[x]]=!0;s.push(b)});var l,c=[r6,n6];{var d,f=[QT,JT(function(b){d.insert(b)})],h=YT(c.concat(i,f)),p=function(_){return bs(KT(_),h)};l=function(_,x,E,k){d=E,p(_?_+"{"+x.styles+"}":x.styles),k&&(m.inserted[x.name]=!0)}}var m={key:r,sheet:new TT({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return m.sheet.hydrate(s),m};function s6(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 l6={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},u6=/[A-Z]|^ms/g,c6=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wE=function(t){return t.charCodeAt(1)===45},Qb=function(t){return t!=null&&typeof t!="boolean"},Kf=XT(function(e){return wE(e)?e:e.replace(u6,"-$&").toLowerCase()}),Yb=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(c6,function(n,i,a){return Aa={name:i,styles:a,next:Aa},i})}return l6[t]!==1&&!wE(t)&&typeof r=="number"&&r!==0?r+"px":r};function Xc(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 Aa={name:i.name,styles:i.styles,next:Aa},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Aa={name:o.name,styles:o.styles,next:Aa},o=o.next;var s=a.styles+";";return s}return d6(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function d6(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Xc(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":Qb(s)&&(n+=Kf(a)+":"+Yb(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)Qb(o[l])&&(n+=Kf(a)+":"+Yb(a,o[l])+";");else{var c=Xc(e,t,o);switch(a){case"animation":case"animationName":{n+=Kf(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var Jb=/label:\s*([^\s;{]+)\s*(;|$)/g,Aa;function Wf(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="";Aa=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=Xc(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Xc(r,t,e[s]),n){var l=a;i+=l[s]}Jb.lastIndex=0;for(var c="",d;(d=Jb.exec(i))!==null;)c+="-"+d[1];var f=s6(i)+c;return{name:f,styles:i,next:Aa}}function RE(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var f6=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},h6=function(t,r,n){f6(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function Xb(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Zb(e,t,r){var n=[],i=RE(e,n,r);return n.length<2?r:i+t(n)}var p6=function(t){var r=o6(t);r.sheet.speedy=function(s){this.isSpeedy=s},r.compat=!0;var n=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=Wf(c,r.registered,void 0);return h6(r,f),r.key+"-"+f.name},i=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=Wf(c,r.registered),h="animation-"+f.name;return Xb(r,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},a=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=Wf(c,r.registered);Xb(r,f)},o=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return Zb(r.registered,n,m6(c))};return{css:n,cx:o,injectGlobal:a,keyframes:i,hydrate:function(l){l.forEach(function(c){r.inserted[c]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:RE.bind(null,r.registered),merge:Zb.bind(null,r.registered,n)}},m6=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(r&&(r+=" "),r+=a)}}return r},Pd=p6({key:"css"}),g6=Pd.cx,Od=Pd.injectGlobal,kE=Pd.keyframes,v6=Pd.css;function b6(e,t){Od(t)}function _6(e,t){Od(it([[e,t]]))}function y6(e,t,r){Od(it([[t,r]]))}function x6(e){return kE(e)}function S6(e,t){return kE(t)}let Md=MI({injectRaw:e=>{Od(e)},renderRaw:b6,injectRules:_6,renderRules:y6,make:e=>v6(e),mergeStyles:e=>g6(e),makeKeyframes:x6,renderKeyframes:S6}),u=bT,W=LI,E6=zI,gm=BI,xe=VI,M=HI,ce=GI,si=KI,An=WI,li=QI,AE=YI,Ve=JI,Bs=XI,w6=ZI,Er=eT,R6=tT,gu=rT,CE=nT,Pi=iT,Ld=aT,k6=oT,A6=sT,DE=lT,Na=uT,Lo=cT,C6=dT,D6=fT,$6=hT,Qt=pT,Ya=mT,na=gT,ia=vT,$E=_T,aa=yT,F6=xT,jt=ET,FE=ST,IE=wT,Ja=RT,We=kT,TE=AT,I6=CT,pe=DT,T6=$T,N6=UI,P6=qI,O6=jI,M6=Md.global,y=Md.style,cn=Md.merge,L6=Md.keyframes,v={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"},I={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},R={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"},H={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},Sr={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function zn(e){return"var("+e+")"}let z6=y([M("flex"),ce("column"),W("center"),Ve("center"),u("gap",zn(I.md)),si(1),u("min-height","200px"),na("center"),u("padding",zn(I.xxl))]),U6=y([u("font-size","40px"),u("color",zn(v.textDisabled)),u("line-height","1")]),q6=y([u("color",zn(v.textPrimary)),u("font-size",zn(R.sizeLg)),u("font-weight",zn(R.weightMedium)),Er(pe(0))]),j6=y([u("color",zn(v.textSecondary)),u("font-size",zn(R.sizeMd)),u("max-width","360px"),Er(pe(0))]),B6=y([u("background",zn(v.brand)),u("color",zn(v.textOnBrand)),u("border","none"),u("border-radius",zn(H.md)),u("padding","var("+I.sm+") var("+I.lg+")"),u("font-size",zn(R.sizeMd)),u("cursor","pointer"),Pi(pe(8))]);function V6(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return P("div",{children:[g("div",{children:"( )",className:U6}),g("h3",{children:r,className:q6}),oe(e.description,null,n=>g("p",{children:n,className:j6})),oe(e.action,null,n=>{let i=n[1];return g("button",{children:n[0],className:B6,onClick:a=>i()})})],className:z6})}let vm=V6;function on(e){return"var("+e+")"}let H6=y([aa({NAME:"percent",VAL:100}),u("border-collapse","collapse"),u("font-size",on(R.sizeMd))]),G6=y([u("background",on(v.surfaceSubtle)),u("border-bottom","2px solid var("+v.border+")")]),e1=y([u("padding","var("+I.xs+") var("+I.sm+")"),u("color",on(v.textSecondary)),u("font-weight",on(R.weightMedium)),u("font-size",on(R.sizeSm)),u("text-align","left"),u("white-space","nowrap"),u("user-select","none")]),K6=y([u("padding","var("+I.sm+") var("+I.md+")"),u("font-size",on(R.sizeMd))]),W6=y([xe("pointer"),We([u("color",on(v.textPrimary))])]),Q6=y([u("color",on(v.textPrimary))]),Y6=y([gu(pe(4)),u("font-size",on(R.sizeXs)),u("color",on(v.brand))]),t1=y([u("border-bottom","1px solid var("+v.borderSubtle+")"),We([u("background",on(v.surfaceSubtle))])]),J6=y([u("min-height","44px")]),X6=y([xe("pointer")]),Z6=y([u("background",on(v.surfaceSubtle)),u("box-shadow","inset 3px 0 0 0 var("+v.brand+")")]),r1=y([u("padding","var("+I.xs+") var("+I.sm+")"),u("color",on(v.textPrimary)),u("vertical-align","middle")]),eN=y([u("padding","var("+I.sm+") var("+I.md+")")]),tN=y([na("center"),u("padding",on(I.xxl))]);function rN(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?e1+" "+K6:e1;return g("thead",{children:g("tr",{children:e.columns.map(i=>{let a=oe(r,!1,l=>l.key===i.key),o=oe(r,"Asc",l=>l.direction),s=i.sortable?n+" "+W6+(a?" "+Q6:""):n;return P("th",{children:[i.label,a?g("span",{children:o==="Asc"?"^":"v",className:Y6}):null],className:s,style:oe(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return Q(t,c=>{let d=a&&o==="Asc"?"Desc":"Asc";c(i.key,d)})}},i.key)})}),className:G6})}function nN(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,a=e.data,o=e.columns,s=r!==void 0?r:"Compact",l=s==="Comfortable"?r1+" "+eN:r1,c=s==="Comfortable"?t1+" "+J6:t1;return P("table",{children:[g(rN,{columns:o,sortState:e.sortState,onSort:e.onSort,density:s}),g("tbody",{children:a.length===0?g("tr",{children:g("td",{children:D(e.emptyView,g(vm,{title:"No data"})),className:l+" "+tN,colSpan:o.length})}):a.map(d=>{let f=i(d),h=oe(n,c,m=>c+" "+X6),p=tt(t,f)?h+" "+Z6:h;return g("tr",{children:o.map(m=>g("td",{children:m.render(d),className:l},m.key)),className:p,onClick:m=>Q(n,b=>b(d))},f)})})],className:H6})}let Zc=nN;function NE(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let PE=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function iN(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}),Ii(t.contents,PE.length)}function aN(e){let t=ee(e.split(/[\s_.@-]+/),a=>a).filter(a=>a!==""),r=a=>a.slice(0,1).toUpperCase(),n=t[0],i=t[1];return n!==void 0?i!==void 0?r(n)+r(i):r(n):"?"}function Qf(e){return"var("+e+")"}let oN=y([M("inlineFlex"),W("center"),Ve("center"),u("border-radius",Qf(H.full)),u("color","#ffffff"),u("font-family",Qf(R.fontFamily)),u("font-weight",Qf(R.weightMedium)),u("flex-shrink","0"),u("user-select","none"),u("vertical-align","middle"),u("overflow","hidden")]),sN=y([u("width","100%"),u("height","100%"),u("object-fit","cover")]);function lN(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",a=X(()=>!1),o=a[1],s=NE(i),l=s.toString()+"px",c=r!==void 0?r!==""&&!a[0]:!1,d={background:c?"transparent":PE[iN(n)],fontSize:((s/2|0)-1|0).toString()+"px",height:l,width:l};return g("span",{children:c?g("img",{className:sN,alt:n,src:D(r,""),onError:f=>o(h=>!0)}):aN(n),"aria-label":n,className:oN,role:"img",style:d,title:n})}let vu=lN;function Ea(e){return"var("+e+")"}let uN=y([M("flex"),li("wrap"),u("gap",Ea(I.xs)),W("center")]),cN=y([M("inlineFlex"),W("center"),u("padding","2px 8px"),u("border-radius",Ea(H.full)),u("background",Ea(v.surfaceElevated)),u("color",Ea(v.textSecondary)),u("font-size",Ea(R.sizeXs)),u("font-weight",Ea(R.weightMedium)),u("line-height","1.5"),u("white-space","nowrap")]),dN=y([u("color",Ea(v.textDisabled)),u("font-size",Ea(R.sizeSm))]);function fN(e){let t=e.items;return t.length===0?g("span",{children:"—",className:dN}):g("div",{children:t.map((r,n)=>g("span",{children:r,className:cN},n.toString()+":"+r)),className:uN})}let OE=fN,hN=[["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"]],pN=it(hN);function Yf(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function Jf(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function mN(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 gN(e){let t=e.length,r=[],n={contents:""},i=()=>{if(n.contents.length>0){r.push(n.contents),n.contents="";return}};for(let a=0;a<t;++a){let o=e.charAt(a);if(o==="_"||o==="-"||o===" ")i();else if(Yf(o)){let s=a>0&&Jf(e.charAt(a-1|0)),l=(a+1|0)<t&&Jf(e.charAt(a+1|0)),c=a>0&&Yf(e.charAt(a-1|0));(s||c&&l)&&i(),n.contents=n.contents+o}else if(mN(o)){let s=!1;if(a>0){let l=e.charAt(a-1|0);s=Yf(l)||Jf(l)}s&&i(),n.contents=n.contents+o}else n.contents=n.contents+o}return i(),r}function vN(e){let t=e.toLowerCase(),r=T(pN,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function ct(e){let t=gN(e);return t.length!==0?t.map(vN).join(" "):e}function mo(e){return"var("+e+")"}let n1=y([M("inlineFlex"),W("center"),u("gap","4px"),u("background","transparent"),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",mo(H.sm)),u("padding","1px 6px"),u("color",mo(v.textSecondary)),u("font-size",mo(R.sizeXs)),u("line-height","1"),xe("pointer"),We([u("background",mo(v.surfaceElevated)),u("color",mo(v.textPrimary))])]),bN=y([u("color",mo(v.success)),u("border-color",mo(v.success))]);function _N(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=X(()=>!1),a=i[1],o=i[0],s=c=>{c.stopPropagation(),c.preventDefault(),yt(navigator.clipboard.writeText(r).then(()=>(a(d=>!0),setTimeout(()=>a(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=o?n1+" "+bN:n1;return g("button",{children:o?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:s})}let yN=_N;function ed(e){return"var("+e+")"}let xN=y([M("inlineFlex"),W("center"),u("gap",ed(I.xs)),u("min-width","0")]),SN=y([u("color",ed(v.brand)),u("text-decoration","none"),u("max-width","260px"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),We([u("text-decoration","underline")])]),EN=y([u("color",ed(v.textPrimary)),u("font-family","var(--rv-font-mono, ui-monospace, monospace)"),u("font-size",ed(R.sizeSm)),u("max-width","200px"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]);function wN(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function RN(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,a=t!==void 0?t:!1,o=Qa();return P("span",{children:[i!==void 0?g("a",{children:n,className:SN,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(),o(i)}}):g("span",{children:wN(n,18),className:EN,title:r}),a?g(yN,{value:r}):null],className:xN})}let kN=RN;function Qi(e){return"var("+e+")"}let i1=y([M("inlineFlex"),W("center"),u("gap","4px"),u("padding","2px 8px"),u("border-radius",Qi(H.full)),u("background",Qi(v.surfaceElevated)),u("color",Qi(v.textSecondary)),u("font-size",Qi(R.sizeXs)),u("font-weight",Qi(R.weightMedium)),u("line-height","1.5"),u("white-space","nowrap"),u("border","none")]),AN=y([xe("pointer"),We([u("background",Qi(v.surface)),u("color",Qi(v.textPrimary))])]),CN=y([u("font-weight",Qi(R.weightBold)),u("color",Qi(v.textPrimary))]);function DN(e){let t=e.onClick,r=oe(t,i1,i=>i1+" "+AN),n=P(jr,{children:[g("span",{children:e.count.toString(),className:CN})," "+e.label,oe(t,null,i=>g("span",{children:" ▸","aria-hidden":!0}))]});return t!==void 0?g("button",{children:n,className:r,type:"button",onClick:i=>t()}):g("span",{children:n,className:r})}let Fl=DN;function sl(e){let t=e.toString();return t.length<2?"0"+t:t}function bm(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,a=t.getDate()|0,o=t.getHours()|0,s=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+sl(i)+"-"+sl(a)+" "+sl(o)+":"+sl(s)+":"+sl(l)}let $N=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function ME(e){if($N.test(e))return bm(e)}function FN(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function LE(e,t){if(!oe(e,!1,FN))return ME(t)}function IN(e,t){return e>t?e-t|0:0}function ls(e){return"var("+e+")"}let TN=y([M("inlineFlex"),W("center"),u("vertical-align","middle")]),a1=y([M("inlineFlex"),u("border-radius",ls(H.full)),u("box-shadow","0 0 0 2px var("+v.surface+")")]),NN=y([M("inlineFlex"),W("center"),Ve("center"),u("border-radius",ls(H.full)),u("background",ls(v.surfaceElevated)),u("color",ls(v.textSecondary)),u("font-family",ls(R.fontFamily)),u("font-weight",ls(R.weightMedium)),u("flex-shrink","0"),u("user-select","none")]);function PN(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",a=t!==void 0?t:4,o=IN(n.length,a),s=o>0?n.slice(0,a):n,l=o>0?n.slice(a):[],c=NE(i),d=(-c|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((s.length+1|0)-h|0).toString()});return P("span",{children:[s.map((h,p)=>g("span",{children:g(vu,{name:h.name,src:h.imageUrl,size:i}),className:a1,style:f(p)},p.toString())),o>0?g("span",{children:"+"+o.toString(),className:a1+" "+NN,style:{fontSize:((c/2|0)-2|0).toString()+"px",height:c.toString()+"px",marginLeft:d.toString()+"px",width:c.toString()+"px",zIndex:(s.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:TN})}let ON=PN;function Xf(e){return"var("+e+")"}function MN(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[v.success,v.background];case"Warning":return[v.warning,v.background];case"Error":return[v.error,v.background];case"Info":return[v.info,v.background];case"Neutral":return[v.surfaceElevated,v.textSecondary]}}function LN(e,t){return y([M("inlineFlex"),W("center"),u("gap","4px"),u("padding","2px 8px"),u("border-radius",Xf(H.full)),u("font-size",Xf(R.sizeXs)),u("font-weight",Xf(R.weightMedium)),u("line-height","1.5"),u("white-space","nowrap"),u("background",e.startsWith("--rv-")?"var("+e+")":e),u("color",t.startsWith("--rv-")?"var("+t+")":t)])}function zN(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,a=MN(n);return P("span",{children:[i?g("span",{style:{background:"currentColor",display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}):null,e.label],className:LN(a[0],a[1])})}let La=zN,zE={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,channel:void 0};function mi(e,t){let r=B(T(e,t),Be);return r==="JSONTrue"&&typeof r!="object"}function Ku(e,t){return S(T(e,t),ne)}function UN(e){let t=B(T(e,"x-reventless-index"),Be);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function $o(e){let t=j(e);return t!==void 0?{isId:mi(t,"x-reventless-id"),isCompositeId:mi(t,"x-reventless-compositeId"),isSubId:mi(t,"x-reventless-subId"),isCompositeSubId:mi(t,"x-reventless-compositeSubId"),index:UN(t),hidden:mi(t,"x-reventless-hidden"),summary:mi(t,"x-reventless-summary"),groupBy:mi(t,"x-reventless-group-by"),drillTarget:B(Ku(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:Ku(t,"x-reventless-drillTargetKey")})),collapsed:mi(t,"x-reventless-collapsed"),scan:mi(t,"x-reventless-scan"),scanSort:mi(t,"x-reventless-scanSort"),semantic:Ku(t,"x-reventless-semantic"),channel:Ku(t,"x-reventless-channel")}:zE}function bu(e,t){return D(B(S(S(j(e),r=>T(r,"properties")),j),r=>ee(ze(r),n=>{if(t($o(n[1])))return n[0]})),[])}function qN(e){return D(B(S(S(j(e),t=>T(t,"properties")),j),t=>ee(ze(t),r=>{let n=r[0];return S(S(S(j(r[1]),i=>T(i,"x-reventless-metric")),j),i=>{let a=S(T(i,"aggregate"),ne),o=S(T(i,"label"),ne);return B(a,s=>[n,s,o])})})),[])}function _m(e){return bu(e,t=>t.summary)}function jN(e){return bu(e,t=>t.isId)[0]}function BN(e){return bu(e,t=>t.groupBy)[0]}function ym(e){return bu(e,t=>t.isCompositeId)}function xm(e){return bu(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function VN(e){return S(S(j(e),t=>T(t,"x-reventless-live")),t=>{let r=Be(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function UE(e){return S(S(j(e),t=>T(t,"x-reventless-viewmode")),ne)}function HN(e){return S(S(j(e),t=>T(t,"x-reventless-layout")),ne)}function _u(e){return S(B(S(S(j(e),t=>T(t,"enum")),St),t=>ee(t,ne)),t=>{if(t.length!==0)return t})}function ui(e,t){return D(S(S(S(S(j(e),r=>T(r,"properties")),j),r=>T(r,t)),_u),[])}function yu(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"Signature":return"signature"}}let GN=["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","Signature"];function Sm(e){switch(e){case"address":return"Address";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"duration":return"Duration";case"email":return"Email";case"file":return"File";case"file-url":return"FileUrl";case"geo-lat":return"GeoLat";case"geo-lng":return"GeoLng";case"geo-point":return"GeoPoint";case"image":return"Image";case"label":return"Label";case"markdown":return"Markdown";case"percent":return"Percent";case"phone":return"Phone";case"progress":return"Progress";case"qr":return"Qr";case"rating":return"Rating";case"signature":return"Signature";case"status":return"Status";case"url":return"Url";case"user-ref":return"UserRef";default:return}}function dn(e){return D(B(S(S(j(e),t=>T(t,"properties")),j),ze),[])}function Dr(e,t){return S(S(j(e),r=>T(r,t)),ne)}function KN(e){return Dr(e,"type")}function za(e){let t=Dr(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function qE(e){return tt(Dr(e,"type"),"string")}function Em(e){let t=Dr(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let jE=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function WN(e){return jE.includes(e.toLowerCase())}function td(e,t){return t.some(r=>e.endsWith(r))}function QN(e){return td(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function YN(e){let t=Dr(e,"format");if(t!==void 0)switch(t){case"date":case"date-time":return["DateTime","format:date-time"];case"email":return["Email","format:email"];case"uri":case"url":return["Url","format:uri"];default:return}}function o1(e){return oe(_u(e),0,t=>t.length)}function Kl(e,t){return S(S(j(e),r=>T(r,t)),Ti)}function JN(e,t){if(!za(t))return;let r=Kl(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 XN=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function ZN(e){let t=dn(e);return XN.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}function e4(e,t){let r=e.toLowerCase(),n=JN(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&o1(t)>0?o1(t)<=8?["Status","name:status-enum"]:void 0:tt(Dr(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:za(t)&&td(r,["price","amount","total"])?["Currency","name:currency"]:tt(Dr(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:tt(Dr(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:tt(Dr(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:tt(Dr(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||td(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:za(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:tt(Dr(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:tt(Dr(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:tt(Dr(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:tt(Dr(t,"type"),"string")&&jE.includes(r)?["UserRef","name:user"]:void 0}function BE(e){return["lat","latitude"].includes(e)}function VE(e){return["lng","lon","long","longitude"].includes(e)}function t4(e){let t=dn(e),r=t.some(i=>BE(i[0].toLowerCase())?za(i[1]):!1),n=t.some(i=>VE(i[0].toLowerCase())?za(i[1]):!1);return r?n:!1}function r4(e){return["createdat","updatedat","deletedat"].includes(e)}let s1={contents:[]};function HE(e,t,r){let n=e+"."+t+"."+r;if(s1.contents.some(a=>a===n))return;s1.contents.push(n);let i=GN.map(yu).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function wm(e,t){let r=S($o(t).semantic,o=>{let s=Sm(o);if(s!==void 0)return{semantic:s,provenance:"Annotation"};HE("x-reventless-semantic",e,o)});if(r!==void 0)return r;let n=e.toLowerCase(),i=tt(Dr(t,"type"),"object")&&ZN(t)?["Address","shape:address"]:tt(Dr(t,"type"),"object")&&t4(t)?["GeoPoint","shape:geo-point"]:BE(n)&&za(t)?["GeoLat","name:geo-pair"]:VE(n)&&za(t)?["GeoLng","name:geo-pair"]:void 0,a;if(i!==void 0)a=i;else if(tt(Dr(t,"type"),"string")&&QN(n))a=["FileUrl","name:file-url"];else{let o=YN(t);a=o!==void 0?o:e4(e,t)}return B(a,o=>({semantic:o[0],provenance:{NAME:"Heuristic",VAL:o[1]}}))}function Tr(e,t){let r=dn(e),n={};r.forEach(h=>{let p=h[0],m=S(S(t,b=>T(b,p)),b=>{let _=Sm(b);if(_!==void 0)return{semantic:_,provenance:"Hint"};HE("uiHints.fields",p,b)});if(m!==void 0){n[p]=m;return}else return Q(wm(p,h[1]),b=>{n[p]=b})});let i=h=>r.map(p=>p[0]).find(p=>oe(T(n,p),!1,m=>m.semantic===h)),a=i("GeoLat"),o=i("GeoLng"),s=a!==void 0&&o!==void 0?{latField:a,lngField:o}:void 0,l=ee(r,h=>{let p=h[0];if(oe(T(n,p),!1,m=>m.semantic==="DateTime")||Em(h[1]))return p}),c=l.find(h=>h.toLowerCase().startsWith("start")),d=l.find(h=>h.toLowerCase().startsWith("end")),f=c!==void 0?d!==void 0?{startField:c,endField:d}:{startField:c}:B(l.find(h=>{let p=h.toLowerCase();return r4(p)?!1:td(p,["at","date"])?!0:p==="date"}),h=>({startField:h}));return{semantics:n,geo:s,dateSpan:f,statusField:i("Status"),labelField:i("Label"),imageField:i("Image")}}let GE=Mt([]),KE=Mt(e=>{}),n4=GE.Provider,i4=KE.Provider;function a4(e){let t=e.initial,r=t!==void 0?t:[],n=X(()=>r),i=n[1],a=dr(o=>i(s=>o),[]);return Kt(i4,{value:a,children:Kt(n4,{value:n[0],children:e.children})})}let o4={make:a4};function zo(){return bt(GE)}function s4(){return bt(KE)}function l4(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function u4(e){return e.endsWith("s")?e:e+"s"}function oa(e,t){let r=l4(t),n=u4(r),i=e.find(a=>a.name===n);return i!==void 0?i:e.find(a=>a.name===r)}function ya(e,t){return lE(r=>Yc(e,Yc(t,r)))}function us(e,t){return Yc(e,Yc(t,dF))}function ta(e,t,r,n){let i=[r].concat(n).map(a=>encodeURIComponent(a));return Wi(us(e,t))(uE.of_parts(i.join("/")))}function c4(e){let r=uE.wildcard_match(e).split("/").filter(a=>a!=="");if(r.length===0)return[void 0,[]];let n=B(r[0],a=>decodeURIComponent(a)),i=r.slice(1).map(a=>decodeURIComponent(a));return[n,i]}function Ua(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}var go=(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))(go||{});const d4=[0,1],WE=[1,0],QE=[2,3],YE=[3,2],f4={L:d4,M:WE,Q:QE,H:YE},h4=/^\d*$/,p4=/^[A-Z0-9 $%*+./:-]*$/,Zf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Rm=1,km=40,l1=3,m4=3,Wu=40,g4=10,JE=[[-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]],XE=[[-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 v4=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<Rm||t>km)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 a=Array.from({length:this.size}).fill(!1);for(let s=0;s<this.size;s++)this.modules.push(a.slice()),this.types.push(a.map(()=>0));this.drawFunctionPatterns();const o=this.addEccAndInterleave(n);if(this.drawCodewords(o),i===-1){let s=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const c=this.getPenaltyScore();c<s&&(i=l,s=c),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,go.Timing),this.setFunctionModule(n,6,n%2===0,go.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 a=0;a<10;a++)n=n<<1^(n>>>9)*1335;const i=(r<<10|n)^21522;for(let a=0;a<=5;a++)this.setFunctionModule(8,a,ji(i,a));this.setFunctionModule(8,7,ji(i,6)),this.setFunctionModule(8,8,ji(i,7)),this.setFunctionModule(7,8,ji(i,8));for(let a=9;a<15;a++)this.setFunctionModule(14-a,8,ji(i,a));for(let a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,ji(i,a));for(let a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,ji(i,a));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=ji(r,n),a=this.size-11+n%3,o=Math.floor(n/3);this.setFunctionModule(a,o,i),this.setFunctionModule(o,a,i)}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){const a=Math.max(Math.abs(i),Math.abs(n)),o=t+i,s=r+n;o>=0&&o<this.size&&s>=0&&s<this.size&&this.setFunctionModule(o,s,a!==2&&a!==4,go.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,go.Alignment)}setFunctionModule(t,r,n,i=go.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==zc(r,n))throw new RangeError("Invalid argument");const i=XE[n[0]][r],a=JE[n[0]][r],o=Math.floor(op(r)/8),s=i-o%i,l=Math.floor(o/i),c=[],d=k4(a);for(let h=0,p=0;h<i;h++){const m=t.slice(p,p+l-a+(h<s?0:1));p+=m.length;const b=A4(m,d);h<s&&m.push(0),c.push(m.concat(b))}const f=[];for(let h=0;h<c[0].length;h++)c.forEach((p,m)=>{(h!==l-a||m>=s)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(op(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 a=0;a<2;a++){const o=n-a,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][o]&&r<t.length*8&&(this.modules[l][o]=ji(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 a=0;a<this.size;a++){let o=!1,s=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[a][c]===o?(s++,s===5?t+=l1:s>5&&t++):(this.finderPenaltyAddHistory(s,l),o||(t+=this.finderPenaltyCountPatterns(l)*Wu),o=this.modules[a][c],s=1);t+=this.finderPenaltyTerminateAndCount(o,s,l)*Wu}for(let a=0;a<this.size;a++){let o=!1,s=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[c][a]===o?(s++,s===5?t+=l1:s>5&&t++):(this.finderPenaltyAddHistory(s,l),o||(t+=this.finderPenaltyCountPatterns(l)*Wu),o=this.modules[c][a],s=1);t+=this.finderPenaltyTerminateAndCount(o,s,l)*Wu}for(let a=0;a<this.size-1;a++)for(let o=0;o<this.size-1;o++){const s=this.modules[a][o];s===this.modules[a][o+1]&&s===this.modules[a+1][o]&&s===this.modules[a+1][o+1]&&(t+=m4)}let r=0;for(const a of this.modules)r=a.reduce((o,s)=>o+(s?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*g4,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 Yi(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 ji(e,t){return(e>>>t&1)!==0}class Am{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 b4=[1,10,12,14],_4=[2,9,11,13],y4=[4,8,16,16];function ZE(e,t){return e[Math.floor((t+7)/17)+1]}function ew(e){const t=[];for(const r of e)Yi(r,8,t);return new Am(y4,e.length,t)}function x4(e){if(!tw(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);Yi(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new Am(b4,e.length,t)}function S4(e){if(!rw(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=Zf.indexOf(e.charAt(r))*45;n+=Zf.indexOf(e.charAt(r+1)),Yi(n,11,t)}return r<e.length&&Yi(Zf.indexOf(e.charAt(r)),6,t),new Am(_4,e.length,t)}function E4(e){return e===""?[]:tw(e)?[x4(e)]:rw(e)?[S4(e)]:[ew(R4(e))]}function tw(e){return h4.test(e)}function rw(e){return p4.test(e)}function w4(e,t){let r=0;for(const n of e){const i=ZE(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function R4(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 op(e){if(e<Rm||e>km)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 zc(e,t){return Math.floor(op(e)/8)-JE[t[0]][e]*XE[t[0]][e]}function k4(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]=sp(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=sp(r,2)}return t}function A4(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((a,o)=>r[o]^=sp(a,i))}return r}function sp(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 C4(e,t,r=1,n=40,i=-1,a=!0){if(!(Rm<=r&&r<=n&&n<=km)||i<-1||i>7)throw new RangeError("Invalid value");let o,s;for(o=r;;o++){const f=zc(o,t)*8,h=w4(e,o);if(h<=f){s=h;break}if(o>=n)throw new RangeError("Data too long")}for(const f of[WE,QE,YE])a&&s<=zc(o,f)*8&&(t=f);const l=[];for(const f of e){Yi(f.mode[0],4,l),Yi(f.numChars,ZE(f.mode,o),l);for(const h of f.getData())l.push(h)}const c=zc(o,t)*8;Yi(0,Math.min(4,c-l.length),l),Yi(0,(8-l.length%8)%8,l);for(let f=236;l.length<c;f^=253)Yi(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 v4(o,t,d,i)}function D4(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:a=40,maskPattern:o=-1,border:s=1}=t||{},l=typeof e=="string"?E4(e):Array.isArray(e)?[ew(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const c=C4(l,f4[r],i,a,o,n),d=$4({version:c.version,maskPattern:c.mask,size:c.size,data:c.modules,types:c.types},s);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function $4(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(a=>{for(let o=0;o<t;o++)a.unshift(!1),a.push(!1)});for(let a=0;a<t;a++)e.data.unshift(Array.from({length:n},o=>!1)),e.data.push(Array.from({length:n},o=>!1));const i=go.Border;e.types.forEach(a=>{for(let o=0;o<t;o++)a.unshift(i),a.push(i)});for(let a=0;a<t;a++)e.types.unshift(Array.from({length:n},o=>i)),e.types.push(Array.from({length:n},o=>i));return e}function F4(e){return"var("+e+")"}let I4=y([M("inlineBlock"),u("background","#ffffff"),u("padding","6px"),u("border-radius",F4(H.md)),u("border","1px solid var("+v.borderSubtle+")"),u("line-height","0")]),T4=y([u("color","#000000"),u("display","block")]);function N4(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function P4(e){if(e.trim()!=="")try{return D4(e,{ecc:"M",border:4})}catch{return}}function O4(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=P4(r);if(i===void 0)return null;let a=i.size.toString();return g("span",{children:g("svg",{children:g("path",{d:N4(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:T4,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+a+" "+a,xmlns:"http://www.w3.org/2000/svg"}),className:I4})}let M4=O4;function wn(e){return"var("+e+")"}let L4=y([Qt("fixed"),ia(pe(0)),Bs(pe(0)),Ya(pe(0)),gm(pe(0)),u("background","rgba(0,0,0,0.82)"),M("flex"),ce("column"),W("center"),Ve("center"),u("gap",wn(I.md)),u("padding",wn(I.lg)),u("z-index","1100")]),z4=y([u("max-width","min(92vw, 1400px)"),u("max-height","78vh"),u("object-fit","contain"),u("border-radius",wn(H.sm)),u("box-shadow",wn(Sr.lg))]),U4=y([M("flex"),W("center"),u("gap",wn(I.md)),u("max-width","100%")]),q4=y([M("flex"),W("center"),u("gap",wn(I.md)),u("max-width","92vw"),u("color","#f5f5f5"),u("font-size",wn(R.sizeSm))]),j4=y([u("font-size",wn(R.sizeMd)),u("font-weight",wn(R.weightMedium)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),B4=y([u("color","#c8c8c8")]),V4=y([u("font-family",wn(R.fontFamilyMono)),u("color","#c8c8c8")]),nw=y([M("inlineFlex"),W("center"),Ve("center"),u("background","rgba(255,255,255,0.12)"),u("border","1px solid rgba(255,255,255,0.25)"),u("border-radius",wn(H.md)),u("color","#f5f5f5"),u("padding","4px var("+I.sm+")"),u("font-size",wn(R.sizeSm)),xe("pointer"),We([u("background","rgba(255,255,255,0.22)")])]),u1=cn([nw,y([u("width","40px"),u("height","40px"),u("border-radius","50%"),u("font-size",wn(R.sizeLg)),An(0)])]),H4=cn([nw,y([Qt("absolute"),ia(pe(16)),Ya(pe(16)),u("width","32px")])]);function rs(e,t,r){return t===0?0:Ii(Ii(e+r|0,t)+t|0,t)}function G4(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,a=i.length,o=a>1;Re(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return o?r(rs(n,a,-1)):void 0;case"ArrowRight":return o?r(rs(n,a,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,a]);let s=i[rs(n,a,0)];if(s===void 0)return null;let l=s.title,c=s.caption;return P("div",{children:[g("button",{children:"✕",className:H4,title:"Close",type:"button",onClick:d=>t()}),P("div",{children:[o?g("button",{children:"‹",className:u1,title:"Previous",type:"button",onClick:d=>r(rs(n,a,-1))}):null,g("img",{className:z4,alt:D(s.title,""),src:s.src}),o?g("button",{children:"›",className:u1,title:"Next",type:"button",onClick:d=>r(rs(n,a,1))}):null],className:U4,onClick:d=>{d.stopPropagation()}}),P("div",{children:[l!==void 0?g("span",{children:l,className:j4,title:l}):null,c!==void 0?g("span",{children:c,className:B4}):null,o?g("span",{children:(rs(n,a,0)+1|0).toString()+" / "+a.toString(),className:V4}):null,D(e.action,null)],className:q4,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:L4,role:"dialog",onClick:d=>t()})}let iw=G4;function bo(e){return"var("+e+")"}function K4(e){return y([u("width","100%"),u("height",e),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",bo(H.md)),u("background",bo(v.surfaceSubtle)),Lo("hidden")])}let W4=y([M("flex"),ce("column"),W("center"),Ve("center"),u("gap",bo(I.sm)),u("height","100%"),u("padding",bo(I.lg)),u("color",bo(v.textSecondary)),u("font-size",bo(R.sizeSm)),u("text-align","center")]),Q4=y([u("color",bo(v.brand)),u("text-decoration","none"),We([u("text-decoration","underline")])]);function Y4(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function J4(e){let t=e.height,r=e.title,n=e.src,i=r!==void 0?r:"Document",a=t!==void 0?t:"70vh";return g("object",{children:P("div",{children:["This browser can't display the document inline.",g("a",{children:"Open "+i,className:Q4,href:n,rel:"noopener noreferrer",target:"_blank"})],className:W4}),"aria-label":i,className:K4(a),data:n,type:"application/pdf"})}let X4=J4;function aw(e){return e==="Small"?"13px":"18px"}let ow="★";function Z4(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function Fo(e){return"var("+e+")"}function eP(e){return y([M("inlineFlex"),Qt("relative"),u("font-size",aw(e)),u("line-height","1"),u("letter-spacing","1px"),u("white-space","nowrap"),u("vertical-align","-1px")])}let tP=y([u("color",Fo(v.borderSubtle))]);function rP(e){return y([Qt("absolute"),u("top","0"),u("left","0"),u("width",(e*100).toString()+"%"),Lo("hidden"),u("white-space","nowrap"),u("color",Fo(v.warning)),u("pointer-events","none")])}let c1=y([M("inlineFlex"),u("gap","2px"),W("center")]);function nP(e,t){return y([u("background","none"),u("border","none"),u("padding","0 1px"),u("font-size",aw(t)),u("line-height","1"),xe("pointer"),u("color",Fo(e?v.warning:v.borderSubtle)),u("transition","color 120ms, transform 120ms"),We([u("transform","scale(1.15)")]),jt("&:focus-visible",[u("outline","2px solid var("+v.brand+")"),u("outline-offset","1px"),u("border-radius","2px")])])}let d1=y([u("color",Fo(v.textSecondary)),u("font-size",Fo(R.sizeSm))]),iP=y([M("inlineFlex"),W("center"),u("gap","6px")]),aP=y([u("border","1px solid var("+v.error+")"),u("border-radius",Fo(H.sm)),u("padding","2px 4px")]);function oP(e){return rE(e<=0?0:e,ow).join("")}function sP(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,a=e.size,o=e.max,s=e.value,l=o!==void 0?o:5,c=a!==void 0?a:"Small",d=i!==void 0?i:!1,f=t!==void 0?t:!1,h=l<=0?5:l,p=oP(h),m=D(e.label,(Math.round(s*10)/10).toString()+" of "+h.toString());return n!==void 0?P("span",{children:[Ma(h,b=>b+1|0).map(b=>{let _=b<=s;return g("button",{children:ow,"aria-label":b.toString()+" of "+h.toString(),"aria-pressed":_?"true":"false",className:nP(_,c),title:b.toString()+" of "+h.toString(),type:"button",onBlur:x=>Q(r,E=>E()),onClick:x=>{x.stopPropagation(),n(b===s?0:b)}},b.toString())}),d?g("span",{children:s<=0?"—":s.toString(),className:d1}):null],"aria-label":m,className:f?c1+" "+aP:c1,role:"group"}):P("span",{children:[P("span",{children:[g("span",{children:p,className:tP}),g("span",{children:p,className:rP(Z4(s,h))})],"aria-label":m,className:eP(c),role:"img",title:m}),d?g("span",{children:(Math.round(s*10)/10).toString()+" / "+h.toString(),className:d1}):null],className:iP})}let eh=sP;function Io(e){return"var("+e+")"}let lP=y([M("flex"),ce("column"),u("gap","4px")]),uP=y([M("flex"),Ve("spaceBetween"),u("font-size",Io(R.sizeSm))]),cP=y([u("color",Io(v.textSecondary))]),dP=y([u("color",Io(v.textPrimary)),u("font-weight",Io(R.weightMedium))]),fP=y([u("background",Io(v.surfaceSubtle)),u("border-radius",Io(H.full)),u("height","8px"),Lo("hidden")]);function hP(e,t){return y([u("background",t!==void 0?t:"var("+v.brand+")"),u("border-radius",Io(H.full)),u("height","100%"),u("width",e.toString()+"%"),u("transition","width 0.3s ease")])}function pP(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,a=n>100?100:n,o=a<0?0:a;return P("div",{children:[He(r)||i?P("div",{children:[oe(r,null,s=>g("span",{children:s,className:cP})),i?g("span",{children:Math.round(o).toString()+"%",className:dP}):null],className:uP}):null,g("div",{children:g("div",{className:hP(o,e.color)}),className:fP})],className:lP})}let sw=pP,zd={};function lw(e){zd[e.id]=e}function uw(e){return T(zd,e)}let cw={};function mP(e){return oe(T(zd,e),cw,t=>t.constraints)}let f1={contents:[]};function gP(e,t){if(f1.contents.some(n=>n===e))return;f1.contents.push(e);let r=fE(zd).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 dw="#111111";function ri(e){return"var("+e+")"}let h1=y([M("flex"),ce("column"),u("gap",ri(I.xs))]);function vP(e){return y([u("background","#ffffff"),u("border",e?"1px solid var("+v.error+")":"1px dashed var("+v.border+")"),u("border-radius",ri(H.md)),u("touch-action","none"),u("max-width","100%"),u("width","100%"),u("height","auto"),xe("crosshair"),u("display","block")])}let bP=y([u("fill","#9ca3af"),u("font-size","13px"),u("pointer-events","none"),u("user-select","none")]),_P=y([u("stroke","#e5e7eb"),u("stroke-width","1")]),p1=y([M("flex"),W("center"),u("gap",ri(I.sm)),u("font-size",ri(R.sizeXs)),u("color",ri(v.textSecondary))]),m1=y([u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",ri(H.sm)),u("color",ri(v.textSecondary)),u("font-size",ri(R.sizeXs)),u("padding","2px 8px"),xe("pointer"),We([u("border-color",ri(v.brand)),u("color",ri(v.brand))])]),yP=y([u("background","#ffffff"),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",ri(H.md)),u("padding","4px"),u("display","inline-block"),u("line-height","0")]),xP=y([u("display","block"),u("max-width","100%"),u("height","auto")]);function nn(e){return(Math.round(e*10)/10).toString()}function fw(e){return e.map(t=>nn(t.x)+","+nn(t.y)).join(" ")}function SP(e,t,r){let n=e.filter(a=>a.length!==0);if(n.length===0)return"";let i=n.map(a=>{let o=a.length===1?a.concat(a):a;return'<polyline points="'+fw(o)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+nn(t)+" "+nn(r)+'" width="'+nn(t)+'" height="'+nn(r)+'"><g fill="none" stroke="'+dw+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function g1(e){return e.trim().startsWith("<svg")}function hw(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function EP(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function wP(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,a=e.onChange,o=e.value,s=n!==void 0?n:480,l=r!==void 0?r:160,c=t!==void 0?t:!1,d=Ke(null),f=X(()=>[]),h=f[1],p=f[0],m=X(()=>!1),b=m[1],_=Ke(!1),x=F=>B(Fi(d.current),N=>{let O=N.getBoundingClientRect(),L=O.width===0?1:s/O.width,q=O.height===0?1:l/O.height;return{x:(F.clientX-O.left)*L,y:(F.clientY-O.top)*q}}),E=F=>a(SP(F,s,l)),k=F=>{F.preventDefault();let N=x(F);if(N!==void 0)return _.current=!0,Q(Fi(d.current),O=>{O.setPointerCapture(F.pointerId)}),h(O=>O.concat([[N]]))},w=F=>{if(!_.current)return;let N=x(F);if(N!==void 0)return h(O=>{let L=O[O.length-1|0];if(L===void 0)return O;let q=L[L.length-1|0];return q!==void 0&&!EP(N,q)?O:O.slice(0,O.length-1|0).concat([L.concat([N])])})},C=F=>{if(_.current)return _.current=!1,E(p),Q(i,N=>N())},$=()=>{h(F=>[]),b(F=>!0),a("")},A=p.length!==0;return o.trim().startsWith("<svg")&&!A&&!m[0]?P("div",{children:[g("span",{children:g("img",{className:xP,alt:"Signature",src:hw(o)}),className:yP}),g("div",{children:g("button",{children:"Sign again",className:m1,type:"button",onClick:F=>$()}),className:p1})],className:h1}):P("div",{children:[P("svg",{children:[g("line",{className:_P,x1:nn(s*.06),x2:nn(s*.94),y1:nn(l*.78),y2:nn(l*.78)}),A?null:g("text",{children:"Sign here",className:bP,textAnchor:"middle",x:nn(s/2),y:nn(l*.7)}),g("g",{children:p.map((F,N)=>g("polyline",{points:fw(F.length===1?F.concat(F):F)},N.toString())),fill:"none",stroke:dw,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Wt(d),"aria-label":"Signature pad",className:vP(c),role:"img",onPointerDown:k,onPointerMove:w,onPointerUp:C,onPointerCancel:C,viewBox:"0 0 "+nn(s)+" "+nn(l),xmlns:"http://www.w3.org/2000/svg"}),P("div",{children:[A?g("button",{children:"Clear",className:m1,type:"button",onClick:F=>$()}):null,g("span",{children:"Draw your signature above"})],className:p1})],className:h1})}let RP=wP;function kP(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function Un(e){return"var("+e+")"}let AP=y([M("flex"),ce("column"),u("gap",Un(I.sm))]),CP=y([M("flex"),u("gap","4px")]),v1=y([u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",Un(H.sm)),u("color",Un(v.textSecondary)),u("font-size",Un(R.sizeXs)),u("padding","2px 8px"),xe("pointer")]),DP=y([u("background",Un(v.brandSubtle)),u("border-color",Un(v.brand)),u("color",Un(v.textPrimary))]),$P=y([aa({NAME:"percent",VAL:100}),u("min-height","220px"),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Un(H.sm)),u("background","#ffffff")]),FP=y([u("margin","0"),u("font-family",Un(R.fontFamilyMono)),u("font-size",Un(R.sizeXs)),u("line-height",Un(R.lineHeightRelaxed)),u("color",Un(v.textPrimary)),u("white-space","pre-wrap"),u("word-break","break-word")]);function IP(e){let t=e.textAlternative,r=X(()=>!1),n=r[1],i=r[0],a=(l,c,d)=>g("button",{children:l,className:c?v1+" "+DP:v1,type:"button",onClick:d}),o,s=0;return i&&t!==void 0?o=g("pre",{children:t,className:FP}):s=1,s===1&&(o=g("iframe",{className:$P,title:"Email preview",sandbox:"",srcDoc:e.html})),P("div",{children:[t!==void 0?P("div",{children:[a("HTML",!i,l=>n(c=>!1)),a("Plain text",i,l=>n(c=>!0))],className:CP}):null,o],className:AP})}function TP(e,t){return g(IP,{html:e.body,textAlternative:e.textAlternative})}function NP(){lw({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:TP})}const b1={};function PP(e){let t=b1[e];if(t)return t;t=b1[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 $s(e,t){typeof t!="string"&&(t=$s.defaultChars);const r=PP(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let a=0,o=n.length;a<o;a+=3){const s=parseInt(n.slice(a+1,a+3),16);if(s<128){i+=r[s];continue}if((s&224)===192&&a+3<o){const l=parseInt(n.slice(a+4,a+6),16);if((l&192)===128){const c=s<<6&1984|l&63;c<128?i+="��":i+=String.fromCharCode(c),a+=3;continue}}if((s&240)===224&&a+6<o){const l=parseInt(n.slice(a+4,a+6),16),c=parseInt(n.slice(a+7,a+9),16);if((l&192)===128&&(c&192)===128){const d=s<<12&61440|l<<6&4032|c&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),a+=6;continue}}if((s&248)===240&&a+9<o){const l=parseInt(n.slice(a+4,a+6),16),c=parseInt(n.slice(a+7,a+9),16),d=parseInt(n.slice(a+10,a+12),16);if((l&192)===128&&(c&192)===128&&(d&192)===128){let f=s<<18&1835008|l<<12&258048|c<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),a+=9;continue}}i+="�"}return i})}$s.defaultChars=";/?:@&=+$,#";$s.componentChars="";const _1={};function OP(e){let t=_1[e];if(t)return t;t=_1[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 xu(e,t,r){typeof t!="string"&&(r=t,t=xu.defaultChars),typeof r>"u"&&(r=!0);const n=OP(t);let i="";for(let a=0,o=e.length;a<o;a++){const s=e.charCodeAt(a);if(r&&s===37&&a+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(a+1,a+3))){i+=e.slice(a,a+3),a+=2;continue}if(s<128){i+=n[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1<o){const l=e.charCodeAt(a+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[a]+e[a+1]),a++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[a])}return i}xu.defaultChars=";/?:@&=+$,-_.!~*'()#";xu.componentChars="-_.!~*'()";function Cm(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 rd(){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 MP=/^([a-z0-9.+-]+:)/i,LP=/:[0-9]*$/,zP=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,UP=["<",">",'"',"`"," ","\r",`
|
|
3
|
-
`," "],qP=["{","}","|","\\","^","`"].concat(UP),jP=["'"].concat(qP),y1=["%","/","?",";","#"].concat(jP),x1=["/","?","#"],BP=255,S1=/^[+a-z0-9A-Z_-]{0,63}$/,VP=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E1={javascript:!0,"javascript:":!0},w1={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Dm(e,t){if(e&&e instanceof rd)return e;const r=new rd;return r.parse(e,t),r}rd.prototype.parse=function(e,t){let r,n,i,a=e;if(a=a.trim(),!t&&e.split("#").length===1){const c=zP.exec(a);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let o=MP.exec(a);if(o&&(o=o[0],r=o.toLowerCase(),this.protocol=o,a=a.substr(o.length)),(t||o||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(o&&E1[o])&&(a=a.substr(2),this.slashes=!0)),!E1[o]&&(i||o&&!w1[o])){let c=-1;for(let m=0;m<x1.length;m++)n=a.indexOf(x1[m]),n!==-1&&(c===-1||n<c)&&(c=n);let d,f;c===-1?f=a.lastIndexOf("@"):f=a.lastIndexOf("@",c),f!==-1&&(d=a.slice(0,f),a=a.slice(f+1),this.auth=d),c=-1;for(let m=0;m<y1.length;m++)n=a.indexOf(y1[m]),n!==-1&&(c===-1||n<c)&&(c=n);c===-1&&(c=a.length),a[c-1]===":"&&c--;const h=a.slice(0,c);a=a.slice(c),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 b=0,_=m.length;b<_;b++){const x=m[b];if(x&&!x.match(S1)){let E="";for(let k=0,w=x.length;k<w;k++)x.charCodeAt(k)>127?E+="x":E+=x[k];if(!E.match(S1)){const k=m.slice(0,b),w=m.slice(b+1),C=x.match(VP);C&&(k.push(C[1]),w.unshift(C[2])),w.length&&(a=w.join(".")+a),this.hostname=k.join(".");break}}}}this.hostname.length>BP&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=a.indexOf("#");s!==-1&&(this.hash=a.substr(s),a=a.slice(0,s));const l=a.indexOf("?");return l!==-1&&(this.search=a.substr(l),a=a.slice(0,l)),a&&(this.pathname=a),w1[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};rd.prototype.parseHost=function(e){let t=LP.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 HP=Object.freeze(Object.defineProperty({__proto__:null,decode:$s,encode:xu,format:Cm,parse:Dm},Symbol.toStringTag,{value:"Module"})),pw=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mw=/[\0-\x1F\x7F-\x9F]/,GP=/[\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]/,$m=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,gw=/[\$\+<->\^`\|~\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]/,vw=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,KP=Object.freeze(Object.defineProperty({__proto__:null,Any:pw,Cc:mw,Cf:GP,P:$m,S:gw,Z:vw},Symbol.toStringTag,{value:"Module"})),WP=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))),QP=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var th;const YP=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]]),JP=(th=String.fromCodePoint)!==null&&th!==void 0?th: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 XP(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=YP.get(e))!==null&&t!==void 0?t:e}var br;(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"})(br||(br={}));const ZP=32;var Ca;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ca||(Ca={}));function lp(e){return e>=br.ZERO&&e<=br.NINE}function eO(e){return e>=br.UPPER_A&&e<=br.UPPER_F||e>=br.LOWER_A&&e<=br.LOWER_F}function tO(e){return e>=br.UPPER_A&&e<=br.UPPER_Z||e>=br.LOWER_A&&e<=br.LOWER_Z||lp(e)}function rO(e){return e===br.EQUALS||tO(e)}var mr;(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"})(mr||(mr={}));var Ji;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ji||(Ji={}));class nO{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=mr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ji.Strict}startEntity(t){this.decodeMode=t,this.state=mr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case mr.EntityStart:return t.charCodeAt(r)===br.NUM?(this.state=mr.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=mr.NamedEntity,this.stateNamedEntity(t,r));case mr.NumericStart:return this.stateNumericStart(t,r);case mr.NumericDecimal:return this.stateNumericDecimal(t,r);case mr.NumericHex:return this.stateNumericHex(t,r);case mr.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|ZP)===br.LOWER_X?(this.state=mr.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=mr.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const a=n-r;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(r,a),i),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(lp(i)||eO(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(lp(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===br.SEMI)this.consumed+=1;else if(this.decodeMode===Ji.Strict)return 0;return this.emitCodePoint(XP(this.result),this.consumed),this.errors&&(t!==br.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],a=(i&Ca.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const o=t.charCodeAt(r);if(this.treeIndex=iO(n,i,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===Ji.Attribute&&(a===0||rO(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&Ca.VALUE_LENGTH)>>14,a!==0){if(o===br.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ji.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]&Ca.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]&~Ca.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case mr.NamedEntity:return this.result!==0&&(this.decodeMode!==Ji.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mr.NumericDecimal:return this.emitNumericEntity(0,2);case mr.NumericHex:return this.emitNumericEntity(0,3);case mr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mr.EntityStart:return 0}}}function bw(e){let t="";const r=new nO(e,n=>t+=JP(n));return function(i,a){let o=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(o,s),r.startEntity(a);const c=r.write(i,s+1);if(c<0){o=s+r.end();break}o=s+c,s=c===0?o+1:o}const l=t+i.slice(o);return t="",l}}function iO(e,t,r,n){const i=(t&Ca.BRANCH_LENGTH)>>7,a=t&Ca.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const l=n-a;return l<0||l>=i?-1:e[r+l]-1}let o=r,s=o+i-1;for(;o<=s;){const l=o+s>>>1,c=e[l];if(c<n)o=l+1;else if(c>n)s=l-1;else return e[l+i]}return-1}const _w=bw(WP);bw(QP);function aO(e,t=Ji.Legacy){return _w(e,t)}function oO(e){return _w(e,Ji.Strict)}function sO(e){return Object.prototype.toString.call(e)}function Fm(e){return sO(e)==="[object String]"}const lO=Object.prototype.hasOwnProperty;function uO(e,t){return lO.call(e,t)}function Ud(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 yw(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function Im(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 Wl(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 xw=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,cO=/&([a-z#][a-z0-9]{1,31});/gi,dO=new RegExp(xw.source+"|"+cO.source,"gi"),fO=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function hO(e,t){if(t.charCodeAt(0)===35&&fO.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Im(n)?Wl(n):e}const r=aO(e);return r!==e?r:e}function pO(e){return e.indexOf("\\")<0?e:e.replace(xw,"$1")}function Fs(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(dO,function(t,r,n){return r||hO(t,n)})}const mO=/[&<>"]/,gO=/[&<>"]/g,vO={"&":"&","<":"<",">":">",'"':"""};function bO(e){return vO[e]}function qa(e){return mO.test(e)?e.replace(gO,bO):e}const _O=/[.?*+^$[\]\\(){}|-]/g;function yO(e){return e.replace(_O,"\\$&")}function wt(e){switch(e){case 9:case 32:return!0}return!1}function Ql(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 Sw(e){return $m.test(e)||gw.test(e)}function Yl(e){return Sw(Wl(e))}function Jl(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 qd(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function R1(e){return e===32||e===9||e===10||e===13}function jd(e){let t=0;for(;t<e.length&&R1(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&R1(e.charCodeAt(r));r--);return e.slice(t,r+1)}const xO={mdurl:HP,ucmicro:KP},SO=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:yw,asciiTrim:jd,assign:Ud,escapeHtml:qa,escapeRE:yO,fromCodePoint:Wl,has:uO,isMdAsciiPunct:Jl,isPunctChar:Sw,isPunctCharCode:Yl,isSpace:wt,isString:Fm,isValidEntityCode:Im,isWhiteSpace:Ql,lib:xO,normalizeReference:qd,unescapeAll:Fs,unescapeMd:pO},Symbol.toStringTag,{value:"Module"}));function EO(e,t,r){let n,i,a,o;const s=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<s;){if(a=e.src.charCodeAt(e.pos),a===93&&(n--,n===0)){i=!0;break}if(o=e.pos,e.md.inline.skipToken(e),a===91){if(o===e.pos-1)n++;else if(r)return e.pos=l,-1}}let c=-1;return i&&(c=e.pos),e.pos=l,c}function wO(e,t,r){let n,i=t;const a={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<r;){if(n=e.charCodeAt(i),n===10||n===60)return a;if(n===62)return a.pos=i+1,a.str=Fs(e.slice(t+1,i)),a.ok=!0,a;if(n===92&&i+1<r){i+=2;continue}i++}return a}let o=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&&(o++,o>32))return a;if(n===41){if(o===0)break;o--}i++}return t===i||o!==0||(a.str=Fs(e.slice(t,i)),a.pos=i,a.ok=!0),a}function RO(e,t,r,n){let i,a=t;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)o.str=n.str,o.marker=n.marker;else{if(a>=r)return o;let s=e.charCodeAt(a);if(s!==34&&s!==39&&s!==40)return o;t++,a++,s===40&&(s=41),o.marker=s}for(;a<r;){if(i=e.charCodeAt(a),i===o.marker)return o.pos=a+1,o.str+=Fs(e.slice(t,a)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&a+1<r&&a++,a++}return o.can_continue=!0,o.str+=Fs(e.slice(t,a)),o}const kO=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:wO,parseLinkLabel:EO,parseLinkTitle:RO},Symbol.toStringTag,{value:"Module"})),Oi={};Oi.code_inline=function(e,t,r,n,i){const a=e[t];return"<code"+i.renderAttrs(a)+">"+qa(a.content)+"</code>"};Oi.code_block=function(e,t,r,n,i){const a=e[t];return"<pre"+i.renderAttrs(a)+"><code>"+qa(e[t].content)+`</code></pre>
|
|
4
|
-
`};Oi.fence=function(e,t,r,n,i){const a=e[t],o=a.info?Fs(a.info).trim():"";let s="",l="";if(o){const d=o.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let c;if(r.highlight?c=r.highlight(a.content,s,l)||qa(a.content):c=qa(a.content),c.indexOf("<pre")===0)return c+`
|
|
5
|
-
`;if(o){const d=a.attrIndex("class"),f=a.attrs?a.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)}>${c}</code></pre>
|
|
6
|
-
`}return`<pre><code${i.renderAttrs(a)}>${c}</code></pre>
|
|
7
|
-
`};Oi.image=function(e,t,r,n,i){const a=e[t];return a.attrs[a.attrIndex("alt")][1]=i.renderInlineAsText(a.children,r,n),i.renderToken(e,t,r)};Oi.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
-
`:`<br>
|
|
9
|
-
`};Oi.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
-
`:`<br>
|
|
11
|
-
`:`
|
|
12
|
-
`};Oi.text=function(e,t){return qa(e[t].content)};Oi.html_block=function(e,t){return e[t].content};Oi.html_inline=function(e,t){return e[t].content};function Vs(){this.rules=Ud({},Oi)}Vs.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+qa(t.attrs[r][0])+'="'+qa(t.attrs[r][1])+'"';return i};Vs.prototype.renderToken=function(t,r,n){const i=t[r];let a="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&t[r-1].hidden&&(a+=`
|
|
13
|
-
`),a+=(i.nesting===-1?"</":"<")+i.tag,a+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(a+=" /");let o=!1;if(i.block&&(o=!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)&&(o=!1)}return a+=o?`>
|
|
14
|
-
`:">",a};Vs.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let a=0,o=e.length;a<o;a++){const s=e[a].type;typeof i[s]<"u"?n+=i[s](e,a,t,r,this):n+=this.renderToken(e,a,t)}return n};Vs.prototype.renderInlineAsText=function(e,t,r){let n="";for(let i=0,a=e.length;i<a;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};Vs.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let a=0,o=e.length;a<o;a++){const s=e[a].type;s==="inline"?n+=this.renderInline(e[a].children,t,r):typeof i[s]<"u"?n+=i[s](e,a,t,r,this):n+=this.renderToken(e,a,t,r)}return n};function ln(){this.__rules__=[],this.__cache__=null}ln.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};ln.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))})})};ln.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};ln.prototype.before=function(e,t,r,n){const i=this.__find__(e),a=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:a.alt||[]}),this.__cache__=null};ln.prototype.after=function(e,t,r,n){const i=this.__find__(e),a=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:a.alt||[]}),this.__cache__=null};ln.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};ln.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};ln.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};ln.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};ln.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function ci(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}ci.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};ci.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ci.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};ci.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};ci.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 Ew(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}Ew.prototype.Token=ci;const AO=/\r\n?|\n/g,CO=/\0/g;function DO(e){let t;t=e.src.replace(AO,`
|
|
16
|
-
`),t=t.replace(CO,"�"),e.src=t}function $O(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 FO(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 IO(e){return/^<a[>\s]/i.test(e)}function TO(e){return/^<\/a\s*>/i.test(e)}function NO(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,a=0;for(let o=i.length-1;o>=0;o--){const s=i[o];if(s.type==="link_close"){for(o--;i[o].level!==s.level&&i[o].type!=="link_open";)o--;continue}if(s.type==="html_inline"&&(IO(s.content)&&a>0&&a--,TO(s.content)&&a++),!(a>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let c=e.md.linkify.match(l);const d=[];let f=s.level,h=0;c.length>0&&c[0].index===0&&o>0&&i[o-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const m=c[p].url,b=e.md.normalizeLink(m);if(!e.md.validateLink(b))continue;let _=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(_)?_=e.md.normalizeLinkText("mailto:"+_).replace(/^mailto:/,""):_=e.md.normalizeLinkText(_):_=e.md.normalizeLinkText("http://"+_).replace(/^http:\/\//,"");const x=c[p].index;if(x>h){const C=new e.Token("text","",0);C.content=l.slice(h,x),C.level=f,d.push(C)}const E=new e.Token("link_open","a",1);E.attrs=[["href",b]],E.level=f++,E.markup="linkify",E.info="auto",d.push(E);const k=new e.Token("text","",0);k.content=_,k.level=f,d.push(k);const w=new e.Token("link_close","a",-1);w.level=--f,w.markup="linkify",w.info="auto",d.push(w),h=c[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=yw(i,o,d)}}}}const ww=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,PO=/\((c|tm|r)\)/i,OO=/\((c|tm|r)\)/ig,MO={c:"©",r:"®",tm:"™"};function LO(e,t){return MO[t.toLowerCase()]}function zO(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(OO,LO)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function UO(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&ww.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 qO(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(PO.test(e.tokens[t].content)&&zO(e.tokens[t].children),ww.test(e.tokens[t].content)&&UO(e.tokens[t].children))}const jO=/['"]/,k1=/['"]/g,A1="’";function Qu(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function BO(e,t){let r="",n=0;t.sort((i,a)=>i.pos-a.pos);for(let i=0;i<t.length;i++){const a=t[i];r+=e.slice(n,a.pos)+a.ch,n=a.pos+1}return r+e.slice(n)}function VO(e,t){let r;const n=[],i={};for(let a=0;a<e.length;a++){const o=e[a],s=e[a].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,o.type!=="text")continue;const l=o.content;let c=0;const d=l.length;e:for(;c<d;){k1.lastIndex=c;const f=k1.exec(l);if(!f)break;let h=!0,p=!0;c=f.index+1;const m=f[0]==="'";let b=32;if(f.index-1>=0)b=l.charCodeAt(f.index-1);else for(r=a-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){b=e[r].content.charCodeAt(e[r].content.length-1);break}let _=32;if(c<d)_=l.charCodeAt(c);else for(r=a+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){_=e[r].content.charCodeAt(0);break}const x=Jl(b)||Yl(b),E=Jl(_)||Yl(_),k=Ql(b),w=Ql(_);if(w?h=!1:E&&(k||x||(h=!1)),k?p=!1:x&&(w||E||(p=!1)),_===34&&f[0]==='"'&&b>=48&&b<=57&&(p=h=!1),h&&p&&(h=x,p=E),!h&&!p){m&&Qu(i,a,f.index,A1);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;m?($=t.md.options.quotes[2],A=t.md.options.quotes[3]):($=t.md.options.quotes[0],A=t.md.options.quotes[1]),Qu(i,a,f.index,A),Qu(i,C.token,C.pos,$),n.length=r;continue e}}h?n.push({token:a,pos:f.index,single:m,level:s}):p&&m&&Qu(i,a,f.index,A1)}}Object.keys(i).forEach(function(a){e[a].content=BO(e[a].content,i[a])})}function HO(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!jO.test(e.tokens[t].content)||VO(e.tokens[t].children,e)}function GO(e){let t,r;const n=e.tokens,i=n.length;for(let a=0;a<i;a++){if(n[a].type!=="inline")continue;const o=n[a].children,s=o.length;for(t=0;t<s;t++)o[t].type==="text_special"&&(o[t].type="text");for(t=r=0;t<s;t++)o[t].type==="text"&&t+1<s&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==r&&(o[r]=o[t]),r++);t!==r&&(o.length=r)}}const rh=[["normalize",DO],["block",$O],["inline",FO],["linkify",NO],["replacements",qO],["smartquotes",HO],["text_join",GO]];function Tm(){this.ruler=new ln;for(let e=0;e<rh.length;e++)this.ruler.push(rh[e][0],rh[e][1])}Tm.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};Tm.prototype.State=Ew;function Mi(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 a=0,o=0,s=0,l=0,c=i.length,d=!1;o<c;o++){const f=i.charCodeAt(o);if(!d)if(wt(f)){s++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||o===c-1)&&(f!==10&&o++,this.bMarks.push(a),this.eMarks.push(o),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),d=!1,s=0,l=0,a=o+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}Mi.prototype.push=function(e,t,r){const n=new ci(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};Mi.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Mi.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Mi.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!wt(n))break}return t};Mi.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!wt(this.src.charCodeAt(--t)))return t+1;return t};Mi.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};Mi.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};Mi.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const a=new Array(r-t);for(let o=0,s=t;s<r;s++,o++){let l=0;const c=this.bMarks[s];let d=c,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(wt(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(d-c<this.tShift[s])l++;else break;d++}l>n?a[o]=new Array(l-n+1).join(" ")+this.src.slice(d,f):a[o]=this.src.slice(d,f)}return a.join("")};Mi.prototype.Token=ci;const KO=65536;function nh(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function C1(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),a=!1,o=0,s="";for(;n<r;)i===124&&(a?(s+=e.substring(o,n-1),o=n):(t.push(s+e.substring(o,n)),s="",o=n+1)),a=i===92,n++,i=e.charCodeAt(n);return t.push(s+e.substring(o)),t}function WO(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 a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;const o=e.src.charCodeAt(a++);if(o!==124&&o!==45&&o!==58||a>=e.eMarks[i])return!1;const s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58&&!wt(s)||o===45&&wt(s))return!1;for(;a<e.eMarks[i];){const w=e.src.charCodeAt(a);if(w!==124&&w!==45&&w!==58&&!wt(w))return!1;a++}let l=nh(e,t+1),c=l.split("|");const d=[];for(let w=0;w<c.length;w++){const C=c[w].trim();if(!C){if(w===0||w===c.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=nh(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=C1(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const f=c.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),b=[t,0];m.map=b;const _=e.push("thead_open","thead",1);_.map=[t,t+1];const x=e.push("tr_open","tr",1);x.map=[t,t+1];for(let w=0;w<c.length;w++){const C=e.push("th_open","th",1);d[w]&&(C.attrs=[["style","text-align:"+d[w]]]);const $=e.push("inline","",0);$.content=c[w].trim(),$.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let E,k=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let w=!1;for(let $=0,A=p.length;$<A;$++)if(p[$](e,i,r,!0)){w=!0;break}if(w||(l=nh(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(c=C1(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),k+=f-c.length,k>KO))break;if(i===t+2){const $=e.push("tbody_open","tbody",1);$.map=E=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[i,i+1];for(let $=0;$<f;$++){const A=e.push("td_open","td",1);d[$]&&(A.attrs=[["style","text-align:"+d[$]]]);const F=e.push("inline","",0);F.content=c[$]?c[$].trim():"",F.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return E&&(e.push("tbody_close","tbody",-1),E[1]=i),e.push("table_close","table",-1),b[1]=i,e.parentType=h,e.line=i,!0}function QO(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 a=e.push("code_block","code",0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
17
|
-
`,a.map=[t,e.line],!0}function YO(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;const o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let l=i-s;if(l<3)return!1;const c=e.src.slice(s,i),d=e.src.slice(i,a);if(o===96&&d.indexOf(String.fromCharCode(o))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=s=e.bMarks[f]+e.tShift[f],a=e.eMarks[f],i<a&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<l)&&(i=e.skipSpaces(i),!(i<a)))){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=c,p.map=[t,e.line],!0}function JO(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];const o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const s=[],l=[],c=[],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 k=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!k){let C=e.sCount[m]+1,$,A;e.src.charCodeAt(i)===32?(i++,C++,A=!1,$=!0):e.src.charCodeAt(i)===9?($=!0,(e.bsCount[m]+C)%4===3?(i++,C++,A=!1):A=!0):$=!1;let F=C;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){const N=e.src.charCodeAt(i);if(wt(N))N===9?F+=4-(F+e.bsCount[m]+(A?1:0))%4:F++;else break;i++}p=i>=a,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+($?1:0),c.push(e.sCount[m]),e.sCount[m]=F-C,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let w=!1;for(let C=0,$=f.length;C<$;C++)if(f[C](e,m,r,!0)){w=!0;break}if(w){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),c.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]),c.push(e.sCount[m]),e.sCount[m]=-1}const b=e.blkIndent;e.blkIndent=0;const _=e.push("blockquote_open","blockquote",1);_.markup=">";const x=[t,0];_.map=x,e.md.block.tokenize(e,t,m);const E=e.push("blockquote_close","blockquote",-1);E.markup=">",e.lineMax=o,e.parentType=h,x[1]=e.line;for(let k=0;k<d.length;k++)e.bMarks[k+t]=s[k],e.tShift[k+t]=d[k],e.sCount[k+t]=c[k],e.bsCount[k+t]=l[k];return e.blkIndent=b,!0}function XO(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){const c=e.src.charCodeAt(a++);if(c!==o&&!wt(c))return!1;c===o&&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(o)),!0}function D1(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 a=e.src.charCodeAt(n);if(!wt(a))return-1}return n}function $1(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=n)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-r>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<n&&(a=e.src.charCodeAt(i),!wt(a))?-1:i}function ZO(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 e8(e,t,r,n){let i,a,o,s,l=t,c=!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=$1(e,l))>=0){if(f=!0,o=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(o,p-1)),d&&h!==1)return!1}else if((p=D1(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),b=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 _=[l,0];s.map=_,s.markup=String.fromCharCode(m);let x=!1;const E=e.md.block.ruler.getRules("list"),k=e.parentType;for(e.parentType="list";l<r;){a=p,i=e.eMarks[l];const w=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let C=w;for(;a<i;){const V=e.src.charCodeAt(a);if(V===9)C+=4-(C+e.bsCount[l])%4;else if(V===32)C++;else break;a++}const $=a;let A;$>=i?A=1:A=C-w,A>4&&(A=1);const F=w+A;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[l,0];s.map=N,f&&(s.info=e.src.slice(o,p-1));const O=e.tight,L=e.tShift[l],q=e.sCount[l],K=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=F,e.tight=!0,e.tShift[l]=$-e.bMarks[l],e.sCount[l]=C,$>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,l,r,!0),(!e.tight||x)&&(c=!1),x=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=K,e.tShift[l]=L,e.sCount[l]=q,e.tight=O,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 re=!1;for(let V=0,Y=E.length;V<Y;V++)if(E[V](e,l,r,!0)){re=!0;break}if(re)break;if(f){if(p=$1(e,l),p<0)break;o=e.bMarks[l]+e.tShift[l]}else if(p=D1(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),_[1]=l,e.line=l,e.parentType=k,c&&ZO(e,b),!0}function t8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(E){const k=e.lineMax;if(E>=k||e.isEmpty(E))return null;let w=!1;if(e.sCount[E]-e.blkIndent>3&&(w=!0),e.sCount[E]<0&&(w=!0),!w){const A=e.md.block.ruler.getRules("reference"),F=e.parentType;e.parentType="reference";let N=!1;for(let O=0,L=A.length;O<L;O++)if(A[O](e,E,k,!0)){N=!0;break}if(e.parentType=F,N)return null}const C=e.bMarks[E]+e.tShift[E],$=e.eMarks[E];return e.src.slice(C,$+1)}let l=e.src.slice(i,a+1);a=l.length;let c=-1;for(i=1;i<a;i++){const E=l.charCodeAt(i);if(E===91)return!1;if(E===93){c=i;break}else if(E===10){const k=s(o);k!==null&&(l+=k,a=l.length,o++)}else if(E===92&&(i++,i<a&&l.charCodeAt(i)===10)){const k=s(o);k!==null&&(l+=k,a=l.length,o++)}}if(c<0||l.charCodeAt(c+1)!==58)return!1;for(i=c+2;i<a;i++){const E=l.charCodeAt(i);if(E===10){const k=s(o);k!==null&&(l+=k,a=l.length,o++)}else if(!wt(E))break}const d=e.md.helpers.parseLinkDestination(l,i,a);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=o,m=i;for(;i<a;i++){const E=l.charCodeAt(i);if(E===10){const k=s(o);k!==null&&(l+=k,a=l.length,o++)}else if(!wt(E))break}let b=e.md.helpers.parseLinkTitle(l,i,a);for(;b.can_continue;){const E=s(o);if(E===null)break;l+=E,i=a,a=l.length,o++,b=e.md.helpers.parseLinkTitle(l,i,a,b)}let _;for(i<a&&m!==i&&b.ok?(_=b.str,i=b.pos):(_="",i=h,o=p);i<a;){const E=l.charCodeAt(i);if(!wt(E))break;i++}if(i<a&&l.charCodeAt(i)!==10&&_)for(_="",i=h,o=p;i<a;){const E=l.charCodeAt(i);if(!wt(E))break;i++}if(i<a&&l.charCodeAt(i)!==10)return!1;const x=qd(l.slice(1,c));return x?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[x]>"u"&&(e.env.references[x]={title:_,href:f}),e.line=o),!0):!1}const r8=["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"],n8="[a-zA-Z_:][a-zA-Z0-9:._-]*",i8="[^\"'=<>`\\x00-\\x20]+",a8="'[^']*'",o8='"[^"]*"',s8="(?:"+i8+"|"+a8+"|"+o8+")",l8="(?:\\s+"+n8+"(?:\\s*=\\s*"+s8+")?)",Rw="<[A-Za-z][A-Za-z0-9\\-]*"+l8+"*\\s*\\/?>",kw="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",u8="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",c8="<[?][\\s\\S]*?[?]>",d8="<![A-Za-z][^>]*>",f8="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",h8=new RegExp("^(?:"+Rw+"|"+kw+"|"+u8+"|"+c8+"|"+d8+"|"+f8+")"),p8=new RegExp("^(?:"+Rw+"|"+kw+")"),oo=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r8.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(p8.source+"\\s*$"),/^$/,!1]];function m8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<oo.length&&!oo[s][0].test(o);s++);if(s===oo.length)return!1;if(n)return oo[s][2];let l=t+1;const c=oo[s][1].test("");if(!oo[s][1].test(o)){for(;l<r&&!(e.sCount[l]<e.blkIndent&&(c||!e.isEmpty(l)));l++)if(i=e.bMarks[l]+e.tShift[l],a=e.eMarks[l],o=e.src.slice(i,a),oo[s][1].test(o)){o.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 g8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!wt(o))return!1;if(n)return!0;a=e.skipSpacesBack(a,i);const l=e.skipCharsBack(a,35,i);l>i&&wt(e.src.charCodeAt(l-1))&&(a=l),e.line=t+1;const c=e.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[t,e.line];const d=e.push("inline","",0);d.content=jd(e.src.slice(i,a)),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 v8(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 a=0,o,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&&(o=e.src.charCodeAt(p),(o===45||o===61)&&(p=e.skipChars(p,o),p=e.skipSpaces(p),p>=m))){a=o===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(!a)return e.parentType=i,!1;const l=jd(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;const c=e.push("heading_open","h"+String(a),1);c.markup=String.fromCharCode(o),c.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(a),-1);return f.markup=String.fromCharCode(o),e.parentType=i,!0}function b8(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let a=t+1;for(e.parentType="paragraph";a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let c=!1;for(let d=0,f=n.length;d<f;d++)if(n[d](e,a,r,!0)){c=!0;break}if(c)break}const o=jd(e.getLines(t,a,e.blkIndent,!1));e.line=a;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=o,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const Yu=[["table",WO,["paragraph","reference"]],["code",QO],["fence",YO,["paragraph","reference","blockquote","list"]],["blockquote",JO,["paragraph","reference","blockquote","list"]],["hr",XO,["paragraph","reference","blockquote","list"]],["list",e8,["paragraph","reference","blockquote"]],["reference",t8],["html_block",m8,["paragraph","reference","blockquote"]],["heading",g8,["paragraph","reference","blockquote"]],["lheading",v8],["paragraph",b8]];function Bd(){this.ruler=new ln;for(let e=0;e<Yu.length;e++)this.ruler.push(Yu[e][0],Yu[e][1],{alt:(Yu[e][2]||[]).slice()})}Bd.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,a=e.md.options.maxNesting;let o=t,s=!1;for(;o<r&&(e.line=o=e.skipEmptyLines(o),!(o>=r||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=r;break}const l=e.line;let c=!1;for(let d=0;d<i;d++)if(c=n[d](e,o,r,!1),c){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<r&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}};Bd.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)};Bd.prototype.State=Mi;function Su(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}Su.prototype.pushPending=function(){const e=new ci("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Su.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new ci(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};Su.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 _=this.src.charCodeAt(e-2);i=(_&64512)===55296?65536+(_-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let a=e;for(;a<r&&this.src.charCodeAt(a)===n;)a++;const o=a-e;let s=a<r?this.src.charCodeAt(a):32;if((s&64512)===55296){const _=this.src.charCodeAt(a+1);s=(_&64512)===56320?65536+(s-55296<<10)+(_-56320):65533}else(s&64512)===56320&&(s=65533);const l=Jl(i)||Yl(i),c=Jl(s)||Yl(s),d=Ql(i),f=Ql(s),h=!f&&(!c||d||l),p=!d&&(!l||f||c);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||c),length:o}};Su.prototype.Token=ci;function _8(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 y8(e,t){let r=e.pos;for(;r<e.posMax&&!_8(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const x8=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function S8(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(x8);if(!i)return!1;const a=i[1],o=e.md.linkify.matchAtStart(e.src.slice(r-a.length));if(!o)return!1;let s=o.url;if(s.length<=a.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 c=e.md.normalizeLink(s);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);const d=e.push("link_open","a",1);d.attrs=[["href",c]],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-a.length,!0}function E8(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 a=n-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),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&&wt(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const Nm=[];for(let e=0;e<256;e++)Nm.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Nm[e.charCodeAt(0)]=1});function w8(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),!!wt(i));)r++;return e.pos=r,!0}let a=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const s=e.src.charCodeAt(r+1);s>=56320&&s<=57343&&(a+=e.src[r+1],r++)}const o="\\"+a;if(!t){const s=e.push("text_special","",0);i<256&&Nm[i]!==0?s.content=a:s.content=o,s.markup=o,s.info="escape"}return e.pos=r+1,!0}function R8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const a=e.posMax;for(;r<a&&e.src.charCodeAt(r)===96;)r++;const o=e.src.slice(i,r),s=o.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=o),e.pos+=s,!0;let l=r,c;for(;(c=e.src.indexOf("`",l))!==-1;){for(l=c+1;l<a&&e.src.charCodeAt(l)===96;)l++;const d=l-c;if(d===s){if(!t){const f=e.push("code_inline","code",0);f.markup=o,f.content=e.src.slice(r,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=c}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=s,!0}function k8(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 a=i.length;const o=String.fromCharCode(n);if(a<2)return!1;let s;a%2&&(s=e.push("text","",0),s.content=o,a--);for(let l=0;l<a;l+=2)s=e.push("text","",0),s.content=o+o,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 F1(e,t){let r;const n=[],i=t.length;for(let a=0;a<i;a++){const o=t[a];if(o.marker!==126||o.end===-1)continue;const s=t[o.end];r=e.tokens[o.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 a=n.pop();let o=a+1;for(;o<e.tokens.length&&e.tokens[o].type==="s_close";)o++;o--,a!==o&&(r=e.tokens[o],e.tokens[o]=e.tokens[a],e.tokens[a]=r)}}function A8(e){const t=e.tokens_meta,r=e.tokens_meta.length;F1(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&F1(e,t[n].delimiters)}const Aw={tokenize:k8,postProcess:A8};function C8(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 a=0;a<i.length;a++){const o=e.push("text","",0);o.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 I1(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 a=t[i.end],o=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===a.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?s+s:s,l.content="";const c=e.tokens[a.token];c.type=o?"strong_close":"em_close",c.tag=o?"strong":"em",c.nesting=-1,c.markup=o?s+s:s,c.content="",o&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function D8(e){const t=e.tokens_meta,r=e.tokens_meta.length;I1(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&I1(e,t[n].delimiters)}const Cw={tokenize:C8,postProcess:D8};function $8(e,t){let r,n,i,a,o="",s="",l=e.pos,c=!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(c=!1,m++;m<f&&(r=e.src.charCodeAt(m),!(!wt(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(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o="",l=m;m<f&&(r=e.src.charCodeAt(m),!(!wt(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),!(!wt(r)&&r!==10));m++);}(m>=f||e.src.charCodeAt(m)!==41)&&(c=!0),m++}if(c){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)),a=e.env.references[qd(n)],!a)return e.pos=d,!1;o=a.href,s=a.title}if(!t){e.pos=h,e.posMax=p;const b=e.push("link_open","a",1),_=[["href",o]];b.attrs=_,s&&_.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 F8(e,t){let r,n,i,a,o,s,l,c,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(a=m+1,a<h&&e.src.charCodeAt(a)===40){for(a++;a<h&&(r=e.src.charCodeAt(a),!(!wt(r)&&r!==10));a++);if(a>=h)return!1;for(c=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(d=e.md.normalizeLink(s.str),e.md.validateLink(d)?a=s.pos:d=""),c=a;a<h&&(r=e.src.charCodeAt(a),!(!wt(r)&&r!==10));a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<h&&c!==a&&s.ok)for(l=s.str,a=s.pos;a<h&&(r=e.src.charCodeAt(a),!(!wt(r)&&r!==10));a++);else l="";if(a>=h||e.src.charCodeAt(a)!==41)return e.pos=f,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a<h&&e.src.charCodeAt(a)===91?(c=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(c,a++):a=m+1):a=m+1,i||(i=e.src.slice(p,m)),o=e.env.references[qd(i)],!o)return e.pos=f,!1;d=o.href,l=o.title}if(!t){n=e.src.slice(p,m);const b=[];e.md.inline.parse(n,e.md,e.env,b);const _=e.push("image","img",0),x=[["src",d],["alt",""]];_.attrs=x,_.children=b,_.content=n,l&&x.push(["title",l])}return e.pos=a,e.posMax=h,!0}const I8=/^([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])?)*)$/,T8=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function N8(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 o=e.src.charCodeAt(r);if(o===60)return!1;if(o===62)break}const a=e.src.slice(n+1,r);if(T8.test(a)){const o=e.md.normalizeLink(a);if(!e.md.validateLink(o))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",o]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=a.length+2,!0}if(I8.test(a)){const o=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(o))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",o]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(a);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=a.length+2,!0}return!1}function P8(e){return/^<a[>\s]/i.test(e)}function O8(e){return/^<\/a\s*>/i.test(e)}function M8(e){const t=e|32;return t>=97&&t<=122}function L8(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&&!M8(i))return!1;const a=e.src.slice(n).match(h8);if(!a)return!1;if(!t){const o=e.push("html_inline","",0);o.content=a[0],P8(o.content)&&e.linkLevel++,O8(o.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}const z8=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,U8=/^&([a-z][a-z0-9]{1,31});/i;function q8(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 a=e.src.slice(r).match(z8);if(a){if(!t){const o=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),s=e.push("text_special","",0);s.content=Im(o)?Wl(o):Wl(65533),s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}else{const a=e.src.slice(r).match(U8);if(a){const o=oO(a[0]);if(o!==a[0]){if(!t){const s=e.push("text_special","",0);s.content=o,s.markup=a[0],s.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function T1(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const a=[];for(let o=0;o<r;o++){const s=e[o];if(a.push(0),(e[n].marker!==s.marker||i!==s.token-1)&&(n=o),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 c=n-a[n]-1,d=c;for(;c>l;c-=a[c]+1){const f=e[c];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=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+p,a[c]=p,s.open=!1,f.end=o,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function j8(e){const t=e.tokens_meta,r=e.tokens_meta.length;T1(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&T1(t[n].delimiters)}function B8(e){let t,r,n=0;const i=e.tokens,a=e.tokens.length;for(t=r=0;t<a;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<a&&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 ih=[["text",y8],["linkify",S8],["newline",E8],["escape",w8],["backticks",R8],["strikethrough",Aw.tokenize],["emphasis",Cw.tokenize],["link",$8],["image",F8],["autolink",N8],["html_inline",L8],["entity",q8]],ah=[["balance_pairs",j8],["strikethrough",Aw.postProcess],["emphasis",Cw.postProcess],["fragments_join",B8]];function Eu(){this.ruler=new ln;for(let e=0;e<ih.length;e++)this.ruler.push(ih[e][0],ih[e][1]);this.ruler2=new ln;for(let e=0;e<ah.length;e++)this.ruler2.push(ah[e][0],ah[e][1])}Eu.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,a=e.cache;if(typeof a[t]<"u"){e.pos=a[t];return}let o=!1;if(e.level<i){for(let s=0;s<n;s++)if(e.level++,o=r[s](e,!0),e.level--,o){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos};Eu.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 a=e.pos;let o=!1;if(e.level<i){for(let s=0;s<r;s++)if(o=t[s](e,!1),o){if(a>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Eu.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const a=this.ruler2.getRules(""),o=a.length;for(let s=0;s<o;s++)a[s](i)};Eu.prototype.State=Su;function V8(e){const t={};e=e||{},t.src_Any=pw.source,t.src_Cc=mw.source,t.src_Z=vw.source,t.src_P=$m.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 up(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function Vd(e){return Object.prototype.toString.call(e)}function H8(e){return Vd(e)==="[object String]"}function G8(e){return Vd(e)==="[object Object]"}function K8(e){return Vd(e)==="[object RegExp]"}function N1(e){return Vd(e)==="[object Function]"}function W8(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Dw={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Q8(e){return Object.keys(e||{}).reduce(function(t,r){return t||Dw.hasOwnProperty(r)},!1)}const Y8={"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}}},J8="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]",X8="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Z8(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function P1(){return function(e,t){t.normalize(e)}}function nd(e){const t=e.re=V8(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(J8),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 a(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 c={validate:null,link:null};if(e.__compiled__[s]=c,G8(l)){K8(l.validate)?c.validate=Z8(l.validate):N1(l.validate)?c.validate=l.validate:a(s,l),N1(l.normalize)?c.normalize=l.normalize:l.normalize?a(s,l):c.normalize=P1();return}if(H8(l)){i.push(s);return}a(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:P1()};const o=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(W8).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+o+")","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 $w(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 Rn(e,t){if(!(this instanceof Rn))return new Rn(e,t);t||Q8(e)&&(t=e,e={}),this.__opts__=up({},Dw,t),this.__schemas__=up({},Y8,e),this.__compiled__={},this.__tlds__=X8,this.__tlds_replaced__=!1,this.re={},nd(this)}Rn.prototype.add=function(t,r){return this.__schemas__[t]=r,nd(this),this};Rn.prototype.set=function(t){return this.__opts__=up(this.__opts__,t),this};Rn.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)};Rn.prototype.pretest=function(t){return this.re.pretest.test(t)};Rn.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};Rn.prototype.match=function(t){const r=[],n=[],i=[],a=[];let o,s,l;function c(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;(o=l.exec(t))!==null;)s=this.testSchemaAt(t,o[2],l.lastIndex),s&&n.push({schema:o[2],index:o.index+o[1].length,lastIndex:o.index+o[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;(o=l.exec(t))!==null;)i.push({schema:"",index:o.index+o[1].length,lastIndex:o.index+o[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(o=l.exec(t))!==null;)a.push({schema:"mailto:",index:o.index+o[1].length,lastIndex:o.index+o[0].length});const d=[0,0,0];let f=0;for(;;){const h=[n[d[0]],a[d[1]],i[d[2]]],p=c(c(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 $w(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};Rn.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 $w(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};Rn.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,a){return n!==a[i-1]}).reverse(),nd(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,nd(this),this)};Rn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Rn.prototype.onCompile=function(){};const _s=2147483647,Si=36,Pm=1,Xl=26,e5=38,t5=700,Fw=72,Iw=128,Tw="-",r5=/^xn--/,n5=/[^\0-\x7F]/,i5=/[\x2E\u3002\uFF0E\uFF61]/g,a5={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},oh=Si-Pm,Ei=Math.floor,sh=String.fromCharCode;function xa(e){throw new RangeError(a5[e])}function o5(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function Nw(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(i5,".");const i=e.split("."),a=o5(i,t).join(".");return n+a}function Pw(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 a=e.charCodeAt(r++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const s5=e=>String.fromCodePoint(...e),l5=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Si},O1=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ow=function(e,t,r){let n=0;for(e=r?Ei(e/t5):e>>1,e+=Ei(e/t);e>oh*Xl>>1;n+=Si)e=Ei(e/oh);return Ei(n+(oh+1)*e/(e+e5))},Mw=function(e){const t=[],r=e.length;let n=0,i=Iw,a=Fw,o=e.lastIndexOf(Tw);o<0&&(o=0);for(let s=0;s<o;++s)e.charCodeAt(s)>=128&&xa("not-basic"),t.push(e.charCodeAt(s));for(let s=o>0?o+1:0;s<r;){const l=n;for(let d=1,f=Si;;f+=Si){s>=r&&xa("invalid-input");const h=l5(e.charCodeAt(s++));h>=Si&&xa("invalid-input"),h>Ei((_s-n)/d)&&xa("overflow"),n+=h*d;const p=f<=a?Pm:f>=a+Xl?Xl:f-a;if(h<p)break;const m=Si-p;d>Ei(_s/m)&&xa("overflow"),d*=m}const c=t.length+1;a=Ow(n-l,c,l==0),Ei(n/c)>_s-i&&xa("overflow"),i+=Ei(n/c),n%=c,t.splice(n++,0,i)}return String.fromCodePoint(...t)},Lw=function(e){const t=[];e=Pw(e);const r=e.length;let n=Iw,i=0,a=Fw;for(const l of e)l<128&&t.push(sh(l));const o=t.length;let s=o;for(o&&t.push(Tw);s<r;){let l=_s;for(const d of e)d>=n&&d<l&&(l=d);const c=s+1;l-n>Ei((_s-i)/c)&&xa("overflow"),i+=(l-n)*c,n=l;for(const d of e)if(d<n&&++i>_s&&xa("overflow"),d===n){let f=i;for(let h=Si;;h+=Si){const p=h<=a?Pm:h>=a+Xl?Xl:h-a;if(f<p)break;const m=f-p,b=Si-p;t.push(sh(O1(p+m%b,0))),f=Ei(m/b)}t.push(sh(O1(f,0))),a=Ow(i,c,s===o),i=0,++s}++i,++n}return t.join("")},u5=function(e){return Nw(e,function(t){return r5.test(t)?Mw(t.slice(4).toLowerCase()):t})},c5=function(e){return Nw(e,function(t){return n5.test(t)?"xn--"+Lw(t):t})},zw={version:"2.3.1",ucs2:{decode:Pw,encode:s5},decode:Mw,encode:Lw,toASCII:c5,toUnicode:u5},d5={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},f5={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"]}}},h5={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"]}}},p5={default:d5,zero:f5,commonmark:h5},m5=/^(vbscript|javascript|file|data):/,g5=/^data:image\/(gif|png|jpeg|webp);/;function v5(e){const t=e.trim().toLowerCase();return m5.test(t)?g5.test(t):!0}const Uw=["http:","https:","mailto:"];function b5(e){const t=Dm(e,!0);if(t.hostname&&(!t.protocol||Uw.indexOf(t.protocol)>=0))try{t.hostname=zw.toASCII(t.hostname)}catch{}return xu(Cm(t))}function _5(e){const t=Dm(e,!0);if(t.hostname&&(!t.protocol||Uw.indexOf(t.protocol)>=0))try{t.hostname=zw.toUnicode(t.hostname)}catch{}return $s(Cm(t),$s.defaultChars+"%")}function Bn(e,t){if(!(this instanceof Bn))return new Bn(e,t);t||Fm(e)||(t=e||{},e="default"),this.inline=new Eu,this.block=new Bd,this.core=new Tm,this.renderer=new Vs,this.linkify=new Rn,this.validateLink=v5,this.normalizeLink=b5,this.normalizeLinkText=_5,this.utils=SO,this.helpers=Ud({},kO),this.options={},this.configure(e),t&&this.set(t)}Bn.prototype.set=function(e){return Ud(this.options,e),this};Bn.prototype.configure=function(e){const t=this;if(Fm(e)){const r=e;if(e=p5[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};Bn.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};Bn.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};Bn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Bn.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};Bn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Bn.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};Bn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function ar(e){return"var("+e+")"}let y5=y([u("color",ar(v.textPrimary)),u("font-size",ar(R.sizeSm)),u("line-height",ar(R.lineHeightRelaxed)),u("word-break","break-word"),jt("& > :first-child",[u("margin-top","0")]),jt("& > :last-child",[u("margin-bottom","0")]),jt("& h1, & h2, & h3, & h4, & h5, & h6",[u("margin","var("+I.md+") 0 var("+I.sm+")"),u("line-height",ar(R.lineHeightTight)),u("font-weight",ar(R.weightBold))]),jt("& h1",[u("font-size",ar(R.sizeXl))]),jt("& h2",[u("font-size",ar(R.sizeLg))]),jt("& h3, & h4, & h5, & h6",[u("font-size",ar(R.sizeMd))]),jt("& p",[u("margin","var("+I.sm+") 0")]),jt("& a",[u("color",ar(v.brand)),u("text-decoration","none")]),jt("& a:hover",[u("text-decoration","underline")]),jt("& ul, & ol",[u("margin","var("+I.sm+") 0"),u("padding-left","1.5em")]),jt("& li",[u("margin","var("+I.xs+") 0")]),jt("& code",[u("font-family",ar(R.fontFamilyMono)),u("font-size","0.9em"),u("background",ar(v.surfaceSubtle)),u("padding","1px 4px"),u("border-radius",ar(H.sm))]),jt("& pre",[u("background",ar(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",ar(H.md)),u("padding",ar(I.md)),u("overflow","auto"),u("margin","var("+I.sm+") 0")]),jt("& pre code",[u("background","none"),u("padding","0")]),jt("& blockquote",[u("margin","var("+I.sm+") 0"),u("padding-left",ar(I.md)),u("border-left","3px solid var("+v.border+")"),u("color",ar(v.textSecondary))]),jt("& table",[u("border-collapse","collapse"),u("margin","var("+I.sm+") 0")]),jt("& th, & td",[u("border","1px solid var("+v.borderSubtle+")"),u("padding","var("+I.xs+") var("+I.sm+")"),u("text-align","left")]),jt("& th",[u("background",ar(v.surfaceSubtle)),u("font-weight",ar(R.weightMedium))]),jt("& img",[u("max-width","100%"),u("border-radius",ar(H.sm))]),jt("& hr",[u("border","none"),u("border-top","1px solid var("+v.borderSubtle+")"),u("margin","var("+I.md+") 0")])]),x5=new Bn({html:!1,linkify:!0});function S5(e){let t=e.source,r=xt(()=>x5.render(t),[t]),n=Ke(null);return Re(()=>{Q(Fi(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(a=>{a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer")})})},[r]),g("div",{ref:Wt(n),className:y5,dangerouslySetInnerHTML:{__html:r}})}let qw=S5;function E5(e,t){return g(qw,{source:e.body})}function w5(){lw({id:"markdown",label:"Markdown",constraints:{},preview:E5})}function ys(e){return Array.from(e).length}function Om(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 jw(e,t){return S(t,r=>{let i=Om(e,r)[1];if(i!=="")return i})}function Ft(e){return"var("+e+")"}let R5=y([M("flex"),ce("column"),u("gap","4px")]),M1=y([u("background",Ft(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Ft(H.sm)),u("padding","var("+I.xs+") var("+I.sm+")"),u("font-family","inherit"),u("font-size",Ft(R.sizeMd)),u("line-height",Ft(R.lineHeightNormal)),u("color",Ft(v.textPrimary)),u("outline","none"),u("resize","vertical"),aa({NAME:"percent",VAL:100}),u("box-sizing","border-box"),u("transition","border-color 120ms"),Ja([u("border-color",Ft(v.brand))])]),k5=y([u("border-color",Ft(v.error)),Ja([u("border-color",Ft(v.error))])]),A5=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",Ft(I.sm)),u("font-size",Ft(R.sizeXs)),u("color",Ft(v.textSecondary))]),C5=y([M("inlineFlex"),W("center"),u("gap","4px"),u("color",Ft(v.textSecondary))]),L1=y([u("font-variant-numeric","tabular-nums")]),D5=y([u("color",Ft(v.error)),u("font-weight",Ft(R.weightMedium))]),$5=y([u("background",Ft(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-left","3px solid var("+v.error+")"),u("border-radius",Ft(H.sm)),u("padding","var("+I.xs+") var("+I.sm+")"),u("font-size",Ft(R.sizeXs)),u("line-height",Ft(R.lineHeightNormal)),u("white-space","pre-wrap"),u("word-break","break-word"),u("max-height","8em"),u("overflow","auto")]),F5=y([u("color",Ft(v.textSecondary)),u("font-size",Ft(R.sizeXs)),Ld(pe(2))]),I5=y([u("color",Ft(v.textPrimary))]),T5=y([u("color",Ft(v.error)),u("font-weight",Ft(R.weightMedium))]),N5=y([u("color",Ft(v.textDisabled)),u("text-decoration","line-through")]);function Bw(e){return e.toString()+" character"+(e===1?"":"s")}function Vw(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 P5(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,a=e.maxLength,o=e.onBlur,s=e.onChange,l=e.value,c=o!==void 0?o:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=jw(l,a),m=He(p),b=f||m?M1+" "+k5:M1,_;if(p!==void 0&&a!==void 0){let x=Om(l,a);_=P("div",{children:[g("div",{children:"Sent as:",className:F5}),P("div",{children:[g("span",{children:x[0],className:I5}),g("span",{children:"✂",className:T5}),g("span",{children:p,className:N5})],className:$5})]})}else _=null;return P("div",{children:[g("textarea",{className:b,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:x=>c(),onChange:x=>s(x.target.value)}),P("div",{children:[P("span",{children:[i!==void 0?i:null,t!==void 0?He(i)?" · "+t:t:null],className:C5}),g("span",{children:Vw(h,a),className:m?L1+" "+D5:L1})],className:A5}),_],className:R5})}let O5=P5;NP();w5();function vt(e){return"var("+e+")"}let M5=y([M("flex"),ce("column"),u("gap",vt(I.sm)),u("background",vt(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",vt(H.md)),u("padding",vt(I.md))]),L5=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",vt(I.sm))]),z5=y([u("font-size",vt(R.sizeSm)),u("font-weight",vt(R.weightMedium)),u("color",vt(v.textPrimary))]),U5=y([u("font-size",vt(R.sizeXs)),u("color",vt(v.textSecondary))]),Ju=y([u("font-size",vt(R.sizeXs)),u("color",vt(v.textSecondary)),u("font-variant-numeric","tabular-nums"),u("white-space","nowrap")]),z1=y([u("color",vt(v.error)),u("font-weight",vt(R.weightMedium))]),q5=y([M("flex"),W("baseline"),Ve("spaceBetween"),u("gap",vt(I.sm)),u("border-bottom","1px solid var("+v.borderSubtle+")"),u("padding-bottom",vt(I.xs))]),j5=y([u("font-size",vt(R.sizeMd)),u("font-weight",vt(R.weightMedium)),u("color",vt(v.textPrimary)),u("word-break","break-word")]),B5=y([u("color",vt(v.textDisabled)),u("text-decoration","line-through")]),V5=y([u("color",vt(v.error)),u("font-weight",vt(R.weightMedium))]),H5=y([u("margin","0"),u("font-family","inherit"),u("font-size",vt(R.sizeSm)),u("line-height",vt(R.lineHeightRelaxed)),u("color",vt(v.textPrimary)),u("white-space","pre-wrap"),u("word-break","break-word")]),G5=y([u("max-width","100%"),u("border-radius",vt(H.sm)),u("border","1px solid var("+v.borderSubtle+")"),u("object-fit","cover")]),K5=y([u("font-size",vt(R.sizeXs)),u("color",vt(v.error)),u("background",vt(v.surfaceSubtle)),u("border-left","3px solid var("+v.error+")"),u("border-radius",vt(H.sm)),u("padding","var("+I.xs+") var("+I.sm+")")]);function U1(e,t){let r=Om(e,t),n=r[1];return n===""?e:P(jr,{children:[r[0],g("span",{children:"✂",className:V5}),g("span",{children:n,className:B5})]})}function W5(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,a=uw(n);Re(()=>{jn(a)&&gP(n,"ChannelPreview")},[n]);let o=oe(a,n,x=>x.label),s=oe(a,cw,x=>x.constraints),l=ys(r.body),c=jw(r.body,s.maxLength),d=r.subject,f;if(d!==void 0){let x=s.subjectMaxLength,E=ys(d),k=oe(x,!1,w=>E>w);f=P("div",{children:[g("span",{children:x!==void 0?U1(d,x):d,className:j5}),x!==void 0?g("span",{children:E.toString()+" / "+x.toString(),className:k?Ju+" "+z1:Ju}):null],className:q5})}else f=null;let h=S(a,x=>x.preview),p;if(h!==void 0)p=h(r,s);else{let x=s.maxLength;p=g("pre",{children:x!==void 0?U1(r.body,x):r.body,className:H5})}let m=r.imageUrl,b;if(m!==void 0){let x=s.mediaAspect;b=g("img",{className:G5,style:x!==void 0?kP({},"aspectRatio",x):{},alt:"Message media",src:Cs(m)})}else b=null;let _=s.note;return P("div",{children:[i?P("div",{children:[g("span",{children:o,className:z5}),g("span",{children:Vw(l,s.maxLength),className:He(c)?Ju+" "+z1:Ju})],className:L5}):null,f,p,c!==void 0?g("div",{children:Bw(ys(c))+" past the limit — "+o+" will cut the tail.",className:K5}):null,b,_!==void 0?g("span",{children:_,className:U5}):null],className:M5})}let Q5=W5;function Pt(e){return"var("+e+")"}let cp=y([u("color",Pt(v.brand)),u("text-decoration","none"),We([u("text-decoration","underline")])]),Y5=y([M("inlineBlock"),u("width","12px"),u("height","12px"),u("border-radius","3px"),u("border","1px solid var("+v.border+")"),u("vertical-align","-1px")]),Hs=y([M("inlineFlex"),W("center"),u("gap","6px")]),J5=y([u("height","24px"),u("width","24px"),u("object-fit","cover"),u("border-radius",Pt(H.sm)),u("border","1px solid var("+v.borderSubtle+")"),u("vertical-align","middle")]),X5=y([u("max-height","160px"),u("max-width","240px"),u("object-fit","cover"),u("border-radius",Pt(H.md)),u("border","1px solid var("+v.borderSubtle+")"),xe("zoomIn")]),Z5=y([u("color",Pt(v.error)),u("font-size",Pt(R.sizeXs)),u("font-weight",Pt(R.weightMedium)),u("white-space","nowrap"),gu(pe(6))]),eM=y([M("inlineBlock"),u("background",Pt(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius","3px"),u("color",Pt(v.textSecondary)),u("font-size",Pt(R.sizeXs)),u("font-weight",Pt(R.weightMedium)),u("letter-spacing","0.03em"),u("padding","1px 4px"),u("line-height","1.2")]),tM=y([M("inlineBlock"),u("background",Pt(v.surfaceSubtle)),u("border-radius",Pt(H.full)),u("width","64px"),u("height","6px"),Lo("hidden")]);function rM(e){return y([u("background",Pt(v.brand)),u("border-radius",Pt(H.full)),u("height","100%"),u("width",e.toString()+"%")])}let Hw=y([u("color",Pt(v.textSecondary)),u("font-size",Pt(R.sizeXs)),u("font-variant-numeric","tabular-nums")]),nM=y([u("width","220px"),u("max-width","100%")]),iM=y([M("flex"),ce("column"),u("gap","1px"),u("line-height","1.35")]),aM=y([u("background","none"),u("border","none"),u("padding","0"),xe("zoomIn")]),oM=y([M("flex"),ce("column"),u("gap",Pt(I.xs)),u("width","100%")]),sM=y([u("background","none"),u("border","none"),u("padding","0"),u("color",Pt(v.textSecondary)),u("font-size",Pt(R.sizeXs)),u("text-decoration","underline"),xe("pointer"),We([u("color",Pt(v.brand))])]),lM=y([M("flex"),ce("column"),W("flexStart"),u("gap","6px")]),uM=y([u("color",Pt(v.textSecondary)),u("font-family",Pt(R.fontFamilyMono)),u("font-size",Pt(R.sizeXs))]),cM=y([M("inlineBlock"),u("background","#ffffff"),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Pt(H.md)),u("padding","4px"),u("line-height","0")]),dM=y([u("display","block"),u("max-width","260px"),u("height","auto")]);function wu(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function Gw(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),a=D(n[1],"00"),o=s=>{let l=s.length;return l<=3?s:o(s.slice(0,l-3|0))+","+s.slice(l-3|0)};return(t?"-":"")+o(i)+"."+a}function Kw(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function Ww(e){let t=["B","KB","MB","GB","TB","PB"],n=((s,l)=>{for(;;){let c=l,d=s;if(!(d>=1024&&c<(t.length-1|0)))return[d,c];l=c+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],a=n[0];return(i===0?Math.round(a).toString():(Math.round(a*10)/10).toString())+" "+t[i]}function Qw(e){let t=e<0?0:Math.floor(e)|0,r=t/86400|0,n=t%86400/3600|0,i=t%3600/60|0,a=t%60;return r>0?r.toString()+"d "+n.toString()+"h":n>0?n.toString()+"h "+i.toString()+"m":i>0?i.toString()+"m "+a.toString()+"s":a.toString()+"s"}function fM(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 hM(e,t){return rt(t,e,(r,n)=>D(r.split(n)[0],r))}function q1(e){let r=hM(e,["?","#"]).split("/").filter(a=>a!==""),n=D(r[r.length-1|0],""),i;try{i=decodeURIComponent(n)}catch{i=n}return i===""?"file":i}function pM(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 Mm(e){return/^[A-Za-z]{2}$/.test(e)}function Yw(e){if(Mm(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let j1={contents:void 0};function mM(){let e=j1.contents;if(e!==void 0)return Ot(e);let t;try{t=Wt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return j1.contents=Wt(t),t}function Lm(e){if(!Mm(e))return e;let t=mM();if(t===void 0)return e;try{let r=Ot(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let gM=["street","streetaddress","line1","addressline1","address1"],vM=["line2","addressline2","address2","apartment","unit","suite"],bM=["postalcode","zip","zipcode","postcode"],_M=["city","town","locality"],yM=["state","region","province","county"],xM=["country","countrycode"];function SM(e){let t=Be(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 Jw(e){let t=Be(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0.split(`
|
|
18
|
-
`).map(c=>c.trim()).filter(c=>c!=="");return r.length===0?void 0:r;case"JSONObject":let n=ze(t._0),i=c=>S(n.find(d=>c.includes(d[0].toLowerCase())),d=>SM(d[1])),a=i(bM),o=i(_M),s=a!==void 0?o!==void 0?a+" "+o:a:o!==void 0?o:void 0,l=ee([i(gM),i(vM),s,i(yM),i(xM)],c=>c).map(c=>c.trim()).filter(c=>c!=="");return l.length===0?void 0:l;default:return}}function EM(e){return B(Jw(e),t=>t.map(r=>Mm(r)?Lm(r):r).join(", "))}function wM(e){let t=Yw(e);return t!==void 0?t+" "+Lm(e):e}function Xu(e){return oe(B(Kl(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function B1(e,t){let r=Kl(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let zm={};function lr(e,t){zm[yu(e)]=t}function RM(e){return T(zm,yu(e))}function Ru(e,t){return S(wm(e,t),r=>T(zm,yu(r.semantic)))}function kM(e,t,r){return S(Ru(e,t),n=>n.cell(e,t,r))}function V1(e,t,r){return S(Ru(e,t),n=>n.detail(e,t,r))}function AM(e,t){return oe(Ru(e,t),!1,r=>He(r.input))}function CM(e,t,r,n,i,a,o){return B(S(Ru(e,t),s=>s.input),s=>s(e,t,r,n,i,a,o))}function DM(e,t,r,n){return S(S(Ru(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function id(e){e.stopPropagation()}function ad(e,t,r){return r?g("a",{children:t,className:cp,href:e,rel:"noopener noreferrer",target:"_blank",onClick:id}):g("a",{children:t,className:cp,href:e,onClick:id})}function Vr(e){return S(ne(e),t=>{if(t!=="")return t})}function Um(e){let t=(r,n,i)=>B(Vr(i),e);return{cell:t,detail:t}}function Hd(e){let t=(r,n,i)=>B(Ti(i),a=>e(a));return{cell:t,detail:t}}lr("Email",Um(e=>ad("mailto:"+e,e,!1)));lr("Phone",Um(e=>ad("tel:"+e,e,!1)));lr("Url",{cell:(e,t,r)=>B(Vr(r),n=>ad(n,wu(n,40),!0)),detail:(e,t,r)=>B(Vr(r),n=>ad(n,n,!0))});lr("Currency",Hd(Gw));lr("Percent",Hd(Kw));lr("Bytes",Hd(Ww));lr("Duration",Hd(Qw));lr("Color",Um(e=>P("span",{children:[g("span",{className:Y5,style:{background:e}}),e],className:Hs})));function $M(e){let t=e.alt,r=e.src,n=X(()=>!1),i=n[1];return P(jr,{children:[g("button",{children:g("img",{className:X5,alt:t,src:r}),className:aM,title:"Click to enlarge",onClick:a=>{a.stopPropagation(),i(o=>!0)}}),n[0]?g(iw,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:a=>{},onClose:()=>i(a=>!1)}):null]})}lr("Image",{cell:(e,t,r)=>B(Vr(r),n=>g("img",{className:J5,alt:e,src:Cs(n),onClick:id})),detail:(e,t,r)=>B(Vr(r),n=>g($M,{src:Cs(n),alt:e}))});function FM(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 IM(e){return P("span",{children:[g(vu,{name:e,size:"Small"}),e],className:Hs})}function H1(e,t,r){return S(Vr(r),n=>{if(!FM(n))return IM(n)})}lr("UserRef",{cell:H1,detail:H1});lr("Markdown",{cell:(e,t,r)=>B(Vr(r),n=>wu(fM(n),80)),detail:(e,t,r)=>B(Vr(r),n=>g(qw,{source:n}))});lr("Rating",{cell:(e,t,r)=>B(Ti(r),n=>g(eh,{value:n,max:Xu(t)})),detail:(e,t,r)=>B(Ti(r),n=>g(eh,{value:n,max:Xu(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,a,o)=>g(eh,{value:D(Ua(r),0),max:Xu(t),size:"Medium",showValue:!0,onChange:s=>n(s<=0?"":s.toString()),onBlur:i,hasError:o}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=Ua(r);if(i===void 0)return"Invalid rating";let a=Xu(t);if(i<0||i>a)return"Must be between 0 and "+a.toString()}});function TM(e){return e<0?0:e>100?100:e}lr("Progress",{cell:(e,t,r)=>B(Ti(r),n=>{let i=TM(B1(t,n));return P("span",{children:[g("span",{children:g("span",{className:rM(i)}),className:tM}),g("span",{children:Math.round(i).toString()+"%",className:Hw})],className:Hs})}),detail:(e,t,r)=>B(Ti(r),n=>g("div",{children:g(sw,{value:B1(t,n)}),className:nM}))});function Xw(e,t){let r=Cs(e),n=pM(t);return P("span",{children:[n!==void 0?g("span",{children:n,className:eM}):null,g("a",{children:t,className:cp,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:id})],className:Hs})}function NM(e){let t=e.name,r=e.href,n=X(()=>!1),i=n[1],a=n[0];return P("span",{children:[P("span",{children:[Xw(r,t),Y4(r)?g("button",{children:a?"Hide preview":"Preview","aria-expanded":a,className:sM,type:"button",onClick:o=>{o.stopPropagation(),i(s=>!s)}}):null],className:Hs}),a?g(X4,{src:Cs(r),title:t,height:"60vh"}):null],className:oM})}lr("FileUrl",{cell:(e,t,r)=>B(Vr(r),n=>Xw(n,wu(q1(n),40))),detail:(e,t,r)=>B(Vr(r),n=>g(NM,{href:n,name:q1(n)}))});function PM(e){let t=Yw(e);return t!==void 0?P("span",{children:[g("span",{children:t,"aria-hidden":!0}),Lm(e)],className:Hs}):e}function G1(e,t,r){return B(Vr(r),PM)}lr("Country",{cell:G1,detail:G1});lr("Address",{cell:(e,t,r)=>B(EM(r),n=>wu(n,60)),detail:(e,t,r)=>B(Jw(r),n=>g("span",{children:n.map((i,a)=>g("span",{children:wM(i)},a.toString())),className:iM}))});function OM(e){return B(S(S(j(e),t=>T(t,"maxLength")),Ti),t=>t|0)}function lh(e){let t=S($o(e).channel,n=>mP(n).maxLength),r=OM(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}lr("ChannelText",{cell:(e,t,r)=>B(Vr(r),n=>{let i=S(lh(t),a=>{if(ys(n)>a)return ys(n)-a|0});return P("span",{children:[wu(n,80),i!==void 0?g("span",{children:i.toString()+" over",className:Z5}):null]})}),detail:(e,t,r)=>{let n=Vr(r),i=$o(t).channel;if(n!==void 0&&i!==void 0)return g(Q5,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,a,o)=>{let s=S($o(t).channel,uw);return g(O5,{value:r,onChange:n,onBlur:i,maxLength:lh(t),channelLabel:B(s,l=>l.label),hasError:o,note:S(s,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":S(lh(t),i=>{let a=ys(r);if(a>i)return Bw(a-i|0)+" over the "+i.toString()+"-character limit"})});lr("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>B(Vr(r),n=>P("span",{children:[g(M4,{value:n}),g("span",{children:n,className:uM})],className:lM}))});lr("Signature",{cell:(e,t,r)=>S(Vr(r),n=>{if(g1(n))return g("span",{children:"✓ Signed",className:Hw})}),detail:(e,t,r)=>S(Vr(r),n=>{if(g1(n))return g("span",{children:g("img",{className:dM,alt:"Signature",src:hw(n)}),className:cM})}),input:(e,t,r,n,i,a,o)=>g(RP,{value:r,onChange:n,onBlur:i,hasError:o}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function Zl(e){return"var("+e+")"}let MM=y([M("inlineFlex"),W("center"),li("wrap"),u("gap","4px"),u("font-size",Zl(R.sizeSm)),u("min-width","0")]),LM=y([u("color",Zl(v.textDisabled)),u("font-size",Zl(R.sizeXs))]),zM=y([u("color",Zl(v.brand)),u("text-decoration","none"),We([u("text-decoration","underline")])]),UM=y([u("color",Zl(v.textPrimary))]);function qM(e){let t=e.segments,r=Qa();return g("span",{children:t.map((n,i)=>{let a=i===(t.length-1|0),o=n.href;return P(im,{children:[o!==void 0?g("a",{children:n.label,className:zM,href:o,onClick:s=>{if(!(s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.button!==0))return s.preventDefault(),s.stopPropagation(),r(o)}}):g("span",{children:n.label,className:UM}),a?null:g("span",{children:" › ",className:LM})]},i.toString()+":"+n.label)}),className:MM})}let jM=qM;function K1(e){return S(S(j(e),t=>T(t,"type")),ne)}function qm(e){return S(S(j(e),t=>T(t,"format")),ne)}function BM(e){return S(j(e),t=>T(t,"items"))}function W1(e){return He(S(S(j(e),t=>T(t,"properties")),j))}function Zw(e){let t=j(e);if(t===void 0)return e;let r=T(t,"type"),n=T(t,"properties");return r!==void 0||n!==void 0?e:D(B(rt(["anyOf","oneOf","allOf"],void 0,(i,a)=>i!==void 0?i:S(S(T(t,a),St),o=>o.find(s=>um(S(S(j(s),l=>T(l,"type")),ne),"null")))),Zw),e)}function dp(e){let t=e.toLowerCase(),r=e.length,n=a=>{let o=a.length;if(r>o&&t.endsWith(a))return e.slice(0,r-o|0)},i=n("ids");return i!==void 0?i:n("id")}function VM(e,t,r){let n=Zw(t);if(e==="compositeId")return"KCompositeId";let i=_u(n);if(i!==void 0)return{TAG:"KEnum",_0:i};let a=K1(n),o=0;if(a!==void 0)switch(a){case"array":let s=BM(n);if(s===void 0)return"KArrayOfStrings";if(W1(s)||tt(K1(s),"object"))return{TAG:"KArrayOfObjects",_0:s};let l=dp(e);return l!==void 0?{TAG:"KArrayOfEntityIds",_0:l}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return W1(n)?{TAG:"KNestedObject",_0:n}:"KString";default:o=1}else o=1;if(o===1){let s=qm(n),l=0;if(s!==void 0)switch(s){case"date":case"date-time":return"KDate";default:l=2}else l=2;if(l===2){if(r.isId)return"KString";let c=dp(e);return c!==void 0?{TAG:"KEntityId",_0:c}:"KString"}}}function HM(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function GM(e,t,r){return t.isCompositeId?!0:r.includes(e)}function KM(e,t,r,n,i){return t.hidden||HM(e)||n&&GM(e,t,i)?!1:r?t.summary||t.isId||e==="compositeId"?!0:n?!1:e==="id":!(n&&e==="id")}function WM(e,t,r){if(e==="compositeId"||r.isId)return 0;if(e==="id")return 1;if(r.summary)return 2;if(typeof t!="object")switch(t){case"KBoolean":return 7;case"KCompositeId":return 0;case"KDate":return 4;case"KNumber":return 8;case"KString":return 5;case"KArrayOfStrings":return 11}else switch(t.TAG){case"KEnum":return 6;case"KEntityId":return 9;case"KArrayOfEntityIds":return 10;case"KArrayOfObjects":return 12;case"KNestedObject":return 13}}function QM(e,t){if(typeof e!="object")switch(e){case"KBoolean":return"80px";case"KCompositeId":return"260px";case"KNumber":return"100px";case"KString":return t==="id"?"220px":void 0;case"KDate":case"KArrayOfStrings":return"180px"}else switch(e.TAG){case"KEnum":return"140px";case"KEntityId":return"220px";case"KArrayOfEntityIds":return"260px";case"KArrayOfObjects":case"KNestedObject":return"240px"}}function Mn(e,t){let r=t!==void 0?t:"List",n=D(B(S(S(j(e),c=>T(c,"properties")),j),ze),[]),i=_m(e),a=r==="List"&&i.length!==0,o=ym(e),s=o.length!==0||n.some(c=>c[0]==="compositeId");return ee(n,c=>{let d=c[1],f=c[0],h=$o(d);if(!KM(f,h,a,s,o))return;let p=VM(f,d,h),m=D(S(S(j(d),b=>T(b,"title")),ne),ct(f));return{key:f,label:m,kind:p,ann:h,propSchema:d,priority:WM(f,p,h),width:QM(p,f)}}).toSorted((c,d)=>c.priority-d.priority|0)}function YM(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function eR(e){return g(La,{variant:"Neutral",label:e,dot:!1})}function Q1(e,t,r,n,i){let a=oa(r,e);return a===void 0?[void 0,t]:(i!==void 0?i.pluginId===a.pluginId&&i.viewName===a.name:!1)?[void 0,t]:[ta(a.pluginId,a.name,t,[]),t]}function Y1(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 od(e,t,r){let n=oa(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function fp(e,t,r,n,i,a,o,s,l){let c=l!==void 0?l:!1,d=od(t,n,o),f=D(s,WN(t)),h=b=>{let _=Q1(t,b,n,i,o),x=_[1],E=d?[x,!1]:Y1(t,x,a),k=E[0],w=g(kN,{href:_[0],label:k,rawValue:x}),C=f&&k!==x?P("span",{children:[g(vu,{name:k,size:"Small"}),w],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):w;return E[1]?g("span",{children:C,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+x+")"}):C},p=b=>{let _=ee(b,x=>{let k=Q1(t,x,n,i,o)[1],C=Y1(t,k,a)[0];if(C!==k)return{name:C}});if(c&&f&&!d&&b.length>=2&&_.length===b.length)return g(ON,{members:_,size:"Small"})},m=Be(r);if(typeof m!="object")return JSON.stringify(r);switch(m.TAG){case"JSONString":return h(m._0);case"JSONArray":let b=m._0,_=ee(b,ne),x=_.length===b.length?p(_):void 0;return x!==void 0?x:g("span",{children:b.map((E,k)=>{let w=Be(E);return typeof w!="object"||w.TAG!=="JSONString"?null:P("span",{children:[h(w._0),k<(b.length-1|0)?", ":null]},k.toString())})});default:return JSON.stringify(r)}}function JM(e){let t=Be(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 g(jM,{segments:r})}function ei(e,t,r){let n=Be(r);if(typeof n!="object")switch(n){case"JSONFalse":return g(La,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return g(La,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,a=LE(e,i);if(t===void 0)return a!==void 0?a:i;switch(t){case"date":case"date-time":return bm(i);default:return a!==void 0?a:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function J1(e,t){let r=j(t);if(r===void 0)return;let n=T(r,"name");if(n!==void 0&&Be(n)!=="JSONNull")return ei("name",void 0,n);let i=Mn(e,"Drill"),a=ee(i,d=>{let f=d.kind,h;if(typeof f!="object")h=f!=="KArrayOfStrings";else switch(f.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":h=!1;break;default:h=!0}let p=T(r,d.key);if(!h||p===void 0)return;let m=Be(p);if(!(typeof m!="object"&&m==="JSONNull"))return[d,p]});if(a.length===0)return;let o=a.slice(0,2),s=i.length-o.length|0,l=o.map((d,f)=>{let h=d[1],p=d[0],m=p.kind,b;if(typeof m!="object")b=m==="KDate"?ei(p.key,qm(p.propSchema),h):ei(p.key,void 0,h);else if(m.TAG==="KEnum"){let _=Be(h);b=typeof _!="object"||_.TAG!=="JSONString"?ei(p.key,void 0,h):eR(_._0)}else b=ei(p.key,void 0,h);return P("span",{children:[f>0?" · ":null,b]},f.toString())}),c=s>0?g("span",{children:"+"+s.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return P("span",{children:[l,c],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function xo(e,t,r,n,i,a,o,s,l){let c=i!==void 0?i:zE;if(n===void 0)return"—";let d=kM(e,r,n);if(d!==void 0)return d;if(typeof t!="object")switch(t){case"KCompositeId":return JM(n);case"KDate":return ei(e,qm(r),n);case"KBoolean":case"KNumber":return ei(e,void 0,n);case"KString":let h=Be(n);if(typeof h!="object"||h.TAG!=="JSONString")return ei(e,void 0,n);let p=h._0;return p.length>60?g("span",{children:YM(p,60),title:p}):ei(e,void 0,n);case"KArrayOfStrings":let m=D(B(St(n),b=>ee(b,ne)),[]);return g(OE,{items:m})}else switch(t.TAG){case"KEnum":let h=Be(n);return typeof h!="object"||h.TAG!=="JSONString"?ei(e,void 0,n):eR(h._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let p=t._0,m=D(St(n),[]),b=m.length;if(c.collapsed){let w=m[0];return w!==void 0?X1(p,w,a,o,s,l):g(Fl,{count:b,label:"items"})}let _=S(m[0],w=>J1(p,w));return _!==void 0?P("span",{children:[_,b>1?g("span",{children:"+"+(b-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):g(Fl,{count:b,label:"items"});case"KNestedObject":let x=t._0;if(c.collapsed)return X1(x,n,a,o,s,l);let E=J1(x,n);if(E!==void 0)return E;let k=D(B(j(n),w=>Object.keys(w).length),0);return g(Fl,{count:k,label:"fields"})}let f=oe(wm(e,r),!1,h=>h.semantic==="UserRef");return fp(e,t._0,n,a,o,s,l,f?!0:void 0,!0)}function X1(e,t,r,n,i,a){let o=D(j(t),{}),s=Mn(e,"Drill").filter(l=>{let c=l.kind;if(typeof c!="object")return!0;switch(c.TAG){case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}});return g("div",{children:s.map(l=>P("div",{children:[g("span",{children:l.label,style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),g("span",{children:xo(l.key,l.kind,l.propSchema,T(o,l.key),l.ann,r,n,i,a)})],style:{display:"flex",alignItems:"baseline",gap:"6px"}},l.key)),style:{display:"flex",maxHeight:"120px",overflow:"auto",flexDirection:"column",gap:"2px"}})}function XM(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}}function ZM(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function Z1(e,t,r,n){let i=oa(r,e);if(i===void 0)return n;let a=i.name.endsWith("s");return t?a?i.name:i.name+"s":a?i.name.slice(0,i.name.length-1|0):i.name}function eL(e,t,r,n,i,a,o){return e.map(s=>{let l=s.kind,c;if(typeof l!="object")c=s.label;else switch(l.TAG){case"KEntityId":let d=l._0;c=od(d,t,o)?s.label:Z1(d,!1,t,s.label);break;case"KArrayOfEntityIds":let f=l._0;c=od(f,t,o)?s.label:Z1(f,!0,t,s.label);break;default:c=s.label}return{key:s.key,label:c,render:d=>xo(s.key,s.kind,s.propSchema,n(d,s.key),s.ann,t,r,a,o),sortable:XM(s.kind),width:s.width}})}let tR=Mt(void 0),tL=tR.Provider;function rL(e){return Kt(tL,{value:e.execute,children:e.children})}let nL={make:rL};function Gn(){return bt(tR)}let iL={};function Gd(e,t,r,n){return S(oa(r,t),i=>S(T(e,i.queryField),a=>T(a.labels,n)))}function Kd(e,t,r,n){let i=oa(r,t);if(i===void 0)return!1;let a=T(e,i.queryField);return a!==void 0&&a.loaded?jn(T(a.labels,n)):!1}function aL(e){let t=Be(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return ee(t._0,ne).filter(n=>n!=="");default:return[]}}function oL(e,t,r){let n={};return t.forEach(i=>{let a=i.kind;if(typeof a!="object")return;switch(a.TAG){case"KEntityId":case"KArrayOfEntityIds":break;default:return}let o=oa(r,a._0);if(o===void 0)return;let s=o.queryField,c={contents:D(T(n,s),[])};e.forEach(d=>{let f=T(d,i.key);if(f!==void 0){aL(f).forEach(h=>{if(!c.contents.some(p=>p===h)){c.contents.push(h);return}});return}}),n[s]=c.contents}),n}function sL(e){return ze(e).toSorted((r,n)=>Vl(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(Vl).join(",")).join("|")}function lL(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 rR(e,t,r){let n={},i=j(e),a=D(S(S(i,l=>T(l,"data")),j),{}),o=T(a,t),s=o!==void 0?o:S(i,l=>T(l,t));return D(S(S(S(s,j),l=>T(l,"edges")),St),[]).forEach(l=>{let c=S(S(j(l),m=>T(m,"node")),j);if(c===void 0)return;let d=S(T(c,"id"),ne),f=D(S(T(c,r),ne),"");if(d===void 0)return;let h=lL(d),p=r==="id"?h!==void 0?h:d:f===""?d:f;if(n[d]=p,h!==void 0){n[h]=p;return}}),n}function Wd(e,t,r){let n=Gn(),i=X(()=>iL),a=i[1],o=oL(e,t,r),s=sL(o);return Re(()=>{let l={contents:!1};return s!==""&&n!==void 0&&ze(o).forEach(c=>{let d=c[1];if(d.length===0)return;let f=c[0],h=r.find(x=>x.queryField===f);if(h===void 0)return;let p=h.labelField,m=p==="id"?"id":"id "+p,b="query($ids: [ID!]) { "+f+"(first: "+d.length.toString()+", filter: {ids: $ids}) { edges { node { "+m+" } } } }",_={};_.ids=d.map(x=>x),yt(n(b,_).then(x=>{if(!l.contents){let E=rR(x,f,p);a(k=>{let w=it(ze(k));return w[f]={loaded:!0,labels:E},w})}return Promise.resolve()}),x=>(l.contents||(console.warn("[AutoUI] RefLabel batch "+f+" failed; cells fall back to raw ids",x),a(E=>{let k=it(ze(E));return k[f]={loaded:!0,labels:{}},k})),Promise.resolve()))}),()=>{l.contents=!0}},[s,n]),i[0]}let ra="table",wa={contents:[]};function Xa(e){wa.contents.some(t=>t.id===e.id)?wa.contents=wa.contents.map(t=>t.id===e.id?e:t):wa.contents=wa.contents.concat([e])}function nR(e){return wa.contents.find(t=>t.id===e)}function sd(){return wa.contents}function jm(e){let t=wa.contents.filter(r=>{let n=r.arity;return typeof n!="object"||n.TAG==="Multi"?r.isCapable(e):!1});return t.filter(r=>r.id===ra).concat(t.filter(r=>r.id!==ra))}function Bm(e){try{return Fi(localStorage.getItem(e))}catch{return}}function iR(e,t){try{return localStorage.setItem(e,t)}catch{return}}function aR(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+oe(r,"",n=>"."+n)}function Da(e){return"var("+e+")"}let oR=y([M("inlineFlex"),W("center"),u("border","1px solid var("+v.border+")"),u("border-radius",Da(H.md)),u("overflow","hidden")]),Vm=y([M("inlineFlex"),W("center"),u("gap","4px"),u("background","none"),u("border","none"),u("padding","2px var("+I.sm+")"),u("color",Da(v.textSecondary)),u("font-size",Da(R.sizeSm)),xe("pointer"),We([u("background",Da(v.surfaceSubtle)),u("color",Da(v.textPrimary))])]),sR=cn([Vm,y([u("background",Da(v.surfaceSubtle)),u("color",Da(v.textPrimary)),u("font-weight",Da(R.weightMedium))])]),uL={group:oR,btn:Vm,btnActive:sR};function cL(e){let t=e.onSelect,r=e.activeId;return g("div",{children:e.modes.map(n=>P("button",{children:[n.icon,g("span",{children:n.label})],className:n.id===r?sR:Vm,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:oR,role:"group"})}let Sl={Style:uL,make:cL};function dL(e){let t=e.source,r=zo(),n=$d(),i=Mn(t.schema,"List"),a=t.rows.map((f,h)=>{let p=D(j(f),{});return{rowKey:D(S(T(p,"id"),ne),"#"+h.toString()),json:f,dict:p}}),o=Wd(a.map(f=>f.dict),i,r),c={lookupLabel:(f,h)=>Gd(o,f,r,h),isMissing:(f,h)=>Kd(o,f,r,h)},d=i.map(f=>({key:f.key,label:f.label,render:h=>xo(f.key,f.kind,f.propSchema,T(h.dict,f.key),f.ann,r,n,c,void 0),sortable:!1,width:f.width}));return g(Zc,{columns:d,data:a,keyFn:f=>f.rowKey,onRowClick:f=>t.onOpenRow(f.rowKey,f.json)})}let fL=g("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});Xa({id:ra,label:"Table",icon:fL,arity:"Single",isCapable:e=>!0,render:e=>{let t=e[0];return t!==void 0?g(dL,{source:t}):null},capability:"always — the universal default"});let e_=["resources","events"],t_=["split","full"],r_=["funnel","scatter"],lR={};function Ai(e,t){return S(e.views,r=>T(r,t))}function ja(e,t){return S(e.fields,r=>T(r,t))}function Vn(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function On(e,t,r){let n=e[t];if(n===void 0)return;let i=le.string(n);if(i!==void 0)return i;Vn(r+"."+t,"expected a string — dropped")}function hL(e,t,r){let n=e[t];if(n===void 0)return;let i=le.bool(n);if(i!==void 0)return i;Vn(r+"."+t,"expected a boolean — dropped")}function pL(e,t,r){let n=e[t];if(n===void 0)return;let i=le.array(n);if(i!==void 0)return ee(i,le.string);Vn(r+"."+t,"expected an array of strings — dropped")}function n_(e,t,r,n){let i=e[t];if(i===void 0)return;let a=le.object(i);if(a!==void 0){let o={};return Object.entries(a).forEach(s=>{let l=s[0];Q(n(s[1],r+"."+t+'["'+l+'"]'),c=>{o[l]=c})}),o}Vn(r+"."+t,"expected an object — dropped")}function uR(e,t){let r=le.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let a=i[0],o=le.string(i[1]);if(o!==void 0){n[a]=o;return}else return Vn(t+"."+a,"expected a string — dropped")}),n}Vn(t,"expected an object of string values — dropped")}function mL(e,t){let r=le.object(e);if(r!==void 0){let n=r.transitions;return{mode:On(r,"mode",t),layout:On(r,"layout",t),canvas:On(r,"canvas",t),role:On(r,"role",t),resourceRef:On(r,"resourceRef",t),accent:On(r,"accent",t),audit:hL(r,"audit",t),suppress:pL(r,"suppress",t),transitions:n!==void 0?uR(n,t+".transitions"):void 0}}Vn(t,"expected an object — dropped")}function gL(e,t){let r=le.object(e);if(r!==void 0){let n=On(r,"view",t);if(n!==void 0)return{view:n,label:On(r,"label",t),field:On(r,"field",t),aggregate:On(r,"aggregate",t),viz:On(r,"viz",t),xField:On(r,"xField",t)};Vn(t,"metric without a `view` — dropped");return}Vn(t,"expected an object — dropped")}function vL(e,t){let r=e!==void 0?e:"ui-hints",n=le.object(t);if(n!==void 0){let i=n.dashboard,a;if(i!==void 0){let o=le.array(i);o!==void 0?a=z$(o,(s,l)=>gL(s,r+".dashboard["+l.toString()+"]")):(Vn(r+".dashboard","expected an array of metrics — dropped"),a=void 0)}else a=void 0;return{views:n_(n,"views",r,mL),fields:n_(n,"fields",r,uR),dashboard:a}}return Vn(r,"expected an object — no hints applied"),lR}function bL(e){let t=le.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=vL('ui-hints["'+i+'"]',n[1])}),r}return Vn("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function _L(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];He(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function cs(e){return D(B(S(S(j(e),t=>T(t,"properties")),j),t=>Object.keys(t)),[])}function yL(e,t){return S(S(S(S(S(j(e),r=>T(r,"properties")),j),r=>T(r,t)),j),r=>T(r,"items"))}function uh(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(o=>o.name===n),a=i!==void 0?i.schema:B(e.stateViewSlices.find(o=>o.name===n),o=>o.schema);return a!==void 0?rt(r.slice(1),{TAG:"Ok",_0:{schema:a}},(o,s)=>{if(o.TAG!=="Ok")return o;let l=o._0.schema,c=yL(l,s);return c!==void 0?{TAG:"Ok",_0:{schema:c}}:cs(l).includes(s)?oe(S(S(S(j(l),d=>T(d,"properties")),j),d=>T(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(o=>o.name).concat(e.stateViewSlices.map(o=>o.name)).join(", ")}}function xL(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 cR(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.statusField:S(e.stateViewSlices.find(n=>n.name===t),n=>n.statusField)}function SL(e,t,r){let n=tE(cR(e,t),Tr(r,void 0).statusField);return n!==void 0?ui(r,n):[]}function EL(e){return dn(e).filter(t=>za(t[1])).map(t=>t[0])}function i_(e,t){if(nR(e)!==void 0)return;let n=sd().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function wL(e,t){let r=[],n=i=>{r.push("[AutoUI] uiHints ("+t.id+"): "+i)};return Q(e.views,i=>{ze(i).forEach(a=>{let o=a[1],s=a[0],l=uh(t,s);l.TAG!=="Ok"&&n('views["'+s+'"]: '+l._0),Q(o.role,c=>{if(!e_.includes(c))return n('views["'+s+'"].role: unknown role "'+c+'" — expected '+e_.join(" or "));if(c!=="events")return;let d=o.resourceRef;return d!==void 0?l.TAG==="Ok"&&!cs(l._0.schema).includes(d)?n('views["'+s+'"].resourceRef: unknown field "'+d+'"'):void 0:n('views["'+s+'"]: role "events" requires a resourceRef field')}),Q(o.resourceRef,c=>{if(um(o.role,"events"))return n('views["'+s+'"].resourceRef: only meaningful with role "events"')}),Q(o.transitions,c=>{let d=xL(t),f=cR(t,s),h;h=l.TAG==="Ok"?f!==void 0?ui(l._0.schema,f):[]:[],h.length===0&&n('views["'+s+'"].transitions: the view declares no status enum, so no transition can apply'),ze(c).forEach(p=>{let m=p[1],b=p[0];if(d.includes(m)||n('views["'+s+'"].transitions["'+b+'"]: unknown command "'+m+'" — known commands: '+d.join(", ")),h.length!==0&&!h.includes(b))return n('views["'+s+'"].transitions: unknown target state "'+b+'" — known states: '+h.join(", "))})}),Q(o.mode,c=>Q(i_(c,'views["'+s+'"].mode'),n)),Q(o.layout,c=>{if(!t_.includes(c))return n('views["'+s+'"].layout: unknown layout "'+c+'" — expected '+t_.join(" or "))}),Q(o.suppress,c=>{c.forEach(d=>{if(Q(i_(d,'views["'+s+'"].suppress'),n),d===ra)return n('views["'+s+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),Q(e.fields,i=>{ze(i).forEach(a=>{let o=a[0],s=uh(t,o);if(s.TAG!=="Ok")return n('fields["'+o+'"]: '+s._0);let l=cs(s._0.schema);ze(a[1]).forEach(c=>{let d=c[1],f=c[0];if(l.includes(f)||n('fields["'+o+'"]: unknown field "'+f+'"'),jn(Sm(d)))return n('fields["'+o+'"].'+f+': unknown semantic "'+d+'"')})})}),Q(e.dashboard,i=>{i.forEach(a=>{let o=D(a.aggregate,"count");["count","sum","avg"].includes(o)?o!=="count"&&jn(a.field)&&n('dashboard metric on "'+a.view+'": aggregate "'+o+'" requires a field'):n('dashboard metric on "'+a.view+'": unknown aggregate "'+o+'" — expected count, sum, or avg');let s=uh(t,a.view);if(s.TAG!=="Ok")return n("dashboard metric: "+s._0);let l=s._0.schema;Q(a.field,c=>{if(!cs(l).includes(c))return n('dashboard metric on "'+a.view+'": unknown field "'+c+'"')}),Q(a.xField,c=>{if(!cs(l).includes(c))return n('dashboard metric on "'+a.view+'": unknown xField "'+c+'"')}),Q(a.viz,c=>{if(!r_.includes(c))return n('dashboard metric on "'+a.view+'": unknown viz "'+c+'" — expected '+r_.join(", "));if(c==="funnel"&&SL(t,a.view,l).length===0)return n('dashboard metric on "'+a.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(c!=="scatter")return;let d=a.field,f=a.xField;if(d!==void 0&&f!==void 0){let h=cs(l),p=EL(l);[["field",d],["xField",f]].forEach(m=>{let b=m[1];if(h.includes(b)&&!p.includes(b))return n('dashboard metric on "'+a.view+'": viz "scatter" '+m[0]+' "'+b+'" is not a numeric field')});return}n('dashboard metric on "'+a.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),r.forEach(i=>{console.error(i)}),r}function dR(e,t){let r=jm(e),n=S(t,i=>i.suppress);return n!==void 0?r.filter(i=>i.id===ra?!0:!n.includes(i.id)):r}function fR(e,t,r,n){let i=l=>S(l,c=>n.find(d=>d.id===c)),a=i(e);if(a!==void 0)return a;let o=i(S(t,l=>l.mode));if(o!==void 0)return o;let s=i(r);return s!==void 0?s:n[0]}function ch(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function RL(e,t,r,n){if(!n)return"Full";let i=S(e,ch);if(i!==void 0)return i;let a=S(S(t,o=>o.layout),ch);return a!==void 0?a:D(S(r,ch),"Full")}function kL(e,t){return D(S(e,r=>r.audit),!1)?!0:t}function AL(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 CL="/ui-hints.json";function DL(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function $L(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function FL(e){let t=le.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=o=>S(t[o],le.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=D(r("platformApiEndpoint"),n),a=o=>S(t[o],le.bool);return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),AL(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),liveUpdates:D(a("liveUpdates"),!0),liveReconnectRefetch:D(a("liveReconnectRefetch"),!0),region:r("region"),authMode:D(B(r("authMode"),$L),"Anonymous"),cognitoUserPoolId:r("cognitoUserPoolId"),cognitoClientId:r("cognitoClientId"),autoRedirectFirstPage:D(a("autoRedirectFirstPage"),!1),mode:D(B(r("mode"),DL),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:ee(D(S(t.accessTiers,le.array),[]),le.string),viewModes:ee(D(S(t.viewModes,le.array),[]),le.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),geocoderEndpoint:r("geocoderEndpoint"),uploadEndpoint:r("uploadEndpoint"),assetOrigins:D(B(S(t.assetOrigins,le.object),o=>Object.fromEntries(ee(Object.entries(o),s=>{let l=s[0];return B(le.string(s[1]),c=>[l,c])}))),{}),uiHintsUrl:D(r("uiHintsUrl"),CL)}}}function IL(e){return yt(fetch(e).then(t=>t.ok?t.json().then(bL):(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 TL(){return yt(fetch("/config.json").then(e=>e.ok?e.json().then(FL):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 ld(e){return D(S(S(le.object(e),t=>t.errors),le.array),[]).some(t=>D(B(S(S(S(S(le.object(t),r=>r.extensions),le.object),r=>r.code),le.string),r=>r==="UNAUTHORIZED"),!1))}function NL(e,t,r,n){return(i,a)=>{let o=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(o,{method:"POST",headers:s,body:D(JSON.stringify({query:i,variables:a}),"")}).then(c=>(c.status===401&&n(),c.json())).then(c=>(ld(c)&&n(),Promise.resolve(D(S(le.object(c),d=>d.data),null))))}}class El extends Error{}El.prototype.name="InvalidTokenError";function PL(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 OL(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 PL(t)}catch{return atob(t)}}function ML(e,t){if(typeof e!="string")throw new El("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 El(`Invalid token specified: missing part #${r+1}`);let i;try{i=OL(n)}catch(a){throw new El(`Invalid token specified: invalid base64 for part #${r+1} (${a.message})`)}try{return JSON.parse(i)}catch(a){throw new El(`Invalid token specified: invalid json for part #${r+1} (${a.message})`)}}let LL=(function(e){return e&&e.name?String(e.name):"UnknownError"}),zL=(function(e){return e&&e.message?String(e.message):""});function Hm(e){return{name:LL(e),message:zL(e)}}function Gm(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 UL=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),qL=e=>({httpHandler:e.httpHandler()});var eu;(function(e){e.HTTP="http",e.HTTPS="https"})(eu||(eu={}));var tu;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(tu||(tu={}));const hp="__smithy_context";class kn{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 kn({...t,headers:{...t.headers}});return r.query&&(r.query=jL(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 kn.clone(this)}}function jL(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class Is{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 BL=e=>t=>async r=>{if(!kn.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 a=n.hostname;n.port!=null&&(a+=`:${n.port}`),n.headers.host=a}return t(r)},VL={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},HL=e=>({applyToStack:t=>{t.add(BL(e),VL)}}),GL=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:a,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:c}=s,d=l??t.inputFilterSensitiveLog,f=c??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return o?.info?.({clientName:i,commandName:a,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:a,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l}=s,c=l??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:a,input:c(r.input),error:n,metadata:n.$metadata}),n}},KL={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},WL=e=>({applyToStack:t=>{t.add(GL(),KL)}}),QL={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},YL=()=>e=>async t=>e(t),JL=e=>({applyToStack:t=>{t.add(YL(),QL)}}),Gs=e=>e[hp]||(e[hp]={}),Zi=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},XL=(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 ZL(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const e9=(e,t)=>(r,n)=>async i=>{const a=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),o=e.authSchemePreference?await e.authSchemePreference():[],s=XL(a,o),l=ZL(e.httpAuthSchemes),c=Gs(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:b={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},m),f.signingProperties=Object.assign(f.signingProperties||{},b),c.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(d.join(`
|
|
19
|
-
`));return r(i)},t9={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},r9=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(e9(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),t9)}}),n9=e=>t=>{throw t},i9=(e,t)=>{},a9=e=>(t,r)=>async n=>{if(!kn.isInstance(n.request))return t(n);const a=Gs(r).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:o={}},identity:s,signer:l}=a,c=await t({...n,request:await l.sign(n.request,s,o)}).catch((l.errorHandler||n9)(o));return(l.successHandler||i9)(c.response,o),c},o9={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},s9=e=>({applyToStack:t=>{t.addRelativeTo(a9(),o9)}}),Il=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},hR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a_=Object.entries(hR).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),l9=hR.split(""),xs=6,Tl=8,u9=63,Qd=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 a=0,o=0;for(let c=i,d=i+3;c<=d;c++)if(e[c]!=="="){if(!(e[c]in a_))throw new TypeError(`Invalid character ${e[c]} in base64 string.`);a|=a_[e[c]]<<(d-c)*xs,o+=xs}else a>>=xs;const s=i/4*3;a>>=o%Tl;const l=Math.floor(o/Tl);for(let c=0;c<l;c++){const d=(l-c-1)*Tl;n.setUint8(s+c,(a&255<<d)>>d)}}return new Uint8Array(r)},Ts=e=>new TextEncoder().encode(e),ru=e=>typeof e=="string"?Ts(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Km=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 ud(e){let t;typeof e=="string"?t=Ts(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 a=0;a<t.length;a+=3){let o=0,s=0;for(let c=a,d=Math.min(a+3,t.length);c<d;c++)o|=t[c]<<(d-c-1)*Tl,s+=Tl;const l=Math.ceil(s/xs);o<<=l*xs-s;for(let c=1;c<=l;c++){const d=(l-c)*xs;i+=l9[(o&u9<<d)>>d]}i+="==".slice(0,4-l)}return i}class So extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?So.mutate(Qd(t)):So.mutate(Ts(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,So.prototype),t}transformToString(t="utf-8"){return t==="base64"?ud(this):Km(this)}}const Eo=e=>encodeURIComponent(e).replace(/[!'()*]/g,c9),c9=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function d9(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=Eo(r),Array.isArray(n))for(let i=0,a=n.length;i<a;i++)t.push(`${r}=${Eo(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${Eo(n)}`),t.push(i)}}return t.join("&")}function o_(e,t){return new Request(e,t)}function f9(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 dh={supported:void 0};class Wm{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Wm(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),dh.supported===void 0&&(dh.supported=typeof Request<"u"&&"keepalive"in o_("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,a=this.config.keepAlive===!0,o=this.config.credentials;if(r?.aborted){const E=s_(r);return Promise.reject(E)}let s=t.path;const l=d9(t.query||{});l&&(s+=`?${l}`),t.fragment&&(s+=`#${t.fragment}`);let c="";if(t.username!=null||t.password!=null){const E=t.username??"",k=t.password??"";c=`${E}:${k}@`}const{port:d,method:f}=t,h=`${t.protocol}//${c}${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:o};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),typeof AbortController<"u"&&(m.signal=r),dh.supported&&(m.keepalive=a),typeof this.config.requestInit=="function"&&Object.assign(m,this.config.requestInit(t));let b=()=>{};const _=o_(h,m),x=[fetch(_).then(E=>{const k=E.headers,w={};for(const $ of k.entries())w[$[0]]=$[1];return E.body!=null?{response:new Is({headers:w,reason:E.statusText,statusCode:E.status,body:E.body})}:E.blob().then($=>({response:new Is({headers:w,reason:E.statusText,statusCode:E.status,body:$})}))}),f9(i)];return r&&x.push(new Promise((E,k)=>{const w=()=>{const C=s_(r);k(C)};if(typeof r.addEventListener=="function"){const C=r;C.addEventListener("abort",w,{once:!0}),b=()=>C.removeEventListener("abort",w)}else r.onabort=w})),Promise.race(x).finally(b)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function s_(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=t,i}const n=new Error(String(t));return n.name="AbortError",n}const r=new Error("Request aborted");return r.name="AbortError",r}const h9=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):p9(e):m9(e);async function p9(e){const t=await g9(e),r=Qd(t);return new Uint8Array(r)}async function m9(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 a=new Uint8Array(i);let o=0;for(const s of t)a.set(s,o),o+=s.length;return a}function g9(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??"",a=i.indexOf(","),o=a>-1?a+1:i.length;t(i.substring(o))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const pR={},pp={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),pR[e]=t,pp[t]=e}function v9(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 pp)t[r/2]=pp[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function wo(e){let t="";for(let r=0;r<e.byteLength;r++)t+=pR[e[r]];return t}const mp=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return So.mutate(e);if(!e)return So.mutate(new Uint8Array);const r=t.streamCollector(e);return So.mutate(await r)},Uc=e=>typeof e=="function"?e():e,mR=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),b9=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:a}=Gs(r),[,o,s,l,c,d]=a??[];try{const f=await e.protocol.deserializeResponse(mR(o,s,l,c,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+=`
|
|
20
|
-
`+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(Is.isInstance(i)){const{headers:p={}}=i,m=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:fh(/^x-[\w-]+-request-?id$/,m),extendedRequestId:fh(/^x-[\w-]+-id-2$/,m),cfId:fh(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw f}},fh=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function _9(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 Ns=e=>{if(typeof e=="string")return Ns(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:a}=e;let o;return a&&(o=_9(a)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:o}},y9=e=>{if(typeof e=="object"){if("url"in e){const t=Ns(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 Ns(e)},x9=e=>(t,r)=>async n=>{const{operationSchema:i}=Gs(r),[,a,o,s,l,c]=i??[],d=r.endpointV2?async()=>y9(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(mR(a,o,s,l,c),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},S9={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},E9={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function w9(e){return{applyToStack:t=>{t.add(x9(e),E9),t.add(b9(e),S9),e.protocol.setSerdeContext(e)}}}const hh=[];function wl(e){if(typeof e=="object")return e;if(e=e|0,hh[e])return hh[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 hh[e]=t}const ll={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},ph=[],mh={};class _r{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=_r.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const n=[];let i=t,a=t;for(this._isMemberSchema=!1;gh(i);)n.push(i[1]),i=i[0],a=Uc(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let o=n.length-1;o>=0;--o){const s=n[o];Object.assign(this.memberTraits,wl(s))}}else this.memberTraits=0;if(a instanceof _r){const o=this.memberTraits;Object.assign(this,a),this.memberTraits=Object.assign({},o,a.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??a.memberName;return}if(this.schema=Uc(a),R9(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(a),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(ph[t])return ph[t]}else if(typeof t=="string"){if(mh[t])return mh[t]}else if(r&&t[ll.ns])return t[ll.ns];const n=Uc(t);if(n instanceof _r)return n;if(gh(n)){const[a,o]=n;if(a instanceof _r)return Object.assign(a.getMergedTraits(),wl(o)),a;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new _r(n);return r?t[ll.ns]=i:typeof n=="string"?mh[n]=i:typeof n=="number"?ph[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 wl(this.memberTraits)}getOwnTraits(){return wl(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 ul([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],a=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||i)?t[3+t[0]]:r?15:void 0;if(a!=null)return ul([a,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 ul(gh(i)?i:[i,0],t)}if(this.isDocumentSchema())return ul([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[ll.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const a=t[4][i],o=ul([t[5][i],0],a);yield n[i]=[a,o]}t[ll.it]=n}}function ul(e,t){if(e instanceof _r)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=_r;return new r(e,t)}const gh=e=>Array.isArray(e)&&e.length===2,R9=e=>Array.isArray(e)&&e.length>=5;class vn{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 vn.registries.has(t)||vn.registries.set(t,new vn(t)),vn.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:n}=this;for(const[i,a]of t.schemas)r.has(i)||r.set(i,a);for(const[i,a]of t.exceptions)n.has(i)||n.set(i,a)}register(t,r){const n=this.normalizeShapeId(t);for(const i of[this,vn.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 a of[this,vn.for(i)])a.schemas.set(i+"#"+n[2],n),a.exceptions.set(n,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):vn.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 gp=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&N9.warn(T9(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},k9=Math.ceil(2**127*(2-2**-23)),l_=e=>{const t=gp(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>k9)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},A9=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},u_=e=>gR(e,16),c_=e=>gR(e,8),gR=(e,t)=>{const r=A9(e);if(r!==void 0&&C9(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},C9=(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]}},D9=e=>gp(typeof e=="string"?Yd(e):e),$9=e=>l_(typeof e=="string"?Yd(e):e),F9=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Yd=e=>{const t=e.match(F9);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},cd=e=>u_(typeof e=="string"?Yd(e):e),I9=e=>c_(typeof e=="string"?Yd(e):e),T9=e=>String(new TypeError(e).stack||e).split(`
|
|
21
|
-
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
22
|
-
`),N9={warn:console.warn},P9=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Qm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O9(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),a=e.getUTCHours(),o=e.getUTCMinutes(),s=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,c=a<10?`0${a}`:`${a}`,d=o<10?`0${o}`:`${o}`,f=s<10?`0${s}`:`${s}`;return`${P9[n]}, ${l} ${Qm[r]} ${t} ${c}:${d}:${f} GMT`}const M9=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),L9=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=M9.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,a,o,s,l,c,d]=t,f=cd(nu(n)),h=Pa(i,"month",1,12),p=Pa(a,"day",1,31),m=qc(f,h,p,{hours:o,minutes:s,seconds:l,fractionalMilliseconds:c});return d.toUpperCase()!="Z"&&m.setTime(m.getTime()-Y9(d)),m},z9=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$/),U9=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$/),q9=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})$/),vR=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=z9.exec(e);if(t){const[r,n,i,a,o,s,l,c]=t;return qc(cd(nu(a)),vh(i),Pa(n,"day",1,31),{hours:o,minutes:s,seconds:l,fractionalMilliseconds:c})}if(t=U9.exec(e),t){const[r,n,i,a,o,s,l,c]=t;return H9(qc(B9(a),vh(i),Pa(n,"day",1,31),{hours:o,minutes:s,seconds:l,fractionalMilliseconds:c}))}if(t=q9.exec(e),t){const[r,n,i,a,o,s,l,c]=t;return qc(cd(nu(c)),vh(n),Pa(i.trimLeft(),"day",1,31),{hours:a,minutes:o,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},j9=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=D9(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))},qc=(e,t,r,n)=>{const i=t-1;return K9(e,i,r),new Date(Date.UTC(e,i,r,Pa(n.hours,"hour",0,23),Pa(n.minutes,"minute",0,59),Pa(n.seconds,"seconds",0,60),Q9(n.fractionalMilliseconds)))},B9=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+cd(nu(e));return r<t?r+100:r},V9=50*365*24*60*60*1e3,H9=e=>e.getTime()-new Date().getTime()>V9?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,vh=e=>{const t=Qm.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},G9=[31,28,31,30,31,30,31,31,30,31,30,31],K9=(e,t,r)=>{let n=G9[t];if(t===1&&W9(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${Qm[t]} in ${e}: ${r}`)},W9=e=>e%4===0&&(e%100!==0||e%400===0),Pa=(e,t,r,n)=>{const i=I9(nu(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},Q9=e=>e==null?0:$9("0."+e)*1e3,Y9=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},nu=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},d_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Lr=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),bR=()=>{if(d_)return d_();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Lr[e[0]]+Lr[e[1]]+Lr[e[2]]+Lr[e[3]]+"-"+Lr[e[4]]+Lr[e[5]]+"-"+Lr[e[6]]+Lr[e[7]]+"-"+Lr[e[8]]+Lr[e[9]]+"-"+Lr[e[10]]+Lr[e[11]]+Lr[e[12]]+Lr[e[13]]+Lr[e[14]]+Lr[e[15]]},$a=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};$a.from=e=>e&&typeof e=="object"&&(e instanceof $a||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?$a(String(e)):$a(JSON.stringify(e));$a.fromObject=$a.from;const f_=/^-?\d*(\.\d+)?$/;class wi{string;type;constructor(t,r){if(this.string=t,this.type=r,!f_.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 wi.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&f_.test(r.string)}}class J9{serdeContext;setSerdeContext(t){this.serdeContext=t}}class X9 extends J9{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=vn.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return kn}getResponseType(){return Is}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=_r.of(r.input),a=wl(r.traits??{});if(a.endpoint){let o=a.endpoint?.[0];if(typeof o=="string"){for(const[s,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const c=n[s];if(typeof c!="string")throw new Error(`@smithy/core/schema - ${s} in input must be a string as hostLabel.`);o=o.replace(`{${s}}`,c)}t.hostname=o+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 Pc(async()=>{const{EventStreamSerde:r}=await import("./index-DitK-9eG.js");return{EventStreamSerde:r}},__vite__mapDeps([3]));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,n,i,a){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class Z9 extends X9{async serializeRequest(t,r,n){const i=this.serializer,a={},o={},s=await n.endpoint(),l=_r.of(t?.input),c=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new kn({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:a,headers:o,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[b,_]of l.structIterator())b!==p&&f[b]&&(i.write(_,f[b]),m[b]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:m})}}else i.write(c,f),d=i.flush()}return h.headers=Object.assign(h.headers,o),h.query=a,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,a=_r.of(t.output),o={};if(n.statusCode>=300){const l=await mp(n.body,r);throw l.byteLength>0&&Object.assign(o,await i.read(15,l)),await this.handleError(t,r,n,o,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const c=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=c}const s=a.getEventStreamMember();if(s)o[s]=await this.deserializeEventStream({response:n,responseSchema:a,initialResponseContainer:o});else{const l=await mp(n.body,r);l.byteLength>0&&Object.assign(o,await i.read(a,l))}return o.$metadata=this.deserializeMetadata(n),o}}function _R(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:a}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||i?6:a||r?5:void 0:void 0)??t.timestampFormat.default}function ez(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 tz{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 rz{async sign(t,r,n){return t}}const nz=e=>function(r){return yR(r)&&r.expiration.getTime()-Date.now()<e},iz=3e5,az=nz(iz),yR=e=>e.expiration!==void 0,oz=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,a,o,s=!1;const l=async c=>{a||(a=n(c));try{i=await a,o=!0,s=!1}finally{a=void 0}return i};return t===void 0?async c=>((!o||c?.forceRefresh)&&(i=await l(c)),i):async c=>((!o||c?.forceRefresh)&&(i=await l(c)),s?i:r(i)?(t(i)&&await l(c),i):(s=!0,i))},sz=void 0;function lz(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function uz(e){const t=Il(e.userAgentAppId??sz),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!lz(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 Ym{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 Ym(t,r,n,i)}}class cz{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 a=0;for(;;){const{value:o,done:s}=i.next();if(this.data.delete(o),s||++a>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 a=String(t[i]??"");if(a.includes("|;"))return!1;r+=a+"|;"}return r}}class ai extends Error{constructor(t){super(t),this.name="EndpointError"}}const dz="endpoints";function dd(e){return typeof e!="object"||e==null?e:"ref"in e?`$${dd(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(dd).join(", ")})`:JSON.stringify(e,null,2)}const Jm={},fz=(e,t)=>e===t;function hz(...e){for(const t of e)if(t!=null)return t}const pz=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 ai(`Path: '${e}' does not end with ']'`);const a=n.slice(i+1,-1);if(Number.isNaN(parseInt(a)))throw new ai(`Invalid array index: '${a}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(a)}else r.push(n)}return r},xR=(e,t)=>pz(t).reduce((r,n)=>{if(typeof r!="object")throw new ai(`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),mz=e=>e!=null,gz=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Jd=(e,t=!1)=>{if(!t)return gz.test(e);const r=e.split(".");for(const n of r)if(!Jd(n))return!1;return!0};function vz(e,t,r){return e?t:r}const bz=e=>!e,_z=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}$"),SR=e=>_z.test(e)||e.startsWith("[")&&e.endsWith("]"),bh={[eu.HTTP]:80,[eu.HTTPS]:443},yz=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:b="",query:_={}}=e,x=new URL(`${m}//${h}${p?`:${p}`:""}${b}`);return x.search=Object.entries(_).map(([E,k])=>`${E}=${k}`).join("&"),x}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:a,protocol:o,search:s}=t;if(s)return null;const l=o.slice(0,-1);if(!Object.values(eu).includes(l))return null;const c=SR(i),d=r.includes(`${n}:${bh[l]}`)||typeof e=="string"&&e.includes(`${n}:${bh[l]}`),f=`${n}${d?`:${bh[l]}`:""}`;return{scheme:l,authority:f,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:c}};function xz(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 Sz=(e,t)=>e===t,Ez=(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),wz=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Rz={booleanEquals:fz,coalesce:hz,getAttr:xR,isSet:mz,isValidHostLabel:Jd,ite:vz,not:bz,parseURL:yz,split:xz,stringEquals:Sz,substring:Ez,uriEncode:wz},ER=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let a=0;for(;a<e.length;){const o=e.indexOf("{",a);if(o===-1){r.push(e.slice(a));break}r.push(e.slice(a,o));const s=e.indexOf("}",o);if(s===-1){r.push(e.slice(o));break}e[o+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(o+1,s)),a=s+2);const l=e.substring(o+1,s);if(l.includes("#")){const[c,d]=l.split("#");r.push(xR(n[c]??i[c],d))}else r.push(n[l]??i[l]);a=s+1}return r.join("")},kz=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],Xd=(e,t,r)=>{if(typeof e=="string")return ER(e,r);if(e.fn)return RR.callFunction(e,r);if(e.ref)return kz(e,r);throw new ai(`'${t}': ${String(e)} is not a string, function or reference.`)},wR=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let o=0;o<n.length;++o){const s=t[o];typeof s=="boolean"||typeof s=="number"?n[o]=s:n[o]=RR.evaluateExpression(s,"arg",r)}const i=e.indexOf(".");if(i!==-1){const s=Jm[e.slice(0,i)]?.[e.slice(i+1)];if(typeof s=="function")return s(...n)}const a=Rz[e];if(typeof a=="function")return a(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},RR={evaluateExpression:Xd,callFunction:wR},Az=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new ai(`'${r}' is already defined in Reference Record.`);const n=wR(e,t);t.logger?.debug?.(`${dz} evaluateCondition: ${dd(e)} = ${dd(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},Cz=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(a=>{const o=Xd(a,"Header value entry",t);if(typeof o!="string")throw new ai(`Header '${n}' value '${o}' is not a string`);return o}),r),{}),kR=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=CR.getEndpointProperty(i,t),r),{}),AR=(e,t)=>{if(Array.isArray(e))return e.map(r=>AR(r,t));switch(typeof e){case"string":return ER(e,t);case"object":if(e===null)throw new ai(`Unexpected endpoint property: ${e}`);return CR.getEndpointProperties(e,t);case"boolean":return e;default:throw new ai(`Unexpected endpoint property type: ${typeof e}`)}},CR={getEndpointProperty:AR,getEndpointProperties:kR},Dz=(e,t)=>{const r=Xd(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 ai(`Endpoint URL must be a string, got ${typeof r}`)},_h=1e8,$z=(e,t)=>{const{nodes:r,root:n,results:i,conditions:a}=e;let o=n;const s={},l={referenceRecord:s,endpointParams:t.endpointParams,logger:t.logger};for(;o!==1&&o!==-1&&o<_h;){const c=3*(Math.abs(o)-1),[d,f,h]=[r[c],r[c+1],r[c+2]],[p,m,b]=a[d],_=Az({fn:p,assign:b,argv:m},l);if(_.toAssign){const{name:x,value:E}=_.toAssign;s[x]=E}o=o>=0===_.result?f:h}if(o>=_h){const c=i[o-_h];if(c[0]===-1){const[,p]=c;throw new ai(Xd(p,"Error",l))}const[d,f,h]=c;return{url:Dz(d,l),properties:kR(f,l),headers:Cz(h??{},l)}}throw new ai("No matching endpoint.")},DR=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!DR(r))return!1;return!0}return!(!Jd(e)||e.length<3||e.length>63||e!==e.toLowerCase()||SR(e))},h_=":",Fz="/",Iz=e=>{const t=e.split(h_);if(t.length<6)return null;const[r,n,i,a,o,...s]=t;if(r!=="arn"||n===""||i===""||s.join(h_)==="")return null;const l=s.map(c=>c.split(Fz)).flat();return{partition:n,service:i,region:a,accountId:o,resourceId:l}},Tz=[{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)"}}}],Nz={partitions:Tz};let Pz=Nz;const Oz=e=>{const{partitions:t}=Pz;for(const n of t){const{regions:i,outputs:a}=n;for(const[o,s]of Object.entries(i))if(o===e)return{...a,...s}}for(const n of t){const{regionRegex:i,outputs:a}=n;if(new RegExp(i).test(e))return{...a}}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}},$R={isVirtualHostableS3Bucket:DR,parseArn:Iz,partition:Oz};Jm.aws=$R;function Mz(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function Bi(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 Ba;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Ba||(Ba={}));const Nl=3,Lz=Ba.STANDARD,zz=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Uz=["TimeoutError","RequestTimeout","RequestTimeoutException"],qz=[500,502,503,504],jz=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Bz=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Vz=e=>e?.$retryable!==void 0,Hz=e=>e.$metadata?.clockSkewCorrected,Gz=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},FR=e=>e.$metadata?.httpStatusCode===429||zz.includes(e.name)||e.$retryable?.throttling==!0,Xm=(e,t=0)=>Vz(e)||Hz(e)||Uz.includes(e.name)||jz.includes(e?.code||"")||Bz.includes(e?.code||"")||qz.includes(e.$metadata?.httpStatusCode||0)||Gz(e)||Wz(e)||e.cause!==void 0&&t<=10&&Xm(e.cause,t+1),Kz=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Xm(e)}return!1};function Wz(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class Zm{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"||FR(n?.error??t)){const o=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const a=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(a)}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=>Zm.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 IR=20*1e3,p_=500,Qz=1,Yz="amz-sdk-invocation-id",Jz="amz-sdk-request";var Xz={};class Yr{static v2026=typeof process<"u"&&Xz?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Yr.v2026?50:100}static throttlingDelay(){return Yr.v2026?1e3:500}static cost(){return Yr.v2026?14:5}static throttlingCost(){return Yr.v2026?5:10}static modifiedCostType(){return Yr.v2026?"THROTTLING":"TRANSIENT"}}class Zz{x=Yr.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,IR);return Math.floor(i)}setDelayBase(t){this.x=t}}class m_{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(IR,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class vp{mode=Ba.STANDARD;capacity=p_;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()=>Nl,this.baseDelay??=Yr.delay(),this.retryBackoffStrategy??=new Zz}async acquireInitialRetryToken(t){return new m_(Yr.delay(),0,void 0,Yr.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,r){const n=await this.getMaxAttempts(),i=this.shouldRetry(t,r,n);if(i||t.isLongPoll?.()){const a=r.errorType;this.retryBackoffStrategy.setDelayBase(a==="THROTTLING"?Yr.throttlingDelay():this.baseDelay);const o=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let s=o;if(r.retryAfterHint instanceof Date&&(s=Math.max(o,Math.min(r.retryAfterHint.getTime()-Date.now(),o+5e3))),i){const l=this.getCapacityCost(a);return this.capacity-=l,new m_(s,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:Yr.v2026?s:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(p_,this.capacity+(t.getRetryCost()??Qz))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Nl}`),Nl}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===Yr.modifiedCostType()?Yr.throttlingCost():Yr.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class e7{mode=Ba.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new Zm,this.standardRetryStrategy=r?new vp({maxAttempts:typeof t=="number"?t:3,...r}):new vp(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 t7=/\d{12}\.ddb/;async function r7(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Bi(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const a=await t.retryStrategy();if(typeof a.mode=="string")switch(a.mode){case Ba.ADAPTIVE:Bi(e,"RETRY_MODE_ADAPTIVE","F");break;case Ba.STANDARD:Bi(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const a=e.endpointV2;switch(String(a?.url?.hostname).match(t7)&&Bi(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Bi(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Bi(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Bi(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const a=i;a.accountId&&Bi(e,"RESOLVED_ACCOUNT_ID","T");for(const[o,s]of Object.entries(a.$source??{}))Bi(e,o,s)}}const g_="user-agent",yh="x-amz-user-agent",v_=" ",xh="/",n7=/[^!$%&'*+\-.^_`|~\w]/g,i7=/[^!$%&'*+\-.^_`|~\w#]/g,b_="-",a7=1024;function o7(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=a7){t.length?t+=","+n:t+=n;continue}break}return t}const s7=e=>(t,r)=>async n=>{const{request:i}=n;if(!kn.isInstance(i))return t(n);const{headers:a}=i,o=r?.userAgent?.map(Zu)||[],s=(await e.defaultUserAgentProvider()).map(Zu);await r7(r,e,n);const l=r;s.push(`m/${o7(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(Zu)||[],d=await e.userAgentAppId();d&&s.push(Zu(["app",`${d}`]));const f=[].concat([...s,...o,...c]).join(v_),h=[...s.filter(p=>p.startsWith("aws-sdk-")),...c].join(v_);return e.runtime!=="browser"?(h&&(a[yh]=a[yh]?`${a[g_]} ${h}`:h),a[g_]=f):a[yh]=f,t({...n,request:i})},Zu=e=>{const t=e[0].split(xh).map(o=>o.replace(n7,b_)).join(xh),r=e[1]?.replace(i7,b_),n=t.indexOf(xh),i=t.substring(0,n);let a=t.substring(n+1);return i==="api"&&(a=a.toLowerCase()),[i,a,r].filter(o=>o&&o.length>0).reduce((o,s,l)=>{switch(l){case 0:return s;case 1:return`${o}/${s}`;default:return`${o}#${s}`}},"")},l7={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},u7=e=>({applyToStack:t=>{t.add(s7(e),l7)}}),c7=!1,d7=!1,__=new Set,f7=(e,t=Jd)=>{if(!__.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 __.add(e)},TR=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),h7=e=>TR(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,p7=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=h7(n);return f7(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return TR(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},y_="content-length";function m7(e){return t=>async r=>{const n=r.request;if(kn.isInstance(n)){const{body:i,headers:a}=n;if(i&&Object.keys(a).map(o=>o.toLowerCase()).indexOf(y_)===-1)try{const o=e(i);n.headers={...n.headers,[y_]:String(o)}}catch{}}return t({...r,request:n})}}const g7={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},v7=e=>({applyToStack:t=>{t.add(m7(e.bodyLengthChecker),g7)}}),b7=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),E7(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!S7(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},_7=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,y7=/(\d+\.){3}\d+/,x7=/\.\./,S7=e=>_7.test(e)&&!y7.test(e)&&!x7.test(e),E7=e=>{const[t,r,n,,,i]=e.split(":"),a=t==="arn"&&e.split(":").length>=6,o=!!(a&&r&&n&&i);if(a&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},w7=(e,t,r,n=!1)=>{const i=async()=>{let a;return n?a=r.clientContextParams?.[e]??r[e]??r[t]:a=r[e]??r[t],typeof a=="function"?a():a};return e==="credentialScope"||t==="CredentialScope"?async()=>{const a=typeof r.credentials=="function"?await r.credentials():r.credentials;return a?.credentialScope??a?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const a=typeof r.credentials=="function"?await r.credentials():r.credentials;return a?.accountId??a?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const a=await i();if(a&&typeof a=="object"){if("url"in a)return a.url.href;if("hostname"in a){const{protocol:o,hostname:s,port:l,path:c}=a;return`${o}//${s}${l?":"+l:""}${c}`}}return a}:i},NR=async e=>{},PR=e=>{if(typeof e=="object"){if("url"in e){const t=Ns(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 Ns(e)},R7=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let o;r.serviceConfiguredEndpoint?o=await r.serviceConfiguredEndpoint():o=await NR(r.serviceId),o&&(r.endpoint=()=>Promise.resolve(PR(o)),r.isCustomEndpoint=!0)}const i=await k7(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const a=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const o=await r.endpoint();if(o?.headers){a.headers??={};for(const[s,l]of Object.entries(o.headers))a.headers[s]=Array.isArray(l)?l:[l]}}return a},k7=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[a,o]of Object.entries(i))switch(o.type){case"staticContextParams":n[a]=o.value;break;case"contextParams":n[a]=e[o.name];break;case"clientContextParams":case"builtInParams":n[a]=await w7(o.name,a,r,o.type!=="builtInParams")();break;case"operationContextParams":n[a]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await b7(n),n},A7=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&ez(n,"ENDPOINT_OVERRIDE","N");const a=await R7(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=a,n.authSchemes=a.properties?.authSchemes;const o=n.authSchemes?.[0];if(o){n.signing_region=o.signingRegion,n.signing_service=o.signingName;const l=Gs(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return r({...i})},C7={name:"serializerMiddleware"},D7={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:C7.name},$7=(e,t)=>({applyToStack:r=>{r.addRelativeTo(A7({config:e,instructions:t}),D7)}}),F7=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,a=r!=null?async()=>PR(await Zi(r)()):void 0,s=Object.assign(e,{endpoint:a,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:Zi(n??!1),useFipsEndpoint:Zi(i??!1)});let l;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=NR(e.serviceId)),l),s},I7=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}`),T7=e=>{const{retryStrategy:t,retryMode:r}=e,n=Zi(e.maxAttempts??Nl);let i=t?Promise.resolve(t):void 0;const a=async()=>await Zi(r)()===Ba.ADAPTIVE?new e7(n):new vp(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=a()})},so=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},ba=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,fd=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>x_[p.step]-x_[h.step]||S_[p.priority||"normal"]-S_[h.priority||"normal"]),a=f=>{let h=!1;const p=m=>{const b=so(m.name,m.aliases);if(b.includes(f)){h=!0;for(const _ of b)n.delete(_);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},o=f=>{let h=!1;const p=m=>{if(m.middleware===f){h=!0;for(const b of so(m.name,m.aliases))n.delete(b);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},c=(f=!1)=>{const h=[],p=[],m={};return e.forEach(_=>{const x={..._,before:[],after:[]};for(const E of so(x.name,x.aliases))m[E]=x;h.push(x)}),t.forEach(_=>{const x={..._,before:[],after:[]};for(const E of so(x.name,x.aliases))m[E]=x;p.push(x)}),p.forEach(_=>{if(_.toMiddleware){const x=m[_.toMiddleware];if(x===void 0){if(f)return;throw new Error(`${_.toMiddleware} is not found when adding ${ba(_.name,_.aliases)} middleware ${_.relation} ${_.toMiddleware}`)}_.relation==="after"&&x.after.push(_),_.relation==="before"&&x.before.push(_)}}),i(h).map(l).reduce((_,x)=>(_.push(...x),_),[])},d={add:(f,h={})=>{const{name:p,override:m,aliases:b}=h,_={step:"initialize",priority:"normal",middleware:f,...h},x=so(p,b);if(x.length>0){if(x.some(E=>n.has(E))){if(!m)throw new Error(`Duplicate middleware name '${ba(p,b)}'`);for(const E of x){const k=e.findIndex(C=>C.name===E||C.aliases?.some($=>$===E));if(k===-1)continue;const w=e[k];if(w.step!==_.step||_.priority!==w.priority)throw new Error(`"${ba(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${ba(p,b)}" middleware with ${_.priority} priority in ${_.step} step.`);e.splice(k,1)}}for(const E of x)n.add(E)}e.push(_)},addRelativeTo:(f,h)=>{const{name:p,override:m,aliases:b}=h,_={middleware:f,...h},x=so(p,b);if(x.length>0){if(x.some(E=>n.has(E))){if(!m)throw new Error(`Duplicate middleware name '${ba(p,b)}'`);for(const E of x){const k=t.findIndex(C=>C.name===E||C.aliases?.some($=>$===E));if(k===-1)continue;const w=t[k];if(w.toMiddleware!==_.toMiddleware||w.relation!==_.relation)throw new Error(`"${ba(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${ba(p,b)}" middleware ${_.relation} "${_.toMiddleware}" middleware.`);t.splice(k,1)}}for(const E of x)n.add(E)}t.push(_)},clone:()=>s(fd()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?a(f):o(f),removeByTag:f=>{let h=!1;const p=m=>{const{tags:b,name:_,aliases:x}=m;if(b&&b.includes(f)){const E=so(_,x);for(const k of E)n.delete(k);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=s(fd());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:s,identify:()=>c(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return ba(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of c().map(m=>m.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},x_={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},S_={high:3,normal:2,low:1};class N7{config;middlewareStack=fd();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,a=typeof r=="function"?r:n,o=i===void 0&&this.config.cacheMiddleware===!0;let s;if(o){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(a)s(t).then(l=>a(null,l.output),l=>a(l)).catch(()=>{});else return s(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Sh="***SensitiveInformation***";function bp(e,t){if(t==null)return t;const r=_r.of(e);if(r.getMergedTraits().sensitive)return Sh;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return Sh}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return Sh}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[a,o]of r.structIterator())n[a]!=null&&(i[a]=bp(o,n[a]));return i}return t}class OR{middlewareStack=fd();schema;static classBuilder(){return new P7}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:a,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:d,CommandCtor:f}){for(const x of i.bind(this)(f,t,r,n))this.middlewareStack.use(x);const h=t.concat(this.middlewareStack),{logger:p}=r,m={logger:p,clientName:a,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[hp]:{commandInstance:this,...c},...d},{requestHandler:b}=r;let _=n??{};return c.eventStream&&(_={isEventStream:!0,..._}),h.resolve(x=>b.handle(x.request,_),m)}}class P7{_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 OR{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,a){const o=t._operationSchema,s=o?.[4]??o?.input,l=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(n,i,a,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(o?bp.bind(null,s):c=>c),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(o?bp.bind(null,l):c=>c),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class ms 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 ms.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===ms?ms.isInstance(t):ms.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const E_=(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},O7=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{}}},MR=Object.values(tu),M7=e=>{const t=[];for(const r in tu){const n=tu[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();MR.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},L7=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();MR.includes(n)&&(t[n]=r.checksumConstructor())}),t},z7=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),U7=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},q7=e=>Object.assign(M7(e),z7(e)),j7=e=>Object.assign(L7(e),U7(e));class LR{trace(){}debug(){}info(){}warn(){}error(){}}const B7=e=>e?.body instanceof ReadableStream;function V7(e,t){if(Is.isInstance(e))for(const r of Object.keys(e.headers)){const n=r.toLowerCase();if(n==="retry-after"){const i=e.headers[r];let a=NaN;if(i.endsWith("GMT"))try{a=(vR(i).getTime()-Date.now())/1e3}catch(o){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(o)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?a=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?a=Number(i):Date.parse(i)>=Date.now()&&(a=(Date.parse(i)-Date.now())/1e3);return isNaN(a)?void 0:new Date(Date.now()+a*1e3)}else if(n==="x-amz-retry-after"){const i=e.headers[r],a=Number(i);if(isNaN(a)){t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+a)}}}const H7=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const a=await e.maxAttempts();if(G7(i)){i=i;let o=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),s=new Error,l=0,c=0;const{request:d}=n,f=kn.isInstance(d);for(f&&(d.headers[Yz]=bR());;)try{f&&(d.headers[Jz]=`attempt=${l+1}; max=${a}`);const{response:h,output:p}=await t(n);return i.recordSuccess(o),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=c,{response:h,output:p}}catch(h){const p=K7(h,e.logger);if(s=I7(h),f&&B7(d))throw(r.logger instanceof LR?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{o=await i.refreshRetryTokenForRetry(o,p)}catch(b){throw typeof b.$backoff=="number"&&await w_(b.$backoff),s.$metadata||(s.$metadata={}),s.$metadata.attempts=l+1,s.$metadata.totalRetryDelay=c,s}l=o.getRetryCount();const m=o.getRetryDelay();c+=m,await w_(m)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},w_=e=>new Promise(t=>setTimeout(t,e)),G7=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",K7=(e,t)=>{const r={error:e,errorType:W7(e)},n=V7(e.$response,t);return n&&(r.retryAfterHint=n),r},W7=e=>FR(e)?"THROTTLING":Xm(e)?"TRANSIENT":Kz(e)?"SERVER_ERROR":"CLIENT_ERROR",Q7={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Y7=e=>({applyToStack:t=>{t.add(H7(e),Q7)}}),R_=e=>Is.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,zR=e=>new Date(Date.now()+e),J7=(e,t)=>Math.abs(zR(t).getTime()-e)>=3e5,k_=(e,t)=>{const r=Date.parse(e);return J7(r,t)?r-Date.now():t},Pl=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},X7=async e=>{const t=Pl("context",e.context),r=Pl("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],a=await Pl("signer",r.signer)(n),o=e?.signingRegion,s=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:a,signingRegion:o,signingRegionSet:s,signingName:l}};class Z7{async sign(t,r,n){if(!kn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await X7(n),{config:a,signer:o}=i;let{signingRegion:s,signingName:l}=i;const c=n.context;if(c?.authSchemes?.length??!1){const[f,h]=c.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(s=h?.signingRegion??s,l=h?.signingName??l)}return await o.sign(t,{signingDate:zR(a.systemClockOffset),signingRegion:s,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??R_(r.$response);if(n){const i=Pl("config",t.config),a=i.systemClockOffset;i.systemClockOffset=k_(n,i.systemClockOffset),i.systemClockOffset!==a&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=R_(t);if(n){const i=Pl("config",r.config);i.systemClockOffset=k_(n,i.systemClockOffset)}}}const eU=(e,t,r)=>{let n,i,a,o=!1;const s=async()=>{i||(i=e());try{n=await i,a=!0,o=!1}finally{i=void 0}return n};return async l=>((!a||l?.forceRefresh)&&(n=await s()),n)},tU="X-Amz-Algorithm",rU="X-Amz-Credential",UR="X-Amz-Date",nU="X-Amz-SignedHeaders",iU="X-Amz-Expires",qR="X-Amz-Signature",jR="X-Amz-Security-Token",BR="authorization",VR=UR.toLowerCase(),aU="date",oU=[BR,VR,aU],sU=qR.toLowerCase(),_p="x-amz-content-sha256",lU=jR.toLowerCase(),uU={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},cU=/^proxy-/,dU=/^sec-/,Eh="AWS4-HMAC-SHA256",fU="AWS4-HMAC-SHA256-PAYLOAD",hU="UNSIGNED-PAYLOAD",pU=50,HR="aws4_request",mU=3600*24*7,ec={},wh=[],Rh=(e,t,r)=>`${e}/${t}/${r}/${HR}`,gU=async(e,t,r,n,i)=>{const a=await A_(e,t.secretAccessKey,t.accessKeyId),o=`${r}:${n}:${i}:${wo(a)}:${t.sessionToken}`;if(o in ec)return ec[o];for(wh.push(o);wh.length>pU;)delete ec[wh.shift()];let s=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,HR])s=await A_(e,s,l);return ec[o]=s},A_=(e,t,r)=>{const n=new e(t);return n.update(ru(r)),n.digest()},C_=({headers:e},t,r)=>{const n={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const a=i.toLowerCase();(a in uU||t?.has(a)||cU.test(a)||dU.test(a))&&(!r||r&&!r.has(a))||(n[a]=e[i].trim().replace(/\s+/g," "))}return n},vU=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",kh=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===_p)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||vU(t)){const n=new r;return n.update(ru(t)),wo(await n.digest())}return hU};class bU{format(t){const r=[];for(const a of Object.keys(t)){const o=Ts(a);r.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(t[a]))}const n=new Uint8Array(r.reduce((a,o)=>a+o.byteLength,0));let i=0;for(const a of r)n.set(a,i),i+=a.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 a=new DataView(new ArrayBuffer(3+t.value.byteLength));a.setUint8(0,6),a.setUint16(1,t.value.byteLength,!1);const o=new Uint8Array(a.buffer);return o.set(t.value,3),o;case"string":const s=Ts(t.value),l=new DataView(new ArrayBuffer(3+s.byteLength));l.setUint8(0,7),l.setUint16(1,s.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(s,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(eg.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!_U.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(v9(t.value.replace(/\-/g,"")),1),f}}}var D_;(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"})(D_||(D_={}));const _U=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class eg{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&&$_(r),new eg(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&$_(t),parseInt(wo(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function $_(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const yU=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},xU=(e,t={})=>{const{headers:r,query:n={}}=kn.clone(e);for(const i of Object.keys(r)){const a=i.toLowerCase();(a.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(a)||t.hoistableHeaders?.has(a))&&(n[i]=r[i],delete r[i])}return{...e,headers:r,query:n}},F_=e=>{e=kn.clone(e);for(const t of Object.keys(e.headers))oU.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},SU=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===sU)continue;const i=Eo(n);t.push(i);const a=e[n];typeof a=="string"?r[i]=`${i}=${Eo(a)}`:Array.isArray(a)&&(r[i]=a.slice(0).reduce((o,s)=>o.concat([`${i}=${Eo(s)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},EU=e=>wU(e).toISOString().replace(/\.\d{3}Z$/,"Z"),wU=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class RU{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:a,uriEscapePath:o=!0}){this.service=i,this.sha256=a,this.uriEscapePath=o,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Zi(n),this.credentialProvider=Zi(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
23
|
-
${this.getCanonicalPath(t)}
|
|
24
|
-
${SU(t)}
|
|
25
|
-
${i.map(a=>`${a}:${r[a]}`).join(`
|
|
26
|
-
`)}
|
|
27
|
-
|
|
28
|
-
${i.join(";")}
|
|
29
|
-
${n}`}async createStringToSign(t,r,n,i){const a=new this.sha256;a.update(ru(n));const o=await a.digest();return`${i}
|
|
30
|
-
${t}
|
|
31
|
-
${r}
|
|
32
|
-
${wo(o)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const a of t.split("/"))a?.length!==0&&a!=="."&&(a===".."?r.pop():r.push(a));const n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return Eo(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=EU(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class I_ extends RU{headerFormatter=new bU;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:a,uriEscapePath:o=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:a,uriEscapePath:o})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:a,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:l,signingRegion:c,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=c??await this.regionProvider(),{longDate:p,shortDate:m}=this.formatDate(n);if(i>mU)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const b=Rh(m,h,d??this.service),_=xU(F_(t),{unhoistableHeaders:o,hoistableHeaders:l});f.sessionToken&&(_.query[jR]=f.sessionToken),_.query[tU]=Eh,_.query[rU]=`${f.accessKeyId}/${b}`,_.query[UR]=p,_.query[iU]=i.toString(10);const x=C_(_,a,s);return _.query[nU]=this.getCanonicalHeaderList(x),_.query[qR]=await this.getSignature(p,b,this.getSigningKey(f,h,m,d),this.createCanonicalRequest(_,x,await kh(t,this.sha256))),_}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:a,signingService:o,eventStreamCredentials:s}){const l=a??await this.regionProvider(),{shortDate:c,longDate:d}=this.formatDate(n),f=Rh(c,l,o??this.service),h=await kh({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const m=wo(await p.digest()),b=[fU,d,f,i,m,h].join(`
|
|
33
|
-
`);return this.signString(b,{signingDate:n,signingRegion:l,signingService:o,eventStreamCredentials:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:a}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature,eventStreamCredentials:a}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:a}={}){const o=a??await this.credentialProvider();this.validateResolvedCredentials(o);const s=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(o,s,l,i));return c.update(ru(t)),wo(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:a,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const l=a??await this.regionProvider(),c=F_(t),{longDate:d,shortDate:f}=this.formatDate(r),h=Rh(f,l,o??this.service);c.headers[VR]=d,s.sessionToken&&(c.headers[lU]=s.sessionToken);const p=await kh(c,this.sha256);!yU(_p,c.headers)&&this.applyChecksum&&(c.headers[_p]=p);const m=C_(c,i,n),b=await this.getSignature(d,h,this.getSigningKey(s,l,f,o),this.createCanonicalRequest(c,m,p));return c.headers[BR]=`${Eh} Credential=${s.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${b}`,c}async getSignature(t,r,n,i){const a=await this.createStringToSign(t,r,i,Eh),o=new this.sha256(await n);return o.update(ru(a)),wo(await o.digest())}getSigningKey(t,r,n,i){return gU(this.sha256,t,n,r,i||this.service)}}const kU=e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==n&&(r=!0),t=c;const d=AU(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=CU(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const b=await f(p);return h&&(!b.$source||Object.keys(b.$source).length===0)?Mz(b,"CREDENTIALS_CODE","e"):b},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:a=e.systemClockOffset||0,sha256:o}=e;let s;return e.signer?s=Il(e.signer):e.regionInfoProvider?s=()=>Il(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:f,signingService:h}=c;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:o,uriEscapePath:i},m=e.signerConstructor||I_;return new m(p)}):s=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Il(e.region)(),properties:{}},c);const d=c.signingRegion,f=c.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:o,uriEscapePath:i},p=e.signerConstructor||I_;return new p(h)},Object.assign(e,{systemClockOffset:a,signingEscapePath:i,signer:s})};function AU(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=oz(t,az,yR):r?n=Il(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 CU(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 DU=async(e,t,r)=>({operation:Gs(t).operation,region:await Zi(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function $U(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function ft(e){return{schemeId:"smithy.api#noAuth"}}const FU=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(ft());break}case"ChangePassword":{t.push(ft());break}case"CompleteWebAuthnRegistration":{t.push(ft());break}case"ConfirmDevice":{t.push(ft());break}case"ConfirmForgotPassword":{t.push(ft());break}case"ConfirmSignUp":{t.push(ft());break}case"DeleteUser":{t.push(ft());break}case"DeleteUserAttributes":{t.push(ft());break}case"DeleteWebAuthnCredential":{t.push(ft());break}case"ForgetDevice":{t.push(ft());break}case"ForgotPassword":{t.push(ft());break}case"GetDevice":{t.push(ft());break}case"GetTokensFromRefreshToken":{t.push(ft());break}case"GetUser":{t.push(ft());break}case"GetUserAttributeVerificationCode":{t.push(ft());break}case"GetUserAuthFactors":{t.push(ft());break}case"GlobalSignOut":{t.push(ft());break}case"InitiateAuth":{t.push(ft());break}case"ListDevices":{t.push(ft());break}case"ListWebAuthnCredentials":{t.push(ft());break}case"ResendConfirmationCode":{t.push(ft());break}case"RespondToAuthChallenge":{t.push(ft());break}case"RevokeToken":{t.push(ft());break}case"SetUserMFAPreference":{t.push(ft());break}case"SetUserSettings":{t.push(ft());break}case"SignUp":{t.push(ft());break}case"StartWebAuthnRegistration":{t.push(ft());break}case"UpdateAuthEventFeedback":{t.push(ft());break}case"UpdateDeviceStatus":{t.push(ft());break}case"UpdateUserAttributes":{t.push(ft());break}case"VerifySoftwareToken":{t.push(ft());break}case"VerifyUserAttribute":{t.push(ft());break}default:t.push($U(e))}return t},IU=e=>{const t=kU(e);return Object.assign(t,{authSchemePreference:Zi(e.authSchemePreference??[])})},TU=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),NU={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},PU="3.1033.0",OU={version:PU},MU=e=>new TextEncoder().encode(e);var LU=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:MU;function iu(e){return e instanceof Uint8Array?e:typeof e=="string"?LU(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function yp(e){return typeof e=="string"?e.length===0:e.byteLength===0}var GR={name:"SHA-256"},T_={name:"HMAC",hash:GR},zU=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 UU={};function jc(){return typeof window<"u"?window:typeof self<"u"?self:UU}var qU=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!yp(t)){var r=iu(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 jc().crypto.subtle.sign(T_,r,t.toHash).then(function(n){return new Uint8Array(n)})}):yp(this.toHash)?Promise.resolve(zU):Promise.resolve().then(function(){return jc().crypto.subtle.digest(GR,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){jc().crypto.subtle.importKey("raw",iu(t.secret),T_,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function jU(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(d){try{c(n.next(d))}catch(f){o(f)}}function l(d){try{c(n.throw(d))}catch(f){o(f)}}function c(d){d.done?a(d.value):i(d.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function BU(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var In=64,VU=32,HU=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]),GU=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],KU=Math.pow(2,53)-1,Bc=(function(){function e(){this.state=Int32Array.from(GU),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>KU)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===In&&(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%In>=In-8){for(var i=this.bufferLength;i<In;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<In-8;i++)r.setUint8(i,0);r.setUint32(In-8,Math.floor(t/4294967296),!0),r.setUint32(In-4,t),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(VU),i=0;i<8;i++)a[i*4]=this.state[i]>>>24&255,a[i*4+1]=this.state[i]>>>16&255,a[i*4+2]=this.state[i]>>>8&255,a[i*4+3]=this.state[i]>>>0&255;return a},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],a=n[1],o=n[2],s=n[3],l=n[4],c=n[5],d=n[6],f=n[7],h=0;h<In;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 b=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(m+this.temp[h-7]|0)+(b+this.temp[h-16]|0)}var _=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&c^~l&d)|0)+(f+(HU[h]+this.temp[h]|0)|0)|0,x=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&a^i&o^a&o)|0;f=d,d=c,c=l,l=s+_|0,s=o,o=a,a=i,i=_+x|0}n[0]+=i,n[1]+=a,n[2]+=o,n[3]+=s,n[4]+=l,n[5]+=c,n[6]+=d,n[7]+=f},e})(),WU=(function(){function e(t){this.secret=t,this.hash=new Bc,this.reset()}return e.prototype.update=function(t){if(!(yp(t)||this.error))try{this.hash.update(iu(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 jU(this,void 0,void 0,function(){return BU(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Bc,this.secret){this.outer=new Bc;var t=QU(this.secret),r=new Uint8Array(In);r.set(t);for(var n=0;n<In;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 QU(e){var t=iu(e);if(t.byteLength>In){var r=new Bc;r.update(t),t=r.digest()}var n=new Uint8Array(In);return n.set(t),n}var YU=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function JU(e){if(XU(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return ZU(t)}return!1}function XU(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function ZU(e){return e&&YU.every(function(t){return typeof e[t]=="function"})}var eq=(function(){function e(t){JU(jc())?this.hash=new qU(t):this.hash=new WU(t)}return e.prototype.update=function(t,r){this.hash.update(iu(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const tq=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",a=n?.userAgentData?.platform??N_.os(i)??"other",o=void 0,s=n?.userAgentData?.brands??[],l=s[s.length-1],c=l?.brand??N_.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${a}`,o],["lang/js"],["md/browser",`${c}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},N_={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"}},rq=e=>()=>Promise.reject(e),P_=typeof TextEncoder=="function"?new TextEncoder:null,nq=e=>{if(typeof e=="string"){if(P_)return P_.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}`)},iq=["in-region","cross-region","mobile","standard","legacy"],aq=({defaultsMode:e}={})=>eU(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(oq()?"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 ${iq.join(", ")}, got ${t}`)}}),oq=()=>{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 sq{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const n=r.getMemberSchemas(),i=Object.values(n).find(a=>!!a.getMergedTraits().httpPayload);if(i){const a=i.getMergedTraits().mediaType;return a||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(o=>{const{httpQuery:s,httpQueryParams:l,httpHeader:c,httpLabel:d,httpPrefixHeaders:f}=o.getMergedTraits();return!s&&!l&&!c&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,a,o){let s=t;t.includes("#")&&([,s]=t.split("#"));const l={$metadata:a,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:o?.(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 a=vn.for(i),o=vn.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(a),t.copyFrom(o),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=E_(t,r);n&&(i.message=n);const a=i.Error??{};a.Type=i.Error?.Type,a.Code=i.Error?.Code,a.Message=i.Error?.message??i.Error?.Message??n,i.Error=a;const o=i.$metadata.requestId;return o&&(i.RequestId=o),i}return E_(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,a]=n.split(";"),o=Object.keys(t),s={Code:i,Type:a};t.Code=i,t.Type=a;for(let l=0;l<o.length;l++){const c=o[l];s[c==="message"?"Message":c]=t[c]}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=>_r.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class tg{serdeContext;setSerdeContext(t){this.serdeContext=t}}class lq{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 uq(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 wi(n,"bigDecimal"):BigInt(n)}return t}const cq=(e,t)=>mp(e,t).then(r=>(t?.utf8Encoder??Km)(r)),dq=(e,t)=>cq(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{}}),O_=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),Ah=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},fq=(e,t)=>{const r=O_(e.headers,"x-amzn-errortype");if(r!==void 0)return Ah(e.headers[r]);if(t&&typeof t=="object"){const n=O_(t,"code");if(n&&t[n]!==void 0)return Ah(t[n]);if(t.__type!==void 0)return Ah(t.__type)}};class hq extends tg{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,uq):await dq(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=_r.of(t);if(n){if(i.isStructSchema()){const o=r,s=i.isUnionSchema(),l={};let c;const{jsonName:d}=this.settings;d&&(c={});let f;s&&(f=new lq(o,l));for(const[h,p]of i.structIterator()){let m=h;d&&(m=p.getMergedTraits().jsonName??m,c[m]=h),s&&f.mark(m),o[m]!=null&&(l[h]=this._read(p,o[m]))}if(s)f.writeUnknown();else if(typeof o.__type=="string")for(const h in o){const p=o[h],m=d?c[h]??h:h;m in l||(l[m]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const o=i.getValueSchema(),s=[];for(const l of r)s.push(this._read(o,l));return s}if(i.isMapSchema()){const o=i.getValueSchema(),s={};for(const l in r)s[l]=this._read(o,r[l]);return s}}if(i.isBlobSchema()&&typeof r=="string")return Qd(r);const a=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&a)return a==="application/json"||a.endsWith("+json")?$a.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(_R(i,this.settings)){case 5:return L9(r);case 6:return vR(r);case 7:return j9(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 wi)return r;const o=r;return o.type==="bigDecimal"&&"string"in o?new wi(o.string,o.type):new wi(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 o=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof wi?o[s]=l:o[s]=this._read(i,l)}return o}else return structuredClone(r);return r}}const M_="Ν";class pq{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 wi){const n=`${M_+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${M_+"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 mq extends tg{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=_r.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 pq;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=_r.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",a=_r.of(t);if(i){if(a.isStructSchema()){const o=r,s={},{jsonName:l}=this.settings;let c;l&&(c={});let d=0;for(const[f,h]of a.structIterator()){const p=this._write(h,o[f],a);if(p!==void 0){let m=f;l&&(m=h.getMergedTraits().jsonName??f,c[f]=m),s[m]=p,d++}}if(a.isUnionSchema()&&d===0){const{$unknown:f}=o;if(Array.isArray(f)){const[h,p]=f;s[h]=this._write(15,p)}}else if(typeof o.__type=="string")for(const f in o){const h=o[f],p=l?c[f]??f:f;p in s||(s[p]=this._write(15,h))}return s}if(Array.isArray(r)&&a.isListSchema()){const o=a.getValueSchema(),s=[],l=!!a.getMergedTraits().sparse;for(const c of r)(l||c!=null)&&s.push(this._write(o,c));return s}if(a.isMapSchema()){const o=a.getValueSchema(),s={},l=!!a.getMergedTraits().sparse;for(const c in r){const d=r[c];(l||d!=null)&&(s[c]=this._write(o,d))}return s}if(r instanceof Uint8Array&&(a.isBlobSchema()||a.isDocumentSchema()))return a===this.rootSchema?r:(this.serdeContext?.base64Encoder??ud)(r);if(r instanceof Date&&(a.isTimestampSchema()||a.isDocumentSchema()))switch(_R(a,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return O9(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof wi&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(a.isStringSchema()){if(typeof r>"u"&&a.isIdempotencyToken())return bR();const o=a.getMergedTraits().mediaType;return r!=null&&o&&(o==="application/json"||o.endsWith("+json"))?$a.from(r):r}if(typeof r=="number"&&a.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&a.isBlobSchema())return a===this.rootSchema?r:(this.serdeContext?.base64Encoder??ud)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),a.isDocumentSchema())if(i){const o=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof wi?(this.useReplacer=!0,o[s]=l):o[s]=this._write(a,l)}return o}else return structuredClone(r);return r}}}class gq extends tg{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new mq(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new hq(this.settings);return t.setSerdeContext(this.serdeContext),t}}class vq extends Z9{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=a??new gq({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new sq(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"),(Uc(t.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(t,r,n,i,a){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const o=fq(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,o,this.options.defaultNamespace);const{errorSchema:s,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,n,i,a,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=_r.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[b,_]of c.structIterator())i[b]!=null&&(p[b]=m.readObject(_,i[b]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:c.getMergedTraits().error,message:d},p),i)}}class bq extends vq{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const au="ref",lo=-1,tc=!0,L_="isSet",KR="PartitionResult",rc="booleanEquals",Ch="getAttr",cl="stringEquals",z_={[au]:"Endpoint"},Dh={[au]:KR},Rl={[au]:"Region"},gi={},U_=[Rl],q_={conditions:[[L_,[z_]],[L_,U_],["aws.partition",U_,KR],[rc,[{[au]:"UseFIPS"},tc]],[rc,[{fn:Ch,argv:[Dh,"supportsFIPS"]},tc]],[rc,[{[au]:"UseDualStack"},tc]],[rc,[{fn:Ch,argv:[Dh,"supportsDualStack"]},tc]],[cl,[{fn:Ch,argv:[Dh,"name"]},"aws"]],[cl,[Rl,"us-east-1"]],[cl,[Rl,"us-east-2"]],[cl,[Rl,"us-west-1"]],[cl,[Rl,"us-west-2"]]],results:[[lo],[lo,"Invalid Configuration: FIPS and custom endpoint are not supported"],[lo,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[z_,gi],["https://cognito-idp-fips.us-east-1.amazonaws.com",gi],["https://cognito-idp-fips.us-east-2.amazonaws.com",gi],["https://cognito-idp-fips.us-west-1.amazonaws.com",gi],["https://cognito-idp-fips.us-west-2.amazonaws.com",gi],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",gi],[lo,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",gi],[lo,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",gi],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",gi],[lo,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",gi],[lo,"Invalid Configuration: Missing Region"]]},_q=2,hr=1e8,yq=new Int32Array([-1,1,-1,0,17,3,1,4,hr+16,2,5,hr+16,3,9,6,5,7,hr+15,6,8,hr+14,7,hr+12,hr+13,4,11,10,5,hr+9,hr+11,5,12,hr+10,6,13,hr+9,8,hr+4,14,9,hr+5,15,10,hr+6,16,11,hr+7,hr+8,3,hr+1,18,5,hr+2,hr+3]),xq=Ym.from(yq,_q,q_.conditions,q_.results),Sq=new cz({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Eq=(e,t={})=>Sq.get(e,()=>$z(xq,{endpointParams:e,logger:t.logger}));Jm.aws=$R;class _e extends ms{constructor(t){super(t),Object.setPrototypeOf(this,_e.prototype)}}class rg extends _e{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,rg.prototype)}}class ng extends _e{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,ng.prototype)}}class ig extends _e{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,ig.prototype),this.reasonCode=t.reasonCode}}class ag extends _e{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,ag.prototype)}}class og extends _e{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,og.prototype)}}class sg extends _e{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,sg.prototype)}}class lg extends _e{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,lg.prototype)}}class ug extends _e{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,ug.prototype)}}class cg extends _e{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,cg.prototype)}}class dg extends _e{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,dg.prototype)}}class fg extends _e{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,fg.prototype)}}class hg extends _e{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,hg.prototype)}}class pg extends _e{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,pg.prototype)}}class mg extends _e{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,mg.prototype)}}class gg extends _e{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,gg.prototype)}}class vg extends _e{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,vg.prototype)}}class bg extends _e{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,bg.prototype)}}class _g extends _e{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,_g.prototype)}}class yg extends _e{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,yg.prototype)}}class xg extends _e{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,xg.prototype)}}class Sg extends _e{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,Sg.prototype)}}class Eg extends _e{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,Eg.prototype)}}class wg extends _e{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,wg.prototype)}}class Rg extends _e{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,Rg.prototype)}}class kg extends _e{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,kg.prototype)}}class Ag extends _e{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,Ag.prototype)}}class Cg extends _e{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,Cg.prototype)}}class Dg extends _e{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,Dg.prototype)}}class $g extends _e{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,$g.prototype)}}class Fg extends _e{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,Fg.prototype)}}class Ig extends _e{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,Ig.prototype)}}class Tg extends _e{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,Tg.prototype)}}class Ng extends _e{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,Ng.prototype)}}class Pg extends _e{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,Pg.prototype)}}class Og extends _e{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,Og.prototype)}}class Mg extends _e{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,Mg.prototype)}}class Lg extends _e{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,Lg.prototype)}}class zg extends _e{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,zg.prototype)}}class Ug extends _e{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,Ug.prototype)}}class qg extends _e{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,qg.prototype)}}class jg extends _e{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,jg.prototype)}}class Bg extends _e{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,Bg.prototype)}}class Vg extends _e{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,Vg.prototype)}}class Hg extends _e{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,Hg.prototype)}}class Gg extends _e{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,Gg.prototype)}}class Kg extends _e{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,Kg.prototype)}}class Wg extends _e{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,Wg.prototype)}}class Qg extends _e{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,Qg.prototype)}}class Yg extends _e{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,Yg.prototype)}}class Jg extends _e{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,Jg.prototype)}}class Xg extends _e{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,Xg.prototype)}}class Zg extends _e{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,Zg.prototype)}}class ev extends _e{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,ev.prototype)}}class tv extends _e{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,tv.prototype)}}class rv extends _e{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,rv.prototype)}}class nv extends _e{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,nv.prototype)}}class iv extends _e{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,iv.prototype)}}const wq="AvailableChallenges",Rq="AccessDeniedException",kq="AliasExistsException",Aq="AnalyticsEndpointId",Cq="AuthFlow",Dq="AnalyticsMetadata",$q="AnalyticsMetadataType",Fq="AuthParameters",Iq="AuthParametersType",Tq="AuthenticationResult",Nq="AuthenticationResultType",Pq="AccessToken",Oq="CodeDeliveryFailureException",Mq="ClientId",Lq="ClientIdType",zq="ClientMetadata",Uq="CodeMismatchException",qq="ConcurrentModificationException",jq="ChallengeName",Bq="ChallengeParameters",Vq="DeviceGroupKey",Hq="DeviceKey",Gq="DeviceKeyExistsException",Kq="DuplicateProviderException",Wq="ExpiredCodeException",Qq="EncodedData",Yq="ExpiresIn",Jq="EnableSoftwareTokenMFAException",Xq="ForbiddenException",Zq="FeatureUnavailableInTierException",ej="GroupExistsException",tj="IpAddress",rj="InitiateAuthRequest",nj="InitiateAuthResponse",ij="InitiateAuth",aj="InternalErrorException",oj="InvalidEmailRoleAccessPolicyException",sj="InvalidLambdaResponseException",lj="InvalidOAuthFlowException",uj="InvalidParameterException",cj="InvalidPasswordException",dj="InternalServerException",fj="InvalidSmsRoleAccessPolicyException",hj="InvalidSmsRoleTrustRelationshipException",pj="IdToken",mj="InvalidUserPoolConfigurationException",gj="LimitExceededException",vj="MFAMethodNotFoundException",bj="ManagedLoginBrandingExistsException",_j="NotAuthorizedException",yj="NewDeviceMetadata",xj="NewDeviceMetadataType",Sj="PasswordHistoryPolicyViolationException",Ej="PreconditionNotMetException",wj="PasswordResetRequiredException",Rj="ResourceNotFoundException",kj="RefreshToken",Aj="RefreshTokenReuseException",WR="Session",Cj="ScopeDoesNotExistException",Dj="SessionType",$j="SoftwareTokenMFANotFoundException",Fj="TierChangeNotAllowedException",Ij="TermsExistsException",Tj="TooManyFailedAttemptsException",Nj="TooManyRequestsException",Pj="TokenModelType",Oj="TokenType",Mj="UserContextDataType",Lj="UserContextData",zj="UnauthorizedException",Uj="UsernameExistsException",qj="UserImportInProgressException",jj="UnsupportedIdentityProviderException",Bj="UnexpectedLambdaException",Vj="UserLambdaValidationException",Hj="UserNotConfirmedException",Gj="UserNotFoundException",Kj="UnsupportedOperationException",Wj="UserPoolAddOnNotEnabledException",Qj="UserPoolTaggingException",Yj="UnsupportedTokenTypeException",Jj="UnsupportedUserStateException",Xj="WebAuthnClientMismatchException",Zj="WebAuthnConfigurationMissingException",eB="WebAuthnChallengeNotFoundException",tB="WebAuthnCredentialNotSupportedException",rB="WebAuthnNotEnabledException",nB="WebAuthnOriginNotAllowedException",iB="WebAuthnRelyingPartyMismatchException",Fe="client",Ae="error",Ie="httpError",Ce="message",aB="reasonCode",QR="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",YR="server",he="com.amazonaws.cognitoidentityprovider",JR=vn.for(QR);var oB=[-3,QR,"CognitoIdentityProviderServiceException",0,[],[]];JR.registerError(oB,_e);const ke=vn.for(he);var sB=[-3,he,Rq,{[Ae]:Fe,[Ie]:403},[Ce],[0]];ke.registerError(sB,rg);var lB=[-3,he,kq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(lB,Eg);var uB=[-3,he,Oq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(uB,gg);var cB=[-3,he,Uq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(cB,Fg);var dB=[-3,he,qq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(dB,Pg);var fB=[-3,he,Gq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(fB,Bg);var hB=[-3,he,Kq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(hB,Hg);var pB=[-3,he,Jq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(pB,iv);var mB=[-3,he,Wq,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(mB,Ig);var gB=[-3,he,Zq,{[Ae]:Fe,[Ie]:403},[Ce],[0]];ke.registerError(gB,Wg);var vB=[-3,he,Xq,{[Ae]:Fe,[Ie]:403},[Ce],[0]];ke.registerError(vB,Og);var bB=[-3,he,ej,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(bB,Vg);var _B=[-3,he,aj,{[Ae]:YR},[Ce],[0]];ke.registerError(_B,ng);var yB=[-3,he,dj,{[Ae]:YR},[Ce],[0]];ke.registerError(yB,ug);var xB=[-3,he,oj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(xB,Rg);var SB=[-3,he,sj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(SB,fg);var EB=[-3,he,lj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(EB,Jg);var wB=[-3,he,uj,{[Ae]:Fe,[Ie]:400},[Ce,aB],[0,0]];ke.registerError(wB,ig);var RB=[-3,he,cj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(RB,vg);var kB=[-3,he,fj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(kB,bg);var AB=[-3,he,hj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(AB,_g);var CB=[-3,he,mj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(CB,wg);var DB=[-3,he,gj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(DB,cg);var $B=[-3,he,bj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError($B,Gg);var FB=[-3,he,vj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(FB,kg);var IB=[-3,he,_j,{[Ae]:Fe,[Ie]:403},[Ce],[0]];ke.registerError(IB,ag);var TB=[-3,he,Sj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(TB,Tg);var NB=[-3,he,wj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(NB,Ag);var PB=[-3,he,Ej,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(PB,yg);var OB=[-3,he,Aj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(OB,ev);var MB=[-3,he,Rj,{[Ae]:Fe,[Ie]:404},[Ce],[0]];ke.registerError(MB,og);var LB=[-3,he,Cj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(LB,Xg);var zB=[-3,he,$j,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(zB,Ng);var UB=[-3,he,Ij,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(UB,Kg);var qB=[-3,he,Fj,{[Ae]:Fe,[Ie]:403},[Ce],[0]];ke.registerError(qB,Qg);var jB=[-3,he,Tj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(jB,hg);var BB=[-3,he,Nj,{[Ae]:Fe,[Ie]:429},[Ce],[0]];ke.registerError(BB,sg);var VB=[-3,he,zj,{[Ae]:Fe,[Ie]:401},[Ce],[0]];ke.registerError(VB,tv);var HB=[-3,he,Bj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(HB,pg);var GB=[-3,he,jj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(GB,Zg);var KB=[-3,he,Kj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(KB,Cg);var WB=[-3,he,Yj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(WB,rv);var QB=[-3,he,Jj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(QB,xg);var YB=[-3,he,qj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(YB,lg);var JB=[-3,he,Vj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(JB,mg);var XB=[-3,he,Uj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(XB,Sg);var ZB=[-3,he,Hj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(ZB,Dg);var eV=[-3,he,Gj,{[Ae]:Fe,[Ie]:404},[Ce],[0]];ke.registerError(eV,dg);var tV=[-3,he,Wj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(tV,$g);var rV=[-3,he,Qj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(rV,Yg);var nV=[-3,he,eB,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(nV,Mg);var iV=[-3,he,Xj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(iV,Lg);var aV=[-3,he,Zj,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(aV,nv);var oV=[-3,he,tB,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(oV,zg);var sV=[-3,he,rB,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(sV,Ug);var lV=[-3,he,nB,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(lV,qg);var uV=[-3,he,iB,{[Ae]:Fe,[Ie]:400},[Ce],[0]];ke.registerError(uV,jg);const cV=[JR,ke];var dV=[0,he,Lq,8,0],XR=[0,he,Dj,8,0],$h=[0,he,Pj,8,0],fV=[3,he,$q,0,[Aq],[0]],hV=[3,he,Nq,0,[Pq,Yq,Oj,kj,pj,yj],[[()=>$h,0],1,0,[()=>$h,0],[()=>$h,0],()=>gV]],pV=[3,he,rj,0,[Cq,Mq,Fq,zq,Dq,Lj,WR],[0,[()=>dV,0],[()=>bV,0],128,()=>fV,[()=>vV,0],[()=>XR,0]],2],mV=[3,he,nj,0,[jq,WR,Bq,Tq,wq],[0,[()=>XR,0],128,[()=>hV,0],64]],gV=[3,he,xj,0,[Hq,Vq],[0,0]],vV=[3,he,Mj,8,[tj,Qq],[0,0]],bV=[2,he,Iq,8,0,0],_V=[9,he,ij,0,()=>pV,()=>mV];const yV=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??Qd,base64Encoder:e?.base64Encoder??ud,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Eq,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??FU,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Z7},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rz}],logger:e?.logger??new LR,protocol:e?.protocol??bq,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:cV,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??Ns,utf8Decoder:e?.utf8Decoder??Ts,utf8Encoder:e?.utf8Encoder??Km}),xV=e=>{const t=aq(e),r=()=>t().then(O7),n=yV(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??nq,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??tq({serviceId:n.serviceId,clientVersion:OU.version}),maxAttempts:e?.maxAttempts??Nl,region:e?.region??rq("Region is missing"),requestHandler:Wm.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||Lz),sha256:e?.sha256??eq,streamCollector:e?.streamCollector??h9,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(c7)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(d7))}},SV=e=>({setRegion(t){e.region=t},region(){return e.region}}),EV=e=>({region:e.region()}),wV=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const a=t.findIndex(o=>o.schemeId===i.schemeId);a===-1?t.push(i):t.splice(a,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},RV=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),kV=(e,t)=>{const r=Object.assign(SV(e),q7(e),UL(e),wV(e));return t.forEach(n=>n.configure(r)),Object.assign(e,EV(r),j7(r),qL(r),RV(r))};class ZR extends N7{config;constructor(...[t]){const r=xV(t||{});super(r),this.initConfig=r;const n=TU(r),i=uz(n),a=T7(i),o=p7(a),s=o,l=F7(s),c=IU(l),d=kV(c,t?.extensions||[]);this.config=d,this.middlewareStack.use(w9(this.config)),this.middlewareStack.use(u7(this.config)),this.middlewareStack.use(Y7(this.config)),this.middlewareStack.use(v7(this.config)),this.middlewareStack.use(HL(this.config)),this.middlewareStack.use(WL(this.config)),this.middlewareStack.use(JL(this.config)),this.middlewareStack.use(r9(this.config,{httpAuthSchemeParametersProvider:DU,identityProviderConfigProvider:async f=>new tz({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(s9(this.config))}destroy(){super.destroy()}}class ek extends OR.classBuilder().ep(NU).m(function(t,r,n,i){return[$7(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(_V).build(){}let AV="reventless.auth.v1",CV=300*1e3;function DV(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=le.object(r);if(n===void 0)return;let i=S(n.token,le.string),a=n.identity,o=S(n.refreshToken,le.string),s=S(n.expiresAt,le.float);return i!==void 0&&a!==void 0?B(le.object(a),l=>{let c=f=>S(l[f],le.string),d=ee(D(S(l.groups,le.array),[]),le.string);return{token:i,identity:{userId:D(c("userId"),""),username:D(c("username"),""),groups:d,provider:D(c("provider"),"InMemory")},refreshToken:o,expiresAt:s}}):void 0}catch{return}}function Fh(e,t){let r=t.identity.groups.map(d=>d),n=Object.fromEntries([["userId",t.identity.userId],["username",t.identity.username],["groups",r],["provider",t.identity.provider]]),i=[["token",t.token],["identity",n]],a=t.refreshToken,o=a!==void 0?i.concat([["refreshToken",a]]):i,s=t.expiresAt,l=s!==void 0?o.concat([["expiresAt",s]]):o,c=JSON.stringify(Object.fromEntries(l));localStorage.setItem(e,c)}function $V(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function FV(e){let t=n=>D(S(e[n],le.string),""),r=ee(D(S(e.groups,le.array),[]),le.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider")}}function tk(e){let t=n=>S(e[n],le.string),r=ee(D(S(e["cognito:groups"],le.array),[]),le.string);return{userId:D(t("sub"),""),username:D(tE(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito"}}function rk(e){try{return ML(e)}catch{return}}function IV(e){let t=e.IdToken;if(t===void 0)return;let r=rk(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:tk(r),refreshToken:e.RefreshToken,expiresAt:i}}async function TV(e,t,r,n){try{let i=new ZR({region:t}),a=new ek({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),o=await i.send(a),s=S(o.AuthenticationResult,IV);return s!==void 0?{TAG:"Ok",_0:s}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let a=qs(i);return{TAG:"Error",_0:Gm(Hm(a))}}}async function NV(e,t,r,n){try{let i=new ZR({region:t}),a=new ek({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),s=(await i.send(a)).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 c=rk(l),d=D(B(c,tk),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 a=qs(i);return{TAG:"Error",_0:Gm(Hm(a))}}}let nk=Mt(void 0),PV=nk.Provider;function OV(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,a=e.authMode,o=t!==void 0?t:AV,s=X(()=>DV(o)),l=s[1],c=s[0];Re(()=>{if(c===void 0)return;let _=c.refreshToken;if(_===void 0)return;let x=c.expiresAt;if(x===void 0)return;let E=c.identity;switch(a){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let k=Math.max(0,x-Date.now()-CV),w=setTimeout(()=>{NV(n,r,_,E).then(C=>{if(C.TAG==="Ok"){let $=C._0;return Fh(o,$),l(A=>$)}localStorage.removeItem(o),l($=>{})})},k);return()=>{clearTimeout(w)}}},[c,a,n,r]);let d=B(c,_=>_.identity),f=He(c);return Kt(PV,{value:{identity:d,isAuthenticated:f,login:async(_,x)=>{try{let E=0;switch(a){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 k=await TV(n,r,_,x);if(k.TAG!=="Ok")return{TAG:"LoginErr",_0:k._0};let w=k._0;return Fh(o,w),l(C=>w),"LoginOk"}if(E===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let k=await fetch($V(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:_,password:x}),"")}),w=await k.json();if(k.ok){let $=le.object(w);if($===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let A=S($.token,le.string),F=S($.identity,le.object);if(A===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(F===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=FV(F),O={token:A,identity:N,refreshToken:void 0,expiresAt:void 0};return Fh(o,O),l(L=>O),"LoginOk"}return{TAG:"LoginErr",_0:D(S(S(le.object(w),$=>$.error),le.string),"Login failed")}}}catch(E){let k=qs(E);return{TAG:"LoginErr",_0:Gm(Hm(k))}}},logout:()=>{localStorage.removeItem(o),l(_=>{})},getToken:()=>B(c,_=>_.token)},children:e.children})}let MV={make:OV};function Uo(){return bt(nk)}let LV={background:"var("+v.surface+")",border:"1px solid var("+v.border+")",color:"var("+v.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+R.fontFamily+")",fontSize:"var("+R.sizeSm+")",fontWeight:"var("+R.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+H.md+")",alignItems:"center",gap:"0.375rem"},zV={color:"var("+v.textSecondary+")",fontSize:"0.625rem"},UV={background:"var("+v.surfaceElevated+")",border:"1px solid var("+v.borderSubtle+")",color:"var("+v.textPrimary+")",fontFamily:"var("+R.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+H.md+")",boxShadow:"var("+Sr.md+")"},qV={background:"var("+v.brandSubtle+")",color:"var("+v.brand+")",display:"inline-block",fontSize:"var("+R.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+H.full+")"},jV={border:"none",borderTop:"1px solid var("+v.borderSubtle+")",margin:"0.5rem 0"},BV={background:"transparent",border:"1px solid var("+v.border+")",color:"var("+v.textPrimary+")",cursor:"pointer",fontSize:"var("+R.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+H.sm+")"};function VV(e){let t=Uo(),r=X(()=>!1);if(t===void 0)return null;let n=r[1],i=r[0],a=t.identity;return a!==void 0?P("div",{children:[P("button",{children:[a.username,g("span",{children:i?"▴":"▾",style:zV})],"aria-label":"Signed in as "+a.username,style:LV,onClick:o=>n(s=>!s)}),i?P("div",{children:[g("div",{children:a.username,style:{fontSize:"var("+R.sizeMd+")",fontWeight:"var("+R.weightMedium+")",marginBottom:"0.25rem"}}),a.groups.length!==0?g("div",{children:a.groups.map(o=>g("span",{children:o,style:qV},o)),style:{marginBottom:"0.25rem"}}):null,g("hr",{style:jV}),g("button",{children:"Sign out",style:BV,onClick:o=>{n(s=>!1),t.logout()}})],style:UV}):null],style:{position:"relative"}}):null}let HV=VV,GV={background:"var("+v.surface+")",border:"1px solid var("+v.borderSubtle+")",color:"var("+v.textPrimary+")",fontFamily:"var("+R.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+H.md+")"},j_={color:"var("+v.textSecondary+")",display:"block",fontSize:"var("+R.sizeSm+")",marginBottom:"0.25rem"},B_={background:"var("+v.surfaceElevated+")",border:"1px solid var("+v.border+")",color:"var("+v.textPrimary+")",fontSize:"var("+R.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+H.sm+")",boxSizing:"border-box"};function KV(e){return{background:e?"var("+v.textDisabled+")":"var("+v.brand+")",border:"none",color:"var("+v.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+R.sizeMd+")",fontWeight:"var("+R.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+H.sm+")"}}let WV={color:"var("+v.error+")",fontSize:"var("+R.sizeSm+")",marginBottom:"0.75rem"};function QV(e){let t=Uo(),r=X(()=>""),n=r[1],i=r[0],a=X(()=>""),o=a[1],s=a[0],l=X(()=>{}),c=l[1],d=l[0],f=X(()=>!1),h=f[1],p=f[0],m=b=>{b.preventDefault(),c(_=>{}),h(_=>!0),t!==void 0?yt(t.login(i,s).then(_=>{if(h(E=>!1),typeof _!="object")return;let x=_._0;c(E=>x)}),_=>(h(x=>!1),c(x=>"Unexpected error during sign-in"),Promise.resolve())):(c(_=>"Auth provider missing"),h(_=>!1),Promise.resolve())};return P("div",{children:[g("h1",{children:"Sign in",style:{fontSize:"var("+R.sizeXl+")",fontWeight:"var("+R.weightBold+")",margin:"0 0 1.5rem"}}),P("form",{children:[g("label",{children:"Username",style:j_}),g("input",{style:B_,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:b=>{let _=b.target.value;n(x=>_)}}),g("label",{children:"Password",style:j_}),g("input",{style:B_,autoComplete:"current-password",type:"password",value:s,onChange:b=>{let _=b.target.value;o(x=>_)}}),d!==void 0?g("div",{children:d,style:WV}):null,g("button",{children:p?"Signing in…":"Sign in",style:KV(p),disabled:p,type:"submit"})],onSubmit:m})],style:GV})}let V_=QV;function YV(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(cF(e.routes,n),i)}let JV=YV;function XV(e){let t=e.route,n=bt(Cd).prefix,i=n===""||t.startsWith(n)?t:n+t;return g("a",{children:e.children,href:i,onClick:a=>{if(!a.defaultPrevented&&a.button===0&&!a.altKey&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey)return a.preventDefault(),As(i)}})}let ZV=XV,ku=Mt(void 0),eH=ku.Provider;function tH(e){let t=e.initialPages,r=t!==void 0?t:[],n=X(()=>r),i=n[1],a=X(()=>[]),o=a[1],s=n[0].concat(a[0]);return Kt(eH,{value:{register:m=>i(b=>b.concat(m)),deregister:m=>i(b=>b.filter(_=>_.fragmentId!==m)),setPluginPages:m=>o(b=>m),getPages:()=>s,getPage:m=>s.find(b=>b.fragmentId===m)},children:e.children})}let rH={make:tH};function ik(){let e=bt(ku);return e!==void 0?e.getPages():[]}let nH=[];function iH(e){return!1}let aH={activeAccess:nH,hasAccess:iH},ak=Mt(aH),oH=ak.Provider;function sH(e){let t=e.access;return Kt(oH,{value:{activeAccess:t,hasAccess:i=>t.some(a=>a===i)},children:e.children})}function Au(){return bt(ak).hasAccess}let lH=sH;function Ss(e){return"var("+e+")"}let uH=y([M("flex"),W("center"),u("gap",Ss(I.sm)),u("padding","var("+I.xs+") var("+I.md+")"),u("color",Ss(v.textDisabled)),u("font-size",Ss(R.sizeSm)),xe("notAllowed"),$E("none")]),cH=y([u("font-size","14px"),An(0)]),dH=y([si(1),u("font-weight",Ss(R.weightMedium))]),fH=y([u("font-size",Ss(R.sizeXs)),u("color",Ss(v.brand)),xe("pointer"),u("text-decoration","none"),An(0)]);function hH(e){return P("div",{children:[g("span",{children:"[locked]",className:cH}),g("span",{children:e.label,className:dH}),g("span",{children:"Upgrade",className:fH})],className:uH})}let pH=hH;function mH(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function an(e){return"var("+e+")"}let gH=y([M("flex"),ce("column"),u("gap",an(I.xs)),u("padding","var("+I.sm+") 0")]),vH=y([u("color",an(v.textDisabled)),u("font-size",an(R.sizeXs)),u("font-weight",an(R.weightBold)),u("letter-spacing","0.08em"),u("text-transform","uppercase"),u("padding","var("+I.xs+") var("+I.md+")"),Pi(pe(8))]),H_=y([M("flex"),W("center"),u("gap",an(I.sm)),u("padding","var("+I.xs+") var("+I.md+")"),u("color",an(v.textSecondary)),u("font-size",an(R.sizeMd)),xe("pointer"),u("border-radius",an(H.sm)),u("text-decoration","none"),We([u("background",an(v.surfaceSubtle)),u("color",an(v.textPrimary))])]),bH=y([u("background",an(v.surfaceSubtle)),u("color",an(v.textPrimary)),u("font-weight",an(R.weightMedium))]),_H=y([u("font-size","12px"),u("color",an(v.textDisabled)),gu("auto")]);function yH(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function xH(e){let t=e.hasAccess,r=e.page,n=oe(r.requiredAccess,!1,s=>!t(s)),i=e.isActive?H_+" "+bH:H_,a=P(jr,{children:[oe(r.menuEntry.icon,null,s=>g("span",{children:s})),g("span",{children:r.menuEntry.label}),n?g("span",{children:"[locked]",className:_H}):null]}),o=r.url;return!n&&o!==void 0?g(ZV,{route:o,children:g("span",{children:a,className:i})}):g("div",{children:a,className:i,role:"button"})}function G_(e){let t=e.hasAccess,r=e.currentUrl,n=e.pages.toSorted((i,a)=>om(i.menuEntry.sortOrder,a.menuEntry.sortOrder));return P(jr,{children:[oe(e.label,null,i=>g("div",{children:i,className:vH})),n.map(i=>g(xH,{page:i,isActive:yH(i,r),hasAccess:t},i.fragmentId))]})}function SH(e){let t=e.currentUrl,r=ik(),n=Au(),i={};r.forEach(s=>{let l=D(s.menuEntry.group,""),c=D(i[l],[]);i[l]=c.concat([s])});let a=D(i[""],[]),o=Object.entries(i).filter(s=>s[0]!=="").toSorted((s,l)=>{let c=rt(s[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder),d=rt(l[1],999,(f,h)=>f<h.menuEntry.sortOrder?f:h.menuEntry.sortOrder);return om(c,d)});return P("nav",{children:[a.length!==0?g(G_,{label:void 0,pages:a,currentUrl:t,hasAccess:n}):null,o.map(s=>{let l=s[1],c=s[0];switch(mH(l,n)){case"Active":return g(G_,{label:c,pages:l,currentUrl:t,hasAccess:n},c);case"Locked":return g(pH,{label:c},c);case"Absent":return null}})],"aria-label":"primary navigation",className:gH})}let EH=SH;function Es(e){return"var("+e+")"}let wH=y([M("flex"),ce("row"),AE({NAME:"vh",VAL:100}),u("overflow","hidden"),u("background",Es(v.background))]),RH=y([M("flex"),ce("column"),u("width","240px"),An(0),u("background",Es(v.surface)),u("border-right","1px solid var("+v.borderSubtle+")"),u("overflow-y","auto")]),kH=y([u("padding","var("+I.md+") var("+I.lg+")"),u("border-bottom","1px solid var("+v.borderSubtle+")"),u("color",Es(v.textPrimary)),u("font-size",Es(R.sizeLg)),u("font-weight",Es(R.weightBold)),An(0)]),AH=y([M("flex"),ce("column"),si(1),u("overflow","hidden")]),CH=y([M("flex"),ce("column"),si(1),u("overflow","auto"),u("background",Es(v.background))]);function DH(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,a=i!==void 0?i:"Reventless",o=n!==void 0?n:"404 — Page not found",s=r!==void 0?r:!0,l=t!==void 0?t:null,c=M$();return P("div",{children:[P("aside",{children:[P("div",{children:[oe(e.logoUrl,null,d=>g("img",{style:{height:"24px",marginRight:"8px"},alt:a,src:d})),a],className:kH}),g(EH,{currentUrl:c})],className:RH}),P("main",{children:[D(e.headerSlot,null),g("div",{children:s?g(JV,{url:c,routes:e.router,children:o}):l,className:CH})],className:AH})],className:wH})}let $H=DH,FH=[u(v.background,"#0d1117"),u(v.surface,"#161b22"),u(v.surfaceSubtle,"#1c2128"),u(v.surfaceElevated,"#21262d"),u(v.brand,"#2f81f7"),u(v.brandSubtle,"#1f4b8e"),u(v.success,"#3fb950"),u(v.warning,"#d29922"),u(v.error,"#f85149"),u(v.info,"#58a6ff"),u(v.textPrimary,"#e6edf3"),u(v.textSecondary,"#8b949e"),u(v.textDisabled,"#484f58"),u(v.textOnBrand,"#ffffff"),u(v.border,"#30363d"),u(v.borderSubtle,"#21262d"),u(I.xs,"4px"),u(I.sm,"8px"),u(I.md,"16px"),u(I.lg,"24px"),u(I.xl,"32px"),u(I.xxl,"48px"),u(R.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(R.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(R.sizeXs,"11px"),u(R.sizeSm,"12px"),u(R.sizeMd,"14px"),u(R.sizeLg,"16px"),u(R.sizeXl,"20px"),u(R.sizeXxl,"24px"),u(R.weightNormal,"400"),u(R.weightMedium,"500"),u(R.weightBold,"600"),u(R.lineHeightTight,"1.25"),u(R.lineHeightNormal,"1.5"),u(R.lineHeightRelaxed,"1.75"),u(H.sm,"4px"),u(H.md,"6px"),u(H.lg,"12px"),u(H.full,"9999px"),u(Sr.sm,"0 1px 3px rgba(0,0,0,0.4)"),u(Sr.md,"0 4px 12px rgba(0,0,0,0.5)"),u(Sr.lg,"0 8px 24px rgba(0,0,0,0.6)")],IH=[u(v.background,"#ffffff"),u(v.surface,"#f6f8fa"),u(v.surfaceSubtle,"#eaeef2"),u(v.surfaceElevated,"#ffffff"),u(v.brand,"#0969da"),u(v.brandSubtle,"#ddf4ff"),u(v.success,"#1a7f37"),u(v.warning,"#9a6700"),u(v.error,"#cf222e"),u(v.info,"#0550ae"),u(v.textPrimary,"#1f2328"),u(v.textSecondary,"#636c76"),u(v.textDisabled,"#bec1c5"),u(v.textOnBrand,"#ffffff"),u(v.border,"#d0d7de"),u(v.borderSubtle,"#eaeef2"),u(I.xs,"4px"),u(I.sm,"8px"),u(I.md,"16px"),u(I.lg,"24px"),u(I.xl,"32px"),u(I.xxl,"48px"),u(R.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(R.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(R.sizeXs,"11px"),u(R.sizeSm,"12px"),u(R.sizeMd,"14px"),u(R.sizeLg,"16px"),u(R.sizeXl,"20px"),u(R.sizeXxl,"24px"),u(R.weightNormal,"400"),u(R.weightMedium,"500"),u(R.weightBold,"600"),u(R.lineHeightTight,"1.25"),u(R.lineHeightNormal,"1.5"),u(R.lineHeightRelaxed,"1.75"),u(H.sm,"4px"),u(H.md,"6px"),u(H.lg,"12px"),u(H.full,"9999px"),u(Sr.sm,"0 1px 3px rgba(0,0,0,0.08)"),u(Sr.md,"0 4px 12px rgba(0,0,0,0.12)"),u(Sr.lg,"0 8px 24px rgba(0,0,0,0.16)")],TH=[u(v.background,"#f5f5f5"),u(v.surface,"#ffffff"),u(v.surfaceSubtle,"#eeeeee"),u(v.surfaceElevated,"#ffffff"),u(v.brand,"#424242"),u(v.brandSubtle,"#e0e0e0"),u(v.success,"#388e3c"),u(v.warning,"#f57c00"),u(v.error,"#d32f2f"),u(v.info,"#1976d2"),u(v.textPrimary,"#212121"),u(v.textSecondary,"#757575"),u(v.textDisabled,"#bdbdbd"),u(v.textOnBrand,"#ffffff"),u(v.border,"#bdbdbd"),u(v.borderSubtle,"#e0e0e0"),u(I.xs,"4px"),u(I.sm,"8px"),u(I.md,"16px"),u(I.lg,"24px"),u(I.xl,"32px"),u(I.xxl,"48px"),u(R.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(R.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(R.sizeXs,"11px"),u(R.sizeSm,"12px"),u(R.sizeMd,"14px"),u(R.sizeLg,"16px"),u(R.sizeXl,"20px"),u(R.sizeXxl,"24px"),u(R.weightNormal,"400"),u(R.weightMedium,"500"),u(R.weightBold,"600"),u(R.lineHeightTight,"1.25"),u(R.lineHeightNormal,"1.5"),u(R.lineHeightRelaxed,"1.75"),u(H.sm,"4px"),u(H.md,"6px"),u(H.lg,"12px"),u(H.full,"9999px"),u(Sr.sm,"0 1px 3px rgba(0,0,0,0.12)"),u(Sr.md,"0 4px 12px rgba(0,0,0,0.14)"),u(Sr.lg,"0 8px 24px rgba(0,0,0,0.18)")],NH=[u(v.background,"#000000"),u(v.surface,"#0a0a0a"),u(v.surfaceSubtle,"#111111"),u(v.surfaceElevated,"#1a1a1a"),u(v.brand,"#ffdd00"),u(v.brandSubtle,"#332b00"),u(v.success,"#00ff00"),u(v.warning,"#ffaa00"),u(v.error,"#ff4444"),u(v.info,"#44aaff"),u(v.textPrimary,"#ffffff"),u(v.textSecondary,"#cccccc"),u(v.textDisabled,"#555555"),u(v.textOnBrand,"#000000"),u(v.border,"#ffffff"),u(v.borderSubtle,"#888888"),u(I.xs,"4px"),u(I.sm,"8px"),u(I.md,"16px"),u(I.lg,"24px"),u(I.xl,"32px"),u(I.xxl,"48px"),u(R.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u(R.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u(R.sizeXs,"11px"),u(R.sizeSm,"12px"),u(R.sizeMd,"14px"),u(R.sizeLg,"16px"),u(R.sizeXl,"20px"),u(R.sizeXxl,"24px"),u(R.weightNormal,"400"),u(R.weightMedium,"500"),u(R.weightBold,"600"),u(R.lineHeightTight,"1.25"),u(R.lineHeightNormal,"1.5"),u(R.lineHeightRelaxed,"1.75"),u(H.sm,"4px"),u(H.md,"6px"),u(H.lg,"12px"),u(H.full,"9999px"),u(Sr.sm,"0 1px 3px rgba(255,255,255,0.1)"),u(Sr.md,"0 4px 12px rgba(255,255,255,0.15)"),u(Sr.lg,"0 8px 24px rgba(255,255,255,0.2)")];function nc(e,t){let r=t!==void 0?[u(v.brand,t.primaryColor)]:[];return y(e.concat(r))}function PH(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=nc(FH,t.brand);break;case"Light":n=nc(IH,t.brand);break;case"Neutral":n=nc(TH,t.brand);break;case"HighContrast":n=nc(NH,t.brand);break}return g("div",{children:e.children,className:n})}let OH=PH;function MH(e){}let LH={preset:"Light",setPreset:MH},ok=Mt(LH),zH=ok.Provider;function UH(){return bt(ok)}let sk="reventless-ui:theme";function lk(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function xp(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function qH(e){let t=localStorage.getItem(sk);return t==null?e:lk(t)}function jH(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=X(()=>qH(r)),i=n[1],a=n[0],o=dr(l=>{localStorage.setItem(sk,xp(l)),i(c=>l)},[]),s=xt(()=>({preset:a,setPreset:o}),[a,o]);return g(zH,{value:s,children:g(OH,{theme:{preset:a,brand:e.brand},children:e.children})})}let BH={make:jH},Cu=Mt(void 0),VH=Cu.Provider;function HH(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],a=X(()=>n),o=a[1],s=X(()=>[]),l=s[1],c=a[0].concat(s[0]);return Kt(VH,{value:{register:x=>o(E=>E.concat(x)),deregister:x=>o(E=>E.filter(k=>k.extensionPackage!==x)),setPluginPanels:x=>l(E=>x),getPanel:x=>c.find(E=>E.fragmentId===x),getPanelsForPosition:x=>c.filter(E=>E.positions.some(k=>k===x)),hasAccess:x=>i.some(E=>E===x)},children:e.children})}let GH={make:HH};function KH(e){let t=bt(Cu);return t!==void 0?t.getPanelsForPosition(e):[]}function WH(e){let t=bt(Cu);if(t!==void 0)return t.getPanel(e)}function av(e){return"/"+e.environment+"/"+e.platformName}function uk(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 a={environment:n,platformName:i},o=av(a),s=t.startsWith(o)?t.slice(o.length):"/";return[a,s===""?"/":s]}let QH=Mt(void 0),YH=QH.Provider;function JH(e){return Kt(YH,{value:e.scope,children:e.children})}let ck={make:JH};function XH(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 dk=Mt(void 0),fk=Mt({routes:[],publicLinks:Co()}),hk=Mt(!1),ZH=dk.Provider;function eG(e){return Kt(ZH,{value:e.value,children:e.children})}let tG=fk.Provider;function rG(e){return Kt(tG,{value:e.value,children:e.children})}let nG=hk.Provider;function iG(e){return Kt(nG,{value:e.value,children:e.children})}function aG(e){let t=X(()=>({routes:[],publicLinks:Co()})),r=t[1],n=t[0],i=X(()=>({routes:[],publicLinks:Co()})),a=i[1],o=i[0],s=X(()=>!1),l=s[1],c=n.routes.concat(o.routes),d=np(n.publicLinks,o.publicLinks),f={routes:c,publicLinks:d};return g(eG,{value:{register:(b,_)=>r(x=>({routes:x.routes.concat(b),publicLinks:np(x.publicLinks,_)})),setPluginRoutes:(b,_)=>{a(x=>({routes:b,publicLinks:_})),l(x=>!0)}},children:g(iG,{value:s[0],children:g(rG,{value:f,children:g(gF.make,{registry:d,children:e.children})})})})}let oG={make:aG};function ov(){return bt(dk)}function sG(){return bt(hk)}function lG(){let e=bt(fk).routes;return xt(()=>lF(XH(e.toReversed())),[e])}function dl(e){return"var("+e+")"}let uG=y([u("background",dl(v.surface)),u("color",dl(v.textPrimary)),u("border","1px solid var("+v.border+")"),u("border-radius",dl(H.sm)),u("padding","4px 8px"),u("font-size",dl(R.sizeSm)),u("font-family",dl(R.fontFamily)),xe("pointer")]);function cG(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}let dG=["Light","Dark","Neutral","HighContrast"];function fG(e){let t=UH(),r=t.setPreset,n=i=>{let a=i.target.value;r(lk(a))};return g("select",{children:dG.map(i=>{let a=xp(i);return g("option",{children:cG(i),value:a},a)}),className:uG,value:xp(t.preset),onChange:n})}let hG=fG;function pG(e){let r=(e.startsWith("https://")?"wss://"+e.slice(8):e.startsWith("http://")?"ws://"+e.slice(7):e).replace("appsync-api.","appsync-realtime-api.");return r.endsWith("/realtime")?r:r+"/realtime"}function mG(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function gG(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function vG(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+gG(r)}function Sp(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 a=Date.now()-i;e.disconnectedSince=void 0,Q(e.onReconnect,o=>o(a))}break}if(n===1)switch(r){case"Closed":case"Connecting":break;case"Open":e.disconnectedSince=Date.now();break}Q(e.onStateChange,i=>i(t))}function bG(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 _G='{"type":"connection_init"}';function Ep(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]]),a=JSON.stringify(Object.fromEntries([["type","subscribe"],["id",t.id],["channel",t.channel],["authorization",i]]));try{Ot(r).send(a);return}catch{return}}function yG(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{Ot(r).send(n);return}catch{return}}function xG(e){e.subscriptions.forEach(t=>Ep(e,t))}function SG(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=S(r,le.object);if(n===void 0)return;let i=S(n.type,le.string);if(i!==void 0)switch(i){case"connection_ack":Sp(e,"Open"),e.reconnectAttempts=0;let a=e.pendingPostAck;return e.pendingPostAck=[],a.forEach(h=>h()),xG(e);case"data":let o=S(n.id,le.string),s=D(n.event,null),l=h=>{let p=le.string(h);if(p===void 0)return h;try{return JSON.parse(p)}catch{return h}},c=le.array(s),d=c!==void 0?c.map(l):[l(s)],f=S(o,h=>e.subscriptions.get(h));if(f!==void 0){d.forEach(h=>f.onMessage(h));return}else return;default:return}}function pk(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([vG(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Wt(i),Sp(e,"Connecting"),i.onopen=()=>{try{i.send(_G);return}catch{return}},i.onmessage=a=>SG(e,a.data),i.onclose=()=>{if(e.ws=void 0,Sp(e,"Closed"),e.disposed)return;let a=e.reconnectAttempts+1|0;e.reconnectAttempts=a,e.reconnectTimer=setTimeout(()=>pk(e),bG(a))},i.onerror=a=>{}}function EG(e,t,r,n,i){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};return pk(a),a}function wG(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};e.subscriptions.set(n,i);let a=e.state,o=0;switch(a){case"Closed":case"Connecting":o=1;break;case"Open":Ep(e,i);break}return o===1&&e.pendingPostAck.push(()=>Ep(e,i)),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),yG(e,n)}}function K_(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{Ot(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}function hd(e){return e.startsWith("Platform_")||e.startsWith("platform_")?"Platform":"Domain"}let mk=Mt(void 0);function Zd(){return bt(mk)}function W_(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[]}}let RG=mk.Provider;function kG(e){let t=e.getToken,r=e.liveReconnectRefetch,n=e.liveUpdates,i=e.platformEventsEndpoint,a=e.domainEventsEndpoint,o=r!==void 0?r:!0,s=Ke(t);Re(()=>{s.current=t},[t]);let l=()=>s.current(),c=Ke(W_()),d=Ke(W_()),f=X(()=>"Closed"),h=f[1],p=f[0],m=X(()=>"Closed"),b=m[1],_=m[0],x=O=>O==="Domain"?c:d,E=O=>O==="Domain"?a:i,k=O=>{let L=x(O).current,q=L.client;if(q!==void 0)return q;let K=E(O);if(K===void 0)return;let re=pG(K),V=mG(K),Y=EG(re,V,l,J=>O==="Domain"?h(ue=>J):b(ue=>J),J=>{let ue=x(O).current;if(!(o&&J>=2e3))return;ue.reconnectListeners.slice().forEach(ve=>{try{return ve()}catch{return}})});return L.client=Y,Y},w=O=>{let L=x(O).current,q=L.idleTimer;if(q!==void 0){clearTimeout(q),L.idleTimer=void 0;return}},C=(O,L,q)=>{let K=x(O).current;if(!n||jn(E(O)))return()=>{};w(O),K.refcount=K.refcount+1|0;let re=K.registry.get(L),V;if(re!==void 0){let Y=re.drainTimer;Y!==void 0&&(clearTimeout(Y),re.drainTimer=void 0),V=re}else{let Y={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};K.registry.set(L,Y),V=Y}if(V.callbacks.push(q),V.refcount=V.refcount+1|0,V.refcount===1&&jn(V.underlyingUnsub)){let Y=k(O);if(Y!==void 0){let J=wG(Y,L,ue=>{V.callbacks.forEach(se=>se(ue))});V.underlyingUnsub=J}}return()=>{if(V.callbacks=V.callbacks.filter(Y=>Y!==q),V.refcount=V.refcount-1|0,V.refcount===0&&(V.drainTimer=setTimeout(()=>{let Y=V.underlyingUnsub;Y!==void 0&&Y(),V.underlyingUnsub=void 0,V.drainTimer=void 0,K.registry.delete(L)},5e3)),K.refcount=K.refcount-1|0,K.refcount===0){let Y=x(O).current,J=Y.idleTimer;J!==void 0&&clearTimeout(J),Y.idleTimer=setTimeout(()=>{let ue=Y.client;ue!==void 0&&(K_(ue),Y.client=void 0),Y.idleTimer=void 0},3e4);return}}},$=O=>n?He(E(hd(O))):!1;Re(()=>{let O=()=>{};return addEventListener("visibilitychange",O),()=>{removeEventListener("visibilitychange",O)}},[]),Re(()=>(()=>{["Domain","Platform"].forEach(O=>{let L=x(O).current,q=L.idleTimer;q!==void 0&&clearTimeout(q),L.idleTimer=void 0,L.registry.forEach(re=>{let V=re.drainTimer;if(V!==void 0){clearTimeout(V),re.drainTimer=void 0;return}});let K=L.client;K!==void 0&&K_(K),L.client=void 0})}),[]);let A=O=>O==="Domain"?p:_,F=(O,L)=>{let q=x(O).current;return q.reconnectListeners.push(L),()=>{q.reconnectListeners=q.reconnectListeners.filter(K=>K!==L)}},N=xt(()=>({subscribe:C,isLive:$,apiForReadModel:hd,statusFor:A,registerReconnect:F}),[n,a,i,p,_]);return Kt(RG,{value:N,children:e.children})}let AG={make:kG};function Q_(e){return Object.fromEntries([["eq",e]])}function CG(e,t){let r=le.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=S(n.filter,le.object),a=i!==void 0?Object.fromEntries(Object.entries(i)):{};return a.environment=Q_(t.environment),a.platformName=Q_(t.platformName),n.filter=a,n}let DG=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,$G=/\$filter\s*:/,Y_={};function FG(e){if(Y_[e]===void 0){Y_[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 IG(e){return t=>((r,n)=>DG.test(r)?t(r,CG(n,e)):($G.test(r)&&FG(r),t(r,n)))}let TG={background:"var("+v.surface+")",border:"1px solid var("+v.borderSubtle+")",color:"var("+v.textPrimary+")",fontFamily:"var("+R.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+H.md+")"},NG={background:"var("+v.surfaceElevated+")",border:"1px solid var("+v.border+")",color:"var("+v.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+R.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+H.sm+")",alignItems:"center",justifyContent:"space-between"},PG={background:"var("+v.brandSubtle+")",color:"var("+v.brand+")",fontSize:"var("+R.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+H.full+")"};function OG(e){let t=e.discover,r=Gn(),n=X(()=>"Loading"),i=n[1],a=n[0];Re(()=>{r!==void 0?(i(s=>"Loading"),yt(t(r).then(s=>i(l=>({TAG:"Loaded",_0:s}))),s=>{let l=D(S(y$(s),c=>c.message),"Platform discovery failed");return i(c=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(s=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[He(r)]);let o;if(typeof a!="object")o=g("div",{children:"Discovering platforms…",style:{color:"var("+v.textSecondary+")"}});else if(a.TAG==="Loaded"){let s=a._0;o=s.length!==0?s.map(l=>P("button",{children:[l.platformName,g("span",{children:l.environment,style:PG})],style:NG,onClick:c=>As(av(l)+"/")},l.environment+"/"+l.platformName)):g("div",{children:"No platforms discovered.",style:{color:"var("+v.textSecondary+")"}})}else o=g("div",{children:a._0,style:{color:"var("+v.error+")",fontSize:"var("+R.sizeSm+")"}});return P("div",{children:[g("h1",{children:"Select a platform",style:{fontSize:"var("+R.sizeXl+")",fontWeight:"var("+R.weightBold+")",margin:"0 0 1.5rem"}}),o],style:TG})}let MG=OG;function qn(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function Oa(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function LG(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function sv(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return Oa(qn(e),-r|0)}function zG(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function UG(e){let t=sv(zG(e));return Ma(42,r=>Oa(t,r))}function gk(e,t){return qn(e)===qn(t)}function qG(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function vk(e,t,r){let n=qn(r),i=n+864e5;return e<i?t>=n:!1}function J_(e){let t=e.toString();return t.length<2?"0"+t:t}function bk(e){let t=new Date(e);return J_(t.getHours()|0)+":"+J_(t.getMinutes()|0)}function _k(e){return e===qn(e)}let jG=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ro(e){let t=new Date(e),r=t.getMonth()|0;return D(jG[r],"")+" "+t.getFullYear().toString()}let lv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function BG(e){return new Date(e).getDate()|0}function Ps(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(lv[n],"")+" "+(new Date(e).getDate()|0).toString()}function Ni(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let VG=864e5;function Os(e){let t=S(S(j(e),n=>fE(n)[0]),j),r=S(S(t,n=>T(n,"__typename")),ne);if(r===void 0)return"Accepted";switch(r){case"CommandPending":return"Pending";case"CommandRejected":let n=S(S(t,a=>T(a,"errorCode")),ne),i=S(S(t,a=>T(a,"errorDetail")),ne);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return"Accepted"}}function di(e,t){let r=T(e,t);if(r===void 0)return;let n=ne(r);return n!==void 0?n:S(S(j(r),i=>T(i,"TAG")),ne)}function yk(e,t,r){if(r===void 0)return e;let n=di(t,r);return e.filter(i=>{let a=i.allowedStates;return a!==void 0?n!==void 0?a.includes(n):!1:!0})}function HG(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function GG(e){let t=le.object(e);if(t===void 0)return;let r=a=>S(t[a],le.string),n=S(r("changeKind"),HG),i=r("id");if(n!==void 0&&i!==void 0)return{changeKind:n,id:i,sortKeyValue:r("sortKeyValue")}}function X_(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let Z_="default";function KG(e,t){let r=X_(e);return typeof t!="object"?"/"+Z_+"/"+r+"/*":"/"+Z_+"/"+r+"/"+X_(t._0)}function wp(e,t,r,n,i){let a=r!==void 0?r:!0,o=Zd(),s=KG(e,t),l=Ke(n);Re(()=>{l.current=n},[n]);let c=Ke(i);Re(()=>{c.current=i},[i]),Re(()=>{if(!a||o===void 0)return;let d=hd(e),f={contents:void 0},h={contents:void 0},p=setTimeout(()=>{let m=o.subscribe(d,s,_=>{let x=GG(_);if(x!==void 0)return l.current(x)});f.contents=m;let b=o.registerReconnect(d,()=>Q(c.current,_=>_()));h.contents=b},100);return()=>{clearTimeout(p);let m=f.contents;m!==void 0&&m();let b=h.contents;if(b!==void 0)return b()}},[s,a,o])}function WG(e,t){let r=S(j(e),i=>T(i,t)),n=S(r,St);return n!==void 0?n:D(B(S(S(S(r,j),i=>T(i,"edges")),St),i=>ee(i,a=>S(j(a),o=>T(o,"node")))),[])}function To(e,t){let r=t!==void 0?t:!0,n=Gn(),i=X(()=>[]),a=i[1],o=X(()=>"Loading"),s=o[1],l=X(()=>0),c=l[1],d=Ke(void 0);Re(()=>{r?n!==void 0?(s(b=>"Loading"),yt(n(e.queryDocument,{}).then(b=>(a(_=>WG(b,e.queryField)),s(_=>"Loaded"),Promise.resolve())),b=>(s(_=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))):s(b=>({TAG:"Error",_0:"Not connected"})):s(b=>"Loaded")},[l[0],r]);let f=()=>c(b=>b+1|0),h=b=>{let _=d.current;_!==void 0&&clearTimeout(_),d.current=setTimeout(()=>{d.current=void 0,c(x=>x+1|0)},250)},p=Zd(),m=r&&oe(p,!1,b=>b.isLive(e.queryField));return wp(e.queryField,"All",m,h,f),{rows:i[0],fetchState:o[0],refetch:f}}let ey=["message","body","text","title","content"],xk=["userId","recipientId","recipient","user","targetUserId"],QG=["createdAt","sentAt","notifiedAt","at","timestamp"],YG=["read","isRead","seen","acknowledged"];function uv(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function Sk(e){return ee(dn(e),t=>{if(qE(t[1]))return t[0]})}function Ek(e,t){return Sk(e).find(r=>uv(r,t))}function JG(e){let t=Ek(e,xk);if(t!==void 0)return t;let r=Tr(e,void 0);return dn(e).map(n=>n[0]).find(n=>oe(T(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function XG(e){return ee(dn(e),t=>{if(Em(t[1]))return t[0]}).find(t=>uv(t,QG))}function ZG(e){return ee(dn(e),t=>{if(tt(KN(t[1]),"boolean"))return t[0]}).find(t=>uv(t,YG))}function eK(e,t){return ee(Sk(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 tK(e){return oe(S(j(e),t=>T(t,"x-reventless-notifications")),!1,t=>{let r=Be(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let rK=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function nK(e,t){let r=ee(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>rK.some(i=>n.name.toLowerCase().startsWith(i)))}let ty={contents:[]};function ry(e,t,r){if(!ty.contents.includes(e)){ty.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 iK(e){return ee(e.readModels.filter(t=>tK(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=Ek(t.schema,ey),n=JG(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:XG(t.schema),readField:ZG(t.schema),refFields:eK(t.schema,n),markReadCommand:nK(t,e)};ry(t.name,"recipient",xk);return}else{ry(t.name,"message",ey);return}})[0]}function gs(e,t){return S(T(e,t),ne)}function aK(e,t,r){let n=gs(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function pd(e,t){return S(S(t.timestampField,r=>gs(e,r)),Ni)}function oK(e,t,r){let n=t.readField;if(n!==void 0){let a=B(T(e,n),Be);return a==="JSONTrue"&&typeof a!="object"}let i=pd(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function sK(e,t,r,n){return ee(t,i=>{let a=D(j(i),{});if(aK(a,e,r))return a}).toSorted((i,a)=>{let o=pd(i,e),s=pd(a,e);return o!==void 0?s!==void 0?s-o:-1:s!==void 0?1:0}).map((i,a)=>({id:D(gs(i,"id"),"#"+a.toString()),message:D(gs(i,e.messageField),""),timestamp:S(e.timestampField,o=>gs(i,o)),read:oK(i,e,n),refs:ee(e.refFields,o=>B(gs(i,o.field),s=>[o.stem,s]))}))}function lK(e,t){return rt(t,void 0,(r,n)=>{let i=D(j(n),{}),a=pd(i,e);return r!==void 0?a!==void 0?Math.max(r,a):r:a})}function uK(e,t){let r=D(S(e.markReadCommand,n=>n.aggregateIdField),"id");return it([[r,t]])}function cK(e,t){let r=e.length,n=t.length,i=rE((r+1|0)*(n+1|0)|0,0),a=(c,d)=>i[(c*(n+1|0)|0)+d|0];for(let c=0;c<r;++c)for(let d=0;d<n;++d)i[((c+1|0)*(n+1|0)|0)+(d+1|0)|0]=e[c]===t[d]?a(c,d)+1|0:a(c,d+1|0)>a(c+1|0,d)?a(c,d+1|0):a(c+1|0,d);let o=[],s=r,l=n;for(;s>0||l>0;){let c=e[s-1|0],d=t[l-1|0];s>0&&l>0&&c===d?(o=[{kind:"Unchanged",text:c}].concat(o),s=s-1|0,l=l-1|0):l>0&&(s===0||a(s,l-1|0)>=a(s-1|0,l))?(o=[{kind:"Added",text:d}].concat(o),l=l-1|0):(o=[{kind:"Removed",text:c}].concat(o),s=s-1|0)}return o}function _o(e){return"var("+e+")"}let dK=y([u("font-family",_o(R.fontFamilyMono)),u("font-size",_o(R.sizeSm)),u("line-height",_o(R.lineHeightNormal)),u("border","1px solid var("+v.border+")"),u("border-radius",_o(H.md)),Lo("auto")]),Ih=y([M("flex"),u("padding","1px var("+I.md+")")]),fK=y([u("background","rgba(248,81,73,0.12)"),u("color",_o(v.error))]),hK=y([u("background","rgba(63,185,80,0.12)"),u("color",_o(v.success))]),pK=y([u("color",_o(v.textSecondary))]),mK=y([u("width","16px"),An(0),u("user-select","none"),CE(pe(8))]);function gK(e){let t=e.before.split(`
|
|
34
|
-
`),r=e.after.split(`
|
|
35
|
-
`),n=cK(t,r);return g("div",{children:n.map((i,a)=>{let o=i.kind,s;switch(o){case"Removed":s=[Ih+" "+fK,"-"];break;case"Added":s=[Ih+" "+hK,"+"];break;case"Unchanged":s=[Ih+" "+pK," "];break}return P("div",{children:[g("span",{children:s[1],className:mK}),g("span",{children:i.text})],className:s[0]},a.toString())}),className:dK})}let vK=gK;function cv(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 Xr(e){return"var("+e+")"}let bK=y([M("flex"),ce("column"),u("gap","2px"),u("font-family",Xr(R.fontFamily)),u("font-size",Xr(R.sizeSm))]),ny=y([M("flex"),W("flexStart"),u("gap","10px"),u("padding",Xr(I.xs)+" "+Xr(I.sm)),u("border-radius",Xr(H.sm))]),_K=y([xe("pointer"),We([u("background",Xr(v.surfaceSubtle))])]),yK=y([M("flex"),ce("column"),u("gap","2px"),u("min-width","0"),u("flex","1")]),xK=y([u("color",Xr(v.textPrimary))]),SK=y([u("font-weight",Xr(R.weightMedium))]),EK=y([u("color",Xr(v.textSecondary))]),wK=y([M("inlineFlex"),W("center"),u("gap","6px"),u("color",Xr(v.textSecondary)),u("font-size",Xr(R.sizeXs)),u("white-space","nowrap")]),RK=y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("flex-shrink","0")]),kK=y([u("background","none"),u("border","none"),u("padding","0"),u("color",Xr(v.brand)),u("font-size",Xr(R.sizeXs)),xe("pointer"),u("text-align","left"),We([u("text-decoration","underline")])]),AK=y([u("margin-top","4px"),u("max-width","560px")]),CK=y([u("color",Xr(v.textSecondary)),u("padding",Xr(I.md)),na("center")]);function DK(e){let t=e.onClick,r=e.entry,n=X(()=>!1),i=n[1],a=n[0],o=He(r.before)&&He(r.after),s=D(r.actor,r.subject),l=t!==void 0?ny+" "+_K:ny,c=r.actor,d=r.accent,f=r.timestamp;return P("div",{children:[g(vu,{name:s,src:r.actorImageUrl,size:"Medium"}),P("div",{children:[P("span",{children:[c!==void 0?g("span",{children:c+" ",className:SK}):null,g("span",{children:r.verb+" ",className:EK}),r.subject],className:xK}),P("span",{children:[d!==void 0?g("span",{className:RK,style:{background:d}}):null,f!==void 0?cv(e.nowMs,f):null],className:wK}),o?g("button",{children:a?"Hide changes":"Show changes",className:kK,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,a&&o?g("div",{children:g(vK,{before:D(r.before,""),after:D(r.after,"")}),className:AK}):null],className:yK})],className:l,onClick:h=>Q(t,p=>p(r))})}function $K(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,a=n!==void 0?n:"No activity yet",o=t!==void 0?t:Date.now();return i.length===0?g("div",{children:a,className:CK}):g("div",{children:i.map(s=>g(DK,{entry:s,nowMs:o,onClick:r},s.id)),className:bK})}let FK=$K;function ht(e){return"var("+e+")"}let IK=y([Qt("relative"),M("inlineBlock")]),TK=y([Qt("relative"),M("inlineFlex"),W("center"),Ve("center"),u("background","none"),u("border","none"),u("border-radius",ht(H.md)),u("cursor","pointer"),u("color",ht(v.textSecondary)),u("padding","6px"),We([u("background",ht(v.surfaceSubtle)),u("color",ht(v.textPrimary))])]),NK=y([Qt("absolute"),ia(pe(0)),Ya(pe(0)),M("inlineFlex"),W("center"),Ve("center"),u("min-width","16px"),u("height","16px"),u("padding","0 4px"),u("border-radius",ht(H.full)),u("background",ht(v.brand)),u("color",ht(v.textOnBrand)),u("font-family",ht(R.fontFamily)),u("font-size","10px"),u("font-weight",ht(R.weightBold)),u("line-height","1")]),PK=y([Qt("absolute"),Ya(pe(0)),ia({NAME:"percent",VAL:100}),Pi(pe(4)),u("width","320px"),u("background",ht(v.surfaceElevated)),u("border","1px solid var("+v.border+")"),u("border-radius",ht(H.md)),u("box-shadow",ht(Sr.md)),u("z-index","200"),u("overflow","hidden"),u("font-family",ht(R.fontFamily))]),OK=y([M("flex"),W("center"),Ve("spaceBetween"),u("padding","var("+I.sm+") var("+I.md+")"),u("border-bottom","1px solid var("+v.borderSubtle+")"),u("color",ht(v.textSecondary)),u("font-size",ht(R.sizeSm)),u("font-weight",ht(R.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),MK=y([u("background","none"),u("border","none"),u("color",ht(v.brand)),u("font-size",ht(R.sizeXs)),u("text-transform","none"),u("letter-spacing","0"),xe("pointer"),We([u("text-decoration","underline")])]),LK=y([u("max-height","360px"),u("overflow-y","auto")]);function zK(e){return y([M("flex"),W("flexStart"),u("gap",ht(I.sm)),u("width","100%"),u("background","none"),u("border","none"),u("border-bottom","1px solid var("+v.borderSubtle+")"),u("text-align","left"),u("padding","var("+I.sm+") var("+I.md+")"),xe(e?"pointer":"default"),We(e?[u("background",ht(v.surfaceSubtle))]:[])])}function UK(e){return y([u("width","8px"),u("height","8px"),u("border-radius",ht(H.full)),u("margin-top","5px"),u("flex-shrink","0"),u("background",e?"transparent":ht(v.brand))])}let qK=y([M("flex"),ce("column"),u("gap","2px"),u("min-width","0")]);function jK(e){return y([u("color",ht(v.textPrimary)),u("font-size",ht(R.sizeSm)),u("font-weight",ht(e?R.weightNormal:R.weightMedium)),u("line-height",ht(R.lineHeightNormal)),u("word-break","break-word")])}let BK=y([u("color",ht(v.textDisabled)),u("font-size",ht(R.sizeXs))]),VK=y([u("color",ht(v.textDisabled)),u("font-size",ht(R.sizeSm)),u("padding",ht(I.md)),u("text-align","center")]);function HK(e){return P("svg",{children:[g("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),g("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 GK(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,a=e.onMarkAllRead,o=e.onOpen,s=e.notifications,l=n!==void 0?n:"No notifications",c=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=X(()=>c),h=f[1],p=f[0],m=s.filter(_=>!_.read).length;Re(()=>{if(!p)return;let _=E=>h(k=>!1),x=E=>{if(E.key==="Escape")return h(k=>!1)};return document.addEventListener("click",_),document.addEventListener("keydown",x),()=>{document.removeEventListener("click",_),document.removeEventListener("keydown",x)}},[p]);let b=()=>{let _=!p;_&&Q(i,x=>x()),h(x=>_)};return P("div",{children:[P("button",{children:[g(HK,{}),m>0?g("span",{children:m>99?"99+":m.toString(),className:NK}):null],"aria-label":m>0?"Notifications ("+m.toString()+" unread)":"Notifications",className:TK,title:"Notifications",type:"button",onClick:_=>{_.stopPropagation(),b()}}),p?P("div",{children:[P("div",{children:["Notifications",a!==void 0&&m>0?g("button",{children:"Mark all read",className:MK,type:"button",onClick:_=>a()}):null],className:OK}),s.length===0?g("div",{children:l,className:VK}):g("div",{children:s.map(_=>{let x=_.timestamp;return P("button",{children:[g("span",{className:UK(_.read)}),P("span",{children:[g("span",{children:_.message,className:jK(_.read)}),x!==void 0?g("span",{children:cv(d,x),className:BK}):null],className:qK})],className:zK(He(o)),type:"button",onClick:E=>{Q(o,k=>k(_)),h(k=>!1)}},_.id)}),className:LK})],className:PK,onClick:_=>{_.stopPropagation()}}):null],className:IK})}let KK=GK,wk=Mt([]),Rk=Mt(e=>{}),WK=wk.Provider,QK=Rk.Provider;function YK(e){let t=e.initial,r=t!==void 0?t:[],n=X(()=>r),i=n[1],a=dr(o=>i(s=>o),[]);return Kt(QK,{value:a,children:Kt(WK,{value:n[0],children:e.children})})}let JK={make:YK};function XK(){return bt(wk)}function ZK(){return bt(Rk)}function kk(e){return"autoui.notifications.seen."+e}function eW(e){let t=localStorage.getItem(kk(e));if(t!=null)return Ua(t)}function tW(e,t){localStorage.setItem(kk(e),t.toString())}function rW(e){let t=e.onData,r=To(e.binding.readModel,void 0);return Re(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function nW(e){let t=XK(),r=Uo(),n=Gn(),i=zo(),a=Qa(),o=X(()=>({})),s=o[1],l=o[0],d=X(()=>0)[1],f=w=>(C=>s($=>{let A=it(ze($));return A[w]=C,A})),h=B(S(r,w=>w.identity),w=>({userId:w.userId,username:w.username})),p=t.flatMap(w=>{let C=oe(T(l,w.pluginId),[],$=>$.rows);return sK(w.binding,C,h,eW(w.pluginId)).map($=>({key:w.pluginId+":"+$.id,appBinding:w,entry:$}))}).toSorted((w,C)=>{let $=S(w.entry.timestamp,Ni),A=S(C.entry.timestamp,Ni);return $!==void 0?A!==void 0?A-$:-1:A!==void 0?1:0}),m=(w,C)=>{let $=w.binding.markReadCommand;if($!==void 0&&n!==void 0){yt(n($.mutationDocument,uK(w.binding,C)).then(A=>{if(typeof Os(A)!="object"){let N=w.pluginId;return Q(T(l,N),O=>O.refetch())}}),A=>Promise.resolve());return}},b=w=>Q(p.find(C=>C.key===w.id),C=>{C.entry.read||m(C.appBinding,C.entry.id);let $=C.entry;Q(U$($.refs,A=>{let F=A[1];return B(oa(i,A[0]),N=>[N,F])}),A=>{let F=A[0];a(ta(F.pluginId,F.name,A[1],[]))})}),_=He(n)&&t.some(w=>He(w.binding.markReadCommand)),x=()=>{p.forEach(w=>{if(!w.entry.read)return m(w.appBinding,w.entry.id)})},E=()=>{t.forEach(w=>{let C=oe(T(l,w.pluginId),[],$=>$.rows);Q(lK(w.binding,C),$=>tW(w.pluginId,$))}),d(w=>w+1|0)},k=p.map(w=>({id:w.key,message:w.entry.message,timestamp:w.entry.timestamp,read:w.entry.read}));return t.length===0?null:P(jr,{children:[t.map(w=>g(rW,{binding:w.binding,onData:f(w.pluginId)},w.pluginId)),g(KK,{notifications:k,onOpen:b,onMarkAllRead:_?x:void 0,onPanelOpen:E})]})}let iW=nW;function aW(e,t,r){if(e===void 0)return!0;let n=t.toLowerCase(),i=r.toLowerCase();return e.split(",").map(a=>a.trim().toLowerCase()).filter(a=>a!=="").some(a=>a.startsWith(".")?n.endsWith(a):a.endsWith("/*")?i.startsWith(a.slice(0,a.length-1|0)):i===a)}function oW(e){let t=["B","KB","MB","GB"],n=((s,l)=>{for(;;){let c=l,d=s;if(!(d>=1024&&c<(t.length-1|0)))return[d,c];l=c+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],a=n[0];return(i===0?Math.round(a).toString():(Math.round(a*10)/10).toString())+" "+t[i]}function Ur(e){return"var("+e+")"}let iy=y([M("flex"),ce("column"),W("center"),Ve("center"),u("gap","6px"),u("padding",Ur(I.lg)),u("border","2px dashed var("+v.border+")"),u("border-radius",Ur(H.md)),u("color",Ur(v.textSecondary)),u("font-family",Ur(R.fontFamily)),u("font-size",Ur(R.sizeSm)),xe("pointer"),u("transition","border-color 120ms, background 120ms"),na("center")]),sW=y([u("border-color",Ur(v.brand)),u("background",Ur(v.brandSubtle))]),lW=y([u("font-size",Ur(R.sizeXs))]),uW=y([M("flex"),W("center"),u("gap","8px"),u("padding",Ur(I.xs)+" 0"),u("font-family",Ur(R.fontFamily)),u("font-size",Ur(R.sizeSm)),u("color",Ur(v.textPrimary))]),cW=y([u("flex","1"),u("min-width","0"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),dW=y([u("color",Ur(v.textSecondary)),u("font-size",Ur(R.sizeXs)),u("white-space","nowrap")]),fW=y([u("color",Ur(v.success))]),ay=y([u("color",Ur(v.error))]),hW=y([u("width","120px")]);function pW(e){let t=e.onUploaded,r=e.label,n=e.multiple,i=e.accept,a=e.adapter,o=n!==void 0?n:!0,s=r!==void 0?r:"Drop files here or click to browse",l=X(()=>[]),c=l[1],d=X(()=>!1),f=d[1],h=Ke(null),p=Ke(0),m=(C,$)=>c(A=>A.map(F=>F.key===C?{key:F.key,name:F.name,size:F.size,status:$}:F)),b=C=>{p.current=p.current+1|0;let $=p.current.toString()+":"+C.name,A=aW(i,C.name,C.type),F=A?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"};if(c(N=>N.concat([{key:$,name:C.name,size:C.size,status:F}])),A){yt(a.upload(C,N=>m($,{TAG:"Uploading",_0:N})).then(N=>{if(N.TAG==="Ok"){let O=N._0;m($,{TAG:"Done",_0:O}),Q(t,L=>L(C.name,O))}else m($,{TAG:"Failed",_0:N._0});return Promise.resolve()}),N=>(m($,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}},_=C=>{(o?C:C.slice(0,1)).forEach(b)},x=C=>{C.preventDefault(),f(A=>!1);let $=C.dataTransfer;if($!=null)return _(Array.from($.files))},E=C=>{let $=C.target.files;$!=null&&_(Array.from($)),C.target.value=""},k=()=>Q(Fi(h.current),C=>C.click()),w=d[0]?iy+" "+sW:iy;return P("div",{children:[P("div",{children:[g("span",{children:s}),i!==void 0?g("span",{children:"Accepted: "+i,className:lW}):null],className:w,role:"button",onClick:C=>k(),onDragLeave:C=>f($=>!1),onDragOver:C=>{C.preventDefault(),f($=>!0)},onDrop:x}),g("input",{ref:Wt(h),style:{display:"none"},accept:i,multiple:o,type:"file",onChange:E}),l[0].map(C=>{let $=C.status,A;switch($.TAG){case"Uploading":A=g("span",{children:g(sw,{value:$._0,showValue:!1}),className:hW});break;case"Done":A=g("span",{children:"Uploaded",className:fW});break;case"Rejected":A=g("span",{children:"Rejected",className:ay,title:$._0});break;case"Failed":A=g("span",{children:"Failed",className:ay,title:$._0});break}return P("div",{children:[g("span",{children:C.name,className:cW,title:C.name}),g("span",{children:oW(C.size),className:dW}),A],className:uW},C.key)})]})}let mW=pW;function gW(e){if(e==="")return[];let t;try{t=St(JSON.parse(e))}catch{return[e]}return t!==void 0?ee(t,ne):[e]}function vW(e){let t=e.onChange,r=e.value,n=e.multiple,i=Ke(n?gW(r):r===""?[]:[r]),a=(o,s)=>{let l=n?i.current.concat([s]):[s];i.current=l,t(n?JSON.stringify(l.map(c=>c)):s)};return g(mW,{adapter:e.adapter,accept:e.accept,multiple:n,onUploaded:a})}function bW(e,t,r,n){if(n&&r==="")return"Required"}function _W(e,t,r){let n=!1,i=(o,s,l,c,d,f,h)=>g(vW,{adapter:e,accept:t,multiple:n,value:l,onChange:c}),a=o=>{let l={...D(RM(o),{cell:(c,d,f)=>{},detail:(c,d,f)=>{}})};lr(o,(l.validateInput=bW,l.input=i,l))};a("File"),a("Image")}var yW={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"},qo=yW,xW=function(e,t,r,n,i,a,o,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 c=[r,n,i,a,o,s],d=0;l=new Error(t.replace(/%s/g,function(){return c[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Se=xW;function ef(e){return function(){return e}}var Ks=function(){};Ks.thatReturns=ef;Ks.thatReturnsFalse=ef(!1);Ks.thatReturnsTrue=ef(!0);Ks.thatReturnsNull=ef(null);Ks.thatReturnsThis=function(){return this};Ks.thatReturnsArgument=function(e){return e};var tf=qo,Du=Se;function SW(e){Du(!1)}function sa(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function Ak(e){var t=sa(e);return typeof t=="object"&&t!==null&&t.kind===tf.FRAGMENT}function Ck(e){var t=sa(e);return typeof t=="object"&&t!==null&&t.kind===tf.REQUEST}function EW(e){var t=sa(e);return typeof t=="object"&&t!==null&&t.kind===tf.UPDATABLE_QUERY}function Dk(e){var t=sa(e);return typeof t=="object"&&t!==null&&t.kind===tf.INLINE_DATA_FRAGMENT}function dv(e){var t=sa(e);return Ak(t)||Du(!1),t}function wW(e){var t,r=dv(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 RW(e){var t,r=dv(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function kW(e){var t=sa(e);return Ck(t)||Du(!1),t}function AW(e){var t=sa(e);return EW(t)||Du(!1),t}function CW(e){var t=sa(e);return Dk(t)||Du(!1),t}var fi={getFragment:dv,getNode:sa,getPaginationFragment:wW,getRefetchableFragment:RW,getRequest:kW,getUpdatableQuery:AW,getInlineDataFragment:CW,graphql:SW,isFragment:Ak,isRequest:Ck,isInlineDataFragment:Dk},$k={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})($k);var Te=$k.exports,Fk={exports:{}},Ik={exports:{}},Tk={exports:{}},Nk={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})(Nk);var Pk=Nk.exports,Ok={exports:{}};(function(e){var t=Pk.default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var o=a.call(n,i||"default");if(t(o)!="object")return o;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})(Ok);var DW=Ok.exports;(function(e){var t=Pk.default,r=DW;function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Tk);var Mk=Tk.exports;(function(e){var t=Mk;function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Ik);var Zr=Ik.exports;(function(e){var t=Zr;function r(i,a){var o=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);a&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),o.push.apply(o,s)}return o}function n(i){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?r(Object(o),!0).forEach(function(s){t(i,s,o[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(o,s))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Fk);var _t=Fk.exports,Lk={exports:{}},zk={exports:{}},Uk={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,a=Array(n);i<n;i++)a[i]=r[i];return a}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Uk);var qk=Uk.exports;(function(e){var t=qk;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var a={}.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(zk);var jk=zk.exports;(function(e){var t=jk;function r(n,i){var a=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!a){if(Array.isArray(n)||(a=t(n))||i&&n&&typeof n.length=="number"){a&&(n=a);var o=0,s=function(){};return{s,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,c=!0,d=!1;return{s:function(){a=a.call(n)},n:function(){var h=a.next();return c=h.done,h},e:function(h){d=!0,l=h},f:function(){try{c||a.return==null||a.return()}finally{if(d)throw l}}}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Lk);var Yt=Lk.exports,Bk=Te.default,oy=Bk(_t),sy=Bk(Yt),$W=Se;function FW(e,t,r){var n=(0,sy.default)(t),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;e.relayFieldLogger((0,oy.default)((0,oy.default)({},a),{},{uiContext:r}))}}catch(c){n.e(c)}finally{n.f()}var o=(0,sy.default)(t),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;if(Vk(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,$W(!1)}}}catch(c){o.e(c)}finally{o.f()}}function Vk(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 IW(e,t,r){t!=null&&FW(e,t,r)}var $u={handlePotentialSnapshotErrors:IW,eventShouldThrow:Vk},Hk={exports:{}},Gk={exports:{}};(function(e){var t=qk;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Gk);var TW=Gk.exports,Kk={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})(Kk);var NW=Kk.exports,Wk={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
-
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})(Wk);var PW=Wk.exports;(function(e){var t=TW,r=NW,n=jk,i=PW;function a(o){return t(o)||r(o)||n(o)||i()}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports})(Hk);var Za=Hk.exports,Qk={DEFAULT_HANDLE_KEY:""},OW=Qk,MW=OW.DEFAULT_HANDLE_KEY,LW=Se;function zW(e,t,r){return t&&t!==MW?"__".concat(t,"_").concat(e):(r==null&&LW(!1),"__".concat(r,"_").concat(e))}var Yk=zW,UW={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},Kn=UW;function Rp(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(Rp);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=Rp(e[t[n]]);return r}function Jk(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 Jk(i,r)})}var jo={stableCopy:Rp,hasCycle:Jk},qW=Te.default,jW=qW(Za),BW=Yk,rf=qo,VW=Kn,HW=jo,Xk=HW.stableCopy,GW=Se,KW=rf.VARIABLE,WW=rf.LITERAL,QW=rf.OBJECT_VALUE,YW=rf.LIST_VALUE,JW="__errors",XW="__module_component_",ZW="__module_operation_";function kp(e,t){if(e.kind===KW)return iQ(e.variableName,t);if(e.kind===WW)return e.value;if(e.kind===QW){var r={};return e.fields.forEach(function(i){r[i.name]=kp(i,t)}),r}else if(e.kind===YW){var n=[];return e.items.forEach(function(i){i!=null&&n.push(kp(i,t))}),n}}function fv(e,t,r){var n={};return r&&(n[eA.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=kp(i,t)}),n}function eQ(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,a=e.name,o=e.args,s=e.filters,l=BW(n,i,a),c=null;return o&&s&&o.length!==0&&s.length!==0&&(c=o.filter(function(d){return s.indexOf(d.name)>-1})),r&&(c=c!=null?[r].concat((0,jW.default)(c)):[r]),c===null?l:hv(l,fv(c,t))}function Zk(e,t){if(e.storageKey)return e.storageKey;var r=rQ(e),n=e.name;return r&&r.length!==0?hv(n,fv(r,t)):n}function tQ(e,t){var r=Zk(e,t);return VW.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function rQ(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 nQ(e,t){return hv(e,Xk(t))}function hv(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 a;r.push(n+":"+((a=JSON.stringify(i))!==null&&a!==void 0?a:"undefined"))}}return r.length===0?e:e+"(".concat(r.join(","),")")}function iQ(e,t){return t.hasOwnProperty(e)||GW(!1),Xk(t[e])}function aQ(e){return"".concat(XW).concat(e)}function oQ(e){return"".concat(ZW).concat(e)}var eA={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:JW,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:fv,getHandleStorageKey:eQ,getStorageKey:Zk,getReadTimeResolverStorageKey:tQ,getStableStorageKey:nQ,getModuleComponentKey:aQ,getModuleOperationKey:oQ},kt=eA,sQ=Te.default,tA=sQ(_t),lQ=kt,uQ=lQ.getArgumentValues,cQ=Se;function dQ(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,tA.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:cQ(!1)}}),n||r}function fQ(e,t,r){var n={};return e.argumentDefinitions.forEach(function(i){var a=i.defaultValue;r[i.name]!=null&&(a=r[i.name]),n[i.name]=a}),t!=null&&Object.keys(t).forEach(function(i){n[i]=t[i].get()}),n}function hQ(e,t,r){if(t==null)return e;var n=(0,tA.default)({},e),i=r?uQ(r,e):{};return t.forEach(function(a){var o,s=(o=i[a.name])!==null&&o!==void 0?o:a.defaultValue;n[a.name]=s}),n}var eo={getLocalVariables:hQ,getFragmentVariables:dQ,getOperationVariables:fQ},Th=[],Nh=[];/**
|
|
38
|
-
* Checks if two values are equal. Values may be primitives, arrays, or objects.
|
|
39
|
-
* Returns true if both arguments have the same keys and values.
|
|
40
|
-
*
|
|
41
|
-
* @see http://underscorejs.org
|
|
42
|
-
* @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
43
|
-
* @license MIT
|
|
44
|
-
*/function pQ(e,t){var r=Th.length?Th.pop():[],n=Nh.length?Nh.pop():[],i=Ap(e,t,r,n);return r.length=0,n.length=0,Th.push(r),Nh.push(n),i}function Ap(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,a=i.call(e);if(a!=i.call(t))return!1;switch(a){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 o=r.length;o--;)if(r[o]==e)return n[o]==t;r.push(e),n.push(t);var s=0;if(a==="[object Array]"){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!Ap(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 c=0;c<l.length;c++)if(!Ap(e[l[c]],t[l[c]],r,n))return!1}return r.pop(),n.pop(),!0}var la=pQ,mQ=eo,gQ=mQ.getFragmentVariables,Fu=kt,vQ=Fu.CLIENT_EDGE_TRAVERSAL_PATH,bQ=Fu.FRAGMENT_OWNER_KEY,_Q=Fu.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,yQ=Fu.FRAGMENTS_KEY,rA=Fu.ID_KEY,nA=la,Va=Se;function nf(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||Va(!1);var r=t[rA],n=t[yQ],i=t[bQ],a=t[vQ];if(typeof r=="string"&&typeof n=="object"&&n!==null&&typeof n[e.name]=="object"&&n[e.name]!==null&&typeof i=="object"&&i!==null&&(a==null||Array.isArray(a))){var o=i,s=a,l=n[e.name],c=gQ(e,o.variables,l),d=l[_Q]===!0;return cA(e,r,c,o,d,s)}return null}function iA(e,t){var r=null;return t.forEach(function(n,i){var a=n!=null?nf(e,n):null;a!=null&&(r=r||[],r.push(a))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function aA(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||Va(!1),iA(e,t)):(Array.isArray(t)&&Va(!1),nf(e,t))}function xQ(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],a=t[n];r[n]=aA(i,a)}return r}function SQ(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],a=t[n];r[n]=oA(i,a)}return r}function oA(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||Va(!1),EQ(e,t)):(Array.isArray(t)&&Va(!1),sA(e,t))}function EQ(e,t){var r=null;return t.forEach(function(n){var i=n!=null?sA(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function sA(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||Va(!1);var r=t[rA];return typeof r=="string"?r:null}function wQ(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],a=t[n],o=lA(i,a);Object.assign(r,o)}return r}function lA(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||Va(!1),uA(e,t)):(Array.isArray(t)&&Va(!1),pv(e,t)||{})}function pv(e,t){var r=nf(e,t);return r?r.variables:null}function uA(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var a=pv(e,n);a!=null&&Object.assign(r,a)}}),r}function ly(e,t){return e.dataID===t.dataID&&e.node===t.node&&nA(e.variables,t.variables)&&RQ(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&kQ(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function RQ(e,t){return e===t?!0:e.identifier===t.identifier&&nA(e.cacheConfig,t.cacheConfig)}function kQ(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 AQ(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?ly(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return ly(r,t.selectors[n])}):!1}function cA(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a=arguments.length>5?arguments[5]:void 0;return{kind:"SingularReaderSelector",dataID:t,isWithinUnmatchedTypeRefinement:i,clientEdgeTraversalPath:a??null,node:e,variables:r,owner:n}}function CQ(e,t,r){return{dataID:t,node:e,variables:r}}var hi={areEqualSelectors:AQ,createReaderSelector:cA,createNormalizationSelector:CQ,getDataIDsFromFragment:oA,getDataIDsFromObject:SQ,getSingularSelector:nf,getPluralSelector:iA,getSelector:aA,getSelectorsFromObject:xQ,getVariablesFromSingularFragment:pv,getVariablesFromPluralFragment:uA,getVariablesFromFragment:lA,getVariablesFromObject:wQ},DQ=fi,$Q=DQ.getFragment,FQ=$u,IQ=FQ.eventShouldThrow,TQ=hi,NQ=TQ.getSelector,uy=Se,Ol=[];function PQ(e,t){Ol.push(e);try{return t()}finally{Ol.pop()}}function OQ(e,t){if(!Ol.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Ol[Ol.length-1],n=$Q(e),i=NQ(n,t);i==null&&uy(!1),i.kind!=="SingularReaderSelector"&&uy(!1);var a=r.getDataForResolverFragment(i,t),o=a.data,s=a.isMissingData,l=a.fieldErrors;if(s||l!=null&&l.some(IQ))throw dA;return o}var dA={},mv={readFragment:OQ,withResolverContext:PQ,RESOLVER_FRAGMENT_ERRORED_SENTINEL:dA},MQ=mv;MQ.readFragment;var fA={exports:{}};(function(e){function t(n,i,a,o,s,l,c){try{var d=n[l](c),f=d.value}catch(h){return void a(h)}d.done?i(f):Promise.resolve(f).then(o,s)}function r(n){return function(){var i=this,a=arguments;return new Promise(function(o,s){var l=n.apply(i,a);function c(f){t(l,o,s,c,d,"next",f)}function d(f){t(l,o,s,c,d,"throw",f)}c(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(fA);var hA=fA.exports;function LQ(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var pA=LQ,zQ=pA,Ki=HQ,ou=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){Ki=n},e.from=function(n){return UQ(n)?qQ(n):zQ(n)?jQ(n):BQ(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(a){var o;return i.subscribe({start:function(l){o=l},next:a.next,complete:a.complete,error:function(l){try{n(l).subscribe({start:function(d){o=d},next:a.next,complete:a.complete,error:a.error})}catch(c){a.error(c,!0)}}}),function(){return o.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(a){var o;return i.subscribe({start:function(l){o=l},next:a.next,error:a.error,complete:function(){o=n.subscribe(a)}}),function(){o&&o.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(a){var o=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(c){Ki(c,!0)}a[l]&&a[l].apply(a,arguments)}};return i.subscribe({start:o("start"),next:o("next"),error:o("error"),complete:o("complete"),unsubscribe:o("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(a){var o=i.subscribe(a);return function(){o.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(a){var o=!1,s;return s=i.subscribe({next:function(c){o=!0,a.next(c)},error:a.error,complete:function(){o?a.complete():s=n.subscribe(a)}}),function(){s&&s.unsubscribe()}})},t.subscribe=function(n){return VQ(this._source,n)},t.map=function(n){var i=this;return e.create(function(a){var o=i.subscribe({complete:a.complete,error:a.error,next:function(l){try{var c=n(l);a.next(c)}catch(d){a.error(d,!0)}}});return function(){o.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(a){var o=[];function s(c){this._sub=c,o.push(c)}function l(){o.splice(o.indexOf(this._sub),1),o.length===0&&a.complete()}return i.subscribe({start:s,next:function(d){try{a.closed||e.from(n(d)).subscribe({start:s,next:a.next,error:a.error,complete:l})}catch(f){a.error(f,!0)}},error:a.error,complete:l}),function(){o.forEach(function(c){return c.unsubscribe()}),o.length=0}})},t.poll=function(n){var i=this;return e.create(function(a){var o,s,l=function c(){o=i.subscribe({next:a.next,error:a.error,complete:function(){s=setTimeout(c,n)}})};return l(),function(){clearTimeout(s),o.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,a){var o=!1;n.subscribe({next:function(l){o||(o=!0,i(l))},error:a,complete:i})})},e})();function UQ(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function qQ(e){return e instanceof ou?e:ou.create(function(t){return e.subscribe(t)})}function jQ(e){return ou.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function BQ(e){return ou.create(function(t){t.next(e),t.complete()})}function VQ(e,t){var r=!1,n,i=function(c){return Object.defineProperty(c,"closed",{get:function(){return r}})};function a(){if(n){if(n.unsubscribe)n.unsubscribe();else try{n()}catch(l){Ki(l,!0)}n=void 0}}var o=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(o)}catch(c){Ki(c,!0)}finally{a()}}}});try{t.start&&t.start(o)}catch(l){Ki(l,!0)}if(r)return o;var s=i({next:function(c){if(!r&&t.next)try{t.next(c)}catch(d){Ki(d,!0)}},error:function(c,d){if(r||!t.error)r=!0,Ki(c,d||!1),a();else{r=!0;try{t.error(c)}catch(f){Ki(f,!0)}finally{a()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(c){Ki(c,!0)}finally{a()}}}});try{n=e(s)}catch(l){s.error(l,!0)}return r&&a(),o}function HQ(e,t){}var to=ou,mA=Te.default,GQ=mA(Yt),ic=mA(Zr),KQ=to,WQ=Se,QQ=(function(){function e(){var r=this;(0,ic.default)(this,"_complete",!1),(0,ic.default)(this,"_events",[]),(0,ic.default)(this,"_sinks",new Set),(0,ic.default)(this,"_subscription",[]),this._observable=KQ.create(function(n){r._sinks.add(n);for(var i=r._events,a=0;a<i.length&&!n.closed;a++){var o=i[a];switch(o.kind){case"complete":n.complete();break;case"error":n.error(o.error);break;case"next":n.next(o.data);break;default:o.kind,WQ(!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,GQ.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;a.unsubscribe()}}catch(o){n.e(o)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),gA=QQ,gv=to,cy=gA,vA=Se,YQ=typeof WeakMap=="function",dy=YQ?new WeakMap:new Map;function JQ(e,t){return bA(e,t.request.identifier,function(){return e.execute({operation:t})})}function bA(e,t,r){return gv.create(function(n){var i=vv(e),a=i.get(t);return a||r().finally(function(){return i.delete(t)}).subscribe({start:function(s){a={identifier:t,subject:new cy,subjectForInFlightStatus:new cy,subscription:s,promise:null},i.set(t,a)},next:function(s){var l=ac(i,t);l.subject.next(s),l.subjectForInFlightStatus.next(s)},error:function(s){var l=ac(i,t);l.subject.error(s),l.subjectForInFlightStatus.error(s)},complete:function(){var s=ac(i,t);s.subject.complete(),s.subjectForInFlightStatus.complete()},unsubscribe:function(s){var l=ac(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),a==null&&vA(!1),XQ(i,a).subscribe(n)})}function XQ(e,t){return gv.create(function(r){var n=t.subject.subscribe(r);return function(){n.unsubscribe();var i=e.get(t.identifier);if(i){var a=i.subscription;a!=null&&i.subject.getObserverCount()===0&&(a.unsubscribe(),e.delete(t.identifier))}}})}function _A(e,t,r){return gv.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(o){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function ZQ(e,t){var r=vv(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(a,o){var s=!1;_A(e,r,n).subscribe({complete:a,error:o,next:function(c){s&&a(c)}}),s=!0});return i}function eY(e,t){var r=vv(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:_A(e,r,n)}function vv(e){var t=dy.get(e);if(t!=null)return t;var r=new Map;return dy.set(e,r),r}function ac(e,t){var r=e.get(t);return r==null&&vA(!1),r}var af={fetchQuery:JQ,fetchQueryDeduped:bA,getPromiseForActiveRequest:ZQ,getObservableForActiveRequest:eY},tY=Te.default;hA.default;var rY=tY(Yt),yA=to,nY=af,iY=nY.getObservableForActiveRequest,aY=fi,oY=aY.getFragment,sY=$u,lY=sY.handlePotentialSnapshotErrors,uY=hi,cY=uY.getSelector,Vc=Se;function dY(e,t,r){var n,i=oY(t),a=cY(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&Vc(!1),a==null&&Vc(!1),a.kind){case"SingularReaderSelector":return fY(e,t,a);case"PluralReaderSelector":return hY(e,t,a)}Vc(!1)}function fY(e,t,r){var n=e.lookup(r);return yA.create(function(i){i.next(md(e,t,r.owner,n));var a=e.subscribe(n,function(o){i.next(md(e,t,r.owner,o))});return function(){return a.dispose()}})}function hY(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return yA.create(function(i){var a=n.map(function(s,l){return md(e,t,r.selectors[l].owner,s)});i.next(fy(a));var o=n.map(function(s,l){return e.subscribe(s,function(c){a[l]=md(e,t,r.selectors[l].owner,c),i.next(fy(a))})});return function(){return o.forEach(function(s){return s.dispose()})}})}function md(e,t,r,n){var i=n.missingLiveResolverFields!=null&&n.missingLiveResolverFields.length>0,a=n.missingClientEdges!=null&&n.missingClientEdges.length>0;if(i||a)return{state:"loading"};if(n.isMissingData&&(iY(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{lY(e,n.fieldErrors)}catch(o){return{error:o,state:"error"}}return n.data==null&&Vc(!1),{state:"ok",value:n.data}}function fy(e){var t=[],r=(0,rY.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(a){r.e(a)}finally{r.f()}return{state:"ok",value:t}}var bv={observeFragment:dY};function xA(e){return pY(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&xA(r)})),e}function pY(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var SA=xA,mY=jo,gY=mY.stableCopy,vY=Se;function bY(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&vY(!1),r+JSON.stringify(gY(t))}var EA=bY,_Y=EA,yY=Kn,xY=jo,SY=xY.hasCycle,EY=eo,wY=EY.getOperationVariables,wA=hi,RY=wA.createNormalizationSelector,kY=wA.createReaderSelector,AY=kt,CY=AY.ROOT_ID,DY=Se;function $Y(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:CY,i=e.operation,a=wY(i,e.params.providedVariables,t);yY.ENABLE_CYLE_DETECTION_IN_VARIABLES&&SY(a)&&DY(!1);var o=RA(e,a,r),s={fragment:kY(e.fragment,n,a,o),request:o,root:RY(i,n,a)};return s}function RA(e,t,r){var n={identifier:_Y(e.params,t),node:e,variables:t,cacheConfig:r};return n}var ro={createOperationDescriptor:$Y,createRequestDescriptor:RA},FY=Te.default,IY=FY(Zr),TY=bv,NY=TY.observeFragment,PY=ro,OY=PY.createOperationDescriptor;function MY(e,t,r){var n=OY(t,r),i={__id:n.fragment.dataID,__fragments:(0,IY.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},a=n.request.node.fragment;return NY(e,a,i)}var LY={observeQuery:MY},zY=hA.default,UY=bv,qY=UY.observeFragment;function jY(e,t,r){return Cp.apply(this,arguments)}function Cp(){return Cp=zY(function*(e,t,r){var n;try{var i,a=yield new Promise(function(s,l){n=qY(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(),a}catch(s){var o;throw(o=n)===null||o===void 0||o.unsubscribe(),s}}),Cp.apply(this,arguments)}var BY={waitForFragmentData:jY},VY=bv;VY.observeFragment;var HY=LY;HY.observeQuery;var GY=BY;GY.waitForFragmentData;function KY(e){return e.ok===!0}function WY(e){return e.ok===!1}var QY={isValueResult:KY,isErrorResult:WY},hy=new Map,YY=1,JY=XY(),kA=" ",py="\v";function XY(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function ZY(e){return e[0]===kA&&JY.has(e[1])||e[0]===py?py+e:e}function eJ(e,t){if(t==null||e.length<t)return ZY(e);var r=hy.get(e);return r!=null||(r=kA+YY++,hy.set(e,r)),r}var AA={intern:eJ},my=Kn,tJ=AA,rJ=tJ.intern,su="client:";function nJ(e,t,r){var n=my.STRING_INTERN_LEVEL<=0?e:rJ(e,my.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(su)!==0&&(i=su+i),i}function iJ(e){return e.indexOf(su)===0}var aJ=0;function oJ(){return"".concat(su,"local:").concat(aJ++)}function sJ(e,t,r){var n="".concat(su).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var Li={generateClientID:nJ,generateClientObjectClientID:sJ,generateUniqueClientID:oJ,isClientID:iJ},lJ={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},gy={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"},uJ={inject:function(t){gy=t},get:function(){return gy},isConnectionCall:function(t){return lJ.hasOwnProperty(t.name)}},_v=uJ,cJ=Li,lu=cJ.generateClientID,dJ=kt,fJ=dJ.getStableStorageKey,CA=Yk,Bo=_v,hJ=Se,DA="connection",Dp="__connection_next_edge_index";function pJ(e,t){var r=e.get(t.dataID);if(r){var n=Bo.get(),i=n.EDGES,a=n.END_CURSOR,o=n.HAS_NEXT_PAGE,s=n.HAS_PREV_PAGE,l=n.PAGE_INFO,c=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=lu(r.getDataID(),t.handleKey),m=r.getLinkedRecord(t.handleKey),b=m??e.get(p),_=b&&b.getLinkedRecord(l);if(b){m==null&&r.setLinkedRecord(b,t.handleKey);var k=b,w=f.getLinkedRecords(i);w&&(w=w.map(function(ue){return $p(e,k,ue)}));var C=k.getLinkedRecords(i),$=k.getLinkedRecord(l);k.copyFieldsFrom(f),C&&k.setLinkedRecords(C,i),$&&k.setLinkedRecord($,l);var A=[],F=t.args;if(C&&w)if(F.after!=null){var N,O=(N=_)===null||N===void 0?void 0:N.getValue(a),L=h?.getValue(a),q=_&&F.after===O,K=_&&O===L;if(q||K){var re=new Set;oc(C,A,re),oc(w,A,re)}else return}else if(F.before!=null)if(_&&F.before===_.getValue(d)){var V=new Set;oc(w,A,V),oc(C,A,V)}else return;else A=w;else w?A=w:A=C;if(A!=null&&A!==C&&k.setLinkedRecords(A,i),_&&h){if(F.after==null&&F.before==null)_.copyFieldsFrom(h);else if(F.before!=null||F.after==null&&F.last){_.setValue(!!h.getValue(s),s);var Y=h.getValue(d);typeof Y=="string"&&_.setValue(Y,d)}else if(F.after!=null||F.before==null&&F.first){_.setValue(!!h.getValue(o),o);var J=h.getValue(a);typeof J=="string"&&_.setValue(J,a)}}}else{var x=e.create(p,f.getType());x.setValue(0,Dp),x.copyFieldsFrom(f);var E=f.getLinkedRecords(i);E&&(E=E.map(function(ue){return $p(e,x,ue)}),x.setLinkedRecords(E,i)),r.setLinkedRecord(x,t.handleKey),_=e.create(lu(x.getDataID(),l),c),_.setValue(!1,o),_.setValue(!1,s),_.setValue(null,a),_.setValue(null,d),h&&_.copyFieldsFrom(h),x.setLinkedRecord(_,l)}}}function mJ(e,t,r){var n=CA(DA,t,null);return e.getLinkedRecord(n,r)}function gJ(e,t,r){var n=CA(DA,t,null),i=fJ(n,r);return lu(e,i)}function vJ(e,t,r){var n=Bo.get(),i=n.CURSOR,a=n.EDGES,o=e.getLinkedRecords(a);if(!o){e.setLinkedRecords([t],a);return}var s;if(r==null)s=o.concat(t);else{s=[];for(var l=!1,c=0;c<o.length;c++){var d=o[c];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,a)}function bJ(e,t,r,n){var i=Bo.get(),a=i.NODE,o=lu(t.getDataID(),r.getDataID()),s=e.get(o);return s||(s=e.create(o,n)),s.setLinkedRecord(r,a),s.getValue("cursor")==null&&s.setValue(null,"cursor"),s}function _J(e,t,r){var n=Bo.get(),i=n.CURSOR,a=n.EDGES,o=e.getLinkedRecords(a);if(!o){e.setLinkedRecords([t],a);return}var s;if(r==null)s=[t].concat(o);else{s=[];for(var l=!1,c=0;c<o.length;c++){var d=o[c];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,a)}function yJ(e,t){var r=Bo.get(),n=r.EDGES,i=r.NODE,a=e.getLinkedRecords(n);if(a){for(var o,s=0;s<a.length;s++){var l=a[s],c=l&&l.getLinkedRecord(i);c!=null&&c.getDataID()===t?o===void 0&&(o=a.slice(0,s)):o!==void 0&&o.push(l)}o!==void 0&&e.setLinkedRecords(o,n)}}function $p(e,t,r){if(r==null)return r;var n=Bo.get(),i=n.EDGES,a=t.getValue(Dp);typeof a!="number"&&hJ(!1);var o=lu(t.getDataID(),i,a),s=e.create(o,r.getType());return s.copyFieldsFrom(r),s.getValue("cursor")==null&&s.setValue(null,"cursor"),t.setValue(a+1,Dp),s}function oc(e,t,r){for(var n=Bo.get(),i=n.NODE,a=0;a<e.length;a++){var o=e[a];if(o){var s=o.getLinkedRecord(i),l=s&&s.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(o)}}}var of={buildConnectionEdge:$p,createEdge:bJ,deleteNode:yJ,getConnection:mJ,getConnectionID:gJ,insertEdgeAfter:vJ,insertEdgeBefore:_J,update:pJ},xJ=Te.default,uu=xJ(Yt),Vo=of,$A=_v,ws=Se;var SJ={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(a){typeof a=="string"&&t.delete(a)})}}},EJ={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&ws(!1);var a=n.getValue(r.fieldKey),o=Array.isArray(a)?a:[a];o.forEach(function(s){if(typeof s=="string"){var l=(0,uu.default)(i),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=t.get(d);f!=null&&Vo.deleteNode(f,s)}}catch(h){l.e(h)}finally{l.f()}}})}}},wJ={update:FA(Vo.insertEdgeAfter)},RJ={update:FA(Vo.insertEdgeBefore)},kJ={update:IA(Vo.insertEdgeAfter)},AJ={update:IA(Vo.insertEdgeBefore)};function FA(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var a=r.handleArgs.connections;a==null&&ws(!1);var o,s;try{o=i.getLinkedRecord(r.fieldKey)}catch{}if(!o)try{s=i.getLinkedRecords(r.fieldKey)}catch{}if(!(o==null&&s==null)){var l=$A.get(),c=l.NODE,d=l.EDGES,f=(n=s)!==null&&n!==void 0?n:[o],h=(0,uu.default)(f),p;try{var m=function(){var E=p.value;if(E==null)return"continue";var k=E.getLinkedRecord("node");if(!k)return"continue";var w=k.getDataID(),C=(0,uu.default)(a),$;try{for(C.s();!($=C.n()).done;){var A=$.value,F=t.get(A);if(F!=null){var N=(b=F.getLinkedRecords(d))===null||b===void 0?void 0:b.some(function(L){var q;return(L==null||(q=L.getLinkedRecord(c))===null||q===void 0?void 0:q.getDataID())===w});if(!N){var O=Vo.buildConnectionEdge(t,F,E);O==null&&ws(!1),e(F,O)}}}}catch(L){C.e(L)}finally{C.f()}};for(h.s();!(p=h.n()).done;)var b,_=m()}catch(x){h.e(x)}finally{h.f()}}}}}function IA(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var a=r.handleArgs,o=a.connections,s=a.edgeTypeName;o==null&&ws(!1),s==null&&ws(!1);var l,c;try{l=i.getLinkedRecord(r.fieldKey)}catch{}if(!l)try{c=i.getLinkedRecords(r.fieldKey)}catch{}if(!(l==null&&c==null)){var d=$A.get(),f=d.NODE,h=d.EDGES,p=(n=c)!==null&&n!==void 0?n:[l],m=(0,uu.default)(p),b;try{var _=function(){var w=b.value;if(w==null)return"continue";var C=w.getDataID(),$=(0,uu.default)(o),A;try{for($.s();!(A=$.n()).done;){var F=A.value,N=t.get(F);if(N!=null){var O=(x=N.getLinkedRecords(h))===null||x===void 0?void 0:x.some(function(q){var K;return(q==null||(K=q.getLinkedRecord(f))===null||K===void 0?void 0:K.getDataID())===C});if(!O){var L=Vo.createEdge(t,N,w,s);L==null&&ws(!1),e(N,L)}}}}catch(q){$.e(q)}finally{$.f()}};for(m.s();!(b=m.n()).done;)var x,E=_()}catch(k){m.e(k)}finally{m.f()}}}}}var CJ={AppendEdgeHandler:wJ,DeleteRecordHandler:SJ,PrependEdgeHandler:RJ,AppendNodeHandler:kJ,PrependNodeHandler:AJ,DeleteEdgeHandler:EJ},DJ=of,ns=CJ,$J=Se;function FJ(e){switch(e){case"connection":return DJ;case"deleteRecord":return ns.DeleteRecordHandler;case"deleteEdge":return ns.DeleteEdgeHandler;case"appendEdge":return ns.AppendEdgeHandler;case"prependEdge":return ns.PrependEdgeHandler;case"appendNode":return ns.AppendNodeHandler;case"prependNode":return ns.PrependNodeHandler}$J(!1)}var IJ=FJ;function TJ(e){return!!(e&&e["@@RelayModernEnvironment"])}var yv=TJ,NJ=Te.default,xv=NJ(Yt),vs=of;var PJ=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),OJ=Object.freeze({APPEND:"append",PREPEND:"prepend"});function MJ(e,t,r,n){var i=r?[r]:[],a=n?[n]:[];return e.forEach(function(o){switch(o.type){case"NODE_DELETE":var s=LJ(o,t);s&&(i.push(s),a.push(s));break;case"RANGE_ADD":var l=zJ(o,t);l&&(i.push(l),a.push(l));break;case"RANGE_DELETE":var c=UJ(o,t);c&&(i.push(c),a.push(c));break}}),{optimisticUpdater:function(s,l){i.forEach(function(c){c(s,l)})},updater:function(s,l){a.forEach(function(c){c(s,l)})}}}function LJ(e,t){var r=e.deletedIDFieldName,n=Sv(t);return n?function(i,a){var o=i.getRootField(n);if(o){var s=o.getValue(r),l=Array.isArray(s)?s:[s];l.forEach(function(c){c&&typeof c=="string"&&i.delete(c)})}}:null}function zJ(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var a=Sv(t);return!n||!a?null:function(o,s){var l=o.get(r);if(l){var c=o.getRootField(a);if(c){var d=c.getLinkedRecord(i),f=(0,xv.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var m=vs.getConnection(l,p.key,p.filters);if(m){var b=vs.buildConnectionEdge(o,m,d);if(b)switch(p.rangeBehavior){case"append":vs.insertEdgeAfter(m,b);break;case"prepend":vs.insertEdgeBefore(m,b);break;default:break}}}}}catch(_){f.e(_)}finally{f.f()}}}}}function UJ(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,a=e.deletedIDFieldName;if(!r)return null;var o=Sv(t);return o?function(s,l){if(l){var c=[],d=l[o];if(d&&Array.isArray(a)){var f=(0,xv.default)(a),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"&&c.push(m.id)}):d&&d.id&&typeof d.id=="string"&&c.push(d.id)}else d&&typeof a=="string"&&typeof d=="object"&&(d=d[a],typeof d=="string"?c.push(d):Array.isArray(d)&&d.forEach(function(m){typeof m=="string"&&c.push(m)}));qJ(r,n,i,s,c)}}:null}function qJ(e,t,r,n,i){var a=n.get(e);if(a&&!(r.length<2)){for(var o=a,s=1;s<r.length-1;s++)o&&(o=o.getLinkedRecord(r[s]));if(!(!t||!o)){var l=(0,xv.default)(t),c;try{var d=function(){var h=c.value,p=vs.getConnection(o,h.key,h.filters);p&&i.forEach(function(m){vs.deleteNode(p,m)})};for(l.s();!(c=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function Sv(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var sf={MutationTypes:PJ,RangeOperations:OJ,convert:MJ},jJ=fi,BJ=jJ.getRequest,VJ=yv,HJ=ro,GJ=HJ.createOperationDescriptor,KJ=sf,WJ=Se;function QJ(e,t){VJ(e)||WJ(!1);var r=BJ(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,a=t.optimisticResponse,o=t.variables,s=GJ(r,o);if(i){var l=KJ.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:s,response:a,updater:n})}var YJ=QJ;function JJ(e,t){e.commitUpdate(t)}var XJ=JJ,ZJ=Te.default;ZJ(_t);var eX=Te.default,vy=eX(Za),tX=fi,rX=tX.getRequest,nX=Li,iX=nX.generateUniqueClientID,aX=yv,oX=ro,sX=oX.createOperationDescriptor,lX=sf,uX=Se;function cX(e,t){aX(e)||uX(!1);var r=rX(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,a=t.updater,o=t.configs,s=t.cacheConfig,l=t.onError,c=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=sX(r,d,s,iX());if(typeof n=="function"&&(n=n()),o){var p=lX.convert(o,r,i,a);i=p.optimisticUpdater,a=p.updater}var m=[],b=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:a,uploadables:f}).subscribe({next:function(x){var E;Array.isArray(x)?x.forEach(function(k){k.errors&&m.push.apply(m,(0,vy.default)(k.errors))}):x.errors&&m.push.apply(m,(0,vy.default)(x.errors)),(E=t.onNext)===null||E===void 0||E.call(t)},complete:function(){var x=t.onCompleted;if(x){var E=e.lookup(h.fragment);x(E.data,m.length!==0?m:null)}},error:l,unsubscribe:c});return{dispose:b.unsubscribe}}var dX=cX,fX=typeof WeakMap=="function",Ph=fX?new WeakMap:new Map;function TA(e,t){if(t!=null){var r={};return Object.assign(r,e),Object.keys(t).forEach(function(n){var i=t[n].get,a=i();if(!Ph.has(i))Ph.set(i,a),r[n]=a;else{var o=Ph.get(i);r[n]=o}}),r}else return e}TA.tests_only_resetDebugCache=void 0;var hX=TA,by=to;function pX(e){return function(r,n,i,a,o){var s=e(r,n,i,a,o);return s instanceof Error?by.create(function(l){return l.error(s)}):by.from(s)}}var mX={convertFetch:pX},gX=hX,vX=mX,bX=vX.convertFetch,Oh=Se;function _X(e,t){var r=bX(e);function n(i,a,o,s,l){var c=gX(a,i.providedVariables);if(i.operationKind==="subscription")return t||Oh(!1),s&&Oh(!1),t(i,c,o);var d=o.poll;return d!=null?(s&&Oh(!1),r(i,c,{force:!0}).poll(d)):r(i,c,o,s,l)}return{execute:n}}var yX={create:_X},xX=Te.default;xX(_t);var SX=jo;SX.stableCopy;var EX=Te.default,wX=EX(_t),RX=to,kX=ro,AX=kX.createOperationDescriptor,CX=$u,DX=CX.handlePotentialSnapshotErrors,$X=af,FX=fi,IX=FX.getRequest,TX=Se;function NX(e,t,r,n){var i,a=IX(t);a.params.operationKind!=="query"&&TX(!1);var o=(0,wX.default)({force:!0},n?.networkCacheConfig),s=AX(a,r,o),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function c(d){return DX(e,d.fieldErrors),d.data}switch(l){case"network-only":return _y(e,s).map(c);case"store-or-network":return e.check(s).status==="available"?RX.from(e.lookup(s.fragment)).map(c):_y(e,s).map(c);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function _y(e,t){return $X.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var PX=NX,OX=ro,MX=OX.createOperationDescriptor,LX=fi,zX=LX.getRequest;function UX(e,t,r,n){var i=zX(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var a=MX(i,r,n);return e.execute({operation:a}).map(function(){return e.lookup(a.fragment).data}).toPromise()}var qX=UX,jX=(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 a=this._callbacks.get(n);a?.forEach(function(o){try{o(i)}catch(s){setTimeout(function(){throw s},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var a,o=(a=this._callbacks.get(n))!==null&&a!==void 0?a:new Set;o.add(i);var s=function(){o.delete(i)};return this._callbacks.set(n,o),{dispose:s}},t.clear=function(){this._preloadableQueries.clear()},e})(),BX=new jX,VX=BX,HX=af,GX=HX.getPromiseForActiveRequest;function KX(e,t,r){var n,i,a=[],o=GX(e,r);if(o!=null)a=[r];else{var s,l,c=e.getOperationTracker(),d=c.getPendingOperationsAffectingOwner(r);a=(s=d?.pendingOperations)!==null&&s!==void 0?s:[],o=(l=d?.promise)!==null&&l!==void 0?l:null}if(!o)return null;var f=(n=(i=a)===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 o.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:a}),{promise:o,pendingOperations:a}}var NA=KX;function WX(e,t){return e===t&&(e===null||typeof e!="object")}var PA=WX;function QX(e,t){return Fp(e,t,!0)}function Fp(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,a=Array.isArray(t)?t:null;if(i&&a){var o=r&&!Object.isFrozen(a);n=a.reduce(function(h,p,m){var b=i[m],_=Fp(b,p,o);return _!==a[m]&&o&&(a[m]=_),h&&_===i[m]},!0)&&i.length===a.length}else if(!i&&!a){var s=e,l=t,c=Object.keys(s),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var m=s[p],b=Fp(m,l[p],f);return b!==l[p]&&f&&(l[p]=b),h&&b===s[p]},!0)&&c.length===d.length}return n?e:t}var lf=QX,OA=Te.default,yy=OA(_t),Ev=OA(Zr),YX=NA,JX=$u,XX=JX.handlePotentialSnapshotErrors,ZX=PA,eZ=lf,MA=Kn,tZ=ro,rZ=tZ.createRequestDescriptor,wv=hi,nZ=wv.areEqualSelectors,iZ=wv.createReaderSelector,aZ=wv.getSelectorsFromObject,oZ=la,xy=Se,sZ=(function(){function e(r,n,i,a,o){var s=this;(0,Ev.default)(this,"_onChange",function(){s._stale=!0,typeof s._callback=="function"&&s._callback()}),this._callback=a,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=o,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&LA(this._resolvers[n])},t.resolve=function(){if(this._stale){var n=this._data,i;for(var a in this._resolvers)if(this._resolvers.hasOwnProperty(a)){var o=this._resolvers[a],s=n[a];if(o){var l=o.resolve();(i||l!==s)&&(i=i||(0,yy.default)({},n),i[a]=l)}else{var c=this._props[a],d=c!==void 0?c:null;(i||!ZX(d,s))&&(i=i||(0,yy.default)({},n),i[a]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,MA.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=aZ(this._fragments,n);for(var a in i)if(i.hasOwnProperty(a)){var o=i[a],s=this._resolvers[a];o==null?(s?.dispose(),s=null):o.kind==="PluralReaderSelector"?s==null?s=new Sy(this._context.environment,this._rootIsQueryRenderer,o,this._callback!=null,this._onChange):(s instanceof Sy||xy(!1),s.setSelector(o)):s==null?s=new Ip(this._context.environment,this._rootIsQueryRenderer,o,this._callback!=null,this._onChange):(s instanceof Ip||xy(!1),s.setSelector(o)),this._props[a]=n[a],this._resolvers[a]=s}this._stale=!0},t.setVariables=function(n,i){for(var a in this._resolvers)if(this._resolvers.hasOwnProperty(a)){var o=this._resolvers[a];o&&o.setVariables(n,i)}this._stale=!0},e})(),Ip=(function(){function e(r,n,i,a,o){var s=this;(0,Ev.default)(this,"_onChange",function(c){s._data=c.data,s._isMissingData=c.isMissingData,s._fieldErrors=c.fieldErrors,s._callback()});var l=r.lookup(i);this._callback=o,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,MA.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?a&&(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=YX(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var a,o=(a=n?.pendingOperations)!==null&&a!==void 0?a:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:o}),i}}return XX(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&nZ(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=eZ(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(!oZ(n,this._selector.variables)){var a=rZ(i,n),o=iZ(this._selector.node,this._selector.dataID,n,a);this.setSelector(o)}},e})(),Sy=(function(){function e(r,n,i,a,o){var s=this;(0,Ev.default)(this,"_onChange",function(l){s._stale=!0,s._callback()}),this._callback=o,this._data=[],this._environment=r,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=n,this._subscribeOnConstruction=a,this.setSelector(i)}var t=e.prototype;return t.dispose=function(){this._resolvers.forEach(LA)},t.resolve=function(){if(this._stale){for(var n=this._data,i,a=0;a<this._resolvers.length;a++){var o=n[a],s=this._resolvers[a].resolve();(i||s!==o)&&(i=i||n.slice(0,a),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 a=this._resolvers.pop();a.dispose()}for(var o=0;o<i.length;o++)o<this._resolvers.length?this._resolvers[o].setSelector(i[o]):this._resolvers[o]=new Ip(this._environment,this._rootIsQueryRenderer,i[o],this._subscribeOnConstruction,this._onChange);this._stale=!0},t.setVariables=function(n,i){this._resolvers.forEach(function(a){return a.setVariables(n,i)}),this._stale=!0},e})();function LA(e){e&&e.dispose()}var lZ=sZ,uZ=lZ;function cZ(e,t,r,n,i,a){return new uZ(e,r,n,a,i)}var dZ=cZ,fZ=Se,Mh,Ey;function hZ(e){return Mh||(Mh=e.createContext(null),Ey=e),e!==Ey&&fZ(!1),Mh}var pZ=hZ,mZ=Se,Lh,wy;function gZ(e){return Lh||(Lh=e.createContext(null),wy=e),e!==wy&&mZ(!1),Lh}var vZ=gZ,zA=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function bZ(){return zA}function _Z(e){return e===zA}var uf={isSuspenseSentinel:_Z,suspenseSentinel:bZ},UA={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(n.indexOf(a)!==-1)continue;i[a]=r[a]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(UA);var Ws=UA.exports,cf=Te.default,yZ=cf(Zr),Ry=cf(Ws),ky=cf(Mk),Fa=cf(_t),xZ=SA,qA=Li,jA=qA.generateClientObjectClientID;qA.isClientID;var SZ=uf,BA=SZ.isSuspenseSentinel,ua=kt,Tp=ua.ACTOR_IDENTIFIER_KEY,Fr=ua.ERRORS_KEY,Rv=ua.ID_KEY,EZ=ua.INVALIDATED_AT_KEY,Ha=ua.REF_KEY,Ms=ua.REFS_KEY,VA=ua.RELAY_RESOLVER_VALUE_KEY;ua.ROOT_ID;var kv=ua.TYPENAME_KEY,zh=la,No=Se;function wZ(e){return(0,Fa.default)({},e)}function RZ(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==Rv&&r!==kv&&(t[r]=e[r])}function kZ(e,t){var r={};return r[Rv]=e,r[kv]=t,r}function AZ(e){return e}function CZ(e){return e[Rv]}function DZ(e){return Fr in e?Object.keys(e).filter(function(t){return t!==Fr}):Object.keys(e)}function $Z(e){return e[kv]}function FZ(e,t){var r;return(r=e[Fr])===null||r===void 0?void 0:r[t]}function Av(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(Ha)&&!r.hasOwnProperty(Ms)||No(!1)),r}function IZ(e,t){return t in e}function TZ(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[Ha]=="string"||No(!1),n[Ha]}function NZ(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[Ha]=="string"}function PZ(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[Ms])||No(!1),r[Ms])}function OZ(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[Ms])&&r[Ms].every(function(n){return typeof n=="string"})}function MZ(e){if(e==null)return null;var t=e[EZ];return typeof t!="number"?null:t}function LZ(e,t){var r,n=e[Fr],i=t[Fr],a=null;if(n==null&&i==null){var o;for(var s in t)(a||!zh(e[s],t[s]))&&(a=a!==null?a:(0,Fa.default)({},e),a[s]=t[s]);return(o=a)!==null&&o!==void 0?o:e}for(var l in t)if(l!==Fr){var c=t[l],d=i?.[l];if(a==null){var f=e[l],h=n?.[l];if(zh(f,c)&&zh(h,d))continue;a=(0,Fa.default)({},e),n!=null&&(a[Fr]=(0,Fa.default)({},n))}GA(a,l,c),HA(a,l,d)}return(r=a)!==null&&r!==void 0?r:e}function zZ(e,t){if(Fr in e||Fr in t){var r=e[Fr],n=(0,Ry.default)(e,[Fr].map(ky.default)),i=t[Fr],a=(0,Ry.default)(t,[Fr].map(ky.default)),o=(0,Fa.default)((0,Fa.default)({},n),a);if(r==null&&i==null)return o;var s={};for(var l in r)a.hasOwnProperty(l)||(s[l]=r[l]);for(var c in i)s[c]=i[c];for(var d in s){o[Fr]=s;break}return o}else return(0,Fa.default)((0,Fa.default)({},e),t)}function UZ(e){xZ(e)}function HA(e,t,r){var n=e[Fr];if(r!=null&&r.length>0)n==null?e[Fr]=(0,yZ.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[Fr]}}function GA(e,t,r){e[t]=r}function qZ(e,t,r){var n={};n[Ha]=r,e[t]=n}function jZ(e,t,r){var n={};n[Ms]=r,e[t]=n}function BZ(e,t,r,n){var i={};i[Ha]=n,i[Tp]=r,e[t]=i}function VZ(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[Ha]=="string"&&r[Tp]!=null||No(!1),[r[Tp],r[Ha]])}function HZ(e,t){var r=Av(e,VA);return r==null||BA(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&No(!1),jA(t,r))}function GZ(e,t){var r=Av(e,VA);return r==null||BA(r)?null:(Array.isArray(r)||No(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&No(!1),jA(t,n))}))}function KZ(e){return e}var Cn={clone:wZ,copyFields:RZ,create:kZ,freeze:UZ,fromObject:AZ,getDataID:CZ,getErrors:FZ,getFields:DZ,getInvalidationEpoch:MZ,getLinkedRecordID:TZ,getLinkedRecordIDs:PZ,getType:$Z,getValue:Av,hasValue:IZ,hasLinkedRecordID:NZ,hasLinkedRecordIDs:OZ,merge:zZ,setErrors:HA,setValue:GA,setLinkedRecordID:qZ,setLinkedRecordIDs:jZ,update:LZ,getActorLinkedRecordID:VZ,setActorLinkedRecordID:BZ,getResolverLinkedRecordID:HZ,getResolverLinkedRecordIDs:GZ,toJSON:KZ},WZ={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},df=WZ,QZ=Te.default,YZ=QZ(Yt),Ay=Cn,Cv=df,JZ=Cv.EXISTENT,XZ=Cv.NONEXISTENT,ZZ=Cv.UNKNOWN,eee=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var a=r[i],o=Ay.fromObject(a);n._records.set(i,o)})}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?XZ:JZ:ZZ},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,YZ.default)(this._records),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o[0],l=o[1];n[s]=Ay.toJSON(l)}}catch(c){i.e(c)}finally{i.f()}return n},e})(),Ho=eee,tee=Se,KA="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function ree(e){e!==KA&&tee(!1)}var Dv={assertInternalActorIdentifier:ree,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:KA},Np="actor_key",nee=Dv,iee=nee.getActorIdentifier;function aee(e){if(e!=null&&typeof e=="object"&&typeof e[Np]=="string")return iee(e[Np])}var oee={ACTOR_IDENTIFIER_FIELD_NAME:Np,getActorIdentifierFromPayload:aee},ff=Te.default,Cy=ff(_t),see=ff(Ws),WA=ff(Yt),lee=ff(Za),uee=["path","locations"],Pp=Symbol("$SELF");function cee(e){if(e==null)return null;var t=new Map,r=(0,WA.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,a=i.path,o=i.locations,s=(0,see.default)(i,uee);if(a!=null){var l=a.length;if(l!==0){for(var c=l-1,d=t,f=0;f<c;f++){var h=a[f],p=d.get(h);if(p instanceof Map){d=p;continue}var m=new Map;Array.isArray(p)&&m.set(Pp,p),d.set(h,m),d=m}var b=a[c],_=d.get(b);_ instanceof Map&&(d=_,_=d.get(b),b=Pp),Array.isArray(_)?_.push(s):d.set(b,[s])}}}}catch(x){r.e(x)}finally{r.f()}return t}function dee(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return QA(r,n),n}function QA(e,t){var r=(0,WA.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,a=i[0],o=i[1],s=t.length;if(Array.isArray(o)?t.push.apply(t,(0,lee.default)(o)):QA(o,t),a!==Pp)for(var l=t.length,c=s;c<l;c++){var d=t[c];d.path==null?t[c]=(0,Cy.default)((0,Cy.default)({},d),{},{path:[a]}):d.path.unshift(a)}}}catch(f){r.e(f)}finally{r.f()}}function fee(e,t){var r=e.get(t);return r instanceof Map?r:null}var hee={buildErrorTrie:cee,getNestedErrorTrieByKey:fee,getErrorsByKey:dee},pee="client:__type:",mee="__TypeSchema";function gee(e){return pee+e}var hf={generateTypeID:gee,TYPE_SCHEMA_TYPE:mee},YA=Te.default,vee=YA(Yt),fl=YA(Za),JA=oee;JA.ACTOR_IDENTIFIER_FIELD_NAME;var bee=JA.getActorIdentifierFromPayload,Dy=Kn,XA=Li,Uh=XA.generateClientID,_ee=XA.isClientID,yee=eo,xee=yee.getLocalVariables,$v=hee,See=$v.buildErrorTrie,Eee=$v.getErrorsByKey,$y=$v.getNestedErrorTrieByKey,et=Cn,wee=hi,Ree=wee.createNormalizationSelector,Go=kt,kee=Go.ROOT_ID,Aee=Go.TYPENAME_KEY,Fy=Go.getArgumentValues,Cee=Go.getHandleStorageKey,Dee=Go.getModuleComponentKey,$ee=Go.getModuleOperationKey,qh=Go.getStorageKey,ZA=hf,jh=ZA.TYPE_SCHEMA_TYPE,Bh=ZA.generateTypeID,en=Se;function Fee(e,t,r,n,i,a){var o=t.dataID,s=t.node,l=t.variables,c=new Iee(e,l,n,a??!1);return c.normalizeResponse(s,o,r,i)}var Iee=(function(){function e(r,n,i,a){this._actorIdentifier=i.actorIdentifier,this._getDataId=i.getDataID,this._handleFieldPayloads=[],this._treatMissingFieldsAsNull=i.treatMissingFieldsAsNull,this._incrementalPlaceholders=[],this._isClientExtension=!1,this._isUnmatchedAbstractType=!1,this._useExecTimeResolvers=a,this._followupPayloads=[],this._path=i.path?(0,fl.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,a,o){var s=this._recordSource.get(i);return s||en(!1),this._assignClientAbstractTypes(n),this._errorTrie=See(o),this._traverseSelections(n,s,a),{errors:o,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 a=0,o=Object.keys(i);a<o.length;a++){var s=o[a],l=(0,vee.default)(i[s]),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=Bh(d),h=this._recordSource.get(f);h==null&&(h=et.create(f,jh),this._recordSource.set(f,h)),et.setValue(h,s,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||en(!1),this._variables[n]},t._getRecordType=function(n){var i=n[Aee];return i==null&&en(!1),i},t._traverseSelections=function(n,i,a){for(var o=0;o<n.selections.length;o++){var s=n.selections[o];switch(s.kind){case"ScalarField":case"LinkedField":this._normalizeField(s,i,a);break;case"Condition":var l=!!this._getVariableValue(s.condition);l===s.passingValue&&this._traverseSelections(s,i,a);break;case"FragmentSpread":{var c=this._variables;this._variables=xee(this._variables,s.fragment.argumentDefinitions,s.args),this._traverseSelections(s.fragment,i,a),this._variables=c;break}case"InlineFragment":{var d=s.abstractKey;if(d==null){var f=et.getType(i);f===s.type&&this._traverseSelections(s,i,a)}else{var h=Object.prototype.hasOwnProperty.call(a,d),p=et.getType(i),m=Bh(p),b=this._recordSource.get(m);b==null&&(b=et.create(m,jh),this._recordSource.set(m,b)),et.setValue(b,d,h),h&&this._traverseSelections(s,i,a)}break}case"TypeDiscriminator":{var _=s.abstractKey,x=Object.prototype.hasOwnProperty.call(a,_),E=et.getType(i),k=Bh(E),w=this._recordSource.get(k);w==null&&(w=et.create(k,jh),this._recordSource.set(k,w)),et.setValue(w,_,x);break}case"LinkedHandle":case"ScalarHandle":var C=s.args?Fy(s.args,this._variables):{},$=qh(s,this._variables),A=Cee(s,this._variables);this._handleFieldPayloads.push({args:C,dataID:et.getDataID(i),fieldKey:$,handle:s.handle,handleKey:A,handleArgs:s.handleArgs?Fy(s.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(s,i,a);break;case"Defer":this._normalizeDefer(s,i,a);break;case"Stream":this._normalizeStream(s,i,a);break;case"ClientExtension":var F=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(s,i,a),this._isClientExtension=F;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(s.fragment,i,a);break;case"ActorChange":this._normalizeActorChange(s,i,a);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(s,i,a);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(s.backingField,i,a);break;default:en(!1)}}},t._normalizeResolver=function(n,i,a){n.fragment!=null&&this._traverseSelections(n.fragment,i,a)},t._normalizeDefer=function(n,i,a){var o=n.if===null||this._getVariableValue(n.if);o===!1?this._traverseSelections(n,i,a):this._incrementalPlaceholders.push({kind:"defer",data:a,label:n.label,path:(0,fl.default)(this._path),selector:Ree(n,et.getDataID(i),this._variables),typeName:et.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,a){this._traverseSelections(n,i,a);var o=n.if===null||this._getVariableValue(n.if);o===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,fl.default)(this._path),parentID:et.getDataID(i),node:n,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeModuleImport=function(n,i,a){typeof a=="object"&&a||en(!1);var o=et.getType(i),s=Dee(n.documentName),l=n.componentModuleProvider||a[s];et.setValue(i,s,l??null);var c=$ee(n.documentName),d=n.operationModuleProvider||a[c];et.setValue(i,c,d??null),d!=null&&this._followupPayloads.push({kind:"ModuleImportPayload",args:n.args,data:a,dataID:et.getDataID(i),operationReference:d,path:(0,fl.default)(this._path),typeName:o,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,a){typeof a=="object"&&a||en(!1);var o=n.alias||n.name,s=qh(n,this._variables),l=a[o],c=Dy.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(l)&&l.length===0;if(l==null||c){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),c?n.kind==="LinkedField"?et.setLinkedRecordIDs(i,s,[]):et.setValue(i,s,[]):et.setValue(i,s,null);var f=this._errorTrie;if(f!=null){var h=Eee(f,o);h!=null&&et.setErrors(i,s,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,s,l),et.setValue(i,s,l);else if(n.kind==="LinkedField"){this._path.push(o);var p=this._errorTrie;this._errorTrie=p==null?null:$y(p,o),n.plural?this._normalizePluralLink(n,i,s,l):this._normalizeLink(n,i,s,l),this._errorTrie=p,this._path.pop()}else en(!1)},t._normalizeActorChange=function(n,i,a){var o,s=n.linkedField;typeof a=="object"&&a||en(!1);var l=s.alias||s.name,c=qh(s,this._variables),d=a[l];if(d==null){if(d===void 0){var f=this._isClientExtension||this._isUnmatchedAbstractType;if(f)return;if(!this._treatMissingFieldsAsNull)return}et.setValue(i,c,null);return}var h=bee(d);if(h==null){et.setValue(i,c,null);return}var p=(o=s.concreteType)!==null&&o!==void 0?o:this._getRecordType(d),m=this._getDataId(d,p)||et.getLinkedRecordID(i,c)||Uh(et.getDataID(i),c);typeof m!="string"&&en(!1),et.setActorLinkedRecordID(i,c,h,m),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:m,path:[].concat((0,fl.default)(this._path),[l]),typeName:p,variables:this._variables,node:s,actorIdentifier:h})},t._normalizeLink=function(n,i,a,o){var s;typeof o=="object"&&o||en(!1);var l=this._getDataId(o,(s=n.concreteType)!==null&&s!==void 0?s:this._getRecordType(o))||et.getLinkedRecordID(i,a)||Uh(et.getDataID(i),a);typeof l!="string"&&en(!1),this._validateConflictingLinkedFieldsWithIdenticalId(et.getLinkedRecordID(i,a),l,a),et.setLinkedRecordID(i,a,l);var c=this._recordSource.get(l);if(c)this._validateRecordType(c,n,o);else{var d=n.concreteType||this._getRecordType(o);c=et.create(l,d),this._recordSource.set(l,c)}this._traverseSelections(n,c,o)},t._normalizePluralLink=function(n,i,a,o){var s=this;Array.isArray(o)||en(!1);var l=et.getLinkedRecordIDs(i,a),c=[];o.forEach(function(d,f){var h;if(d==null){c.push(d);return}s._path.push(String(f));var p=s._errorTrie;s._errorTrie=p==null?null:$y(p,f),typeof d!="object"&&en(!1);var m=s._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:s._getRecordType(d))||l&&l[f]||Uh(et.getDataID(i),a,f);typeof m!="string"&&en(!1),c.push(m);var b=s._recordSource.get(m);if(b)s._validateRecordType(b,n,d);else{var _=n.concreteType||s._getRecordType(d);b=et.create(m,_),s._recordSource.set(m,b)}l&&s._validateConflictingLinkedFieldsWithIdenticalId(l[f],m,a),s._traverseSelections(n,b,d),s._errorTrie=p,s._path.pop()}),et.setLinkedRecordIDs(i,a,c)},t._validateRecordType=function(n,i,a){if(Dy.ENABLE_STORE_ID_COLLISION_LOGGING){var o,s=(o=i.concreteType)!==null&&o!==void 0?o:this._getRecordType(a),l=et.getDataID(n),c=_ee(l)&&l!==kee||et.getType(n)===s;if(!c){var d={name:"idCollision.typename",previous_typename:et.getType(n),new_typename:s};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,a){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,a){},e})(),eC={normalize:Fee},pf=Te.default,Iy=pf(_t),Tee=pf(Cn),Nee=pf(Ho),Pee=pf(eC);function Oee(e,t,r,n,i){var a,o=e.data,s=e.errors,l=Nee.default.create(),c=Tee.default.create(t.dataID,r);l.set(t.dataID,c);var d=Pee.default.normalize(l,t,o,n,s,i);return(0,Iy.default)((0,Iy.default)({},d),{},{isFinal:((a=e.extensions)===null||a===void 0?void 0:a.is_final)===!0})}var Mee=Oee,Lee=fi,zee=Lee.getInlineDataFragment,Uee=kt,qee=Uee.FRAGMENTS_KEY,Ty=Se;function jee(e,t){var r,n=zee(e);if(t==null)return t;typeof t!="object"&&Ty(!1);var i=(r=t[qee])===null||r===void 0?void 0:r[n.name];return i==null&&Ty(!1),i}var Bee=jee,Vee=1e5;function Hee(){return Vee++}var tC=Hee,Gee=tC;function Kee(e,t){return{execute:function(n,i,a,o,s,l,c,d){var f=Gee(),h={start:function(b){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:a})},next:function(b){e.__log({name:"network.next",networkRequestId:f,response:b})},error:function(b){e.__log({name:"network.error",networkRequestId:f,error:b})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(b){e.__log({name:"network.info",networkRequestId:f,info:b})};return t.execute(n,i,a,o,p,l,c,d).do(h)}}}var Wee=Kee,Qee=Te.default,hl=Qee(Yt),Yee=Se,Jee=(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 a=n.identifier,o=new Set,s=(0,hl.default)(i),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,d=c.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(a)||(f.set(a,n),o.add(d)):(this._ownersToPendingOperations.set(d,new Map([[a,n]])),o.add(d))}}catch(_){s.e(_)}finally{s.f()}if(o.size!==0){var h=this._pendingOperationsToOwners.get(a)||new Set,p=(0,hl.default)(o),m;try{for(p.s();!(m=p.n()).done;){var b=m.value;this._resolveOwnerResolvers(b),h.add(b)}}catch(_){p.e(_)}finally{p.f()}this._pendingOperationsToOwners.set(a,h)}}},t.complete=function(n){var i=n.identifier,a=this._pendingOperationsToOwners.get(i);if(a!=null){var o=new Set,s=new Set,l=(0,hl.default)(a),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=this._ownersToPendingOperations.get(d);f&&(f.delete(i),f.size>0?s.add(d):o.add(d))}}catch(E){l.e(E)}finally{l.f()}var h=(0,hl.default)(o),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;this._resolveOwnerResolvers(m),this._ownersToPendingOperations.delete(m)}}catch(E){h.e(E)}finally{h.f()}var b=(0,hl.default)(s),_;try{for(b.s();!(_=b.n()).done;){var x=_.value;this._resolveOwnerResolvers(x)}}catch(E){b.e(E)}finally{b.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,a=this._ownersToPendingOperations.get(i);if(a==null||a.size===0)return null;var o=this._ownersToPendingPromise.get(i);if(o!=null)return{promise:o.promise,pendingOperations:o.pendingOperations};var s,l=new Promise(function(d){s=d});s==null&&Yee(!1);var c=Array.from(a.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:s,pendingOperations:c}),{promise:l,pendingOperations:c}},e})(),Xee=Jee;function Zee(e){var t=typeof Qc<"u"?Qc:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var ete=Zee,tte=Li,rte=tte.generateClientID,nte=kt,ite=nte.ROOT_ID,ate=rte(ite,"viewer"),ote="Viewer",Fv={VIEWER_ID:ate,VIEWER_TYPE:ote},rC=Fv,ste=rC.VIEWER_ID,lte=rC.VIEWER_TYPE;function ute(e,t){return t===lte&&e.id==null?ste:e.id}var nC=ute,cte=function(t){},dte=cte,iC=qo,fte=iC.REQUEST,hte=iC.SPLIT_OPERATION;function pte(e){switch(e.kind){case fte:return e.operation;case hte:default:return e}}var Iv=pte;function Ny(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),a=3;a<n;a++)i[a-3]=arguments[a];var o=0,s=r.replace(/%s/g,function(){return String(i[o++])}),l=new Error(s),c=Object.assign(l,{name:t,messageFormat:r,messageParams:i,type:e,taalOpcodes:[2,2]});if(c.stack===void 0)try{throw c}catch{}return c}var mte={create:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return Ny.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),a=2;a<n;a++)i[a-2]=arguments[a];return Ny.apply(void 0,["warn",t,r].concat(i))}},Vh,Hh,gte=typeof window<"u"&&typeof((Vh=window)===null||Vh===void 0||(Hh=Vh.performance)===null||Hh===void 0?void 0:Hh.now)=="function";function Py(){return gte?window.performance.now():Date.now()}function vte(e){var t=Py(),r=e();return[t,Py()-t,r]}var bte=vte,aC=Te.default,pl=aC(Yt),ml=aC(Za),Gh=to,_te=tC,Kh=Iv,yte=mte,sc=Kn,xte=jo,Ste=xte.stableCopy,Ete=bte,oC=Li,Oy=oC.generateClientID,wte=oC.generateUniqueClientID,Rte=eo,kte=Rte.getLocalVariables,lc=Cn,sC=hi,Wh=sC.createNormalizationSelector,Ate=sC.createReaderSelector,uc=Ho,Tv=kt,My=Tv.ROOT_TYPE,Cte=Tv.TYPENAME_KEY,Dte=Tv.getStorageKey,Zt=Se;function $te(e){return new Fte(e)}var Fte=(function(){function e(r){var n=this,i,a,o,s=r.actorIdentifier,l=r.getDataID,c=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,m=r.operationLoader,b=r.operationTracker,_=r.optimisticConfig,x=r.scheduler,E=r.shouldProcessClientComponents,k=r.sink,w=r.source,C=r.treatMissingFieldsAsNull,$=r.updater,A=r.log,F=r.normalizeResponse;this._actorIdentifier=s,this._getDataID=l,this._treatMissingFieldsAsNull=C,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=A,this._executeId=_te(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=m,this._operationTracker=b,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(i=(a=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&a!==void 0?a:((o=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||o===void 0?void 0:o.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=c,this._scheduler=x,this._sink=k,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=$,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=E,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=F;var N=this._nextSubscriptionId++;sc.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&_!=null&&this._processOptimisticResponse(_.response!=null?{data:_.response}:null,_.updater,!1),w.subscribe({complete:function(){return n._complete(N)},error:function(L){return n._error(L)},next:function(L){try{n._next(N,L)}catch(q){k.error(q)}},start:function(L){var q;n._start(N,L),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(q=n._operation.request.cacheConfig)!==null&&q!==void 0?q:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!sc.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&_!=null&&this._processOptimisticResponse(_.response!=null?{data:_.response}:null,_.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(a){return a.unsubscribe()}),this._subscriptions.clear());var i=this._optimisticUpdates;i!==null&&(this._optimisticUpdates=null,i.forEach(function(a){return n._getPublishQueueAndSaveActor().revertUpdate(a)}),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,Zt(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var a=this,o=this._scheduler;if(o!=null){var s=this._nextSubscriptionId++;Gh.create(function(l){var c=o.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return o.cancel(c)}}).subscribe({complete:function(){return a._complete(s)},error:function(c){return a._error(c)},start:function(c){return a._start(s,c)}})}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 a=this,o=this._state==="loading_incremental"?"low":"default";this._schedule(function(){a._log({name:"execute.next.start",executeId:a._executeId,response:i,operation:a._operation}),a._handleNext(i),a._maybeCompleteSubscriptionOperationTracking(),a._log({name:"execute.next.end",executeId:a._executeId,response:i,operation:a._operation})},o)},t._handleErrorResponse=function(n){var i=this,a=[];return n.forEach(function(o){if(!(o.data===null&&o.extensions!=null&&!o.hasOwnProperty("errors")))if(o.data==null){var s=o.hasOwnProperty("errors")&&o.errors!=null?o.errors:null,l=s?s.map(function(f){var h=f.message;return h}).join(`
|
|
45
|
-
`):"(No errors)",c=yte.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 c.source={errors:s,operation:i._operation.request.node,variables:i._operation.request.variables},c.stack,c}else{var d=o;a.push(d)}}),a},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})&&Zt(!1),!1;var a=n[0],o=((i=a.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return o&&this._state!=="started"&&Zt(!1),o?(this._processOptimisticResponse(a,null,this._treatMissingFieldsAsNull),this._sink.next(a),!0):!1},t._handleNext=function(n){if(this._state!=="completed"){this._seenActors.clear();var i=Array.isArray(n)?n:[n],a=this._handleErrorResponse(i);if(a.length===0){var o=i.some(function(F){var N;return((N=F.extensions)===null||N===void 0?void 0:N.is_final)===!0});o&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var s=this._handleOptimisticResponses(a);if(!s){var l=Ite(a),c=l[0],d=l[1],f=l[2],h=c.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var m=wte();this._operation={request:this._operation.request,fragment:Ate(this._operation.fragment.node,m,this._operation.fragment.variables,this._operation.fragment.owner),root:Wh(this._operation.root.node,m,this._operation.root.variables)}}var b=this._processResponses(c);this._processPayloadFollowups(b)}if(p)for(var _=[],x=0;x<f.length;x++){var E,k=f[x],w=new uc(k.data),o=((E=k.extensions)===null||E===void 0?void 0:E.is_final)===!0,C={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:o,source:w};this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,this._updater),_.push(C),this._execTimeResolverResponseComplete=o,o&&this._updateActiveState()}if(d.length>0){var $=this._processIncrementalResponses(d);this._processPayloadFollowups($)}this._isSubscriptionOperation&&(a[0].extensions==null?a[0].extensions={__relay_subscription_root_id:this._operation.fragment.dataID}:a[0].extensions.__relay_subscription_root_id=this._operation.fragment.dataID);var A=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(A),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,a){var o=this;if(this._optimisticUpdates!==null&&Zt(!1),!(n==null&&i==null)){var s=[];if(n){var l=this._normalizeResponse(n,this._operation.root,My,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:a},this._useExecTimeResolvers);Ly(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:uc.create(),isFinal:!1},updater:i});this._optimisticUpdates=s,s.forEach(function(d){return o._getPublishQueueAndSaveActor().applyUpdate(d)});var c=this._runPublishQueue();sc.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(c)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var a=n.followupPayloads,o=(0,pl.default)(a),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;switch(l.kind){case"ModuleImportPayload":var c=this._expectOperationLoader(),d=c.get(l.operationReference);if(d==null)this._processAsyncOptimisticModuleImport(l);else{var f=this._processOptimisticModuleImport(d,l);i.push.apply(i,(0,ml.default)(f))}break;case"ActorPayload":break;default:Zt(!1)}}}catch(h){o.e(h)}finally{o.f()}}},t._normalizeFollowupPayload=function(n,i){var a;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?a=kte(n.variables,i.argumentDefinitions,n.args):a=n.variables;var o=Wh(i,n.dataID,a),s={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(s,o,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 a=Kh(n),o=[],s=this._normalizeFollowupPayload(i,a);return Ly(s),o.push({operation:this._operation,payload:s,updater:null}),this._processOptimisticFollowups(s,o),o},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(a){if(!(a==null||i._state!=="started")){var o=i._processOptimisticModuleImport(a,n);if(o.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var s;(s=i._optimisticUpdates).push.apply(s,(0,ml.default)(o)),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(a){i._getPublishQueueAndSaveActor().revertUpdate(a)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),n.map(function(a){var o=i._normalizeResponse(a,i._operation.root,My,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,o,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),o})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(a){var o=a.incrementalPlaceholders,s=a.followupPayloads,l=a.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}),o&&o.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",o.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processIncrementalPlaceholder(a,d),i._actorIdentifier=h}),i._isClientPayload||i._state==="loading_final")){var c=[];o.forEach(function(d){d.kind==="defer"&&c.push(i._processDeferResponse(d.label,d.path,d,{data:d.data,extensions:{is_final:!0}}))}),c.length>0&&i._processPayloadFollowups(c)}})},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 a=this._expectOperationLoader(),o=a.get(n.operationReference);if(o!=null)this._processFollowupPayloadWithNormalizationNode(n,Kh(o));else{var s=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},c=Gh.from(new Promise(function(d,f){a.load(n.operationReference).then(d,f)}));Gh.create(function(d){var f,h=c.subscribe({next:function(m){if(m!=null){var b=function(){try{var E=Kh(m),k=sc.BATCH_ASYNC_MODULE_UPDATES_FN,w=k!=null&&i._pendingModulePayloadsCount>1,C=Ete(function(){if(i._handleFollowupPayload(n,E),w)i._scheduleAsyncStoreUpdate(k,d.complete);else{var F=i._runPublishQueue();i._updateOperationTracker(F)}}),$=C[0],A=C[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:E.name,duration:A}),w||d.complete()}catch(F){d.error(F)}},_=i._scheduler;_==null?b():f=_.schedule(b)}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:Zt(!1)}},t._processFollowupPayloadWithNormalizationNode=function(n,i){this._handleFollowupPayload(n,i),this._maybeCompleteSubscriptionOperationTracking()},t._handleFollowupPayload=function(n,i){var a=this._normalizeFollowupPayload(n,i);this._getPublishQueueAndSaveActor().commitPayload(this._operation,a),this._processPayloadFollowups([a])},t._processIncrementalPlaceholder=function(n,i){var a,o=i.label,s=i.path,l=s.map(String).join("."),c=this._incrementalResults.get(o);c==null&&(c=new Map,this._incrementalResults.set(o,c));var d=c.get(l),f=d!=null&&d.kind==="response"?d.responses:null;c.set(l,{kind:"placeholder",placeholder:i});var h;i.kind==="stream"?h=i.parentID:i.kind==="defer"?h=i.selector.dataID:Zt(!1);var p=n.source.get(h),m=((a=n.fieldPayloads)!==null&&a!==void 0?a:[]).filter(function(C){var $=Oy(C.dataID,C.fieldKey);return C.dataID===h||$===h});p==null&&Zt(!1);var b,_,x=this._source.get(h);if(x!=null){b=lc.update(x.record,p);var E=new Map,k=function($){var A=Tte($);E.set(A,$)};x.fieldPayloads.forEach(k),m.forEach(k),_=Array.from(E.values())}else b=p,_=m;if(this._source.set(h,{record:b,fieldPayloads:_}),f!=null){var w=this._processIncrementalResponses(f);this._processPayloadFollowups(w)}},t._processIncrementalResponses=function(n){var i=this,a=[];return n.forEach(function(o){var s=o.label,l=o.path,c=o.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:[o]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(o);return}var p=h.placeholder;p.kind!=="defer"&&Zt(!1),a.push(i._processDeferResponse(s,l,p,c))}else{var m=l.slice(0,-2).map(String).join("."),b=d.get(m);if(b==null){b={kind:"response",responses:[o]},d.set(m,b);return}else if(b.kind==="response"){b.responses.push(o);return}var _=b.placeholder;_.kind!=="stream"&&Zt(!1),a.push(i._processStreamResponse(s,l,_,c))}}),a},t._processDeferResponse=function(n,i,a,o){var s,l=a.selector.dataID,c=this._actorIdentifier;this._actorIdentifier=(s=a.actorIdentifier)!==null&&s!==void 0?s:this._actorIdentifier;var d=this._normalizeResponse(o,a.selector,a.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:a.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,d);var f=this._source.get(l);f==null&&Zt(!1);var h=f.fieldPayloads;if(h.length!==0){var p,m={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:uc.create(),isFinal:((p=o.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,m)}return this._actorIdentifier=c,d},t._processStreamResponse=function(n,i,a,o){var s=a.parentID,l=a.node,c=a.variables,d=a.actorIdentifier,f=this._actorIdentifier;this._actorIdentifier=d??this._actorIdentifier;var h=l.selections[0];h!=null&&h.kind==="LinkedField"&&h.plural===!0||Zt(!1);var p=this._normalizeStreamItem(o,s,h,c,i,a.path),m=p.fieldPayloads,b=p.itemID,_=p.itemIndex,x=p.prevIDs,E=p.relayPayload,k=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,E,function(C){var $=C.get(s);if($!=null){var A=$.getLinkedRecords(k);if(A!=null&&!(A.length!==x.length||A.some(function(N,O){return x[O]!==(N&&N.getDataID())}))){var F=(0,ml.default)(A);F[_]=C.get(b),$.setLinkedRecords(F,k)}}}),m.length!==0){var w={errors:null,fieldPayloads:m,incrementalPlaceholders:null,followupPayloads:null,source:uc.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,w)}return this._actorIdentifier=f,E},t._normalizeStreamItem=function(n,i,a,o,s,l){var c,d,f,h,p=n.data;typeof p!="object"&&Zt(!1);var m=(c=a.alias)!==null&&c!==void 0?c:a.name,b=Dte(a,o),_=this._source.get(i);_==null&&Zt(!1);var x=_.record,E=_.fieldPayloads,k=lc.getLinkedRecordIDs(x,b);k==null&&Zt(!1);var w=s[s.length-1],C=parseInt(w,10);C===w&&C>=0||Zt(!1);var $=(d=a.concreteType)!==null&&d!==void 0?d:p[Cte];typeof $!="string"&&Zt(!1);var A=(f=(h=this._getDataID(p,$))!==null&&h!==void 0?h:k?.[C])!==null&&f!==void 0?f:Oy(i,b,C);typeof A!="string"&&Zt(!1);var F=Wh(a,A,o),N=lc.clone(x),O=(0,ml.default)(k);O[C]=A,lc.setLinkedRecordIDs(N,b,O),this._source.set(i,{record:N,fieldPayloads:E});var L=this._normalizeResponse(n,F,$,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,ml.default)(l),[m,String(C)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:E,itemID:A,itemIndex:C,prevIDs:k,relayPayload:L,storageKey:b}},t._scheduleAsyncStoreUpdate=function(n,i){var a=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){a._asyncStoreUpdateDisposable=null;var o=a._runPublishQueue();a._updateOperationTracker(o);var s=(0,pl.default)(a._completeFns),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;c()}}catch(d){s.e(d)}finally{s.f()}a._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,a=(0,pl.default)(this._getActorsToVisit()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,l=this._getPublishQueue(s).run(n);l.forEach(function(c){return i.add(c)})}}catch(c){a.e(c)}finally{a.f()}return Array.from(i)},t._retainData=function(){var n=(0,pl.default)(this._getActorsToVisit()),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;this._retainDisposables.has(a)||this._retainDisposables.set(a,this._getStore(a).retain(this._operation))}}catch(o){n.e(o)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,pl.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;a.dispose()}}catch(o){n.e(o)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Zt(!1),n},e})();function Ite(e){var t=[],r=[],n=[];return e.forEach(function(i){var a;if(i.path!=null||i.label!=null){var o=i.label,s=i.path;(o==null||s==null)&&Zt(!1),r.push({label:o,path:s,response:i})}else((a=i.extensions)===null||a===void 0?void 0:a.is_normalized)===!0?n.push(i):t.push(i)}),[t,r,n]}function Tte(e){var t;return(t=JSON.stringify(Ste(e)))!==null&&t!==void 0?t:""}function Ly(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Zt(!1)}var Nte={execute:$te},Pte=Promise.resolve();function Ote(e){Pte.then(e).catch(Mte)}function Mte(e){setTimeout(function(){throw e},0)}var Lte=Ote,pr=Cn,zte=df,zy=zte.EXISTENT,Qh=Se,Ute=(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),a=this._sink.get(n);if(a===void 0){if(i==null)return i;var o=pr.clone(i);return o}else{if(a===null)return null;if(i!=null){var s=pr.update(i,a);return s}else{var l=pr.clone(a);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var a=this._base.get(n);a||Qh(!1),i=pr.create(n,pr.getType(a)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var a=this._sink.get(n),o=this._base.get(n);a||o||Qh(!1);var s=this._getSinkRecord(i);o&&pr.copyFields(o,s),a&&pr.copyFields(a,s)},t.copyFieldsFromRecord=function(n,i){var a=this._getSinkRecord(i);pr.copyFields(n,a)},t.create=function(n,i){this._base.getStatus(n)!==zy&&this._sink.getStatus(n)!==zy||Qh(!1);var a=pr.create(n,i);this._sink.set(n,a)},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 a=this.__sources[i].get(n);if(a)return pr.getType(a);if(a===null)return null}},t.getValue=function(n,i){for(var a=0;a<this.__sources.length;a++){var o=this.__sources[a].get(n);if(o){var s=pr.getValue(o,i);if(s!==void 0)return s}else if(o===null)return null}},t.setValue=function(n,i,a){var o=this._getSinkRecord(n);pr.setValue(o,i,a)},t.getErrors=function(n,i){for(var a=0;a<this.__sources.length;a++){var o=this.__sources[a].get(n);if(o){var s=pr.getErrors(o,i);if(s!==void 0)return s}else if(o===null)return null}},t.setErrors=function(n,i,a){var o=this._getSinkRecord(n);pr.setErrors(o,i,a)},t.getLinkedRecordID=function(n,i){for(var a=0;a<this.__sources.length;a++){var o=this.__sources[a].get(n);if(o){var s=pr.getLinkedRecordID(o,i);if(s!==void 0)return s}else if(o===null)return null}},t.setLinkedRecordID=function(n,i,a){var o=this._getSinkRecord(n);pr.setLinkedRecordID(o,i,a)},t.getLinkedRecordIDs=function(n,i){for(var a=0;a<this.__sources.length;a++){var o=this.__sources[a].get(n);if(o){var s=pr.getLinkedRecordIDs(o,i);if(s!==void 0)return s}else if(o===null)return null}},t.setLinkedRecordIDs=function(n,i,a){var o=this._getSinkRecord(n);pr.setLinkedRecordIDs(o,i,a)},e})(),lC=Ute,qte=Te.default,mf=qte(Yt),jte=kt,Ls=jte.getArgumentValues,Bte=["id","__id","__typename","js"];function Vte(e,t,r,n,i){var a={};return cu(a,e,t,r,n,i),a}function cu(e,t,r,n,i,a){var o,s=(0,mf.default)(n),l;try{var c=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:Kte(p,r,t,i,a),set:Hte(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:Wte(p,r,t,i,a),set:Gte(p,r,t,i)});break;case"ScalarField":var m=(o=p.alias)!==null&&o!==void 0?o:p.name;Object.defineProperty(e,m,{get:function(){var _,x=Ls((_=p.args)!==null&&_!==void 0?_:[],r),E=t.getValue(p.name,x);return E==null&&(E=Jte(p,x,t,i,a)),E},set:Bte.includes(p.name)?void 0:function(b){var _,x=Ls((_=p.args)!==null&&_!==void 0?_:[],r);t.setValue__UNSAFE(b,p.name,x)}});break;case"InlineFragment":t.getType()===p.type&&cu(e,t,r,p.selections,i,a);break;case"ClientExtension":cu(e,t,r,p.selections,i,a);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;c()}}catch(h){s.e(h)}finally{s.f()}}function Hte(e,t,r,n){return function(a){var o,s=Ls((o=e.args)!==null&&o!==void 0?o:[],t);if(a==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=a.map(function(c){if(c==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var d=c.__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 Gte(e,t,r,n){return function(a){var o,s=Ls((o=e.args)!==null&&o!==void 0?o:[],t);if(a==null)r.setValue(a,e.name,s);else{var l=a.__id;if(l==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var c=n.get(l);if(c==null)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(c,e.name,s)}}}function Kte(e,t,r,n,i){return function(){var a,o=Ls((a=e.args)!==null&&a!==void 0?a:[],t),s=r.getLinkedRecords(e.name,o);return s===void 0&&(s=Yte(e,o,r,n,i)),s!=null?s.map(function(l){if(l!=null){var c={};return cu(c,l,t,e.selections,n,i),c}else return l}):s}}function Wte(e,t,r,n,i){return function(){var a,o=Ls((a=e.args)!==null&&a!==void 0?a:[],t),s=r.getLinkedRecord(e.name,o);if(s===void 0&&(s=Qte(e,o,r,n,i)),s!=null){var l={};return cu(l,s,t,e.selections,n,i),l}else return s}}function Qte(e,t,r,n,i){var a=(0,mf.default)(i),o;try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.kind==="linked"){var l=s.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(c){a.e(c)}finally{a.f()}}function Yte(e,t,r,n,i){var a=(0,mf.default)(i),o;try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.kind==="pluralLinked"){var l=s.handle(e,r,t,n);if(l!=null)return l.map(function(c){if(c!=null)return n.get(c)})}}}catch(c){a.e(c)}finally{a.f()}}function Jte(e,t,r,n,i){var a=(0,mf.default)(i),o;try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.kind==="scalar"){var l=s.handle(e,r,t,n);if(l!==void 0)return l}}}catch(c){a.e(c)}finally{a.f()}}var uC={createUpdatableProxy:Vte},Xte=fi,Zte=Xte.getFragment,ere=hi,tre=ere.getVariablesFromFragment,rre=kt,nre=rre.ID_KEY,ire=uC,are=ire.createUpdatableProxy,ore=Se;function sre(e,t,r,n){var i=Zte(e),a=tre(i,t),o=t[nre],s=r.get(o);return s==null&&ore(!1),{updatableData:are(s,a,i.selections,r,n)}}var cC={readUpdatableFragment:sre},lre=fi,ure=lre.getUpdatableQuery,cre=uC,dre=cre.createUpdatableProxy;function fre(e,t,r,n){var i=ure(e);return{updatableData:dre(r.getRoot(),t,i.fragment.selections,r,n)}}var dC={readUpdatableQuery:fre},hre=Li,pre=hre.generateClientID,mre=kt,_a=mre.getStableStorageKey,cc=Se,gre=(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&&cc(!1),n},t.getValue=function(n,i){var a=_a(n,i);return this._mutator.getValue(this._dataID,a)},t.setValue=function(n,i,a,o){return fC(n)||cc(!1),this.setValue__UNSAFE(n,i,a,o)},t.getErrors=function(n,i){var a=_a(n,i);return this._mutator.getErrors(this._dataID,a)},t.setValue__UNSAFE=function(n,i,a,o){var s=_a(i,a);return this._mutator.setValue(this._dataID,s,n),o!=null&&(o.length===0?this._mutator.setErrors(this._dataID,s):this._mutator.setErrors(this._dataID,s,o)),this},t.getLinkedRecord=function(n,i){var a=_a(n,i),o=this._mutator.getLinkedRecordID(this._dataID,a);return o!=null?this._source.get(o):o},t.setLinkedRecord=function(n,i,a){n instanceof e||cc(!1);var o=_a(i,a),s=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,o,s),this},t.getOrCreateLinkedRecord=function(n,i,a){var o=this.getLinkedRecord(n,a);if(!o){var s,l=_a(n,a),c=pre(this.getDataID(),l);o=(s=this._source.get(c))!==null&&s!==void 0?s:this._source.create(c,i),this.setLinkedRecord(o,n,a)}return o},t.getLinkedRecords=function(n,i){var a=this,o=_a(n,i),s=this._mutator.getLinkedRecordIDs(this._dataID,o);return s==null?s:s.map(function(l){return l!=null?a._source.get(l):l})},t.setLinkedRecords=function(n,i,a){Array.isArray(n)||cc(!1);var o=_a(i,a),s=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,o,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function fC(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(fC)}var vre=gre,bre=Cn,hC=df,Yh=hC.EXISTENT,Uy=hC.NONEXISTENT,pC=kt,Jh=pC.ROOT_ID,qy=pC.ROOT_TYPE,_re=cC,yre=_re.readUpdatableFragment,xre=dC,Sre=xre.readUpdatableQuery,Ere=vre,dc=Se,wre=(function(){function e(r,n,i,a,o){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=a,this._log=o??function(s){}}var t=e.prototype;return t.publishSource=function(n,i){var a=this,o=n.getRecordIDs();o.forEach(function(s){var l=n.getStatus(s);if(l===Yh){var c=n.get(s);c&&(a.__mutator.getStatus(s)!==Yh&&a.create(s,bre.getType(c)),a.__mutator.copyFieldsFromRecord(c,s))}else l===Uy&&a.delete(s)}),i&&i.length&&i.forEach(function(s){var l=a._handlerProvider&&a._handlerProvider(s.handle);l||dc(!1),l.update(a,s)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var a=this.get(n);return a||dc(!1),a},t.delete=function(n){n===Jh&&dc(!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===Yh?this._proxies[n]=new Ere(this,this.__mutator,n):this._proxies[n]=i===Uy?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(Jh);return n||(n=this.create(Jh,qy)),n&&n.getType()===qy||dc(!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 Sre(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return yre(n,i,this,this._missingFieldHandlers)},e})(),mC=wre,Rre=qo,jy=Rre.LINKED_FIELD,kre=kt,Are=kre.getHandleStorageKey,Cre=la,Dre=Se;function $re(e,t,r){var n=t.find(function(a){return a.kind===jy&&a.name===e.name&&a.alias===e.alias&&Cre(a.args,e.args)});n&&n.kind===jy||Dre(!1);var i=Are(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var gC=$re,Fre=qo,By=Fre.SCALAR_FIELD,Ire=kt,Tre=Ire.getHandleStorageKey,Nre=la,Pre=Se;function Ore(e,t,r){var n=t.find(function(a){return a.kind===By&&a.name===e.name&&a.alias===e.alias&&Nre(a.args,e.args)});n&&n.kind===By||Pre(!1);var i=Tre(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var Mre=Ore,Lre=Te.default,fc=Lre(Yt),zre=lC,Ure=mC,qre=Iv,jre=Li,Bre=jre.isClientID,Vre=gC,Hre=Mre,Gre=eo,Vy=Gre.getLocalVariables,Hy=Cn,vC=df,Xh=vC.EXISTENT,Kre=vC.UNKNOWN,Nv=kt,bC=hf,Wre=bC.TYPE_SCHEMA_TYPE,Zh=bC.generateTypeID,gl=Se,Qre=Nv.getModuleOperationKey,hc=Nv.getStorageKey,e0=Nv.getArgumentValues;function Yre(e,t,r,n,i,a,o,s,l,c){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new Jre(e,t,r,h,i,a,o,s,l,c),m=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),m}var Jre=(function(){function e(r,n,i,a,o,s,l,c,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=o,this._mutator=p,this._operationLoader=s??null,this._recordSourceProxy=m,this._recordWasMissing=!1,this._variables=a,this._shouldProcessClientComponents=c,this._log=d}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(n){var i=this._mutatorRecordSourceProxyCache.get(n);if(i==null){var a=this._getTargetForActor(n),o=new zre(this._getSourceForActor(n),a),s=new Ure(o,this._getDataID,void 0,this._handlers,this._log);i=[o,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)||gl(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&Bre(i))){var a=n.args!=null?e0(n.args,this._variables):{},o=(0,fc.default)(this._handlers),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;if(l.kind==="scalar"){var c=l.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(c!==void 0)return c}}}catch(d){o.e(d)}finally{o.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var a=n.args!=null?e0(n.args,this._variables):{},o=(0,fc.default)(this._handlers),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;if(l.kind==="linked"){var c=l.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(c!==void 0&&(c===null||this._mutator.getStatus(c)===Xh))return c}}}catch(d){o.e(d)}finally{o.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var a=this,o=n.args!=null?e0(n.args,this._variables):{},s=(0,fc.default)(this._handlers),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;if(c.kind==="pluralLinked"){var d=c.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&a._mutator.getStatus(h)===Xh});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 a=this._mutator.getStatus(i);if(a===Kre&&this._handleMissing(),a===Xh){var o=this._source.get(i),s=Hy.getInvalidationEpoch(o);s!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,s):s),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var a=this;n.forEach(function(o){switch(o.kind){case"ScalarField":a._checkScalar(o,i);break;case"LinkedField":o.plural?a._checkPluralLink(o,i):a._checkLink(o,i);break;case"ActorChange":a._checkActorChange(o.linkedField,i);break;case"Condition":var s=!!a._getVariableValue(o.condition);s===o.passingValue&&a._traverseSelections(o.selections,i);break;case"InlineFragment":{var l=o.abstractKey;if(l==null){var c=a._mutator.getType(i);c===o.type&&a._traverseSelections(o.selections,i)}else{var d=a._mutator.getType(i);d==null&&gl(!1);var f=Zh(d),h=a._mutator.getValue(f,l);h===!0?a._traverseSelections(o.selections,i):h==null&&a._handleMissing()}break}case"LinkedHandle":{var p=Vre(o,n,a._variables);p.plural?a._checkPluralLink(p,i):a._checkLink(p,i);break}case"ScalarHandle":{var m=Hre(o,n,a._variables);a._checkScalar(m,i);break}case"ModuleImport":a._checkModuleImport(o,i);break;case"Defer":case"Stream":a._traverseSelections(o.selections,i);break;case"FragmentSpread":var b=a._variables;a._variables=Vy(a._variables,o.fragment.argumentDefinitions,o.args),a._traverseSelections(o.fragment.selections,i),a._variables=b;break;case"ClientExtension":var _=a._recordWasMissing;a._traverseSelections(o.selections,i),a._recordWasMissing=_;break;case"TypeDiscriminator":var x=o.abstractKey,E=a._mutator.getType(i);E==null&&gl(!1);var k=Zh(E),w=a._mutator.getValue(k,x);w==null&&a._handleMissing();break;case"ClientComponent":if(a._shouldProcessClientComponents===!1)break;a._traverseSelections(o.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":a._useExecTimeResolvers||a._checkResolver(o,i);break;case"ClientEdgeToClientObject":a._useExecTimeResolvers||a._checkResolver(o.backingField,i);break;default:gl(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var a=this._operationLoader;a===null&&gl(!1);var o=Qre(n.documentName),s=this._mutator.getValue(i,o);if(s==null){s===void 0&&this._handleMissing();return}var l=a.get(s);if(l!=null){var c=qre(l),d=this._variables;this._variables=Vy(this._variables,c.argumentDefinitions,n.args),this._traverse(c,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var a=hc(n,this._variables),o=this._mutator.getValue(i,a);o===void 0&&(o=this._handleMissingScalarField(n,i),o!==void 0&&this._mutator.setValue(i,a,o))},t._checkLink=function(n,i){var a=hc(n,this._variables),o=this._mutator.getLinkedRecordID(i,a);o===void 0&&(o=this._handleMissingLinkField(n,i),o!=null?this._mutator.setLinkedRecordID(i,a,o):o===null&&this._mutator.setValue(i,a,null)),o!=null&&this._traverse(n,o)},t._checkPluralLink=function(n,i){var a=this,o=hc(n,this._variables),s=this._mutator.getLinkedRecordIDs(i,o);s===void 0&&(s=this._handleMissingPluralLinkField(n,i),s!=null?this._mutator.setLinkedRecordIDs(i,o,s):s===null&&this._mutator.setValue(i,o,null)),s&&s.forEach(function(l){l!=null&&a._traverse(n,l)})},t._checkActorChange=function(n,i){var a=hc(n,this._variables),o=this._source.get(i),s=o!=null?Hy.getActorLinkedRecordID(o,a):o;if(s==null)s===void 0&&this._handleMissing();else{var l=s[0],c=s[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),m=p[0],b=p[1];this._source=this._getSourceForActor(l),this._mutator=m,this._recordSourceProxy=b,this._assignClientAbstractTypes(n),this._traverse(n,c),this._source=d,this._mutator=f,this._recordSourceProxy=h}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var a=0,o=Object.keys(i);a<o.length;a++){var s=o[a],l=(0,fc.default)(i[s]),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=Zh(d);this._source.get(f)==null&&this._mutator.create(f,Wre),this._mutator.getValue(f,s)==null&&this._mutator.setValue(f,s,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),Xre={check:Yre},Zre=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},ene=Cn,tne=kt,rne=tne.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,nne=Se;function ine(e){var t=ene.getValue(e,rne);return t==null?null:(t instanceof Set||nne(!1),t)}var _C=ine;function ane(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var one=ane,sne=Te.default,yi=sne(Yt),lne=lf,une=qo,Gy=une.RELAY_LIVE_RESOLVER,cne=Kn,Ky=Zre,yC=Li,pc=yC.generateClientID,t0=yC.generateClientObjectClientID,je=Cn,dne=hi,fne=dne.createNormalizationSelector,mc=Ho,hne=eC,pne=hne.normalize,Ko=kt,r0=Ko.RELAY_RESOLVER_ERROR_KEY,Op=Ko.RELAY_RESOLVER_INVALIDATION_KEY,mne=Ko.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,n0=Ko.RELAY_RESOLVER_SNAPSHOT_KEY,i0=Ko.RELAY_RESOLVER_VALUE_KEY,gne=Ko.getReadTimeResolverStorageKey,vne=Ko.getStorageKey,bne=_C,_ne=one,yne=uf,Wy=yne.isSuspenseSentinel,bi=Se,Pv="__resolverLiveStateSubscription",gc="__resolverLiveStateValue",vc="__resolverLiveStateDirty",xC="__RELAY_RESOLVER__",xne="__relay_model_instance";function a0(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var Sne=(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,a,o,s){var l=this._getRecordSource(),c=Ml(l,n),d=gne(i,a),f=je.getLinkedRecordID(c,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,s)){var m;h!=null&&EC(h),f=(m=f)!==null&&m!==void 0?m:pc(n,d),h=je.create(f,xC);var b=o();if(je.setValue(h,n0,b.snapshot),je.setValue(h,r0,b.error),i.kind===Gy){if(b.resolverResult!=null){b.error!=null&&bi(!1);var _=b.resolverResult;p=this._setLiveStateValue(h,f,_,i,a)}}else p=this._setResolverValue(h,b.resolverResult,i,a);l.set(f,h);var x=Ml(l,n),E=je.clone(x);if(je.setLinkedRecordID(E,d,f),l.set(n,E),i.fragment!=null){var k,w=vne(i.fragment,a),C=pc(n,w);a0(this._resolverIDToRecordIDs,C,f),a0(this._recordIDToResolverIDs,n,C);var $=(k=b.snapshot)===null||k===void 0?void 0:k.seenRecords;if($!=null){var A=(0,yi.default)($),F;try{for(A.s();!(F=A.n()).done;){var N=F.value;a0(this._recordIDToResolverIDs,N,C)}}catch(J){A.e(J)}finally{A.f()}}}}else if(i.kind===Gy&&je.getValue(h,vc)){var O;f=(O=f)!==null&&O!==void 0?O:pc(n,d),h=je.clone(h);var L=je.getValue(h,gc);_ne(L)||bi(!1),p=this._setLiveResolverValue(h,L,i,a),je.setValue(h,vc,!1),l.set(f,h)}var q=this._getResolverValue(h),K=je.getValue(h,n0),re=je.getValue(h,r0),V=null;if(Wy(q)){var Y;V=(Y=f)!==null&&Y!==void 0?Y:pc(n,d)}return[q,f,re,K,V,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),a=i.get(n);a==null&&bi(!1);var o=je.getValue(a,gc);return new Promise(function(s){var l=o.subscribe(function(){l(),s()})})},t._setLiveStateValue=function(n,i,a,o,s){var l=this._makeLiveStateHandler(i),c=a.subscribe(l);je.setValue(n,gc,a);var d=this._setLiveResolverValue(n,a,o,s);return je.setValue(n,vc,!1),je.setValue(n,Pv,c),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var a=i._getRecordSource(),o=a.get(n);if(o&&je.hasValue(o,gc)){var s=je.clone(o);je.setValue(s,vc,!0),i._setLiveResolverUpdate(n,s)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=mc.create()),this._liveResolverBatchRecordSource.set(n,i);else{var a=mc.create();a.set(n,i),this._store.publish(a),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&bi(!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,a,o){var s=null,l=null;try{s=i.read()}catch(c){l=c}return je.setValue(n,r0,l),this._setResolverValue(n,s,a,o)},t._setResolverValue=function(n,i,a,o){var s=a.normalizationInfo,l=null;if(i!=null&&s!=null&&!Wy(i)){var c,d=bne(n),f=new Set,h=this._getRecordSource();if(s.plural){Array.isArray(i)||bi(!1),c=[];for(var p=mc.create(),m=0;m<i.length;m++){var b=i[m];if(b!=null){typeof b!="object"&&bi(!1);var _=Yy(s,b),x=t0(_,je.getDataID(n),m),E=this._normalizeOutputTypeValue(x,b,o,s,[a.path,String(m)],_),k=(0,yi.default)(E.getRecordIDs()),w;try{for(k.s();!(w=k.n()).done;){var C=w.value;p.set(C,Ml(E,C)),f.add(C)}}catch(q){k.e(q)}finally{k.f()}c.push(x)}}l=Qy(h,p,d)}else{typeof i!="object"&&bi(!1);var $=Yy(s,i),A=t0($,je.getDataID(n)),F=this._normalizeOutputTypeValue(A,i,o,s,[a.path],$),N=(0,yi.default)(F.getRecordIDs()),O;try{for(N.s();!(O=N.n()).done;){var L=O.value;f.add(L)}}catch(q){N.e(q)}finally{N.f()}c=A,l=Qy(h,F,d)}je.setValue(n,mne,f),Ky(c),je.setValue(n,i0,c)}else Ky(i),je.setValue(n,i0,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return je.getValue(n,i0)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),a=new Set,o=Array.from(n);o.length;){var s=o.pop();a.add(s),n.add(s);var l=this._recordIDToResolverIDs.get(s);if(l!=null){var c=(0,yi.default)(l),d;try{for(c.s();!(d=c.n()).done;){var f=d.value;if(!a.has(f)){a.add(f);var h=this._resolverIDToRecordIDs.get(f);if(h==null)continue;var p=(0,yi.default)(h),m;try{for(p.s();!(m=p.n()).done;){var b=m.value;SC(b,i),a.has(b)||(a.add(b),o.push(b))}}catch(_){p.e(_)}finally{p.f()}}}}catch(_){c.e(_)}finally{c.f()}}}},t._isInvalid=function(n,i){if(!je.getValue(n,Op))return!1;var a=je.getValue(n,n0),o=a?.data,s=a?.selector;if(o==null||s==null)return!0;var l=i(s),c=l.data,d=lne(o,c);if(d!==o)return!0;if(cne.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=je.clone(n);je.setValue(f,Op,!1);var h=this._getRecordSource();h.set(je.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,a,o,s,l){var c=mc.create();switch(o.kind){case"OutputType":{var d=je.create(n,l);c.set(n,d);var f=fne(o.normalizationNode,n,a),h=!1,p=this._store.__getNormalizationOptions(s);return pne(c,f,i,p,void 0,h).source}case"WeakModel":{var m=je.create(n,l);return je.setValue(m,xne,i),c.set(n,m),c}default:o.kind,bi(!1)}},t.ensureClientRecord=function(n,i){var a=t0(i,n),o=this._getRecordSource();if(!o.has(a)){var s=je.create(a,i);je.setValue(s,"id",n),o.set(a,s)}return a},t.unsubscribeFromLiveResolverRecords=function(n){return Rne(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,yi.default)(n),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this._getRecordSource().get(o);s!=null&&Ov(s)&&this._getRecordSource().delete(o)}}catch(l){i.e(l)}finally{i.f()}}},e})();function Qy(e,t,r){var n=new Set;if(r!=null){var i=(0,yi.default)(r),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;t.has(o)||(n.add(o),e.remove(o))}}catch(p){i.e(p)}finally{i.f()}}var s=(0,yi.default)(t.getRecordIDs()),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,d=Ml(t,c);if(e.has(c)){var f=Ml(e,c),h=je.update(f,d);h!==f&&(n.add(c),e.set(c,h),wne(f,e))}else e.set(c,d)}}catch(p){s.e(p)}finally{s.f()}return n}function Ene(e){var t=new Set;return je.getFields(e).forEach(function(r){if(je.hasLinkedRecordID(e,r)){var n=je.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(je.hasLinkedRecordIDs(e,r)){var i;(i=je.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(a){a!=null&&t.add(a)})}}),t}function SC(e,t){var r=t.get(e);if(r){var n=je.clone(r);je.setValue(n,Op,!0),t.set(e,n)}}function wne(e,t){var r=Ene(e),n=(0,yi.default)(r),i;try{for(n.s();!(i=n.n()).done;){var a=i.value,o=t.get(a);o!=null&&Ov(o)&&SC(a,t)}}catch(s){n.e(s)}finally{n.f()}}function Rne(e,t){if(t.size!==0){var r=(0,yi.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,a=e.get(i);a!=null&&Ov(a)&&EC(a)}}catch(o){r.e(o)}finally{r.f()}}}function Ov(e){return je.getType(e)===xC}function EC(e){var t=je.getValue(e,Pv);t?.()}function Ml(e,t){var r=e.get(t);return r==null&&bi(!1),r}function kne(e){return e}function Yy(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&bi(!1),n}var Ane={LiveResolverCache:Sne,getUpdatedDataIDs:kne,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:Pv},Cne=Te.default,Dne=Cne(_t),wC=Cn,Jy=Ho,$ne=Se,o0=wC.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),RC=(function(){function e(r){this._base=r,this._sink=Jy.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==o0}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===o0?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=Jy.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,o0)},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,Dne.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(a){var o=n.get(a);o===void 0?delete i[a]:i[a]=wC.toJSON(o)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function Fne(e){return new RC(e)}function Ine(e){return e instanceof RC||$ne(!1),e.getOptimisticRecordIDs()}var Tne={create:Fne,getOptimisticRecordIDs:Ine},Nne=qo,Pne=Nne.RELAY_LIVE_RESOLVER,Xy=Se,One=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,a,o,s){i.kind===Pne&&Xy(!1);var l=o(),c=l.resolverResult,d=l.snapshot,f=l.error;return[c,void 0,f,d,void 0,void 0]},t.invalidateDataIDs=function(n){},t.ensureClientRecord=function(n,i){Xy(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),Mne={NoopResolverCache:One},gf=Te.default,Zy=gf(_t),Lne=gf(Zr),zne=gf(Ws),s0=gf(Za),Une=["message"],ex=Kn,qne=uf,jne=qne.isSuspenseSentinel,Bne=eo,tn=Cn,zi=kt,tx=zi.CLIENT_EDGE_TRAVERSAL_PATH,Vne=zi.FRAGMENT_OWNER_KEY,Hne=zi.FRAGMENT_PROP_NAME_KEY,bc=zi.FRAGMENTS_KEY,_c=zi.ID_KEY,Gne=zi.MODULE_COMPONENT_KEY,Kne=zi.ROOT_ID,Hc=zi.getArgumentValues,Wne=zi.getModuleComponentKey,yc=zi.getStorageKey,Qne=Mne,Yne=Qne.NoopResolverCache,kC=mv,Jne=kC.RESOLVER_FRAGMENT_ERRORED_SENTINEL,Xne=kC.withResolverContext,Zne=hf,eie=Zne.generateTypeID,er=Se;function AC(e,t,r,n){var i=new tie(e,t,r??new Yne,n);return i.read()}var tie=(function(){function e(r,n,i,a){var o,s,l,c;this._clientEdgeTraversalPath=(o=n.clientEdgeTraversalPath)!==null&&o!==void 0&&o.length?(0,s0.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:((c=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||c===void 0?void 0:c.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=a}var t=e.prototype;return t.read=function(){var n,i=this._selector,a=i.node,o=i.dataID,s=i.isWithinUnmatchedTypeRefinement,l=a.abstractKey,c=this._recordSource.get(o),d=!s;if(d&&l==null&&c!=null&&(this._recordMatchesTypeCondition(c,a.type)||(d=!1)),d&&l!=null&&c!=null){var f=this._implementsInterface(c,l);f===!1&&(d=!1)}this._isWithinUnmatchedTypeRefinement=!d;var h=this._traverse(a,o,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 a=tn.getErrors(n,i);if(a!=null){var o=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var s=0;s<a.length;s++){var l,c,d,f=a[s];this._fieldErrors.push({kind:"relay_field_payload.error",owner:o,fieldPath:((l=f.path)!==null&&l!==void 0?l:[]).join("."),error:f,shouldThrow:(c=(d=this._selector.node.metadata)===null||d===void 0?void 0:d.throwOnFieldError)!==null&&c!==void 0?c:!1,handled:!1,uiContext:void 0})}}},t._markDataAsMissing=function(n){var i,a;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var o=this._fragmentName;if(this._fieldErrors.push((i=(a=this._selector.node.metadata)===null||a===void 0?void 0:a.throwOnFieldError)!==null&&i!==void 0&&i?{kind:"missing_expected_data.throw",owner:o,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:o,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,a){var o=this._recordSource.get(i);if(this._seenRecords.add(i),o==null)return o===void 0&&this._markDataAsMissing("<record>"),o;var s=a||{},l=this._traverseSelections(n.selections,o,s);return l?s:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||er(!1),this._variables[n]},t._maybeReportUnexpectedNull=function(n){if(n.action!=="NONE"){var i=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var a;if(n.field.linkedField!=null){var o;a=(o=n.field.linkedField.alias)!==null&&o!==void 0?o:n.field.linkedField.name}else{var s;a=(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:a,owner:i,handled:!1,uiContext:void 0});return;case"LOG":this._fieldErrors.push({kind:"missing_required_field.log",fieldPath:a,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,a){var o=n;switch(i){case"RESULT":o=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(o=null);break}var s=this._fieldErrors;if(this._fieldErrors=a,s!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<s.length;l++)this._fieldErrors.push(rx(s[l]))}return o},t._asResult=function(n){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:n};var i=this._fieldErrors.map(function(a){switch(a.kind){case"relay_field_payload.error":var o=a.error;o.message;var s=(0,zne.default)(o,Une);return s;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:a.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(a.fieldPath," in ").concat(a.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(a.fieldPath,"' in '").concat(a.owner,"'.")};case"missing_required_field.log":return null;default:a.kind,er(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,a){for(var o=0;o<n.length;o++){var s=n[o];switch(s.kind){case"RequiredField":var l=this._readClientSideDirectiveField(s,i,a);if(!this._handleRequiredFieldValue(s,l))return!1;break;case"CatchField":{var c,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(s,i,a),m=(c=(d=s.field)===null||d===void 0?void 0:d.backingField)!==null&&c!==void 0?c:s.field,b=(f=m?.alias)!==null&&f!==void 0?f:m?.name;b==null&&er(!1),a[b]=this._catchErrors(p,s.to,h);break}case"ScalarField":this._readScalar(s,i,a);break;case"LinkedField":s.plural?this._readPluralLink(s,i,a):this._readLink(s,i,a);break;case"Condition":var _=!!this._getVariableValue(s.condition);if(_===s.passingValue){var x=this._traverseSelections(s.selections,i,a);if(!x)return!1}break;case"InlineFragment":{var E=this._readInlineFragment(s,i,a,!1);if(E===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(s,i,a):this._readResolverField(s,i,a);break}case"FragmentSpread":this._createFragmentPointer(s,i,a);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(s,i,a);break}case"ModuleImport":this._readModuleImport(s,i,a);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(s,i,a);break;case"Defer":case"ClientExtension":{var k=this._isMissingData,w=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var C=this._traverseSelections(s.selections,i,a);if(this._isMissingData=k||this._missingClientEdges.length>w||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!C)return!1;break}case"Stream":{var $=this._traverseSelections(s.selections,i,a);if(!$)return!1;break}case"ActorChange":this._readActorChange(s,i,a);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(s.backingField.kind==="RelayResolver"||s.backingField.kind==="RelayLiveResolver")){var A=s.linkedField;A.plural?this._readPluralLink(A,i,a):this._readLink(A,i,a)}else this._readClientEdge(s,i,a);break;default:er(!1)}}return!0},t._readClientSideDirectiveField=function(n,i,a){switch(n.field.kind){case"ScalarField":return this._readScalar(n.field,i,a);case"LinkedField":return n.field.plural?this._readPluralLink(n.field,i,a):this._readLink(n.field,i,a);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(n.field,i,a):this._readResolverField(n.field,i,a);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(n.field.backingField.kind==="RelayResolver"||n.field.backingField.kind==="RelayLiveResolver")){var o=n.field;return o.linkedField.plural?this._readPluralLink(o.linkedField,i,a):this._readLink(o.linkedField,i,a)}else return this._readClientEdge(n.field,i,a);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,a);default:n.field.kind,er(!1)}},t._readResolverField=function(n,i,a){var o,s=tn.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var c=this._readResolverFieldImpl(n,s),d=(o=n.alias)!==null&&o!==void 0?o:n.name;return this._prependPreviousErrors(l,d),a[d]=c,c},t._readResolverFieldImpl=function(n,i){var a=this,o=n.fragment,s,l=function(E){return s!=null?{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors}:(s=AC(a._recordSource,E,a._resolverCache),{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors})},c=function(){if(o!=null){var E={__id:i,__fragmentOwner:a._owner,__fragments:(0,Lne.default)({},o.name,o.args?Hc(o.args,a._variables):{})};a._clientEdgeTraversalPath.length>0&&a._clientEdgeTraversalPath[a._clientEdgeTraversalPath.length-1]!==null&&(E[tx]=(0,s0.default)(a._clientEdgeTraversalPath));var k={getDataForResolverFragment:l};return Xne(k,function(){var A=nx(n,a._variables,E,a._resolverContext),F=A[0],N=A[1];return{resolverResult:F,snapshot:s,error:N}})}else{var w=nx(n,a._variables,null,a._resolverContext),C=w[0],$=w[1];return{resolverResult:C,snapshot:void 0,error:$}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,c,l),f=d[0],h=d[1],p=d[2],m=d[3],b=d[4],_=d[5];return this._propagateResolverMetadata(n.path,m,p,h,b,_),f},t._propagateResolverMetadata=function(n,i,a,o,s,l){var c=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 b,_=i.fieldErrors[m];((b=this._selector.node.metadata)===null||b===void 0?void 0:b.throwOnFieldError)===!0?this._fieldErrors.push(_):this._fieldErrors.push(rx(_))}}this._isMissingData=this._isMissingData||i.isMissingData}if(a){var x,E,k={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:a,shouldThrow:(x=(E=this._selector.node.metadata)===null||E===void 0?void 0:E.throwOnFieldError)!==null&&x!==void 0?x:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[k]:this._fieldErrors.push(k)}o!=null&&this._seenRecords.add(o),s!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(s)),l?.forEach(function(w){c._updatedDataIDs.add(w)})},t._readClientEdge=function(n,i,a){var o=this,s,l=n.backingField;l.kind==="ClientExtension"&&er(!1);var c=(s=l.alias)!==null&&s!==void 0?s:l.name,d={};this._traverseSelections([l],i,d);var f=d[c];if(f==null||jne(f))return a[c]=f,f;if(n.linkedField.plural){Array.isArray(f)||er(!1);var h;n.kind!=="ClientEdgeToClientObject"&&er(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var O,L=(O=n.concreteType)!==null&&O!==void 0?O:N.__typename;typeof L!="string"&&er(!1);var q=l0(N,l.path,o._owner.identifier),K=o._resolverCache.ensureClientRecord(q,L),re=n.modelResolvers;if(re!=null){var V=re[L];V===void 0&&er(!1);var Y=o._readResolverFieldImpl(V,K);return Y!=null?K:null}return K}):h=f.map(function(N){return l0(N,l.path,o._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var p=this._readLinkedIds(n.linkedField,h,i,a);return this._clientEdgeTraversalPath.pop(),a[c]=p,p}else{var m,b=l0(f,l.path,this._owner.identifier),_,x=(m=n.concreteType)!==null&&m!==void 0?m:f.__typename,E;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof x!="string"&&er(!1),_=this._resolverCache.ensureClientRecord(b,x),E=null):(_=b,E=null):(_=b,E={readerClientEdge:n,clientEdgeDestinationID:b});var k=n.modelResolvers;if(k!=null){typeof x!="string"&&er(!1);var w=k[x];w===void 0&&er(!1);var C=this._readResolverFieldImpl(w,_);if(C==null)return a[c]=null,null}this._clientEdgeTraversalPath.push(E);var $=a[c];$==null||typeof $=="object"||er(!1);var A=this._fieldErrors;this._fieldErrors=null;var F=this._traverse(n.linkedField,_,$);return this._prependPreviousErrors(A,c),this._clientEdgeTraversalPath.pop(),a[c]=F,F}},t._readScalar=function(n,i,a){var o,s=(o=n.alias)!==null&&o!==void 0?o:n.name,l=yc(n,this._variables),c=tn.getValue(i,l);return c===null||ex.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(c)&&c.length===0?this._maybeAddFieldErrors(i,l):c===void 0&&this._markDataAsMissing(s),a[s]=c,c},t._readLink=function(n,i,a){var o,s=(o=n.alias)!==null&&o!==void 0?o:n.name,l=yc(n,this._variables),c=tn.getLinkedRecordID(i,l);if(c==null)return a[s]=c,c===null?this._maybeAddFieldErrors(i,l):c===void 0&&this._markDataAsMissing(s),c;var d=a[s];d==null||typeof d=="object"||er(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,c,d);return this._prependPreviousErrors(f,s),a[s]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var a=0;a<this._fieldErrors.length;a++){var o=this._fieldErrors[a];o.owner===this._fragmentName&&(o.kind==="missing_expected_data.throw"||o.kind==="missing_expected_data.log"||o.kind==="missing_required_field.throw"||o.kind==="missing_required_field.log")&&(o.fieldPath="".concat(i,".").concat(o.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,a){var o,s=(o=n.alias)!==null&&o!==void 0?o:n.name,l=yc(n,this._variables),c=tn.getActorLinkedRecordID(i,l);if(c==null)return a[s]=c,c===void 0?this._markDataAsMissing(s):c===null&&this._maybeAddFieldErrors(i,l),a[s];var d=c[0],f=c[1],h={};return this._createFragmentPointer(n.fragmentSpread,tn.fromObject({__id:f}),h),a[s]={__fragmentRef:h,__viewer:d},a[s]},t._readPluralLink=function(n,i,a){var o=yc(n,this._variables),s=tn.getLinkedRecordIDs(i,o);return(s===null||ex.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(s)&&s.length===0)&&this._maybeAddFieldErrors(i,o),this._readLinkedIds(n,s,i,a)},t._readLinkedIds=function(n,i,a,o){var s=this,l,c=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return o[c]=i,i===void 0&&this._markDataAsMissing(c),i;var d=o[c];d==null||Array.isArray(d)||er(!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 b=h[m];b==null||typeof b=="object"||er(!1);var _=s._fieldErrors;s._fieldErrors=null,h[m]=s._traverse(n,p,b),s._prependPreviousErrors(_,m)}),this._prependPreviousErrors(f,c),o[c]=h,h},t._readModuleImport=function(n,i,a){var o=Wne(n.documentName),s=tn.getValue(i,o),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,a),a[Hne]=n.fragmentPropName,a[Gne]=l},t._readAliasedInlineFragment=function(n,i,a){var o=this._fieldErrors;this._fieldErrors=null;var s=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(o,n.name),s===!1&&(s=null),a[n.name]=s},t._readInlineFragment=function(n,i,a,o){if(n.type==null){var s=this._traverseSelections(n.selections,i,a);return s===!1?!1:a}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var s=this._traverseSelections(n.selections,i,a);if(!s)return!1}else return null;else{var c=this._implementsInterface(i,l);if(c===!1&&o)return null;var d=this._isMissingData,f=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=f||c===!1;var h=this._traverseSelections(n.selections,i,a);if(this._isWithinUnmatchedTypeRefinement=f,c===!1)return this._isMissingData=d,null;if(c==null)return;if(h===!1)return!1}return a},t._recordMatchesTypeCondition=function(n,i){var a=tn.getType(n);return a!=null&&a===i||tn.getDataID(n)===Kne},t._createFragmentPointer=function(n,i,a){var o=a[bc];o==null&&(o=a[bc]={}),typeof o=="object"&&o!=null||er(!1),a[_c]==null&&(a[_c]=tn.getDataID(i)),o[n.name]=Hc(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),a[Vne]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(a[tx]=(0,s0.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,a){var o=a[bc];o==null&&(o=a[bc]={}),typeof o=="object"&&o!=null||er(!1),a[_c]==null&&(a[_c]=tn.getDataID(i));var s={},l=this._fragmentName;this._fragmentName=n.name;var c=this._variables,d=n.args?Hc(n.args,this._variables):{};this._variables=Bne.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,s),this._variables=c,this._fragmentName=l,o[n.name]=s},t._implementsInterface=function(n,i){var a=tn.getType(n),o=this._recordSource.get(eie(a)),s=o!=null?tn.getValue(o,i):null;return s==null&&this._markDataAsMissing("<abstract-type-hint>"),s},e})();function rx(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,Zy.default)((0,Zy.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,er(!1)}}function nx(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,a=null,o=null;try{var s=[];e.fragment!=null&&s.push(r);var l=e.args?Hc(e.args,t):void 0;s.push(l),s.push(n),a=i.apply(null,s)}catch(c){a=null,c!==Jne&&(o=c)}return[a,o]}function l0(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;er(!1)}var Mv={read:AC},rie=Te.default,ix=rie(Yt),nie=Iv,iie=gC,aie=_C,oie=eo,ax=oie.getLocalVariables,Vi=Cn,vf=kt,sie=hf,ox=sie.generateTypeID,u0=Se,lie=vf.getReadTimeResolverStorageKey,sx=vf.getStorageKey,uie=vf.getModuleOperationKey;function cie(e,t,r,n,i,a){var o=t.dataID,s=t.node,l=t.variables,c=new die(e,l,r,n,i,a);c.mark(s,o)}var die=(function(){function e(r,n,i,a,o,s){this._operationLoader=a??null,this._operationName=null,this._useExecTimeResolvers=s??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=o}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 a=this._recordSource.get(i);a!=null&&this._traverseSelections(n.selections,a)},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||u0(!1),this._variables[n]},t._traverseSelections=function(n,i){var a=this;n.forEach(function(o){switch(o.kind){case"ActorChange":a._traverseLink(o.linkedField,i);break;case"LinkedField":o.plural?a._traversePluralLink(o,i):a._traverseLink(o,i);break;case"Condition":var s=!!a._getVariableValue(o.condition);s===o.passingValue&&a._traverseSelections(o.selections,i);break;case"InlineFragment":if(o.abstractKey==null){var l=Vi.getType(i);(l!=null&&l===o.type||l===vf.ROOT_TYPE)&&a._traverseSelections(o.selections,i)}else{var c=Vi.getType(i),d=ox(c);a._references.add(d),a._traverseSelections(o.selections,i)}break;case"FragmentSpread":var f=a._variables;a._variables=ax(a._variables,o.fragment.argumentDefinitions,o.args),a._traverseSelections(o.fragment.selections,i),a._variables=f;break;case"LinkedHandle":var h=iie(o,n,a._variables);h.plural?a._traversePluralLink(h,i):a._traverseLink(h,i);break;case"Defer":case"Stream":a._traverseSelections(o.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=Vi.getType(i),m=ox(p);a._references.add(m);break}case"ModuleImport":a._traverseModuleImport(o,i);break;case"ClientExtension":a._traverseSelections(o.selections,i);break;case"ClientComponent":if(a._shouldProcessClientComponents===!1)break;a._traverseSelections(o.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":a._traverseResolverField(o,i);break;case"ClientEdgeToClientObject":a._traverseClientEdgeToClientObject(o,i);break;default:u0(!1)}})},t._traverseClientEdgeToClientObject=function(n,i){if(this._useExecTimeResolvers){this._traverseLink(n.linkedField,i);return}var a=this._traverseResolverField(n.backingField,i);if(a!=null){var o=this._recordSource.get(a);if(o!=null)if(n.backingField.isOutputType){var s=aie(o);if(s!=null){var l=(0,ix.default)(s),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;this._references.add(d)}}catch(E){l.e(E)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=Vi.getResolverLinkedRecordIDs(o,h);if(p!=null){var m=(0,ix.default)(p),b;try{for(m.s();!(b=m.n()).done;){var _=b.value;_!=null&&this._traverse(f,_)}}catch(E){m.e(E)}finally{m.f()}}}else{var x=Vi.getResolverLinkedRecordID(o,h);x!=null&&this._traverse(f,x)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var a=lie(n,this._variables),o=Vi.getLinkedRecordID(i,a);o!=null&&this._references.add(o);var s=n.fragment;return s!=null&&this._traverseSelections([s],i),o}},t._traverseModuleImport=function(n,i){var a=this._operationLoader;a===null&&u0(!1);var o=uie(n.documentName),s=Vi.getValue(i,o);if(s!=null){var l=a.get(s);if(l!=null){var c=nie(l),d=this._variables;this._variables=ax(this._variables,c.argumentDefinitions,n.args),this._traverseSelections(c.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var a=sx(n,this._variables),o=Vi.getLinkedRecordID(i,a);o!=null&&this._traverse(n,o)},t._traversePluralLink=function(n,i){var a=this,o=sx(n,this._variables),s=Vi.getLinkedRecordIDs(i,o);s?.forEach(function(l){l!=null&&a._traverse(n,l)})},e})(),fie={mark:cie},hie=Symbol.iterator;function pie(e,t){for(var r=e[hie](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var mie=pie,gie=kt,vie=gie.ROOT_ID,bie=Fv,_ie=bie.VIEWER_ID,yie=Symbol.iterator;function xie(e,t){for(var r=e[yie](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==vie&&i!==_ie)return!0;n=r.next()}return!1}var Sie=xie,lx=lf,ux=Kn,Eie=mie,wie=Sie,cx=Mv,Rie=(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 a=this,o={backup:null,callback:i,snapshot:n,stale:!1},s=function(){a._subscriptions.delete(o)};return this._subscriptions.add(o),{dispose:s}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(a){if(!a.stale){a.backup=a.snapshot;return}var o=a.snapshot,s=cx.read(n,o.selector,i._resolverCache,i._resolverContext),l=lx(o.data,s.data);s.data=l,a.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,a,o){var s=this,l=i.size!==0;this._subscriptions.forEach(function(c){var d=s._updateSubscription(n,c,i,l,o);d!=null&&a.push(d)})},t._updateSubscription=function(n,i,a,o,s){var l=i.backup,c=i.callback,d=i.snapshot,f=i.stale,h=o&&Eie(d.seenRecords,a);if(!(!f&&!h)){var p=h||!l?cx.read(n,d.selector,this._resolverCache,this._resolverContext):l,m=lx(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&&ux.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:s,snapshot:d,nextSnapshot:p}),c(p),d.selector.owner;if(ux.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||wie(d.seenRecords,a)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),kie=Rie,CC=Te.default,dx=CC(Yt),Aie=CC(Zr),DC=Dv,Cie=DC.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,fx=DC.assertInternalActorIdentifier,Die=Lte,$ie=Xre,Fie=nC,Lv=Ane,Iie=Lv.LiveResolverCache,Tie=Lv.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,Nie=Lv.getUpdatedDataIDs,yo=Cn,hx=Tne,Pie=Mv,Oie=fie,Mie=kie,Lie=kt,$C=kt,c0=$C.ROOT_ID,zie=$C.ROOT_TYPE,d0=Se,Uie=10,qie=(function(){function e(r,n){var i=this,a,o,s,l,c,d,f,h;(0,Aie.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=(a=n?.gcReleaseBufferSize)!==null&&a!==void 0?a:Uie,this._shouldRetainWithinTTL_EXPERIMENTAL=(o=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&o!==void 0?o:!1,this._gcRun=null,this._gcScheduler=(s=n?.gcScheduler)!==null&&s!==void 0?s:Die,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:Fie,this._globalInvalidationEpoch=null,this._invalidationSubscriptions=new Set,this._invalidatedRecordIDs=new Set,this.__log=(c=n?.log)!==null&&c!==void 0?c: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 Iie(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new Mie(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,jie(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 a,o,s,l,c,d,f,h=n.root,p=this._getMutableRecordSource(),m=this._globalInvalidationEpoch,b=(a=(o=n.request.node.operation.use_exec_time_resolvers)!==null&&o!==void 0?o:((s=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&a!==void 0?a:!1,_=this._roots.get(n.request.identifier),x=_!=null?_.epoch:null;if(m!=null&&(x==null||x<=m))return{status:"stale"};var E=(l=i?.handlers)!==null&&l!==void 0?l:[],k=(c=i?.getSourceForActor)!==null&&c!==void 0?c:function($){return fx($),p},w=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function($){return fx($),p},C=$ie.check(k,w,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:Cie,h,E,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,b);return Vie(C,x,_?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,a=n.request.identifier,o=!1,s=function(){if(!o){o=!0;var d=i._roots.get(a);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(a),i.scheduleGC();else if(i._releaseBuffer.push(a),i._releaseBuffer.length>i._gcReleaseBufferSize){var p=i._releaseBuffer.shift();i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(p),i.scheduleGC()}}}},l=this._roots.get(a);return l!=null?(l.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(c){return c!==a})),l.refCount+=1):this._roots.set(a,{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 a=this.getSource(),o=Pie.read(a,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),o},t.notify=function(n,i){var a=this,o=this.__log;o?.({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){a._updateInvalidationSubscription(h,i===!0)}),n!=null){var c=n.request.identifier,d=this._roots.get(c);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(c),this._roots.set(c,f)}}return o?.({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 a=this._getMutableRecordSource();Bie(a,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var o=this.__log;o?.({name:"store.publish",source:n,optimistic:a===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,a=new Map;return n.forEach(function(o){var s,l=i.getSource().get(o);a.set(o,(s=yo.getInvalidationEpoch(l))!==null&&s!==void 0?s:null)}),a.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:a}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),a=i.invalidations,o=n.invalidations;if(a.get("global")!==o.get("global"))return!0;var s=(0,dx.default)(n.dataIDs),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;if(a.get(c)!==o.get(c))return!0}}catch(d){s.e(d)}finally{s.f()}return!1},t.subscribeToInvalidationState=function(n,i){var a=this,o={callback:i,invalidationState:n},s=function(){a._invalidationSubscriptions.delete(o)};return this._invalidationSubscriptions.add(o),{dispose:s}},t._updateInvalidationSubscription=function(n,i){var a=this,o=n.callback,s=n.invalidationState,l=s.dataIDs,c=i||l.some(function(d){return a._invalidatedRecordIDs.has(d)});c&&o()},t.snapshot=function(){this._optimisticSource!=null&&d0(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=hx.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||d0(!1);var i=this.__log;i?.({name:"store.restore"});var a=hx.getOptimisticRecordIDs(n);this._resolverCache.unsubscribeFromLiveResolverRecords(a),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(a)},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,a=new Set,o=(0,dx.default)(this._roots.entries()),s;try{for(o.s();!(s=o.n()).done;){var l,c,d,f=s.value,h=f[0],p=f[1],m=p.operation,b=p.refCount,_=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var x=this._queryCacheExpirationTime;x==null&&d0(!1);var E=_==null||_<=Date.now()-x,k=E&&b===0&&!this._releaseBuffer.includes(h);if(k)continue}var w=m.root,C=(l=(c=m.request.node.operation.use_exec_time_resolvers)!==null&&c!==void 0?c:((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(Oie.mark(this._recordSource,w,a,this._operationLoader,this._shouldProcessClientComponents,C),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(L){o.e(L)}finally{o.f()}for(var $=this._recordSource.getRecordIDs(),A=0;A<$.length;A++){var F=$[A];if(!a.has(F)){var N=this._recordSource.get(F);if(N!=null){var O=yo.getValue(N,Tie);O?.()}this._recordSource.remove(F),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(F)}}n?.({name:"store.gc.end",references:a});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=Nie(n),a=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=a},e})();function jie(e){if(!e.has(c0)){var t=yo.create(c0,zie);e.set(c0,t)}}function Bie(e,t,r,n,i,a){n&&n.forEach(function(h){var p=e.get(h),m=t.get(h);if(m!==null){var b;p!=null?b=yo.clone(p):b=m!=null?yo.clone(m):null,b&&(yo.setValue(b,Lie.INVALIDATED_AT_KEY,r),a.add(h),e.set(h,b))}});for(var o=t.getRecordIDs(),s=0;s<o.length;s++){var l=o[s],c=t.get(l),d=e.get(l);if(c&&d){var f=yo.update(d,c);f!==d&&(i.add(l),e.set(l,f))}else c===null?(e.delete(l),d!==null&&i.add(l)):c&&(e.set(l,c),i.add(l))}}function Vie(e,t,r,n){var i=e.mostRecentlyInvalidatedAt,a=e.status;if(typeof i=="number"&&(t==null||i>t))return{status:"stale"};if(a==="missing")return{status:"missing"};if(r!=null&&n!=null){var o=r<=Date.now()-n;if(o)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var zv=qie,FC=kt,Hie=FC.ROOT_TYPE,px=FC.getStorageKey,Gie=cC,Kie=Gie.readUpdatableFragment,Wie=dC,Qie=Wie.readUpdatableQuery,mx=Se,Yie=(function(){function e(r,n,i,a){this.__mutator=r,this.__recordSource=n,this._readSelector=i,this._missingFieldHandlers=a}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,Hie)),n},t._getRootField=function(n,i,a){var o=n.node.selections.find(function(s){return s.kind==="LinkedField"&&s.name===i||s.kind==="RequiredField"&&s.field.name===i});return o&&o.kind==="RequiredField"&&(o=o.field),o&&o.kind==="LinkedField"||mx(!1),o.plural!==a&&mx(!1),o},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),a=px(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(a)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),a=px(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(a)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return Qie(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return Kie(n,i,this,this._missingFieldHandlers)},e})(),Jie=Yie,f0,h0,p0=lC,m0=mC,gx=Jie,Xie=Kn,Zie=Mv,vx=Ho,xc=Se,g0=typeof Qc<"u"?Qc:typeof window<"u"?window:void 0,v0=(f0=g0==null||(h0=g0.ErrorUtils)===null||h0===void 0?void 0:h0.applyWithGuard)!==null&&f0!==void 0?f0:function(e,t,r,n,i){return e.apply(t,r)},eae=(function(){function e(r,n,i,a,o){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=a,this._log=o}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||xc(!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,a){this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",operation:n,payload:i,updater:a})},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,a=!this._pendingBackupRebase&&this._pendingOptimisticUpdates.size===0&&!i;if(Xie.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&xc(!1),this._isRunning=!0,a)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var o=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,o)},t._publishSourceFromPayload=function(n){var i=this,a=n.payload,o=n.operation,s=n.updater,l=a.source,c=a.fieldPayloads,d=new p0(this._store.getSource(),l),f=new m0(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(c&&c.length&&c.forEach(function(_){var x=i._handlerProvider&&i._handlerProvider(_.handle);x||xc(!1),x.update(f,_)}),s){var h=o.fragment;h==null&&xc(!1);var p=new gx(d,f,h,this._missingFieldHandlers),m=bx(l,h);s(p,m)}var b=f.getIDsMarkedForInvalidation();return this._store.publish(l,b),f.isStoreMarkedForInvalidation()},t._commitData=function(){var n=this;if(!this._pendingData.size)return!1;var i=!1;return this._pendingData.forEach(function(a){if(a.kind==="payload"){var o=n._publishSourceFromPayload(a);i=i||o}else if(a.kind==="source"){var s=a.source;n._store.publish(s)}else{var l=a.updater,c=vx.create(),d=new p0(n._store.getSource(),c),f=new m0(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);v0(l,null,[f],null,"RelayPublishQueue:commitData"),i=i||f.isStoreMarkedForInvalidation();var h=f.getIDsMarkedForInvalidation();n._store.publish(c,h)}}),this._pendingData.clear(),i},t._applyUpdates=function(){var n=this,i=vx.create(),a=new p0(this._store.getSource(),i),o=new m0(a,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),s=function(c){if(c.storeUpdater){var d=c.storeUpdater;v0(d,null,[o],null,"RelayPublishQueue:applyUpdates")}else{var f=c.operation,h=c.payload,p=c.updater,m=h.source,b=h.fieldPayloads;if(m&&o.publishSource(m,b),p){var _;m&&(_=bx(m,f.fragment));var x=new gx(a,o,f.fragment,n._missingFieldHandlers);v0(p,null,[x,_],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 bx(e,t){var r=Zie.read(e,t).data;return r}var tae=eae,rae=Te.default,_x=rae(_t),nae=IJ,IC=Dv,yx=IC.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,Sc=IC.assertInternalActorIdentifier,b0=to,xx=Wee,iae=Xee,aae=ete,oae=nC,sae=dte,lae=Mee,uae=Nte,cae=zv,dae=tae,Sx=Ho,TC=(function(){function e(r){var n=this,i,a,o,s,l,c,d,f,h,p,m;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var b=r.operationLoader,_=(i=r.store)!==null&&i!==void 0?i:new cae(new Sx,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(a=r.log)!==null&&a!==void 0?a:hae,this.relayFieldLogger=(o=r.relayFieldLogger)!==null&&o!==void 0?o:sae,this._defaultRenderPolicy=(s=r.UNSTABLE_defaultRenderPolicy)!==null&&s!==void 0?s:"partial",this._operationLoader=b,this._operationExecutions=new Map,this._network=xx(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:oae,this._missingFieldHandlers=(c=r.missingFieldHandlers)!==null&&c!==void 0?c:[],this._publishQueue=new dae(_,(d=r.handlerProvider)!==null&&d!==void 0?d:nae,this._getDataID,this._missingFieldHandlers,this.__log),this._scheduler=(f=r.scheduler)!==null&&f!==void 0?f:null,this._store=_,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:lae,this.__setNet=function(x){return n._network=xx(n,x)},this._operationTracker=(m=r.operationTracker)!==null&&m!==void 0?m:new iae,this._shouldProcessClientComponents=r.shouldProcessClientComponents,aae(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,a=function(){i._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})};return this._scheduleUpdates(function(){i._publishQueue.applyUpdate(n),i._publishQueue.run()}),{dispose:a}},t.revertUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})},t.replaceUpdate=function(n,i){var a=this;this._scheduleUpdates(function(){a._publishQueue.revertUpdate(n),a._publishQueue.applyUpdate(i),a._publishQueue.run()})},t.applyMutation=function(n){var i=this._execute({createSource:function(){return b0.create(function(o){})},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&&!fae(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return b0.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 a=this,o=Sx.create(),s=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:yx,getSourceForActor:function(d){return Sc(d),s},getTargetForActor:function(d){return Sc(d),o}});return o.size()>0&&this._scheduleUpdates(function(){a._publishQueue.commitSource(o),a._publishQueue.run()}),l},t._scheduleUpdates=function(n){var i=this._scheduler;i!=null?i.schedule(n):n()},t.execute=function(n){var i=this,a=n.operation;return this._execute({createSource:function(){return i.getNetwork().execute(a.request.node.params,a.request.variables,a.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return i.check(a)})},isClientPayload:!1,operation:a,optimisticConfig:null,updater:null})},t.executeSubscription=function(n){var i=this,a=n.operation,o=n.updater;return this._execute({createSource:function(){return i.getNetwork().execute(a.request.node.params,a.request.variables,a.request.cacheConfig||{},null)},isClientPayload:!1,operation:a,optimisticConfig:null,updater:o})},t.executeMutation=function(n){var i=this,a=n.operation,o=n.optimisticResponse,s=n.optimisticUpdater,l=n.updater,c=n.uploadables,d;return(o||s)&&(d={operation:a,response:o,updater:s}),this._execute({createSource:function(){return i.getNetwork().execute(a.request.node.params,a.request.variables,(0,_x.default)((0,_x.default)({},a.request.cacheConfig),{},{force:!0}),c)},isClientPayload:!1,operation:a,optimisticConfig:d,updater:l})},t.executeWithSource=function(n){var i=n.operation,a=n.source;return this._execute({createSource:function(){return a},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,a=n.createSource,o=n.isClientPayload,s=n.operation,l=n.optimisticConfig,c=n.updater,d=this._publishQueue,f=this._store;return b0.create(function(h){var p=uae.execute({actorIdentifier:yx,getDataID:i._getDataID,isClientPayload:o,log:i.__log,operation:s,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(b){return Sc(b),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:a(),getStore:function(b){return Sc(b),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:c,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function fae(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}TC.prototype["@@RelayModernEnvironment"]=!0;function hae(){}var pae=TC,mae=sf,gae=fi,vae=gae.getRequest,bae=ro,_ae=bae.createOperationDescriptor,yae=hi,xae=yae.createReaderSelector;function Sae(e,t){var r=vae(t.subscription);if(r.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var n=t.configs,i=t.onCompleted,a=t.onError,o=t.onNext,s=t.variables,l=t.cacheConfig,c=_ae(r,s,l),d=n?mae.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:c,updater:f}).subscribe({next:function(m){if(o!=null){var b=c.fragment,_;if(Array.isArray(m)){var x,E;_=(x=m[0])===null||x===void 0||(E=x.extensions)===null||E===void 0?void 0:E.__relay_subscription_root_id}else{var k;_=(k=m.extensions)===null||k===void 0?void 0:k.__relay_subscription_root_id}typeof _=="string"&&(b=xae(b.node,_,b.variables,b.owner));var w=e.lookup(b).data;o(w)}},error:a,complete:i});return{dispose:h.unsubscribe}}var Eae=Sae,wae=Te.default;wae(_t);var NC=kt;NC.getModuleComponentKey;NC.getModuleOperationKey;var Rae=Object.prototype.hasOwnProperty;function kae(e){for(var t in e)if(Rae.call(e,t))return!1;return!0}var Aae=kae,Uv=hi,Cae=Uv.getDataIDsFromFragment,Dae=Uv.getSelector,$ae=Uv.getVariablesFromFragment,Fae=Aae,vl=Kn,Iae=jo,Ex=Iae.stableCopy,Tae=AA,wx=Tae.intern;function Nae(e,t){var r=Dae(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(c){return c.owner.identifier}).join(",")+"]",i=$ae(e,t),a=Cae(e,t);if(vl.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var o=typeof a>"u"?"missing":a==null?"null":Array.isArray(a)?"["+a.join(",")+"]":a;return o=vl.STRING_INTERN_LEVEL<=1?o:wx(o,vl.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||Fae(i)?"{}":JSON.stringify(Ex(i)))+"/"+o}else{var s,l=(s=JSON.stringify(a))!==null&&s!==void 0?s:"missing";return l=vl.STRING_INTERN_LEVEL<=1?l:wx(l,vl.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(Ex(i))+"/"+l}}var Pae=Nae,bl=Se;function Oae(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&bl(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&bl(!1);var a=i.operation.default?i.operation.default:i.operation,o=i.fragmentPathInResult;typeof a=="string"&&bl(!1);var s=i.identifierInfo;return s!=null&&(s.identifierField==null||typeof s.identifierField=="string"||bl(!1),s.identifierQueryVariableName==null||typeof s.identifierQueryVariableName=="string"||bl(!1)),{fragmentRefPathInResponse:o,identifierInfo:s,refetchableRequest:a,refetchMetadata:i}}var PC=Oae,Mae=PC,_0=Se;function Lae(e,t){var r,n,i=Mae(e),a=i.refetchableRequest,o=i.refetchMetadata,s=o.connection;s==null&&_0(!1);var l=s.path,c=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];c==null&&_0(!1);var d=o.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||_0(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:a,paginationMetadata:s,stream:c.stream===!0}}var zae=Lae,OC=Te.default,Ec=OC(Zr),is=OC(_t),Rx=Se;function Uae(e,t,r,n,i,a){var o,s=a.backward,l=a.forward;if(e==="backward"){var c;s!=null&&s.count!=null&&s.cursor!=null||Rx(!1);var d=(0,is.default)((0,is.default)((0,is.default)({},n),i),{},(c={},(0,Ec.default)(c,s.cursor,r),(0,Ec.default)(c,s.count,t),c));return l&&l.cursor&&(d[l.cursor]=null),l&&l.count&&(d[l.count]=null),d}l!=null&&l.count!=null&&l.cursor!=null||Rx(!1);var f=(0,is.default)((0,is.default)((0,is.default)({},n),i),{},(o={},(0,Ec.default)(o,l.cursor,r),(0,Ec.default)(o,l.count,t),o));return s&&s.cursor&&(f[s.cursor]=null),s&&s.count&&(f[s.count]=null),f}var qae=Uae,jae=Te.default,Bae=jae(Yt),kx=Se;function Vae(e,t){var r=e,n=(0,Bae.default)(t),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(r==null)return null;typeof a=="number"?(Array.isArray(r)||kx(!1),r=r[a]):(typeof r=="object"&&!Array.isArray(r)||kx(!1),r=r[a])}}catch(o){n.e(o)}finally{n.f()}return r}var Hae=Vae,MC=QY;MC.isErrorResult;MC.isValueResult;var Gae=of,Kae=_v,Wae=YJ,Qae=XJ,Yae=dX,Ax=sf,Jae=yX,Xae=to,Zae=PX,eoe=qX,wc=af,vi=fi,toe=VX,qv=Li;qv.generateClientID;qv.generateUniqueClientID;qv.isClientID;var roe=dZ,noe=pZ,ioe=vZ,aoe=yv,LC=uf;LC.isSuspenseSentinel;LC.suspenseSentinel;var ooe=Bee,Cx=eo,soe=pae,Dx=ro,mn=hi,loe=zv,uoe=Ho,Fn=kt,coe=mv,$x=Fv,doe=Eae,foe=SA,hoe=Pae,poe=zae,moe=qae,goe=NA,voe=PC,boe=EA,_oe=Hae,yoe=$u,xoe=yoe.handlePotentialSnapshotErrors,Soe=pA,Eoe=PA,woe=lf,Roe=Qk,koe=Kn,Aoe=gA,zC=jo;zC.hasCycle;zC.stableCopy;var Coe={Environment:soe,Network:Jae,Observable:Xae,RecordSource:uoe,ReplaySubject:Aoe,Store:loe,areEqualSelectors:mn.areEqualSelectors,createFragmentSpecResolver:roe,createNormalizationSelector:mn.createNormalizationSelector,createOperationDescriptor:Dx.createOperationDescriptor,createReaderSelector:mn.createReaderSelector,createRequestDescriptor:Dx.createRequestDescriptor,getArgumentValues:Fn.getArgumentValues,getDataIDsFromFragment:mn.getDataIDsFromFragment,getDataIDsFromObject:mn.getDataIDsFromObject,getNode:vi.getNode,getFragment:vi.getFragment,getInlineDataFragment:vi.getInlineDataFragment,getModuleComponentKey:Fn.getModuleComponentKey,getModuleOperationKey:Fn.getModuleOperationKey,getPaginationFragment:vi.getPaginationFragment,getPluralSelector:mn.getPluralSelector,getRefetchableFragment:vi.getRefetchableFragment,getRequest:vi.getRequest,getRequestIdentifier:boe,getSelector:mn.getSelector,getSelectorsFromObject:mn.getSelectorsFromObject,getSingularSelector:mn.getSingularSelector,getStorageKey:Fn.getStorageKey,getVariablesFromFragment:mn.getVariablesFromFragment,getVariablesFromObject:mn.getVariablesFromObject,getVariablesFromPluralFragment:mn.getVariablesFromPluralFragment,getVariablesFromSingularFragment:mn.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:xoe,graphql:vi.graphql,isFragment:vi.isFragment,isInlineDataFragment:vi.isInlineDataFragment,isRequest:vi.isRequest,readInlineData:ooe,readFragment:coe.readFragment,MutationTypes:Ax.MutationTypes,RangeOperations:Ax.RangeOperations,ConnectionHandler:Gae,VIEWER_ID:$x.VIEWER_ID,VIEWER_TYPE:$x.VIEWER_TYPE,applyOptimisticMutation:Wae,commitLocalUpdate:Qae,commitMutation:Yae,fetchQuery:Zae,fetchQuery_DEPRECATED:eoe,isRelayModernEnvironment:aoe,requestSubscription:doe,ConnectionInterface:Kae,PreloadableQueryRegistry:toe,RelayFeatureFlags:koe,DEFAULT_HANDLE_KEY:Roe.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:Fn.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:Fn.FRAGMENT_OWNER_KEY,ID_KEY:Fn.ID_KEY,REF_KEY:Fn.REF_KEY,REFS_KEY:Fn.REFS_KEY,ROOT_ID:Fn.ROOT_ID,ROOT_TYPE:Fn.ROOT_TYPE,TYPENAME_KEY:Fn.TYPENAME_KEY,deepFreeze:foe,isPromise:Soe,isScalarAndEqual:Eoe,recycleNodesInto:woe,getFragmentIdentifier:hoe,getRefetchMetadata:voe,getPaginationMetadata:poe,getPaginationVariables:moe,getPendingOperationsForFragment:goe,getValueAtPath:_oe,__internal:{createRelayContext:noe,createRelayLoggingContext:ioe,getOperationVariables:Cx.getOperationVariables,getLocalVariables:Cx.getLocalVariables,fetchQuery:wc.fetchQuery,fetchQueryDeduped:wc.fetchQueryDeduped,getPromiseForActiveRequest:wc.getPromiseForActiveRequest,getObservableForActiveRequest:wc.getObservableForActiveRequest}},nt=Coe,Doe=zv,UC=Doe;const qC=v$(UC),$oe=_$({__proto__:null,default:qC},[UC]);let Fx={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,a=r.id;if(!(t==null||i!=="node"||t.getType()!==nt.ROOT_TYPE))return a}};function Foe(e,t,r){return new nt.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function Ioe(e,t,r){return new qC(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function Toe(e,t,r){return new $oe(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let Noe={make:Foe,makeLiveStore:Ioe,_makeLiveStoreCjs:Toe};function Poe(e,t,r,n,i,a,o){return new nt.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([Fx]):[Fx],relayFieldLogger:a,isServer:o})}function jC(e,t,r){let n=[],i=e.getStore().getSource()._records.get(r);return i!==void 0&&Object.entries(i).forEach(a=>{if(a[0].startsWith("__"+t+"_connection")){n.push(a[1].__ref);return}}),n}function Ooe(e,t,r,n){let i=n!==void 0?n:[];nt.commitLocalUpdate(e,a=>{jC(e,t,r).forEach(o=>{if(!i.includes(o))return Q(Fi(a.get(o)),s=>{s.invalidateRecord()})})})}let Moe={make:Poe,findAllConnectionIds:jC,invalidateAllOfConnection:Ooe};var Loe=st,zoe=nt,Uoe=zoe.__internal.createRelayContext,Qs=Uoe(Loe),BC={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 a in i)({}).hasOwnProperty.call(i,a)&&(r[a]=i[a])}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})(BC);var bf=BC.exports,VC={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})(VC);var _f=VC.exports,HC={exports:{}},GC={exports:{}};(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,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})(GC);var qoe=GC.exports;(function(e){var t=qoe;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})(HC);var yf=HC.exports,Ix=Se;function joe(e,t){t&&typeof t=="object"||Ix(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||Ix(!1)}}var Boe=joe;function KC(e){return e.displayName||e.name||"Component"}function Voe(e){return"Relay("+KC(e)+")"}var xf={getComponentName:KC,getContainerName:Voe},Hoe=st,WC=Hoe.createContext({rootIsQueryRenderer:!1}),Goe=Te.default,Koe=Goe(bf),Woe=Boe,QC=xf,Qoe=QC.getComponentName,Yoe=QC.getContainerName,Joe=Qs,Xoe=WC,Zoe=Se,Mp=st,ese=nt,tse=ese.getFragment,Tx=Mp.useContext;function rse(e,t,r){var n=Yoe(e);Woe(Qoe(e),t);var i={};for(var a in t)i[a]=tse(t[a]);var o=r(e,i);o.displayName=n;function s(c,d){var f,h=Tx(Joe);h==null&&Zoe(!1);var p=Tx(Xoe);return Mp.createElement(o,(0,Koe.default)({},c,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:c.componentRef||d}))}s.displayName=n;var l=Mp.forwardRef(s);return l}var jv=rse;function nse(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 ise=nse,ase=ise,ose=Se;function sse(e){return lse(e)||ose(!1),e}function lse(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&ase(e.environment)}var Bv={assertRelayContext:sse},Iu=Te.default,use=Iu(bf),cse=Iu(Ws),dse=Iu(_f),fse=Iu(yf),Nx=Iu(Zr),hse=["componentRef","__relayContext","__rootIsQueryRenderer"],pse=jv,mse=xf,gse=mse.getContainerName,vse=Bv,Px=vse.assertRelayContext,bse=la,Ox=st,Vv=nt,Mx=Vv.createFragmentSpecResolver,Lx=Vv.getDataIDsFromObject,_se=Vv.isScalarAndEqual;function yse(e,t){var r,n=gse(e);return r=(function(i){(0,fse.default)(a,i);function a(s){var l,c;c=i.call(this,s)||this,(0,Nx.default)((0,dse.default)(c),"_handleFragmentDataUpdate",function(){var p=c.state.resolver;c.setState(function(m){return p===m.resolver?{data:m.resolver.resolve(),relayProp:Rc(m.relayProp.environment)}:null})});var d=Px(s.__relayContext),f=(l=s.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=Mx(d,n,t,s,f);return c.state={data:h.resolve(),prevProps:s,prevPropsContext:d,relayProp:Rc(d.environment),resolver:h},c}a.getDerivedStateFromProps=function(l,c){var d,f=c.prevProps,h=Px(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,m=Lx(t,f),b=Lx(t,l),_=c.resolver;if(c.prevPropsContext.environment!==h.environment||!bse(m,b))return _=Mx(h,n,t,l,p),{data:_.resolve(),prevPropsContext:h,prevProps:l,relayProp:Rc(h.environment),resolver:_};_.setProps(l);var x=_.resolve();return x!==c.data?{data:x,prevProps:l,prevPropsContext:h,relayProp:Rc(h.environment)}:null};var o=a.prototype;return o.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},o.componentDidUpdate=function(l,c){this.state.resolver!==c.resolver?(c.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},o.componentWillUnmount=function(){this.state.resolver.dispose()},o.shouldComponentUpdate=function(l,c){if(c.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(c.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(h)&&!_se(l[h],this.props[h]))return!0}return!1},o._rerenderIfStoreHasChanged=function(){var l=this.state,c=l.data,d=l.resolver,f=d.resolve();c!==f&&this.setState({data:f})},o._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var l=this.state,c=l.data,d=l.resolver,f=d.resolve();d.setCallback(this.props,this._handleFragmentDataUpdate),c!==f&&this.setState({data:f})},o.render=function(){var l=this.props,c=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,cse.default)(l,hse);return Ox.createElement(e,(0,use.default)({},d,this.state.data,{ref:c,relay:this.state.relayProp}))},a})(Ox.Component),(0,Nx.default)(r,"displayName",n),r}function Rc(e){return{environment:e}}function xse(e,t){return pse(e,t,yse)}var Sse={createContainer:xse},Sf=st,Hv=nt;Hv.createOperationDescriptor;Hv.deepFreeze;Hv.getRequest;Sf.useLayoutEffect;Sf.useState;Sf.useRef;Sf.useMemo;var Ese=Te.default,zx=Ese(_t),wse=nt,Rse=wse.getSelector;function kse(e,t){var r={};return Object.keys(e).forEach(function(n){var i,a,o,s=e[n],l=t[n],c=Rse(s,l),d=c!=null&&c.kind==="PluralReaderSelector"?(i=(a=c.selectors[0])===null||a===void 0?void 0:a.owner.variables)!==null&&i!==void 0?i:{}:(o=c?.owner.variables)!==null&&o!==void 0?o:{};r=(0,zx.default)((0,zx.default)({},r),d)}),r}var YC=kse,Ase=Te.default,Ux=Ase(Zr),y0=Se,Gv=nt,Cse=Gv.__internal.fetchQuery,Dse=Gv.createOperationDescriptor,$se=Gv.isRelayModernEnvironment,Fse=(function(){function e(r){(0,Ux.default)(this,"_selectionReferences",[]),(0,Ux.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,a){return(a==="store-and-network"||a==="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,a=n.environment,o=n.operation,s=n.preservePreviousReferences,l=s===void 0?!1:s,c=a.retain(o),d=function(){i._selectionReferences=i._selectionReferences.concat(c)},f=function(){l||i.disposeSelectionReferences(),i._selectionReferences=i._selectionReferences.concat(c)},h=function(){i._selectionReferences=i._selectionReferences.concat(c)};return $se(a)?Cse(a,o).do({error:d,complete:f,unsubscribe:h}):a.execute({operation:o}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||y0(!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 a=this,o=n.environment,s=n.operation,l=n.onDataChange,c=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:o,onDataChangeCallbacks:f||[],operation:s},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?Dse(s.request.node,s.request.variables,i):s,p=this.execute({environment:o,operation:h}).finally(function(){a._pendingRequest=null}).subscribe({next:function(){a._didFetchFinish=!0,a._error=null,a._onQueryDataAvailable({notifyFirstResult:c})},error:function(b){a._didFetchFinish=!0,a._error=b,a._snapshot=null;var _=a._fetchOptions&&a._fetchOptions.onDataChangeCallbacks;c?_&&_.forEach(function(x){x({error:b})}):d=b}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},c=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||y0(!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,a=n.notifyFirstResult;this._fetchOptions||y0(!1);var o=this._fetchOptions,s=o.environment,l=o.onDataChangeCallbacks,c=o.operation;if(!this._snapshot&&(this._snapshot=s.lookup(c.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&&a&&Array.isArray(l))){var d=this._snapshot;l.forEach(function(f){return f({snapshot:d})})}},e})(),Kv=Fse,Ys=Te.default,Ise=Ys(bf),x0=Ys(Ws),_l=Ys(_f),Tse=Ys(yf),co=Ys(Zr),Qr=Ys(_t),Nse=["componentRef"],Pse=["componentRef","__relayContext","__rootIsQueryRenderer"],Ose=["componentRef","__relayContext","__rootIsQueryRenderer"],Mse=jv,S0=YC,JC=xf,Lse=JC.getComponentName,zse=JC.getContainerName,Use=Qs,qse=Kv,jse=Bv,E0=jse.assertRelayContext,w0=la,xi=Se,R0=st,ca=nt,qx=ca.ConnectionInterface,jx=ca.Observable,kc=ca.RelayFeatureFlags,Ac=ca.createFragmentSpecResolver,Bse=ca.createOperationDescriptor,Bx=ca.getDataIDsFromObject,Vse=ca.getRequest,Hse=ca.getVariablesFromObject,Gse=ca.isScalarAndEqual,Vx="forward";function Kse(e){var t=e.path;return t||xi(!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 Wse(e){var t=e.count;return t||xi(!1),function(r,n){return(0,Qr.default)((0,Qr.default)({},r),{},(0,co.default)({},t,n))}}function Qse(e){var t=null,r=!1;for(var n in e){var i=e[n],a=i.metadata&&i.metadata.connection;i.metadata!==void 0&&(r=!0),a&&(a.length!==1&&xi(!1),t&&xi(!1),t=(0,Qr.default)((0,Qr.default)({},a[0]),{},{fragmentName:n}))}return!r||t!==null||xi(!1),t||{}}function Hx(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function Yse(e,t,r){var n;Lse(e);var i=zse(e),a=Qse(t),o=r.getConnectionFromProps||Kse(a),s=r.direction||a.direction;s||xi(!1);var l=r.getFragmentVariables||Wse(a);return n=(function(c){(0,Tse.default)(d,c);function d(h){var p,m;m=c.call(this,h)||this,(0,co.default)((0,_l.default)(m),"_handleFragmentDataUpdate",function(){m.setState({data:m._resolver.resolve()})}),(0,co.default)((0,_l.default)(m),"_hasMore",function(){var x=m._getConnectionData();return!!(x&&x.hasMore&&x.cursor)}),(0,co.default)((0,_l.default)(m),"_isLoading",function(){return!!m._refetchSubscription}),(0,co.default)((0,_l.default)(m),"_refetchConnection",function(x,E,k){if(!m._canFetchPage("refetchConnection"))return{dispose:function(){}};m._refetchVariables=k;var w={count:x,cursor:null,totalCount:x},C=m._fetchPage(w,Hx(E),{force:!0});return{dispose:C.unsubscribe}}),(0,co.default)((0,_l.default)(m),"_loadMore",function(x,E,k){if(!m._canFetchPage("loadMore"))return{dispose:function(){}};var w=Hx(E),C=m._getConnectionData();if(!C)return jx.create(function(L){return L.complete()}).subscribe(w),null;var $=C.edgeCount+x;if(k&&k.force)return m._refetchConnection($,E);var A=qx.get();A.END_CURSOR,A.START_CURSOR;var F=C.cursor,N={count:x,cursor:F,totalCount:$},O=m._fetchPage(N,w,k);return{dispose:O.unsubscribe}});var b=E0(h.__relayContext),_=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return m._isARequestInFlight=!1,m._refetchSubscription=null,m._refetchVariables=null,kc.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?m._resolver=Ac(b,i,t,h,_):m._resolver=Ac(b,i,t,h,_,m._handleFragmentDataUpdate),m.state={data:m._resolver.resolve(),prevContext:b,contextForChildren:b,relayProp:m._buildRelayProp(b),resolverGeneration:0},m._isUnmounted=!1,m._hasFetched=!1,m}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,kc.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,m){kc.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(m.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var m=this,b,_=E0(p.__relayContext),x=(b=p.__rootIsQueryRenderer)!==null&&b!==void 0?b:!1,E=Bx(t,this.props),k=Bx(t,p),w=S0(t,this.props),C=S0(t,p);_.environment!==this.state.prevContext.environment||!w0(w,C)||!w0(E,k)?(this._cleanup(),kc.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=Ac(_,i,t,p,x):this._resolver=Ac(_,i,t,p,x,this._handleFragmentDataUpdate),this.setState(function(A){return{prevContext:_,contextForChildren:_,relayProp:m._buildRelayProp(_),resolverGeneration:A.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var $=this._resolver.resolve();$!==this.state.data&&this.setState({data:$})},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 b=Object.keys(p),_=0;_<b.length;_++){var x=b[_];if(x==="__relayContext"){if(m.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(x)&&!Gse(p[x],this.props[x]))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,x0.default)(p,Nse),b=(0,Qr.default)((0,Qr.default)({},m),this.state.data),_=o(b);if(_==null)return null;var x=qx.get(),E=x.EDGES,k=x.PAGE_INFO,w=x.HAS_NEXT_PAGE,C=x.HAS_PREV_PAGE,$=x.END_CURSOR,A=x.START_CURSOR;typeof _!="object"&&xi(!1);var F=_[E],N=_[k];if(F==null||N==null)return null;Array.isArray(F)||xi(!1),typeof N!="object"&&xi(!1);var O=s===Vx?N[w]:N[C],L=s===Vx?N[$]:N[A];return typeof O!="boolean"||F.length!==0&&typeof L>"u"?null:{cursor:L,edgeCount:F.length,hasMore:O}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new qse),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,m,b){var _=this,x=E0(this.props.__relayContext),E=x.environment,k=this.props;k.componentRef,k.__relayContext,k.__rootIsQueryRenderer;var w=(0,x0.default)(k,Pse),C=(0,Qr.default)((0,Qr.default)({},w),this.state.data),$,A=S0(t,w);$=Hse(t,w),$=(0,Qr.default)((0,Qr.default)((0,Qr.default)({},A),$),this._refetchVariables);var F=r.getVariables(C,{count:p.count,cursor:p.cursor},$);typeof F=="object"&&F!==null||xi(!1),F=(0,Qr.default)((0,Qr.default)({},F),this._refetchVariables),$=(0,Qr.default)((0,Qr.default)({},F),$);var N=b?{force:!!b.force}:void 0;N!=null&&b?.metadata!=null&&(N.metadata=b?.metadata);var O=Vse(r.query),L=Bse(O,F,N),q=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var K=function(Y,J){var ue=_._resolver.resolve();_._resolver.setVariables(l($,p.totalCount),L.request.node);var se=_._resolver.resolve();w0(ue,se)?J():_.setState({data:se,contextForChildren:{environment:_.props.__relayContext.environment}},J)},re=function(){_._refetchSubscription===q&&(_._refetchSubscription=null,_._isARequestInFlight=!1)};return this._isARequestInFlight=!0,q=this._getQueryFetcher().execute({environment:E,operation:L,preservePreviousReferences:!0}).mergeMap(function(V){return jx.create(function(Y){K(V,function(){Y.next(),Y.complete()})})}).do({error:re,complete:re,unsubscribe:re}).subscribe(m||{}),this._refetchSubscription=this._isARequestInFlight?q:null,q},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 b=(0,x0.default)(p,Ose);return R0.createElement(Use.Provider,{value:this.state.contextForChildren},R0.createElement(e,(0,Ise.default)({},b,this.state.data,{ref:m,relay:this.state.relayProp})))},d})(R0.Component),(0,co.default)(n,"displayName",i),n}function Jse(e,t,r){return Mse(e,t,function(n,i){return Yse(n,i,r)})}var Xse={createContainer:Jse},Ef=Te.default,XC=Ef(_t),Zse=Ef(_f),ele=Ef(yf),tle=Ef(Zr),rle=Qs,gd=Kv,nle=WC,ile=la,k0=st,Wv=nt,ale=Wv.createOperationDescriptor;Wv.deepFreeze;var Qv=Wv.getRequest,Tn={},ole={rootIsQueryRenderer:!0};k0.Component;function Lp(){return{error:null,props:null,retry:null}}function sle(){return{error:null,props:{},retry:null}}function Gc(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(a){var o=r.retry(a);o&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:o}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function Yv(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function Gx(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var a=Qv(r),o=Yv(a.params,e.variables);i=Tn[o]?Tn[o].queryFetcher:new gd(n)}else i=new gd(n);return(0,XC.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},ZC(e,i,t.retryCallbacks))}function ZC(e,t,r,n){var i=e.environment,a=e.query,o=e.variables,s=e.cacheConfig,l=i;if(a){var c=Qv(a),d=ale(c,o,s),f={environment:l};if(typeof n=="string"&&Tn[n]){var h=Tn[n].snapshot;return h?{error:null,relayContext:f,renderProps:Gc(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:Lp(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),m=t.fetch({environment:l,onDataChange:null,operation:d}),b=m||p;return n=n||Yv(c.params,e.variables),Tn[n]={queryFetcher:t,snapshot:b},b?{error:null,relayContext:f,renderProps:Gc(null,b,t,r),snapshot:b,requestCacheKey:n}:{error:null,relayContext:f,renderProps:Lp(),snapshot:null,requestCacheKey:n}}catch(x){return{error:x,relayContext:f,renderProps:Gc(x,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var _={environment:l};return{error:null,relayContext:_,renderProps:sle(),requestCacheKey:null}}}var Js=Te.default,lle=Js(bf),ule=Js(Ws),as=Js(_t),Kx=Js(_f),cle=Js(yf),A0=Js(Zr),dle=["componentRef","__relayContext","__rootIsQueryRenderer"],fle=jv,C0=YC,hle=xf,ple=hle.getContainerName,mle=Qs,gle=Kv,vle=Bv,D0=vle.assertRelayContext,Wx=la,$0=st,Wo=nt,ble=Wo.Observable,Qx=Wo.createFragmentSpecResolver,_le=Wo.createOperationDescriptor,Yx=Wo.getDataIDsFromObject,yle=Wo.getRequest,xle=Wo.getVariablesFromObject,Sle=Wo.isScalarAndEqual;function Ele(e,t,r){var n,i=ple(e);return n=(function(a){(0,cle.default)(o,a);function o(l){var c,d;d=a.call(this,l)||this,(0,A0.default)((0,Kx.default)(d),"_handleFragmentDataUpdate",function(){var m=d.state.resolver;d.setState(function(b){return m===b.resolver?{data:b.resolver.resolve()}:null})}),(0,A0.default)((0,Kx.default)(d),"_refetch",function(m,b,_,x){if(d._isUnmounted)return{dispose:function(){}};var E=D0(d.props.__relayContext),k=E.environment,w=C0(t,d.props),C=typeof m=="function"?m(d._getFragmentVariables()):m;C=(0,as.default)((0,as.default)({},w),C);var $=b?(0,as.default)((0,as.default)({},C),b):C,A=x?{force:!!x.force}:void 0;A!=null&&x?.metadata!=null&&(A.metadata=x?.metadata);var F=typeof _=="function"?{next:_,error:_}:_||{},N=yle(r),O=_le(N,C,A);d.state.localVariables=C,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var L,q=d._getQueryFetcher().lookupInStore(k,O,x?.fetchPolicy);return q!=null?(d.state.resolver.setVariables($,O.request.node),d.setState(function(K){return{data:K.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){F.next&&F.next(),F.complete&&F.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:k,operation:O,preservePreviousReferences:!0}).mergeMap(function(K){return d.state.resolver.setVariables($,O.request.node),ble.create(function(re){return d.setState(function(V){return{data:V.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){re.next(),re.complete()})})}).finally(function(){d._refetchSubscription===L&&(d._refetchSubscription=null)}).subscribe((0,as.default)((0,as.default)({},F),{},{start:function(re){d._refetchSubscription=L=re,F.start&&F.start(re)}})),{dispose:function(){L&&L.unsubscribe()}})});var f=D0(l.__relayContext),h=(c=l.__rootIsQueryRenderer)!==null&&c!==void 0?c:!1;d._refetchSubscription=null;var p=Qx(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:Jx(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var s=o.prototype;return s.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(c,d){this.state.resolver!==d.resolver?(d.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},o.getDerivedStateFromProps=function(c,d){var f,h=d.prevProps,p=D0(c.__relayContext),m=(f=c.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,b=Yx(t,h),_=Yx(t,c),x=C0(t,h),E=C0(t,c),k=d.resolver;if(d.prevPropsContext.environment!==p.environment||!Wx(x,E)||!Wx(b,_))return k=Qx(p,i,t,c,m),{data:k.resolve(),localVariables:null,prevProps:c,prevPropsContext:p,contextForChildren:p,relayProp:Jx(p.environment,d.relayProp.refetch),resolver:k};d.localVariables||k.setProps(c);var w=k.resolve();return w!==d.data?{data:w,prevProps:c}:null},s.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},s.shouldComponentUpdate=function(c,d){if(d.data!==this.state.data||d.relayProp!==this.state.relayProp)return!0;for(var f=Object.keys(c),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)&&!Sle(c[p],this.props[p]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var c=this.state,d=c.data,f=c.resolver,h=f.resolve();d!==h&&this.setState({data:h})},s._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var c=this.state,d=c.data,f=c.resolver,h=f.resolve();f.setCallback(this.props,this._handleFragmentDataUpdate),d!==h&&this.setState({data:h})},s._getFragmentVariables=function(){return xle(t,this.props)},s._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new gle),this._queryFetcher},s.render=function(){var c=this.props,d=c.componentRef;c.__relayContext,c.__rootIsQueryRenderer;var f=(0,ule.default)(c,dle),h=this.state,p=h.relayProp,m=h.contextForChildren;return $0.createElement(mle.Provider,{value:m},$0.createElement(e,(0,lle.default)({},f,this.state.data,{ref:d,relay:p})))},o})($0.Component),(0,A0.default)(n,"displayName",i),n}function Jx(e,t){return{environment:e,refetch:t}}function wle(e,t,r){return fle(e,t,function(n,i){return Ele(n,i,r)})}var Rle={createContainer:wle},kle=st;kle.createContext({wrapPrepareQueryResource:function(t){return t()}});var Ale=Qs,Cle=Se,Dle=st,$le=Dle.useContext;function Fle(){var e=$le(Ale);return e==null&&Cle(!1),e.environment}var e3=Fle,t3=st;t3.useContext;t3.useEffect;var Ile=Te.default,Xx=Ile(_t),Tle=Se,Qo=nt,Zx=Qo.__internal.fetchQueryDeduped,eS=Qo.Observable,tS=Qo.PreloadableQueryRegistry,rS=Qo.ReplaySubject,nS=Qo.createOperationDescriptor,Nle=Qo.getRequest,Ple=Qo.getRequestIdentifier,iS=100001;function Ole(e,t,r,n,i){var a;iS++;var o=(a=n?.fetchPolicy)!==null&&a!==void 0?a:"store-or-network",s=(0,Xx.default)((0,Xx.default)({},n?.networkCacheConfig),{},{force:!0}),l,c=!1,d=function(ve,ye){return c=!0,e.executeWithSource({operation:ve,source:ye})},f=new rS,h=eS.create(function(se){return f.subscribe(se)}),p,m=null,b=!1,_=function(ve,ye){b=!0;var Ne=new rS,Me="raw-network-request-"+Ple(ve,r),Qe=Zx(e,Me,function(){var qe=e.getNetwork();return qe.execute(ve,r,s,void 0,void 0,void 0,void 0,ye)}),Je=Qe.subscribe({error:function(pt){m=pt,Ne.error(pt)},next:function(pt){Ne.next(pt)},complete:function(){Ne.complete()}}),Ue=Je.unsubscribe;return p=Ue,eS.create(function(qe){var pt=Ne.subscribe(qe);return function(){pt.unsubscribe(),p()}})},x,E=function(ve,ye){b=!0;var Ne=Zx(e,ve.request.identifier,ye).subscribe({error:function(Qe){f.error(Qe)},next:function(Qe){f.next(Qe)},complete:function(){f.complete()}});x=Ne.unsubscribe},k=function(ve){var ye=nS(ve,r,s);if(l=e.retain(ye),o!=="store-only"){var Ne=o!=="store-or-network"||e.check(ye).status!=="available";Ne&&E(ye,function(){var Me=_(ve.params,function(){return e.check(ye)}),Qe=d(ye,Me);return Qe})}},w,C,$;if(t.kind==="PreloadableConcreteRequest"){var A=t;w=A.params;var F=w;$=F.id,$===null&&Tle(!1);var N=tS.get($);if(N!=null)k(N);else{var O=o==="store-only"?null:_(w),L=tS.onLoad($,function(se){C();var ve=nS(se,r,s);l=e.retain(ve),O!=null&&E(ve,function(){return d(ve,O)})});C=L.dispose}}else{var q=t,K=Nle(q);w=K.params,$=w.cacheID!=null?w.cacheID:w.id,k(K)}var re=!1,V=!1,Y=!1,J=function(){V||(l&&l.dispose(),V=!0)},ue=function(){Y||(c?x&&x():p&&p(),C&&C(),Y=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){re||(J(),ue(),re=!0)},releaseQuery:J,cancelNetworkRequest:ue,fetchKey:iS,id:$,get isDisposed(){return re||V},get networkError(){return m},name:w.name,networkCacheConfig:s,fetchPolicy:o,source:b?h:void 0,variables:r}}var wf={loadQuery:Ole},Mle=wf;Mle.loadQuery;var Lle=st;Lle.useMemo;var zle=Se,Ule=(function(){function e(r){this._capacity=r,this._capacity>0||zle(!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 a=this._map.keys().next();a.done||this._map.delete(a.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 qle(e){return new Ule(e)}var jle={create:qle},Ble=Te.default,F0=Ble(Zr),Vle=300*1e3,Hle=(function(){function e(r){var n=this;(0,F0.default)(this,"_retainCount",0),(0,F0.default)(this,"_retainDisposable",null),(0,F0.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,a;if(n.isServer())return{dispose:function(){}};var o=this._retain(n),s=null,l=function(){clearTimeout(s),s=null,i._releaseTemporaryRetain=null,o.dispose()};return s=setTimeout(l,Vle),(a=this._releaseTemporaryRetain)===null||a===void 0||a.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})(),Gle=Hle,r3=Te.default,Cc=r3(_t),n3=r3(Zr),Kle=jle,Wle=Gle,Qle=Se,Yle=nt,Jle=Yle.isPromise,Xle=1e3,i3="store-or-network",a3="store-and-network",Zle=typeof WeakMap=="function";function vd(e){return e.request.node.params.metadata.live!==void 0}function zp(e,t,r,n,i){var a=r??(vd(t)?a3:i3),o=n??e.UNSTABLE_getDefaultRenderPolicy(),s="".concat(a,"-").concat(o,"-").concat(t.request.identifier);return i!=null?"".concat(s,"-").concat(i):s}function aS(e,t){var r={__id:e.fragment.dataID,__fragments:(0,n3.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var eue=2e5;function I0(e,t,r,n,i,a){var o=vd(t),s=n,l=i,c=new Wle(function(f){var h=f.retain(t);return{dispose:function(){o&&l!=null&&l.unsubscribe(),h.dispose(),a(d)}}}),d={cacheIdentifier:e,id:eue++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return s},setValue:function(h){s=h},setNetworkSubscription:function(h){o&&l!=null&&l.unsubscribe(),l=h},temporaryRetain:function(h){return c.temporaryRetain(h)},permanentRetain:function(h){return c.permanentRetain(h)},releaseTemporaryRetain:function(){c.releaseTemporaryRetain()}};return d}var tue=(function(){function e(r){var n=this;(0,n3.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=Kle.create(Xle)}var t=e.prototype;return t.prepare=function(n,i,a,o,s,l,c){var d=zp(this._environment,n,a,o,l);return this.prepareWithIdentifier(d,n,i,a,o,s,c)},t.prepareWithIdentifier=function(n,i,a,o,s,l,c){var d=this._environment,f=o??(vd(i)?a3:i3),h=s??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),m=null,b=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,a,f,h,c,(0,Cc.default)((0,Cc.default)({},l),{},{unsubscribe:function(E){m?.dispose();var k=l?.unsubscribe;k&&k(E)}}))),m=p.temporaryRetain(d);var _=p.getValue();if(Jle(_))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:b,operation:i,queryAvailability:p.operationAvailability,renderPolicy:h}),_;if(_ instanceof Error)throw _;return _},t.retain=function(n,i){var a=this._environment,o=n.cacheIdentifier,s=n.operation,l=this._getOrCreateCacheEntry(o,s,null,n,null),c=l.permanentRetain(a);return a.__log({name:"queryresource.retain",profilerContext:i,resourceID:l.id}),{dispose:function(){c.dispose()}}},t.releaseTemporaryRetain=function(n){var i=this._cache.get(n.cacheIdentifier);i?.releaseTemporaryRetain()},t.TESTS_ONLY__getCacheEntry=function(n,i,a,o){var s=this._environment,l=zp(s,n,i,a,o);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,a,o,s){var l=this._cache.get(n);return l==null&&(l=I0(n,i,a,o,s,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,a,o,s,l,c){var d=this,f=this._environment,h=f.check(i),p=h.status,m=p==="available",b=m||s==="partial"&&p!=="stale",_,x,E=function(){};switch(o){case"store-only":{_=!1,x=!0;break}case"store-or-network":{_=!m,x=b;break}case"store-and-network":{_=!0,x=b;break}case"network-only":default:{_=!0,x=!1;break}}if(x){var k=aS(i,n),w=I0(n,i,h,k,null,this._clearCacheEntry);this._cache.set(n,w)}if(_){var C=aS(i,n),$;a.subscribe({start:function(q){$=q;var K=d._cache.get(n);K&&K.setNetworkSubscription($);var re=c?.start;if(re){var V=(0,Cc.default)((0,Cc.default)({},q),{},{unsubscribe:function(){vd(i)&&q.unsubscribe()}});re(V)}},next:function(){var q=d._getOrCreateCacheEntry(n,i,h,C,$);q.processedPayloadsCount+=1,q.setValue(C),E();var K=c?.next;if(K!=null){var re=f.lookup(i.fragment);K(re)}},error:function(q){var K=d._getOrCreateCacheEntry(n,i,h,q,$);K.processedPayloadsCount===0&&K.setValue(q),E(),$=null,K.setNetworkSubscription(null);var re=c?.error;re&&re(q)},complete:function(){E(),$=null;var q=d._cache.get(n);q&&q.setNetworkSubscription(null);var K=c?.complete;K&&K()},unsubscribe:c?.unsubscribe});var A=this._cache.get(n);if(!A){var F=new Promise(function(L){E=L});F.displayName="Relay("+i.fragment.node.name+")",A=I0(n,i,h,F,$,this._clearCacheEntry),this._cache.set(n,A)}}else{var N=c?.complete;N&&N()}var O=this._cache.get(n);return O==null&&Qle(!1),f.__log({name:"queryresource.fetch",resourceID:O.id,operation:i,profilerContext:l,fetchPolicy:o,renderPolicy:s,queryAvailability:h,shouldFetch:_}),O},e})();function rue(e){return new tue(e)}var oS=Zle?new WeakMap:new Map;function nue(e){var t=oS.get(e);if(t)return t;var r=rue(e);return oS.set(e,r),r}var Tu={getQueryResourceForEnvironment:nue,getQueryCacheIdentifier:zp},iue=st;iue.useMemo;var o3=st;o3.useCallback;o3.useEffect;var aue=st,oue=nt,sue=oue.__internal.createRelayLoggingContext,lue=sue(aue),uue=lue,cue=st,due=cue.useContext;function fue(){return due(uue)}var s3=fue,Jv=Te.default,sS=Jv(_t),Ga=Jv(Yt),hue=Jv(Za),pue=Tu,l3=pue.getQueryResourceForEnvironment,mue=e3,gue=s3,fo=Se,Nu=st;Nu.useDebugValue;var T0=Nu.useEffect,N0=Nu.useMemo,lS=Nu.useRef,Dc=Nu.useState,da=nt,u3=da.__internal,vue=u3.fetchQuery,bue=u3.getPromiseForActiveRequest,$c=da.RelayFeatureFlags,uS=da.areEqualSelectors,_ue=da.createOperationDescriptor,yue=da.getPendingOperationsForFragment,xue=da.getSelector,Sue=da.getVariablesFromFragment,cS=da.handlePotentialSnapshotErrors,dS=da.recycleNodesInto;function Eue(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function wue(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,Ga.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.missingClientEdges){var o;r=(o=r)!==null&&o!==void 0?o:[];var s=(0,Ga.default)(a.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function Rue(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,Ga.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.missingLiveResolverFields){var o;r=(o=r)!==null&&o!==void 0?o:[];var s=(0,Ga.default)(a.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function kue(e,t,r){if(t.kind==="singular")cS(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Ga.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;cS(e,a.fieldErrors,r)}}catch(o){n.e(o)}finally{n.f()}}}function bd(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=dS(t.snapshot.data,n.data),a={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:a,epoch:r}]}else{for(var o=!1,s=[],l=0;l<t.snapshots.length;l++){var c=t.snapshots[l],d=e.lookup(c.selector),f=dS(c.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!==c.data&&(o=!0),s.push(h)}return s.length!==t.snapshots.length&&fo(!1),[o,{kind:"plural",snapshots:s,epoch:r}]}}function Aue(e,t,r,n,i){var a=Sue(t,r),o=(0,sS.default)((0,sS.default)({},a),{},{id:n.clientEdgeDestinationID}),s=_ue(n.request,o,i?.networkCacheConfig),l=l3(e),c=l.prepare(s,vue(e,s),i?.fetchPolicy);return[c,bue(e,s.request)]}function Cue(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(o){r(function(s){if(s.kind!=="singular"||s.snapshot.selector!==o.selector){var l=bd(e,s);if(l!=null){var c=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:c}),n.current=c,c?d:s}else return s}return n.current=!0,{kind:"singular",snapshot:o,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var a=t.snapshots.map(function(o,s){return e.subscribe(o,function(l){r(function(c){var d;if(c.kind!=="plural"||((d=c.snapshots[s])===null||d===void 0?void 0:d.selector)!==l.selector){var f=bd(e,c);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:c}else return c}var m=(0,hue.default)(c.snapshots);return m[s]=l,n.current=!0,{kind:"plural",snapshots:m,epoch:e.getStore().getEpoch()}})})});return function(){var o=(0,Ga.default)(a),s;try{for(o.s();!(s=o.n()).done;){var l=s.value;l.dispose()}}catch(c){o.e(c)}finally{o.f()}}}}function fS(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 Due(e,t,r,n){var i,a,o=N0(function(){return xue(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)||fo(!1):Array.isArray(t)&&fo(!1),t==null||s&&Array.isArray(t)&&t.length===0||o!=null||fo(!1);var l=mue(),c;$c.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(c=gue());var d=Dc(function(){return fS(l,o)}),f=d[0],h=d[1],p=f,m=Dc(p),b=m[0],_=m[1],x=b,E=Dc(o),k=E[0],w=E[1],C=Dc(l),$=C[0],A=C[1];if(!uS(o,k)||l!==$){w(o),A(l);var F=fS(l,o);h(F),_(F),p=F,x=F}var N=lS(!1);if(T0(function(){N.current=o},[o]),((a=e.metadata)===null||a===void 0?void 0:a.hasClientEdges)===!0||$c.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var O=N0(function(){var Ne=wue(p),Me,Qe=[];if(Ne!=null&&Ne.length){Me=[];var Je=(0,Ga.default)(Ne),Ue;try{for(Je.s();!(Ue=Je.n()).done;){var qe=Ue.value,pt=Aue(l,e,t,qe,n),Bt=pt[0],At=pt[1];Me.push(Bt),At!=null&&Qe.push(At)}}catch(Hr){Je.e(Hr)}finally{Je.f()}}return[Me,Qe]},[p,l,e,t,n]),L=O[0],q=O[1];if(q.length)throw Promise.all(q);T0(function(){var Ne=l3(l);if(L!=null&&L.length){var Me=[],Qe=(0,Ga.default)(L),Je;try{for(Qe.s();!(Je=Qe.n()).done;){var Ue=Je.value;Me.push(Ne.retain(Ue))}}catch(qe){Qe.e(qe)}finally{Qe.f()}return function(){for(var qe=0,pt=Me;qe<pt.length;qe++){var Bt=pt[qe];Bt.dispose()}}}},[l,L])}if(Eue(p)){var K=Rue(p);if(K!=null&&K.length>0)throw Promise.all(K.map(function(Ne){return l.getStore().getLiveResolverPromise(Ne)}));if($c.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==$||!N.current||!uS(N.current,o)){o==null&&fo(!1);var re=o.kind==="PluralReaderSelector"?o.selectors[0].owner:o.owner,V=yue(l,e,re);if(V)throw V.promise}}kue(l,p,c);var Y=lS(!1);if(T0(function(){var Ne=x,Me=bd(l,x);if(Me!==null){var Qe=Me[0],Je=Me[1];Qe&&h(Je),Ne=Je}return Cue(l,Ne,h,Y)},[l,x]),Y.current){var J=bd(l,p);if(J!=null){var ue=J[0],se=J[1];ue&&(h(se),p=se)}Y.current=!1}var ve;if(s){var ye=t==null;ve=N0(function(){return p.kind==="bailout"?ye?null:[]:(p.kind!=="plural"&&fo(!1),p.snapshots.map(function(Ne){return Ne.data}))},[p,ye])}else p.kind==="bailout"?ve=null:(p.kind!=="singular"&&fo(!1),ve=p.snapshot.data);return $c.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(ve===void 0||Array.isArray(ve)&&ve.length>0&&ve.every(function(Ne){return Ne===void 0})),ve}var $ue=Due,Xv=Te.default,hS=Xv(_t),Ka=Xv(Yt),Fue=Xv(Za),Iue=Tu,c3=Iue.getQueryResourceForEnvironment,Tue=e3,Nue=s3,ho=Se,Pu=st;Pu.useDebugValue;var Fc=Pu.useEffect,P0=Pu.useMemo,pS=Pu.useRef,Pue=Pu.useState,fa=nt,d3=fa.__internal,Oue=d3.fetchQuery,Mue=d3.getPromiseForActiveRequest,Ic=fa.RelayFeatureFlags,mS=fa.areEqualSelectors,Lue=fa.createOperationDescriptor,zue=fa.getPendingOperationsForFragment,Uue=fa.getSelector,que=fa.getVariablesFromFragment,gS=fa.handlePotentialSnapshotErrors,vS=fa.recycleNodesInto;function jue(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function Bue(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,Ka.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.missingClientEdges){var o;r=(o=r)!==null&&o!==void 0?o:[];var s=(0,Ka.default)(a.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function Vue(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,Ka.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;if(a.missingLiveResolverFields){var o;r=(o=r)!==null&&o!==void 0?o:[];var s=(0,Ka.default)(a.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function Hue(e,t,r){if(t.kind==="singular")gS(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Ka.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;gS(e,a.fieldErrors,r)}}catch(o){n.e(o)}finally{n.f()}}}function Up(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=vS(t.snapshot.data,n.data),a={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:a,epoch:r,selector:t.selector,environment:t.environment}]}else{for(var o=!1,s=[],l=0;l<t.snapshots.length;l++){var c=t.snapshots[l],d=e.lookup(c.selector),f=vS(c.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!==c.data&&(o=!0),s.push(h)}return s.length!==t.snapshots.length&&ho(!1),[o,{kind:"plural",snapshots:s,epoch:r,selector:t.selector,environment:t.environment}]}}function Gue(e,t,r,n,i){var a=que(t,r),o=(0,hS.default)((0,hS.default)({},a),{},{id:n.clientEdgeDestinationID}),s=Lue(n.request,o,i?.networkCacheConfig),l=c3(e),c=l.prepare(s,Oue(e,s),i?.fetchPolicy),d=Mue(e,s.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[c,d]}function bS(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(a){r(function(o){var s=null;if(o.kind!=="singular"||o.snapshot.selector!==a.selector||o.environment!==e){var l=Up(o.environment,o);if(l!=null){var c=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:c}),s=c?d:o}else s=o}else s={kind:"singular",snapshot:a,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return s})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(a,o){return e.subscribe(a,function(s){r(function(l){var c,d=null;if(l.kind!=="plural"||((c=l.snapshots[o])===null||c===void 0?void 0:c.selector)!==s.selector||l.environment!==e){var f=Up(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,Fue.default)(l.snapshots);m[o]=s,d={kind:"plural",snapshots:m,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var a=(0,Ka.default)(i),o;try{for(a.s();!(o=a.n()).done;){var s=o.value;s.dispose()}}catch(l){a.e(l)}finally{a.f()}}}}function _S(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 Kue(e,t,r,n){var i,a,o=P0(function(){return Uue(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)||ho(!1):Array.isArray(t)&&ho(!1),t==null||s&&Array.isArray(t)&&t.length===0||o!=null||ho(!1);var l=Tue(),c;Ic.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(c=Nue());var d=Pue(function(){return _S(l,o)}),f=d[0],h=d[1],p=f,m=p.environment;if(!mS(o,p.selector)||l!==p.environment){var b=_S(l,o);h(b),p=b}var _=pS(!1);if(Fc(function(){_.current=o},[o]),((a=e.metadata)===null||a===void 0?void 0:a.hasClientEdges)===!0||Ic.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var x=P0(function(){var q=Bue(p),K,re=[];if(q!=null&&q.length){K=[];var V=(0,Ka.default)(q),Y;try{for(V.s();!(Y=V.n()).done;){var J=Y.value,ue=Gue(l,e,t,J,n),se=ue[0],ve=ue[1];K.push(se),ve!=null&&re.push(ve)}}catch(ye){V.e(ye)}finally{V.f()}}return[K,re]},[p,l,e,t,n]),E=x[0],k=x[1];if(k.length){var w=Promise.all(k);throw w.displayName="RelayClientEdge(".concat(k.map(function(q){return q.displayName}).join(","),")"),w}Fc(function(){var q=c3(l);if(E!=null&&E.length){var K=[],re=(0,Ka.default)(E),V;try{for(re.s();!(V=re.n()).done;){var Y=V.value;K.push(q.retain(Y))}}catch(J){re.e(J)}finally{re.f()}return function(){for(var J=0,ue=K;J<ue.length;J++){var se=ue[J];se.dispose()}}}},[l,E])}if(jue(p)){var C=Vue(p);if(C!=null&&C.length>0){var $=Promise.all(C.map(function(q){return l.getStore().getLiveResolverPromise(q)}));throw $.displayName="RelayLiveResolver("+e.name+")",$}if(Ic.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==m||!_.current||!mS(_.current,o)){o==null&&ho(!1);var A=o.kind==="PluralReaderSelector"?o.selectors[0].owner:o.owner,F=zue(l,e,A);if(F)throw F.promise}}Hue(l,p,c);var N=pS(null);Fc(function(){var q=N.current;if(q!=null){if(p.environment===q.environment&&p.selector===q.selector)return;q.dispose()}if(p.kind!=="bailout"){var K=p,re=Up(p.environment,p);if(re!==null){var V=re[0],Y=re[1];if(V){h(Y);return}K=Y}var J=bS(p.environment,K,h);N.current={dispose:J,selector:p.selector,environment:p.environment}}},[p]),Fc(function(){if(N.current==null&&p.kind!=="bailout"){var q=bS(p.environment,p,h);N.current={dispose:q,selector:p.selector,environment:p.environment}}return function(){var K;(K=N.current)===null||K===void 0||K.dispose(),N.current=null}},[]);var O;if(s){var L=t==null;O=P0(function(){return p.kind==="bailout"?L?null:[]:(p.kind!=="plural"&&ho(!1),p.snapshots.map(function(q){return q.data}))},[p,L])}else p.kind==="bailout"?O=null:(p.kind!=="singular"&&ho(!1),O=p.snapshot.data);return Ic.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(O===void 0||Array.isArray(O)&&O.length>0&&O.every(function(q){return q===void 0})),O}var Wue=Kue,f3=Te.default;f3($ue);f3(Wue);var h3=Tu;h3.getQueryCacheIdentifier;h3.getQueryResourceForEnvironment;var Rf=st;Rf.useContext;Rf.useEffect;Rf.useState;Rf.useRef;var Que=st;Que.useState;var Yue=st,p3=nt;p3.createOperationDescriptor;p3.getRequest;Yue.useMemo;var Jue=nt;Jue.__internal.fetchQuery;var Xue=Te.default;Xue(_t);var m3=st;m3.useEffect;m3.useRef;var Zue=Te.default;Zue(Yt);var kf=st;kf.useCallback;kf.useEffect;kf.useRef;kf.useState;var ece=st;ece.useDebugValue;var tce=nt;tce.getFragment;var rce=Te.default;rce(_t);var Af=st,nce=nt;nce.commitMutation;Af.useState;Af.useEffect;Af.useRef;Af.useCallback;var g3=nt;g3.ConnectionInterface;g3.getValueAtPath;var Zv=st,v3=nt;v3.__internal.getObservableForActiveRequest;v3.getSelector;Zv.useEffect;Zv.useState;Zv.useMemo;var ice=Te.default;ice(_t);var eb=st;eb.useCallback;eb.useRef;eb.useState;var Ou=nt;Ou.__internal.fetchQuery;Ou.createOperationDescriptor;Ou.getPaginationVariables;Ou.getRefetchMetadata;Ou.getSelector;var ace=Te.default;ace(_t);var tb=st;tb.useCallback;tb.useEffect;tb.useState;var Xs=nt;Xs.__internal.fetchQuery;Xs.RelayFeatureFlags;Xs.createOperationDescriptor;Xs.getPaginationVariables;Xs.getRefetchMetadata;Xs.getSelector;var b3=Te.default;b3(_t);b3(Yt);var oce=Tu;oce.getQueryResourceForEnvironment;var Yo=nt;Yo.__internal.fetchQuery;Yo.RelayFeatureFlags;Yo.createOperationDescriptor;Yo.getPendingOperationsForFragment;Yo.getSelector;Yo.getVariablesFromFragment;Yo.handlePotentialSnapshotErrors;var sce=Te.default;sce(Yt);var lce=wf;lce.loadQuery;var Mu=st;Mu.useCallback;Mu.useEffect;Mu.useInsertionEffect;Mu.useRef;Mu.useState;var uce=nt;uce.getRequest;var cce=Te.default;cce(Yt);var dce=wf;dce.loadQuery;var Cf=st;Cf.useCallback;Cf.useEffect;Cf.useRef;Cf.useState;var _3=nt;_3.RelayFeatureFlags;_3.getRequest;var fce=Te.default;fce(_t);var hce=Tu;hce.getQueryResourceForEnvironment;var rb=st;rb.useCallback;rb.useContext;rb.useReducer;var Zs=nt;Zs.__internal.fetchQuery;Zs.createOperationDescriptor;Zs.getFragmentIdentifier;Zs.getRefetchMetadata;Zs.getSelector;Zs.getValueAtPath;var pce=Te.default;pce(_t);var nb=st;nb.useCallback;nb.useDebugValue;nb.useState;var Df=nt;Df.RelayFeatureFlags;Df.getFragment;Df.getFragmentIdentifier;Df.getPaginationMetadata;var mce=Te.default;mce(_t);var Jo=st;Jo.useCallback;Jo.useDebugValue;Jo.useEffect;Jo.useLayoutEffect;Jo.useMemo;Jo.useRef;Jo.useState;var ib=nt;ib.getFragment;ib.getFragmentIdentifier;ib.getPaginationMetadata;var $f=nt;$f.ConnectionInterface;$f.RelayFeatureFlags;$f.getSelector;$f.getValueAtPath;var gce=st;gce.useDebugValue;var vce=nt,y3=vce.__internal;y3.fetchQueryDeduped;y3.fetchQuery;var bce=st;bce.useDebugValue;var _ce=nt;_ce.getFragment;var x3=st;x3.useEffect;x3.useRef;var yce=st;yce.useEffect;var xce=nt;xce.requestSubscription;var Sce=Qs,Ece=Sse,wce=Xse,Rce=Rle,kce=wf;kce.loadQuery;var Xn=nt,Ace={ConnectionHandler:Xn.ConnectionHandler,MutationTypes:Xn.MutationTypes,RangeOperations:Xn.RangeOperations,ReactRelayContext:Sce,applyOptimisticMutation:Xn.applyOptimisticMutation,commitLocalUpdate:Xn.commitLocalUpdate,commitMutation:Xn.commitMutation,createFragmentContainer:Ece.createContainer,createPaginationContainer:wce.createContainer,createRefetchContainer:Rce.createContainer,fetchQuery_DEPRECATED:Xn.fetchQuery_DEPRECATED,graphql:Xn.graphql,readInlineData:Xn.readInlineData,requestSubscription:Xn.requestSubscription,fetchQuery:Xn.fetchQuery},Cce=Ace;function Dce(e){let t=Cce.ReactRelayContext.Provider;return Kt(t,{value:{environment:e.environment},children:e.children})}let $ce={make:Dce},Fce={Provider:$ce};function Ice(e,t,r){let n=async(i,a,o,s)=>{let l=D(Fi(i.text),""),c=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(c,{method:"POST",headers:d,body:D(JSON.stringify({query:l,variables:a}),"")})).json,m=await p();return ld(m)&&r(),m};return Moe.make(nt.Network.create(n),Noe.make(new nt.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function Tce(e){let t=e.config,r=Uo(),n=xt(()=>Ice(t,()=>S(r,i=>i.getToken()),()=>Q(r,i=>i.logout())),[t,r]);return g(Fce.Provider.make,{environment:n,children:e.children})}let Nce=Tce;function Pce(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function Oce(e,t){return e+"_"+t+"EventHistory"}function Mce(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
|
|
46
|
-
`+e+`(
|
|
47
|
-
filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
|
|
48
|
-
first: $first
|
|
49
|
-
after: $after
|
|
50
|
-
) {
|
|
51
|
-
edges {
|
|
52
|
-
node {
|
|
53
|
-
position
|
|
54
|
-
eventType
|
|
55
|
-
payload
|
|
56
|
-
tags { key value }
|
|
57
|
-
meta { user time correlationId causationId }
|
|
58
|
-
recordedAt
|
|
59
|
-
}
|
|
60
|
-
cursor
|
|
61
|
-
}
|
|
62
|
-
pageInfo { hasNextPage endCursor }
|
|
63
|
-
}
|
|
64
|
-
}`}function Lce(e){return oe(S(j(e),t=>T(t,"x-reventless-audit")),!1,t=>{let r=Be(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let yS={contents:[]};function xS(e){if(!yS.contents.includes(e)){yS.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 zce(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=Pce(e.queryField);if(r!==void 0){if(n!==void 0){let i=Oce(n,r);return{queryField:i,queryDocument:Mce(i),displayName:r}}xS(e.name);return}xS(e.name)}function Gi(e,t){return S(T(e,t),ne)}function Uce(e){let t=D(j(e),{}),r=D(S(T(t,"meta"),j),{}),n=ee(D(S(T(t,"tags"),St),[]),s=>{let l=D(j(s),{}),c=Gi(l,"key"),d=Gi(l,"value");if(c!==void 0&&d!==void 0)return[c,d]}),i=Gi(t,"position"),a=Gi(t,"eventType");if(i===void 0||a===void 0)return;let o=D(Gi(r,"time"),D(Gi(t,"recordedAt"),""));return{position:i,eventType:a,payload:D(T(t,"payload"),{}),tags:n,actor:Gi(r,"user"),time:o,recordedAt:D(Gi(t,"recordedAt"),o)}}function qce(e,t){return ee(D(S(S(S(S(j(e),r=>T(r,t)),j),r=>T(r,"edges")),St),[]),r=>S(S(j(r),n=>T(n,"node")),Uce))}function jce(e,t){let r=D(S(S(S(S(j(e),n=>T(n,t)),j),n=>T(n,"pageInfo")),j),{});return[D(S(T(r,"hasNextPage"),hE),!1),Gi(r,"endCursor")]}function Bce(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return ct(r).toLowerCase()}function Vce(e){return D(B(j(e),ze),[]).filter(t=>t[0]!=="TAG")}function Hce(e){let t={};return e.map(r=>{let n=JSON.stringify(it(ze(t)),null,2);Vce(r.payload).forEach(a=>{t[a[0]]=a[1]});let i=JSON.stringify(it(ze(t)),null,2);return[n,i]})}let Gce="System";function Kce(e,t){let r=Hce(e);return e.map((n,i)=>{let a=D(r[i],["",""]),o=oe(n.tags[0],t,s=>t+" "+s[1]);return{id:n.position,verb:Bce(n.eventType,t),subject:o,actor:D(n.actor,Gce),timestamp:n.time,before:a[0],after:a[1]}}).toReversed()}function Wce(e){let t=[];return e.forEach(r=>Q(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(Vl)}function Qce(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(Vl)}function bn(e){return"var("+e+")"}let Yce=y([M("flex"),ce("column"),W("center"),Ve("center"),u("gap",bn(I.lg)),u("padding",bn(I.xxl)),aa({NAME:"percent",VAL:100}),AE({NAME:"percent",VAL:100}),na("center"),u("min-height","400px")]),Jce=y([u("font-size","48px"),u("line-height","1")]),Xce=y([u("color",bn(v.textPrimary)),u("font-size",bn(R.sizeXxl)),u("font-weight",bn(R.weightBold)),Er(pe(0))]),Zce=y([u("color",bn(v.textSecondary)),u("font-size",bn(R.sizeLg)),u("line-height",bn(R.lineHeightRelaxed)),u("max-width","480px"),Er(pe(0))]),ede=y([u("background",bn(v.brand)),u("color",bn(v.textOnBrand)),u("border-radius",bn(H.md)),u("padding","var("+I.sm+") var("+I.lg+")"),u("font-size",bn(R.sizeMd)),u("font-weight",bn(R.weightMedium)),u("border","none"),u("cursor","pointer"),Pi(pe(8))]);function tde(e){let t=e.definition;return P("div",{children:[g("div",{children:"[locked]",className:Jce}),g("h2",{children:t.title,className:Xce}),g("p",{children:oe(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:Zce}),g("button",{children:"Upgrade to unlock",className:ede})],className:Yce})}let rde=tde;function nde(e){let t=e.children,r=e.definition,n=Au(),i=r.requiredAccess;return i!==void 0&&!n(i)?g(rde,{definition:r}):t}let ide=nde;function S3(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let ab=["body","text","message","comment","content"],ade=["author","createdby","user","commenter","postedby"],ode=["createdat","postedat","at","commentedat"];function E3(e){return ee(dn(e),t=>{if(qE(t[1]))return t[0]})}function ob(e,t){return E3(e).find(r=>t.includes(r.toLowerCase()))}function sde(e){let t=Tr(e,void 0),r=dn(e).map(n=>n[0]).find(n=>oe(T(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:ob(e,ade)}function lde(e){return ee(dn(e),t=>{if(Em(t[1]))return t[0]}).find(t=>ode.includes(t.toLowerCase()))}function w3(e){return E3(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function ude(e,t){let r=S3(t).toLowerCase();return w3(e).find(n=>n.toLowerCase()===r+"id")}function cde(e){let t=w3(e);if(t.length===1)return t[0]}function dde(e){return oe(S(j(e),t=>T(t,"x-reventless-comments")),!1,t=>{let r=Be(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function SS(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=S3(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let fde=["addcomment","postcomment","comment","writecomment","leavecomment"];function hde(e,t){let r=ee(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>fde.some(i=>n.name.toLowerCase().startsWith(i)))}let ES={contents:[]};function pde(e){if(!ES.contents.includes(e)){ES.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 '+ab.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function mde(e,t){return ee(e.readModels.filter(r=>r.name!==t?dde(r.schema)?!0:SS(r.name,t):!1),r=>{let n=ude(r.schema,t),i=n!==void 0?n:SS(r.name,t)?cde(r.schema):void 0,a=ob(r.schema,ab);if(a!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:a,authorField:sde(r.schema),timestampField:lde(r.schema),postCommand:hde(r,e)}:void 0;pde(r.name)})[0]}function os(e,t){return S(T(e,t),ne)}function gde(e,t,r){let n=ee(t,a=>{let o=D(j(a),{});if(tt(os(o,e.entityField),r))return o}),i=a=>S(S(e.timestampField,o=>os(a,o)),Ni);return n.toSorted((a,o)=>{let s=i(a),l=i(o);return s!==void 0?l!==void 0?s-l:-1:l!==void 0?1:0}).map((a,o)=>({id:D(os(a,"id"),"#"+o.toString()),body:D(os(a,e.bodyField),""),author:S(e.authorField,s=>os(a,s)),timestamp:S(e.timestampField,s=>os(a,s))}))}function vde(e,t,r){let n=e.postCommand,i=D(S(n,o=>o.aggregateIdField),e.entityField),a=D(S(n,o=>ob(o.schema,ab)),e.bodyField);return it([[i,t],[a,r]])}function Ci(e){return"var("+e+")"}let bde=y([Qt("fixed"),ia(pe(0)),Bs(pe(0)),Ya(pe(0)),gm(pe(0)),u("background","rgba(0,0,0,0.5)"),M("flex"),W("center"),Ve("center"),u("z-index","1000"),u("backdrop-filter","blur(2px)")]),_de=y([u("background",Ci(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Ci(H.lg)),u("box-shadow",Ci(Sr.lg)),M("flex"),ce("column"),u("max-height","90vh"),u("max-width","90vw"),u("min-width","400px"),u("overflow","hidden")]),yde=y([M("flex"),W("center"),Ve("spaceBetween"),u("padding","var("+I.md+") var("+I.lg+")"),u("border-bottom","1px solid var("+v.borderSubtle+")"),An(0)]),xde=y([u("color",Ci(v.textPrimary)),u("font-size",Ci(R.sizeLg)),u("font-weight",Ci(R.weightMedium)),Er(pe(0))]),Sde=y([u("background","none"),u("border","none"),u("cursor","pointer"),u("color",Ci(v.textSecondary)),u("font-size","18px"),u("padding","0"),u("line-height","1"),We([u("color",Ci(v.textPrimary))])]),Ede=y([u("padding",Ci(I.lg)),u("overflow-y","auto"),si(1)]),wde=y([M("flex"),W("center"),Ve("flexEnd"),u("gap",Ci(I.sm)),u("padding","var("+I.md+") var("+I.lg+")"),u("border-top","1px solid var("+v.borderSubtle+")"),An(0)]);function Rde(e){let t=e.onClose,r=e.isOpen;return Re(()=>{if(!r)return;let n=i=>{if(i.key==="Escape")return t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[r]),r?g("div",{children:P("div",{children:[P("div",{children:[g("h2",{children:e.title,className:xde}),g("button",{children:"x",className:Sde,onClick:n=>t()})],className:yde}),g("div",{children:e.children,className:Ede}),oe(e.footer,null,n=>g("div",{children:n,className:wde}))],className:_de,style:oe(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:bde,onClick:n=>t()}):null}let sb=Rde;function Sn(e){return"var("+e+")"}let kde=y([M("flex"),ce("column"),u("gap",Sn(I.sm))]),Ade=y([u("overflow-x","auto")]),Cde=y([u("border-collapse","collapse"),u("font-size",Sn(R.sizeSm)),u("min-width","min-content")]),lb=[u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("background",Sn(v.surfaceSubtle)),u("white-space","nowrap"),u("font-weight",Sn(R.weightMedium))],Dde=y(lb.concat([u("text-align","left"),u("color",Sn(v.textSecondary))])),$de=y(lb.concat([u("text-align","right"),u("color",Sn(v.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("font-size",Sn(R.sizeXs))])),Fde=y(lb.concat([u("text-align","left"),u("color",Sn(v.textPrimary))]));function Ide(e){return y([u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("text-align","right"),u("white-space","nowrap"),u("background",e<=0?"transparent":"color-mix(in srgb, var("+v.brand+") "+Math.round(e*100).toString()+"%, transparent)"),u("color",e>=.55?Sn(v.textOnBrand):e<=0?Sn(v.textDisabled):Sn(v.textPrimary))])}let Tde=y([M("flex"),W("center"),u("gap","6px"),u("font-size",Sn(R.sizeXs)),u("color",Sn(v.textSecondary))]);function Nde(e){return y([u("width","18px"),u("height","10px"),u("background","color-mix(in srgb, var("+v.brand+") "+Math.round(e*100).toString()+"%, transparent)"),u("border","1px solid var("+v.borderSubtle+")")])}function R3(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function Pde(e){return rt(e,0,(t,r)=>rt(r,t,(n,i)=>i.value>n?i.value:n))}let k3=[.12,.35,.6,.85,1];function Ode(e){let t=e.cells,r=e.colHeaders,n=Pde(t);return P("div",{children:[g("div",{children:P("table",{children:[g("thead",{children:P("tr",{children:[g("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:Dde,scope:"col"}),r.map(i=>g("th",{children:i.label,className:$de,scope:"col"},i.value))]})}),g("tbody",{children:e.rowHeaders.map((i,a)=>P("tr",{children:[g("th",{children:i.label,className:Fde,scope:"row"}),r.map((o,s)=>{let l=D(S(t[a],c=>c[s]),{value:0,display:""});return g("td",{children:g("span",{children:l.display,title:i.label+" × "+o.label+": "+l.display}),className:Ide(R3(l.value,n))},i.value+":"+o.value)})]},i.value))})],className:Cde}),className:Ade}),P("div",{children:["0",k3.map(i=>g("span",{className:Nde(i)},i.toString())),e.maxLabel],className:Tde})],className:kde})}let Mde=Ode;function En(e){return"var("+e+")"}let Lde=y([Qt("relative"),u("padding-left","28px"),M("flex"),ce("column"),u("gap",En(I.md))]),zde=y([Qt("absolute"),Bs(pe(7)),ia(pe(8)),gm(pe(0)),u("width","2px"),u("background",En(v.borderSubtle))]),Ude=y([Qt("absolute"),Bs(pe(-21)),ia(pe(6)),u("width","10px"),u("height","10px"),u("border-radius","50%"),u("background",En(v.brand)),u("border","2px solid var("+v.surface+")"),An(0)]),A3=y([Qt("relative"),M("flex"),ce("column"),u("gap","2px")]),qde=cn([A3,y([u("background","none"),u("border","none"),u("padding","0"),na("left"),xe("pointer"),We([u("opacity","0.85")])])]),jde=y([M("flex"),W("center"),u("gap",En(I.sm))]),Bde=y([u("color",En(v.textDisabled)),u("font-size",En(R.sizeXs)),u("font-family",En(R.fontFamilyMono))]),Vde=y([u("color",En(v.textPrimary)),u("font-size",En(R.sizeMd)),u("font-weight",En(R.weightMedium))]),Hde=y([u("color",En(v.textSecondary)),u("font-size",En(R.sizeSm)),u("line-height",En(R.lineHeightNormal)),gu(pe(0))]);function Gde(e){let t=e.onSelect,r=n=>P(jr,{children:[g("div",{className:Ude}),P("div",{children:[g("span",{children:n.timestamp,className:Bde}),oe(n.variant,null,i=>g(La,{variant:i,label:n.label})),oe(n.variant,g("span",{children:n.label,className:Vde}),i=>null)],className:jde}),oe(n.detail,null,i=>g("div",{children:i,className:Hde}))]});return P("div",{children:[g("div",{className:zde}),e.entries.map(n=>t!==void 0?g("button",{children:r(n),className:qde,type:"button",onClick:i=>t(n.id)},n.id):g("div",{children:r(n),className:A3},n.id))],className:Lde})}let Kde=Gde;function qr(e){return"var("+e+")"}let Wde=y([u("overflow-x","auto")]),Qde=y([u("border-collapse","collapse"),u("font-size",qr(R.sizeSm)),u("color",qr(v.textPrimary)),u("min-width","min-content")]),ub=[u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("text-align","right"),u("white-space","nowrap")],Yde=y(ub),Jde=y(ub.concat([u("color",qr(v.textDisabled))])),Xde=y([u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("text-align","left"),u("color",qr(v.textSecondary)),u("font-weight",qr(R.weightMedium)),u("white-space","nowrap")]),Zde=y([u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("text-align","right"),u("background",qr(v.surfaceSubtle)),u("color",qr(v.textSecondary)),u("font-weight",qr(R.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("font-size",qr(R.sizeXs)),u("white-space","nowrap")]),efe=y([u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("text-align","left"),u("background",qr(v.surfaceSubtle)),u("color",qr(v.textPrimary)),u("font-weight",qr(R.weightMedium)),u("white-space","nowrap")]),O0=y(ub.concat([u("font-weight",qr(R.weightMedium))])),wS=y([u("border","1px solid var("+v.borderSubtle+")"),u("padding","4px var("+I.sm+")"),u("background",qr(v.surfaceSubtle)),u("color",qr(v.textSecondary)),u("font-weight",qr(R.weightMedium)),u("white-space","nowrap")]),RS="Total";function tfe(e){let t=e.colTotals,r=e.rowTotals,n=e.cells,i=e.colHeaders;return g("div",{children:P("table",{children:[g("thead",{children:P("tr",{children:[g("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:Xde,scope:"col"}),i.map(a=>g("th",{children:a.label,className:Zde,scope:"col"},a.value)),g("th",{children:RS,className:wS,scope:"col"})]})}),g("tbody",{children:e.rowHeaders.map((a,o)=>{let s=D(n[o],[]);return P("tr",{children:[g("th",{children:a.label,className:efe,scope:"row"}),i.map((l,c)=>{let d=D(s[c],{display:"",empty:!0});return g("td",{children:d.empty?"—":d.display,className:d.empty?Jde:Yde},l.value)}),g("td",{children:D(r[o],""),className:O0})]},a.value)})}),g("tfoot",{children:P("tr",{children:[g("th",{children:RS,className:wS,scope:"row"}),i.map((a,o)=>g("td",{children:D(t[o],""),className:O0},a.value)),g("td",{children:e.grandTotal,className:O0})]})})],className:Qde}),className:Wde})}let rfe=tfe;function Br(e){return"var("+e+")"}let nfe=y([M("grid"),u("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),u("gap",Br(I.md))]),ife=y([M("flex"),ce("column"),W("stretch"),u("gap",Br(I.xs)),u("padding","0"),u("background","none"),u("border","none"),u("text-align","left"),xe("pointer"),We([u("opacity","0.88")])]),C3=y([u("width","100%"),u("aspect-ratio","4 / 3"),u("object-fit","cover"),u("background",Br(v.surfaceSubtle)),u("border","1px solid var("+v.border+")"),u("border-radius",Br(H.md))]),afe=cn([C3,y([M("flex"),W("center"),Ve("center"),u("color",Br(v.textDisabled)),u("font-size",Br(R.sizeSm))])]),ofe=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",Br(I.sm))]),sfe=y([u("color",Br(v.textPrimary)),u("font-size",Br(R.sizeSm)),u("font-weight",Br(R.weightMedium)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),lfe=y([u("color",Br(v.textSecondary)),u("font-size",Br(R.sizeXs)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),ufe=y([u("background","rgba(255,255,255,0.12)"),u("border","1px solid rgba(255,255,255,0.25)"),u("border-radius",Br(H.md)),u("color","#f5f5f5"),u("padding","4px var("+I.sm+")"),u("font-size",Br(R.sizeSm)),xe("pointer"),We([u("background","rgba(255,255,255,0.22)")])]),cfe=y([u("color",Br(v.textDisabled)),u("font-size",Br(R.sizeSm))]);function dfe(e){return ee(e,t=>B(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function ffe(e){let t=e.onOpen,r=e.items,n=X(()=>{}),i=n[1],a=n[0],o=dfe(r);if(r.length===0)return g("span",{children:"(empty)",className:cfe});let s;if(a!==void 0){let l=S(t,c=>B(o[a],d=>g("button",{children:"Open record →",className:ufe,type:"button",onClick:f=>{i(h=>{}),c(d.key)}})));s=g(iw,{slides:o,index:a,onIndexChange:c=>i(d=>c),onClose:()=>i(c=>{}),action:l})}else s=null;return P(jr,{children:[g("div",{children:r.map(l=>{let c=l.src,d=l.caption;return P("button",{children:[c!==void 0?g("img",{className:C3,alt:l.title,src:c}):g("span",{children:"No image",className:afe}),P("div",{children:[g("span",{children:l.title,className:sfe}),D(l.badge,null)],className:ofe}),d!==void 0?g("span",{children:d,className:lfe}):null],className:ife,title:l.title,type:"button",onClick:f=>{if(l.src===void 0)return Q(t,m=>m(l.key));let p=o.findIndex(m=>m.key===l.key);return p!==-1?i(m=>p):Q(t,m=>m(l.key))}},l.key)}),className:nfe}),s]})}let hfe=ffe;const Ff=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function el(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function cb(e){return"nodeType"in e}function fn(e){var t,r;return e?el(e)?e:cb(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function db(e){const{Document:t}=fn(e);return e instanceof t}function Lu(e){return el(e)?!1:e instanceof fn(e).HTMLElement}function D3(e){return e instanceof fn(e).SVGElement}function tl(e){return e?el(e)?e.document:cb(e)?db(e)?e:Lu(e)||D3(e)?e.ownerDocument:document:document:document}const Wa=Ff?eE:Re;function fb(e){const t=Ke(e);return Wa(()=>{t.current=e}),dr(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 pfe(){const e=Ke(null),t=dr((n,i)=>{e.current=setInterval(n,i)},[]),r=dr(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function du(e,t){t===void 0&&(t=[e]);const r=Ke(e);return Wa(()=>{r.current!==e&&(r.current=e)},t),r}function zu(e,t){const r=Ke();return xt(()=>{const n=e(r.current);return r.current=n,n},[...t])}function _d(e){const t=fb(e),r=Ke(null),n=dr(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function qp(e){const t=Ke();return Re(()=>{t.current=e},[e]),t.current}let M0={};function If(e,t){return xt(()=>{if(t)return t;const r=M0[e]==null?0:M0[e]+1;return M0[e]=r,e+"-"+r},[e,t])}function $3(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((a,o)=>{const s=Object.entries(o);for(const[l,c]of s){const d=a[l];d!=null&&(a[l]=d+e*c)}return a},{...t})}}const Rs=$3(1),yd=$3(-1);function mfe(e){return"clientX"in e&&"clientY"in e}function F3(e){if(!e)return!1;const{KeyboardEvent:t}=fn(e.target);return t&&e instanceof t}function gfe(e){if(!e)return!1;const{TouchEvent:t}=fn(e.target);return t&&e instanceof t}function jp(e){if(gfe(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 mfe(e)?{x:e.clientX,y:e.clientY}:null}const kS="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function vfe(e){return e.matches(kS)?e:e.querySelector(kS)}const bfe={display:"none"};function _fe(e){let{id:t,value:r}=e;return Pn.createElement("div",{id:t,style:bfe},r)}function yfe(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 Pn.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function xfe(){const[e,t]=X("");return{announce:dr(n=>{n!=null&&t(n)},[]),announcement:e}}const I3=Mt(null);function Sfe(e){const t=bt(I3);Re(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Efe(){const[e]=X(()=>new Set),t=dr(n=>(e.add(n),()=>e.delete(n)),[e]);return[dr(n=>{let{type:i,event:a}=n;e.forEach(o=>{var s;return(s=o[i])==null?void 0:s.call(o,a)})},[e]),t]}const wfe={draggable:`
|
|
65
|
-
To pick up a draggable item, press the space bar.
|
|
66
|
-
While dragging, use the arrow keys to move the item.
|
|
67
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
68
|
-
`},Rfe={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 kfe(e){let{announcements:t=Rfe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=wfe}=e;const{announce:a,announcement:o}=xfe(),s=If("DndLiveRegion"),[l,c]=X(!1);if(Re(()=>{c(!0)},[]),Sfe(xt(()=>({onDragStart(f){let{active:h}=f;a(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&a(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;a(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;a(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;a(t.onDragCancel({active:h,over:p}))}}),[a,t])),!l)return null;const d=Pn.createElement(Pn.Fragment,null,Pn.createElement(_fe,{id:n,value:i.draggable}),Pn.createElement(yfe,{id:s,announcement:o}));return r?b$(d,r):d}var cr;(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"})(cr||(cr={}));function xd(){}function AS(e,t){return xt(()=>({sensor:e,options:t??{}}),[e,t])}function Afe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xt(()=>[...t].filter(n=>n!=null),[...t])}const oi=Object.freeze({x:0,y:0});function Cfe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function Dfe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function $fe(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),a=Math.min(t.top+t.height,e.top+e.height),o=i-n,s=a-r;if(n<i&&r<a){const l=t.width*t.height,c=e.width*e.height,d=o*s,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const Ffe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const a of n){const{id:o}=a,s=r.get(o);if(s){const l=$fe(s,t);l>0&&i.push({id:o,data:{droppableContainer:a,value:l}})}}return i.sort(Cfe)};function Ife(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function T3(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:oi}function Tfe(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}const Nfe=Tfe(1);function Pfe(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 Ofe(e,t,r){const n=Pfe(t);if(!n)return e;const{scaleX:i,scaleY:a,x:o,y:s}=n,l=e.left-o-(1-i)*parseFloat(r),c=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const Mfe={ignoreTransform:!1};function Uu(e,t){t===void 0&&(t=Mfe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=fn(e).getComputedStyle(e);c&&(r=Ofe(r,c,d))}const{top:n,left:i,width:a,height:o,bottom:s,right:l}=r;return{top:n,left:i,width:a,height:o,bottom:s,right:l}}function CS(e){return Uu(e,{ignoreTransform:!0})}function Lfe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function zfe(e,t){return t===void 0&&(t=fn(e).getComputedStyle(e)),t.position==="fixed"}function Ufe(e,t){t===void 0&&(t=fn(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?r.test(a):!1})}function hb(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(db(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Lu(i)||D3(i)||r.includes(i))return r;const a=fn(e).getComputedStyle(i);return i!==e&&Ufe(i,a)&&r.push(i),zfe(i,a)?r:n(i.parentNode)}return e?n(e):r}function N3(e){const[t]=hb(e,1);return t??null}function L0(e){return!Ff||!e?null:el(e)?e:cb(e)?db(e)||e===tl(e).scrollingElement?window:Lu(e)?e:null:null}function P3(e){return el(e)?e.scrollX:e.scrollLeft}function O3(e){return el(e)?e.scrollY:e.scrollTop}function Bp(e){return{x:P3(e),y:O3(e)}}var gr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(gr||(gr={}));function M3(e){return!Ff||!e?!1:e===document.scrollingElement}function L3(e){const t={x:0,y:0},r=M3(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,a=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:a,isBottom:o,isRight:s,maxScroll:n,minScroll:t}}const qfe={x:.2,y:.2};function jfe(e,t,r,n,i){let{top:a,left:o,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=qfe);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=L3(e),p={x:0,y:0},m={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&a<=t.top+b.height?(p.y=gr.Backward,m.y=n*Math.abs((t.top+b.height-a)/b.height)):!d&&l>=t.bottom-b.height&&(p.y=gr.Forward,m.y=n*Math.abs((t.bottom-b.height-l)/b.height)),!h&&s>=t.right-b.width?(p.x=gr.Forward,m.x=n*Math.abs((t.right-b.width-s)/b.width)):!f&&o<=t.left+b.width&&(p.x=gr.Backward,m.x=n*Math.abs((t.left+b.width-o)/b.width)),{direction:p,speed:m}}function Bfe(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}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 z3(e){return e.reduce((t,r)=>Rs(t,Bp(r)),oi)}function Vfe(e){return e.reduce((t,r)=>t+P3(r),0)}function Hfe(e){return e.reduce((t,r)=>t+O3(r),0)}function Gfe(e,t){if(t===void 0&&(t=Uu),!e)return;const{top:r,left:n,bottom:i,right:a}=t(e);N3(e)&&(i<=0||a<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Kfe=[["x",["left","right"],Vfe],["y",["top","bottom"],Hfe]];class pb{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=hb(r),i=z3(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,o,s]of Kfe)for(const l of o)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=i[a]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ll{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 Wfe(e){const{EventTarget:t}=fn(e);return e instanceof t?e:tl(e)}function z0(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 Nn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Nn||(Nn={}));function DS(e){e.preventDefault()}function Qfe(e){e.stopPropagation()}var Et;(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"})(Et||(Et={}));const U3={start:[Et.Space,Et.Enter],cancel:[Et.Esc],end:[Et.Space,Et.Enter,Et.Tab]},Yfe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Et.Right:return{...r,x:r.x+25};case Et.Left:return{...r,x:r.x-25};case Et.Down:return{...r,y:r.y+25};case Et.Up:return{...r,y:r.y-25}}};class mb{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 Ll(tl(r)),this.windowListeners=new Ll(fn(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Nn.Resize,this.handleCancel),this.windowListeners.add(Nn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Nn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Gfe(n),r(oi)}handleKeyDown(t){if(F3(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:a=U3,coordinateGetter:o=Yfe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:oi;this.referenceCoordinates||(this.referenceCoordinates=d);const f=o(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=yd(f,d),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const b of m){const _=t.code,{isTop:x,isRight:E,isLeft:k,isBottom:w,maxScroll:C,minScroll:$}=L3(b),A=Bfe(b),F={x:Math.min(_===Et.Right?A.right-A.width/2:A.right,Math.max(_===Et.Right?A.left:A.left+A.width/2,f.x)),y:Math.min(_===Et.Down?A.bottom-A.height/2:A.bottom,Math.max(_===Et.Down?A.top:A.top+A.height/2,f.y))},N=_===Et.Right&&!E||_===Et.Left&&!k,O=_===Et.Down&&!w||_===Et.Up&&!x;if(N&&F.x!==f.x){const L=b.scrollLeft+h.x,q=_===Et.Right&&L<=C.x||_===Et.Left&&L>=$.x;if(q&&!h.y){b.scrollTo({left:L,behavior:s});return}q?p.x=b.scrollLeft-L:p.x=_===Et.Right?b.scrollLeft-C.x:b.scrollLeft-$.x,p.x&&b.scrollBy({left:-p.x,behavior:s});break}else if(O&&F.y!==f.y){const L=b.scrollTop+h.y,q=_===Et.Down&&L<=C.y||_===Et.Up&&L>=$.y;if(q&&!h.x){b.scrollTo({top:L,behavior:s});return}q?p.y=b.scrollTop-L:p.y=_===Et.Down?b.scrollTop-C.y:b.scrollTop-$.y,p.y&&b.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Rs(yd(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()}}mb.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=U3,onActivation:i}=t,{active:a}=r;const{code:o}=e.nativeEvent;if(n.start.includes(o)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function $S(e){return!!(e&&"distance"in e)}function FS(e){return!!(e&&"delay"in e)}class gb{constructor(t,r,n){var i;n===void 0&&(n=Wfe(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:a}=t,{target:o}=a;this.props=t,this.events=r,this.document=tl(o),this.documentListeners=new Ll(this.document),this.listeners=new Ll(n),this.windowListeners=new Ll(fn(o)),this.initialCoordinates=(i=jp(a))!=null?i:oi,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(Nn.Resize,this.handleCancel),this.windowListeners.add(Nn.DragStart,DS),this.windowListeners.add(Nn.VisibilityChange,this.handleCancel),this.windowListeners.add(Nn.ContextMenu,DS),this.documentListeners.add(Nn.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(FS(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if($S(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(Nn.Click,Qfe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Nn.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:a}=this,{onMove:o,options:{activationConstraint:s}}=a;if(!i)return;const l=(r=jp(t))!=null?r:oi,c=yd(i,l);if(!n&&s){if($S(s)){if(s.tolerance!=null&&z0(c,s.tolerance))return this.handleCancel();if(z0(c,s.distance))return this.handleStart()}if(FS(s)&&z0(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}t.cancelable&&t.preventDefault(),o(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===Et.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Jfe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class vb extends gb{constructor(t){const{event:r}=t,n=tl(r.target);super(t,Jfe,n)}}vb.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 Xfe={move:{name:"mousemove"},end:{name:"mouseup"}};var Vp;(function(e){e[e.RightClick=2]="RightClick"})(Vp||(Vp={}));class Zfe extends gb{constructor(t){super(t,Xfe,tl(t.event.target))}}Zfe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===Vp.RightClick?!1:(n?.({event:r}),!0)}}];const U0={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ehe extends gb{constructor(t){super(t,U0)}static setup(){return window.addEventListener(U0.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(U0.move.name,t)};function t(){}}}ehe.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 zl;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(zl||(zl={}));var Sd;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Sd||(Sd={}));function the(e){let{acceleration:t,activator:r=zl.Pointer,canScroll:n,draggingRect:i,enabled:a,interval:o=5,order:s=Sd.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=nhe({delta:f,disabled:!a}),[m,b]=pfe(),_=Ke({x:0,y:0}),x=Ke({x:0,y:0}),E=xt(()=>{switch(r){case zl.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case zl.DraggableRect:return i}},[r,i,l]),k=Ke(null),w=dr(()=>{const $=k.current;if(!$)return;const A=_.current.x*x.current.x,F=_.current.y*x.current.y;$.scrollBy(A,F)},[]),C=xt(()=>s===Sd.TreeOrder?[...c].reverse():c,[s,c]);Re(()=>{if(!a||!c.length||!E){b();return}for(const $ of C){if(n?.($)===!1)continue;const A=c.indexOf($),F=d[A];if(!F)continue;const{direction:N,speed:O}=jfe($,F,E,t,h);for(const L of["x","y"])p[L][N[L]]||(O[L]=0,N[L]=0);if(O.x>0||O.y>0){b(),k.current=$,m(w,o),_.current=O,x.current=N;return}}_.current={x:0,y:0},x.current={x:0,y:0},b()},[t,w,n,b,a,o,JSON.stringify(E),JSON.stringify(p),m,c,C,d,JSON.stringify(h)])}const rhe={x:{[gr.Backward]:!1,[gr.Forward]:!1},y:{[gr.Backward]:!1,[gr.Forward]:!1}};function nhe(e){let{delta:t,disabled:r}=e;const n=qp(t);return zu(i=>{if(r||!n||!i)return rhe;const a={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[gr.Backward]:i.x[gr.Backward]||a.x===-1,[gr.Forward]:i.x[gr.Forward]||a.x===1},y:{[gr.Backward]:i.y[gr.Backward]||a.y===-1,[gr.Forward]:i.y[gr.Forward]||a.y===1}}},[r,t,n])}function ihe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return zu(i=>{var a;return t==null?null:(a=n??i)!=null?a:null},[n,t])}function ahe(e,t){return xt(()=>e.reduce((r,n)=>{const{sensor:i}=n,a=i.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...a]},[]),[e,t])}var fu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(fu||(fu={}));var Hp;(function(e){e.Optimized="optimized"})(Hp||(Hp={}));const IS=new Map;function ohe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[a,o]=X(null),{frequency:s,measure:l,strategy:c}=i,d=Ke(e),f=_(),h=du(f),p=dr(function(x){x===void 0&&(x=[]),!h.current&&o(E=>E===null?x:E.concat(x.filter(k=>!E.includes(k))))},[h]),m=Ke(null),b=zu(x=>{if(f&&!r)return IS;if(!x||x===IS||d.current!==e||a!=null){const E=new Map;for(let k of e){if(!k)continue;if(a&&a.length>0&&!a.includes(k.id)&&k.rect.current){E.set(k.id,k.rect.current);continue}const w=k.node.current,C=w?new pb(l(w),w):null;k.rect.current=C,C&&E.set(k.id,C)}return E}return x},[e,a,r,f,l]);return Re(()=>{d.current=e},[e]),Re(()=>{f||p()},[r,f]),Re(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),Re(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...n]),{droppableRects:b,measureDroppableContainers:p,measuringScheduled:a!=null};function _(){switch(c){case fu.Always:return!1;case fu.BeforeDragging:return r;default:return!r}}}function q3(e,t){return zu(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function she(e,t){return q3(e,t)}function lhe(e){let{callback:t,disabled:r}=e;const n=fb(t),i=xt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(n)},[n,r]);return Re(()=>()=>i?.disconnect(),[i]),i}function Tf(e){let{callback:t,disabled:r}=e;const n=fb(t),i=xt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(n)},[r]);return Re(()=>()=>i?.disconnect(),[i]),i}function uhe(e){return new pb(Uu(e),e)}function TS(e,t,r){t===void 0&&(t=uhe);const[n,i]=X(null);function a(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const o=lhe({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){a();break}}}}),s=Tf({callback:a});return Wa(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),n}function che(e){const t=q3(e);return T3(e,t)}const NS=[];function dhe(e){const t=Ke(e),r=zu(n=>e?n&&n!==NS&&e&&t.current&&e.parentNode===t.current.parentNode?n:hb(e):NS,[e]);return Re(()=>{t.current=e},[e]),r}function fhe(e){const[t,r]=X(null),n=Ke(e),i=dr(a=>{const o=L0(a.target);o&&r(s=>s?(s.set(o,Bp(o)),new Map(s)):null)},[]);return Re(()=>{const a=n.current;if(e!==a){o(a);const s=e.map(l=>{const c=L0(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,Bp(c)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{o(e),o(a)};function o(s){s.forEach(l=>{const c=L0(l);c?.removeEventListener("scroll",i)})}},[i,e]),xt(()=>e.length?t?Array.from(t.values()).reduce((a,o)=>Rs(a,o),oi):z3(e):oi,[e,t])}function PS(e,t){t===void 0&&(t=[]);const r=Ke(null);return Re(()=>{r.current=null},t),Re(()=>{const n=e!==oi;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?yd(e,r.current):oi}function hhe(e){Re(()=>{if(!Ff)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 phe(e,t){return xt(()=>e.reduce((r,n)=>{let{eventName:i,handler:a}=n;return r[i]=o=>{a(o,t)},r},{}),[e,t])}function j3(e){return xt(()=>e?Lfe(e):null,[e])}const OS=[];function mhe(e,t){t===void 0&&(t=Uu);const[r]=e,n=j3(r?fn(r):null),[i,a]=X(OS);function o(){a(()=>e.length?e.map(l=>M3(l)?n:new pb(t(l),l)):OS)}const s=Tf({callback:o});return Wa(()=>{s?.disconnect(),o(),e.forEach(l=>s?.observe(l))},[e]),i}function ghe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Lu(t)?t:e}function vhe(e){let{measure:t}=e;const[r,n]=X(null),i=dr(c=>{for(const{target:d}of c)if(Lu(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),a=Tf({callback:i}),o=dr(c=>{const d=ghe(c);a?.disconnect(),d&&a?.observe(d),n(d?t(d):null)},[t,a]),[s,l]=_d(o);return xt(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const bhe=[{sensor:vb,options:{}},{sensor:mb,options:{}}],_he={current:{}},Kc={draggable:{measure:CS},droppable:{measure:CS,strategy:fu.WhileDragging,frequency:Hp.Optimized},dragOverlay:{measure:Uu}};class Ul 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 yhe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ul,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xd},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Kc,measureDroppableContainers:xd,windowRect:null,measuringScheduled:!1},xhe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xd,draggableNodes:new Map,over:null,measureDroppableContainers:xd},Nf=Mt(xhe),She=Mt(yhe);function Ehe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ul}}}function whe(e,t){switch(t.type){case cr.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case cr.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 cr.DragEnd:case cr.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case cr.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Ul(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case cr.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const o=new Ul(e.droppable.containers);return o.set(r,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case cr.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const a=new Ul(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Rhe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=bt(Nf),a=qp(n),o=qp(r?.id);return Re(()=>{if(!t&&!n&&a&&o!=null){if(!F3(a)||document.activeElement===a.target)return;const s=i.get(o);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=vfe(d);if(f){f.focus();break}}})}},[n,t,i,o,a]),null}function khe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...n}),r):r}function Ahe(e){return xt(()=>({draggable:{...Kc.draggable,...e?.draggable},droppable:{...Kc.droppable,...e?.droppable},dragOverlay:{...Kc.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Che(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const a=Ke(!1),{x:o,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Wa(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!n)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),f=T3(d,n);if(o||(f.x=0),s||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=N3(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,o,s,n,r])}const B3=Mt({...oi,scaleX:1,scaleY:1});var Sa;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Sa||(Sa={}));const V3=h$(function(t){var r,n,i,a;let{id:o,accessibility:s,autoScroll:l=!0,children:c,sensors:d=bhe,collisionDetection:f=Ffe,measuring:h,modifiers:p,...m}=t;const b=p$(whe,void 0,Ehe),[_,x]=b,[E,k]=Efe(),[w,C]=X(Sa.Uninitialized),$=w===Sa.Initialized,{draggable:{active:A,nodes:F,translate:N},droppable:{containers:O}}=_,L=A!=null?F.get(A):null,q=Ke({initial:null,translated:null}),K=xt(()=>{var Ut;return A!=null?{id:A,data:(Ut=L?.data)!=null?Ut:_he,rect:q}:null},[A,L]),re=Ke(null),[V,Y]=X(null),[J,ue]=X(null),se=du(m,Object.values(m)),ve=If("DndDescribedBy",o),ye=xt(()=>O.getEnabled(),[O]),Ne=Ahe(h),{droppableRects:Me,measureDroppableContainers:Qe,measuringScheduled:Je}=ohe(ye,{dragging:$,dependencies:[N.x,N.y],config:Ne.droppable}),Ue=ihe(F,A),qe=xt(()=>J?jp(J):null,[J]),pt=ga(),Bt=she(Ue,Ne.draggable.measure);Che({activeNode:A!=null?F.get(A):null,config:pt.layoutShiftCompensation,initialRect:Bt,measure:Ne.draggable.measure});const At=TS(Ue,Ne.draggable.measure,Bt),Hr=TS(Ue?Ue.parentElement:null),U=Ke({activatorEvent:null,active:null,activeNode:Ue,collisionRect:null,collisions:null,droppableRects:Me,draggableNodes:F,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),de=O.getNodeFor((r=U.current.over)==null?void 0:r.id),De=vhe({measure:Ne.dragOverlay.measure}),Ee=(n=De.nodeRef.current)!=null?n:Ue,Le=$?(i=De.rect)!=null?i:At:null,G=!!(De.nodeRef.current&&De.rect),te=che(G?null:At),be=j3(Ee?fn(Ee):null),me=dhe($?de??Ue:null),fe=mhe(me),Xe=khe(p,{transform:{x:N.x-te.x,y:N.y-te.y,scaleX:1,scaleY:1},activatorEvent:J,active:K,activeNodeRect:At,containerNodeRect:Hr,draggingNodeRect:Le,over:U.current.over,overlayNodeRect:De.rect,scrollableAncestors:me,scrollableAncestorRects:fe,windowRect:be}),Pe=qe?Rs(qe,N):null,Lt=fhe(me),Oe=PS(Lt),Ge=PS(Lt,[At]),Dt=Rs(Xe,Oe),Vt=Le?Nfe(Le,Xe):null,$t=K&&Vt?f({active:K,collisionRect:Vt,droppableRects:Me,droppableContainers:ye,pointerCoordinates:Pe}):null,wr=Dfe($t,"id"),[rr,hn]=X(null),Dn=G?Xe:Rs(Xe,Ge),ha=Ife(Dn,(a=rr?.rect)!=null?a:null,At),Ui=Ke(null),pa=dr((Ut,Ct)=>{let{sensor:Ht,options:Gr}=Ct;if(re.current==null)return;const Rr=F.get(re.current);if(!Rr)return;const lt=Ut.nativeEvent,Or=new Ht({active:re.current,activeNode:Rr,event:lt,options:Gr,context:U,onAbort(qt){if(!F.get(qt))return;const{onDragAbort:Mr}=se.current,Kr={id:qt};Mr?.(Kr),E({type:"onDragAbort",event:Kr})},onPending(qt,pn,Mr,Kr){if(!F.get(qt))return;const{onDragPending:Ze}=se.current,fr={id:qt,constraint:pn,initialCoordinates:Mr,offset:Kr};Ze?.(fr),E({type:"onDragPending",event:fr})},onStart(qt){const pn=re.current;if(pn==null)return;const Mr=F.get(pn);if(!Mr)return;const{onDragStart:Kr}=se.current,Jn={activatorEvent:lt,active:{id:pn,data:Mr.data,rect:q}};Hu(()=>{Kr?.(Jn),C(Sa.Initializing),x({type:cr.DragStart,initialCoordinates:qt,active:pn}),E({type:"onDragStart",event:Jn}),Y(Ui.current),ue(lt)})},onMove(qt){x({type:cr.DragMove,coordinates:qt})},onEnd:$n(cr.DragEnd),onCancel:$n(cr.DragCancel)});Ui.current=Or;function $n(qt){return async function(){const{active:Mr,collisions:Kr,over:Jn,scrollAdjustedTranslate:Ze}=U.current;let fr=null;if(Mr&&Ze){const{cancelDrop:nr}=se.current;fr={activatorEvent:lt,active:Mr,collisions:Kr,delta:Ze,over:Jn},qt===cr.DragEnd&&typeof nr=="function"&&await Promise.resolve(nr(fr))&&(qt=cr.DragCancel)}re.current=null,Hu(()=>{x({type:qt}),C(Sa.Uninitialized),hn(null),Y(null),ue(null),Ui.current=null;const nr=qt===cr.DragEnd?"onDragEnd":"onDragCancel";if(fr){const nl=se.current[nr];nl?.(fr),E({type:nr,event:fr})}})}}},[F]),Yn=dr((Ut,Ct)=>(Ht,Gr)=>{const Rr=Ht.nativeEvent,lt=F.get(Gr);if(re.current!==null||!lt||Rr.dndKit||Rr.defaultPrevented)return;const Or={active:lt};Ut(Ht,Ct.options,Or)===!0&&(Rr.dndKit={capturedBy:Ct.sensor},re.current=Gr,pa(Ht,Ct))},[F,pa]),ma=ahe(d,Yn);hhe(d),Wa(()=>{At&&w===Sa.Initializing&&C(Sa.Initialized)},[At,w]),Re(()=>{const{onDragMove:Ut}=se.current,{active:Ct,activatorEvent:Ht,collisions:Gr,over:Rr}=U.current;if(!Ct||!Ht)return;const lt={active:Ct,activatorEvent:Ht,collisions:Gr,delta:{x:Dt.x,y:Dt.y},over:Rr};Hu(()=>{Ut?.(lt),E({type:"onDragMove",event:lt})})},[Dt.x,Dt.y]),Re(()=>{const{active:Ut,activatorEvent:Ct,collisions:Ht,droppableContainers:Gr,scrollAdjustedTranslate:Rr}=U.current;if(!Ut||re.current==null||!Ct||!Rr)return;const{onDragOver:lt}=se.current,Or=Gr.get(wr),$n=Or&&Or.rect.current?{id:Or.id,rect:Or.rect.current,data:Or.data,disabled:Or.disabled}:null,qt={active:Ut,activatorEvent:Ct,collisions:Ht,delta:{x:Rr.x,y:Rr.y},over:$n};Hu(()=>{hn($n),lt?.(qt),E({type:"onDragOver",event:qt})})},[wr]),Wa(()=>{U.current={activatorEvent:J,active:K,activeNode:Ue,collisionRect:Vt,collisions:$t,droppableRects:Me,draggableNodes:F,draggingNode:Ee,draggingNodeRect:Le,droppableContainers:O,over:rr,scrollableAncestors:me,scrollAdjustedTranslate:Dt},q.current={initial:Le,translated:Vt}},[K,Ue,$t,Vt,F,Ee,Le,Me,O,rr,me,Dt]),the({...pt,delta:N,draggingRect:Vt,pointerCoordinates:Pe,scrollableAncestors:me,scrollableAncestorRects:fe});const zt=xt(()=>({active:K,activeNode:Ue,activeNodeRect:At,activatorEvent:J,collisions:$t,containerNodeRect:Hr,dragOverlay:De,draggableNodes:F,droppableContainers:O,droppableRects:Me,over:rr,measureDroppableContainers:Qe,scrollableAncestors:me,scrollableAncestorRects:fe,measuringConfiguration:Ne,measuringScheduled:Je,windowRect:be}),[K,Ue,At,J,$t,Hr,De,F,O,Me,rr,Qe,me,fe,Ne,Je,be]),no=xt(()=>({activatorEvent:J,activators:ma,active:K,activeNodeRect:At,ariaDescribedById:{draggable:ve},dispatch:x,draggableNodes:F,over:rr,measureDroppableContainers:Qe}),[J,ma,K,At,x,ve,F,rr,Qe]);return Pn.createElement(I3.Provider,{value:k},Pn.createElement(Nf.Provider,{value:no},Pn.createElement(She.Provider,{value:zt},Pn.createElement(B3.Provider,{value:ha},c)),Pn.createElement(Rhe,{disabled:s?.restoreFocus===!1})),Pn.createElement(kfe,{...s,hiddenTextDescribedById:ve}));function ga(){const Ut=V?.autoScrollEnabled===!1,Ct=typeof l=="object"?l.enabled===!1:l===!1,Ht=$&&!Ut&&!Ct;return typeof l=="object"?{...l,enabled:Ht}:{enabled:Ht}}}),Dhe=Mt(null),MS="button",$he="Draggable";function H3(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const a=If($he),{activators:o,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=bt(Nf),{role:p=MS,roleDescription:m="draggable",tabIndex:b=0}=i??{},_=l?.id===t,x=bt(_?B3:Dhe),[E,k]=_d(),[w,C]=_d(),$=phe(o,t),A=du(r);Wa(()=>(f.set(t,{id:t,key:a,node:E,activatorNode:w,data:A}),()=>{const N=f.get(t);N&&N.key===a&&f.delete(t)}),[f,t]);const F=xt(()=>({role:p,tabIndex:b,"aria-disabled":n,"aria-pressed":_&&p===MS?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[n,p,b,_,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:F,isDragging:_,listeners:n?void 0:$,node:E,over:h,setNodeRef:k,setActivatorNodeRef:C,transform:x}}const Fhe="Droppable",Ihe={timeout:25};function G3(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const a=If(Fhe),{active:o,dispatch:s,over:l,measureDroppableContainers:c}=bt(Nf),d=Ke({disabled:r}),f=Ke(!1),h=Ke(null),p=Ke(null),{disabled:m,updateMeasurementsFor:b,timeout:_}={...Ihe,...i},x=du(b??n),E=dr(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(x.current)?x.current:[x.current]),p.current=null},_)},[_]),k=Tf({callback:E,disabled:m||!o}),w=dr((F,N)=>{k&&(N&&(k.unobserve(N),f.current=!1),F&&k.observe(F))},[k]),[C,$]=_d(w),A=du(t);return Re(()=>{!k||!C.current||(k.disconnect(),f.current=!1,k.observe(C.current))},[C,k]),Re(()=>(s({type:cr.RegisterDroppable,element:{id:n,key:a,disabled:r,node:C,rect:h,data:A}}),()=>s({type:cr.UnregisterDroppable,key:a,id:n})),[n]),Re(()=>{r!==d.current.disabled&&(s({type:cr.SetDroppableDisabled,id:n,key:a,disabled:r}),d.current.disabled=r)},[n,a,r,s]),{active:o,rect:h,isOver:l?.id===n,node:C,over:l,setNodeRef:$}}function K3(e,t){Q(Fi(e.onPointerDown),r=>r(t))}function W3(e,t){Q(Fi(e.onKeyDown),r=>r(t))}function Q3(e){return B(e==null?void 0:Wt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}function Gt(e){return"var("+e+")"}let The=y([M("flex"),W("stretch"),u("gap",Gt(I.md)),u("overflow-x","auto"),u("padding-bottom",Gt(I.sm))]),q0=y([M("flex"),ce("column"),u("gap",Gt(I.sm)),u("flex","0 0 240px"),u("padding",Gt(I.sm)),u("background",Gt(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Gt(H.md)),u("min-height","120px")]),Nhe=y([u("border-color",Gt(v.brand))]),Phe=y([Na(.45)]),Ohe=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",Gt(I.sm)),u("font-size",Gt(R.sizeSm)),u("font-weight",Gt(R.weightMedium)),u("color",Gt(v.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),LS=y([M("flex"),ce("column"),W("stretch"),u("gap","4px"),u("padding",Gt(I.sm)),u("background",Gt(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Gt(H.sm)),u("text-align","left"),xe("pointer"),We([u("border-color",Gt(v.brand))])]),Mhe=y([xe("grab")]),Lhe=y([Na(.85),u("z-index","10"),xe("grabbing")]),zhe=y([u("font-size",Gt(R.sizeSm)),u("font-weight",Gt(R.weightMedium)),u("color",Gt(v.textPrimary))]),Uhe=y([u("font-size",Gt(R.sizeXs)),u("color",Gt(v.textSecondary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),qhe=y([u("color",Gt(v.textDisabled)),u("font-size",Gt(R.sizeSm))]);function jhe(e){let t=e.onClick,r=e.draggable,n=e.card,i=H3({id:n.key,disabled:!r}),a=r?LS+" "+Mhe:LS,o=i.isDragging?a+" "+Lhe:a,s=Q3(i.transform),l=s!==void 0?{transform:s}:void 0,c=i.listeners,d=c==null?void 0:Wt(c),f=n.meta;return P("div",{children:[g("span",{children:n.title,className:zhe}),f!==void 0?g("span",{children:f,className:Uhe,title:f}):null],ref:Wt(i.setNodeRef),className:o,role:"button",style:l,tabIndex:0,onKeyDown:h=>Q(d,p=>W3(p,h)),onClick:h=>Q(t,p=>p(n.key)),onPointerDown:h=>Q(d,p=>K3(p,h))})}function Bhe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,a=t!==void 0?t:!0,o=G3({id:i.value,disabled:!a}),s=o.isOver,l=a?s?q0+" "+Nhe:q0:q0+" "+Phe;return P("div",{children:[P("div",{children:[g("span",{children:i.label}),g(Fl,{count:i.cards.length,label:""})],className:Ohe}),i.cards.length===0?g("span",{children:"—",className:qhe}):i.cards.map(c=>g(jhe,{card:c,draggable:n,onClick:r},c.key))],ref:Wt(o.setNodeRef),className:l})}function Vhe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,a=He(r),o=Afe(AS(vb,{activationConstraint:{distance:5}}),AS(mb,{})),s=X(()=>{}),l=s[1],c=s[0],d=h=>t!==void 0&&c!==void 0?t(c,h.value):!0,f=h=>{l(_=>{});let p=h.over;if(r===void 0||p==null)return;let m=i.find(_=>_.cards.some(x=>x.key===h.active.id));if(oe(t,!0,_=>_(h.active.id,p.id))&&oe(m,!0,_=>_.value!==p.id))return r(h.active.id,p.id)};return g(V3,{sensors:Wt(o),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:g("div",{children:i.map(h=>g(Bhe,{column:h,draggable:a,onCardClick:n,accepts:d(h)},h.value)),className:The})})}let Hhe=Vhe;function Ye(e){return"var("+e+")"}let Ghe=y([M("flex"),ce("column"),u("gap",Ye(I.sm))]),Khe=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",Ye(I.sm))]),zS=y([M("inlineFlex"),W("center"),u("gap",Ye(I.xs))]),kl=y([u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",Ye(H.sm)),u("padding","2px var("+I.sm+")"),u("color",Ye(v.textSecondary)),u("font-size",Ye(R.sizeSm)),xe("pointer"),We([u("background",Ye(v.surfaceSubtle)),u("color",Ye(v.textPrimary))])]),Whe=cn([kl,y([u("background",Ye(v.surfaceSubtle)),u("color",Ye(v.textPrimary)),u("font-weight",Ye(R.weightMedium))])]),Qhe=y([u("font-size",Ye(R.sizeMd)),u("font-weight",Ye(R.weightMedium)),u("color",Ye(v.textPrimary))]),Yhe=y([M("grid"),u("grid-template-columns","repeat(7, 1fr)"),u("gap","1px")]),Jhe=y([u("font-size",Ye(R.sizeXs)),u("color",Ye(v.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("padding","2px var("+I.xs+")")]),Xhe=y([M("grid"),u("grid-template-columns","repeat(7, 1fr)"),u("gap","1px"),u("background",Ye(v.borderSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Ye(H.md)),u("overflow","hidden")]),Y3=y([M("flex"),ce("column"),u("gap","2px"),u("min-height","96px"),u("padding","4px"),u("background",Ye(v.surface))]),Zhe=cn([Y3,y([u("opacity","0.55")])]),J3=y([u("font-size",Ye(R.sizeXs)),u("color",Ye(v.textSecondary))]),e0e=cn([J3,y([u("color",Ye(v.brand)),u("font-weight",Ye(R.weightMedium))])]);function t0e(e){return y([M("block"),u("width","100%"),u("text-align","left"),u("border","none"),u("border-left","3px solid "+e),u("border-radius",Ye(H.sm)),u("background",Ye(v.surfaceSubtle)),u("color",Ye(v.textPrimary)),u("font-size",Ye(R.sizeXs)),u("padding","1px var("+I.xs+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),xe("pointer"),We([u("background",Ye(v.surfaceElevated))])])}let r0e=y([u("background","none"),u("border","none"),u("padding","0"),u("text-align","left"),u("font-size",Ye(R.sizeXs)),u("color",Ye(v.brand)),xe("pointer"),We([u("text-decoration","underline")])]);function n0e(e){return y([M("grid"),u("grid-template-columns","repeat("+e.toString()+", 1fr)"),u("gap","1px"),u("background",Ye(v.borderSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Ye(H.md)),u("overflow","hidden")])}let i0e=y([M("flex"),ce("column"),u("gap","2px"),u("min-height","200px"),u("padding","4px"),u("background",Ye(v.surface))]),a0e=y([u("font-size",Ye(R.sizeXs)),u("color",Ye(v.textSecondary)),u("padding-bottom","2px"),u("border-bottom","1px solid var("+v.borderSubtle+")")]),o0e=y([M("flex"),li("wrap"),W("center"),u("gap",Ye(I.md)),u("font-size",Ye(R.sizeXs)),u("color",Ye(v.textSecondary))]);function s0e(e){return y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e),u("margin-right","4px")])}let l0e=y([u("font-size",Ye(R.sizeXs)),u("color",Ye(v.textDisabled))]),u0e="var("+v.brand+")";function c0e(e){return D(e.end_,e.start)}function US(e,t){return e.filter(r=>vk(r.start,c0e(r),t)).toSorted((r,n)=>r.start-n.start)}function d0e(e,t){return _k(e.start)||!gk(e.start,t)?e.title:bk(e.start)+" "+e.title}function f0e(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,a=n!==void 0?n:[],o=X(()=>"Month"),s=o[1],l=o[0],c=X(()=>qn(D(t,Date.now()))),d=c[1],f=c[0],h=qn(Date.now()),p=w=>d(C=>{switch(l){case"Month":return LG(C,w);case"Week":return Oa(C,w*7|0);case"Day":return Oa(C,w)}}),m=(w,C)=>g("button",{children:d0e(w,C),className:t0e(D(w.accent,u0e)),title:w.title,onClick:$=>w.onOpen()},w.key),b=()=>{let w=UG(f);return P(jr,{children:[g("div",{children:lv.map(C=>g("div",{children:C,className:Jhe},C)),className:Yhe}),g("div",{children:w.map(C=>{let $=US(i,C),A=$.slice(0,3),F=$.length-A.length|0;return P("div",{children:[g("span",{children:BG(C).toString(),className:C===h?e0e:J3}),A.map(N=>m(N,C)),F>0?g("button",{children:"+"+F.toString()+" more",className:r0e,onClick:N=>{d(O=>C),s(O=>"Day")}}):null],className:qG(C,f)?Y3:Zhe},C.toString())}),className:Xhe})]})},_=w=>g("div",{children:w.map(C=>P("div",{children:[g("div",{children:Ps(C),className:a0e}),US(i,C).map($=>m($,C))],className:i0e},C.toString())),className:n0e(w.length)}),x;switch(l){case"Month":x=b();break;case"Week":x=_(Ma(7,w=>Oa(sv(f),w)));break;case"Day":x=_([qn(f)]);break}let E;switch(l){case"Month":case"Week":E=Ro(f);break;case"Day":E=Ps(f)+" — "+Ro(f);break}let k=(w,C)=>g("button",{children:C,className:l===w?Whe:kl,onClick:$=>s(A=>w)});return P("div",{children:[P("div",{children:[P("div",{children:[g("button",{children:"‹",className:kl,onClick:w=>p(-1)}),g("button",{children:"Today",className:kl,onClick:w=>d(C=>h)}),g("button",{children:"›",className:kl,onClick:w=>p(1)}),g("span",{children:E,className:Qhe})],className:zS}),P("div",{children:[k("Month","Month"),k("Week","Week"),k("Day","Day")],className:zS})],className:Khe}),a.length!==0?g("div",{children:a.map(w=>P("span",{children:[g("span",{className:s0e(w.accent)}),w.label]},w.label)),className:o0e}):null,x,r!==void 0?g("span",{children:r,className:l0e}):null],className:Ghe})}let h0e=f0e;function vr(e){return"var("+e+")"}let p0e=y([M("grid"),u("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),u("gap",vr(I.md))]),m0e=y([M("flex"),ce("column"),W("stretch"),u("gap",vr(I.sm)),u("padding",vr(I.md)),u("background",vr(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",vr(H.md)),u("text-align","left"),xe("pointer"),We([u("border-color",vr(v.brand)),u("background",vr(v.surfaceSubtle))])]),g0e=y([u("width","100%"),u("height","96px"),u("object-fit","cover"),u("border-radius",vr(H.sm))]),v0e=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",vr(I.sm))]),b0e=y([u("font-size",vr(R.sizeMd)),u("font-weight",vr(R.weightMedium)),u("color",vr(v.textPrimary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),_0e=y([M("flex"),W("baseline"),u("gap",vr(I.sm)),u("font-size",vr(R.sizeSm))]),y0e=y([u("color",vr(v.textSecondary)),u("white-space","nowrap"),An(0)]),x0e=y([u("color",vr(v.textPrimary)),u("min-width","0"),u("overflow","hidden"),u("text-overflow","ellipsis")]),S0e=y([u("color",vr(v.textDisabled)),u("font-size",vr(R.sizeSm))]);function E0e(e){let t=e.cards;if(t.length===0)return g("span",{children:"(empty)",className:S0e});let r=e.onCardClick;return g("div",{children:t.map(n=>{let i=n.media;return P("button",{children:[i!==void 0?g("img",{className:g0e,alt:n.title,src:i}):null,P("div",{children:[g("span",{children:n.title,className:b0e,title:n.title}),D(n.badge,null)],className:v0e}),n.fields.map(a=>P("div",{children:[g("span",{children:a.label,className:y0e}),g("span",{children:a.value,className:x0e})],className:_0e},a.label))],className:m0e,onClick:a=>Q(r,o=>o(n.key))},n.key)}),className:p0e})}let w0e=E0e;function Xo(e){return e.rows.map((t,r)=>{let n=D(j(t),{});return{key:D(S(T(n,"id"),ne),"#"+r.toString()),json:t,dict:n}})}function Po(e,t){return S(T(e,t),ne)}function qu(e,t){return D(S(e.semantics.labelField,r=>Po(t.dict,r)),t.key)}function X3(e,t,r){Q(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function R0e(e){let t=e.source,r=zo(),n=$d(),i=Xo(t),a=Mn(t.schema,"List"),o=Wd(i.map(p=>p.dict),a,r),c={lookupLabel:(p,m)=>Gd(o,p,r,m),isMissing:(p,m)=>Kd(o,p,r,m)},d=ee([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField,"id"],p=>p),f=a.filter(p=>!d.includes(p.key)).slice(0,4),h=i.map(p=>{let m=B(S(t.semantics.statusField,_=>di(p.dict,_)),_=>g(La,{variant:"Neutral",label:ct(_),dot:!1})),b=S(t.semantics.imageField,_=>Po(p.dict,_));return{key:p.key,title:qu(t,p),media:b,badge:m,fields:f.map(_=>({label:_.label,value:xo(_.key,_.kind,_.propSchema,T(p.dict,_.key),_.ann,r,n,c,void 0)}))}});return g(w0e,{cards:h,onCardClick:p=>X3(t,i,p)})}function k0e(e){let t=Xo(e),r=D(e.semantics.statusField,""),n=ui(e.schema,r),i=s=>D(di(s.dict,r),""),a=s=>s.map(l=>({value:l,label:l===""?"(no status)":ct(l),cards:t.filter(c=>i(c)===l).map(c=>{let d=ee(_m(e.schema),f=>{if(f!==r)return Po(c.dict,f)})[0];return{key:c.key,title:qu(e,c),meta:d}})})),o=rt(t.map(i).filter(s=>!n.includes(s)),[],(s,l)=>s.includes(l)?s:s.concat([l]));return a(n).concat(a(o))}function A0e(e){let t=e.source,r=Xo(t),n=D(t.semantics.statusField,""),i=k0e(t),a=f=>D(S(r.find(h=>h.key===f),h=>di(h.dict,n)),""),o=(f,h)=>S(t.statusCommandFor,p=>p(a(f),h)),s=t.onCommand,l=s!==void 0&&He(t.statusCommandFor)?(f,h)=>Q(o(f,h),p=>s(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>He(o(f,h)):void 0;return g(Hhe,{columns:i,onCardClick:f=>X3(t,r,f),onMove:l,canDrop:d})}let zs=["var("+v.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function Z3(e,t){return D(e.accent,zs[Ii(t,zs.length)])}function C0e(e){return e.map((t,r)=>{let n=Z3(t,r),i=t.semantics.dateSpan;return i!==void 0?ee(Xo(t),a=>B(S(Po(a.dict,i.startField),Ni),o=>{let s=S(S(i.endField,l=>Po(a.dict,l)),Ni);return{key:r.toString()+":"+a.key,title:qu(t,a),start:o,end_:s,accent:n,onOpen:()=>t.onOpenRow(a.key,a.json)}})):[]}).flat()}function D0e(e){let t=e.sources,r=C0e(t),n=t.length>1?t.map((a,o)=>({label:a.readModelName,accent:Z3(a,o)})):[],i=rt(t,0,(a,o)=>a+o.rows.length|0);return g(h0e,{events:r,legend:n,windowNote:"Showing the "+i.toString()+" loaded item(s)"})}function $0e(e){return e.map((r,n)=>{let i=B(r.semantics.dateSpan,a=>a.startField);return Xo(r).map(a=>{let o=S(i,d=>Po(a.dict,d)),s=S(o,Ni),l=o!==void 0?D(ME(o),o):"",c=B(S(r.semantics.statusField,d=>di(a.dict,d)),ct);return{entry:{id:n.toString()+":"+a.key,timestamp:l,label:qu(r,a),detail:c,variant:void 0},sort:s,open_:()=>r.onOpenRow(a.key,a.json)}})}).flat().toSorted((r,n)=>{let i=r.sort,a=n.sort;return i!==void 0?a!==void 0?a-i:-1:a!==void 0?1:0})}function F0e(e){let t=e.sources,r=$0e(t),n=a=>Q(r.find(o=>o.entry.id===a),o=>o.open_()),i=rt(t,0,(a,o)=>a+o.rows.length|0);return P("div",{children:[g(Kde,{entries:r.map(a=>a.entry),onSelect:n}),g("span",{children:"Showing the "+i.toString()+" loaded item(s)",style:{color:"var("+v.textDisabled+")",fontSize:"var("+R.sizeXs+")"}})],style:{display:"flex",flexDirection:"column",gap:"var("+I.sm+")"}})}function I0e(e){return ee(dn(e),t=>{let r=_u(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function eD(e){let t=I0e(e),r=Tr(e,void 0).statusField,n=r!==void 0&&t.some(o=>o[0]===r)?t.filter(o=>o[0]===r).concat(t.filter(o=>o[0]!==r)):t,i=n[0],a=n[1];if(i!==void 0&&a!==void 0)return[i,a]}function T0e(e){return B(eD(e.schema),t=>{let r=t[1],n=r[1],i=r[0],a=t[0],o=a[1],s=a[0],l=Xo(e),c=(x,E)=>D(di(x.dict,E),""),d=(x,E)=>rt(l.map(k=>c(k,x)).filter(k=>!E.includes(k)),[],(k,w)=>k.includes(w)?k:k.concat([w])),f=o.concat(d(s,o)),h=n.concat(d(i,n)),p=f.map(x=>h.map(E=>rt(l,0,(k,w)=>c(w,s)===x&&c(w,i)===E?k+1|0:k))),m=p.map(x=>rt(x,0,(E,k)=>E+k|0)),b=h.map((x,E)=>rt(p,0,(k,w)=>k+w[E]|0)),_=rt(m,0,(x,E)=>x+E|0);return{rowField:s,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:m,colTotals:b,grandTotal:_}})}function N0e(e){let t=X(()=>"Numbers"),r=t[1],n=t[0],i=T0e(e.source);if(i===void 0)return null;let a=p=>p===""?"(none)":ct(p),o=ct(i.rowField),s=ct(i.colField),l=i.rowValues.map(p=>[p,a(p)]),c=i.colValues.map(p=>[p,a(p)]),d=rt(i.counts,0,(p,m)=>rt(m,p,(b,_)=>_>b?_:b)),f=(p,m)=>g("button",{children:m,style:{background:"none",backgroundColor:n===p?"var("+v.surfaceSubtle+")":"transparent",border:"1px solid var("+v.border+")",color:n===p?"var("+v.textPrimary+")":"var("+v.textSecondary+")",cursor:"pointer",fontSize:"var("+R.sizeSm+")",padding:"2px var("+I.sm+")",borderRadius:"var("+H.sm+")"},type:"button",onClick:b=>r(_=>p)}),h;return h=n==="Numbers"?g(rfe,{rowDimLabel:o,colDimLabel:s,rowHeaders:l.map(p=>({value:p[0],label:p[1]})),colHeaders:c.map(p=>({value:p[0],label:p[1]})),cells:i.counts.map(p=>p.map(m=>({display:m.toString(),empty:m===0}))),rowTotals:i.rowTotals.map(p=>p.toString()),colTotals:i.colTotals.map(p=>p.toString()),grandTotal:i.grandTotal.toString()}):g(Mde,{rowDimLabel:o,colDimLabel:s,rowHeaders:l.map(p=>({value:p[0],label:p[1]})),colHeaders:c.map(p=>({value:p[0],label:p[1]})),cells:i.counts.map(p=>p.map(m=>({value:m,display:m.toString()}))),maxLabel:d.toString()}),P("div",{children:[P("div",{children:[f("Numbers","Numbers"),f("Heat","Heat")],style:{display:"inline-flex",alignSelf:"flex-end",gap:"var("+I.xs+")"}}),h],style:{display:"flex",flexDirection:"column",gap:"var("+I.sm+")"}})}function P0e(e){return e.map((t,r)=>{let n=t.semantics.imageField;return Xo(t).map(i=>{let a=S(S(n,s=>Po(i.dict,s)),s=>{if(s!=="")return Cs(s)}),o=B(S(t.semantics.statusField,s=>di(i.dict,s)),ct);return{item:{key:r.toString()+":"+i.key,src:a,title:qu(t,i),caption:o},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function O0e(e){let t=e.sources,r=P0e(t),n=a=>Q(r.find(o=>o.item.key===a),o=>o.open_()),i=rt(t,0,(a,o)=>a+o.rows.length|0);return P("div",{children:[g(hfe,{items:r.map(a=>a.item),onOpen:n}),g("span",{children:"Showing the "+i.toString()+" loaded item(s)",style:{color:"var("+v.textDisabled+")",fontSize:"var("+R.sizeXs+")"}})],style:{display:"flex",flexDirection:"column",gap:"var("+I.sm+")"}})}function rl(e){return g("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function bb(e,t){let r=e[0];return r!==void 0?t(r):null}Xa({id:"cards",label:"Cards",icon:rl("▤"),arity:"Single",isCapable:e=>!0,render:e=>bb(e,t=>g(R0e,{source:t})),capability:"always — richer with label/image semantics and summary fields"});Xa({id:"board",label:"Board",icon:rl("▥"),arity:"Single",isCapable:e=>{let t=Tr(e,void 0);return oe(t.statusField,!1,r=>ui(e,r).length!==0)},render:e=>bb(e,t=>g(A0e,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});Xa({id:"calendar",label:"Calendar",icon:rl("▣"),arity:{TAG:"Multi",min:1},isCapable:e=>He(Tr(e,void 0).dateSpan),render:e=>g(D0e,{sources:e}),capability:"dateSpan — a start*/end* date-time pair or a lone non-infrastructure date field"});Xa({id:"timeline",label:"Timeline",icon:rl("▚"),arity:"Single",isCapable:e=>He(Tr(e,void 0).dateSpan),render:e=>g(F0e,{sources:e}),capability:"dateSpan — a date field to place rows on a most-recent-first chronological stream"});Xa({id:"pivot",label:"Pivot",icon:rl("⊞"),arity:"Single",isCapable:e=>He(eD(e)),render:e=>bb(e,t=>g(N0e,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});Xa({id:"gallery",label:"Gallery",icon:rl("▨"),arity:"Single",isCapable:e=>He(Tr(e,void 0).imageField),render:e=>g(O0e,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function qS(e,t){return e===t?0:e<t?-1:1}function M0e(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 Al(e,t){if(t===void 0)return"";let r=Be(t),n=0;if(typeof r!="object"){if(r==="JSONNull")return"";n=2}else switch(r.TAG){case"JSONString":return r._0;case"JSONNumber":return r._0.toString();case"JSONObject":return JSON.stringify(t);default:n=2}if(n===2&&typeof e!="object")switch(e){case"KBoolean":return typeof r!="object"?r==="JSONFalse"?"No":"Yes":JSON.stringify(t);case"KArrayOfStrings":if(typeof r=="object")return ee(r._0,ne).join(", ");break}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function L0e(e,t,r){let n=o=>o!==void 0?Be(o)==="JSONNull":!0,i=n(t),a=n(r);if(i)return a?0:1;if(a)return-1;if(typeof e!="object")switch(e){case"KBoolean":let o=c=>{if(c===void 0)return 0;let d=Be(c);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return o(t)-o(r);case"KDate":return qS(Al(e,t),Al(e,r));case"KNumber":let s=D(S(t,Ti),0),l=D(S(r,Ti),0);return s-l}return qS(Al(e,t),Al(e,r))}function z0e(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?oe(S(t,ne),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=B(t,Be);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 U0e(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>Al(i.kind,T(e,i.key)).toLowerCase().includes(n))}function q0e(e,t,r){let n=ze(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(a=>{let o=a[0],s=t.find(l=>l.key===o);return s!==void 0?z0e(s.kind,T(i,o),a[1]):!0}))}function j0e(e,t,r){return r===""?e:e.filter(n=>U0e(n,t,r))}function B0e(e,t,r,n){if(r===void 0)return e;let i=t.find(o=>o.key===r);if(i===void 0)return e;let a=n==="Asc"?1:-1;return e.toSorted((o,s)=>L0e(i.kind,T(o,r),T(s,r))*a)}function V0e(e,t){return ee(e,r=>{if(!ZM(r.kind))return;let n=M0e(r.kind);if(n===void 0)return;let i=n.map(a=>({label:a[1],value:a[0]}));return{key:r.key,label:r.label,options:i,value:D(T(t,r.key),"")}})}function ti(e){return"var("+e+")"}let H0e=y([Qt("relative"),M("inlineFlex"),W("center")]),G0e=y([u("background",ti(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",ti(H.md)),u("padding","var("+I.xs+") var("+I.md+")"),u("padding-left","32px"),u("font-size",ti(R.sizeMd)),u("color",ti(v.textPrimary)),u("outline","none"),u("width","240px"),Ja([u("border-color",ti(v.brand))]),I6([u("color",ti(v.textDisabled))])]),K0e=y([Qt("absolute"),Bs(pe(10)),u("color",ti(v.textDisabled)),u("font-size",ti(R.sizeSm)),u("pointer-events","none")]),W0e=y([Qt("absolute"),Ya(pe(8)),u("background","none"),u("border","none"),u("cursor","pointer"),u("color",ti(v.textDisabled)),u("font-size",ti(R.sizeSm)),u("padding","0"),u("line-height","1"),We([u("color",ti(v.textSecondary))])]);function Q0e(e){let t=e.placeholder,r=e.onChange,n=e.value,i=t!==void 0?t:"Search...";return P("div",{children:[g("span",{children:"/",className:K0e}),g("input",{className:G0e,placeholder:i,type:"text",value:n,onChange:a=>r(a.target.value)}),n!==""?g("button",{children:"x",className:W0e,onClick:a=>r("")}):null],className:H0e})}let tD=Q0e;function Ra(e){return"var("+e+")"}let Y0e=y([M("flex"),W("center"),u("gap",Ra(I.sm)),li("wrap")]),J0e=y([M("flex"),W("center"),u("gap","4px")]),X0e=y([u("color",Ra(v.textSecondary)),u("font-size",Ra(R.sizeSm)),u("white-space","nowrap")]),Z0e=y([u("background",Ra(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Ra(H.sm)),u("padding","2px var("+I.sm+")"),u("font-size",Ra(R.sizeSm)),u("color",Ra(v.textPrimary)),u("cursor","pointer"),u("outline","none"),Ja([u("border-color",Ra(v.brand))])]);function epe(e){let t=e.onChange,r=e.filter;return P("div",{children:[g("span",{children:r.label+":",className:X0e}),P("select",{children:[g("option",{children:"All",value:""}),r.options.map(n=>g("option",{children:n.label,value:n.value},n.value))],className:Z0e,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:J0e})}function tpe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return P("div",{children:[r!==void 0&&t!==void 0?g(tD,{value:r,onChange:t}):null,e.filters.map(i=>g(epe,{filter:i,onChange:n},i.key))],className:Y0e})}let rD=tpe;function jS(e){try{return decodeURIComponent(e)}catch{return e}}function rpe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function BS(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[jS(r),jS(n)]}function _n(e){return"var("+e+")"}let npe=y([M("flex"),ce("column"),W("center"),Ve("center"),u("gap",_n(I.md)),si(1),u("min-height","160px"),na("center"),u("padding",_n(I.lg))]),ipe=y([u("font-size","32px"),u("color",_n(v.error)),u("line-height","1")]),ape=y([u("color",_n(v.textPrimary)),u("font-size",_n(R.sizeLg)),u("font-weight",_n(R.weightMedium)),Er(pe(0))]),ope=y([u("color",_n(v.textSecondary)),u("font-size",_n(R.sizeSm)),u("line-height",_n(R.lineHeightNormal)),Er(pe(0))]),spe=y([u("background",_n(v.brand)),u("color",_n(v.textOnBrand)),u("border","none"),u("border-radius",_n(H.md)),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",_n(R.sizeSm)),u("cursor","pointer"),Pi(pe(4))]);function lpe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return P("div",{children:[g("div",{children:"X",className:ipe}),g("h3",{children:r,className:ape}),oe(e.detail,null,n=>g("p",{children:n,className:ope})),oe(e.onRetry,null,n=>g("button",{children:"Try again",className:spe,onClick:i=>n()}))],className:npe})}let ka=lpe;function Ln(e){return"var("+e+")"}let upe=y([Qt("relative"),M("inlineBlock")]),cpe=y([u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",Ln(H.sm)),u("cursor","pointer"),u("color",Ln(v.textSecondary)),u("padding","2px var("+I.sm+")"),u("font-size",Ln(R.sizeSm)),We([u("background",Ln(v.surfaceSubtle)),u("color",Ln(v.textPrimary))])]),dpe=y([Qt("absolute"),Ya(pe(0)),ia({NAME:"percent",VAL:100}),Pi(pe(4)),u("background",Ln(v.surfaceElevated)),u("border","1px solid var("+v.border+")"),u("border-radius",Ln(H.md)),u("box-shadow",Ln(Sr.md)),u("min-width","160px"),u("z-index","200"),u("overflow","hidden"),$6(pe(4),pe(0))]);function fpe(e){return y([M("block"),aa({NAME:"percent",VAL:100}),u("background","none"),u("border","none"),u("text-align","left"),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",Ln(R.sizeMd)),u("color",Ln(e?v.error:v.textPrimary)),xe("pointer"),We([u("background",Ln(v.surfaceSubtle))])])}let hpe=y([u("border","none"),u("border-top","1px solid var("+v.borderSubtle+")"),R6(pe(4),pe(0))]);function ppe(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=X(()=>!1),i=n[1],a=n[0];return Re(()=>{if(!a)return;let o=s=>i(l=>!1);return document.addEventListener("click",o),()=>{document.removeEventListener("click",o)}},[a]),P("div",{children:[g("button",{children:r,className:cpe,onClick:o=>{o.stopPropagation(),i(s=>!s)}}),a?g("div",{children:e.items.map((o,s)=>{if(typeof o!="object")return g("hr",{className:hpe},s.toString());let l=o.onClick,c=o.label;return g("button",{children:c,className:fpe(o.danger),onClick:d=>{i(f=>!1),l()}},c)}),className:dpe,onClick:o=>{o.stopPropagation()}}):null],className:upe})}let mpe=ppe;function Gp(e){return"var("+e+")"}let gpe=y([M("grid"),u("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),u("gap",Gp(I.lg)),u("align-items","start"),FE("(max-width: 720px)",[u("grid-template-columns","minmax(0, 1fr)")])]),nD=y([u("min-width","0"),u("overflow","auto")]),vpe=cn([nD,y([u("border-left","1px solid var("+v.border+")"),u("padding-left",Gp(I.lg)),FE("(max-width: 720px)",[u("border-left","none"),u("padding-left","0"),u("border-top","1px solid var("+v.border+")"),u("padding-top",Gp(I.lg))])])]);function bpe(e){return P("div",{children:[g("div",{children:e.master,className:nD}),g("div",{children:e.detail,className:vpe})],className:gpe})}let _pe=bpe;function hu(e){return"var("+e+")"}let ype=y([M("flex"),ce("column"),W("center"),Ve("center"),u("gap",hu(I.md)),si(1),u("min-height","160px"),u("color",hu(v.textSecondary))]),xpe=y([u("width","32px"),u("height","32px"),u("border","3px solid var("+v.borderSubtle+")"),u("border-top-color",hu(v.brand)),u("border-radius","50%"),u("animation","rv-spin 0.7s linear infinite")]),Spe=y([u("font-size",hu(R.sizeSm)),u("color",hu(v.textSecondary))]);M6("@keyframes rv-spin",[jt("from",[u("transform","rotate(0deg)")]),jt("to",[u("transform","rotate(360deg)")])]);function Epe(e){return P("div",{children:[g("div",{className:xpe}),oe(e.label,null,t=>g("span",{children:t,className:Spe}))],className:ype})}let ql=Epe;function wpe(e,t){return D(S(T(e,t),ne),"")}function Rpe(e,t,r){let n={},i=[];e.forEach(o=>{let s=wpe(o,t),l=T(n,s);l!==void 0?l.push(o):(n[s]=[o],i.push(s))});let a=o=>{if(o==="")return r.length+1|0;let s=r.indexOf(o);return s!==-1?s:r.length};return i.toSorted((o,s)=>{let l=a(o),c=a(s);return l!==c?l-c|0:o<s?-1:o>s?1:0}).map(o=>[o,D(T(n,o),[])])}function dt(e){return"var("+e+")"}let iD="168px",kpe=y([M("flex"),ce("column"),u("gap",dt(I.sm))]),Ape=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",dt(I.sm))]),VS=y([M("inlineFlex"),W("center"),u("gap",dt(I.xs))]),Cl=y([u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",dt(H.sm)),u("padding","2px var("+I.sm+")"),u("color",dt(v.textSecondary)),u("font-size",dt(R.sizeSm)),xe("pointer"),We([u("background",dt(v.surfaceSubtle)),u("color",dt(v.textPrimary))])]),Cpe=cn([Cl,y([u("background",dt(v.surfaceSubtle)),u("color",dt(v.textPrimary)),u("font-weight",dt(R.weightMedium))])]),Dpe=y([u("font-size",dt(R.sizeMd)),u("font-weight",dt(R.weightMedium)),u("color",dt(v.textPrimary))]),$pe=y([u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",dt(H.md)),u("overflow","hidden")]),aD=y([M("flex"),W("stretch")]),Fpe=cn([aD,y([u("background",dt(v.surfaceSubtle)),u("border-bottom","1px solid var("+v.borderSubtle+")")])]),Ipe=cn([aD,y([u("border-top","1px solid var("+v.borderSubtle+")")])]),Tpe=y([u("flex","0 0 "+iD),u("padding","4px var("+I.sm+")"),u("font-size",dt(R.sizeXs)),u("color",dt(v.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),oD=y([u("flex","0 0 "+iD),u("padding","6px var("+I.sm+")"),u("font-size",dt(R.sizeSm)),u("font-weight",dt(R.weightMedium)),u("color",dt(v.textPrimary)),u("border-right","1px solid var("+v.borderSubtle+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),Npe=cn([oD,y([u("color",dt(v.textDisabled)),u("font-style","italic")])]);function Kp(e){return y([M("grid"),u("flex","1 1 auto"),u("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let Ppe=y([u("background",dt(v.surfaceSubtle))]),Ope=y([u("padding","4px var("+I.xs+")"),u("font-size",dt(R.sizeXs)),u("color",dt(v.textSecondary)),u("border-left","1px solid var("+v.borderSubtle+")")]),sD=y([M("flex"),ce("column"),u("gap","2px"),u("min-height","48px"),u("padding","3px"),u("border-left","1px solid var("+v.borderSubtle+")")]),Mpe=cn([sD,y([u("background",dt(v.surfaceSubtle))])]);function HS(e){return y([M("block"),u("width","100%"),u("text-align","left"),u("border","none"),u("border-left","3px solid "+e),u("border-radius",dt(H.sm)),u("background",dt(v.surfaceSubtle)),u("color",dt(v.textPrimary)),u("font-size",dt(R.sizeXs)),u("padding","1px var("+I.xs+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),xe("pointer"),We([u("background",dt(v.surfaceElevated))])])}let Lpe=y([xe("grab")]),zpe=y([Na(.85),u("z-index","10"),xe("grabbing")]),Upe=y([u("font-size",dt(R.sizeXs)),u("color",dt(v.textDisabled))]),GS="var("+v.brand+")";function qpe(e){return D(e.end_,e.start)}function jpe(e,t){return e.filter(r=>vk(r.start,qpe(r),t)).toSorted((r,n)=>r.start-n.start)}function Bpe(e,t){return _k(e.start)||!gk(e.start,t)?e.title:bk(e.start)+" "+e.title}function Vpe(e){let t=e.draggable,r=e.event,n=H3({id:r.key,disabled:!t}),i=t?HS(D(r.accent,GS))+" "+Lpe:HS(D(r.accent,GS)),a=n.isDragging?i+" "+zpe:i,o=B(Q3(n.transform),c=>({transform:c})),s=n.listeners,l=s==null?void 0:Wt(s);return g("button",{children:Bpe(r,e.day),ref:Wt(n.setNodeRef),className:a,style:o,title:r.title,onKeyDown:c=>Q(l,d=>W3(d,c)),onClick:c=>r.onOpen(),onPointerDown:c=>Q(l,d=>K3(d,c))})}function Hpe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,a=i.unassigned?"":i.resourceId,o=G3({id:a}),s=!i.unassigned&&o.isOver?Kp(n.length)+" "+Ppe:Kp(n.length);return P("div",{children:[g("div",{children:i.label,className:i.unassigned?Npe:oD}),g("div",{children:n.map(l=>g("div",{children:jpe(i.events,l).map(c=>g(Vpe,{event:c,day:l,draggable:t},c.key)),className:l===r?Mpe:sD},l.toString())),ref:Wt(o.setNodeRef),className:s})],className:Ipe})}function Gpe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,a=X(()=>"Week"),o=a[1],s=a[0],l=X(()=>qn(D(r,Date.now()))),c=l[1],d=l[0],f=qn(Date.now()),h=He(t),p;p=s==="Week"?Ma(7,E=>Oa(sv(d),E)):[qn(d)];let m=E=>c(k=>s==="Week"?Oa(k,E*7|0):Oa(k,E)),b=E=>{let k=E.over;if(t===void 0||k==null||k.id==="")return;let w=i.find(C=>C.events.some($=>$.key===E.active.id));if(oe(w,!0,C=>C.resourceId!==k.id))return t(E.active.id,k.id)},_=(E,k)=>g("button",{children:k,className:s===E?Cpe:Cl,onClick:w=>o(C=>E)}),x;return x=s==="Week"?Ro(d):Ps(d)+" — "+Ro(d),P("div",{children:[P("div",{children:[P("div",{children:[g("button",{children:"‹",className:Cl,onClick:E=>m(-1)}),g("button",{children:"Today",className:Cl,onClick:E=>c(k=>f)}),g("button",{children:"›",className:Cl,onClick:E=>m(1)}),g("span",{children:x,className:Dpe})],className:VS}),P("div",{children:[_("Week","Week"),_("Day","Day")],className:VS})],className:Ape}),g(V3,{onDragEnd:b,children:P("div",{children:[P("div",{children:[g("div",{children:"Resource",className:Tpe}),g("div",{children:p.map(E=>g("div",{children:Ps(E),className:Ope},E.toString())),className:Kp(p.length)})],className:Fpe}),i.map(E=>g(Hpe,{lane:E,days:p,today:f,draggable:h},E.unassigned?"\0unassigned":E.resourceId))],className:$pe})}),n!==void 0?g("span",{children:n,className:Upe}):null],className:kpe})}let Kpe=Gpe;function lD(e,t){let r=S(S(S(j(e),a=>T(a,"properties")),j),a=>T(a,t));if(r===void 0)return;let n=S(S(j(r),a=>T(a,"const")),ne);if(n!==void 0)return n;let i=_u(r);if(i!==void 0&&i.length===1)return i[0]}function uD(e){return e.filter(t=>t.level==="Instance")}function Wpe(e,t,r){return t!==void 0&&ui(e,t).length!==0?uD(r).some(n=>{let i=n.allowedStates;return i!==void 0?i.length!==0:!1}):!1}function Qpe(e,t,r){let n=uD(r),i=ui(e,t),a=l=>({commandName:l.name,label:l.label,toState:lD(l.schema,t)}),o=i.map(l=>{let c=ee(n,d=>{let f=d.allowedStates;if(f!==void 0&&f.includes(l))return a(d)});return{value:l,label:ct(l),terminal:c.length===0,outgoing:c}}),s=n.filter(l=>jn(l.allowedStates)).map(a);return{statusField:t,states:o,anyState:s}}function Rt(e){return"var("+e+")"}let Ype=y([M("flex"),ce("column"),u("gap",Rt(I.md))]),Jpe=y([u("font-size",Rt(R.sizeLg)),u("font-weight",Rt(R.weightMedium)),u("color",Rt(v.textPrimary)),Er(pe(0))]),Xpe=y([u("font-size",Rt(R.sizeXs)),u("color",Rt(v.textDisabled))]),Zpe=y([M("flex"),u("flex-wrap","wrap"),W("flexStart"),u("gap",Rt(I.md))]),eme=y([M("flex"),ce("column"),u("gap",Rt(I.sm)),u("flex","0 1 240px"),u("padding",Rt(I.md)),u("background",Rt(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Rt(H.md))]),tme=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",Rt(I.sm))]),rme=y([u("font-size",Rt(R.sizeXs)),u("color",Rt(v.textDisabled)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),nme=y([M("flex"),ce("column"),u("gap","4px")]),ime=y([M("inlineFlex"),W("center"),u("gap","4px"),u("align-self","flex-start"),u("padding","2px var("+I.sm+")"),u("background",Rt(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Rt(H.sm)),u("font-size",Rt(R.sizeSm)),u("color",Rt(v.textPrimary))]),ame=y([u("color",Rt(v.textSecondary))]),ome=y([u("font-size",Rt(R.sizeXs)),u("color",Rt(v.textDisabled))]),sme=y([M("flex"),ce("column"),u("gap",Rt(I.sm)),u("padding-top",Rt(I.sm))]),lme=y([u("font-size",Rt(R.sizeXs)),u("font-weight",Rt(R.weightMedium)),u("color",Rt(v.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),ume=y([M("flex"),u("flex-wrap","wrap"),u("gap","6px")]);function KS(e){let t=e.toState;return P("span",{children:[e.label,t!==void 0?g("span",{children:" → "+ct(t),className:ame}):null],className:ime},e.commandName)}function cme(e){let t=e.title,r=e.statusField,n=Qpe(e.schema,r,e.commands);return P("div",{children:[t!==void 0?g("h3",{children:t,className:Jpe}):null,g("div",{children:"Lifecycle on “"+ct(r)+"”",className:Xpe}),g("div",{children:n.states.map(i=>P("div",{children:[P("div",{children:[g(La,{variant:"Neutral",label:i.label,dot:!0}),i.terminal?g("span",{children:"end",className:rme}):null],className:tme}),i.terminal?g("span",{children:"No commands available",className:ome}):g("div",{children:i.outgoing.map(KS),className:nme})],className:eme},i.value)),className:Zpe}),n.anyState.length!==0?P("div",{children:[g("span",{children:"Any state",className:lme}),g("div",{children:n.anyState.map(KS),className:ume})],className:sme}):null],className:Ype})}let dme=cme;function fme(e){switch(e){case"Hints":return"hints";case"DeclaredTarget":return"declared-target";case"SchemaTarget":return"schema-target";case"StemMatch":return"stem-match";case"Setter":return"setter"}}function hme(e,t){return e+"→"+t}function _b(e){return D(B(S(S(j(e),t=>T(t,"properties")),j),t=>Object.keys(t)),[])}function cD(e){return ee(D(S(S(j(e),t=>T(t,"required")),St),[]),ne)}function j0(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9]+/g," ").toLowerCase().split(" ").filter(t=>t.length>=3)}function pme(e,t,r){let n=j0(e).concat(j0(t)),i=j0(r);return n.some(a=>i.some(o=>o.startsWith(a)?!0:a.startsWith(o)))}function mme(e){return e.filter(t=>t.level==="Instance")}function B0(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function gme(e,t,r){return _b(e.schema).includes(t)?it([[t,r]]):{}}function vme(e,t){let r=e.filter(n=>_b(n.schema).includes(t)?cD(n.schema).every(i=>i===t||i==="id"?!0:tt(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function V0(e){if(e.length===1)return e[0]}function dD(e,t,r){let n=mme(t),i=vme(n,e);return(a,o)=>{let s=(h,p)=>{if(B0(h,a))return{command:h.name,patch:gme(h,e,o),tier:p}},l=S(S(S(r,h=>h[o]),h=>n.find(p=>p.name===h)),h=>s(h,"Hints"));if(l!==void 0)return l;let c=S(V0(n.filter(h=>B0(h,a)?tt(h.targetState,o):!1)),h=>s(h,"DeclaredTarget"));if(c!==void 0)return c;let d=S(V0(n.filter(h=>B0(h,a)?tt(lD(h.schema,e),o):!1)),h=>s(h,"SchemaTarget"));if(d!==void 0)return d;let f=S(V0(n.filter(h=>{let p=h.allowedStates;return p!==void 0&&p.includes(a)?pme(h.name,h.label,o):!1})),h=>s(h,"StemMatch"));return f!==void 0?f:S(i,h=>s(h,"Setter"))}}function bme(e,t,r,n){let i=dD(t,r,n),a=ui(e,t),o={};return a.forEach(s=>{a.forEach(l=>{if(s!==l)return Q(i(s,l),c=>{o[hme(s,l)]=c})})}),o}let Oo="resources",Mo="events";function _me(e){return e.find(t=>tt(t.role,Oo))}function fD(e){return e.filter(t=>tt(t.role,Mo))}function yme(e,t){return e.toString()+"::"+t}function xme(e){let t=e.indexOf("::");if(t!==-1)return B(q$(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function uo(e,t){return S(T(e,t),ne)}function Sme(e){let t=_me(e),r=fD(e),n=t!==void 0?t.rows.map(d=>{let f=D(j(d),{}),h=D(uo(f,"id"),""),p=D(S(t.semantics.labelField,m=>uo(f,m)),h);return[h,p]}):[],i=n.map(d=>d[0]),a=r.map((d,f)=>ee(d.rows,h=>{let p=D(j(h),{}),m=D(uo(p,"id"),""),b=d.semantics.dateSpan;if(b!==void 0)return B(S(uo(p,b.startField),Ni),_=>{let x=S(S(b.endField,F=>uo(p,F)),Ni),E=D(S(d.semantics.labelField,F=>uo(p,F)),m),k=D(S(d.resourceRef,F=>uo(p,F)),""),w=yme(f,m),C=d.accent;return[k,{key:w,title:E,start:_,end_:x,accent:C,onOpen:()=>d.onOpenRow(m,h)}]})})).flat(),o=d=>ee(a,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:o(h=>h===f)}}),l=o(d=>!i.includes(d)),c=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return s.concat(c)}function Eme(e){let t=e.sources,r=Sme(t),n=fD(t),a=n.some(s=>He(s.onCommand)&&He(s.assignCommand)?He(s.resourceRef):!1)?(s,l)=>Q(xme(s),c=>{let d=c[1];Q(n[c[0]],f=>{let h=f.onCommand,p=f.assignCommand,m=f.resourceRef;if(h!==void 0&&p!==void 0&&m!==void 0)return h(p,d,it([[m,l]]))})}):void 0,o=rt(n,0,(s,l)=>s+l.rows.length|0);return g(Kpe,{lanes:r,windowNote:"Showing the "+o.toString()+" scheduled item(s)",onReassign:a})}let wme=g("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),Dl="scheduler";function hD(e){return He(Tr(e,void 0).dateSpan)?dn(e).some(t=>He(dp(t[0]))):!1}function Rme(e,t,r){return r?!1:hD(t)}function kme(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>_b(i.schema).includes(t)?cD(i.schema).every(a=>a===t||a==="id"?!0:tt(a,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function Ame(e,t,r){let n=r!==void 0?r:(a,o)=>{},i={};return sd().filter(a=>{let o=a.arity;return typeof o!="object"?!1:o.TAG!=="Multi"}).forEach(a=>{let o={},s={},l=(c,d,f)=>{let h=T(c,d);h!==void 0?h.push(f):c[d]=[f]};e.forEach(c=>{let d=S(t,p=>Ai(p,c.name)),f=D(S(d,p=>p.canvas),a.label),h=S(d,p=>p.role);if(h!==void 0)return h===Oo?l(o,f,c):h===Mo?Q(S(d,p=>p.resourceRef),p=>l(s,f,[c,p])):void 0}),ze(s).forEach(c=>{let d=c[0],f=D(T(o,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];c[1].forEach(m=>{i[m[0].name]={resource:p,resourceRef:m[1]}})})}),i}Xa({id:Dl,label:"Scheduler",icon:wme,arity:{TAG:"Slots",_0:[{role:Oo,min:1,max:1},{role:Mo,min:1}]},isCapable:hD,render:e=>g(Eme,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function ea(e){return"var("+e+")"}let Tc=y([M("inlineFlex"),W("center"),u("gap","6px"),u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",ea(H.full)),u("padding","2px var("+I.sm+")"),u("color",ea(v.textSecondary)),u("font-size",ea(R.sizeXs)),u("line-height","1.5")]),H0=y([xe("pointer"),We([u("background",ea(v.surfaceSubtle)),u("color",ea(v.textPrimary))])]),Cme=y([Na(.6),xe("notAllowed")]);function yb(e){return y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let Dme=yb(ea(v.success)),$me=yb(ea(v.border)),Fme=yb(ea(v.border)),Ime=L6([[0,[Na(.4)]],[50,[Na(1)]],[100,[Na(.4)]]]),Tme=y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",ea(v.warning)),T6(Ime),N6({NAME:"ms",VAL:1200}),P6("infinite"),O6("easeInOut")]);function Nme(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,a=r!==void 0?r:!1,o=n?i&&a?[Tc+" "+H0,Tme,"Reconnecting…"]:i?[Tc+" "+H0,Dme,"Live"]:[Tc+" "+H0,$me,"Snapshot"]:[Tc+" "+Cme,Fme,"Off"],s=n?c=>t():void 0,l=n?i&&a?"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 P("button",{children:[g("span",{className:o[1]}),o[2]],className:o[0],title:l,disabled:!n,type:"button",onClick:s})}let Pme=Nme;function yl(e){return"var("+e+")"}let Ome=y([M("inlineFlex"),W("center"),u("gap","6px"),u("background",yl(v.brand)),u("color",yl(v.textOnBrand)),u("border","none"),u("border-radius",yl(H.full)),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",yl(R.sizeSm)),u("font-weight",yl(R.weightMedium)),xe("pointer"),We([u("opacity","0.85")])]),Mme=y([M("flex"),W("center"),Ve("center"),u("padding","var("+I.xs+") 0")]);function Lme(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 g("div",{children:g("button",{children:n,className:Ome,type:"button",onClick:i=>t()}),className:Mme})}let zme=Lme;function Xi(e){return"var("+e+")"}function pD(e){switch(e){case"Success":return v.success;case"Warning":return v.warning;case"Error":return v.error;case"Info":return v.info}}function Ume(e){return y([M("flex"),W("flexStart"),u("gap",Xi(I.sm)),u("padding","var("+I.sm+") var("+I.md+")"),u("border-radius",Xi(H.md)),u("border-left","3px solid var("+pD(e)+")"),u("background",Xi(v.surfaceElevated)),u("font-size",Xi(R.sizeMd)),u("line-height",Xi(R.lineHeightNormal))])}function qme(e){return y([u("color",Xi(pD(e))),u("font-size","16px"),An(0),Pi(pe(1))])}let jme=y([si(1)]),Bme=y([u("font-weight",Xi(R.weightMedium)),u("color",Xi(v.textPrimary)),Ld(pe(2))]),Vme=y([u("color",Xi(v.textSecondary))]);function Hme(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function Gme(e){let t=e.variant,r=t!==void 0?t:"Info";return P("div",{children:[g("span",{children:Hme(r),className:qme(r)}),P("div",{children:[oe(e.title,null,n=>g("div",{children:n,className:Bme})),g("div",{children:e.message,className:Vme})],className:jme})],className:Ume(r),role:"alert"})}let Kme=Gme;function Wme(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function Qme(e){return Wme(e)}function xb(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function Wn(e){return[e._0,xb(e)]}function mD(e,t){return iE(t,e,(r,n)=>n(r))}function Qn(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}let WS=21;function gD(e,t,r){let n=j(e),i=D(S(S(n,s=>T(s,"data")),j),{}),a=T(i,t),o=a!==void 0?a:S(n,s=>T(s,t));return ee(D(S(S(S(o,j),s=>T(s,"edges")),St),[]),s=>{let l=S(S(j(s),f=>T(f,"node")),j);if(l===void 0)return;let c=S(T(l,"id"),ne),d=D(S(T(l,r),ne),D(c,""));return B(c,f=>({id:f,label:d}))})}function Yme(e,t){let r=Gn(),n=X(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return Re(()=>{let a={contents:!1};if(i(o=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let o=t==="id"?"id":"id "+t,s="query { "+e+"(first: "+WS.toString()+") { edges { node { "+o+" } } } }";yt(r(s,{}).then(l=>{if(!a.contents){let c=gD(l,e,t),d=c.length>=WS,f=d?c.slice(0,20):c;i(h=>({loading:!1,options:f,hasMore:d}))}return Promise.resolve()}),l=>(a.contents||(console.warn("[AutoUI] RefField "+e+" fetch failed",l),i(c=>({loading:!1,options:[],hasMore:!1}))),Promise.resolve()))}else a.contents||i(o=>({loading:!1,options:[],hasMore:!1}));return()=>{a.contents=!0}},[r,e,t]),n[0]}function Jme(e,t,r){let n=Gn(),i=X(()=>({loading:!1,options:[],error:!1})),a=i[1];return Re(()=>{if(r===""){a(l=>({loading:!1,options:[],error:!1}));return}let o={contents:!1};a(l=>({loading:!0,options:l.options,error:l.error}));let s=setTimeout(()=>{if(o.contents)return;if(n===void 0)return a(f=>({loading:!1,options:[],error:!1}));let l=t==="id"?"id":"id "+t,c="query($q: String!) { "+e+"(first: 20, filter: {searchPrefix: $q}) { edges { node { "+l+" } } } }",d={};d.q=r,yt(n(c,d).then(f=>{if(!o.contents){let h=gD(f,e,t);a(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(o.contents||(console.warn("[AutoUI] RefField "+e+" searchPrefix failed; falling back to client-side filter",f),a(h=>({loading:!1,options:[],error:!0}))),Promise.resolve()))},250);return()=>{o.contents=!0,clearTimeout(s)}},[n,r,e]),i[0]}function Xme(e,t,r){let n=Gn(),i=X(()=>{}),a=i[1];return Re(()=>{let o={contents:!1},s=0;if(n!==void 0&&t!==void 0&&t!==""){let l=r==="id"?"id":"id "+r,c="query($id: ID!) { "+e+"(id: $id) { "+l+" } }",d={};d.id=t,yt(n(c,d).then(f=>{if(!o.contents){let h=j(f),p=D(S(S(h,x=>T(x,"data")),j),{}),m=T(p,e),b=m!==void 0?m:S(h,x=>T(x,e)),_=S(b,j);if(_!==void 0){let x=D(S(T(_,"id"),ne),t),E=D(S(T(_,r),ne),x);a(k=>({id:x,label:E}))}else a(x=>{})}return Promise.resolve()}),f=>Promise.resolve())}else s=1;return s===1&&a(l=>{}),()=>{o.contents=!0}},[n,t,r]),i[0]}function It(e){return"var("+e+")"}function $l(e){if(e==="")return[];let t=St(JSON.parse(e));return t!==void 0?ee(t,ne):[e]}let Zme=y([Qt("relative"),aa({NAME:"percent",VAL:100})]),QS=y([u("background",It(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",It(H.sm)),u("padding","var("+I.xs+") var("+I.sm+")"),u("font-size",It(R.sizeMd)),u("color",It(v.textPrimary)),u("outline","none"),aa({NAME:"percent",VAL:100}),A6(pe(34)),M("flex"),W("center"),li("wrap"),u("gap","4px"),xe("pointer"),na("left"),Ja([u("border-color",It(v.brand))])]),ege=y([u("border-color",It(v.brand))]),tge=y([u("border-color",It(v.error))]),rge=y([u("color",It(v.textSecondary))]),nge=y([M("inlineFlex"),W("center"),u("background",It(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",It(H.sm)),u("padding","2px 6px"),u("font-size",It(R.sizeSm)),u("gap","4px")]),ige=y([xe("pointer"),u("color",It(v.textSecondary)),u("font-weight",It(R.weightBold))]),age=y([u("border","none"),u("background","transparent"),u("outline","none"),u("color",It(v.textPrimary)),u("font-size",It(R.sizeMd)),si(1),DE(pe(40))]),oge=y([Qt("absolute"),ia({NAME:"percent",VAL:100}),Bs("zero"),Ya("zero"),Pi(pe(2)),u("background",It(v.surfaceElevated)),u("border","1px solid var("+v.border+")"),u("border-radius",It(H.sm)),u("box-shadow",It(Sr.md)),w6("none"),Er("zero"),D6("zero"),k6(pe(240)),C6("auto"),F6(20)]),sge=y([u("padding","var("+I.xs+") var("+I.sm+")"),xe("pointer"),u("color",It(v.textPrimary)),u("font-size",It(R.sizeMd))]),lge=y([u("background",It(v.surfaceSubtle))]),uge=y([u("background",It(v.brandSubtle))]),YS=y([u("padding","var("+I.xs+") var("+I.sm+")"),u("color",It(v.textSecondary)),u("font-size",It(R.sizeSm))]),cge=(function(e,t){return e.contains(t)});function dge(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,o=Math.max(120,Math.min(240,i?n:r));return[i,o]}function fge(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,a=e.value,o=e.required,s=e.multi,l=e.labelField,c=e.queryField,d=e.fieldKey,f=n!==void 0?n:()=>{},h=r!==void 0?r:!1,p=t!==void 0?t:!1,m=Yme(c,l),b=m.options,_=m.loading,x=Ke(void 0),E;if(s)E="Search";else{let G=x.current;if(G!==void 0)E=G;else if(_)E="Inline";else{let te=m.hasMore?"Search":"Inline";x.current=te,E=te}}let k=X(()=>!1),w=k[1],C=k[0],$=X(()=>0),A=$[1],F=$[0],N=X(()=>""),O=N[1],L=N[0],q=X(()=>[!1,240]),K=q[1],re=q[0],V=Ke(null),Y=Ke(null),J=s||a===""?!1:!b.some(G=>G.id===a),ue=Xme(e.singleQueryField,J?a:void 0,l),se=G=>{let te=B(b.find(me=>me.id===G),me=>me.label),be=S(ue,me=>{if(me.id===G)return me.label});return te!==void 0?te:be!==void 0?be:G};Re(()=>{if(!C)return;let G=te=>{let be=te.target,me=V.current;if(me!=null&&!cge(me,be))return w(fe=>!1)};return document.addEventListener("mousedown",G),()=>{document.removeEventListener("mousedown",G)}},[C]),eE(()=>{if(C){let G=V.current;G!=null&&K(te=>dge(G))}},[C]);let ve=E==="Search"&&L!=="",ye=Jme(c,l,ve?L:""),Ne;if(L==="")Ne=b;else{let G=L.toLowerCase();Ne=b.filter(te=>te.label.toLowerCase().startsWith(G))}let Me=ve&&!ye.error?ye.options:Ne,Qe=Me.length,Je=_||ve&&ye.loading,Ue=G=>{let te=$l(a),be=te.some(fe=>fe===G)?te.filter(fe=>fe!==G):te.concat([G]);i(d,JSON.stringify(be.map(fe=>fe))),O(fe=>""),A(fe=>0);let me=Y.current;if(me!=null){me.focus();return}},qe=G=>{let te=Me[G];if(te!==void 0){if(s)return Ue(te.id);{let be=te.id;return i(d,be),w(me=>!1),O(me=>"")}}},pt=G=>{switch(G.key){case"ArrowDown":return G.preventDefault(),C?A(fe=>Qe===0?0:Ii(fe+1|0,Qe)):w(fe=>!0);case"ArrowUp":return G.preventDefault(),A(fe=>Qe===0?0:Ii((fe-1|0)+Qe|0,Qe));case"Backspace":if(!(s&&L===""))return;let be=$l(a);if(be.length===0)return;let me=be.slice(0,be.length-1|0);return i(d,JSON.stringify(me.map(fe=>fe)));case"Enter":return C?(G.preventDefault(),qe(F)):void 0;case"Escape":return C?w(fe=>!1):void 0;default:return}},Bt=C?QS+" "+ege:QS,At=h?Bt+" "+tge:Bt,Hr=()=>$l(a).map(te=>P("span",{children:[se(te),g("span",{children:"×",className:ige,onClick:be=>{be.stopPropagation(),Ue(te)}})],className:nge},te)),U=(re[1]|0).toString()+"px",de=re[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:U,top:"auto"}:{maxHeight:U},De;if(Je)De=g("li",{children:"Loading…",className:YS});else if(Qe===0)De=g("li",{children:L===""?"No options":"No matches",className:YS});else{let G=s?$l(a):a===""?[]:[a];De=Me.map((te,be)=>{let me=G.some(Pe=>Pe===te.id),Xe=W$([[sge],be===F?[lge]:[],me?[uge]:[]]).join(" ");return g("li",{children:te.label,"aria-selected":me,className:Xe,role:"option",onMouseDown:Pe=>{Pe.preventDefault(),qe(be)},onMouseEnter:Pe=>A(Lt=>be)},te.id)})}let Ee=g("ul",{children:De,className:oge,role:"listbox",style:de}),Le;return Le=E==="Inline"?g("button",{children:a===""?g("span",{children:o?"Select…":"—",className:rge}):se(a),className:At,autoFocus:p,type:"button",onKeyDown:pt,onBlur:G=>f(),onClick:G=>w(te=>!te)}):P("div",{children:[s?Hr():null,g("input",{ref:Wt(Y),className:age,autoFocus:p,placeholder:o?"Search…":"—",type:"text",value:s||C?L:a===""?"":se(a),onKeyDown:pt,onFocus:G=>w(te=>!0),onBlur:G=>f(),onChange:G=>{let te=G.target.value;O(be=>te)}})],className:At,onClick:G=>w(te=>!0)}),P("div",{children:[Le,C?Ee:null],ref:Wt(V),className:Zme})}let hge=fge;function vD(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function pge(e){return t=>{let r=Wn(t),n=r[0];return n>=e?Qn(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+vD(e.toString()),tl:r[1]}}}}function mge(e){return t=>{let r=Wn(t),n=r[0];return n<=e?Qn(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+vD(e.toString()),tl:r[1]}}}}function gge(e){let t=Wn(e),r=t[0];return isFinite(r)&&(r|0)===r?Qn(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}let vge="Must not be empty";function bge(e){let t=Wn(e),r=t[0];return r.length>0?Qn(e):{TAG:"Invalid",_0:r,_1:{hd:vge,tl:t[1]}}}let _ge=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function yge(e){let t=Wn(e),r=t[0];return _ge.exec(r)!==null?Qn(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function xge(e){let t=Wn(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?Qn(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let Sge=/^[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 Ege(e){let t=Wn(e),r=t[0];return Sge.exec(r)!==null?Qn(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let wge=/^c[a-z0-9]{23,24}$/;function Rge(e){let t=Wn(e),r=t[0];return wge.exec(r)!==null?Qn(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function kge(e){let t=Wn(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]}}:Qn(e)}function Age(e){return t=>{let r=Wn(t),n=r[0];return n.length>=e?Qn(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function Cge(e){return t=>{let r=Wn(t),n=r[0];return n.length<=e?Qn(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function Dge(e,t){return r=>{let n=Wn(r),i=n[0];return e.exec(i)!==null?Qn(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function $ge(e){let t=xb(e);if(t!==0)return t.hd}function Fge(e){switch(e){case"Email":return yge;case"Url":return xge;case"Uuid":return Ege;case"Cuid":return Rge;case"DateTime":return kge}}function Ige(e,t,r){if(e==="")return t?bge({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return Q(r.minLength,i=>{n.push(Age(i))}),Q(r.maxLength,i=>{n.push(Cge(i))}),Q(r.format,i=>{n.push(Fge(i))}),Q(r.pattern,i=>{n.push(Dge(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:mD({TAG:"Pending",_0:e},sm(n))}function Tge(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=Ua(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(gge),Q(r.min,s=>{i.push(pge(s))}),Q(r.max,s=>{i.push(mge(s))});let a=mD({TAG:"Pending",_0:n},sm(i)),o=xb(a);return o!==0?{TAG:"Invalid",_0:e,_1:o}:{TAG:"Valid",_0:e}}function Nge(e,t,r){let i=$l(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let a={contents:0};return Q(r.maxItems,s=>{if(i>s){a.contents={hd:"Select at most "+s.toString()+" items",tl:a.contents};return}}),Q(r.minItems,s=>{if(i<s&&(t||i>0)){a.contents={hd:"Select at least "+s.toString()+" items",tl:a.contents};return}}),a.contents!==0?{TAG:"Invalid",_0:e,_1:a.contents}:{TAG:"Valid",_0:e}}function JS(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function Pge(e,t){let r=e.propSchema;if(r!==void 0&&AM(e.key,r)){let i=e.fieldType,a;if(typeof i!="object")a=!1;else switch(i.TAG){case"TextField":case"NumberField":a=i.required;break;case"EnumField":a=i.required;break;case"RefField":a=i.required;break}let o=DM(e.key,r,t,a);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 Ige(t,n.required,n.constraints);case"NumberField":return Tge(t,n.required,n.constraints);case"EnumField":return JS(t,n.required);case"RefField":return n.multi?Nge(t,n.required,n.constraints):JS(t,n.required)}}function Ed(e,t){let r=B(T(e,t),Be);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function XS(e,t){let r=B(T(e,t),Be);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function wd(e,t){let r=B(T(e,t),Be);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function Oge(e){let t=wd(e,"format");if(wd(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 Mge(e){let t=Ed(e,"minLength"),r=Ed(e,"maxLength"),n=B(wd(e,"pattern"),o=>new RegExp(o)),i=Oge(e),a=wd(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:a}}function ZS(e,t){let r=XS(e,"minimum"),n=XS(e,"maximum");return{min:r,max:n,integer:t}}function Lge(e){let t=Ed(e,"minItems"),r=Ed(e,"maxItems");return{minItems:t,maxItems:r}}function zge(e,t){let r=t!==void 0?t:[],n={};r.forEach(d=>{n[d.propertyKey]=d});let i=Be(e);if(typeof i!="object")return[];if(i.TAG!=="JSONObject")return[];let a=i._0,o=T(a,"required"),s;if(o!==void 0){let d=Be(o);s=typeof d!="object"?[]:d.TAG==="JSONArray"?ee(d._0,f=>{let h=Be(f);if(!(typeof h!="object"||h.TAG!=="JSONString"))return h._0}):[]}else s=[];let l=T(a,"properties");if(l===void 0)return[];let c=Be(l);return typeof c!="object"?[]:c.TAG==="JSONObject"?ee(ze(c._0),d=>{let f=d[1],h=d[0],p=Be(f);if(typeof p!="object"||p.TAG!=="JSONObject")return;let m=p._0;if(He(T(m,"const")))return;let b=T(m,"type"),_;if(b!==void 0){let A=Be(b);_=typeof A!="object"||A.TAG!=="JSONString"?"string":A._0}else _="string";let x=s.some(A=>A===h),E=T(n,h),k;if(E!==void 0)k=E.multi?E.entityNamePlural:E.entityName;else{let A=T(m,"title");if(A!==void 0){let F=Be(A);k=typeof F!="object"||F.TAG!=="JSONString"?ct(h):F._0}else k=ct(h)}let w=T(m,"enum"),C;if(w!==void 0){let A=Be(w);C=typeof A!="object"||A.TAG!=="JSONArray"?void 0:ee(A._0,F=>{let N=Be(F);if(!(typeof N!="object"||N.TAG!=="JSONString"))return N._0})}else C=void 0;let $;if(E!==void 0)$={TAG:"RefField",queryField:E.queryField,singleQueryField:E.singleQueryField,labelField:E.labelField,multi:E.multi,required:x,constraints:E.multi?Lge(m):{}};else if(_==="boolean")$="BoolField";else if(C!==void 0)$={TAG:"EnumField",options:C,required:x};else switch(_){case"integer":$={TAG:"NumberField",required:x,constraints:ZS(m,!0)};break;case"number":$={TAG:"NumberField",required:x,constraints:ZS(m,!1)};break;default:$={TAG:"TextField",required:x,constraints:Mge(m)}}return B($,A=>({key:h,label:k,fieldType:A,propSchema:f}))}):[]}function Uge(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;i=typeof n!="object"?"false":n.TAG==="EnumField"?D(n.options[0],""):"",t[r.key]=i}),t}function yr(e){return"var("+e+")"}let qge=y([M("flex"),ce("column"),u("gap",yr(I.md))]),jge=y([M("flex"),ce("column"),u("gap","4px")]),e2=y([u("color",yr(v.textSecondary)),u("font-size",yr(R.sizeSm)),u("font-weight",yr(R.weightMedium))]),Bge=y([u("color",yr(v.error)),gu(pe(2))]),t2=y([u("background",yr(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",yr(H.sm)),u("padding","var("+I.xs+") var("+I.sm+")"),u("font-size",yr(R.sizeMd)),u("color",yr(v.textPrimary)),u("outline","none"),aa({NAME:"percent",VAL:100}),u("transition","border-color 120ms, box-shadow 120ms"),Ja([u("border-color",yr(v.brand))])]),Vge=y([u("border-color",yr(v.error)),Ja([u("border-color",yr(v.error)),u("box-shadow","0 0 0 2px color-mix(in srgb, var("+v.error+") 25%, transparent)")])]),Hge=y([u("color",yr(v.error)),u("font-size",yr(R.sizeXs)),u("min-height","1.1em"),u("line-height","1.1"),Pi(pe(2))]),Gge=y([xe("pointer"),CE(pe(6))]),r2=y([u("background",yr(v.brand)),u("color",yr(v.textOnBrand)),u("border","none"),u("border-radius",yr(H.sm)),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",yr(R.sizeMd)),xe("pointer"),E6("flexStart"),u("transition","opacity 120ms")]),Kge=y([Na(.5),xe("notAllowed")]);function Wge(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,a=e.onChange,o=e.value,s=e.field,l=r!==void 0?r:!1,c=t!==void 0?t:!1,d=s.fieldType,f;if(typeof d!="object")f=!1;else switch(d.TAG){case"TextField":case"NumberField":f=d.required;break;case"EnumField":f=d.required;break;case"RefField":f=d.required;break}let h=l&&He(n),p=h?t2+" "+Vge:t2,m=E=>i(s.key),b=s.propSchema,_=b!==void 0?CM(s.key,b,o,E=>a(s.key,E),()=>i(s.key),f,h):void 0,x;if(_!==void 0)x=_;else{let E=s.fieldType;if(typeof E!="object")x=P("label",{children:[g("input",{className:Gge,checked:o==="true",type:"checkbox",onBlur:m,onChange:k=>a(s.key,k.target.checked?"true":"false")}),"Enabled"],className:e2});else switch(E.TAG){case"TextField":let k=E.constraints.format,w;if(k!==void 0)switch(k){case"Email":w="email";break;case"Url":w="url";break;default:w="text"}else w="text";x=g("input",{className:p,autoFocus:c,type:w,value:o,onBlur:m,onChange:C=>a(s.key,C.target.value)});break;case"NumberField":x=g("input",{className:p,autoFocus:c,type:"number",value:o,onBlur:m,onChange:C=>a(s.key,C.target.value)});break;case"EnumField":x=g("select",{children:E.options.map(C=>g("option",{children:C,value:C},C)),className:p,value:o,onBlur:m,onChange:C=>a(s.key,C.target.value)});break;case"RefField":x=g(hge,{fieldKey:s.key,queryField:E.queryField,singleQueryField:E.singleQueryField,labelField:E.labelField,multi:E.multi,required:E.required,value:o,onChange:a,onBlur:()=>i(s.key),hasError:h,autoFocus:c});break}}return P("div",{children:[P("label",{children:[s.label,f?g("span",{children:"*",className:Bge}):null],className:e2}),x,g("div",{children:h?D(n,""):null,className:Hge})],className:jge})}function Qge(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,a=e.schema,o=n!==void 0?n:"Submit",s=t!==void 0?t:[],l=xt(()=>zge(a,s),[a,s]),c=X(()=>D(r,Uge(l))),d=c[1],f=c[0],h=X(()=>({})),p=h[1],m=h[0],b=X(()=>!1),_=b[1],x=b[0],E=xt(()=>l.map(O=>{let L=D(T(f,O.key),"");return[O.key,Pge(O,L)]}),[l,f]),k=E.every(O=>Qme(O[1])),w={};E.forEach(O=>{let L=$ge(O[1]);if(L!==void 0){w[O[0]]=L;return}});let C=(O,L)=>d(q=>{let K=it(ze(q));return K[O]=L,K}),$=O=>p(L=>{let q=it(ze(L));return q[O]=!0,q}),A=O=>{if(O.preventDefault(),_(L=>!0),k)return i(f)},F=x&&!k,N=F?r2+" "+Kge:r2;return P("form",{children:[l.map((O,L)=>{let q=D(T(m,O.key),!1);return g(Wge,{field:O,value:D(T(f,O.key),""),onChange:C,onBlur:$,errorMessage:T(w,O.key),showError:q||x,autoFocus:L===0},O.key)}),g("button",{children:o,className:N,disabled:F,type:"submit"})],className:qge,noValidate:!0,onSubmit:A})}let Yge=Qge;function Jge(e){return"var("+e+")"}let Xge=y([M("flex"),ce("column"),u("gap",Jge(I.md))]);function Zge(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.injectNewId,a=e.aggregateIdField,o=e.aggregateId,s=e.schema,l=i!==void 0?i:!1,c=n!==void 0?n:[],d=t!==void 0?t:"Submit",f=X(()=>{}),h=f[1],p=X(()=>!1),m=p[1],_=X(()=>crypto.randomUUID())[0],x=w=>{let C=it(ze(w));Q(o,$=>{C[D(a,"id")]=$}),l&&(C[D(a,"id")]=_),m($=>!0),h($=>{}),r(C).then($=>{if(m(A=>!1),typeof $=="object"){let A=$._0;h(F=>A)}return Promise.resolve()})},E=o!==void 0?a!==void 0||l?a:void 0:l?a:void 0,k=E!==void 0?D(B(j(s),w=>{let C=it(ze(w));return Q(S(T(C,"properties"),j),$=>{let A=it(ze($).filter(F=>F[0]!==E));C.properties=A}),C}),s):s;return P("div",{children:[oe(f[0],null,w=>g(Kme,{variant:"Error",message:w})),p[0]?g(ql,{label:"Submitting..."}):null,g(Yge,{schema:k,onSubmit:x,submitLabel:d,refFields:c})],className:Xge})}let Sb=Zge;function eve(e){let t={},r=e.startsWith("?")?e.slice(1):e;return r===""||r.split("&").forEach(n=>{let i=n.split("="),a=i.length;if(!(a>=3))switch(a){case 0:return;case 1:let o=i[0];if(o!==""){t[decodeURIComponent(o)]="";return}else return;case 2:let s=i[0],l=i[1];if(s!==""){t[decodeURIComponent(s)]=decodeURIComponent(l);return}else return}}),t}function tve(e,t){return e===t?0:e<t?-1:1}function bD(e){let t=ze(e).filter(r=>r[1]!=="").toSorted((r,n)=>tve(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function rve(e){if(e.path===0)return"/";let r=[];return K$(e.path,n=>{r.push(n)}),"/"+r.join("/")}function n2(e,t){let r=t.filter(a=>a[1]==="").map(a=>a[0]),n=t.filter(a=>a[1]!==""),i=ze(e).filter(a=>{let o=a[0];return r.includes(o)?!1:!n.some(s=>s[0]===o)});return it(i.concat(n))}function nve(){let e=I$(),t=eve(e.search),r=rve(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let c=bD(l);As(r+c+n)};return{params:t,get:l=>T(t,l),set:(l,c)=>i(n2(t,[[l,c]])),setMany:l=>i(n2(t,l))}}function Pf(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||He(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||He(e.index)||e.scanSort;return{filter:t,sort:r}}function i2(e){return Pf(e.ann)}function _D(e){let t=He(jN(e)),r=_m(e).length!==0,n=ym(e).length!==0;return{search:t||r||n}}function Wp(e){let r=D(B(S(S(j(e),o=>T(o,"properties")),j),ze),[]).map(o=>Pf($o(o[1]))),n=r.some(o=>o.filter),i=r.some(o=>o.sort),a=_D(e);return{hasFilter:n,hasSort:i,hasSearch:a.search}}function a2(e,t){let r={},n={};return ze(e).forEach(i=>{let a=i[1];if(a==="")return;let o=i[0],s=t.find(l=>l.key===o);if(s!==void 0){Pf(s.ann).filter?r[o]=a:n[o]=a;return}n[o]=a}),[r,n]}function o2(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?Pf(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function ive(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),ze(e).forEach(a=>{let o=a[1],s=a[0],l=n.find(f=>f.key===s),c=B(l,f=>f.kind),d;if(c!==void 0&&typeof c!="object")switch(c){case"KBoolean":d=o==="true";break;case"KNumber":d=D(B(Ua(o),f=>f),o);break;default:d=o}else d=o;i[s+"Eq"]=d}),ze(i).length!==0)return i}function ave(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return it([["field",e._0],["direction",t]])}let ove=it([["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 sve(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function s2(e,t){return oe(S(j(e),r=>T(r,t)),[],r=>{let n=Be(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return ee(n._0,ne).filter(a=>a!=="");default:return[]}})}function lve(e){return S(e,t=>{try{return JSON.parse(t)}catch{return}})}function l2(e,t){return rt(ze(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function uve(e,t,r,n){let i=oa(t,r);if(i===void 0)return Promise.resolve(n);let a=i.queryField,o=i.labelField,s=o==="id"?"id":"id "+o,l="query($ids: [ID!]) { "+a+"(first: "+n.length.toString()+", filter: {ids: $ids}) { edges { node { "+s+" } } } }",c={};return c.ids=n.map(d=>d),yt(e(l,c).then(d=>{let f=rR(d,a,o);return Promise.resolve(n.map(h=>{let p=T(f,h);return p!==void 0?p:h}))}),d=>Promise.resolve(n))}function Of(e,t,r,n){let i=sve(r,n);if(r===void 0)return Promise.resolve(i);let a=T(ove,r);if(a===void 0)return Promise.resolve(i);if(a.idFields.length===0)return Promise.resolve(a.template);let o=lve(n);if(o===void 0)return Promise.resolve(a.template);if(e!==void 0){let l=a.idFields.map(c=>{let d=c.field,f=s2(o,d);return f.length===0?Promise.resolve([d,""]):uve(e,t,c.entityStem,f).then(h=>Promise.resolve([d,h.join(", ")]))});return Promise.all(l).then(c=>{let d={};return c.forEach(f=>{d[f[0]]=f[1]}),Promise.resolve(l2(a.template,d))})}let s={};return a.idFields.forEach(l=>{let c=l.field,d=s2(o,c);s[c]=d.join(", ")}),Promise.resolve(l2(a.template,s))}function cve(e){let t=e.resource,r=To(t,void 0),n=t.name,i=r.rows,a=t.schema,o=e.resourceSemantics,c={readModelName:n,rows:i,schema:a,semantics:o,onOpenRow:($,A)=>{},role:Oo},d=e.eventReadModelName,f=e.eventRows,h=e.eventSchema,p=e.eventSemantics,m=e.eventAccent,b=e.onOpenEvent,_=e.onCommand,x=Mo,E=e.resourceRef,k=e.assignCommand,w={readModelName:d,rows:f,schema:h,semantics:p,accent:m,onOpenRow:b,onCommand:_,role:x,resourceRef:E,assignCommand:k},C=r.fetchState;return typeof C!="object"?C==="Loading"?g(ql,{}):e.mode.render([c,w]):g(ka,{detail:C._0,onRetry:()=>r.refetch()})}let dve=cve,yD=Mt(void 0),fve=yD.Provider;function hve(e){return Kt(fve,{value:e.refresh,children:e.children})}let u2={make:hve};function pve(){return bt(yD)}function c2(e){try{return Fi(localStorage.getItem(e))}catch{return}}function d2(e,t){try{return localStorage.setItem(e,t)}catch{return}}let f2={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function Tt(e){return"var("+e+")"}let G0=y([M("flex"),ce("column"),u("gap",Tt(I.lg))]),h2=y([M("flex"),W("center"),Ve("spaceBetween"),u("margin-bottom",Tt(I.sm))]),mve=y([u("font-size",Tt(R.sizeXl)),u("font-weight",Tt(R.weightMedium)),u("color",Tt(v.textPrimary)),Er(pe(0))]),gve=y([M("flex"),u("gap",Tt(I.sm))]),vve=y([M("flex"),ce("column"),u("gap",Tt(I.lg))]),bve=y([M("flex"),ce("column"),u("gap",Tt(I.sm))]),_ve=y([u("font-size",Tt(R.sizeSm)),u("font-weight",Tt(R.weightMedium)),u("color",Tt(v.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),Er(pe(0))]),yve=y([u("background",Tt(v.brand)),u("color",Tt(v.textOnBrand)),u("border","none"),u("border-radius",Tt(H.md)),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",Tt(R.sizeSm)),u("cursor","pointer")]),xve=y([M("inlineFlex"),W("center"),u("gap","4px"),u("background","none"),u("border","none"),u("padding","0"),u("color",Tt(v.brand)),u("font-size",Tt(R.sizeSm)),xe("pointer"),u("text-decoration","none"),We([u("text-decoration","underline")])]),Sve=y([M("flex"),W("center"),Ve("flexEnd"),u("gap",Tt(I.xs)),u("padding-top",Tt(I.sm))]),p2=y([u("background","none"),u("border","1px solid var("+v.border+")"),u("border-radius",Tt(H.sm)),u("padding","2px var("+I.sm+")"),u("color",Tt(v.textSecondary)),u("font-size",Tt(R.sizeSm)),xe("pointer"),We([u("background",Tt(v.surfaceSubtle)),u("color",Tt(v.textPrimary))]),IE([u("opacity","0.4"),xe("notAllowed")])]);function Eve(e,t){let r=D(S(S(j(e),i=>T(i,"properties")),j),{}),n={};return ze(t).forEach(i=>{let a=i[1],o=i[0],s=D(S(S(S(T(r,o),j),d=>T(d,"type")),ne),"string"),l,c=0;switch(s){case"array":if(a==="")l=[];else try{l=JSON.parse(a)}catch{l=[a]}break;case"boolean":l=a==="true";break;case"integer":case"number":c=1;break;case"object":if(a==="")l=null;else try{l=JSON.parse(a)}catch{l=null}break;default:l=a}c===1&&(l=D(B(Ua(a),d=>d),a)),n[o]=l}),n}let m2={contents:[]},g2={contents:[]};function wve(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!m2.contents.some(i=>i===n)){m2.contents.push(n),console.warn("[AutoUI] Read model "+t+' declared statusField="'+r+`" but the list-view rows don't include that field; per-row command filtering is disabled.`);return}}function Rve(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!g2.contents.some(i=>i===n)){g2.contents.push(n),console.warn("[AutoUI] Read model "+t+' statusField="'+r+'" value is neither a string nor a TAG-shaped object; per-row command filter cannot match against allowedStates.');return}}let v2={contents:[]};function kve(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!v2.contents.some(n=>n===r)){v2.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 Ave(e){let t=e.schedulerJoin,r=e.uiHints,n=e.liveDefault,i=e.sortKeyField,a=e.byIdsQueryDocument,o=e.byIdsQueryField,s=e.detailQueryDocument,l=e.singleQueryField,c=e.drillPath,d=e.openRowId,f=e.pluginId,h=e.detailView,p=e.rows,m=e.readModel,b=c!==void 0?c:[],_=n!==void 0?n:!0,x=Gn(),E=X(()=>[]),k=E[1],w=E[0],C=X(()=>"Loading"),$=C[1],A=C[0],F=X(()=>0),N=F[1],O=X(()=>{}),L=O[1],q=X(()=>{}),K=q[1],re=q[0],V=X(()=>({})),Y=V[1],J=V[0],ue=X(()=>"Loaded"),se=ue[1],ve=ue[0],ye=X(()=>f2),Ne=ye[1],Me=ye[0],Qe=X(()=>{}),Je=Qe[1],Ue=Qe[0],qe=Zd(),pt=oe(qe,!1,z=>z.isLive(m.queryField)),Bt="reventless.live."+D(f,"default")+"."+m.name,At=X(()=>{let z=c2(Bt);if(z===void 0)return _;switch(z){case"false":return!1;case"true":return!0;default:return _}}),Hr=At[1],U=At[0],de=()=>{let z=!U;d2(Bt,z?"true":"false"),Hr(Z=>z)},De=pt&&U,Ee=S(r,z=>Ai(z,m.name)),Le=dR(m.schema,Ee),G=oe(S(Ee,z=>z.suppress),!1,z=>z.includes(Dl)),te;if(t!==void 0&&Rme(!0,m.schema,G)){let z=nR(Dl);te=z!==void 0&&!Le.some(Z=>Z.id===z.id)?Le.concat([z]):Le}else te=Le;let be=aR(f,m.name,void 0),me=X(()=>Bm(be)),fe=me[1],Xe=z=>{iR(be,z),fe(Z=>z)},Pe=fR(me[0],Ee,UE(m.schema),te),Lt=t!==void 0&&Pe!==void 0?Pe.id===Dl:!1,Oe=He(h)&&!Lt,Ge="reventless.layout."+D(f,"default")+"."+m.name,Dt=X(()=>c2(Ge)),Vt=Dt[1],$t=RL(Dt[0],Ee,HN(m.schema),Oe),wr=qe!==void 0&&De?qe.statusFor(hd(m.queryField))!=="Open":!1,rr=X(()=>0),hn=rr[1],Dn=rr[0],ha=Ke({}),Ui=Ke(void 0),pa=Ke(new Map),Yn=z=>{pa.current.set(z,Date.now())},ma=z=>{let Z=pa.current.get(z);return Z!==void 0?Date.now()-Z<6e4:!1},zt=nve(),no=bD(zt.params),ga=Qa(),Ut=B(f,z=>Wi(ya(z,m.name))+no),Ct=xm(m.schema),Ht=z=>B(S(T(z,"id"),ne),Z=>{let ae=S(Ct,ie=>S(T(z,ie),ne));return ae!==void 0?rpe(Z,ae):Z}),Gr=z=>Ct!==void 0?BS(z)[0]:z,Rr=z=>{if(Ct===void 0)return it([["id",z]]);let Z=BS(z),ae=Z[1],ie=Z[0];return it(ae!==void 0?[["id",ie],["subId",ae]]:[["id",ie]])},lt=d!==void 0?d:re,Or=z=>f!==void 0?ga(ta(f,m.name,z,[])+no):K(Z=>z),$n=()=>Ut!==void 0?ga(Ut):K(z=>{}),qt=Wp(m.schema),pn=_D(m.schema),Mr=qt.hasFilter||qt.hasSort||qt.hasSearch,Kr;if(Mr){let z=[];ze(zt.params).forEach(Z=>{let ae=Z[1];if(ae==="")return;let ie=Z[0];if(ie==="after"||ie==="before"||ie==="sort"||ie==="dir"){z.push(ie+"="+ae);return}if(ie==="q"&&pn.search){z.push(ie+"="+ae);return}if(!ie.startsWith("f."))return;let we=ie.slice(2);if(($e=>oe($e.find(ut=>ut.key===we),!1,ut=>i2(ut).filter))(Mn(m.schema,void 0))){z.push(ie+"="+ae);return}}),Kr=z.toSorted((Z,ae)=>Z===ae?0:Z<ae?-1:1).join("|")}else Kr="";Re(()=>{if(x!==void 0){$(Z=>"Loading"),Y(Z=>({}));let z;if(Mr){let Z=Mn(m.schema,void 0),ae={};ze(zt.params).forEach(Wr=>{let ts=Wr[0];if(ts.startsWith("f.")){ae[ts.slice(2)]=Wr[1];return}});let ie=a2(ae,Z),we=D(zt.get("q"),""),ge=ive(ie[0],we,pn,Z),ut=zt.get("dir")==="desc"?"Desc":"Asc",ir=o2(zt.get("sort"),ut,Z),ur=ave(ir),kr={};Q(ge,Wr=>{kr.filter=Wr}),Q(ur,Wr=>{kr.orderBy=Wr});let Jt=zt.get("before"),Ar=0;Jt!==void 0&&Jt!==""?(kr.before=Jt,kr.last=50):Ar=1,Ar===1&&(kr.first=50,Q(zt.get("after"),Wr=>{if(Wr!==""){kr.after=Wr;return}})),z=kr}else z={};yt(x(m.queryDocument,z).then(Z=>{let ae=S(j(Z),$e=>T($e,m.queryField)),ie=S(ae,St),we=ie!==void 0?ie:D(B(S(S(S(ae,j),$e=>T($e,"edges")),St),$e=>ee($e,ut=>S(j(ut),ir=>T(ir,"node")))),[]),ge=D(B(S(S(S(ae,j),$e=>T($e,"pageInfo")),j),$e=>({hasNextPage:oe(B(T($e,"hasNextPage"),Be),!1,ut=>ut==="JSONTrue"),hasPreviousPage:oe(B(T($e,"hasPreviousPage"),Be),!1,ut=>ut==="JSONTrue"),startCursor:S(T($e,"startCursor"),ne),endCursor:S(T($e,"endCursor"),ne)})),f2);return k($e=>we),Ne($e=>ge),$($e=>"Loaded"),Promise.resolve()}),Z=>($(ae=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else $(z=>({TAG:"Error",_0:"Not connected"}))},[F[0],Kr]);let Jn=z=>{if(s!==void 0&&l!==void 0&&x!==void 0){se(Z=>"Loading"),yt(x(s,Rr(z)).then(Z=>{let ae=S(j(Z),we=>T(we,l)),ie=0;return ae!==void 0&&Be(ae)!=="JSONNull"?(Y(we=>{let ge=it(ze(we));return ge[z]=ae,ge}),se(we=>"Loaded")):ie=1,ie===1&&(Y(we=>it(ze(we).filter(ge=>ge[0]!==z))),se(we=>({TAG:"Error",_0:"Detail not found"}))),Promise.resolve()}),Z=>(se(ae=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}};Re(()=>{let z=d!==void 0?d:re;z!==void 0&&(jn(T(J,z))?Jn(z):se(Z=>"Loaded"))},[d,re]);let Ze=zo(),fr=$d(),nr=Mn(m.schema,void 0),Uf=(p!==void 0?p:w).map(z=>D(j(z),{})),qi=Wd(Uf,nr,Ze),jf={lookupLabel:(z,Z)=>Gd(qi,z,Ze,Z),isMissing:(z,Z)=>Kd(qi,z,Ze,Z)},Zo=Me.hasNextPage||Me.hasPreviousPage,KD=B(f,z=>({pluginId:z,viewName:m.name})),Cb=eL(nr,Ze,fr,T,!0,jf,KD).map(z=>{if(!z.sortable||!Zo)return z;let Z=oe(nr.find(ae=>ae.key===z.key),!1,ae=>i2(ae).sort);return{key:z.key,label:z.label,render:z.render,sortable:Z,width:z.width}}),Db=zt.get("sort"),Bu=zt.get("dir")==="desc"?"Desc":"Asc",$b=z=>k(Z=>Z.map(ae=>{let ie=S(S(j(ae),ge=>T(ge,"id")),ne);if(ie===void 0)return ae;let we=z.find(ge=>tt(S(S(j(ge),$e=>T($e,"id")),ne),ie));return we!==void 0?we:ae})),Vu=i!==void 0?ee(w,z=>S(S(j(z),Z=>T(Z,i)),ne)):[],WD=z=>{let Z=Me.hasNextPage,ae=Vu.length;if(z===void 0||i===void 0||!Z||ae<=0)return!1;let ie=Vu[0];if(Bu==="Asc"){let ge=rt(Vu,ie,($e,ut)=>$e>ut?$e:ut);return z>ge}let we=rt(Vu,ie,(ge,$e)=>ge<$e?ge:$e);return z<we},QD=()=>{let z=Object.keys(ha.current);if(ha.current={},Ui.current=void 0,z.length===0)return;if(z.length>10)return N(ae=>ae+1|0);let Z=0;if(o!==void 0&&a!==void 0){if(x!==void 0){let ae=it([["ids",z.map(ie=>ie)]]);yt(x(a,ae).then(ie=>{let we=D(S(S(j(ie),ge=>T(ge,o)),St),[]);return $b(we),Promise.resolve()}),ie=>Promise.resolve());return}Z=1}else Z=1;if(Z===1){let ae=0;if(Ct!==void 0||l===void 0||s===void 0)ae=2;else{if(x!==void 0){z.forEach(ie=>{let we=it([["id",ie]]);yt(x(s,we).then(ge=>{let $e=S(j(ge),ut=>T(ut,l));return $e!==void 0&&Be($e)!=="JSONNull"&&$b([$e]),Promise.resolve()}),ge=>Promise.resolve())});return}ae=2}if(ae===2)return N(ie=>ie+1|0)}},Fb=z=>{ha.current[z]=!0;let Z=Ui.current;Z!==void 0&&clearTimeout(Z),Ui.current=setTimeout(QD,150)},Ib=z=>{let Z=ae=>S(S(j(ae),ie=>T(ie,"id")),ne);k(ae=>{let ie=ae.map($e=>{let ut=Z($e);if(ut===void 0)return $e;let ir=z.find(ur=>tt(Z(ur),ut));return ir!==void 0?ir:$e}),we=ee(ie,Z),ge=z.filter($e=>{let ut=Z($e);return ut!==void 0?!we.includes(ut):!1});return ie.concat(ge)})},YD=z=>{let Z=w.some(ie=>tt(S(S(j(ie),we=>T(we,"id")),ne),z.id));switch(z.changeKind){case"Added":if(ma(z.id)){if(pa.current.delete(z.id),Z)return;{let ie=z.id,we=0;if(Ct!==void 0)return N(ge=>ge+1|0);if(o!==void 0&&a!==void 0){if(x!==void 0){let ge=it([["ids",[ie]]]);yt(x(a,ge).then($e=>{let ut=D(S(S(j($e),ir=>T(ir,o)),St),[]);return Ib(ut),Promise.resolve()}),$e=>Promise.resolve());return}we=1}else we=1;if(we===1){let ge=0;if(l!==void 0&&s!==void 0){if(x!==void 0){let $e=it([["id",ie]]);yt(x(s,$e).then(ut=>{let ir=S(j(ut),ur=>T(ur,l));return ir!==void 0&&Be(ir)!=="JSONNull"&&Ib([ir]),Promise.resolve()}),ut=>Promise.resolve());return}ge=2}else ge=2;if(ge===2)return N($e=>$e+1|0)}}}else return WD(z.sortKeyValue)?void 0:hn(ie=>ie+1|0);case"Updated":return Z?Fb(z.id):void 0;case"Removed":return Z?Ct!==void 0?Fb(z.id):k(ie=>ie.filter(we=>um(S(S(j(we),ge=>T(ge,"id")),ne),z.id))):void 0;case"BulkInvalidated":return hn(ie=>0),N(ie=>ie+1|0)}},JD=()=>N(z=>z+1|0);wp(m.queryField,"All",De,YD,JD);let XD=z=>{if(lt===void 0||z.id!==Gr(lt))return;let Z=z.changeKind;if(Ct!==void 0)switch(Z){case"Updated":case"Removed":return Jn(lt);case"Added":case"BulkInvalidated":return}else switch(Z){case"Updated":return Jn(lt);case"Removed":return Je(ae=>lt);case"Added":case"BulkInvalidated":return}},ZD=()=>{if(lt!==void 0&&s!==void 0&&l!==void 0&&x!==void 0){yt(x(s,Rr(lt)).then(z=>{let Z=S(j(z),ie=>T(ie,l)),ae=0;return Z!==void 0&&Be(Z)!=="JSONNull"?(Y(ie=>{let we=it(ze(ie));return we[lt]=Z,we}),se(ie=>"Loaded")):ae=1,ae===1&&Je(ie=>lt),Promise.resolve()}),z=>Promise.resolve());return}};wp(m.queryField,{_0:D(B(lt,Gr),"")},De&&He(lt),XD,ZD),Re(()=>{Je(z=>{})},[D(lt,"")]);let Bf=D(zt.get("q"),""),Vf={};ze(zt.params).forEach(z=>{let Z=z[0];if(Z.startsWith("f.")){Vf[Z.slice(2)]=z[1];return}});let Tb=V0e(nr,Vf),e$=Tb.length!==0,t$=B(Db,z=>({key:z,direction:Bu==="Asc"?"Asc":"Desc"})),r$=(z,Z)=>{let ae=Z==="Asc"?"asc":"desc";zt.setMany([["sort",z],["dir",ae],["after",""],["before",""]])},Nb=z=>zt.setMany([["q",z],["after",""],["before",""]]),n$=(z,Z)=>zt.setMany([["f."+z,Z],["after",""],["before",""]]),i$=()=>Q(Me.endCursor,z=>zt.setMany([["after",z],["before",""]])),a$=()=>Q(Me.startCursor,z=>zt.setMany([["before",z],["after",""]])),il=m.commands.filter(z=>z.level==="Instance"),o$=il.length!==0,es;if(o$){let ae={key:"__actions",label:"",render:ie=>{let we=S(T(ie,"id"),ne),ge=m.statusField;ge!==void 0&&(T(ie,ge)!==void 0?di(ie,ge)===void 0&&Rve(f,m.name,ge):wve(f,m.name,ge));let ut=yk(il,ie,m.statusField).map(ir=>({TAG:"Action",label:ir.label,onClick:()=>L(ur=>({command:ir,rowId:we})),danger:!1}));return g(mpe,{items:ut,triggerLabel:"..."})},sortable:!1,width:"56px"};es=Cb.concat([ae])}else es=Cb;let s$=m.commands.filter(z=>z.level==="Collection"),Pb=z=>{let Z=z.map(ut=>D(j(ut),{})),ae=a2(Vf,nr),we=Mr&&pn.search?"":Bf,ge=o2(Db,Bu,nr),$e;return $e=typeof ge!="object"||ge.TAG==="ServerSort"?[void 0,Bu]:[ge._0,ge._1],B0e(j0e(q0e(Z,nr,ae[1]),nr,we),nr,$e[0],$e[1])},Ob=z=>{if(Pe!==void 0&&Pe.id!==ra){let Z=Tr(m.schema,S(r,Jt=>ja(Jt,m.name))),ae=B(Z.statusField,Jt=>dD(Jt,il,S(Ee,Ar=>Ar.transitions))),ie=(Jt,Ar,Wr)=>{let ts=il.find(io=>io.name===Jt);if(x===void 0||ts===void 0)return;let Gf={};ze(D(j(Wr),{})).forEach(io=>{Gf[io[0]]=io[1]}),Gf[D(ts.aggregateIdField,"id")]=Ar,Yn(Ar),yt(x(ts.mutationDocument,Gf).then(io=>{let al=Os(io);return typeof al!="object"?al==="Accepted"?pt||N(ao=>ao+1|0):pt||setTimeout(()=>N(ao=>ao+1|0),500):(console.warn("[AutoUI] "+m.name+": command "+Jt+" rejected"+oe(al._0.errorCode,"",ao=>" ("+ao+")")),N(ao=>ao+1|0)),Promise.resolve()}),io=>(N(al=>al+1|0),Promise.resolve()))},we=Pb(z).map(Jt=>Jt);if(t!==void 0&&Pe.id===Dl){let Jt=Tr(t.resource.schema,S(r,Ar=>ja(Ar,t.resource.name)));return g(dve,{mode:Pe,resource:t.resource,resourceSemantics:Jt,resourceRef:t.resourceRef,assignCommand:kme(il,t.resourceRef),eventReadModelName:m.name,eventSchema:m.schema,eventRows:we,eventSemantics:Z,eventAccent:S(Ee,Ar=>Ar.accent),onOpenEvent:(Ar,Wr)=>Q(S(j(Wr),Ht),Or),onCommand:ie})}let ge=m.name,$e=m.schema,ut=S(Ee,Jt=>Jt.accent),ir=(Jt,Ar)=>Q(S(j(Ar),Ht),Or),ur=B(ae,Jt=>ie),kr={readModelName:ge,rows:we,schema:$e,semantics:Z,accent:ut,onOpenRow:ir,onCommand:ur,statusCommandFor:ae};return Pe.render([kr])}else{let Z=Pb(z),ae=B(h,ur=>(kr=>Q(Ht(kr),Or))),ie=ur=>D(Ht(ur),JSON.stringify(ur)),we=(ur,kr)=>{let Jt=kr.map(ie),Ar={};return Jt.forEach(Wr=>{Ar[Wr]=!0}),Object.keys(Ar).length!==Jt.length&&kve(f,m.name),g(Zc,{columns:ur,data:kr,keyFn:ie,sortState:t$,onSort:r$,onRowClick:ae,activeKey:lt})},ge=BN(m.schema);if(ge===void 0)return we(es,Z);let $e=Rpe(Z,ge,ui(m.schema,ge)),ut=$e.length;if(ut===1||ut===0)return we(es,Z);let ir=es.filter(ur=>ur.key!==ge);return g("div",{children:$e.map(ur=>{let kr=ur[0];return P("div",{children:[g("div",{children:ct(kr),className:_ve}),we(ir,ur[1])],className:bve},kr)}),className:vve})}},l$=p!==void 0?Ob(p):typeof A!="object"?A==="Loading"?g(ql,{}):Ob(w):g(ka,{detail:A._0,onRetry:()=>N(z=>z+1|0)}),va;if(lt!==void 0&&h!==void 0){let Z=(p!==void 0?p:w).find(we=>tt(S(j(we),Ht),lt)),ae=T(J,lt);va=[lt,h,ae!==void 0?ae:Z]}else va=void 0;let Mb=z=>{let Z=z[2],ae=z[0];if(tt(Ue,ae))return g(ka,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>$n()});if(Z!==void 0)return z[1](Gr(ae),b,Ot(Z));let ie=0;if(typeof A!="object"){if(A==="Loading")return g(ql,{});if(typeof ve=="object")return g(ka,{detail:ve._0,onRetry:()=>N(we=>we+1|0)});if(ve!=="Loading")return g(ka,{title:"Row not found",detail:"The row data is no longer in the current page."});ie=2}else ie=2;return ie===2&&typeof ve!="object"&&ve==="Loading"?g(ql,{}):g(ka,{detail:A._0,onRetry:()=>N(we=>we+1|0)})},u$=Oe?g("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(z=>{let Z=z[1],ae=z[0],ie;return ie=$t==="Full"?ae==="full":ae==="split",P("button",{children:[g("span",{children:z[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),g("span",{children:Z})],className:ie?Sl.Style.btnActive:Sl.Style.btn,title:Z,onClick:we=>{d2(Ge,ae),Vt(ge=>ae)}},ae)}),"aria-label":"Layout",className:Sl.Style.group,role:"group"}):null,Lb=P("div",{children:[g("h2",{children:m.name,className:mve}),P("div",{children:[te.length>1?g(Sl.make,{modes:te,activeId:oe(Pe,ra,z=>z.id),onSelect:Xe}):null,u$,g(Pme,{live:U,canBeLive:pt,reconnecting:wr,onToggle:de}),s$.map(z=>g("button",{children:"+ "+z.label,className:yve,onClick:Z=>L(ae=>({command:z,rowId:void 0}))},z.name))],className:gve})],className:h2}),c$=P(jr,{children:[e$?g(rD,{filters:Tb,onFilterChange:n$,searchValue:Bf,onSearchChange:Nb}):g(tD,{value:Bf,onChange:Nb}),Dn>0?g(zme,{count:Dn,onClick:()=>{hn(z=>0),zt.setMany([["after",""],["before",""]]),N(z=>z+1|0)}}):null]}),d$=Zo?P("div",{children:[g("button",{children:"‹ Prev",className:p2,disabled:!Me.hasPreviousPage,onClick:z=>a$()}),g("button",{children:"Next ›",className:p2,disabled:!Me.hasNextPage,onClick:z=>i$()})],className:Sve}):null,zb=P(jr,{children:[c$,l$,d$]}),Hf;if($t==="Full")Hf=va!==void 0?g(u2.make,{refresh:()=>N(z=>z+1|0),children:P("div",{children:[g("div",{children:g("button",{children:"← "+m.name,className:xve,onClick:z=>$n()}),className:h2}),Mb([va[0],va[1],va[2]])],className:G0})}):P("div",{children:[Lb,zb],className:G0});else{let z=va!==void 0?Mb(va):g(vm,{title:"Select an item",description:"Choose a row on the left to see its details here."});Hf=g(u2.make,{refresh:()=>N(Z=>Z+1|0),children:P("div",{children:[Lb,g(_pe,{master:zb,detail:z})],className:G0})})}return P(jr,{children:[Hf,oe(O[0],null,z=>g(sb,{isOpen:!0,onClose:()=>L(Z=>{}),title:z.command.label,children:g(Sb,{schema:z.command.schema,aggregateId:z.rowId,aggregateIdField:z.command.aggregateIdField,injectNewId:z.command.level==="Collection",refFields:z.command.refFields,onSubmit:Z=>{if(x!==void 0){let ae=z.rowId;return ae!==void 0?Yn(ae):Q(T(Z,D(z.command.aggregateIdField,"id")),Yn),yt(x(z.command.mutationDocument,Eve(z.command.schema,Z)).then(ie=>{let we=Os(ie);if(typeof we!="object")return we==="Accepted"?(L(ge=>{}),pt||N(ge=>ge+1|0),Promise.resolve("Ok")):(L(ge=>{}),pt||setTimeout(()=>N(ge=>ge+1|0),500),Promise.resolve("Ok"));{let ge=we._0;return Of(x,Ze,ge.errorCode,ge.detail).then($e=>Promise.resolve({TAG:"Err",_0:$e}))}}),ie=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return L(ae=>{}),Promise.resolve("Ok")},submitLabel:"Execute"})}))]})}let Cve=Ave;function Dve(e,t,r){if(e.length<2)return[];let n=rt(e,Number.MAX_VALUE,(s,l)=>s<l?s:l),a=rt(e,Number.MIN_VALUE,(s,l)=>s>l?s:l)-n,o=t/(e.length-1|0);return e.map((s,l)=>({x:l*o,y:a===0?r/2:r-(s-n)/a*r}))}function $ve(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function Fve(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,a=r!==void 0?r:24,o=t!==void 0?t:"",s=Dve(e.values,i,a),l=o===""?"var("+v.brand+")":o;return s.length<2?null:g("svg",{children:g("polyline",{fill:"none",points:$ve(s),stroke:l,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),style:{display:"block",overflow:"visible"},height:a.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+a.toString()})}let Ive=Fve;function Jr(e){return"var("+e+")"}let Tve=y([M("flex"),ce("column"),u("gap",Jr(I.xs)),u("padding",Jr(I.lg)),u("background",Jr(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Jr(H.md))]),Nve=y([u("color",Jr(v.textSecondary)),u("font-size",Jr(R.sizeSm)),u("font-weight",Jr(R.weightMedium))]),Pve=y([M("flex"),W("baseline"),u("gap",Jr(I.sm))]),Ove=y([u("color",Jr(v.textPrimary)),u("font-size",Jr(R.sizeXxl)),u("font-weight",Jr(R.weightBold)),u("line-height",Jr(R.lineHeightTight))]);function Mve(e){switch(e){case"Up":return v.success;case"Down":return v.error;case"Neutral":return v.textDisabled}}function Lve(e){return y([u("color",Jr(Mve(e))),u("font-size",Jr(R.sizeSm)),u("font-weight",Jr(R.weightMedium))])}function zve(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=g("span",{children:i+" "+t,className:Lve(r)})}else n=null;return P("div",{children:[g("div",{children:e.label,className:Nve}),P("div",{children:[g("span",{children:e.value,className:Ove}),n],className:Pve}),oe(e.sublabel,null,i=>g("div",{children:i,style:{color:"var("+v.textDisabled+")",fontSize:"var("+R.sizeXs+")"}})),D(e.footer,null)],className:Tve})}let Uve=zve;function xD(e){return"var("+e+")"}let qve=y([M("grid"),u("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),u("gap",xD(I.md))]),jve=y([xe("pointer"),u("border-radius",xD(H.md)),We([u("filter","brightness(0.98)")])]);function Bve(e){let t=e.kpis;return t.length===0?null:g("div",{children:t.map(r=>{let n=B(r.spark,o=>g(Ive,{values:o,width:120,height:24})),i=g(Uve,{label:r.label,value:r.value,trend:r.trend,trendLabel:r.trendLabel,sublabel:r.sublabel,footer:n}),a=r.onOpen;return a!==void 0?g("div",{children:i,className:jve,role:"button",tabIndex:0,onKeyDown:o=>{if(o.key==="Enter")return a()},onClick:o=>a()},r.key):g("div",{children:i},r.key)}),className:qve})}let Vve=Bve,Rd=["var("+v.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function SD(e,t){return D(e.color,Rd[Ii(t,Rd.length)])}function Hve(e){let t=rt(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,a=(n.value>0?n.value:0)/t;return r.contents=i+a,[i,i+a]})}function Nc(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function or(e){return(Math.round(e*1e3)/1e3).toString()}function K0(e,t,r,n,i,a){let o=Nc(e,t,r,i),s=o[1],l=o[0],c=Nc(e,t,r,a),d=c[1],f=c[0],h=a-i>.5?"1":"0";if(n<=0)return"M "+or(e)+" "+or(t)+" L "+or(l)+" "+or(s)+" A "+or(r)+" "+or(r)+" 0 "+h+" 1 "+or(f)+" "+or(d)+" Z";let p=Nc(e,t,n,i),m=Nc(e,t,n,a);return"M "+or(l)+" "+or(s)+" A "+or(r)+" "+or(r)+" 0 "+h+" 1 "+or(f)+" "+or(d)+" L "+or(m[0])+" "+or(m[1])+" A "+or(n)+" "+or(n)+" 0 "+h+" 0 "+or(p[0])+" "+or(p[1])+" Z"}function Gve(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,a=t!==void 0?t:0,o=Hve(n);if(o.length===0)return null;let s=i/2,l=i/2-1,c=a>0?l*a:0;return g("svg",{children:o.map((d,f)=>{let h=d[1],p=d[0],m=n[f],b=SD(m,f),_=h-p>=.999?K0(s,s,l,c,p,p+.5)+" "+K0(s,s,l,c,p+.5,h):K0(s,s,l,c,p,h);return g("path",{children:g("title",{children:m.label}),d:_,fill:b},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 Kve=Gve,Wve=["var("+v.brand+")","var("+v.success+")"];function Qve(e){let t=e.flatMap(i=>i.values),r=rt(t,Number.MAX_VALUE,(i,a)=>i<a?i:a),n=rt(t,Number.MIN_VALUE,(i,a)=>i>a?i:a);return[r,n]}function Yve(e){let t=e.height,r=e.width,n=e.series,i=r!==void 0?r:320,a=t!==void 0?t:120;if(n.length===0||n.every(m=>m.values.length<2))return null;let o=Qve(n),s=o[0],l=o[1]-s,c=l===0?1:l,d=a-16,f=rt(n,0,(m,b)=>m>b.values.length?m:b.values.length),h=i/(f-1|0),p=8+d;return g("svg",{children:n.map((m,b)=>{let _=D(m.color,D(Wve[b],"var("+v.brand+")")),E=m.values.map((C,$)=>{let A=$*h,F=8+d-(C-s)/c*d;return[A,F]}).map(C=>C[0].toString()+","+C[1].toString()).join(" "),k=(m.values.length-1|0)*h,w="0,"+p.toString()+" "+E+(" "+k.toString()+","+p.toString());return P("g",{children:[g("polygon",{fill:_,fillOpacity:"0.15",points:w,stroke:"none"}),g("polyline",{fill:"none",points:E,stroke:_,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},m.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:a.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+a.toString()})}let Jve=Yve;function Xve(e){let t=e.size,r=t!==void 0?t:120;return g(Kve,{slices:e.slices,size:r,innerRatio:.6})}let Zve=Xve;function ko(e){return"var("+e+")"}function ebe(e){return y([M("flex"),ce("column"),W("center"),u("gap","2px"),u("width","100%"),u("max-width",e.toString()+"px")])}let tbe=y([Qt("relative"),u("width","100%"),u("line-height","0")]),rbe=y([Qt("absolute"),u("left","0"),u("right","0"),u("bottom","0"),u("text-align","center"),u("line-height","1.1"),u("font-size",ko(R.sizeXl)),u("font-weight",ko(R.weightMedium)),u("color",ko(v.textPrimary))]),nbe=y([M("flex"),Ve("spaceBetween"),u("width","100%"),u("font-size",ko(R.sizeXs)),u("color",ko(v.textDisabled))]),ibe=y([u("font-size",ko(R.sizeSm)),u("color",ko(v.textSecondary))]);function abe(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function Cr(e){return(Math.round(e*100)/100).toString()}function b2(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function _2(e,t,r,n,i){let a=b2(e,t,r,n),o=b2(e,t,r,i);return"M "+Cr(a[0])+" "+Cr(a[1])+" A "+Cr(r)+" "+Cr(r)+" 0 0 1 "+Cr(o[0])+" "+Cr(o[1])}function obe(e){let t=e.size,r=e.caption,n=e.max,i=e.min,a=e.value,o=i!==void 0?i:0,s=t!==void 0?t:160;if(n<=o)return null;let l=abe(a,o,n),c=s*.09,d=s/2,f=s/2-c/2,h=f+c/2,p=h+c/2;return P("div",{children:[P("div",{children:[P("svg",{children:[g("path",{d:_2(d,h,f,0,1),fill:"none",stroke:"var("+v.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:Cr(c)}),l<=0?null:g("path",{d:_2(d,h,f,0,l),fill:"none",stroke:"var("+v.brand+")",strokeLinecap:"round",strokeWidth:Cr(c)})],"aria-label":Cr(a)+" of "+Cr(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:Cr(p),width:Cr(s),viewBox:"0 0 "+Cr(s)+" "+Cr(p)}),g("div",{children:D(e.display,Cr(a)),className:rbe})],className:tbe}),P("div",{children:[g("span",{children:Cr(o)}),g("span",{children:Cr(n)})],className:nbe}),r!==void 0?g("div",{children:r,className:ibe}):null],className:ebe(s)})}let sbe=obe;function jl(e){return"var("+e+")"}let lbe=y([M("flex"),ce("column"),u("gap","6px")]),ube=y([u("overflow-x","auto")]),cbe=y([M("flex"),u("gap","4px"),W("flexStart")]);function dbe(e){return y([M("grid"),u("grid-template-rows","repeat(7, "+e.toString()+"px)"),u("gap","2px"),W("center"),u("font-size",jl(R.sizeXs)),u("color",jl(v.textDisabled)),u("line-height","1")])}function fbe(e){return y([M("grid"),u("grid-auto-flow","column"),u("grid-auto-columns",e.toString()+"px"),u("grid-template-rows","repeat(7, "+e.toString()+"px)"),u("gap","2px")])}function hbe(e){return y([u("border-radius","2px"),u("border","1px solid var("+v.borderSubtle+")"),u("background",e<=0?"transparent":"color-mix(in srgb, var("+v.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let pbe=y([u("visibility","hidden")]),mbe=y([M("flex"),W("center"),li("wrap"),u("gap",jl(I.md)),u("font-size",jl(R.sizeXs)),u("color",jl(v.textSecondary))]),gbe=y([M("flex"),W("center"),u("gap","4px")]);function vbe(e){return y([u("width","10px"),u("height","10px"),u("border-radius","2px"),u("border","1px solid var("+v.borderSubtle+")"),u("background","color-mix(in srgb, var("+v.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function bbe(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function _be(e){let t=e[0];if(t===void 0)return[];let r=Ma(bbe(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return Ma(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function ybe(e){return rt(e,0,(t,r)=>r.value>t?r.value:t)}function y2(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function xbe(e){return e%2===0?D(lv[e],""):""}function Sbe(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=_be(r);if(i.length===0)return null;let a=ybe(r),o=r[0],s=r[r.length-1|0],l=o!==void 0&&s!==void 0?Ro(o.time)+" – "+Ro(s.time):"";return P("div",{children:[g("div",{children:P("div",{children:[g("div",{children:Ma(7,c=>g("span",{children:xbe(c)},c.toString())),className:dbe(n)}),g("div",{children:i.map((c,d)=>c.map((f,h)=>f!==void 0?g("div",{className:hbe(R3(f.value,a)),title:Ps(f.time)+" "+Ro(f.time)+": "+y2(f.value)},f.time.toString()):g("div",{className:pbe},"b:"+d.toString()+":"+h.toString()))),className:fbe(n)})],className:cbe}),className:ube}),P("div",{children:[g("span",{children:l}),P("span",{children:["less",k3.map(c=>g("span",{className:vbe(c)},c.toString())),"more (max "+y2(a)+")"],className:gbe})],className:mbe})],className:lbe})}let Ebe=Sbe;function un(e){return"var("+e+")"}let wbe=y([M("flex"),ce("column"),u("gap","2px")]),Rbe=y([M("flex"),ce("column"),u("gap","3px")]),kbe=y([M("flex"),Ve("spaceBetween"),W("baseline"),u("gap",un(I.sm)),u("font-size",un(R.sizeSm))]),Abe=y([u("color",un(v.textPrimary))]),Cbe=y([u("color",un(v.textPrimary)),u("font-weight",un(R.weightMedium)),u("white-space","nowrap")]),Dbe=y([u("color",un(v.textSecondary)),u("font-weight",un(R.weightNormal))]),$be=y([u("background",un(v.surfaceSubtle)),u("border-radius",un(H.sm)),u("height","14px"),Lo("hidden")]);function Fbe(e,t){return y([u("background",t),u("border-radius",un(H.sm)),u("height","100%"),u("width",e.toString()+"%"),u("min-width",e>0?"2px":"0")])}let Ibe=y([u("padding","2px 0 4px"),u("font-size",un(R.sizeXs)),u("color",un(v.textDisabled))]),Tbe=y([u("padding-top","4px"),u("font-size",un(R.sizeXs)),u("color",un(v.textDisabled))]);function x2(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function Nbe(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function Pbe(e){let t=oe(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:x2(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?x2(i.value-r.value,i.value):void 0}})}function Obe(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=Pbe(t),i=oe(t[0],0,a=>a.value);return P("div",{children:[t.map((a,o)=>{let s=n[o],l=i<=0?0:a.value/i*100,c=S(s,d=>d.dropOff);return P("div",{children:[c!==void 0?g("div",{children:"↓ "+c.toString()+"% drop-off",className:Ibe}):null,P("div",{children:[P("div",{children:[g("span",{children:a.label,className:Abe}),P("span",{children:[Nbe(a.value),o===0?null:g("span",{children:" · "+oe(s,0,d=>d.conversion).toString()+"%",className:Dbe})],className:Cbe})],className:kbe}),g("div",{children:g("div",{className:Fbe(l,D(a.color,"var("+v.brand+")"))}),className:$be})],className:Rbe})]},a.label+":"+o.toString())}),r!==void 0?g("div",{children:r,className:Tbe}):null],className:wbe})}let Mbe=Obe;function Bl(e){return"var("+e+")"}let Lbe=y([M("flex"),ce("column"),u("gap","2px")]),zbe=y([M("flex"),u("gap","4px")]),ED=[u("font-size",Bl(R.sizeXs)),u("color",Bl(v.textDisabled)),u("white-space","nowrap")],Ube=y(ED.concat([M("flex"),ce("column"),Ve("spaceBetween"),u("text-align","right")]));function qbe(e){return y(ED.concat([M("flex"),Ve("spaceBetween"),u("margin-left",e.toString()+"px")]))}let jbe=y([M("flex"),Ve("spaceBetween"),u("gap",Bl(I.sm)),u("font-size",Bl(R.sizeXs)),u("color",Bl(v.textSecondary))]);function Bbe(e){let t=e[0];if(t!==void 0)return rt(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 Xt(e){return(Math.round(e*100)/100).toString()}function S2(e,t,r){return r<=t?.5:(e-t)/(r-t)}function Vbe(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,a=e.points,o=r!==void 0?r:320,s=t!==void 0?t:200,l=Bbe(a);if(l===void 0)return null;let c=3.5+1,d=o-c*2,f=s-c*2,h,p=0;return i!==void 0||n!==void 0?p=1:h=null,p===1&&(h=P("div",{children:[g("span",{children:"↑ "+D(n,"y")}),g("span",{children:D(i,"x")+" →"})],className:jbe})),P("div",{children:[P("div",{children:[P("div",{children:[g("span",{children:Xt(l.yMax)}),g("span",{children:Xt(l.yMin)})],className:Ube,style:{width:"34px"}}),P("svg",{children:[g("line",{stroke:"var("+v.borderSubtle+")",strokeWidth:"1",x1:Xt(c),x2:Xt(o-c),y1:Xt(s-c),y2:Xt(s-c)}),g("line",{stroke:"var("+v.borderSubtle+")",strokeWidth:"1",x1:Xt(c),x2:Xt(c),y1:Xt(c),y2:Xt(s-c)}),a.map((m,b)=>{let _=c+S2(m.x,l.xMin,l.xMax)*d,x=c+(1-S2(m.y,l.yMin,l.yMax))*f;return g("circle",{children:g("title",{children:m.label+" — "+D(i,"x")+": "+Xt(m.x)+", "+D(n,"y")+": "+Xt(m.y)}),cx:Xt(_),cy:Xt(x),fill:D(m.color,"var("+v.brand+")"),fillOpacity:"0.75",r:Xt(3.5)},m.label+":"+b.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Xt(s),width:Xt(o),viewBox:"0 0 "+Xt(o)+" "+Xt(s)})],className:zbe}),P("div",{children:[g("span",{children:Xt(l.xMin)}),g("span",{children:Xt(l.xMax)})],className:qbe(38)}),h],className:Lbe})}let Hbe=Vbe;function ii(e){return"var("+e+")"}let Gbe=y([M("flex"),ce("column"),u("gap","6px"),Er(pe(0)),u("padding","0"),u("list-style","none")]),wD=[M("grid"),u("grid-template-columns","1.5rem 1fr auto"),W("center"),u("gap",ii(I.sm)),u("font-size",ii(R.sizeSm)),u("color",ii(v.textPrimary))],Kbe=y(wD),Wbe=y(wD.concat([xe("pointer"),u("background","transparent"),u("border","none"),u("padding","2px 0"),u("text-align","left"),u("width","100%"),u("font","inherit"),We([u("color",ii(v.brand))])])),Qbe=y([u("align-self","start"),u("font-size",ii(R.sizeXs)),u("color",ii(v.textDisabled)),u("text-align","right"),u("font-variant-numeric","tabular-nums")]),Ybe=y([M("flex"),ce("column"),u("gap","3px"),DE(pe(0))]),Jbe=y([u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),Xbe=y([u("background",ii(v.surfaceSubtle)),u("border-radius",ii(H.sm)),u("height","6px"),Lo("hidden")]);function Zbe(e){return y([u("background",ii(v.brand)),u("border-radius",ii(H.sm)),u("height","100%"),u("width",e.toString()+"%"),u("min-width",e>0?"2px":"0")])}let e1e=y([u("align-self","start"),u("font-weight",ii(R.weightMedium)),u("white-space","nowrap"),u("font-variant-numeric","tabular-nums")]);function t1e(e,t){return t<=0||e<=0?0:e/t*100}function r1e(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=rt(n,0,(a,o)=>o.value>a?o.value:a);return g("ol",{children:n.map((a,o)=>{let s=P(jr,{children:[g("span",{children:(o+1|0).toString(),className:Qbe}),P("span",{children:[g("span",{children:a.label,className:Jbe,title:a.label}),g("span",{children:g("span",{className:Zbe(t1e(a.value,i))}),className:Xbe})],className:Ybe}),g("span",{children:a.display,className:e1e})]}),l=a.onOpen;return g("li",{children:l!==void 0?g("button",{children:s,className:Wbe,type:"button",onClick:c=>l()}):g("div",{children:s,className:Kbe})},a.key)}),className:Gbe})}let n1e=r1e;function i1e(e){return rt(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function a1e(e){let t=e.height,r=e.width,n=e.bars,i=r!==void 0?r:320,a=t!==void 0?t:120;if(n.length===0)return null;let o=rt(n,0,(f,h)=>{let p=i1e(h);return f>p?f:p}),s=o===0?1:o,l=n.length,c=(i-2*(l+1|0))/l,d=a-4;return g("svg",{children:n.map((f,h)=>{let p=2+h*(c+2),m={contents:a};return g("g",{children:f.segments.map((b,_)=>{let x=b.value>0?b.value:0,E=x/s*d,k=m.contents-E;return m.contents=k,x===0?null:g("rect",{children:g("title",{children:f.label+" — "+b.key+": "+x.toString()}),height:E.toString(),width:c.toString(),fill:D(b.color,"var("+v.brand+")"),x:p.toString(),y:k.toString()},b.key+":"+_.toString())})},f.label+":"+h.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:a.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+a.toString()})}let o1e=a1e;function Nt(e){return"var("+e+")"}let s1e=y([M("flex"),ce("column"),u("gap",Nt(I.lg))]),l1e=y([u("font-size",Nt(R.sizeXl)),u("font-weight",Nt(R.weightMedium)),u("color",Nt(v.textPrimary)),Er(pe(0))]),u1e=y([M("grid"),u("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),u("gap",Nt(I.md))]),ds=y([M("flex"),ce("column"),u("gap",Nt(I.sm)),u("padding",Nt(I.lg)),u("background",Nt(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",Nt(H.md))]),fs=y([u("font-size",Nt(R.sizeSm)),u("font-weight",Nt(R.weightMedium)),u("color",Nt(v.textSecondary))]),c1e=y([M("flex"),W("center"),u("gap",Nt(I.lg))]),E2=y([M("flex"),ce("column"),u("gap","4px"),u("font-size",Nt(R.sizeSm)),u("color",Nt(v.textSecondary))]),w2=y([M("flex"),W("center"),u("gap","6px")]);function R2(e){return y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let d1e=y([u("font-size",Nt(R.sizeXs)),u("color",Nt(v.textDisabled))]),f1e=y([M("flex"),Ve("spaceBetween"),W("center"),u("gap",Nt(I.sm))]),h1e=y([M("inlineFlex"),u("gap",Nt(I.xs))]);function p1e(e){return y([u("background",e?Nt(v.surfaceSubtle):"transparent"),u("border","1px solid var("+v.border+")"),u("border-radius",Nt(H.sm)),u("padding","2px var("+I.sm+")"),u("font-size",Nt(R.sizeXs)),u("color",Nt(e?v.textPrimary:v.textSecondary)),xe("pointer")])}function kd(e,t){return S(T(e,t),Ti)}function ju(e){return e.map(t=>D(j(t),{}))}function Qp(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=ee(ju(e),a=>kd(a,r)),i=rt(n,0,(a,o)=>a+o);return t==="sum"?i:n.length===0?0:i/n.length}function Ad(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function Hi(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 RD(e,t,r,n){let i=Ma(r,a=>[]);return ju(e).forEach(a=>Q(S(S(T(a,t),ne),Ni),o=>{let s=Math.floor((n-o)/864e5)|0;if(s>=0&&s<r)return Q(i[(r-1|0)-s|0],l=>{l.push(a)})})),i}function Yp(e,t,r,n,i,a){return RD(e,t,r,n).map(o=>Qp(o.map(s=>s),i,a))}function kD(e,t){return ee(ju(e),r=>di(r,t))}function AD(e,t,r){let n=ui(t,r),i=rt(e.filter(a=>!n.includes(a)),[],(a,o)=>a.includes(o)?a:a.concat([o]));return n.concat(i)}function m1e(e,t,r){let n=kD(e,r);return ee(AD(n,t,r),i=>{let a=n.filter(o=>o===i).length;if(a!==0)return{label:ct(i),value:a}})}function CD(e){return Rd[Ii(e,Rd.length)]}function g1e(e,t,r,n,i,a){let o=RD(e,t,r,n),s=f=>ee(f,h=>di(h,a)),l=o.flatMap(s),c=AD(l,i,a).filter(f=>l.some(h=>h===f)),d=o.map((f,h)=>{let p=s(f);return{label:Ps(n-((r-1|0)-h|0)*864e5),segments:c.map((m,b)=>({key:ct(m),value:p.filter(_=>_===m).length,color:CD(b)}))}});return{statuses:c,bars:d}}function v1e(e,t,r){let n=ui(t,r),i=kD(e,r),a=ee(i,o=>{let s=n.indexOf(o);if(!(s<0))return s});return{stages:n.map((o,s)=>({label:ct(o),value:a.filter(l=>l>=s).length})),excluded:i.length-a.length|0}}function b1e(e,t){return B(dn(e).find(r=>r[0]===t),r=>r[1])}function DD(e,t){return B(T(e.semantics,t),r=>r.semantic)}function _1e(e,t,r){let n=b1e(e,t);if(n===void 0)return;let i=Kl(n,"maximum");if(i===void 0)return tt(DD(r,t),"Percent")?{min:0,max:100}:void 0;let a=D(Kl(n,"minimum"),0);if(i>a)return{min:a,max:i}}function k2(e,t,r){let n=DD(e,t);if(n===void 0)return Ad(r);switch(n){case"Currency":return Gw(r);case"Percent":return Kw(r);case"Bytes":return Ww(r);case"Duration":return Qw(r);default:return Ad(r)}}function y1e(e,t,r,n){return ee(ju(e),i=>B(kd(i,t),a=>{let o=D(S(T(i,"id"),ne),"");return{id:o,label:D(S(T(i,r),ne),o===""?"—":o),value:a}})).toSorted((i,a)=>a.value-i.value).slice(0,n)}function x1e(e,t,r,n){return ee(ju(e),i=>{let a=kd(i,t),o=kd(i,r);if(a!==void 0&&o!==void 0)return{label:D(S(T(i,n),ne),D(S(T(i,"id"),ne),"—")),x:a,y:o}})}function S1e(e,t,r,n,i,a){return Yp(e,t,r,n,i,a).map((o,s)=>({time:qn(n-((r-1|0)-s|0)*VG),value:o}))}function E1e(e){let t=X(()=>"Days30"),r=t[1],n=t[0],i=(o,s)=>g("button",{children:s,className:p1e(n===o),type:"button",onClick:l=>r(c=>o)}),a;return a=n==="Days30"?e.body:g(Ebe,{days:e.yearDays}),P("div",{children:[P("div",{children:[g("span",{children:e.title,className:fs}),P("div",{children:[i("Days30","30 days"),i("Year","Year")],className:h1e})],className:f1e}),a],className:ds})}function w1e(e){let t=e.mockRows,r=e.uiHints,n=e.readModels,i=e.metrics,a=e.pluginId,o=Qa(),s=ee(rt(i.map(A=>A.view),[],(A,F)=>A.includes(F)?A:A.concat([F])),A=>n.find(F=>F.name===A)),l=s.map(A=>{let F=To(A,jn(t));return[A,F]}),c=A=>t!==void 0?D(T(t,A),[]):oe(l.find(F=>F[0].name===A),[],F=>F[1].rows),d=Date.now(),f=ee(i,A=>B(s.find(F=>F.name===A.view),F=>({metric:A,readModel:F,rows:c(F.name),semantics:Tr(F.schema,S(r,N=>ja(N,F.name)))}))),h=f.map((A,F)=>{let N=D(A.metric.aggregate,"count"),O=B(A.semantics.dateSpan,L=>Yp(A.rows,L.startField,14,d,N,A.metric.field));return{key:F.toString()+":"+A.readModel.name,label:Hi(A.metric),value:Ad(Qp(A.rows,N,A.metric.field)),sublabel:A.readModel.name,spark:O,onOpen:()=>o(Wi(ya(a,A.readModel.name)))}}),p=A=>{let F=A.readModel.statusField;return F!==void 0?F:A.semantics.statusField},m=ee(f,A=>B(A.semantics.dateSpan,F=>{let N=D(A.metric.aggregate,"count"),O=Hi(A.metric)+" — trend",L=p(A),q;if(N==="count"&&L!==void 0){let re=g1e(A.rows,F.startField,30,d,A.readModel.schema,L),V=re.statuses;q=V.length===0?void 0:P(jr,{children:[g(o1e,{bars:re.bars}),g("div",{children:V.map((Y,J)=>P("span",{children:[g("span",{className:R2(CD(J))}),ct(Y)],className:w2},Y)),className:E2})]})}else q=void 0;let K;if(q!==void 0)K=q;else{let re=Yp(A.rows,F.startField,30,d,N,A.metric.field);K=g(Jve,{series:[{label:Hi(A.metric),values:re}]})}return g(E1e,{title:O,body:K,yearDays:S1e(A.rows,F.startField,365,d,N,A.metric.field)},"trend:"+Hi(A.metric))})),b=ee(f,A=>{let F=A.metric.aggregate,N=A.metric.field;if(F==="avg"&&N!==void 0)return B(_1e(A.readModel.schema,N,A.semantics),O=>{let L=Qp(A.rows,"avg",N);return P("div",{children:[g("span",{children:Hi(A.metric),className:fs}),g(sbe,{value:L,min:O.min,max:O.max,display:k2(A.semantics,N,L),caption:A.readModel.name+" · "+ct(N)})],className:ds},"gauge:"+Hi(A.metric))})}),_=[],x=ee(f,A=>{let F=A.metric.aggregate,N=A.metric.field;if(F===void 0)return;switch(F){case"avg":case"sum":break;default:return}if(N===void 0||_.includes(A.readModel.name+":"+N))return;_.push(A.readModel.name+":"+N);let O=y1e(A.rows,N,A.readModel.labelField,10).map(L=>({key:L.id===""?L.label:L.id,label:L.label,display:k2(A.semantics,N,L.value),value:L.value,onOpen:L.id===""?void 0:()=>o(ta(a,A.readModel.name,L.id,[]))}));if(O.length!==0)return P("div",{children:[g("span",{children:A.readModel.name+" — top by "+ct(N),className:fs}),g(n1e,{entries:O})],className:ds},"top:"+A.readModel.name+":"+N)}),E=ee(f,A=>{let F=A.metric.viz,N=A.metric.field,O=A.metric.xField;if(F===void 0||F!=="scatter"||N===void 0||O===void 0)return;let L=x1e(A.rows,O,N,A.readModel.labelField);if(L.length!==0)return P("div",{children:[g("span",{children:A.readModel.name+" — "+ct(N)+" by "+ct(O),className:fs}),g(Hbe,{points:L,xLabel:ct(O),yLabel:ct(N)})],className:ds},"scatter:"+Hi(A.metric))}),k=ee(f,A=>{let F=A.metric.viz,N=p(A);if(F===void 0||F!=="funnel"||N===void 0)return;let O=v1e(A.rows,A.readModel.schema,N),L=O.stages;if(L.length===0)return;let q=O.excluded;return P("div",{children:[g("span",{children:Hi(A.metric)+" — "+ct(N)+" funnel",className:fs}),g(Mbe,{stages:L,note:q===0?void 0:q.toString()+" row(s) with an unlisted "+ct(N)+" excluded"})],className:ds},"funnel:"+Hi(A.metric))}),w=ee(f,A=>{let F=D(A.metric.aggregate,"count"),N=tt(A.metric.viz,"funnel")?void 0:p(A);if(F!=="count"||N===void 0)return;let O=m1e(A.rows,A.readModel.schema,N);if(O.length!==0)return P("div",{children:[g("span",{children:A.readModel.name+" — by "+ct(N),className:fs}),P("div",{children:[g(Zve,{slices:O}),g("div",{children:O.map((L,q)=>P("span",{children:[g("span",{className:R2(SD(L,q))}),L.label+" ("+Ad(L.value)+")"],className:w2},L.label)),className:E2})],className:c1e})],className:ds},"status:"+A.readModel.name)}),C=He(t)?[]:ee(l,A=>{let F=A[0],N=A[1].fetchState;return typeof N!="object"?N==="Loading"?F.name+": loading…":void 0:F.name+": "+N._0}),$=[k,E,b,m,x,w].flatMap(A=>A);return P("div",{children:[g("h2",{children:"Dashboard",className:l1e}),g(Vve,{kpis:h}),$.length!==0?g("div",{children:$,className:u1e}):null,C.length!==0?g("span",{children:C.join(" · "),className:d1e}):null],className:s1e})}let R1e=w1e,$D={actor:"",eventType:"",timeFrom:"",timeTo:""};function A2(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function xr(e){return"var("+e+")"}let k1e=y([M("flex"),ce("column"),u("gap",xr(I.sm))]),A1e=y([M("flex"),W("center"),u("gap",xr(I.md)),li("wrap"),u("padding-bottom",xr(I.xs)),u("border-bottom","1px solid var("+v.border+")")]),C1e=y([M("flex"),W("center"),u("gap","4px")]),C2=y([u("color",xr(v.textSecondary)),u("font-size",xr(R.sizeSm)),u("white-space","nowrap")]),D2=y([u("background",xr(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",xr(H.sm)),u("padding","2px var("+I.sm+")"),u("font-size",xr(R.sizeSm)),u("color",xr(v.textPrimary)),u("outline","none"),Ja([u("border-color",xr(v.brand))])]),D1e=y([u("background","none"),u("border","none"),u("padding","0"),u("color",xr(v.brand)),u("font-size",xr(R.sizeSm)),xe("pointer"),We([u("text-decoration","underline")])]),$1e=y([M("flex"),Ve("center"),u("padding-top",xr(I.xs))]),F1e=y([u("background",xr(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",xr(H.sm)),u("padding","4px var("+I.md+")"),u("font-size",xr(R.sizeSm)),u("color",xr(v.textPrimary)),xe("pointer"),We([u("border-color",xr(v.brand))])]);function I1e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,a=e.onFilterChange,o=e.filter,s=i!==void 0?i:!1,l=n!==void 0?n:!1,c=t!==void 0?t:"No recorded history for this record",d=ee([["actor","Actor",e.actors.map(h=>({label:h,value:h})),o.actor],["eventType","Event",e.eventTypes.map(h=>({label:ct(h),value:h})),o.eventType]],h=>{let p=h[2];if(p.length!==0)return{key:h[0],label:h[1],options:p,value:h[3]}});return P("div",{children:[P("div",{children:[g(rD,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return a({actor:p,eventType:o.eventType,timeFrom:o.timeFrom,timeTo:o.timeTo});case"eventType":return a({actor:o.actor,eventType:p,timeFrom:o.timeFrom,timeTo:o.timeTo});default:return}}}),P("div",{children:[g("span",{children:"From:",className:C2}),g("input",{className:D2,type:"date",value:o.timeFrom,onChange:h=>a({actor:o.actor,eventType:o.eventType,timeFrom:h.target.value,timeTo:o.timeTo})}),g("span",{children:"To:",className:C2}),g("input",{className:D2,type:"date",value:o.timeTo,onChange:h=>a({actor:o.actor,eventType:o.eventType,timeFrom:o.timeFrom,timeTo:h.target.value})})],className:C1e}),A2(o)?g("button",{children:"Clear filters",className:D1e,onClick:h=>a($D)}):null],className:A1e}),g(FK,{entries:e.entries,emptyLabel:A2(o)?"No events match these filters":c,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),s?g("div",{children:g("button",{children:l?"Loading…":"Load earlier events",className:F1e,disabled:l,onClick:h=>Q(r,p=>p())}),className:$1e}):null],className:k1e})}let T1e=I1e;function N1e(e){if(e!=="")return e+"T00:00:00.000Z"}function P1e(e){if(e!=="")return e+"T23:59:59.999Z"}function O1e(e,t,r){let n={};return n.entityId=e,n.first=50,Q(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),Q(N1e(t.timeFrom),i=>{n.timeFrom=i}),Q(P1e(t.timeTo),i=>{n.timeTo=i}),n}function M1e(e){let t=e.entityId,r=e.binding,n=Gn(),i=Au(),a=oe(e.requiredAccess,!1,q=>!i(q)),o=X(()=>[]),s=o[1],l=o[0],c=X(()=>$D),d=c[1],f=c[0],h=X(()=>!0),p=h[1],m=X(()=>{}),b=m[1],_=m[0],x=X(()=>!1),E=x[1],w=X(()=>{})[1],C=X(()=>0),$=C[1],A=C[0],F=Ke(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;Re(()=>{if(!a)if(n!==void 0){let q=A===0,K=q?void 0:F.current;p(re=>!0),b(re=>{}),yt(n(r.queryDocument,O1e(t,f,K)).then(re=>{let V=qce(re,r.queryField),Y=jce(re,r.queryField),J=Y[1],ue=Y[0];return s(se=>q?V:V.concat(se)),E(se=>ue),w(se=>J),F.current=J,p(se=>!1),Promise.resolve()}),re=>(p(V=>!1),b(V=>"Could not load the history for this record."),Promise.resolve()))}else b(q=>"Not connected")},[N,A,a]);let O=q=>{F.current=void 0,$(K=>0),s(K=>[]),d(K=>q)},L=()=>$(q=>q+1|0);return a?null:_!==void 0?g(ka,{title:"History unavailable",detail:_,onRetry:()=>$(q=>q+1|0)}):g(T1e,{entries:Kce(l,r.displayName),actors:Wce(l),eventTypes:Qce(l),filter:f,onFilterChange:O,hasMore:x[0],loading:h[0],onLoadMore:L})}let L1e=M1e;function Di(e){return"var("+e+")"}let z1e=y([M("flex"),ce("column"),u("gap",Di(I.lg))]),U1e=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",Di(I.md))]),q1e=y([u("font-size",Di(R.sizeXl)),u("font-weight",Di(R.weightMedium)),u("color",Di(v.textPrimary)),Er(pe(0))]),j1e=y([M("flex"),li("wrap"),W("center"),u("gap",Di(I.md)),u("font-size",Di(R.sizeSm)),u("color",Di(v.textSecondary))]),B1e=y([M("inlineFlex"),W("center"),u("gap","4px"),xe("pointer")]);function V1e(e){return y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let H1e=y([u("font-size",Di(R.sizeXs)),u("color",Di(v.textDisabled))]);function G1e(e){let t=e.uiHints,r=e.pluginId,n=Qa(),i=X(()=>[]),a=i[1],o=i[0],s=e.readModels.map((f,h)=>{let p=!o.includes(f.name),m=To(f,p);return[f,h,p,m]}),l=(f,h)=>D(S(S(t,p=>Ai(p,f.name)),p=>p.accent),zs[Ii(h,zs.length)]),c=ee(s,f=>{if(!f[2])return;let h=f[0];return{readModelName:h.name,rows:f[3].rows,schema:h.schema,semantics:Tr(h.schema,S(t,p=>ja(p,h.name))),accent:l(h,f[1]),onOpenRow:(p,m)=>n(ta(r,h.name,p,[]))}}),d=ee(s,f=>{let h=f[0],p=f[3].fetchState;if(f[2])return typeof p!="object"?p==="Loading"?h.name+": loading…":void 0:h.name+": "+p._0});return P("div",{children:[g("div",{children:g("h2",{children:e.canvasName,className:q1e}),className:U1e}),g("div",{children:s.map(f=>{let h=f[0];return P("label",{children:[g("input",{checked:f[2],type:"checkbox",onChange:p=>{let m=h.name;a(b=>b.includes(m)?b.filter(_=>_!==m):b.concat([m]))}}),g("span",{className:V1e(l(h,f[1]))}),h.name],className:B1e},h.name)}),className:j1e}),e.mode.render(c),d.length!==0?g("span",{children:d.join(" · "),className:H1e}):null],className:z1e})}let K1e=G1e;function Ao(e){return"var("+e+")"}let W1e=y([M("flex"),W("center"),u("gap",Ao(I.xs)),u("font-size",Ao(R.sizeSm)),u("color",Ao(v.textSecondary))]),Q1e=y([u("color",Ao(v.brand)),u("text-decoration","none"),We([u("text-decoration","underline")])]),Y1e=y([u("color",Ao(v.textPrimary)),u("font-weight",Ao(R.weightMedium))]),J1e=y([u("color",Ao(v.textDisabled)),$E("none")]);function X1e(e){let t=e.crumbs;return g("nav",{children:t.map((r,n)=>{let i=n===(t.length-1|0);return P(im,{children:[n>0?g("span",{children:"/","aria-hidden":!0,className:J1e}):null,i||jn(r.href)?g("span",{children:r.label,className:Y1e}):g("a",{children:r.label,className:Q1e,href:D(r.href,"#")})]},r.label)}),"aria-label":"breadcrumbs",className:W1e})}let Z1e=X1e;function e_e(e,t){let r=e.indexOf(t);return e.map((n,i)=>{let a=r<0?"Upcoming":i<r?"Done":i===r?"Current":"Upcoming";return[n,a]})}function t_e(e,t,r){return e_e(ui(e,t),r).map(n=>{let i=n[0];return{key:i,label:ct(i),state:n[1]}})}function Hn(e){return"var("+e+")"}let r_e=y([M("flex"),W("flexStart"),u("gap","0"),u("width","100%")]),n_e=y([M("flex"),ce("column"),W("center"),u("gap","4px"),u("flex","0 0 auto")]);function i_e(e){return y([u("flex","1 1 auto"),u("height","2px"),u("margin","0 6px"),u("margin-top","11px"),u("min-width","16px"),u("background",Hn(e?v.brand:v.borderSubtle))])}let Eb=[M("inlineFlex"),W("center"),Ve("center"),u("width","24px"),u("height","24px"),u("border-radius","50%"),u("font-size",Hn(R.sizeXs)),u("font-weight",Hn(R.weightMedium)),u("box-sizing","border-box")],a_e=y(Eb.concat([u("background",Hn(v.brand)),u("color","#fff")])),o_e=y(Eb.concat([u("background",Hn(v.surface)),u("color",Hn(v.brand)),u("border","2px solid var("+v.brand+")")])),s_e=y(Eb.concat([u("background",Hn(v.surface)),u("color",Hn(v.textDisabled)),u("border","1px solid var("+v.border+")")])),FD=[u("font-size",Hn(R.sizeXs)),u("text-align","center"),u("max-width","96px")],l_e=y(FD.concat([u("color",Hn(v.textPrimary))])),u_e=y(FD.concat([u("color",Hn(v.textDisabled))])),c_e=y([u("display","none")]);function d_e(e){switch(e){case"Done":return a_e;case"Current":return o_e;case"Upcoming":return s_e}}function f_e(e){switch(e){case"Done":case"Current":return l_e;case"Upcoming":return u_e}}function h_e(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function p_e(e){let t=e.compact,r=t!==void 0?t:!1;return g("div",{children:e.steps.map((n,i)=>{let a=i===0?null:g("div",{className:i_e(n.state==="Done"||n.state==="Current")},n.key+":c"),o=r?c_e:f_e(n.state);return P(im,{children:[a,P("div",{children:[g("span",{children:h_e(n.state,i),className:d_e(n.state)}),g("span",{children:n.label,className:o})],className:n_e,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:r_e,role:"list"})}let m_e=p_e;function ot(e){return"var("+e+")"}let g_e=y([M("flex"),ce("column"),u("gap",ot(I.lg)),u("padding","0 var("+I.md+")"),u("min-width","0")]),v_e=y([M("flex"),W("center"),u("font-size",ot(R.sizeMd)),u("padding","var("+I.sm+") 0"),u("border-bottom","1px solid var("+v.borderSubtle+")")]),b_e=y([u("font-size",ot(R.sizeXl)),u("font-weight",ot(R.weightMedium)),u("color",ot(v.textPrimary)),Er(pe(0)),u("padding-bottom",ot(I.md)),u("border-bottom","1px solid var("+v.borderSubtle+")")]),__e=y([M("flex"),li("wrap"),u("gap",ot(I.sm)),u("padding-bottom",ot(I.sm))]),y_e=y([u("background",ot(v.surface)),u("color",ot(v.textPrimary)),u("border","1px solid var("+v.border+")"),u("border-radius",ot(H.md)),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",ot(R.sizeSm)),xe("pointer"),We([u("background",ot(v.surfaceElevated))])]),x_e=y([M("flex"),ce("column"),u("gap",ot(I.sm)),u("min-width","0")]),$2=y([M("flex"),W("start"),u("gap",ot(I.md)),u("padding","var("+I.xs+") 0"),u("border-bottom","1px solid var("+v.borderSubtle+")"),TE([u("border-bottom","none")])]),F2=y([u("color",ot(v.textSecondary)),u("font-size",ot(R.sizeMd)),u("font-weight",ot(R.weightMedium)),u("white-space","nowrap"),u("padding-top","2px"),An(0),u("min-width","200px")]),W0=y([u("color",ot(v.textPrimary)),u("font-size",ot(R.sizeMd)),u("word-break","break-word"),u("min-width","0")]),S_e=y([M("flex"),W("start"),u("gap",ot(I.md)),u("padding","var("+I.xs+") 0"),u("border-bottom","1px solid var("+v.borderSubtle+")"),TE([u("border-bottom","none")])]),E_e=y([u("color",ot(v.textSecondary)),u("font-size",ot(R.sizeMd)),u("font-weight",ot(R.weightMedium)),u("padding-top","2px"),An(0),u("min-width","200px")]),w_e=y([M("flex"),ce("column"),u("gap",ot(I.sm)),si(1),u("padding",ot(I.md)),u("background",ot(v.surfaceSubtle)),u("border-radius",ot(H.md)),u("border","1px solid var("+v.borderSubtle+")"),u("min-width","0")]),R_e=y([M("flex"),ce("column"),u("gap",ot(I.sm)),u("min-width","0")]),k_e=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",ot(I.md)),u("padding-bottom",ot(I.xs)),u("border-bottom","1px solid var("+v.borderSubtle+")")]),A_e=y([u("color",ot(v.textPrimary)),u("font-size",ot(R.sizeMd)),u("font-weight",ot(R.weightMedium))]),I2=y([u("overflow-x","auto"),u("max-width","100%"),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",ot(H.md))]),hs=y([u("color",ot(v.textDisabled)),u("font-size",ot(R.sizeSm))]);function ID(e,t){return D(S(S(j(e),r=>T(r,"title")),ne),ct(t))}function T2(e){return S(S(j(e),t=>T(t,"type")),ne)}function N2(e){return S(S(j(e),t=>T(t,"format")),ne)}function C_e(e){return S(j(e),t=>T(t,"items"))}function P2(e){return He(S(S(j(e),t=>T(t,"properties")),j))}function D_e(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function O2(e){let t=e.toLowerCase(),r=e.length,n=o=>{let s=o.length;if(r>s&&t.endsWith(o))return e.slice(0,r-s|0)},i=n("ids");if(i!==void 0)return i;let a=n("id");if(a!==void 0)return a}function $_e(e,t){let r=T2(t);if(r!==void 0)switch(r){case"array":let i=C_e(t);if(i===void 0)return"ArrayOfScalars";let a=T2(i);if(P2(i)||tt(a,"object"))return{TAG:"ArrayOfObjects",_0:i};if(!tt(a,"string"))return"ArrayOfScalars";let o=O2(e);return o!==void 0?{TAG:"EntityRefArray",_0:o}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return P2(t)?{TAG:"NestedObject",_0:t}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!D_e(e))return{TAG:"Scalar",_0:D(r,"string"),_1:N2(t)};let n=O2(e);return n!==void 0?{TAG:"EntityRef",_0:n}:{TAG:"Scalar",_0:D(r,"string"),_1:N2(t)}}function Q0(e,t,r,n){let i=Be(e);if(typeof i!="object")switch(i){case"JSONFalse":return g(La,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return g(La,{variant:"Success",label:"true",dot:!1});case"JSONNull":return g("span",{children:"—",className:hs})}else switch(i.TAG){case"JSONString":let a=i._0;return t==="date-time"?bm(a):D(LE(r,a),a);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function F_e(e){return D(B(St(e),t=>t.map(r=>{let n=Be(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 M2(e){return D(B(St(e),t=>ee(t,j)),[])}function TD(e,t){let r=S(T(e,"id"),ne);if(r!==void 0)return r;let n=S(T(e,"compositeId"),ne);return n!==void 0?n:"#"+t.toString()}function L2(e){return e.map((t,r)=>({key:TD(t,r),row:t}))}function I_e(e,t,r){for(;;){let n=t,i=n[0];if(i===void 0)return e;let a=e[e.length-1|0];if(a===void 0)return;let o=He(j(a.data)),s=St(a.data),l;if(o){let c=D(j(a.data),{}),d=S(S(j(a.schema),p=>T(p,"properties")),j),f=S(d,p=>T(p,i)),h=T(c,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:ID(f,i)}:void 0}else if(He(s)){let c=D(s,[]),d=D(S(j(a.schema),h=>T(h,"items")),a.schema),f=c.find((h,p)=>{let m=D(j(h),{});return TD(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 T_e(e){let t=e.entityPanel,r=e.uiHints,n=e.viewName,i=e.pluginId,a=e.drillPath,o=e.labelField,s=e.aggregateId,l=e.statusField,c=e.commands,d=e.rootLabel,f=e.schema,h=e.data,p=c!==void 0?c:[],m=a!==void 0?a:[],b=Gn(),_=zo(),x=$d(),E=pve(),k=Zd(),w=k!==void 0&&n!==void 0?k.isLive(n):!1,C=i!==void 0&&n!==void 0?{pluginId:i,viewName:n}:void 0,$=Qa(),A=X(()=>[]),F=A[1],N=X(()=>{}),O=N[1],L=X(()=>({})),q=L[1],K=L[0],re=He(i)&&He(n),V=re?m:A[0],Y=G=>{if(i!==void 0&&n!==void 0&&s!==void 0)return $(ta(i,n,s,G));F(te=>G)},J=I_e([{data:h,schema:f,label:d}],V,[]),ue=D(j(h),{}),se=Mn(f,"Drill"),ve=Wd([ue],se,_),Me={lookupLabel:(G,te)=>Gd(ve,G,_,te),isMissing:(G,te)=>Kd(ve,G,_,te)},Qe=(G,te)=>{let be=D(S(S(j(G),fe=>T(fe,"properties")),j),{}),me={};return ze(te).forEach(fe=>{let Xe=fe[1],Pe=fe[0],Lt=D(S(S(S(T(be,Pe),j),Dt=>T(Dt,"type")),ne),"string"),Oe,Ge=0;switch(Lt){case"array":if(Xe==="")Oe=[];else try{Oe=JSON.parse(Xe)}catch{Oe=[Xe]}break;case"boolean":Oe=Xe==="true";break;case"integer":case"number":Ge=1;break;case"object":if(Xe==="")Oe=null;else try{Oe=JSON.parse(Xe)}catch{Oe=null}break;default:Oe=Xe}Ge===1&&(Oe=D(B(Ua(Xe),Dt=>Dt),Xe)),me[Pe]=Oe}),me},Je=(G,te,be)=>P("div",{children:[g("div",{children:te,className:F2}),g("div",{children:be,className:W0})],className:$2},G),Ue=(G,te,be)=>{if(od(G,_,C))return be;let me=oa(_,G);if(me===void 0)return be;let fe=me.name.endsWith("s");return te?fe?me.name:me.name+"s":fe?me.name.slice(0,me.name.length-1|0):me.name},qe=G=>{let te=Be(G.data);if(typeof te!="object"){if(te==="JSONNull")return g("span",{children:"—",className:hs})}else switch(te.TAG){case"JSONObject":let be=D(j(G.data),{}),me=Mn(G.schema,"Drill");return me.length===0?g("span",{children:"(no fields)",className:hs}):g("div",{children:me.map(Oe=>{let Ge=Oe.key,Dt=Oe.propSchema,Vt=T(be,Ge),$t=ID(Dt,Ge),wr=$_e(Ge,Dt);if(Vt===void 0)return Je(Ge,$t,g("span",{children:"—",className:hs}));if(typeof wr!="object")switch(wr){case"Bool":return Je(Ge,$t,Q0(Vt,void 0,Ge))}else switch(wr.TAG){case"Scalar":let rr=V1(Ge,Dt,Vt);return rr!==void 0?Je(Ge,$t,rr):Je(Ge,$t,Q0(Vt,wr._1,Ge));case"EntityRef":let hn=wr._0;return Je(Ge,Ue(hn,!1,$t),fp(Ge,hn,Vt,_,x,Me,C,void 0,void 0));case"EntityRefArray":let Dn=wr._0;return Je(Ge,Ue(Dn,!0,$t),fp(Ge,Dn,Vt,_,x,Me,C,void 0,void 0));case"NestedObject":let ha=V1(Ge,Dt,Vt);if(ha!==void 0)return Je(Ge,$t,ha);let Ui=Mn(wr._0,"Drill"),pa=D(S(T(be,Ge),j),{});return P("div",{children:[g("div",{children:$t,className:E_e}),g("div",{children:Ui.map(Ze=>{let fr=T(pa,Ze.key);return P("div",{children:[g("div",{children:Ze.label,className:F2}),g("div",{children:xo(Ze.key,Ze.kind,Ze.propSchema,fr,void 0,_,x,Me,C),className:W0})],className:$2},Ze.key)}),className:w_e})],className:S_e},Ge);case"ArrayOfObjects":let Yn=wr._0,ma=L2(M2(Vt)),zt=ma.length,no=D(n,d),ga=no+"."+Ge,Ut=S(r,Ze=>Ai(Ze,ga)),Ct=dR(Yn,Ut),Ht=aR(i,no,Ge),Gr=T(K,Ge),Rr=Gr!==void 0?Gr:Bm(Ht),lt=fR(Rr,Ut,UE(Yn),Ct),Or=Ze=>{iR(Ht,Ze),q(fr=>{let nr=it(ze(fr));return nr[Ge]=Ze,nr})},$n=D(St(Vt),[]),qt=Ze=>{let fr=Tr(Yn,S(r,qi=>ja(qi,ga))),nr=S(Ut,qi=>qi.accent),Uf={readModelName:ga,rows:$n,schema:Yn,semantics:fr,accent:nr,onOpenRow:(qi,Ab)=>{let qf=L$($n,Zo=>Zo===Ab),jf=qf!==void 0?oe(ma[qf],qi,Zo=>Zo.key):qi;Y(V.concat([Ge,jf]))}};return Ze.render([Uf])},Mr=Mn(Yn,"Drill").map(Ze=>({key:Ze.key,label:Ze.label,render:fr=>xo(Ze.key,Ze.kind,Ze.propSchema,T(fr.row,Ze.key),void 0,_,x,Me,C),sortable:!1,width:Ze.width})),Kr=zt===0?g("span",{children:"(empty)",className:hs}):g("div",{children:g(Zc,{columns:Mr,data:ma,keyFn:Ze=>Ze.key,onRowClick:Ze=>Y(V.concat([Ge,Ze.key])),density:"Comfortable"}),className:I2}),Jn=lt!==void 0&<.id!==ra?qt(lt):Kr;return P("div",{children:[P("div",{children:[g("span",{children:$t,className:A_e}),P("span",{children:[Ct.length>1?g(Sl.make,{modes:Ct,activeId:oe(lt,ra,Ze=>Ze.id),onSelect:Or}):null,g(Fl,{count:zt,label:"items",onClick:()=>Y(V.concat([Ge]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:k_e}),Jn],className:R_e},Ge)}return Je(Ge,$t,g(OE,{items:F_e(Vt)}))}),className:x_e});case"JSONArray":let fe=L2(M2(G.data)),Xe=D(S(j(G.schema),Oe=>T(Oe,"items")),G.schema),Lt=Mn(Xe,"Drill").map(Oe=>({key:Oe.key,label:Oe.label,render:Ge=>xo(Oe.key,Oe.kind,Oe.propSchema,T(Ge.row,Oe.key),void 0,_,x,Me,C),sortable:!1,width:Oe.width}));return fe.length===0?g("span",{children:"(empty)",className:hs}):g("div",{children:g(Zc,{columns:Lt,data:fe,keyFn:Oe=>Oe.key,onRowClick:Oe=>Y(V.concat([Oe.key])),density:"Comfortable"}),className:I2})}return g("div",{children:Q0(G.data,void 0,void 0),className:W0})},pt=o!==void 0&&o!=="id"?S(S(S(j(h),G=>T(G,o)),ne),G=>{if(G!=="")return G}):void 0,Bt=D(pt,D(s,d)),At=G=>i!==void 0&&n!==void 0&&s!==void 0?ta(i,n,s,V.slice(0,G)):"#",Hr=J!==void 0?J.map((G,te)=>{let be=te===(J.length-1|0);return{label:te===0?Bt:G.label,href:be?void 0:At(te)}}):[{label:Bt,href:void 0}],U=G=>{let te=G.target,be=te.tagName,me=G.metaKey||G.ctrlKey||G.shiftKey||G.altKey||G.button!==0;if(be!=="A"||me)return;if(G.preventDefault(),re){let Oe=te.pathname,Ge=te.search;return $(Oe+Ge)}let Pe=te.parentNode.querySelectorAll("a").findIndex(Oe=>Oe===te),Lt=Pe<0?0:Pe;Y(V.slice(0,Lt))},de;if(J!==void 0){let G=J[J.length-1|0];de=G!==void 0?qe(G):null}else de=g(ka,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>Y([])});let De=V.length===0,Ee=De?yk(p.filter(G=>G.level==="Instance"),ue,l):[],Le;if(De&&l!==void 0){let G=t_e(f,l,D(di(ue,l),""));Le=G.length!==0?g(m_e,{steps:G}):void 0}else Le=void 0;return P("div",{children:[De?g("h2",{children:Bt,className:b_e}):g("div",{children:g(Z1e,{crumbs:Hr}),className:v_e,onClick:U}),D(Le,null),Ee.length!==0?g("div",{children:Ee.map(G=>g("button",{children:G.label,className:y_e,onClick:te=>O(be=>G)},G.name)),className:__e}):null,de,De&&t!==void 0&&s!==void 0?t(s):null,oe(N[0],null,G=>g(sb,{isOpen:!0,onClose:()=>O(te=>{}),title:G.label,children:g(Sb,{schema:G.schema,aggregateId:s,aggregateIdField:G.aggregateIdField,refFields:G.refFields,onSubmit:te=>b!==void 0?yt(b(G.mutationDocument,Qe(G.schema,te)).then(be=>{let me=Os(be);if(typeof me!="object")return me==="Accepted"?(O(fe=>{}),w||Q(E,fe=>fe()),Promise.resolve("Ok")):(O(fe=>{}),w||setTimeout(()=>Q(E,fe=>fe()),500),Promise.resolve("Ok"));{let fe=me._0;return Of(b,_,fe.errorCode,fe.detail).then(Xe=>Promise.resolve({TAG:"Err",_0:Xe}))}}),be=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(O(be=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:g_e})}let z2=T_e;function Ri(e){return"var("+e+")"}let N_e=y([M("flex"),ce("column"),u("gap",Ri(I.md))]),P_e=y([M("flex"),W("center"),Ve("spaceBetween"),u("padding-bottom",Ri(I.sm)),u("border-bottom","1px solid var("+v.border+")")]),O_e=y([u("font-size",Ri(R.sizeLg)),u("font-weight",Ri(R.weightMedium)),u("color",Ri(v.textPrimary)),Er(pe(0))]),M_e=y([M("flex"),li("wrap"),u("gap",Ri(I.sm))]),L_e=y([u("background",Ri(v.surface)),u("color",Ri(v.textPrimary)),u("border","1px solid var("+v.border+")"),u("border-radius",Ri(H.md)),u("padding","var("+I.xs+") var("+I.md+")"),u("font-size",Ri(R.sizeSm)),u("cursor","pointer")]);function z_e(e,t){let r=D(S(S(j(e),i=>T(i,"properties")),j),{}),n={};return ze(t).forEach(i=>{let a=i[1],o=i[0],s=D(S(S(S(T(r,o),j),d=>T(d,"type")),ne),"string"),l,c=0;switch(s){case"array":if(a==="")l=[];else try{l=JSON.parse(a)}catch{l=[a]}break;case"boolean":l=a==="true";break;case"integer":case"number":c=1;break;case"object":if(a==="")l=null;else try{l=JSON.parse(a)}catch{l=null}break;default:l=a}c===1&&(l=D(B(Ua(a),d=>d),a)),n[o]=l}),n}function U_e(e){let t=e.contextId,r=e.slice,n=Gn(),i=zo(),a=X(()=>{}),o=a[1];return P("div",{children:[g("div",{children:g("h2",{children:r.name,className:O_e}),className:P_e}),g("div",{children:r.commands.map(s=>g("button",{children:s.label,className:L_e,onClick:l=>o(c=>s)},s.name)),className:M_e}),oe(a[0],null,s=>g(sb,{isOpen:!0,onClose:()=>o(l=>{}),title:s.label,children:g(Sb,{schema:s.schema,aggregateId:t,aggregateIdField:s.aggregateIdField,injectNewId:s.level==="Collection",refFields:s.refFields,onSubmit:l=>n!==void 0?yt(n(s.mutationDocument,z_e(s.schema,l)).then(c=>{let d=Os(c);if(typeof d=="object"){let f=d._0;return Of(n,i,f.errorCode,f.detail).then(h=>Promise.resolve({TAG:"Err",_0:h}))}return o(f=>{}),Promise.resolve("Ok")}),c=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(o(c=>{}),Promise.resolve("Ok")),submitLabel:"Execute"})}))],className:N_e})}let q_e=U_e;function Ia(e){return"var("+e+")"}let j_e=y([M("flex"),ce("column"),u("gap",Ia(I.xl))]),B_e=y([u("font-size",Ia(R.sizeXl)),u("font-weight",Ia(R.weightMedium)),u("color",Ia(v.textPrimary)),Er(pe(0))]),V_e=y([M("flex"),ce("column"),u("gap",Ia(I.md)),u("padding",Ia(I.lg)),u("background",Ia(v.surfaceSubtle)),u("border","1px solid var("+v.borderSubtle+")"),u("border-radius",Ia(H.md))]);function ND(e){return e.filter(t=>Wpe(t.schema,t.statusField,t.commands))}function H_e(e){let t=ND(e.views);return P("div",{children:[g("h2",{children:"Lifecycles",className:B_e}),t.length!==0?t.map(r=>g("div",{children:g(dme,{schema:r.schema,statusField:D(r.statusField,""),commands:r.commands,title:r.name}),className:V_e},r.name)):g(vm,{title:"No lifecycles",description:"No view in this plugin declares a status enum with state-scoped commands."})],className:j_e})}let G_e=H_e;function at(e){return"var("+e+")"}let K_e=y([M("flex"),ce("column"),u("gap",at(I.md)),u("font-family",at(R.fontFamily))]),W_e=y([M("flex"),W("center"),u("gap",at(I.sm)),u("color",at(v.textSecondary)),u("font-size",at(R.sizeSm)),u("font-weight",at(R.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),Q_e=y([M("inlineFlex"),W("center"),u("padding","0 6px"),u("border-radius",at(H.full)),u("background",at(v.surfaceElevated)),u("color",at(v.textPrimary)),u("font-size",at(R.sizeXs)),u("letter-spacing","0")]),Y_e=y([M("flex"),ce("column"),u("gap",at(I.md))]),J_e=y([M("flex"),W("flexStart"),u("gap",at(I.sm))]),X_e=y([M("flex"),ce("column"),u("gap","2px"),u("min-width","0"),si(1)]),Z_e=y([M("flex"),W("baseline"),u("gap",at(I.sm))]),eye=y([u("color",at(v.textPrimary)),u("font-size",at(R.sizeSm)),u("font-weight",at(R.weightMedium))]),tye=y([u("color",at(v.textDisabled)),u("font-size",at(R.sizeXs))]),rye=y([u("color",at(v.textPrimary)),u("font-size",at(R.sizeSm)),u("line-height",at(R.lineHeightNormal)),u("white-space","pre-wrap"),u("word-break","break-word")]),nye=y([u("color",at(v.textDisabled)),u("font-size",at(R.sizeSm)),u("padding","var("+I.sm+") 0")]),iye=y([M("flex"),ce("column"),W("flexEnd"),u("gap",at(I.sm))]),aye=y([u("width","100%"),u("min-height","64px"),u("padding",at(I.sm)),u("background",at(v.surface)),u("border","1px solid var("+v.border+")"),u("border-radius",at(H.md)),u("color",at(v.textPrimary)),u("font-family",at(R.fontFamily)),u("font-size",at(R.sizeSm)),u("resize","vertical")]),oye=y([u("background",at(v.brand)),u("border","none"),u("border-radius",at(H.md)),u("color",at(v.textOnBrand)),u("padding","4px var("+I.md+")"),u("font-size",at(R.sizeSm)),u("font-weight",at(R.weightMedium)),xe("pointer"),IE([u("opacity","0.5"),xe("default")])]),sye=y([u("color",at(v.error)),u("font-size",at(R.sizeXs)),u("align-self","flex-start")]);function lye(e){let t=e.comment,r=t.timestamp;return P("div",{children:[g(vu,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),P("div",{children:[P("div",{children:[g("span",{children:D(t.author,"Unknown"),className:eye}),r!==void 0?g("span",{children:cv(e.nowMs,r),className:tye}):null],className:Z_e}),g("span",{children:t.body,className:rye})],className:X_e})],className:J_e})}function uye(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,a=e.emptyLabel,o=e.title,s=e.comments,l=o!==void 0?o:"Comments",c=a!==void 0?a:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=X(()=>""),p=h[1],m=h[0],b=m.trim(),_=b!==""&&!d,x=()=>{if(_)return Q(i,E=>E(b)),p(E=>"")};return P("div",{children:[P("div",{children:[l,g("span",{children:s.length.toString(),className:Q_e})],className:W_e}),s.length===0?g("div",{children:c,className:nye}):g("div",{children:s.map(E=>g(lye,{comment:E,nowMs:f},E.id)),className:Y_e}),i!==void 0?P("div",{children:[g("textarea",{className:aye,disabled:d,placeholder:"Write a comment…",value:m,onKeyDown:E=>{if(E.key==="Enter"&&(E.metaKey||E.ctrlKey))return E.preventDefault(),x()},onChange:E=>{let k=E.target.value;p(w=>k)}}),r!==void 0?g("span",{children:r,className:sye}):null,g("button",{children:d?"Posting…":"Comment",className:oye,disabled:!_,onClick:E=>x()})],className:iye}):null],className:K_e})}let cye=uye;function dye(e){let t=e.entityId,r=e.binding,n=Gn(),i=zo(),a=Au(),o=oe(e.requiredAccess,!1,_=>!a(_)),s=To(r.readModel,!o),l=X(()=>!1),c=l[1],d=X(()=>{}),f=d[1],h=_=>{let x=r.postCommand;if(n!==void 0&&x!==void 0){c(E=>!0),f(E=>{}),yt(n(x.mutationDocument,vde(r,t,_)).then(E=>{c(w=>!1);let k=Os(E);if(typeof k!="object")return s.refetch(),Promise.resolve();{let w=k._0;return Of(n,i,w.errorCode,w.detail).then(C=>(f($=>C),Promise.resolve()))}}),E=>(c(k=>!1),f(k=>"Could not post the comment."),Promise.resolve()));return}};if(o)return null;let p=gde(r,s.rows,t),m=r.postCommand;return g(cye,{comments:p,onPost:n!==void 0&&m!==void 0?h:void 0,posting:l[0],error:d[0]})}let fye=dye;function $i(e){return"var("+e+")"}let hye=y([M("flex"),ce("column"),u("gap",$i(I.lg))]),pye=y([M("flex"),W("center"),Ve("spaceBetween"),u("gap",$i(I.md))]),mye=y([u("font-size",$i(R.sizeXl)),u("font-weight",$i(R.weightMedium)),u("color",$i(v.textPrimary)),Er(pe(0))]),gye=y([M("flex"),li("wrap"),W("center"),u("gap",$i(I.md)),u("font-size",$i(R.sizeSm)),u("color",$i(v.textSecondary))]),vye=y([M("inlineFlex"),W("center"),u("gap","4px"),xe("pointer")]);function bye(e){return y([M("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let _ye=y([u("font-size",$i(R.sizeXs)),u("color",$i(v.textDisabled))]);function yye(e){let t=e.uiHints,r=e.resource,n=e.pluginId,i=Qa(),a=X(()=>[]),o=a[1],s=a[0],l=F=>Tr(F.schema,S(t,N=>ja(N,F.name))),c=To(r,!0),d=r.name,f=c.rows,h=r.schema,p=l(r),_={readModelName:d,rows:f,schema:h,semantics:p,onOpenRow:(F,N)=>i(ta(n,r.name,F,[])),role:Oo},x=e.events.map((F,N)=>{let O=!s.includes(F.readModel.name),L=To(F.readModel,O);return[F,N,O,L]}),E=(F,N)=>D(S(S(t,O=>Ai(O,F.name)),O=>O.accent),zs[Ii(N,zs.length)]),k=ee(x,F=>{if(!F[2])return;let N=F[0];return{readModelName:N.readModel.name,rows:F[3].rows,schema:N.readModel.schema,semantics:l(N.readModel),accent:E(N.readModel,F[1]),onOpenRow:(O,L)=>i(ta(n,N.readModel.name,O,[])),role:Mo,resourceRef:N.resourceRef}}),w=[_].concat(k),C=c.fetchState,$;$=typeof C!="object"?C==="Loading"?[r.name+": loading…"]:[]:[r.name+": "+C._0];let A=$.concat(ee(x,F=>{let N=F[0],O=F[3].fetchState;if(F[2])return typeof O!="object"?O==="Loading"?N.readModel.name+": loading…":void 0:N.readModel.name+": "+O._0}));return P("div",{children:[g("div",{children:g("h2",{children:e.canvasName,className:mye}),className:pye}),g("div",{children:x.map(F=>{let N=F[0];return P("label",{children:[g("input",{checked:F[2],type:"checkbox",onChange:O=>{let L=N.readModel.name;o(q=>q.includes(L)?q.filter(K=>K!==L):q.concat([L]))}}),g("span",{className:bye(E(N.readModel,F[1]))}),N.readModel.name],className:vye},N.readModel.name)}),className:gye}),e.mode.render(w),A.length!==0?g("span",{children:A.join(" · "),className:_ye}):null],className:hye})}let xye=yye;function Sye(e){return typeof e=="object"?"heuristic:"+e.VAL:e==="Hint"?"hint":"annotation"}function PD(e,t,r){return t!==void 0?Object.entries(bme(e.schema,t,e.commands,S(r,n=>n.transitions))):[]}function Eye(e,t,r){let n=e.name,i=e.schema,a=Tr(i,t),o=ze(a.semantics).map(d=>{let f=d[1];return it([["field",d[0]],["semantic",yu(f.semantic)],["provenance",Sye(f.provenance)]])}),s=[];Q(a.geo,d=>{s.push(["geo",d.latField+"/"+d.lngField])}),Q(a.dateSpan,d=>{s.push(["dateSpan",oe(d.endField,d.startField,f=>d.startField+".."+f)])}),Q(a.statusField,d=>{s.push(["status",d])}),Q(a.labelField,d=>{s.push(["label",d])}),Q(a.imageField,d=>{s.push(["image",d])});let l=jm(i).map(d=>d.id),c=PD(e,a.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+fme(f.tier)+")"]});return it([["view",n],["capableModes",l],["roles",it(s)],["transitions",it(c)],["fields",o]])}function wye(e,t,r){return it([["plugin",e],["views",t.map(n=>Eye(n,S(r,i=>ja(i,n.name)),S(r,i=>Ai(i,n.name))))]])}function Rye(e,t){return e.map(r=>{let n=r.name,i=r.schema,a=Tr(i,S(t,m=>ja(m,n))),o=jm(i).map(m=>m.id).join(", "),s=[];Q(a.geo,m=>{s.push("geo="+m.latField+"/"+m.lngField)}),Q(a.dateSpan,m=>{s.push("dateSpan="+oe(m.endField,m.startField,b=>m.startField+".."+b))}),Q(a.statusField,m=>{s.push("status="+m)}),Q(a.labelField,m=>{s.push("label="+m)}),Q(a.imageField,m=>{s.push("image="+m)});let l=s.length===0?"":"; "+s.join("; "),c=Object.keys(a.semantics).length,d=PD(r,a.statusField,S(t,m=>Ai(m,n))),f=a.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"";return n+": modes "+o+l+p+"; "+c.toString()+" field semantic(s)"})}function kye(e,t,r){console.log('[AutoUI] Inference report — plugin "'+e+'"'),Rye(t,r).forEach(n=>{console.log(" "+n)}),console.log(JSON.stringify(wye(e,t,r),null,2))}function OD(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function Mf(e){return e.endsWith("s")?e:e+"s"}function Ta(e){let t=e.length;return t>1&&e.endsWith("s")?e.slice(0,t-1|0):e}let Jp={contents:[]},Xp={contents:[]};function Zp(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!Jp.contents.some(i=>i===n)){Jp.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 em(e,t,r,n){if(r==="id"||n.length!==0&&n.some(a=>a===r))return;let i=e+"."+t;if(!Xp.contents.some(a=>a===i)){Xp.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 MD(e){let t=[];return e.forEach(r=>{r.readModels.forEach(n=>{Zp(r.id,n.name,n.labelField),em(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Ta(n.queryField),labelField:n.labelField})}),r.stateViewSlices.forEach(n=>{Zp(r.id,n.name,n.labelField),em(r.id,n.name,n.labelField,n.searchableFields),t.push({pluginId:r.id,name:n.name,queryField:n.queryField,singleQueryField:Ta(n.queryField),labelField:n.labelField})})}),t}function Wc(e,t){let r=e.toLowerCase(),n=a=>{let o=a.length,s=e.length;if(s>o&&r.endsWith(a))return e.slice(0,s-o|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function wb(e){return e.endsWith("s")?[Ta(e),e]:[e,Mf(e)]}function Us(e,t){return e.find(r=>r.name===t)}function Rb(e,t){let r=OD(t),n=Mf(r),i=Us(e,n);return i!==void 0?i:Us(e,r)}function LD(e){return ee(D(S(S(j(e),t=>T(t,"required")),St),[]),ne)}function zD(e,t,r,n){return ee(e.references,i=>{let a=T(n,i.fieldName),o=S(a,j),s=S(S(o,p=>T(p,"type")),ne),l=tt(s,"array"),c=i.plugin,d=c!==void 0?t.filter(p=>p.pluginId===c):t,f=Us(d,i.entity),h=f!==void 0?f:Rb(d,i.entity);if(h!==void 0){let p=wb(h.name);return{propertyKey:i.fieldName,queryField:h.queryField,singleQueryField:h.singleQueryField,labelField:h.labelField,multi:l,required:r.some(m=>m===i.fieldName),entityName:p[0],entityNamePlural:p[1]}}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+': explicit @ref to "'+i.entity+'" did not resolve to a registered entity. Falling back to text input.')})}function UD(e,t,r,n,i,a){let o=[];return i!==void 0&&ze(i).forEach(s=>{let l=s[0],c=j(s[1]);if(He(S(c,k=>T(k,"const"))))return;let f=S(S(c,k=>T(k,"type")),ne),h=S(S(S(S(c,k=>T(k,"items")),j),k=>T(k,"type")),ne),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 k;if(t!==void 0)if(tt(e.aggregateIdField,l))k=!0;else{let w=Wc(l,!1);k=w!==void 0?w.toLowerCase()===t.name.toLowerCase():!1}else k=tt(e.aggregateIdField,l);m=k}if(m)return;let b=e.aggregateIdField,_;if(b!==void 0&&t!==void 0&&b===l&&!p){let k=Us(r,Mf(t.name));_=k!==void 0?k:Us(r,t.name)}else _=void 0;let x;if(_!==void 0)x=_;else{let k=Wc(l,p);x=k!==void 0?Rb(r,k):void 0}if(x!==void 0){x.pluginId!==a&&console.warn("[AutoUI] Command "+e.name+" field "+l+' resolved cross-plugin to "'+x.name+'" in plugin "'+x.pluginId+'" via naming heuristic. Add @ref("'+x.pluginId+"."+x.name+'") to make the cross-plugin reference explicit, or @ref("<LocalEntity>") to target a same-plugin entity.');let k=wb(x.name),w=x.queryField,C=x.singleQueryField,$=x.labelField,A=n.some(L=>L===l),F=k[0],N=k[1],O={propertyKey:l,queryField:w,singleQueryField:C,labelField:$,multi:p,required:A,entityName:F,entityNamePlural:N};o.push(O);return}if(Wc(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}}),o}function qD(e,t,r,n){let i=LD(e.schema),a=S(S(j(e.schema),s=>T(s,"properties")),j);if(e.references.length===0)return UD(e,t,r,i,a,n);let o=D(a,{});return zD(e,r,i,o)}function jD(e,t){let r=(n,i)=>({name:n.name,label:n.label,schema:n.schema,mutationDocument:n.mutationDocument,requiredRole:n.requiredRole,level:n.level,aggregateIdField:n.aggregateIdField,refFields:qD(n,i,t,e.id),references:n.references,allowedStates:n.allowedStates,targetState:n.targetState});return{id:e.id,name:e.name,readModels:e.readModels.map(n=>({name:n.name,schema:n.schema,queryDocument:n.queryDocument,queryField:n.queryField,sortIndex:n.sortIndex,commands:n.commands.map(i=>r(i,void 0)),linkedWriteSide:n.linkedWriteSide,labelField:n.labelField,searchableFields:n.searchableFields,statusField:n.statusField})),aggregates:e.aggregates.map(n=>({name:n.name,schema:n.schema,commands:n.commands.map(i=>r(i,n)),linkedViews:n.linkedViews})),stateViewSlices:e.stateViewSlices,stateChangeSlices:e.stateChangeSlices.map(n=>({name:n.name,commands:n.commands.map(i=>r(i,void 0)),linkedViews:n.linkedViews,consistencyRead:n.consistencyRead}))}}let Aye={capitalize:OD,pluralize:Mf,singularize:Ta,warnedIdLabel:Jp,warnedUnsearchable:Xp,warnIfIdLabel:Zp,warnIfUnsearchable:em,buildRegistry:MD,stemFromKey:Wc,entityDisplayNames:wb,findByName:Us,findByStem:Rb,requiredSet:LD,resolveExplicitRefs:zD,resolveByHeuristic:UD,resolveForCommand:qD,enrichPlugin:jD};function Lf(e){let t=le.object(e);if(t===void 0)return;let r=S(t.properties,le.object);if(r!==void 0)return r;let n=S(S(S(t.items,le.object),i=>i.properties),le.object);return n!==void 0?n:rt(["anyOf","oneOf","allOf"],void 0,(i,a)=>i!==void 0?i:S(S(t[a],le.array),o=>rt(o,void 0,(s,l)=>s!==void 0?s:Lf(l))))}function BD(e,t,r){let n=t!==void 0?t:3,i=r!==void 0?r:!0,a=Object.keys(e);return(i&&!a.includes("id")?["id"].concat(a):a).map(s=>{if(n<=0)return s;let l=S(e[s],Lf);return l!==void 0?s+" { "+BD(l,n-1|0,!1)+" }":s}).join(" ")}function Cye(e,t){return Object.keys(e).filter(i=>{let a=e[i];return a!==void 0?jn(Lf(a)):!0}).join(" ")}function VD(e,t,r){let n=Object.keys(e),i=n.includes("id")?n:["id"].concat(n);return ee(i,a=>{let o=e[a];if(o===void 0)return a;let s=Lf(o);if(s===void 0)return a;let l=Cye(s);if(l!=="")return a+" { "+l+" }"}).join(" ")}function zf(e){return D(S(S(le.object(e),t=>t.properties),le.object),{})}function U2(e,t,r,n,i,a){let o=n!==void 0?n:!1,s=i!==void 0?i:!1,l=a!==void 0?a:!1,c=VD(zf(t)),d=o||l;if((d||s)&&r!==void 0){let h=r+"Filter",p=r+"OrderBy",m=["$first: Int","$after: String","$last: Int","$before: String"],b=d?["$filter: "+h].concat(m):m,_=s?b.concat(["$orderBy: "+p]):b,x=["first: $first","after: $after","last: $last","before: $before"],E=d?["filter: $filter"].concat(x):x,k=s?E.concat(["orderBy: $orderBy"]):E,w=_.join(", "),C=k.join(", ");return"query("+w+") { "+e+"("+C+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+c+" } } } }"}return"{ "+e+" { edges { node { "+c+" } } } }"}function q2(e,t){let r=BD(zf(t),void 0,void 0),n=xm(t);return n!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+n+": $subId) { "+r+" } }":"query($id: ID!) { "+e+"(id: $id) { "+r+" } }"}function Dye(e,t){let r=VD(zf(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function $ye(e){return ym(e).length===0?jn(xm(e)):!1}function Fye(e){let t=Object.keys(zf(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function Iye(e,t,r,n,i,a,o,s,l,c,d){let f=[],h=i!==void 0?i:[],p=a!==void 0?a:[],m=o!==void 0?o:[],b={},_={},x={};B(d,U=>wL(U,e));let E=h.length===0?[e]:h,k=MD(E),w=jD(e,k),C={},$=(U,de)=>{let De=T(C,U);De!==void 0?C[U]=De.concat(de):C[U]=de};w.aggregates.forEach(U=>{U.linkedViews.forEach(de=>$(de,U.commands))}),w.stateChangeSlices.forEach(U=>{let de=U.commands.filter(Ee=>Ee.level==="Collection"),De=U.commands.filter(Ee=>Ee.level==="Instance");U.linkedViews.forEach(Ee=>$(Ee,de)),Q(U.consistencyRead,Ee=>$(Ee,De))});let A=[],F=Co(),N=w.id,O=(U,de,De,Ee,Le,G)=>{let te=$ye(U.schema),be=te?U.queryField+"ByIds":void 0,me=te?Dye(U.queryField,U.schema):void 0,fe=Fye(U.schema),Xe=D(VN(U.schema),!0),Pe=U.name,Lt=Wi(ya(N,Pe)),Oe=T(_,Pe),Ge=De+Pe,Dt={label:Pe,icon:void 0,group:w.name,sortOrder:U.sortIndex},$t={fragmentId:Ge,title:Pe,menuEntry:Dt,requiredAccess:Oe,url:Lt},wr=N+"."+Pe,rr=(hn,Dn)=>g(Cve,{readModel:U,detailView:de,pluginId:N,openRowId:hn,drillPath:Dn,singleQueryField:Ee,detailQueryDocument:Le,byIdsQueryField:be,byIdsQueryDocument:me,sortKeyField:fe,liveDefault:Xe,uiHints:d,schedulerJoin:G},wr);return A.push(ss(us(N,Pe),hn=>{let Dn=c4(hn);return g(ide,{definition:$t,children:rr(Dn[0],Dn[1])})})),hF(F,N,Pe,ya(N,Pe)),$t},L=w.readModels.filter(U=>!p.includes(U.name)).map(U=>{let de=D(T(C,U.name),U.commands),De=Ta(U.queryField),Ee=Wp(U.schema);return U.queryDocument===""?{name:U.name,schema:U.schema,queryDocument:U2(U.queryField,U.schema,De,Ee.hasFilter,Ee.hasSort,Ee.hasSearch),queryField:U.queryField,sortIndex:U.sortIndex,commands:de,linkedWriteSide:U.linkedWriteSide,labelField:U.labelField,searchableFields:U.searchableFields,statusField:U.statusField}:{name:U.name,schema:U.schema,queryDocument:U.queryDocument,queryField:U.queryField,sortIndex:U.sortIndex,commands:de,linkedWriteSide:U.linkedWriteSide,labelField:U.labelField,searchableFields:U.searchableFields,statusField:U.statusField}}),q=w.stateViewSlices.filter(U=>!p.includes(U.name)).map(U=>{let de=D(T(C,U.name),[]),De=Ta(U.queryField),Ee=Wp(U.schema),Le=U2(U.queryField,U.schema,De,Ee.hasFilter,Ee.hasSort,Ee.hasSearch);return{name:U.name,schema:U.schema,queryDocument:Le,queryField:U.queryField,sortIndex:U.sortIndex,commands:de,linkedWriteSide:U.linkedWriteSide,labelField:U.labelField,searchableFields:U.searchableFields,statusField:U.statusField}}),K=Ame(L.concat(q),d,(U,de)=>{console.warn("[AutoUI] "+w.id+': scheduler canvas "'+U+'" has '+de.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),re=w.aggregates,V={readModels:L,aggregates:re},Y=U=>B(mde(V,U),de=>{let De=T(_,de.readModel.name);return Ee=>g(fye,{binding:de,entityId:Ee,requiredAccess:De})}),J=U=>{let de=D(d,lR),De=kL(Ai(de,U.name),Lce(U.schema));return B(zce(U,De),Ee=>{let Le=T(_,U.name);return G=>g(L1e,{binding:Ee,entityId:G,requiredAccess:Le})})},ue=U=>{let de=Y(U.name),De=J(U);if(!(de===void 0&&De===void 0))return Ee=>P(jr,{children:[oe(de,null,Le=>Le(Ee)),oe(De,null,Le=>Le(Ee))]})},se=L.map(U=>{let de=Ta(U.queryField),De=q2(de,U.schema),Ee=D(B(ee(U.linkedWriteSide,te=>w.aggregates.find(be=>be.name===te))[0],te=>te.commands),U.commands),Le=T(b,U.name);return O(U,Le!==void 0?Le:(te,be,me)=>g(z2,{data:me,schema:U.schema,rootLabel:U.name,commands:Ee,statusField:U.statusField,aggregateId:te,labelField:U.labelField,drillPath:be,pluginId:w.id,viewName:U.name,uiHints:d,entityPanel:ue(U)}),w.id+".",de,De,T(K,U.name))}),ve=q.map(U=>{let de=Ta(U.queryField),De=q2(de,U.schema),Ee=T(b,U.name);return O(U,Ee!==void 0?Ee:(G,te,be)=>g(z2,{data:be,schema:U.schema,rootLabel:U.name,commands:U.commands,statusField:U.statusField,aggregateId:G,labelField:U.labelField,drillPath:te,pluginId:w.id,viewName:U.name,uiHints:d,entityPanel:ue(U)}),w.id+".slice.",de,De,T(K,U.name))}),ye=w.stateChangeSlices.filter(U=>!m.includes(U.name)).map(U=>({fragmentId:w.id+".commands."+U.name,title:U.name,description:"Auto-generated command panel for "+U.name,extensionPackage:w.id,positions:f,component:de=>g(q_e,{slice:U,contextId:de.contextId}),requiredAccess:T(x,U.name),minWidth:void 0})),Ne=L.concat(q).toSorted((U,de)=>U.sortIndex===de.sortIndex?Vl(U.name,de.name):om(U.sortIndex,de.sortIndex));He(Bm("autoui.inferenceReport"))&&kye(w.id,Ne.map(U=>({name:U.name,schema:U.schema,commands:U.commands})),d);let Me=ee(sd(),U=>{let de=U.arity;if(!(typeof de!="object"||de.TAG!=="Multi"))return[U,de.min]}).flatMap(U=>{let de=U[1],De=U[0],Ee={};return Ne.forEach(Le=>{let G=S(d,fe=>Ai(fe,Le.name)),te=oe(S(G,fe=>fe.suppress),!1,fe=>fe.includes(De.id));if(!(De.isCapable(Le.schema)&&!te))return;let be=D(S(G,fe=>fe.canvas),De.label),me=T(Ee,be);me!==void 0?me.push(Le):Ee[be]=[Le]}),ee(ze(Ee),Le=>{let G=Le[1];if(G.length<de)return;let te=Le[0],be=w.id+".canvas."+te,me={label:te,icon:void 0,group:w.name,sortOrder:900},fe=Wi(ya(N,te)),Xe={fragmentId:be,title:te,menuEntry:me,requiredAccess:void 0,url:fe};return A.push(ss(us(N,te),Pe=>g(K1e,{pluginId:N,mode:De,canvasName:te,readModels:G,uiHints:d}))),Xe})}),Qe=ee(sd(),U=>{let de=U.arity;if(!(typeof de!="object"||de.TAG==="Multi"))return[U,de._0]}).flatMap(U=>{let de=U[1],De=U[0],Ee={},Le={},G=(fe,Xe,Pe)=>{let Lt=T(fe,Xe);Lt!==void 0?Lt.push(Pe):fe[Xe]=[Pe]};Ne.forEach(fe=>{let Xe=S(d,Oe=>Ai(Oe,fe.name)),Pe=D(S(Xe,Oe=>Oe.canvas),De.label),Lt=S(Xe,Oe=>Oe.role);if(Lt!==void 0)return Lt===Oo?G(Ee,Pe,fe):Lt===Mo?Q(S(Xe,Oe=>Oe.resourceRef),Oe=>G(Le,Pe,[fe,Oe])):void 0});let te=(fe,Xe)=>oe(de.find(Pe=>Pe.role===fe),Xe,Pe=>Pe.min),be=te(Oo,1),me=te(Mo,1);return ee(ze(Ee),fe=>{let Xe=fe[1],Pe=fe[0],Lt=D(T(Le,Pe),[]),Oe=Xe[0];if(Oe===void 0||!(Xe.length>=be&&Lt.length>=me))return;let Ge=Lt.map(rr=>({readModel:rr[0],resourceRef:rr[1]})),Dt=w.id+".scheduler."+Pe,Vt={label:Pe,icon:void 0,group:w.name,sortOrder:910},$t=Wi(ya(N,Pe)),wr={fragmentId:Dt,title:Pe,menuEntry:Vt,requiredAccess:void 0,url:$t};return A.push(ss(us(N,Pe),rr=>g(xye,{pluginId:N,canvasName:Pe,mode:De,resource:Oe,events:Ge,uiHints:d}))),wr})}),Je=L.concat(q).flatMap(U=>qN(U.schema).map(de=>({view:U.name,label:de[2],field:de[0],aggregate:de[1]}))),Ue=D(S(d,U=>U.dashboard),[]),qe=Ue.map(U=>[U.view,D(U.field,"")]),pt=Ue.concat(Je.filter(U=>!qe.some(de=>de[0]===U.view?de[1]===D(U.field,""):!1))),Bt;if(pt.length!==0){let U="Dashboard",de=L.concat(q),De=w.id+".dashboard",Ee={label:U,icon:void 0,group:w.name,sortOrder:-100},Le=Wi(ya(N,U)),G={fragmentId:De,title:U,menuEntry:Ee,requiredAccess:void 0,url:Le};A.push(ss(us(N,U),te=>g(R1e,{pluginId:N,metrics:pt,readModels:de,uiHints:d}))),Bt=[G]}else Bt=[];let At=ND(L.concat(q)),Hr;if(At.length!==0){let U="Lifecycles",de=w.id+".lifecycles",De={label:U,icon:void 0,group:w.name,sortOrder:-50},Ee=Wi(ya(N,U)),Le={fragmentId:de,title:U,menuEntry:De,requiredAccess:void 0,url:Ee};A.push(ss(us(N,U),G=>g(G_e,{views:At}))),Hr=[Le]}else Hr=[];return{pages:Bt.concat(Hr.concat(se.concat(ve.concat(Me.concat(Qe))))),panels:ye,routes:A,publicLinks:F}}let j2=new Map;function Tye(e,t){let r=j2.get(e);if(!(r!==void 0?r===t:!1)){Z2.registerRemotes([{name:e,entry:t}]),j2.set(e,t);return}}async function Nye(e,t,r){Tye(e,r);try{let n=await Z2.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=qs(n);if(i.RE_EXN_ID!==am)return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r};let a=D(i._1.message,"unknown error");return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r+": "+a}}}const Pye=Mt(null),Y0={didCatch:!1,error:null};class Oye extends m${constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Y0}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:a,reason:"imperative-api"}),this.setState(Y0)}}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&&Mye(t.resetKeys,i)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Y0)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(l);else if(n)s=Kt(n,l);else if(i!==void 0)s=i;else throw o}return Kt(Pye.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}}function Mye(){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 Lye(e){let t=D(e.error.message,"unknown error");return g("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function zye(e,t){console.error("Fragment crashed:",e)}function Uye(e){let t=e.fallbackComponent;return Kt(Oye,{FallbackComponent:t!==void 0?t:Lye,onError:zye,children:e.children})}let qye=Uye;function jye(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=X(()=>"Loading"),a=i[1],o=i[0];return Re(()=>{a(l=>"Loading");let s={contents:!1};return Nye(n,r,t).then(l=>{if(s.contents)return;if(l.TAG==="Ok"){let d=l._0;return a(f=>({TAG:"Loaded",_0:d}))}let c=l._0;a(d=>({TAG:"Failed",_0:c}))}),()=>{s.contents=!0}},[n,r,t]),typeof o!="object"?g("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):o.TAG==="Loaded"?g(qye,{children:Kt(o._0,e.panelProps)}):g("div",{children:"Panel error: "+o._0,style:{color:"#a00",padding:"0.75rem"}})}let Bye=jye;function rn(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function po(e){return rn(e)==="object"}function Vye(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function B2(e,t){return e.length<124?e:t}const Hye="graphql-transport-ws";var gn;(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"})(gn||(gn={}));var tr;(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"})(tr||(tr={}));function HD(e){if(!po(e))throw new Error(`Message is expected to be an object, but got ${rn(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 ${rn(e.type)}`);switch(e.type){case tr.ConnectionInit:case tr.ConnectionAck:case tr.Ping:case tr.Pong:{if(e.payload!=null&&!po(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 tr.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${rn(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!po(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${rn(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 ${rn(e.payload.query)}`);if(e.payload.variables!=null&&!po(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 ${rn(e.payload.variables)}`);if(e.payload.operationName!=null&&rn(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 ${rn(e.payload.operationName)}`);if(e.payload.extensions!=null&&!po(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 ${rn(e.payload.extensions)}`);break}case tr.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${rn(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!po(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${rn(e.payload)}`);break}case tr.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${rn(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!Vye(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 tr.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${rn(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 Gye(e,t){return HD(typeof e=="string"?JSON.parse(e,t):e)}function xl(e,t){return HD(e),JSON.stringify(e,t)}var ks=function(e){return this instanceof ks?(this.v=e,this):new ks(e)},Kye=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(m){return Promise.resolve(m).then(p,f)}}function s(p,m){n[p]&&(i[p]=function(b){return new Promise(function(_,x){a.push([p,b,_,x])>1||l(p,b)})},m&&(i[p]=m(i[p])))}function l(p,m){try{c(n[p](m))}catch(b){h(a[0][3],b)}}function c(p){p.value instanceof ks?Promise.resolve(p.value.v).then(d,f):h(a[0][2],p)}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,m){p(m),a.shift(),a.length&&l(a[0][0],a[0][1])}};function Wye(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:a=0,keepAlive:o=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:c=5,retryWait:d=async function(Y){let J=1e3;for(let ue=0;ue<Y;ue++)J*=2;await new Promise(ue=>setTimeout(ue,J+Math.floor(Math.random()*2700+300)))},shouldRetry:f=J0,isFatalConnectionProblem:h,on:p,webSocketImpl:m,generateID:b=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:_,jsonMessageReviver:x}=e;let E;if(m){if(!Yye(m))throw new Error("Invalid WebSocket implementation provided");E=m}else typeof WebSocket<"u"?E=WebSocket:typeof global<"u"?E=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(E=window.WebSocket||window.MozWebSocket);if(!E)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const k=E,w=(()=>{const V=(()=>{const J={};return{on(ue,se){return J[ue]=se,()=>{delete J[ue]}},emit(ue){var se;"id"in ue&&((se=J[ue.id])===null||se===void 0||se.call(J,ue))}}})(),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,ue){const se=Y[J];return se.push(ue),()=>{se.splice(se.indexOf(ue),1)}},emit(J,...ue){for(const se of[...Y[J]])se(...ue)}}})();function C(V){const Y=[w.on("error",J=>{Y.forEach(ue=>ue()),V(J)}),w.on("closed",J=>{Y.forEach(ue=>ue()),V(J)})]}let $,A=0,F,N=!1,O=0,L=!1;async function q(){clearTimeout(F);const[V,Y]=await($??($=new Promise((se,ve)=>(async()=>{if(N){if(await d(O),!A)return $=void 0,ve({code:1e3,reason:"All Subscriptions Gone"});O++}w.emit("connecting",N);const ye=new k(typeof t=="function"?await t():t,Hye);let Ne,Me;function Qe(){isFinite(o)&&o>0&&(clearTimeout(Me),Me=setTimeout(()=>{ye.readyState===k.OPEN&&(ye.send(xl({type:tr.Ping})),w.emit("ping",!1,void 0))},o))}C(Ue=>{$=void 0,clearTimeout(Ne),clearTimeout(Me),ve(Ue),Ue instanceof V2&&(ye.close(4499,"Terminated"),ye.onerror=null,ye.onclose=null)}),ye.onerror=Ue=>w.emit("error",Ue),ye.onclose=Ue=>w.emit("closed",Ue),ye.onopen=async()=>{try{w.emit("opened",ye);const Ue=typeof r=="function"?await r():r;if(ye.readyState!==k.OPEN)return;ye.send(xl(Ue?{type:tr.ConnectionInit,payload:Ue}:{type:tr.ConnectionInit},_)),isFinite(l)&&l>0&&(Ne=setTimeout(()=>{ye.close(gn.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Qe()}catch(Ue){w.emit("error",Ue),ye.close(gn.InternalClientError,B2(Ue instanceof Error?Ue.message:new Error(Ue).message,"Internal client error"))}};let Je=!1;ye.onmessage=({data:Ue})=>{try{const qe=Gye(Ue,x);if(w.emit("message",qe),qe.type==="ping"||qe.type==="pong"){w.emit(qe.type,!0,qe.payload),qe.type==="pong"?Qe():s||(ye.send(xl(qe.payload?{type:tr.Pong,payload:qe.payload}:{type:tr.Pong})),w.emit("pong",!1,qe.payload));return}if(Je)return;if(qe.type!==tr.ConnectionAck)throw new Error(`First message cannot be of type ${qe.type}`);clearTimeout(Ne),Je=!0,w.emit("connected",ye,qe.payload,N),N=!1,O=0,se([ye,new Promise((pt,Bt)=>C(Bt))])}catch(qe){ye.onmessage=null,w.emit("error",qe),ye.close(gn.BadResponse,B2(qe instanceof Error?qe.message:new Error(qe).message,"Bad response"))}}})())));V.readyState===k.CLOSING&&await Y;let J=()=>{};const ue=new Promise(se=>J=se);return[V,J,Promise.race([ue.then(()=>{if(!A){const se=()=>V.close(1e3,"Normal Closure");isFinite(a)&&a>0?F=setTimeout(()=>{V.readyState===k.OPEN&&se()},a):se()}}),Y])]}function K(V){if(J0(V)&&(Qye(V.code)||[gn.InternalServerError,gn.InternalClientError,gn.BadRequest,gn.BadResponse,gn.Unauthorized,gn.SubprotocolNotAcceptable,gn.SubscriberAlreadyExists,gn.TooManyInitialisationRequests].includes(V.code)))throw V;if(L)return!1;if(J0(V)&&V.code===1e3)return A>0;if(!c||O>=c||!f(V)||h?.(V))throw V;return N=!0}n||(async()=>{for(A++;;)try{const[,,V]=await q();await V}catch(V){try{if(!K(V))return}catch(Y){return i?.(Y)}}})();function re(V,Y){const J=b(V);let ue=!1,se=!1,ve=()=>{A--,ue=!0};return(async()=>{for(A++;;)try{const[ye,Ne,Me]=await q();if(ue)return Ne();const Qe=w.onMessage(J,Je=>{switch(Je.type){case tr.Next:{Y.next(Je.payload);return}case tr.Error:{se=!0,ue=!0,Y.error(Je.payload),ve();return}case tr.Complete:{ue=!0,ve();return}}});ye.send(xl({id:J,type:tr.Subscribe,payload:V},_)),ve=()=>{!ue&&ye.readyState===k.OPEN&&ye.send(xl({id:J,type:tr.Complete},_)),A--,ue=!0,Ne()},await Me.finally(Qe);return}catch(ye){if(!K(ye))return}})().then(()=>{se||Y.complete()}).catch(ye=>{Y.error(ye)}),()=>{ue||ve()}}return{on:w.on,subscribe:re,iterate(V){const Y=[],J={done:!1,error:null,resolve:()=>{}},ue=re(V,{next(ve){Y.push(ve),J.resolve()},error(ve){J.done=!0,J.error=ve,J.resolve()},complete(){J.done=!0,J.resolve()}}),se=(function(){return Kye(this,arguments,function*(){for(;;){for(Y.length||(yield ks(new Promise(Ne=>J.resolve=Ne)));Y.length;)yield yield ks(Y.shift());if(J.error)throw J.error;if(J.done)return yield ks(void 0)}})})();return se.throw=async ve=>(J.done||(J.done=!0,J.error=ve,J.resolve()),{done:!0,value:void 0}),se.return=async()=>(ue(),{done:!0,value:void 0}),se},async dispose(){if(L=!0,$){const[V]=await $;V.close(1e3,"Normal Closure")}},terminate(){$&&w.emit("closed",new V2)}}}class V2 extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J0(e){return po(e)&&"code"in e&&"reason"in e}function Qye(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function Yye(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function Jye(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return Wye({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function pu(e,t){return S(e[t],le.string)}function ni(e,t){return D(pu(e,t),"")}function Xye(e,t){return B(S(e[t],le.float),r=>r|0)}function Zye(e,t){return ee(D(S(e[t],le.array),[]),le.string)}function exe(e){let t=le.object(e);return t!==void 0?{label:ni(t,"label"),icon:pu(t,"icon"),group:pu(t,"group"),sortOrder:D(Xye(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function txe(e){return B(le.object(e),t=>({fragmentId:ni(t,"fragmentId"),title:ni(t,"title"),description:ni(t,"description"),positions:Zye(t,"positions"),requiredAccess:pu(t,"requiredAccess")}))}function rxe(e){return B(le.object(e),t=>({fragmentId:ni(t,"fragmentId"),title:ni(t,"title"),menuEntry:D(B(t.menuEntry,exe),{label:ni(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:pu(t,"requiredAccess")}))}function nxe(e){return B(le.object(e),t=>({pluginId:ni(t,"pluginId"),remoteEntryUrl:ni(t,"remoteEntryUrl"),panels:ee(D(S(t.panels,le.array),[]),txe),pages:ee(D(S(t.pages,le.array),[]),rxe),registeredAt:ni(t,"registeredAt"),updatedAt:ni(t,"updatedAt")}))}function ixe(e){return ee(D(S(S(S(S(le.object(e),t=>t.data),le.object),t=>t.Platform_UIFragments),le.array),[]),nxe)}let axe=`{
|
|
69
|
-
Platform_UIFragments {
|
|
70
|
-
pluginId
|
|
71
|
-
remoteEntryUrl
|
|
72
|
-
panels { fragmentId title description positions requiredAccess }
|
|
73
|
-
pages {
|
|
74
|
-
fragmentId
|
|
75
|
-
title
|
|
76
|
-
menuEntry { label icon group sortOrder }
|
|
77
|
-
requiredAccess
|
|
78
|
-
}
|
|
79
|
-
registeredAt
|
|
80
|
-
updatedAt
|
|
81
|
-
}
|
|
82
|
-
}`;function tm(e){let t=ne(e);return t!==void 0?JSON.parse(t):e}function H2(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function G2(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function oxe(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function sxe(e,t){let r=D(S(T(t,"type"),ne),"string");return r!=="array"?G2(e)&&r==="string"?"ID":H2(r):"["+D(B(S(S(S(T(t,"items"),j),i=>T(i,"type")),ne),i=>i==="string"&&(oxe(e)||G2(e))?"ID":H2(i)),"String")+"!]"}function lxe(e,t,r){let n=D(B(S(S(j(t),c=>T(c,"properties")),j),c=>Object.keys(c).filter(d=>d!=="TAG").map(d=>{let f=D(B(S(T(c,d),j),h=>sxe(d,h)),"String");return[d,f]})),[]),a=(r!==void 0?[]:[["id","ID"]]).concat(n),o="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(a.length===0)return"mutation { "+e+" { "+o+" } }";let s=a.map(c=>"$"+c[0]+": "+c[1]+"!").join(", "),l=a.map(c=>{let d=c[0];return d+": $"+d}).join(", ");return"mutation "+e+"("+s+") { "+e+"("+l+") { "+o+" } }"}function uxe(e){let t=e.split(".");return D(t[t.length-1|0],e)}function cxe(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function dxe(e){return ee(D(St(e),[]),t=>B(j(t),r=>{let n=i=>D(S(T(r,i),ne),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:S(T(r,"plugin"),ne)}}))}function K2(e){return ee(D(St(e),[]),t=>B(S(j(t),r=>{let n=S(T(r,"apiExposed"),hE);if(!tt(n,!1))return r}),r=>{let n=p=>D(S(T(r,p),ne),""),i=n("name"),o=n("level")==="Instance"?"Instance":"Collection",s=D(B(T(r,"schema"),tm),null),l=n("mutationField"),c=S(T(r,"aggregateIdField"),ne),d=D(B(T(r,"references"),dxe),[]),f=B(S(T(r,"allowedStates"),St),p=>ee(p,ne)),h=S(T(r,"targetState"),ne);return{name:i,label:cxe(uxe(i)),schema:s,mutationDocument:lxe(l,s,c),requiredRole:void 0,level:o,aggregateIdField:c,refFields:[],references:d,allowedStates:f,targetState:h}}))}function fxe(e){return ee(D(St(e),[]),t=>B(j(t),r=>{let n=f=>D(S(T(r,f),ne),""),i=f=>D(S(T(r,f),St),[]),a=(f,h)=>ee(D(S(T(f,h),St),[]),ne),o=ee(i("readModels"),f=>B(j(f),h=>{let p=m=>D(S(T(h,m),ne),"");return{name:p("name"),schema:D(B(T(h,"schema"),tm),null),queryDocument:"",queryField:p("queryField"),sortIndex:0,commands:[],linkedWriteSide:a(h,"linkedWriteSide"),labelField:p("labelField"),searchableFields:a(h,"searchableFields"),statusField:S(T(h,"statusField"),ne)}})),s=ee(i("aggregates"),f=>B(j(f),h=>({name:(m=>D(S(T(h,m),ne),""))("name"),schema:null,commands:K2(D(T(h,"commands"),[])),linkedViews:a(h,"linkedViews")}))),l=ee(i("stateViewSlices"),f=>B(j(f),h=>{let p=m=>D(S(T(h,m),ne),"");return{name:p("name"),schema:D(B(T(h,"schema"),tm),null),queryField:p("queryField"),sortIndex:0,linkedWriteSide:a(h,"linkedWriteSide"),labelField:p("labelField"),searchableFields:a(h,"searchableFields"),statusField:S(T(h,"statusField"),ne)}})),c=ee(i("stateChangeSlices"),f=>B(j(f),h=>({name:(m=>D(S(T(h,m),ne),""))("name"),commands:K2(D(T(h,"commands"),[])),linkedViews:a(h,"linkedViews"),consistencyRead:S(T(h,"consistencyRead"),ne)}))),d=n("pluginId");return{id:d,name:d,readModels:o,aggregates:s,stateViewSlices:l,stateChangeSlices:c}}))}function hxe(e){return D(B(S(S(S(le.object(e),t=>t.data),le.object),t=>t.Platform_ComponentDefinitions),fxe),[])}let pxe=`{
|
|
83
|
-
Platform_ComponentDefinitions {
|
|
84
|
-
pluginId
|
|
85
|
-
readModels { name queryField schema linkedWriteSide labelField searchableFields statusField }
|
|
86
|
-
aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed } linkedViews }
|
|
87
|
-
stateViewSlices { name queryField schema linkedWriteSide labelField searchableFields statusField }
|
|
88
|
-
stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed } linkedViews consistencyRead }
|
|
89
|
-
}
|
|
90
|
-
}`;function rm(e,t){return e+"/"+t}function mxe(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(rm(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(rm(r.pluginId,i.fragmentId),n)});return}}),t}function gxe(e,t,r){return e.get(rm(t,r))}function vxe(e,t,r){return e.map(n=>{let i=gxe(r,t,n.fragmentId);return i!==void 0?{fragmentId:n.fragmentId,title:n.title,description:n.description,extensionPackage:n.extensionPackage,positions:n.positions,component:a=>g(Bye,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:a}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function W2(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(B([".list",".detail"].find(a=>n.endsWith(a)),a=>n.slice(0,n.length-a.length|0)),n)}function bxe(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>W2(n.fragmentId,e)),r.panels.map(n=>W2(n.fragmentId,e))]:[[],[]]}function Q2(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),yt(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function _xe(e,t,r,n,i,a,o,s){let l=mxe(o);n(Aye.buildRegistry(a)),i(ee(a,p=>B(iK(p),m=>({pluginId:p.id,binding:m}))));let c=[],d=[],f=[],h={contents:Co()};a.forEach(p=>{let m=bxe(p.id,o),b=Iye(p,void 0,void 0,void 0,a,m[0],m[1],void 0,void 0,void 0,s[p.id]),_=vxe(b.panels,p.id,l);b.pages.forEach(x=>{c.push(x)}),_.forEach(x=>{d.push(x)}),b.routes.forEach(x=>{f.push(x)}),h.contents=np(h.contents,b.publicLinks)}),Q(e,p=>p.setPluginPages(c)),Q(t,p=>p.setPluginPanels(d)),Q(r,p=>p.setPluginRoutes(f,h.contents)),o.forEach(p=>{})}function Y2(e,t,r,n,i,a,o,s,l){let c=Q2(e.platformApiEndpoint,pxe,t),d=Q2(e.platformApiEndpoint,axe,t);return Promise.all([c,d]).then(f=>{let h=f[1],p=f[0];(ld(p)||ld(h))&&r();let m=hxe(p),b=ixe(h);_xe(n,i,a,o,s,m,b,l)})}let yxe=`subscription OnPluginStatusChange {
|
|
91
|
-
onPluginStatusChange { pluginId status }
|
|
92
|
-
}`,xxe=`subscription OnUIFragmentChange {
|
|
93
|
-
onUIFragmentChange { pluginId changeKind }
|
|
94
|
-
}`;function Sxe(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=bt(ku),a=bt(Cu),o=ov(),s=s4(),l=ZK(),c=Uo(),d=S(c,f=>f.getToken());return Re(()=>{Y2(r,d,()=>Q(c,f=>f.logout()),i,a,o,s,l,n)},[d]),Re(()=>{try{let f=Jye(r.platformApiSubscriptionEndpoint,d),h=()=>{Y2(r,d,()=>Q(c,b=>b.logout()),i,a,o,s,l,n)},p=f.subscribe({query:yxe,variables:void 0},{next:b=>h(),error:b=>{},complete:()=>{}}),m=f.subscribe({query:xxe,variables:void 0},{next:b=>h(),error:b=>{},complete:()=>{}});return()=>{p(),m(),f.dispose()}}catch{return}},[d]),null}let Exe=Sxe;function yn(e){return"var("+e+")"}let wxe=y([u("background",yn(v.surfaceElevated)),u("border","1px solid var("+v.border+")"),u("border-radius",yn(H.md)),u("padding",yn(I.lg)),M("flex"),ce("column"),W("center"),Ve("center"),u("gap",yn(I.sm)),u("min-height","160px"),na("center"),aa({NAME:"percent",VAL:100}),u("box-sizing","border-box")]),Rxe=y([u("font-size","32px"),u("line-height","1"),Ld(pe(4))]),kxe=y([u("color",yn(v.textPrimary)),u("font-size",yn(R.sizeMd)),u("font-weight",yn(R.weightMedium)),Ld(pe(4))]),Axe=y([u("color",yn(v.textSecondary)),u("font-size",yn(R.sizeSm)),u("line-height",yn(R.lineHeightNormal))]),Cxe=y([u("color",yn(v.textDisabled)),u("font-size",yn(R.sizeXs)),u("font-family",yn(R.fontFamilyMono)),Pi(pe(8))]);function Dxe(e){let t=e.definition;return P("div",{children:[g("div",{children:"[locked]",className:Rxe}),g("div",{children:t.title,className:kxe}),g("div",{children:t.description,className:Axe}),g("div",{children:t.extensionPackage,className:Cxe})],className:wxe})}let $xe=Dxe,Fxe=y([M("flex"),W("center"),Ve("center"),u("min-height","160px"),u("color","var("+v.textSecondary+")"),u("font-size","var("+R.sizeSm+")")]);function Ixe(e){return g("div",{children:"Loading…",className:Fxe})}y([M("flex"),W("center"),Ve("center"),u("min-height","160px"),u("color","var("+v.error+")"),u("font-size","var("+R.sizeSm+")")]);function Txe(e){let t=Au(),r=WH(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?g($xe,{definition:r}):g(g$,{children:r.component(e.props),fallback:g(Ixe,{})})}let Nxe=Txe;function Pxe(e){let t=KH(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?g("div",{children:t.map(a=>g(Nxe,{fragmentId:a.fragmentId,props:i},a.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let Oxe=Pxe;function Mxe(e){return P("div",{children:[P("header",{children:[g("h1",{children:"Platform overview",style:{margin:"0"}}),g("p",{children:"Summary panels contributed by connected plugins appear below.",style:{color:"#666",margin:"0.25rem 0 0"}})]}),g(Oxe,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let Lxe=Mxe,zxe="host.home",Uxe="/",qxe={label:"Home",icon:void 0,group:void 0,sortOrder:0},jxe=Uxe,Bxe={fragmentId:zxe,title:"Home",menuEntry:qxe,requiredAccess:void 0,url:jxe};function Vxe(e){let t=e.config,r=bt(ku),n=ov(),i=ik(),a=Dd();return Re(()=>{t.autoRedirectFirstPage||(Q(r,o=>o.register([Bxe])),Q(n,o=>o.register([ss(lE(s=>s),g(Lxe,{}))],Co())))},[]),Re(()=>{if(t.autoRedirectFirstPage&&(a===""||a==="/")){let o=i.find(s=>He(s.url));if(o!==void 0){let s=o.url;s!==void 0&&As(s)}}},[i.length,a]),null}let Hxe=Vxe;function Gxe(e){return S(j(e),t=>{let r=S(T(t,"uploadUrl"),ne),n=S(T(t,"storageRef"),ne);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function Kxe(e,t,r,n,i){return new Promise((a,o)=>{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),a({TAG:"Ok",_0:t})):a({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},s.onerror=()=>a({TAG:"Error",_0:"Upload failed (network error)"}),s.send(r)})}function Wxe(e,t){let r=t!==void 0?t:()=>{};return{upload:(n,i)=>{let a=n.type,o=it([["content-type","application/json"]]);Q(r(),l=>{o.authorization="Bearer "+l});let s=D(JSON.stringify({fileName:n.name,contentType:a}),"{}");return yt(fetch(e,{method:"POST",headers:o,body:s}).then(l=>l.ok?l.json().then(Gxe):Promise.resolve(void 0)).then(l=>l!==void 0?Kxe(l.uploadUrl,l.storageRef,n,a,i):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})),l=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))}}}let Qxe=[],Yxe=[],Jxe=[],Xxe={pages:Qxe,panels:Yxe,routes:Jxe};function GD(e){return P("div",{children:[g("h1",{children:"Shell failed to boot"}),g("pre",{children:e.message})],style:{color:"#a00",fontFamily:"system-ui",padding:"2rem"}})}function kb(e){return g("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function Zxe(e){let t=e.extensions,r=bt(ku),n=bt(Cu),i=ov();return Re(()=>{t.pages.length!==0&&Q(r,a=>a.register(t.pages)),t.panels.length!==0&&Q(n,a=>a.register(t.panels)),t.routes.length!==0&&Q(i,a=>a.register(t.routes,Co()))},[]),null}function nm(e){let t=e.config,r=lG(),n=sG(),i=P("div",{children:[g(iW,{}),g(hG,{}),g(HV,{})],style:{borderBottom:"1px solid var("+v.borderSubtle+")",display:"flex",padding:"0.5rem 1rem",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem"}});return P(jr,{children:[g(Hxe,{config:t}),g(Exe,{config:t,uiHints:e.uiHints}),g(Zxe,{extensions:e.extensions}),g($H,{appName:"Reventless",router:r,headerSlot:i,routesReady:n,loading:g(kb,{})})]})}function eSe(e){let t=e.discoverPlatforms,r=Dd(),n=uk(r);if(n===void 0)return t!==void 0?g(MG,{discover:t}):g(GD,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return g(ck.make,{scope:i,children:g(P$,{value:{prefix:av(i),path:n[1]},children:g(nm,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function J2(e){let t=e.access;return g(lH,{access:t,children:g(rH.make,{children:g(GH.make,{access:t,children:g(oG.make,{children:g(o4.make,{children:g(JK.make,{children:e.children})})})})})})}function tSe(e){let t=e.uiHints,r=e.extensions,n=e.config,i=Uo(),a=n.mode,o;if(a==="Single"){let c=n.environment,d=n.platformName;o=c!==void 0&&d!==void 0?g(ck.make,{scope:{environment:c,platformName:d},children:g(nm,{config:n,extensions:r,uiHints:t})}):g(nm,{config:n,extensions:r,uiHints:t})}else o=g(eSe,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return g(J2,{access:n.accessTiers,children:o});if(i===void 0)return g(V_,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?g(J2,{access:l.groups.concat(n.accessTiers),children:o}):g(V_,{})}function rSe(e){let t=e.config,r=Uo();vF(t.assetOrigins);let n=Dd(),i=t.mode,a;a=i==="Single"?void 0:B(uk(n),d=>d[0]);let o=oe(a,"",d=>d.environment+"|"+d.platformName),s=xt(()=>{let d=NL(t.apiEndpoint,t.platformApiEndpoint,()=>S(r,f=>f.getToken()),()=>Q(r,f=>f.logout()));return a!==void 0?IG(a)(d):d},[t,r,o]),l=()=>S(r,d=>d.getToken()),c=Ke(l);return c.current=l,Re(()=>{Q(t.uploadEndpoint,d=>_W(Wxe(d,()=>c.current()),void 0))},[t.uploadEndpoint]),g(nL.make,{execute:s,children:g(Nce,{config:t,children:g(AG.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,getToken:l,children:g(BH.make,{initialPreset:"Light",children:g(tSe,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})})})})}function nSe(e,t){let r=X(()=>{}),n=r[1];return Re(()=>{IL(e.uiHintsUrl).then(i=>n(a=>i))},[e.uiHintsUrl]),B(r[0],i=>_L(i,D(t.uiHints,{})))}function iSe(e){let t=e.extensions,r=e.config,n=nSe(r,t);return g(MV.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.cognitoClientId,cognitoUserPoolId:r.cognitoUserPoolId,region:r.region,children:n!==void 0?g(rSe,{config:r,extensions:t,uiHints:n,discoverPlatforms:e.discoverPlatforms}):g(kb,{})})}function aSe(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:Xxe,i=X(()=>"LoadingConfig"),a=i[1],o=i[0];return Re(()=>{TL().then(s=>{if(s.TAG==="Ok"){let c=s._0;return t!==void 0?yt(t(c).then(()=>a(d=>({TAG:"Ready",_0:c}))),d=>(console.error("[ShellApp] optional view modes failed to register — continuing without them: "+String(d)),a(f=>({TAG:"Ready",_0:c})),Promise.resolve())):(a(d=>({TAG:"Ready",_0:c})),Promise.resolve())}let l=s._0;return a(c=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof o!="object"?g(kb,{}):o.TAG==="Ready"?g(iSe,{config:o._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):g(GD,{message:o._0})}let oSe={make:aSe},X2=document.querySelector("#root");X2!=null&&f$(X2).render(g(oSe.make,{registerModes:w$}));export{yt as $,Fi as A,He as B,v as C,Tr as D,lr as E,Km as F,Ts as G,H as R,I as S,R as T,$o as a,dn as b,VM as c,ne as d,D as e,ee as f,T as g,ct as h,S as i,St as j,it as k,Q as l,oe as m,Wt as n,Ii as o,Xo as p,X3 as q,rt as r,Po as s,qu as t,UH as u,Ot as v,Xa as w,Ua as x,Ti as y,j as z};
|