Af?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(a)}}:null}function Cn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yn(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Bn=null;function Yn(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Bn=new Map,l.forEach(Or,t),Bn=null,Cn.call(t))}function Or(t,l){if(!(l.state.loading&4)){var e=Bn.get(t);if(e)var u=e.get(null);else{e=new Map,Bn.set(t,e);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hh)}catch(t){console.error(t)}}hh(),Ff.exports=ba;var Hf=Ff.exports;const Cr=ue({__proto__:null,default:Vf(Hf)},[Hf]);var vh={exports:{}},Ln={};/**
* @license React
* react-jsx-runtime.production.js
*
@@ -46,4 +46,4 @@ Error generating stack: `+u.message+`
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var Bm=Symbol.for("react.transitional.element"),Ym=Symbol.for("react.fragment");function mh(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Bm,type:t,key:u,ref:l!==void 0?l:null,props:e}}Zn.Fragment=Ym,Zn.jsx=mh,Zn.jsxs=mh,vh.exports=Zn;var pe=vh.exports;const rh=j.createContext(null);function Sh({namespace:t,children:l}){return pe.jsx(rh.Provider,{value:t,children:l})}function qm(){return j.useContext(rh)}function Vm(t,l){return l?`${l}-${t}`:t}function te(t,l){const e=qm();return Vm(t,l!==void 0?l:e)}function jm({id:t,tagName:l="div",namespace:e,...u}){const a=te(t,e),n=j.useRef(null);return j.useEffect(()=>{var d;const i=n.current,c=i==null?void 0:i.parentElement;if(!i||!c||!((d=window.Shiny)!=null&&d.bindAll))return;const f=(v,r)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${r} failed:`,{id:a,phase:r,error:v})};try{const v=window.Shiny.bindAll(c);v&&typeof v.catch=="function"&&v.catch(r=>f(r,"bindAll"))}catch(v){f(v,"bindAll")}return()=>{var v,r;try{(r=(v=window.Shiny)==null?void 0:v.unbindAll)==null||r.call(v,i,!0)}catch(y){f(y,"unbindAll")}}},[a,l]),Wf.createElement(l,{id:a,ref:n,...u})}const ru=Symbol("MISSING"),gh="1.0";function Gm(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function Xm(t){const l=e=>e.split(".")[0];if(l(t)!==l(gh))throw new Error(`shinyreact protocol mismatch: the server speaks protocol ${t} but this JS client supports ${gh}. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Qm(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Gm();if(a!=null&&a.protocolVersion?Xm(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[c,f]of Object.entries(n))t.add(c,f),i[c]=f;e._restore={"-applied":!0,"-values":i}}let Rf=!1,Ln=!1;const Nf=new Set;let bh=!1,Eh,zh,Th;function Ah(){for(const t of Nf)t()}function ph(){Rf||(Rf=!0,Ah())}function Oh(t){Ln!==t&&(Ln=t,Ah())}function Zm(){if(bh||typeof document>"u")return;bh=!0,document.documentElement.classList.contains("shiny-busy")&&(Ln=!0),Eh=()=>Oh(!0),zh=()=>Oh(!1),document.addEventListener("shiny:busy",Eh),document.addEventListener("shiny:idle",zh);const t=nt();if(t){t.initializedPromise.then(ph);return}Th=()=>{const l=nt();l&&l.initializedPromise.then(ph)},document.addEventListener("shiny:connected",Th,{once:!0})}function _h(t){return Zm(),Nf.add(t),()=>{Nf.delete(t)}}function Mh(){return Rf}function Dh(){return Ln}class Lm{constructor(){K(this,"messageHandlers",new Map);K(this,"initialized",!1)}init(){if(this.initialized)return;const l=nt();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const Uh=new Lm;function Hh(){const t=nt();return t?t.messageRegistry??(t.messageRegistry=Uh):Uh}function xm(){nt()&&Hh()}class Km{constructor(l){K(this,"id");K(this,"el");K(this,"status","pending");K(this,"hasValue",!1);K(this,"lastValue");K(this,"lastError",null);K(this,"useStateSetValueFns");K(this,"useStateSetStatusFns");K(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class Jm{constructor(){K(this,"outputs",new Map);K(this,"bindAllScheduled",!1);K(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new Km(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var u;const e=this.outputs.get(l);!e||!e.isEmpty()||(this.outputs.delete(l),(u=e.el)==null||u.remove(),this.scheduleBindAll())})}scheduleBindAll(){const l=nt();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function wm(t){const l=nt();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Cf(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const ra=class ra{constructor(l,e){K(this,"id");K(this,"value");K(this,"useStateSetValueFns");K(this,"shinySetInputValueDebounced");K(this,"opts",{debounceMs:100});K(this,"type");K(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Cf(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??ra.DEFAULT_TYPE}`;(a=(u=nt())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${ra.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===ru){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};K(ra,"DEFAULT_TYPE","shinyreact.default");let Bf=ra;class $m{constructor(){K(this,"inputs",new Map);K(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Bf(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let Rh;function Nh(){return Rh??(Rh={inputs:new $m,outputs:new Jm}),Rh}function Wm(){kt()}function kt(){const t=nt();return t?t.reactRegistry??(t.reactRegistry=Nh()):Nh()}function xn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Su(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=te(t,a),f=j.useRef(l).current;let d=f;const r=kt().inputs.get(i);r&&(d=r.getValue());const[y,m]=j.useState(d),b=Oe();j.useEffect(()=>{if(!b)return;const o=kt().inputs.getOrCreate(i,f);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(m),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(m)}},[i,b,e,u,f,n]);const A=j.useCallback(H=>{if(!b)return;const s=kt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,A]}const Kn=()=>{};function Ch(t,l=void 0,{namespace:e}={}){const[u,a]=j.useState(l),n=Oe();Su();const i=te(t,e),c=j.useRef(l);return j.useEffect(()=>{if(!n)return;const f=kt();return a(c.current),f.outputs.add(i,a,Kn,Kn)},[i,n]),u}function Bh(t,{namespace:l}={}){const[e,u]=j.useState("pending"),a=Oe();Su();const n=te(t,l);return j.useEffect(()=>a?kt().outputs.add(n,Kn,u,Kn):void 0,[n,a]),e}function Fm(t,{namespace:l}={}){Su();const e=te(t,l),[u,a]=j.useState(()=>{const i=kt().inputs.get(e);if(!i)return;const c=i.getValue();return c===ru?void 0:c}),n=Oe();return j.useEffect(()=>n?kt().inputs.subscribe(e,f=>{a(f===ru?void 0:f)}):void 0,[e,n]),u}function km(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(Su(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=te(t,a),f=j.useRef(l).current,d=Oe();return j.useEffect(()=>{if(!d)return;const r=kt().inputs.getOrCreate(i,f);e!==void 0&&r.updateDebounceDelay(e),u&&r.updatePriority(u),r.updateType(n),r.setValue(r.getValue())},[i,d,e,u,f,n]),j.useCallback(v=>{if(!d)return;const y=kt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(v)},[i,d])}function Im(t,l,{namespace:e}={}){const u=Oe();Su();const a=te(t,e),n=j.useRef(l);n.current=l,j.useEffect(()=>{if(!u||!a)return;const i=f=>n.current(f),c=Hh();return c.addHandler(a,i),()=>{c.removeHandler(a,i)}},[u,a])}function Oe(){return j.useSyncExternalStore(_h,Mh,Mh)}function Pm(){return j.useSyncExternalStore(_h,Dh,Dh)}let Yh=!1;function Su(){Yh||(Wm(),Qm(kt().inputs),wm(()=>kt().outputs),xm(),Yh=!0)}function tr({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const c=te(t,i),f={namespace:null},[d,v]=xn(`.clientdata_output_${c}_width`,ru,f),[r,y]=xn(`.clientdata_output_${c}_height`,ru,f),[m]=xn(`.clientdata_output_${c}_hidden`,!1,f),b=Ch(c,void 0,f),A=Bh(c,f),H=j.useRef(null),o=j.useRef(null),[s,h]=j.useState(0);j.useEffect(()=>{b&&h(E=>E+1)},[b]),j.useEffect(()=>{n&&n(A==="recalculating")},[A,n]);const S=j.useCallback(()=>{if(H.current){const E=H.current.clientWidth,_=H.current.clientHeight;E>0&&_>0&&(v(E),y(_))}},[v,y]);return j.useEffect(()=>{const E=H.current;if(!E)return;E.addEventListener("load",S);const _=Cf(()=>{E&&E.complete&&S()},a),z=new ResizeObserver(p=>{for(const M of p)M.target===E&&_()});return z.observe(E),()=>{E.removeEventListener("load",S),z.disconnect(),_.cancel()}},[H,s,v,y,a,S]),j.useEffect(()=>{if(b)return;const E=o.current;if(!E)return;const _=()=>{const M=E.clientWidth,R=E.clientHeight;M>0&&R>0&&(v(M),y(R))};_();const z=Cf(_,a),p=new ResizeObserver(()=>z());return p.observe(E),()=>{p.disconnect(),z.cancel()}},[b,v,y,a]),m?null:b?pe.jsx("img",{ref:H,src:b.src,alt:"",className:l,style:{width:e,height:u},onLoad:S}):pe.jsx("div",{ref:o,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:pe.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:pe.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}class qh extends HTMLElement{constructor(){super(...arguments);K(this,"root",null);K(this,"slotContents",new Map)}captureSlots(e="[data-slot]"){const u=this.querySelectorAll(`:scope > ${e}`),a=new Set(u);u.forEach(i=>{const c=i.getAttribute("data-slot");c&&this.slotContents.set(c,Array.from(i.childNodes))});const n=Array.from(this.childNodes).filter(i=>!a.has(i));return n.length>0&&this.slotContents.set("__children__",n),this.slotContents}async mountSlot(e,u){var n,i;const a=this.slotContents.get(e);a&&u&&(a.forEach(c=>u.appendChild(c)),await((i=(n=window.Shiny)==null?void 0:n.bindAll)==null?void 0:i.call(n,u)))}get onSlotMount(){return this.mountSlot.bind(this)}getConfig(){const e={};for(const[u,a]of Object.entries(this.dataset))if(a!==void 0)try{e[u]=JSON.parse(a)}catch{e[u]=a}return e}get namespace(){return this.id||void 0}render(){const e=this.constructor.component;return e?pe.jsx(e,{...this.getConfig()}):(console.error(`${this.constructor.name}: No static component defined`),null)}wrapWithProvider(e){return this.namespace?pe.jsx(Sh,{namespace:this.namespace,children:e}):e}clearContent(){this.innerHTML=""}connectedCallback(){this.captureSlots(),this.clearContent(),this.root=Hf.createRoot(this),this.root.render(this.wrapWithProvider(this.render()))}disconnectedCallback(){var e,u,a;(u=(e=window.Shiny)==null?void 0:e.unbindAll)==null||u.call(e,this),(a=this.root)==null||a.unmount(),this.root=null}}K(qh,"component",null);function lr(){window.shinyreact={useSetShinyInput:km,useShinyBusy:Pm,useShinyInput:xn,useShinyInputValue:Fm,useShinyOutputStatus:Bh,useShinyOutputValue:Ch,useShinyMessageHandler:Im,useShinyInitialized:Oe,ImageOutput:tr,MISSING:ru,ShinyModuleProvider:Sh,ShinyReactComponentElement:qh,ShinyOutput:jm,React:Wf,ReactDOM:Cm}}lr(),jh()})();
+ */var Br=Symbol.for("react.transitional.element"),Yr=Symbol.for("react.fragment");function rh(t,l,e){var u=null;if(e!==void 0&&(u=""+e),l.key!==void 0&&(u=""+l.key),"key"in l){e={};for(var a in l)a!=="key"&&(e[a]=l[a])}else e=l;return l=e.ref,{$$typeof:Br,type:t,key:u,ref:l!==void 0?l:null,props:e}}Ln.Fragment=Yr,Ln.jsx=rh,Ln.jsxs=rh,vh.exports=Ln;var Oe=vh.exports;const mh=V.createContext(null);function Sh({namespace:t,children:l}){return Oe.jsx(mh.Provider,{value:t,children:l})}function qr(){return V.useContext(mh)}function Vr(t,l){return l?`${l}-${t}`:t}function Ml(t,l){const e=qr();return Vr(t,l!==void 0?l:e)}function jr({id:t,tagName:l="div",namespace:e,...u}){const a=Ml(t,e),n=V.useRef(null);return V.useEffect(()=>{var d;const i=n.current,c=i==null?void 0:i.parentElement;if(!i||!c||!((d=window.Shiny)!=null&&d.bindAll))return;const f=(v,m)=>{console.error(`[shinyreact] ShinyOutput "${a}" ${m} failed:`,{id:a,phase:m,error:v})};try{const v=window.Shiny.bindAll(c);v&&typeof v.catch=="function"&&v.catch(m=>f(m,"bindAll"))}catch(v){f(v,"bindAll")}return()=>{var v,m;try{(m=(v=window.Shiny)==null?void 0:v.unbindAll)==null||m.call(v,i,!0)}catch(y){f(y,"unbindAll")}}},[a,l]),Wf.createElement(l,{id:a,ref:n,...u})}const Su=Symbol("MISSING"),gh="1.0";function Gr(){if(typeof document>"u")return null;const t=document.getElementById("shinyreact-config"),l=t==null?void 0:t.textContent;if(!l)return null;try{return JSON.parse(l)}catch(e){return console.error("shinyreact: could not parse #shinyreact-config JSON",e),null}}function Xr(t){const l=e=>e.split(".")[0];if(l(t)!==l(gh))throw new Error(`shinyreact protocol mismatch: the server speaks protocol ${t} but this JS client supports ${gh}. Upgrade the older side (the shinyreact R/Python package, or the client bundle) so the major protocol versions match.`)}function Qr(t){const l=typeof window<"u"?window:globalThis,e=l.shinyreact=l.shinyreact||{},u=e._restore,a=Gr();if(a!=null&&a.protocolVersion?Xr(a.protocolVersion):a!=null&&console.error("shinyreact: the #shinyreact-config tag carries no protocolVersion, so the client cannot verify it speaks the same protocol as the server. Upgrade the shinyreact Python/R package."),u&&typeof u=="object"&&u["-applied"])return;const n=a==null?void 0:a.restore,i=Object.create(null);if(n&&typeof n=="object")for(const[c,f]of Object.entries(n))t.add(c,f),i[c]=f;e._restore={"-applied":!0,"-values":i}}let Rf=!1,xn=!1;const Nf=new Set;let bh=!1,Eh,zh,Th;function Ah(){for(const t of Nf)t()}function ph(){Rf||(Rf=!0,Ah())}function Oh(t){xn!==t&&(xn=t,Ah())}function Zr(){if(bh||typeof document>"u")return;bh=!0,document.documentElement.classList.contains("shiny-busy")&&(xn=!0),Eh=()=>Oh(!0),zh=()=>Oh(!1),document.addEventListener("shiny:busy",Eh),document.addEventListener("shiny:idle",zh);const t=nt();if(t){t.initializedPromise.then(ph);return}Th=()=>{const l=nt();l&&l.initializedPromise.then(ph)},document.addEventListener("shiny:connected",Th,{once:!0})}function _h(t){return Zr(),Nf.add(t),()=>{Nf.delete(t)}}function Mh(){return Rf}function Dh(){return xn}class Lr{constructor(){K(this,"messageHandlers",new Map);K(this,"initialized",!1)}init(){if(this.initialized)return;const l=nt();l&&(l.addCustomMessageHandler("shinyReactMessage",e=>{this.dispatchMessage(e.id,e.data)}),this.initialized=!0)}addHandler(l,e){this.init(),this.messageHandlers.has(l)||this.messageHandlers.set(l,new Set),this.messageHandlers.get(l).add(e)}removeHandler(l,e){const u=this.messageHandlers.get(l);u&&(u.delete(e),u.size===0&&this.messageHandlers.delete(l))}dispatchMessage(l,e){const u=this.messageHandlers.get(l);u&&u.forEach(a=>a(e))}getHandlerCount(l){const e=this.messageHandlers.get(l);return e?e.size:0}getActiveMessageIds(){return Array.from(this.messageHandlers.keys())}}const Uh=new Lr;function Hh(){const t=nt();return t?t.messageRegistry??(t.messageRegistry=Uh):Uh}function xr(){nt()&&Hh()}class Kr{constructor(l){K(this,"id");K(this,"el");K(this,"status","pending");K(this,"hasValue",!1);K(this,"lastValue");K(this,"lastError",null);K(this,"useStateSetValueFns");K(this,"useStateSetStatusFns");K(this,"useStateSetErrorFns");this.id=l,this.useStateSetValueFns=new Set,this.useStateSetStatusFns=new Set,this.useStateSetErrorFns=new Set}hasReceivedValue(){return this.hasValue}getLastValue(){return this.lastValue}getLastError(){return this.lastError}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}addUseStateSetStatusFn(l){this.useStateSetStatusFns.add(l)}removeUseStateSetStatusFn(l){this.useStateSetStatusFns.delete(l)}addUseStateSetErrorFn(l){this.useStateSetErrorFns.add(l)}removeUseStateSetErrorFn(l){this.useStateSetErrorFns.delete(l)}getStatus(){return this.status}setStatus(l){this.status!==l&&(this.status=l,this.useStateSetStatusFns.forEach(e=>e(l)))}setValue(l){this.hasValue=!0,this.lastValue=l,this.useStateSetValueFns.forEach(e=>e(l)),this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("ready")}setRecalculating(l){l?this.hasValue&&(this.status==="error"&&(this.lastError=null,this.useStateSetErrorFns.forEach(e=>e(null))),this.setStatus("recalculating")):this.hasValue&&this.status==="recalculating"&&this.setStatus("ready")}setError(l){if(l.message===""){this.setValue(null);return}this.lastError=l,this.useStateSetErrorFns.forEach(e=>e(l)),this.setStatus("error")}isEmpty(){return this.useStateSetValueFns.size===0&&this.useStateSetStatusFns.size===0&&this.useStateSetErrorFns.size===0}}class Jr{constructor(){K(this,"outputs",new Map);K(this,"bindAllScheduled",!1);K(this,"containerEl")}get container(){return this.containerEl??(this.containerEl=(()=>{const l=document.createElement("div");return l.className="shiny-react-output-container",l.style.visibility="hidden",document.body.appendChild(l),l})()),this.containerEl}add(l,e,u,a){let n=this.get(l);if(!n){const i=document.createElement("div");i.className="shiny-react-output",i.id=l,this.container.appendChild(i),n=new Kr(l),n.el=i,this.outputs.set(l,n),this.scheduleBindAll()}return n.addUseStateSetValueFn(e),n.addUseStateSetStatusFn(u),n.addUseStateSetErrorFn(a),n.hasReceivedValue()&&e(n.getLastValue()),u(n.getStatus()),n.getStatus()==="error"&&a(n.getLastError()),()=>{n.removeUseStateSetValueFn(e),n.removeUseStateSetStatusFn(u),n.removeUseStateSetErrorFn(a),this.scheduleCleanup(l)}}has(l){return this.outputs.has(l)}get(l){return this.outputs.get(l)}scheduleCleanup(l){requestAnimationFrame(()=>{var u;const e=this.outputs.get(l);!e||!e.isEmpty()||(this.outputs.delete(l),(u=e.el)==null||u.remove(),this.scheduleBindAll())})}scheduleBindAll(){const l=nt();!l||!this.containerEl||this.bindAllScheduled||(this.bindAllScheduled=!0,requestAnimationFrame(()=>{var e,u;(e=l.unbindAll)==null||e.call(l,this.container),(u=l.bindAll)==null||u.call(l,this.container),this.bindAllScheduled=!1}))}}function wr(t){const l=nt();if(!l)return;class e extends l.OutputBinding{find(a){return $(a).find(".shiny-react-output")}renderValue(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setValue(n)}renderError(a,n){console.error(`Error for ${a.id}:`,n);const i=t().get(a.id);i&&i.setError(n)}showProgress(a,n){const i=t().get(a.id);if(!i){console.error(`Output ${a.id} not found`);return}i.setRecalculating(n)}}l.outputBindings.register(new e,"shiny.reactOutput")}function Cf(t,l){let e=null;const u=function(...a){const n=()=>{e=null,t(...a)};e!==null&&clearTimeout(e),e=setTimeout(n,l)};return u.setDelay=a=>{l=a},u.getDelay=()=>l,u.cancel=()=>{e!==null&&(clearTimeout(e),e=null)},u}const Sa=class Sa{constructor(l,e){K(this,"id");K(this,"value");K(this,"useStateSetValueFns");K(this,"shinySetInputValueDebounced");K(this,"opts",{debounceMs:100});K(this,"type");K(this,"typeFinalized",!1);this.id=l,this.value=e,this.useStateSetValueFns=new Set,this.shinySetInputValueDebounced=Cf(this.setShinyInputValue.bind(this),this.opts.debounceMs)}isEmpty(){return this.useStateSetValueFns.size===0}setShinyInputValue(l){var u,a;const e=`${this.id}:${this.type??Sa.DEFAULT_TYPE}`;(a=(u=nt())==null?void 0:u.setInputValue)==null||a.call(u,e,l,this.opts)}updateDebounceDelay(l){this.shinySetInputValueDebounced.setDelay(l)}updatePriority(l){const e=this.opts.priority;e!==void 0&&e!==l&&console.warn(`[shinyreact] Input "${this.id}" priority changed from ${JSON.stringify(e)} to ${JSON.stringify(l)}. Priority is per-id here, so the most recent mount wins — if two call sites for this id disagree, the winner depends on mount order.`),this.opts.priority=l}updateType(l){if(!this.typeFinalized){this.type=l,this.typeFinalized=!0;return}if(l!==void 0&&this.type!==l)throw new Error(`Input "${this.id}" is already registered with type=${this.type===void 0?`undefined (wire id "${this.id}:${Sa.DEFAULT_TYPE}")`:JSON.stringify(this.type)}. A second mount requested type=${JSON.stringify(l)}. An input's handler type changes server-side semantics and must be consistent across every useShinyInput / useSetShinyInput call for the same id.`)}addUseStateSetValueFn(l){this.useStateSetValueFns.add(l)}removeUseStateSetValueFn(l){this.useStateSetValueFns.delete(l)}setValue(l){const e=typeof l=="function"?l(this.value):l;if(this.value=e,this.useStateSetValueFns.forEach(u=>u(e)),e===Su){this.shinySetInputValueDebounced.cancel();return}this.shinySetInputValueDebounced(e)}getValue(){return this.value}};K(Sa,"DEFAULT_TYPE","shinyreact.default");let Bf=Sa;class $r{constructor(){K(this,"inputs",new Map);K(this,"pendingSubscribers",new Map)}get(l){return this.inputs.get(l)}has(l){return this.inputs.has(l)}add(l,e){if(this.inputs.has(l))throw new Error(`Input ${l} already exists`);const u=new Bf(l,e);this.inputs.set(l,u);const a=this.pendingSubscribers.get(l);return a&&(a.forEach(n=>{u.addUseStateSetValueFn(n),n(u.getValue())}),this.pendingSubscribers.delete(l)),u}getOrCreate(l,e){let u=this.get(l);return u||(u=this.add(l,e)),u}subscribe(l,e){const u=this.get(l);if(u)return u.addUseStateSetValueFn(e),e(u.getValue()),()=>{const n=this.get(l);n&&n.removeUseStateSetValueFn(e)};let a=this.pendingSubscribers.get(l);return a||(a=new Set,this.pendingSubscribers.set(l,a)),a.add(e),()=>{const n=this.get(l);if(n){n.removeUseStateSetValueFn(e);return}const i=this.pendingSubscribers.get(l);i&&(i.delete(e),i.size===0&&this.pendingSubscribers.delete(l))}}remove(l){const e=this.inputs.get(l);return e&&e.shinySetInputValueDebounced.cancel(),this.inputs.delete(l)}keys(){return this.inputs.keys()}size(){return this.inputs.size}}let Rh;function Nh(){return Rh??(Rh={inputs:new $r,outputs:new Jr}),Rh}function Wr(){Qt()}function Qt(){const t=nt();return t?t.reactRegistry??(t.reactRegistry=Nh()):Nh()}function Kn(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(_e(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),f=V.useRef(l).current;let d=f;const m=Qt().inputs.get(i);m&&(d=m.getValue());const[y,r]=V.useState(d),b=le();V.useEffect(()=>{if(!b)return;const o=Qt().inputs.getOrCreate(i,f);return e!==void 0&&o.updateDebounceDelay(e),u&&o.updatePriority(u),o.updateType(n),o.addUseStateSetValueFn(r),o.setValue(o.getValue()),()=>{o.removeUseStateSetValueFn(r)}},[i,b,e,u,f,n]);const A=V.useCallback(H=>{if(!b)return;const s=Qt().inputs.get(i);if(!s){console.error(`Input ${i} not found`);return}s.setValue(H)},[i,b]);return[y,A]}const gu=()=>{};function Ch(t,l=void 0,{namespace:e}={}){const[u,a]=V.useState(l),n=le();_e();const i=Ml(t,e),c=V.useRef(l);return V.useEffect(()=>{if(!n)return;const f=Qt();return a(c.current),f.outputs.add(i,a,gu,gu)},[i,n]),u}function Bh(t,{namespace:l}={}){const[e,u]=V.useState("pending"),a=le();_e();const n=Ml(t,l);return V.useEffect(()=>a?Qt().outputs.add(n,gu,u,gu):void 0,[n,a]),e}function Fr(t,{namespace:l}={}){const[e,u]=V.useState(null),a=le();_e();const n=Ml(t,l);return V.useEffect(()=>a?(u(null),Qt().outputs.add(n,gu,gu,u)):void 0,[n,a]),e}function kr(t,{namespace:l}={}){_e();const e=Ml(t,l),[u,a]=V.useState(()=>{const i=Qt().inputs.get(e);if(!i)return;const c=i.getValue();return c===Su?void 0:c}),n=le();return V.useEffect(()=>n?Qt().inputs.subscribe(e,f=>{a(f===Su?void 0:f)}):void 0,[e,n]),u}function Ir(t,l,{debounceMs:e=100,priority:u,namespace:a,type:n}={}){if(_e(),n!==void 0&&!/^[^\s:]+$/.test(n))throw new Error(`useSetShinyInput("${t}"): invalid type=${JSON.stringify(n)}. Must be non-empty and contain no whitespace or ':' characters.`);const i=Ml(t,a),f=V.useRef(l).current,d=le();return V.useEffect(()=>{if(!d)return;const m=Qt().inputs.getOrCreate(i,f);e!==void 0&&m.updateDebounceDelay(e),u&&m.updatePriority(u),m.updateType(n),m.setValue(m.getValue())},[i,d,e,u,f,n]),V.useCallback(v=>{if(!d)return;const y=Qt().inputs.get(i);if(!y){console.error(`Input ${i} not found`);return}y.setValue(v)},[i,d])}function Pr(t,l,{namespace:e}={}){const u=le();_e();const a=Ml(t,e),n=V.useRef(l);n.current=l,V.useEffect(()=>{if(!u||!a)return;const i=f=>n.current(f),c=Hh();return c.addHandler(a,i),()=>{c.removeHandler(a,i)}},[u,a])}function le(){return V.useSyncExternalStore(_h,Mh,Mh)}function tm(){return V.useSyncExternalStore(_h,Dh,Dh)}let Yh=!1;function _e(){Yh||(Wr(),Qr(Qt().inputs),wr(()=>Qt().outputs),xr(),Yh=!0)}function lm({id:t,className:l,width:e,height:u,debounceMs:a=400,onRecalculating:n,namespace:i}){const c=Ml(t,i),f={namespace:null},[d,v]=Kn(`.clientdata_output_${c}_width`,Su,f),[m,y]=Kn(`.clientdata_output_${c}_height`,Su,f),[r]=Kn(`.clientdata_output_${c}_hidden`,!1,f),b=Ch(c,void 0,f),A=Bh(c,f),H=V.useRef(null),o=V.useRef(null),[s,h]=V.useState(0);V.useEffect(()=>{b&&h(E=>E+1)},[b]),V.useEffect(()=>{n&&n(A==="recalculating")},[A,n]);const S=V.useCallback(()=>{if(H.current){const E=H.current.clientWidth,_=H.current.clientHeight;E>0&&_>0&&(v(E),y(_))}},[v,y]);return V.useEffect(()=>{const E=H.current;if(!E)return;E.addEventListener("load",S);const _=Cf(()=>{E&&E.complete&&S()},a),z=new ResizeObserver(p=>{for(const M of p)M.target===E&&_()});return z.observe(E),()=>{E.removeEventListener("load",S),z.disconnect(),_.cancel()}},[H,s,v,y,a,S]),V.useEffect(()=>{if(b)return;const E=o.current;if(!E)return;const _=()=>{const M=E.clientWidth,R=E.clientHeight;M>0&&R>0&&(v(M),y(R))};_();const z=Cf(_,a),p=new ResizeObserver(()=>z());return p.observe(E),()=>{p.disconnect(),z.cancel()}},[b,v,y,a]),r?null:b?Oe.jsx("img",{ref:H,src:b.src,alt:"",className:l,style:{width:e,height:u},onLoad:S}):Oe.jsx("div",{ref:o,className:l,style:{width:e,height:u,display:"flex",alignItems:"center",justifyContent:"center",color:"#9ca3af"},children:Oe.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:Oe.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})})})}class qh extends HTMLElement{constructor(){super(...arguments);K(this,"root",null);K(this,"slotContents",new Map)}captureSlots(e="[data-slot]"){const u=this.querySelectorAll(`:scope > ${e}`),a=new Set(u);u.forEach(i=>{const c=i.getAttribute("data-slot");c&&this.slotContents.set(c,Array.from(i.childNodes))});const n=Array.from(this.childNodes).filter(i=>!a.has(i));return n.length>0&&this.slotContents.set("__children__",n),this.slotContents}async mountSlot(e,u){var n,i;const a=this.slotContents.get(e);a&&u&&(a.forEach(c=>u.appendChild(c)),await((i=(n=window.Shiny)==null?void 0:n.bindAll)==null?void 0:i.call(n,u)))}get onSlotMount(){return this.mountSlot.bind(this)}getConfig(){const e={};for(const[u,a]of Object.entries(this.dataset))if(a!==void 0)try{e[u]=JSON.parse(a)}catch{e[u]=a}return e}get namespace(){return this.id||void 0}render(){const e=this.constructor.component;return e?Oe.jsx(e,{...this.getConfig()}):(console.error(`${this.constructor.name}: No static component defined`),null)}wrapWithProvider(e){return this.namespace?Oe.jsx(Sh,{namespace:this.namespace,children:e}):e}clearContent(){this.innerHTML=""}connectedCallback(){this.captureSlots(),this.clearContent(),this.root=Hf.createRoot(this),this.root.render(this.wrapWithProvider(this.render()))}disconnectedCallback(){var e,u,a;(u=(e=window.Shiny)==null?void 0:e.unbindAll)==null||u.call(e,this),(a=this.root)==null||a.unmount(),this.root=null}}K(qh,"component",null);function em(){window.shinyreact={useSetShinyInput:Ir,useShinyBusy:tm,useShinyInput:Kn,useShinyInputValue:kr,useShinyOutputError:Fr,useShinyOutputStatus:Bh,useShinyOutputValue:Ch,useShinyMessageHandler:Pr,useShinyInitialized:le,ImageOutput:lm,MISSING:Su,ShinyModuleProvider:Sh,ShinyReactComponentElement:qh,ShinyOutput:jr,React:Wf,ReactDOM:Cr}}em(),jh()})();
diff --git a/pkg-py/tests/playwright/apps/output-error/app.py b/pkg-py/tests/playwright/apps/output-error/app.py
new file mode 100644
index 0000000..a3189f6
--- /dev/null
+++ b/pkg-py/tests/playwright/apps/output-error/app.py
@@ -0,0 +1,15 @@
+from shiny import req
+from shiny.express import input
+from shinyreact import reactive_output, set_react_page
+
+set_react_page()
+
+
+@reactive_output
+def answer():
+ n = input.n()
+ # n < 0 is a *silent* error: no message reaches the client.
+ req(n is not None and n >= 0)
+ if n == 0:
+ raise ValueError("invalid number of 'breaks'")
+ return f"ok: {n}"
diff --git a/pkg-py/tests/playwright/apps/output-error/www/app.js b/pkg-py/tests/playwright/apps/output-error/www/app.js
new file mode 100644
index 0000000..64fd5ae
--- /dev/null
+++ b/pkg-py/tests/playwright/apps/output-error/www/app.js
@@ -0,0 +1,33 @@
+const {
+ React,
+ ReactDOM,
+ useShinyInput,
+ useShinyOutputError,
+ useShinyOutputStatus,
+ useShinyOutputValue,
+} = window.shinyreact;
+
+const h = React.createElement;
+
+function App() {
+ const [n, setN] = useShinyInput("n", 1, { debounceMs: 0 });
+ const value = useShinyOutputValue("answer");
+ const status = useShinyOutputStatus("answer");
+ const error = useShinyOutputError("answer");
+
+ return h(
+ "div",
+ { "data-test": "container" },
+ h("input", {
+ "data-test": "input",
+ type: "number",
+ value: n,
+ onChange: (e) => setN(Number(e.target.value)),
+ }),
+ h("span", { "data-test": "value" }, value ?? ""),
+ h("span", { "data-test": "status" }, status),
+ h("span", { "data-test": "error" }, error ? error.message : ""),
+ );
+}
+
+ReactDOM.createRoot(document.getElementById("root")).render(h(App));
diff --git a/pkg-py/tests/playwright/apps/output-error/www/index.html b/pkg-py/tests/playwright/apps/output-error/www/index.html
new file mode 100644
index 0000000..d6cda32
--- /dev/null
+++ b/pkg-py/tests/playwright/apps/output-error/www/index.html
@@ -0,0 +1,16 @@
+
+
+ Type a number. 1 renders ok: 1; 0
+ renders the server's error text
+ invalid number of 'breaks' with status error; a
+ negative number is a silent req() — no error text, and the
+ value goes blank.
+
+
+
diff --git a/pkg-py/tests/playwright/test_output_error.py b/pkg-py/tests/playwright/test_output_error.py
new file mode 100644
index 0000000..8c1819f
--- /dev/null
+++ b/pkg-py/tests/playwright/test_output_error.py
@@ -0,0 +1,47 @@
+from playwright.sync_api import Page, expect
+from shiny.pytest import create_app_fixture
+from shiny.run import ShinyAppProc
+
+output_error_app = create_app_fixture("apps/output-error/app.py")
+
+
+def test_output_error_message_reaches_the_client(
+ page: Page, output_error_app: ShinyAppProc
+) -> None:
+ """`useShinyOutputError` exposes the server exception's text, so an app can
+ reproduce vanilla Shiny's error UI (#257)."""
+ page.goto(output_error_app.url)
+
+ value = page.locator("[data-test=value]")
+ status = page.locator("[data-test=status]")
+ error = page.locator("[data-test=error]")
+
+ expect(value).to_have_text("ok: 1")
+ expect(status).to_have_text("ready")
+ expect(error).to_be_empty()
+
+ page.locator("[data-test=input]").fill("0")
+ expect(error).to_have_text("invalid number of 'breaks'")
+ expect(status).to_have_text("error")
+
+ # Recovering clears the error.
+ page.locator("[data-test=input]").fill("2")
+ expect(value).to_have_text("ok: 2")
+ expect(status).to_have_text("ready")
+ expect(error).to_be_empty()
+
+
+def test_silent_error_delivers_no_message(
+ page: Page, output_error_app: ShinyAppProc
+) -> None:
+ """`req()` stays silent: no error message, and the value blanks — matching
+ vanilla Shiny, which empties the output element."""
+ page.goto(output_error_app.url)
+
+ value = page.locator("[data-test=value]")
+ expect(value).to_have_text("ok: 1")
+
+ page.locator("[data-test=input]").fill("-1")
+ expect(value).to_be_empty()
+ expect(page.locator("[data-test=error]")).to_be_empty()
+ expect(page.locator("[data-test=status]")).to_have_text("ready")
diff --git a/pkg-r/inst/lib/shiny/shinyreact.js b/pkg-r/inst/lib/shiny/shinyreact.js
index a5a0fde..70c2905 100644
--- a/pkg-r/inst/lib/shiny/shinyreact.js
+++ b/pkg-r/inst/lib/shiny/shinyreact.js
@@ -1,4 +1,4 @@
-var ur=Object.defineProperty;var ar=(ee,nt,ue)=>nt in ee?ur(ee,nt,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ee[nt]=ue;var K=(ee,nt,ue)=>ar(ee,typeof nt!="symbol"?nt+"":nt,ue);(function(){"use strict";function ee(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function nt(){return window.Shiny}let ue=!1;function jh(){if(typeof document>"u"||ue)return;ue=!0;const t=()=>{const e=nt();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(nt()){t();return}const l=()=>{nt()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function Vf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jf={exports:{}},D={};/**
+var am=Object.defineProperty;var nm=(ue,nt,ae)=>nt in ue?am(ue,nt,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ue[nt]=ae;var K=(ue,nt,ae)=>nm(ue,typeof nt!="symbol"?nt+"":nt,ae);(function(){"use strict";function ue(t,l){for(var e=0;eu[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function nt(){return window.Shiny}let ae=!1;function jh(){if(typeof document>"u"||ae)return;ae=!0;const t=()=>{const e=nt();e&&(e.addCustomMessageHandler("shinyreact-deps",async u=>{var a,n;try{const i=e;await((a=i.renderDependenciesAsync)==null?void 0:a.call(i,u)),await((n=i.bindAll)==null?void 0:n.call(i,document.documentElement))}catch(i){console.error("[shinyreact] failed to load pushed dependencies:",i)}}),e.initializedPromise.then(()=>{var u;(u=e.setInputValue)==null||u.call(e,".shinyreact_init:shinyreact.init",1)}))};if(nt()){t();return}const l=()=>{nt()&&(document.removeEventListener("shiny:connected",l),t())};document.addEventListener("shiny:connected",l)}function Vf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jf={exports:{}},D={};/**
* @license React
* react.production.js
*
@@ -6,7 +6,7 @@ var ur=Object.defineProperty;var ar=(ee,nt,ue)=>nt in ee?ur(ee,nt,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var Wn=Symbol.for("react.transitional.element"),Gh=Symbol.for("react.portal"),Xh=Symbol.for("react.fragment"),Qh=Symbol.for("react.strict_mode"),Zh=Symbol.for("react.profiler"),Lh=Symbol.for("react.consumer"),xh=Symbol.for("react.context"),Kh=Symbol.for("react.forward_ref"),Jh=Symbol.for("react.suspense"),wh=Symbol.for("react.memo"),Gf=Symbol.for("react.lazy"),$h=Symbol.for("react.activity"),Xf=Symbol.iterator;function Wh(t){return t===null||typeof t!="object"?null:(t=Xf&&t[Xf]||t["@@iterator"],typeof t=="function"?t:null)}var Qf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Zf=Object.assign,Lf={};function Me(t,l,e){this.props=t,this.context=l,this.refs=Lf,this.updater=e||Qf}Me.prototype.isReactComponent={},Me.prototype.setState=function(t,l){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,l,"setState")},Me.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function xf(){}xf.prototype=Me.prototype;function Fn(t,l,e){this.props=t,this.context=l,this.refs=Lf,this.updater=e||Qf}var kn=Fn.prototype=new xf;kn.constructor=Fn,Zf(kn,Me.prototype),kn.isPureReactComponent=!0;var Kf=Array.isArray;function In(){}var W={H:null,A:null,T:null,S:null},Jf=Object.prototype.hasOwnProperty;function Pn(t,l,e){var u=e.ref;return{$$typeof:Wn,type:t,key:l,ref:u!==void 0?u:null,props:e}}function Fh(t,l){return Pn(t.type,l,t.props)}function ti(t){return typeof t=="object"&&t!==null&&t.$$typeof===Wn}function kh(t){var l={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(e){return l[e]})}var wf=/\/+/g;function li(t,l){return typeof t=="object"&&t!==null&&t.key!=null?kh(""+t.key):l.toString(36)}function Ih(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(In,In):(t.status="pending",t.then(function(l){t.status==="pending"&&(t.status="fulfilled",t.value=l)},function(l){t.status==="pending"&&(t.status="rejected",t.reason=l)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function De(t,l,e,u,a){var n=typeof t;(n==="undefined"||n==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(n){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case Wn:case Gh:i=!0;break;case Gf:return i=t._init,De(i(t._payload),l,e,u,a)}}if(i)return a=a(t),i=u===""?"."+li(t,0):u,Kf(a)?(e="",i!=null&&(e=i.replace(wf,"$&/")+"/"),De(a,l,e,"",function(d){return d})):a!=null&&(ti(a)&&(a=Fh(a,e+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace(wf,"$&/")+"/")+i)),l.push(a)),1;i=0;var c=u===""?".":u+":";if(Kf(t))for(var f=0;fnt in ee?ur(ee,nt,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */(function(t){function l(T,Y){var N=T.length;T.push(Y);t:for(;0>>1,mt=T[at];if(0>>1;ata(qf,N))_ea($n,qf)?(T[at]=$n,T[_e]=N,at=_e):(T[at]=qf,T[wn]=N,at=wn);else if(_ea($n,N))T[at]=$n,T[_e]=N,at=_e;else break t}}return Y}function a(T,Y){var N=T.sortIndex-Y.sortIndex;return N!==0?N:T.id-Y.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var n=performance;t.unstable_now=function(){return n.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var f=[],d=[],v=1,r=null,y=3,m=!1,b=!1,A=!1,H=!1,o=typeof setTimeout=="function"?setTimeout:null,s=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;function S(T){for(var Y=e(d);Y!==null;){if(Y.callback===null)u(d);else if(Y.startTime<=T)u(d),Y.sortIndex=Y.expirationTime,l(f,Y);else break;Y=e(d)}}function E(T){if(A=!1,S(T),!b)if(e(f)!==null)b=!0,_||(_=!0,le());else{var Y=e(d);Y!==null&&Yf(E,Y.startTime-T)}}var _=!1,z=-1,p=5,M=-1;function R(){return H?!0:!(t.unstable_now()-MT&&R());){var at=r.callback;if(typeof at=="function"){r.callback=null,y=r.priorityLevel;var mt=at(r.expirationTime<=T);if(T=t.unstable_now(),typeof mt=="function"){r.callback=mt,S(T),Y=!0;break l}r===e(f)&&u(f),S(T)}else u(f);r=e(f)}if(r!==null)Y=!0;else{var Jn=e(d);Jn!==null&&Yf(E,Jn.startTime-T),Y=!1}}break t}finally{r=null,y=N,m=!1}Y=void 0}}finally{Y?le():_=!1}}}var le;if(typeof h=="function")le=function(){h(It)};else if(typeof MessageChannel<"u"){var Vh=new MessageChannel,er=Vh.port2;Vh.port1.onmessage=It,le=function(){er.postMessage(null)}}else le=function(){o(It,0)};function Yf(T,Y){z=o(function(){T(t.unstable_now())},Y)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125at?(T.sortIndex=N,l(d,T),e(f)===null&&T===e(d)&&(A?(s(z),z=-1):A=!0,Yf(E,N-at))):(T.sortIndex=mt,l(f,T),b||m||(b=!0,_||(_=!0,le()))),T},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(T){var Y=y;return function(){var N=y;y=Y;try{return T.apply(this,arguments)}finally{y=N}}}})(If),kf.exports=If;var l0=kf.exports,Pf={exports:{}},zt={};/**
+ */(function(t){function l(T,Y){var N=T.length;T.push(Y);t:for(;0>>1,rt=T[at];if(0>>1;ata(qf,N))Me