diff --git a/inst/editor/build/assets/index-454204bb.js b/inst/editor/build/assets/index-4ee1b982.js similarity index 84% rename from inst/editor/build/assets/index-454204bb.js rename to inst/editor/build/assets/index-4ee1b982.js index ef40874c0..f15aaaa5c 100644 --- a/inst/editor/build/assets/index-454204bb.js +++ b/inst/editor/build/assets/index-4ee1b982.js @@ -1,4 +1,4 @@ -var a_=Object.defineProperty,s_=Object.defineProperties;var u_=Object.getOwnPropertyDescriptors;var ps=Object.getOwnPropertySymbols;var Kg=Object.prototype.hasOwnProperty,qg=Object.prototype.propertyIsEnumerable;var Xg=Math.pow,Ff=(e,t,n)=>t in e?a_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t)=>{for(var n in t||(t={}))Kg.call(t,n)&&Ff(e,n,t[n]);if(ps)for(var n of ps(t))qg.call(t,n)&&Ff(e,n,t[n]);return e},W=(e,t)=>s_(e,u_(t));var ye=(e,t)=>{var n={};for(var r in e)Kg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ps)for(var r of ps(e))t.indexOf(r)<0&&qg.call(e,r)&&(n[r]=e[r]);return n};var c_=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var hs=(e,t,n)=>(Ff(e,typeof t!="symbol"?t+"":t,n),n);var It=(e,t,n)=>new Promise((r,i)=>{var o=s=>{try{a(n.next(s))}catch(u){i(u)}},l=s=>{try{a(n.throw(s))}catch(u){i(u)}},a=s=>s.done?r(s.value):Promise.resolve(s.value).then(o,l);a((n=n.apply(e,t)).next())});var PW=c_(ml=>{function f_(e,t){for(var n=0;nr[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"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const iw=d_;function d_(){const e={};return{subscribe:(t,n)=>(e[t]===void 0&&(e[t]=new Set),e[t].add(n),{unsubscribe:()=>{e[t].delete(n)}}),dispatch:(t,n)=>{var r;(r=e[t])==null||r.forEach(i=>i(n))}}}function p_(e){return It(this,null,function*(){return new Promise(t=>{fetch("/testing-tree").then(n=>n.json()).then(n=>{t(n)}).catch(n=>{console.error("/testing-tree error",n),t(e)})})})}function ow({messageDispatch:e,showMessages:t,defaultTree:n}){const r=t?console.log:(...o)=>{};return{sendMsg:o=>{switch(r("Static sendMsg()",o),o.path){case"READY-FOR-STATE":{p_(n).then(l=>{l==="TEMPLATE_CHOOSER"?e.dispatch("TEMPLATE_CHOOSER","USER-CHOICE"):e.dispatch("APP-INFO",{ui_tree:l,app_type:"SINGLE-FILE",app:{code:h_,libraries:["shiny"]}})});return}case"UPDATED-APP":{o.payload.info&&e.dispatch("APP-INFO",o.payload.info);return}case"APP-PREVIEW-REQUEST":return}},incomingMsgs:e,mode:"STATIC"}}const h_=` +var a_=Object.defineProperty,s_=Object.defineProperties;var u_=Object.getOwnPropertyDescriptors;var ps=Object.getOwnPropertySymbols;var Kg=Object.prototype.hasOwnProperty,qg=Object.prototype.propertyIsEnumerable;var Xg=Math.pow,Ff=(e,t,n)=>t in e?a_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))Kg.call(t,n)&&Ff(e,n,t[n]);if(ps)for(var n of ps(t))qg.call(t,n)&&Ff(e,n,t[n]);return e},W=(e,t)=>s_(e,u_(t));var ye=(e,t)=>{var n={};for(var r in e)Kg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ps)for(var r of ps(e))t.indexOf(r)<0&&qg.call(e,r)&&(n[r]=e[r]);return n};var c_=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var hs=(e,t,n)=>(Ff(e,typeof t!="symbol"?t+"":t,n),n);var It=(e,t,n)=>new Promise((r,i)=>{var o=s=>{try{a(n.next(s))}catch(u){i(u)}},l=s=>{try{a(n.throw(s))}catch(u){i(u)}},a=s=>s.done?r(s.value):Promise.resolve(s.value).then(o,l);a((n=n.apply(e,t)).next())});var RW=c_(ml=>{function f_(e,t){for(var n=0;nr[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"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const iw=d_;function d_(){const e={};return{subscribe:(t,n)=>(e[t]===void 0&&(e[t]=new Set),e[t].add(n),{unsubscribe:()=>{e[t].delete(n)}}),dispatch:(t,n)=>{var r;(r=e[t])==null||r.forEach(i=>i(n))}}}function p_(e){return It(this,null,function*(){return new Promise(t=>{fetch("/testing-tree").then(n=>n.json()).then(n=>{t(n)}).catch(n=>{console.error("/testing-tree error",n),t(e)})})})}function ow({messageDispatch:e,showMessages:t,defaultTree:n}){const r=t?console.log:(...o)=>{};return{sendMsg:o=>{switch(r("Static sendMsg()",o),o.path){case"READY-FOR-STATE":{p_(n).then(l=>{l==="TEMPLATE_CHOOSER"?e.dispatch("TEMPLATE_CHOOSER","USER-CHOICE"):e.dispatch("APP-INFO",{ui_tree:l,app_type:"SINGLE-FILE",app:{code:h_,libraries:["shiny"]}})});return}case"UPDATED-APP":{o.payload.info&&e.dispatch("APP-INFO",o.payload.info);return}case"APP-PREVIEW-REQUEST":return}},incomingMsgs:e,mode:"STATIC"}}const h_=` ui <- @@ -8,7 +8,7 @@ server <- function(input, output) { } shinyApp(ui, server) -`;function m_({onClose:e,messageDispatch:t,pathToWebsocket:n=window.location.host+window.location.pathname}){let r=!1;return new Promise(i=>{try{if(!document.location.host)throw new Error("Not on a served site!");const o=new WebSocket(g_(n)),l={sendMsg:a=>{y_(o,a)},incomingMsgs:t,mode:"HTTPUV"};o.onerror=a=>{i("NO-WS-CONNECTION")},o.onopen=a=>{v_(o,s=>{const{path:u,payload:c}=s;t.dispatch(u,c)}),i(l),r=!0},o.onclose=a=>{r?e():i("NO-WS-CONNECTION")}}catch(o){i("NO-WS-CONNECTION")}})}function g_(e){return(window.location.protocol==="https:"?"wss:":"ws:")+"//"+e}function y_(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});e.send(n)}function v_(e,t){e.addEventListener("message",n=>{t(w_(n))})}function w_(e){return JSON.parse(e.data)}var b_=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Gh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lw(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ha={},E_={get exports(){return ha},set exports(e){ha=e}},hc={},P={},S_={get exports(){return P},set exports(e){P=e}},he={};/** +`;function m_({onClose:e,messageDispatch:t,pathToWebsocket:n=window.location.host+window.location.pathname}){let r=!1;return new Promise(i=>{try{if(!document.location.host)throw new Error("Not on a served site!");const o=new WebSocket(g_(n)),l={sendMsg:a=>{y_(o,a)},incomingMsgs:t,mode:"HTTPUV"};o.onerror=a=>{i("NO-WS-CONNECTION")},o.onopen=a=>{v_(o,s=>{const{path:u,payload:c}=s;t.dispatch(u,c)}),i(l),r=!0},o.onclose=a=>{r?e():i("NO-WS-CONNECTION")}}catch(o){i("NO-WS-CONNECTION")}})}function g_(e){return(window.location.protocol==="https:"?"wss:":"ws:")+"//"+e}function y_(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});e.send(n)}function v_(e,t){e.addEventListener("message",n=>{t(w_(n))})}function w_(e){return JSON.parse(e.data)}var b_=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Hh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lw(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ha={},E_={get exports(){return ha},set exports(e){ha=e}},hc={},O={},S_={get exports(){return O},set exports(e){O=e}},he={};/** * @license React * react.production.min.js * @@ -16,7 +16,7 @@ shinyApp(ui, server) * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ya=Symbol.for("react.element"),A_=Symbol.for("react.portal"),x_=Symbol.for("react.fragment"),C_=Symbol.for("react.strict_mode"),__=Symbol.for("react.profiler"),k_=Symbol.for("react.provider"),T_=Symbol.for("react.context"),I_=Symbol.for("react.forward_ref"),O_=Symbol.for("react.suspense"),P_=Symbol.for("react.memo"),N_=Symbol.for("react.lazy"),Zg=Symbol.iterator;function R_(e){return e===null||typeof e!="object"?null:(e=Zg&&e[Zg]||e["@@iterator"],typeof e=="function"?e:null)}var aw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sw=Object.assign,uw={};function rl(e,t,n){this.props=e,this.context=t,this.refs=uw,this.updater=n||aw}rl.prototype.isReactComponent={};rl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};rl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cw(){}cw.prototype=rl.prototype;function Jh(e,t,n){this.props=e,this.context=t,this.refs=uw,this.updater=n||aw}var Qh=Jh.prototype=new cw;Qh.constructor=Jh;sw(Qh,rl.prototype);Qh.isPureReactComponent=!0;var ey=Array.isArray,fw=Object.prototype.hasOwnProperty,Kh={current:null},dw={key:!0,ref:!0,__self:!0,__source:!0};function pw(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)fw.call(t,r)&&!dw.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t}return!1}function kt(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dt[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dt[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dt[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dt[e]=new kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){dt[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dt[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dt[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dt[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dt[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xh=/[\-:]([a-z])/g;function Zh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xh,Zh);dt[t]=new kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xh,Zh);dt[t]=new kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xh,Zh);dt[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dt[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});dt.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dt[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function em(e,t,n,r){var i=dt.hasOwnProperty(t)?dt[t]:null;(i!==null?i.type!==0:r||!(2t}return!1}function kt(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){dt[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];dt[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){dt[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){dt[e]=new kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){dt[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){dt[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){dt[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){dt[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){dt[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var qh=/[\-:]([a-z])/g;function Xh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(qh,Xh);dt[t]=new kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qh,Xh);dt[t]=new kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qh,Xh);dt[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){dt[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});dt.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){dt[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zh(e,t,n,r){var i=dt.hasOwnProperty(t)?dt[t]:null;(i!==null?i.type!==0:r||!(2a||i[l]!==o[a]){var s=` -`+i[l].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=a);break}}}finally{Uf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bl(e):""}function K_(e){switch(e.tag){case 5:return Bl(e.type);case 16:return Bl("Lazy");case 13:return Bl("Suspense");case 19:return Bl("SuspenseList");case 0:case 2:case 15:return e=zf(e.type,!1),e;case 11:return e=zf(e.type.render,!1),e;case 1:return e=zf(e.type,!0),e;default:return""}}function sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mo:return"Fragment";case ho:return"Portal";case op:return"Profiler";case tm:return"StrictMode";case lp:return"Suspense";case ap:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bw:return(e.displayName||"Context")+".Consumer";case ww:return(e._context.displayName||"Context")+".Provider";case nm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rm:return t=e.displayName||null,t!==null?t:sp(e.type)||"Memo";case Fr:t=e._payload,e=e._init;try{return sp(e(t))}catch(n){}}return null}function q_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sp(t);case 8:return t===tm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function X_(e){var t=Sw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){e._valueTracker||(e._valueTracker=X_(e))}function Aw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function du(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function up(e,t){var n=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function oy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=si(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xw(e,t){t=t.checked,t!=null&&em(e,"checked",t,!1)}function cp(e,t){xw(e,t);var n=si(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fp(e,t.type,n):t.hasOwnProperty("defaultValue")&&fp(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ly(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function fp(e,t,n){(t!=="number"||du(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ul=Array.isArray;function ko(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=vs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ga(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ql={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Z_=["Webkit","ms","Moz","O"];Object.keys(Ql).forEach(function(e){Z_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ql[t]=Ql[e]})});function Tw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ql.hasOwnProperty(e)&&Ql[e]?(""+t).trim():t+"px"}function Iw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Tw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ek=Ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hp(e,t){if(t){if(ek[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Y(62))}}function mp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gp=null;function im(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yp=null,To=null,Io=null;function uy(e){if(e=Ha(e)){if(typeof yp!="function")throw Error(Y(280));var t=e.stateNode;t&&(t=wc(t),yp(e.stateNode,e.type,t))}}function Ow(e){To?Io?Io.push(e):Io=[e]:To=e}function Pw(){if(To){var e=To,t=Io;if(Io=To=null,uy(e),t)for(e=0;e>>=0,e===0?32:31-(fk(e)/dk|0)|0}var ws=64,bs=4194304;function zl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~i;a!==0?r=zl(a):(o&=l,o!==0&&(r=zl(o)))}else l=n&~i,l!==0?r=zl(l):o!==0&&(r=zl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Va(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-In(t),e[t]=n}function gk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ql),vy=String.fromCharCode(32),wy=!1;function qw(e,t){switch(e){case"keyup":return Vk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var go=!1;function Hk(e,t){switch(e){case"compositionend":return Xw(t);case"keypress":return t.which!==32?null:(wy=!0,vy);case"textInput":return e=t.data,e===vy&&wy?null:e;default:return null}}function Gk(e,t){if(go)return e==="compositionend"||!dm&&qw(e,t)?(e=Qw(),$s=um=Hr=null,go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ay(n)}}function nb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rb(){for(var e=window,t=du();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=du(e.document)}return t}function pm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function n2(e){var t=rb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nb(n.ownerDocument.documentElement,n)){if(r!==null&&pm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=xy(n,o);var l=xy(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,yo=null,Ap=null,Zl=null,xp=!1;function Cy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xp||yo==null||yo!==du(r)||(r=yo,"selectionStart"in r&&pm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zl&&Sa(Zl,r)||(Zl=r,r=wu(Ap,"onSelect"),0bo||(e.current=Op[bo],Op[bo]=null,bo--)}function Te(e,t){bo++,Op[bo]=e.current,e.current=t}var ui={},Et=gi(ui),Ft=gi(!1),Wi=ui;function jo(e,t){var n=e.type.contextTypes;if(!n)return ui;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mt(e){return e=e.childContextTypes,e!=null}function Eu(){Pe(Ft),Pe(Et)}function Ny(e,t,n){if(Et.current!==ui)throw Error(Y(168));Te(Et,t),Te(Ft,n)}function db(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Y(108,q_(e)||"Unknown",i));return Ye({},n,r)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ui,Wi=Et.current,Te(Et,e),Te(Ft,Ft.current),!0}function Ry(e,t,n){var r=e.stateNode;if(!r)throw Error(Y(169));n?(e=db(e,t,Wi),r.__reactInternalMemoizedMergedChildContext=e,Pe(Ft),Pe(Et),Te(Et,e)):Pe(Ft),Te(Ft,n)}var cr=null,bc=!1,ed=!1;function pb(e){cr===null?cr=[e]:cr.push(e)}function h2(e){bc=!0,pb(e)}function yi(){if(!ed&&cr!==null){ed=!0;var e=0,t=ve;try{var n=cr;for(ve=1;e>=l,i-=l,hr=1<<32-In(t)+i|n<T?(N=A,A=null):N=A.sibling;var R=d(g,A,w[T],S);if(R===null){A===null&&(A=N);break}e&&A&&R.alternate===null&&t(g,A),y=o(R,y,T),b===null?_=R:b.sibling=R,b=R,A=N}if(T===w.length)return n(g,A),Me&&ki(g,T),_;if(A===null){for(;TT?(N=A,A=null):N=A.sibling;var I=d(g,A,R.value,S);if(I===null){A===null&&(A=N);break}e&&A&&I.alternate===null&&t(g,A),y=o(I,y,T),b===null?_=I:b.sibling=I,b=I,A=N}if(R.done)return n(g,A),Me&&ki(g,T),_;if(A===null){for(;!R.done;T++,R=w.next())R=f(g,R.value,S),R!==null&&(y=o(R,y,T),b===null?_=R:b.sibling=R,b=R);return Me&&ki(g,T),_}for(A=r(g,A);!R.done;T++,R=w.next())R=p(A,g,T,R.value,S),R!==null&&(e&&R.alternate!==null&&A.delete(R.key===null?T:R.key),y=o(R,y,T),b===null?_=R:b.sibling=R,b=R);return e&&A.forEach(function(F){return t(g,F)}),Me&&ki(g,T),_}function E(g,y,w,S){if(typeof w=="object"&&w!==null&&w.type===mo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case gs:e:{for(var _=w.key,b=y;b!==null;){if(b.key===_){if(_=w.type,_===mo){if(b.tag===7){n(g,b.sibling),y=i(b,w.props.children),y.return=g,g=y;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Fr&&zy(_)===b.type){n(g,b.sibling),y=i(b,w.props),y.ref=Al(g,b,w),y.return=g,g=y;break e}n(g,b);break}else t(g,b);b=b.sibling}w.type===mo?(y=Fi(w.props.children,g.mode,S,w.key),y.return=g,g=y):(S=Zs(w.type,w.key,w.props,null,g.mode,S),S.ref=Al(g,y,w),S.return=g,g=S)}return l(g);case ho:e:{for(b=w.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),y=i(y,w.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=sd(w,g.mode,S),y.return=g,g=y}return l(g);case Fr:return b=w._init,E(g,y,b(w._payload),S)}if(Ul(w))return h(g,y,w,S);if(vl(w))return m(g,y,w,S);ks(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,w),y.return=g,g=y):(n(g,y),y=ad(w,g.mode,S),y.return=g,g=y),l(g)):n(g,y)}return E}var Yo=Eb(!0),Sb=Eb(!1),Ga={},Jn=gi(Ga),_a=gi(Ga),ka=gi(Ga);function Di(e){if(e===Ga)throw Error(Y(174));return e}function Sm(e,t){switch(Te(ka,t),Te(_a,e),Te(Jn,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=pp(t,e)}Pe(Jn),Te(Jn,t)}function Vo(){Pe(Jn),Pe(_a),Pe(ka)}function Ab(e){Di(ka.current);var t=Di(Jn.current),n=pp(t,e.type);t!==n&&(Te(_a,e),Te(Jn,n))}function Am(e){_a.current===e&&(Pe(Jn),Pe(_a))}var ze=gi(0);function Tu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var td=[];function xm(){for(var e=0;en?n:4,e(!0);var r=nd.transition;nd.transition={};try{e(!1),t()}finally{ve=n,nd.transition=r}}function Ub(){return hn().memoizedState}function v2(e,t,n){var r=ti(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zb(e))jb(t,n);else if(n=yb(e,t,n,r),n!==null){var i=Ct();On(n,e,r,i),Wb(n,t,r)}}function w2(e,t,n){var r=ti(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zb(e))jb(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,a=o(l,n);if(i.hasEagerState=!0,i.eagerState=a,Nn(a,l)){var s=t.interleaved;s===null?(i.next=i,bm(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch(u){}finally{}n=yb(e,t,i,r),n!==null&&(i=Ct(),On(n,e,r,i),Wb(n,t,r))}}function zb(e){var t=e.alternate;return e===We||t!==null&&t===We}function jb(e,t){ea=Iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lm(e,n)}}var Ou={readContext:pn,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},b2={readContext:pn,useCallback:function(e,t){return Bn().memoizedState=[e,t===void 0?null:t],e},useContext:pn,useEffect:Wy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qs(4194308,4,Db.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qs(4,2,e,t)},useMemo:function(e,t){var n=Bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=v2.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=Bn();return e={current:e},t.memoizedState=e},useState:jy,useDebugValue:Im,useDeferredValue:function(e){return Bn().memoizedState=e},useTransition:function(){var e=jy(!1),t=e[0];return e=y2.bind(null,e[1]),Bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,i=Bn();if(Me){if(n===void 0)throw Error(Y(407));n=n()}else{if(n=t(),ot===null)throw Error(Y(349));Vi&30||_b(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Wy(Tb.bind(null,r,o,e),[e]),r.flags|=2048,Oa(9,kb.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bn(),t=ot.identifierPrefix;if(Me){var n=mr,r=hr;n=(r&~(1<<32-In(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ta++,0")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=a);break}}}finally{Uf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bl(e):""}function K_(e){switch(e.tag){case 5:return Bl(e.type);case 16:return Bl("Lazy");case 13:return Bl("Suspense");case 19:return Bl("SuspenseList");case 0:case 2:case 15:return e=zf(e.type,!1),e;case 11:return e=zf(e.type.render,!1),e;case 1:return e=zf(e.type,!0),e;default:return""}}function sp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mo:return"Fragment";case ho:return"Portal";case op:return"Profiler";case em:return"StrictMode";case lp:return"Suspense";case ap:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bw:return(e.displayName||"Context")+".Consumer";case ww:return(e._context.displayName||"Context")+".Provider";case tm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nm:return t=e.displayName||null,t!==null?t:sp(e.type)||"Memo";case Fr:t=e._payload,e=e._init;try{return sp(e(t))}catch(n){}}return null}function q_(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sp(t);case 8:return t===em?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function X_(e){var t=Sw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ys(e){e._valueTracker||(e._valueTracker=X_(e))}function Aw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function du(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function up(e,t){var n=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function oy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=si(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xw(e,t){t=t.checked,t!=null&&Zh(e,"checked",t,!1)}function cp(e,t){xw(e,t);var n=si(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fp(e,t.type,n):t.hasOwnProperty("defaultValue")&&fp(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ly(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function fp(e,t,n){(t!=="number"||du(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ul=Array.isArray;function ko(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=vs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ga(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ql={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Z_=["Webkit","ms","Moz","O"];Object.keys(Ql).forEach(function(e){Z_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ql[t]=Ql[e]})});function Tw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ql.hasOwnProperty(e)&&Ql[e]?(""+t).trim():t+"px"}function Iw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Tw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var ek=Ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hp(e,t){if(t){if(ek[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Y(62))}}function mp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gp=null;function rm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yp=null,To=null,Io=null;function uy(e){if(e=Ha(e)){if(typeof yp!="function")throw Error(Y(280));var t=e.stateNode;t&&(t=wc(t),yp(e.stateNode,e.type,t))}}function Ow(e){To?Io?Io.push(e):Io=[e]:To=e}function Pw(){if(To){var e=To,t=Io;if(Io=To=null,uy(e),t)for(e=0;e>>=0,e===0?32:31-(fk(e)/dk|0)|0}var ws=64,bs=4194304;function zl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~i;a!==0?r=zl(a):(o&=l,o!==0&&(r=zl(o)))}else l=n&~i,l!==0?r=zl(l):o!==0&&(r=zl(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Va(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-In(t),e[t]=n}function gk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ql),vy=String.fromCharCode(32),wy=!1;function qw(e,t){switch(e){case"keyup":return Vk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var go=!1;function Hk(e,t){switch(e){case"compositionend":return Xw(t);case"keypress":return t.which!==32?null:(wy=!0,vy);case"textInput":return e=t.data,e===vy&&wy?null:e;default:return null}}function Gk(e,t){if(go)return e==="compositionend"||!fm&&qw(e,t)?(e=Qw(),$s=sm=Hr=null,go=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ay(n)}}function nb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rb(){for(var e=window,t=du();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=du(e.document)}return t}function dm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function n2(e){var t=rb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nb(n.ownerDocument.documentElement,n)){if(r!==null&&dm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=xy(n,o);var l=xy(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,yo=null,Ap=null,Zl=null,xp=!1;function Cy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xp||yo==null||yo!==du(r)||(r=yo,"selectionStart"in r&&dm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zl&&Sa(Zl,r)||(Zl=r,r=wu(Ap,"onSelect"),0bo||(e.current=Op[bo],Op[bo]=null,bo--)}function Te(e,t){bo++,Op[bo]=e.current,e.current=t}var ui={},Et=gi(ui),Ft=gi(!1),Wi=ui;function jo(e,t){var n=e.type.contextTypes;if(!n)return ui;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Mt(e){return e=e.childContextTypes,e!=null}function Eu(){Pe(Ft),Pe(Et)}function Ny(e,t,n){if(Et.current!==ui)throw Error(Y(168));Te(Et,t),Te(Ft,n)}function db(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Y(108,q_(e)||"Unknown",i));return Ye({},n,r)}function Su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ui,Wi=Et.current,Te(Et,e),Te(Ft,Ft.current),!0}function Ry(e,t,n){var r=e.stateNode;if(!r)throw Error(Y(169));n?(e=db(e,t,Wi),r.__reactInternalMemoizedMergedChildContext=e,Pe(Ft),Pe(Et),Te(Et,e)):Pe(Ft),Te(Ft,n)}var cr=null,bc=!1,ed=!1;function pb(e){cr===null?cr=[e]:cr.push(e)}function h2(e){bc=!0,pb(e)}function yi(){if(!ed&&cr!==null){ed=!0;var e=0,t=ve;try{var n=cr;for(ve=1;e>=l,i-=l,hr=1<<32-In(t)+i|n<T?(N=A,A=null):N=A.sibling;var R=d(g,A,w[T],S);if(R===null){A===null&&(A=N);break}e&&A&&R.alternate===null&&t(g,A),y=o(R,y,T),b===null?_=R:b.sibling=R,b=R,A=N}if(T===w.length)return n(g,A),Me&&ki(g,T),_;if(A===null){for(;TT?(N=A,A=null):N=A.sibling;var I=d(g,A,R.value,S);if(I===null){A===null&&(A=N);break}e&&A&&I.alternate===null&&t(g,A),y=o(I,y,T),b===null?_=I:b.sibling=I,b=I,A=N}if(R.done)return n(g,A),Me&&ki(g,T),_;if(A===null){for(;!R.done;T++,R=w.next())R=f(g,R.value,S),R!==null&&(y=o(R,y,T),b===null?_=R:b.sibling=R,b=R);return Me&&ki(g,T),_}for(A=r(g,A);!R.done;T++,R=w.next())R=p(A,g,T,R.value,S),R!==null&&(e&&R.alternate!==null&&A.delete(R.key===null?T:R.key),y=o(R,y,T),b===null?_=R:b.sibling=R,b=R);return e&&A.forEach(function(F){return t(g,F)}),Me&&ki(g,T),_}function E(g,y,w,S){if(typeof w=="object"&&w!==null&&w.type===mo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case gs:e:{for(var _=w.key,b=y;b!==null;){if(b.key===_){if(_=w.type,_===mo){if(b.tag===7){n(g,b.sibling),y=i(b,w.props.children),y.return=g,g=y;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Fr&&zy(_)===b.type){n(g,b.sibling),y=i(b,w.props),y.ref=Al(g,b,w),y.return=g,g=y;break e}n(g,b);break}else t(g,b);b=b.sibling}w.type===mo?(y=Fi(w.props.children,g.mode,S,w.key),y.return=g,g=y):(S=Zs(w.type,w.key,w.props,null,g.mode,S),S.ref=Al(g,y,w),S.return=g,g=S)}return l(g);case ho:e:{for(b=w.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),y=i(y,w.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=sd(w,g.mode,S),y.return=g,g=y}return l(g);case Fr:return b=w._init,E(g,y,b(w._payload),S)}if(Ul(w))return h(g,y,w,S);if(vl(w))return m(g,y,w,S);ks(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,w),y.return=g,g=y):(n(g,y),y=ad(w,g.mode,S),y.return=g,g=y),l(g)):n(g,y)}return E}var Yo=Eb(!0),Sb=Eb(!1),Ga={},Jn=gi(Ga),_a=gi(Ga),ka=gi(Ga);function Di(e){if(e===Ga)throw Error(Y(174));return e}function Em(e,t){switch(Te(ka,t),Te(_a,e),Te(Jn,Ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=pp(t,e)}Pe(Jn),Te(Jn,t)}function Vo(){Pe(Jn),Pe(_a),Pe(ka)}function Ab(e){Di(ka.current);var t=Di(Jn.current),n=pp(t,e.type);t!==n&&(Te(_a,e),Te(Jn,n))}function Sm(e){_a.current===e&&(Pe(Jn),Pe(_a))}var ze=gi(0);function Tu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var td=[];function Am(){for(var e=0;en?n:4,e(!0);var r=nd.transition;nd.transition={};try{e(!1),t()}finally{ve=n,nd.transition=r}}function Ub(){return hn().memoizedState}function v2(e,t,n){var r=ti(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zb(e))jb(t,n);else if(n=yb(e,t,n,r),n!==null){var i=Ct();On(n,e,r,i),Wb(n,t,r)}}function w2(e,t,n){var r=ti(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zb(e))jb(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,a=o(l,n);if(i.hasEagerState=!0,i.eagerState=a,Nn(a,l)){var s=t.interleaved;s===null?(i.next=i,wm(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch(u){}finally{}n=yb(e,t,i,r),n!==null&&(i=Ct(),On(n,e,r,i),Wb(n,t,r))}}function zb(e){var t=e.alternate;return e===We||t!==null&&t===We}function jb(e,t){ea=Iu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,om(e,n)}}var Ou={readContext:pn,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},b2={readContext:pn,useCallback:function(e,t){return Bn().memoizedState=[e,t===void 0?null:t],e},useContext:pn,useEffect:Wy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qs(4194308,4,Db.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qs(4,2,e,t)},useMemo:function(e,t){var n=Bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=v2.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=Bn();return e={current:e},t.memoizedState=e},useState:jy,useDebugValue:Tm,useDeferredValue:function(e){return Bn().memoizedState=e},useTransition:function(){var e=jy(!1),t=e[0];return e=y2.bind(null,e[1]),Bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,i=Bn();if(Me){if(n===void 0)throw Error(Y(407));n=n()}else{if(n=t(),ot===null)throw Error(Y(349));Vi&30||_b(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Wy(Tb.bind(null,r,o,e),[e]),r.flags|=2048,Oa(9,kb.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bn(),t=ot.identifierPrefix;if(Me){var n=mr,r=hr;n=(r&~(1<<32-In(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ta++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[jn]=t,e[Ca]=r,qb(e,t,!1,!1),t.stateNode=e;e:{switch(l=mp(n,r),n){case"dialog":Ie("cancel",e),Ie("close",e),i=r;break;case"iframe":case"object":case"embed":Ie("load",e),i=r;break;case"video":case"audio":for(i=0;iHo&&(t.flags|=128,r=!0,xl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Tu(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Me)return mt(t),null}else 2*Qe()-o.renderingStartTime>Ho&&n!==1073741824&&(t.flags|=128,r=!0,xl(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=ze.current,Te(ze,r?n&1|2:n&1),t):(mt(t),null);case 22:case 23:return Lm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),null;case 24:return null;case 25:return null}throw Error(Y(156,t.tag))}function T2(e,t){switch(mm(t),t.tag){case 1:return Mt(t.type)&&Eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vo(),Pe(Ft),Pe(Et),xm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Am(t),null;case 13:if(Pe(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Y(340));Wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(ze),null;case 4:return Vo(),null;case 10:return wm(t.type._context),null;case 22:case 23:return Lm(),null;case 24:return null;default:return null}}var Is=!1,wt=!1,I2=typeof WeakSet=="function"?WeakSet:Set,X=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$e(e,t,r)}else n.current=null}function Wp(e,t,n){try{n()}catch(r){$e(e,t,r)}}var qy=!1;function O2(e,t){if(Cp=yu,e=rb(),pm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(S){n=null;break e}var l=0,a=-1,s=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=l+i),f!==o||r!==0&&f.nodeType!==3||(s=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=l),d===o&&++c===r&&(s=l),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_p={focusedElem:e,selectionRange:n},yu=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,E=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:xn(t.type,m),E);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Y(163))}}catch(S){$e(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return h=qy,qy=!1,h}function ta(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Wp(t,n,o)}i=i.next}while(i!==r)}}function Ac(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function eE(e){var t=e.alternate;t!==null&&(e.alternate=null,eE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[Ca],delete t[Ip],delete t[d2],delete t[p2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tE(e){return e.tag===5||e.tag===3||e.tag===4}function Xy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bu));else if(r!==4&&(e=e.child,e!==null))for(Vp(e,t,n),e=e.sibling;e!==null;)Vp(e,t,n),e=e.sibling}function $p(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($p(e,t,n),e=e.sibling;e!==null;)$p(e,t,n),e=e.sibling}var ct=null,Cn=!1;function Dr(e,t,n){for(n=n.child;n!==null;)nE(e,t,n),n=n.sibling}function nE(e,t,n){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(mc,n)}catch(a){}switch(n.tag){case 5:wt||xo(n,t);case 6:var r=ct,i=Cn;ct=null,Dr(e,t,n),ct=r,Cn=i,ct!==null&&(Cn?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(Cn?(e=ct,n=n.stateNode,e.nodeType===8?Zf(e.parentNode,n):e.nodeType===1&&Zf(e,n),ba(e)):Zf(ct,n.stateNode));break;case 4:r=ct,i=Cn,ct=n.stateNode.containerInfo,Cn=!0,Dr(e,t,n),ct=r,Cn=i;break;case 0:case 11:case 14:case 15:if(!wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Wp(n,t,l),i=i.next}while(i!==r)}Dr(e,t,n);break;case 1:if(!wt&&(xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$e(n,t,a)}Dr(e,t,n);break;case 21:Dr(e,t,n);break;case 22:n.mode&1?(wt=(r=wt)||n.memoizedState!==null,Dr(e,t,n),wt=r):Dr(e,t,n);break;default:Dr(e,t,n)}}function Zy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new I2),t.forEach(function(r){var i=U2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function En(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*N2(r/1960))-r,10e?16:e,Gr===null)var r=!1;else{if(e=Gr,Gr=null,Ru=0,ge&6)throw Error(Y(331));var i=ge;for(ge|=4,X=e.current;X!==null;){var o=X,l=o.child;if(X.flags&16){var a=o.deletions;if(a!==null){for(var s=0;sQe()-Rm?Li(e,0):Nm|=n),Bt(e,t)}function cE(e,t){t===0&&(e.mode&1?(t=bs,bs<<=1,!(bs&130023424)&&(bs=4194304)):t=1);var n=Ct();e=Ar(e,t),e!==null&&(Va(e,t,n),Bt(e,n))}function B2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cE(e,n)}function U2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Y(314))}r!==null&&r.delete(t),cE(e,n)}var fE;fE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Dt=!1,_2(e,t,n);Dt=!!(e.flags&131072)}else Dt=!1,Me&&t.flags&1048576&&hb(t,xu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ks(e,t),e=t.pendingProps;var i=jo(t,Et.current);Po(t,n),i=_m(null,t,r,e,i,n);var o=km();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mt(r)?(o=!0,Su(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Em(t),i.updater=Ec,t.stateNode=i,i._reactInternals=t,Lp(t,r,e,n),t=Bp(null,t,r,!0,o,n)):(t.tag=0,Me&&o&&hm(t),At(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=j2(r),e=xn(r,e),i){case 0:t=Mp(null,t,r,e,n);break e;case 1:t=Jy(null,t,r,e,n);break e;case 11:t=Hy(null,t,r,e,n);break e;case 14:t=Gy(null,t,r,xn(r.type,e),n);break e}throw Error(Y(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Mp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Jy(e,t,r,i,n);case 3:e:{if(Jb(t),e===null)throw Error(Y(387));r=t.pendingProps,o=t.memoizedState,i=o.element,vb(e,t),ku(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=$o(Error(Y(423)),t),t=Qy(e,t,r,n,i);break e}else if(r!==i){i=$o(Error(Y(424)),t),t=Qy(e,t,r,n,i);break e}else for(Gt=Xr(t.stateNode.containerInfo.firstChild),Kt=t,Me=!0,kn=null,n=Sb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wo(),r===i){t=xr(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return Ab(t),e===null&&Np(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,kp(r,i)?l=null:o!==null&&kp(r,o)&&(t.flags|=32),Gb(e,t),At(e,t,l,n),t.child;case 6:return e===null&&Np(t),null;case 13:return Qb(e,t,n);case 4:return Sm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yo(t,null,r,n):At(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Hy(e,t,r,i,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Te(Cu,r._currentValue),r._currentValue=l,o!==null)if(Nn(o.value,l)){if(o.children===i.children&&!Ft.current){t=xr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){l=o.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=yr(-1,n&-n),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Rp(o.return,n,t),a.lanes|=n;break}s=s.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(Y(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Rp(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}At(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Po(t,n),i=pn(i),r=r(i),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,i=xn(r,t.pendingProps),i=xn(r.type,i),Gy(e,t,r,i,n);case 15:return $b(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Ks(e,t),t.tag=1,Mt(r)?(e=!0,Su(t)):e=!1,Po(t,n),bb(t,r,i),Lp(t,r,i,n),Bp(null,t,r,!0,e,n);case 19:return Kb(e,t,n);case 22:return Hb(e,t,n)}throw Error(Y(156,t.tag))};function dE(e,t){return Bw(e,t)}function z2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,n,r){return new z2(e,t,n,r)}function Mm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function j2(e){if(typeof e=="function")return Mm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===nm)return 11;if(e===rm)return 14}return 2}function ni(e,t){var n=e.alternate;return n===null?(n=un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zs(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Mm(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case mo:return Fi(n.children,i,o,t);case tm:l=8,i|=8;break;case op:return e=un(12,n,t,i|2),e.elementType=op,e.lanes=o,e;case lp:return e=un(13,n,t,i),e.elementType=lp,e.lanes=o,e;case ap:return e=un(19,n,t,i),e.elementType=ap,e.lanes=o,e;case Ew:return Cc(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ww:l=10;break e;case bw:l=9;break e;case nm:l=11;break e;case rm:l=14;break e;case Fr:l=16,r=null;break e}throw Error(Y(130,e==null?e:typeof e,""))}return t=un(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function Cc(e,t,n,r){return e=un(22,e,r,t),e.elementType=Ew,e.lanes=n,e.stateNode={isHidden:!1},e}function ad(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function sd(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W2(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wf(0),this.expirationTimes=Wf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Bm(e,t,n,r,i,o,l,a,s){return e=new W2(e,t,n,a,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=un(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Em(o),e}function Y2(e,t,n){var r=3ud("Sending message to backend",e),incomingMsgs:{subscribe:(e,t)=>(ud(`Request for subscription to ${e}:`,t),{unsubscribe:()=>ud(`Request for removing subscription to ${e}:`,t)})},mode:"HTTPUV"},yE=k.createContext(J2);function Q2({children:e,sendMsg:t,incomingMsgs:n,mode:r}){return v(yE.Provider,{value:{sendMsg:t,incomingMsgs:n,mode:r},children:e})}function Ja(){return k.useContext(yE)}var vE=K2;function K2(e,t,n){var r=null,i=null,o=function(){r&&(clearTimeout(r),i=null,r=null)},l=function(){var s=i;o(),s&&s()},a=function(){if(!t)return e.apply(this,arguments);var s=this,u=arguments,c=n&&!r;if(o(),i=function(){e.apply(s,u)},r=setTimeout(function(){if(r=null,!c){var f=i;return i=null,f()}},t),c)return i()};return a.cancel=o,a.flush=l,a}var Kp={},q2={get exports(){return Kp},set exports(e){Kp=e}},wE={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function od(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Fp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var A2=typeof WeakMap=="function"?WeakMap:Map;function Yb(e,t,n){n=yr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nu||(Nu=!0,Hp=r),Fp(e,t)},n}function Vb(e,t,n){n=yr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Fp(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Fp(e,t),typeof r!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Yy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new A2;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=M2.bind(null,e,t,n),t.then(e,e))}function Vy(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $y(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yr(-1,1),t.tag=2,Zr(n,t,1))),n.lanes|=1),e)}var x2=kr.ReactCurrentOwner,Dt=!1;function At(e,t,n,r){t.child=e===null?Sb(t,null,n,r):Yo(t,e.child,n,r)}function Hy(e,t,n,r,i){n=n.render;var o=t.ref;return Po(t,i),r=Cm(e,t,n,r,o,i),n=_m(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,xr(e,t,i)):(Me&&n&&pm(t),t.flags|=1,At(e,t,r,i),t.child)}function Gy(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Fm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,$b(e,t,o,r,i)):(e=Zs(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Sa,n(l,r)&&e.ref===t.ref)return xr(e,t,i)}return t.flags|=1,e=ni(o,r),e.ref=t.ref,e.return=t,t.child=e}function $b(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Sa(o,r)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Dt=!0);else return t.lanes=e.lanes,xr(e,t,i)}return Mp(e,t,n,r,i)}function Hb(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Te(Co,Vt),Vt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Te(Co,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Te(Co,Vt),Vt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Te(Co,Vt),Vt|=r;return At(e,t,i,n),t.child}function Gb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mp(e,t,n,r,i){var o=Mt(n)?Wi:Et.current;return o=jo(t,o),Po(t,i),n=Cm(e,t,n,r,o,i),r=_m(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,xr(e,t,i)):(Me&&r&&pm(t),t.flags|=1,At(e,t,n,i),t.child)}function Jy(e,t,n,r,i){if(Mt(n)){var o=!0;Su(t)}else o=!1;if(Po(t,i),t.stateNode===null)Ks(e,t),bb(t,n,r),Lp(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,a=t.memoizedProps;l.props=a;var s=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=pn(u):(u=Mt(n)?Wi:Et.current,u=jo(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==r||s!==u)&&Uy(t,l,r,u),Mr=!1;var d=t.memoizedState;l.state=d,ku(t,r,l,i),s=t.memoizedState,a!==r||d!==s||Ft.current||Mr?(typeof c=="function"&&(Dp(t,n,c,r),s=t.memoizedState),(a=Mr||By(t,n,a,r,d,s,u))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),l.props=r,l.state=s,l.context=u,r=a):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,vb(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:xn(t.type,a),l.props=u,f=t.pendingProps,d=l.context,s=n.contextType,typeof s=="object"&&s!==null?s=pn(s):(s=Mt(n)?Wi:Et.current,s=jo(t,s));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==f||d!==s)&&Uy(t,l,r,s),Mr=!1,d=t.memoizedState,l.state=d,ku(t,r,l,i);var h=t.memoizedState;a!==f||d!==h||Ft.current||Mr?(typeof p=="function"&&(Dp(t,n,p,r),h=t.memoizedState),(u=Mr||By(t,n,u,r,d,h,s)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,h,s),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,h,s)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),l.props=r,l.state=h,l.context=s,r=u):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Bp(e,t,n,r,o,i)}function Bp(e,t,n,r,i,o){Gb(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Ry(t,n,!1),xr(e,t,o);r=t.stateNode,x2.current=t;var a=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,a,o)):At(e,t,a,o),t.memoizedState=r.state,i&&Ry(t,n,!0),t.child}function Jb(e){var t=e.stateNode;t.pendingContext?Ny(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ny(e,t.context,!1),Em(e,t.containerInfo)}function Qy(e,t,n,r,i){return Wo(),mm(i),t.flags|=256,At(e,t,n,r),t.child}var Up={dehydrated:null,treeContext:null,retryLane:0};function zp(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qb(e,t,n){var r=t.pendingProps,i=ze.current,o=!1,l=(t.flags&128)!==0,a;if((a=l)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Te(ze,i&1),e===null)return Np(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=Cc(l,r,0,null),e=Fi(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=zp(n),t.memoizedState=Up,e):Im(t,l));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return C2(e,t,l,r,a,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,a=i.sibling;var s={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=ni(i,s),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=ni(a,o):(o=Fi(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?zp(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Up,r}return o=e.child,e=o.sibling,r=ni(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Im(e,t){return t=Cc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ts(e,t,n,r){return r!==null&&mm(r),Yo(t,e.child,null,n),e=Im(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function C2(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=od(Error(Y(422))),Ts(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Cc({mode:"visible",children:r.children},i,0,null),o=Fi(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Yo(t,e.child,null,l),t.child.memoizedState=zp(l),t.memoizedState=Up,o);if(!(t.mode&1))return Ts(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Y(419)),r=od(o,r,void 0),Ts(e,t,l,r)}if(a=(l&e.childLanes)!==0,Dt||a){if(r=ot,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ar(e,i),On(r,e,i,-1))}return Lm(),r=od(Error(Y(421))),Ts(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=B2.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Gt=Xr(i.nextSibling),Kt=t,Me=!0,kn=null,e!==null&&(on[ln++]=hr,on[ln++]=mr,on[ln++]=Yi,hr=e.id,mr=e.overflow,Yi=t),t=Im(t,r.children),t.flags|=4096,t)}function Ky(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Rp(e.return,t,n)}function ld(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Kb(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(At(e,t,r.children,n),r=ze.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ky(e,n,t);else if(e.tag===19)Ky(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Te(ze,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Tu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ld(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Tu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ld(t,!0,n,null,o);break;case"together":ld(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ks(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$i|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Y(153));if(t.child!==null){for(e=t.child,n=ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _2(e,t,n){switch(t.tag){case 3:Jb(t),Wo();break;case 5:Ab(t);break;case 1:Mt(t.type)&&Su(t);break;case 4:Em(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Te(Cu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Te(ze,ze.current&1),t.flags|=128,null):n&t.child.childLanes?Qb(e,t,n):(Te(ze,ze.current&1),e=xr(e,t,n),e!==null?e.sibling:null);Te(ze,ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Kb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Te(ze,ze.current),r)break;return null;case 22:case 23:return t.lanes=0,Hb(e,t,n)}return xr(e,t,n)}var qb,jp,Xb,Zb;qb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jp=function(){};Xb=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Di(Jn.current);var o=null;switch(n){case"input":i=up(e,i),r=up(e,r),o=[];break;case"select":i=Ye({},i,{value:void 0}),r=Ye({},r,{value:void 0}),o=[];break;case"textarea":i=dp(e,i),r=dp(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bu)}hp(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(l in a)a.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ma.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var s=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&s!==a&&(s!=null||a!=null))if(u==="style")if(a){for(l in a)!a.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in s)s.hasOwnProperty(l)&&a[l]!==s[l]&&(n||(n={}),n[l]=s[l])}else n||(o||(o=[]),o.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,a=a?a.__html:void 0,s!=null&&a!==s&&(o=o||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ma.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Ie("scroll",e),o||a===s||(o=[])):(o=o||[]).push(u,s))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Zb=function(e,t,n,r){n!==r&&(t.flags|=4)};function xl(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function k2(e,t,n){var r=t.pendingProps;switch(hm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return Mt(t.type)&&Eu(),mt(t),null;case 3:return r=t.stateNode,Vo(),Pe(Ft),Pe(Et),Am(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(_s(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(Qp(kn),kn=null))),jp(e,t),mt(t),null;case 5:Sm(t);var i=Di(ka.current);if(n=t.type,e!==null&&t.stateNode!=null)Xb(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Y(166));return mt(t),null}if(e=Di(Jn.current),_s(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[jn]=t,r[Ca]=o,e=(t.mode&1)!==0,n){case"dialog":Ie("cancel",r),Ie("close",r);break;case"iframe":case"object":case"embed":Ie("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[jn]=t,e[Ca]=r,qb(e,t,!1,!1),t.stateNode=e;e:{switch(l=mp(n,r),n){case"dialog":Ie("cancel",e),Ie("close",e),i=r;break;case"iframe":case"object":case"embed":Ie("load",e),i=r;break;case"video":case"audio":for(i=0;iHo&&(t.flags|=128,r=!0,xl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Tu(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!Me)return mt(t),null}else 2*Qe()-o.renderingStartTime>Ho&&n!==1073741824&&(t.flags|=128,r=!0,xl(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=ze.current,Te(ze,r?n&1|2:n&1),t):(mt(t),null);case 22:case 23:return Dm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),null;case 24:return null;case 25:return null}throw Error(Y(156,t.tag))}function T2(e,t){switch(hm(t),t.tag){case 1:return Mt(t.type)&&Eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vo(),Pe(Ft),Pe(Et),Am(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Sm(t),null;case 13:if(Pe(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Y(340));Wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(ze),null;case 4:return Vo(),null;case 10:return vm(t.type._context),null;case 22:case 23:return Dm(),null;case 24:return null;default:return null}}var Is=!1,wt=!1,I2=typeof WeakSet=="function"?WeakSet:Set,X=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$e(e,t,r)}else n.current=null}function Wp(e,t,n){try{n()}catch(r){$e(e,t,r)}}var qy=!1;function O2(e,t){if(Cp=yu,e=rb(),dm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(S){n=null;break e}var l=0,a=-1,s=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=l+i),f!==o||r!==0&&f.nodeType!==3||(s=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=l),d===o&&++c===r&&(s=l),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_p={focusedElem:e,selectionRange:n},yu=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,E=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:xn(t.type,m),E);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Y(163))}}catch(S){$e(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return h=qy,qy=!1,h}function ta(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Wp(t,n,o)}i=i.next}while(i!==r)}}function Ac(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function eE(e){var t=e.alternate;t!==null&&(e.alternate=null,eE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[jn],delete t[Ca],delete t[Ip],delete t[d2],delete t[p2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tE(e){return e.tag===5||e.tag===3||e.tag===4}function Xy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bu));else if(r!==4&&(e=e.child,e!==null))for(Vp(e,t,n),e=e.sibling;e!==null;)Vp(e,t,n),e=e.sibling}function $p(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($p(e,t,n),e=e.sibling;e!==null;)$p(e,t,n),e=e.sibling}var ct=null,Cn=!1;function Dr(e,t,n){for(n=n.child;n!==null;)nE(e,t,n),n=n.sibling}function nE(e,t,n){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(mc,n)}catch(a){}switch(n.tag){case 5:wt||xo(n,t);case 6:var r=ct,i=Cn;ct=null,Dr(e,t,n),ct=r,Cn=i,ct!==null&&(Cn?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(Cn?(e=ct,n=n.stateNode,e.nodeType===8?Zf(e.parentNode,n):e.nodeType===1&&Zf(e,n),ba(e)):Zf(ct,n.stateNode));break;case 4:r=ct,i=Cn,ct=n.stateNode.containerInfo,Cn=!0,Dr(e,t,n),ct=r,Cn=i;break;case 0:case 11:case 14:case 15:if(!wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Wp(n,t,l),i=i.next}while(i!==r)}Dr(e,t,n);break;case 1:if(!wt&&(xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){$e(n,t,a)}Dr(e,t,n);break;case 21:Dr(e,t,n);break;case 22:n.mode&1?(wt=(r=wt)||n.memoizedState!==null,Dr(e,t,n),wt=r):Dr(e,t,n);break;default:Dr(e,t,n)}}function Zy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new I2),t.forEach(function(r){var i=U2.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function En(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*N2(r/1960))-r,10e?16:e,Gr===null)var r=!1;else{if(e=Gr,Gr=null,Ru=0,ge&6)throw Error(Y(331));var i=ge;for(ge|=4,X=e.current;X!==null;){var o=X,l=o.child;if(X.flags&16){var a=o.deletions;if(a!==null){for(var s=0;sQe()-Nm?Li(e,0):Pm|=n),Bt(e,t)}function cE(e,t){t===0&&(e.mode&1?(t=bs,bs<<=1,!(bs&130023424)&&(bs=4194304)):t=1);var n=Ct();e=Ar(e,t),e!==null&&(Va(e,t,n),Bt(e,n))}function B2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cE(e,n)}function U2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Y(314))}r!==null&&r.delete(t),cE(e,n)}var fE;fE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Dt=!1,_2(e,t,n);Dt=!!(e.flags&131072)}else Dt=!1,Me&&t.flags&1048576&&hb(t,xu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ks(e,t),e=t.pendingProps;var i=jo(t,Et.current);Po(t,n),i=Cm(null,t,r,e,i,n);var o=_m();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Mt(r)?(o=!0,Su(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bm(t),i.updater=Ec,t.stateNode=i,i._reactInternals=t,Lp(t,r,e,n),t=Bp(null,t,r,!0,o,n)):(t.tag=0,Me&&o&&pm(t),At(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ks(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=j2(r),e=xn(r,e),i){case 0:t=Mp(null,t,r,e,n);break e;case 1:t=Jy(null,t,r,e,n);break e;case 11:t=Hy(null,t,r,e,n);break e;case 14:t=Gy(null,t,r,xn(r.type,e),n);break e}throw Error(Y(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Mp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Jy(e,t,r,i,n);case 3:e:{if(Jb(t),e===null)throw Error(Y(387));r=t.pendingProps,o=t.memoizedState,i=o.element,vb(e,t),ku(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=$o(Error(Y(423)),t),t=Qy(e,t,r,n,i);break e}else if(r!==i){i=$o(Error(Y(424)),t),t=Qy(e,t,r,n,i);break e}else for(Gt=Xr(t.stateNode.containerInfo.firstChild),Kt=t,Me=!0,kn=null,n=Sb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wo(),r===i){t=xr(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return Ab(t),e===null&&Np(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,kp(r,i)?l=null:o!==null&&kp(r,o)&&(t.flags|=32),Gb(e,t),At(e,t,l,n),t.child;case 6:return e===null&&Np(t),null;case 13:return Qb(e,t,n);case 4:return Em(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yo(t,null,r,n):At(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Hy(e,t,r,i,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Te(Cu,r._currentValue),r._currentValue=l,o!==null)if(Nn(o.value,l)){if(o.children===i.children&&!Ft.current){t=xr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){l=o.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=yr(-1,n&-n),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Rp(o.return,n,t),a.lanes|=n;break}s=s.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(Y(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Rp(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}At(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Po(t,n),i=pn(i),r=r(i),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,i=xn(r,t.pendingProps),i=xn(r.type,i),Gy(e,t,r,i,n);case 15:return $b(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xn(r,i),Ks(e,t),t.tag=1,Mt(r)?(e=!0,Su(t)):e=!1,Po(t,n),bb(t,r,i),Lp(t,r,i,n),Bp(null,t,r,!0,e,n);case 19:return Kb(e,t,n);case 22:return Hb(e,t,n)}throw Error(Y(156,t.tag))};function dE(e,t){return Bw(e,t)}function z2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,n,r){return new z2(e,t,n,r)}function Fm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function j2(e){if(typeof e=="function")return Fm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tm)return 11;if(e===nm)return 14}return 2}function ni(e,t){var n=e.alternate;return n===null?(n=un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zs(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Fm(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case mo:return Fi(n.children,i,o,t);case em:l=8,i|=8;break;case op:return e=un(12,n,t,i|2),e.elementType=op,e.lanes=o,e;case lp:return e=un(13,n,t,i),e.elementType=lp,e.lanes=o,e;case ap:return e=un(19,n,t,i),e.elementType=ap,e.lanes=o,e;case Ew:return Cc(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ww:l=10;break e;case bw:l=9;break e;case tm:l=11;break e;case nm:l=14;break e;case Fr:l=16,r=null;break e}throw Error(Y(130,e==null?e:typeof e,""))}return t=un(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function Cc(e,t,n,r){return e=un(22,e,r,t),e.elementType=Ew,e.lanes=n,e.stateNode={isHidden:!1},e}function ad(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function sd(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W2(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wf(0),this.expirationTimes=Wf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mm(e,t,n,r,i,o,l,a,s){return e=new W2(e,t,n,a,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=un(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bm(o),e}function Y2(e,t,n){var r=3ud("Sending message to backend",e),incomingMsgs:{subscribe:(e,t)=>(ud(`Request for subscription to ${e}:`,t),{unsubscribe:()=>ud(`Request for removing subscription to ${e}:`,t)})},mode:"HTTPUV"},yE=k.createContext(J2);function Q2({children:e,sendMsg:t,incomingMsgs:n,mode:r}){return v(yE.Provider,{value:{sendMsg:t,incomingMsgs:n,mode:r},children:e})}function Ja(){return k.useContext(yE)}var vE=K2;function K2(e,t,n){var r=null,i=null,o=function(){r&&(clearTimeout(r),i=null,r=null)},l=function(){var s=i;o(),s&&s()},a=function(){if(!t)return e.apply(this,arguments);var s=this,u=arguments,c=n&&!r;if(o(),i=function(){e.apply(s,u)},r=setTimeout(function(){if(r=null,!c){var f=i;return i=null,f()}},t),c)return i()};return a.cancel=o,a.flush=l,a}var Kp={},q2={get exports(){return Kp},set exports(e){Kp=e}},wE={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -55,7 +55,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Go=P;function X2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z2=typeof Object.is=="function"?Object.is:X2,eT=Go.useState,tT=Go.useEffect,nT=Go.useLayoutEffect,rT=Go.useDebugValue;function iT(e,t){var n=t(),r=eT({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return nT(function(){i.value=n,i.getSnapshot=t,cd(i)&&o({inst:i})},[e,n,t]),tT(function(){return cd(i)&&o({inst:i}),e(function(){cd(i)&&o({inst:i})})},[e]),rT(n),n}function cd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Z2(e,n)}catch(r){return!0}}function oT(e,t){return t()}var lT=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?oT:iT;wE.useSyncExternalStore=Go.useSyncExternalStore!==void 0?Go.useSyncExternalStore:lT;(function(e){e.exports=wE})(q2);var qp={},aT={get exports(){return qp},set exports(e){qp=e}},bE={};/** + */var Go=O;function X2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z2=typeof Object.is=="function"?Object.is:X2,eT=Go.useState,tT=Go.useEffect,nT=Go.useLayoutEffect,rT=Go.useDebugValue;function iT(e,t){var n=t(),r=eT({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return nT(function(){i.value=n,i.getSnapshot=t,cd(i)&&o({inst:i})},[e,n,t]),tT(function(){return cd(i)&&o({inst:i}),e(function(){cd(i)&&o({inst:i})})},[e]),rT(n),n}function cd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Z2(e,n)}catch(r){return!0}}function oT(e,t){return t()}var lT=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?oT:iT;wE.useSyncExternalStore=Go.useSyncExternalStore!==void 0?Go.useSyncExternalStore:lT;(function(e){e.exports=wE})(q2);var qp={},aT={get exports(){return qp},set exports(e){qp=e}},bE={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -63,14 +63,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Oc=P,sT=Kp;function uT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cT=typeof Object.is=="function"?Object.is:uT,fT=sT.useSyncExternalStore,dT=Oc.useRef,pT=Oc.useEffect,hT=Oc.useMemo,mT=Oc.useDebugValue;bE.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=dT(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=hT(function(){function s(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&l.hasValue){var h=l.value;if(i(h,p))return f=h}return f=p}if(h=f,cT(c,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(c=p,f=m)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return s(t())},d===null?void 0:function(){return s(d())}]},[t,n,r,i]);var a=fT(e,o[0],o[1]);return pT(function(){l.hasValue=!0,l.value=a},[a]),mT(a),a};(function(e){e.exports=bE})(aT);function gT(e){e()}let EE=gT;const yT=e=>EE=e,vT=()=>EE,ci=P.createContext(null);function SE(){return P.useContext(ci)}const wT=()=>{throw new Error("uSES not initialized!")};let AE=wT;const bT=e=>{AE=e},ET=(e,t)=>e===t;function ST(e=ci){const t=e===ci?SE:()=>P.useContext(e);return function(r,i=ET){const{store:o,subscription:l,getServerState:a}=t(),s=AE(l.addNestedSub,o.getState,a||o.getState,r,i);return P.useDebugValue(s),s}}const Qa=ST();var jr={},AT={get exports(){return jr},set exports(e){jr=e}},we={};/** @license React v16.13.1 + */var Oc=O,sT=Kp;function uT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cT=typeof Object.is=="function"?Object.is:uT,fT=sT.useSyncExternalStore,dT=Oc.useRef,pT=Oc.useEffect,hT=Oc.useMemo,mT=Oc.useDebugValue;bE.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=dT(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=hT(function(){function s(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&l.hasValue){var h=l.value;if(i(h,p))return f=h}return f=p}if(h=f,cT(c,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(c=p,f=m)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return s(t())},d===null?void 0:function(){return s(d())}]},[t,n,r,i]);var a=fT(e,o[0],o[1]);return pT(function(){l.hasValue=!0,l.value=a},[a]),mT(a),a};(function(e){e.exports=bE})(aT);function gT(e){e()}let EE=gT;const yT=e=>EE=e,vT=()=>EE,ci=O.createContext(null);function SE(){return O.useContext(ci)}const wT=()=>{throw new Error("uSES not initialized!")};let AE=wT;const bT=e=>{AE=e},ET=(e,t)=>e===t;function ST(e=ci){const t=e===ci?SE:()=>O.useContext(e);return function(r,i=ET){const{store:o,subscription:l,getServerState:a}=t(),s=AE(l.addNestedSub,o.getState,a||o.getState,r,i);return O.useDebugValue(s),s}}const Qa=ST();var jr={},AT={get exports(){return jr},set exports(e){jr=e}},we={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lt=typeof Symbol=="function"&&Symbol.for,Wm=lt?Symbol.for("react.element"):60103,Ym=lt?Symbol.for("react.portal"):60106,Pc=lt?Symbol.for("react.fragment"):60107,Nc=lt?Symbol.for("react.strict_mode"):60108,Rc=lt?Symbol.for("react.profiler"):60114,Dc=lt?Symbol.for("react.provider"):60109,Lc=lt?Symbol.for("react.context"):60110,Vm=lt?Symbol.for("react.async_mode"):60111,Fc=lt?Symbol.for("react.concurrent_mode"):60111,Mc=lt?Symbol.for("react.forward_ref"):60112,Bc=lt?Symbol.for("react.suspense"):60113,xT=lt?Symbol.for("react.suspense_list"):60120,Uc=lt?Symbol.for("react.memo"):60115,zc=lt?Symbol.for("react.lazy"):60116,CT=lt?Symbol.for("react.block"):60121,_T=lt?Symbol.for("react.fundamental"):60117,kT=lt?Symbol.for("react.responder"):60118,TT=lt?Symbol.for("react.scope"):60119;function nn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wm:switch(e=e.type,e){case Vm:case Fc:case Pc:case Rc:case Nc:case Bc:return e;default:switch(e=e&&e.$$typeof,e){case Lc:case Mc:case zc:case Uc:case Dc:return e;default:return t}}case Ym:return t}}}function xE(e){return nn(e)===Fc}we.AsyncMode=Vm;we.ConcurrentMode=Fc;we.ContextConsumer=Lc;we.ContextProvider=Dc;we.Element=Wm;we.ForwardRef=Mc;we.Fragment=Pc;we.Lazy=zc;we.Memo=Uc;we.Portal=Ym;we.Profiler=Rc;we.StrictMode=Nc;we.Suspense=Bc;we.isAsyncMode=function(e){return xE(e)||nn(e)===Vm};we.isConcurrentMode=xE;we.isContextConsumer=function(e){return nn(e)===Lc};we.isContextProvider=function(e){return nn(e)===Dc};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wm};we.isForwardRef=function(e){return nn(e)===Mc};we.isFragment=function(e){return nn(e)===Pc};we.isLazy=function(e){return nn(e)===zc};we.isMemo=function(e){return nn(e)===Uc};we.isPortal=function(e){return nn(e)===Ym};we.isProfiler=function(e){return nn(e)===Rc};we.isStrictMode=function(e){return nn(e)===Nc};we.isSuspense=function(e){return nn(e)===Bc};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pc||e===Fc||e===Rc||e===Nc||e===Bc||e===xT||typeof e=="object"&&e!==null&&(e.$$typeof===zc||e.$$typeof===Uc||e.$$typeof===Dc||e.$$typeof===Lc||e.$$typeof===Mc||e.$$typeof===_T||e.$$typeof===kT||e.$$typeof===TT||e.$$typeof===CT)};we.typeOf=nn;(function(e){e.exports=we})(AT);var CE=jr,IT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_E={};_E[CE.ForwardRef]=IT;_E[CE.Memo]=OT;var sv={},PT={get exports(){return sv},set exports(e){sv=e}},be={};/** + */var lt=typeof Symbol=="function"&&Symbol.for,jm=lt?Symbol.for("react.element"):60103,Wm=lt?Symbol.for("react.portal"):60106,Pc=lt?Symbol.for("react.fragment"):60107,Nc=lt?Symbol.for("react.strict_mode"):60108,Rc=lt?Symbol.for("react.profiler"):60114,Dc=lt?Symbol.for("react.provider"):60109,Lc=lt?Symbol.for("react.context"):60110,Ym=lt?Symbol.for("react.async_mode"):60111,Fc=lt?Symbol.for("react.concurrent_mode"):60111,Mc=lt?Symbol.for("react.forward_ref"):60112,Bc=lt?Symbol.for("react.suspense"):60113,xT=lt?Symbol.for("react.suspense_list"):60120,Uc=lt?Symbol.for("react.memo"):60115,zc=lt?Symbol.for("react.lazy"):60116,CT=lt?Symbol.for("react.block"):60121,_T=lt?Symbol.for("react.fundamental"):60117,kT=lt?Symbol.for("react.responder"):60118,TT=lt?Symbol.for("react.scope"):60119;function nn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Ym:case Fc:case Pc:case Rc:case Nc:case Bc:return e;default:switch(e=e&&e.$$typeof,e){case Lc:case Mc:case zc:case Uc:case Dc:return e;default:return t}}case Wm:return t}}}function xE(e){return nn(e)===Fc}we.AsyncMode=Ym;we.ConcurrentMode=Fc;we.ContextConsumer=Lc;we.ContextProvider=Dc;we.Element=jm;we.ForwardRef=Mc;we.Fragment=Pc;we.Lazy=zc;we.Memo=Uc;we.Portal=Wm;we.Profiler=Rc;we.StrictMode=Nc;we.Suspense=Bc;we.isAsyncMode=function(e){return xE(e)||nn(e)===Ym};we.isConcurrentMode=xE;we.isContextConsumer=function(e){return nn(e)===Lc};we.isContextProvider=function(e){return nn(e)===Dc};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};we.isForwardRef=function(e){return nn(e)===Mc};we.isFragment=function(e){return nn(e)===Pc};we.isLazy=function(e){return nn(e)===zc};we.isMemo=function(e){return nn(e)===Uc};we.isPortal=function(e){return nn(e)===Wm};we.isProfiler=function(e){return nn(e)===Rc};we.isStrictMode=function(e){return nn(e)===Nc};we.isSuspense=function(e){return nn(e)===Bc};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pc||e===Fc||e===Rc||e===Nc||e===Bc||e===xT||typeof e=="object"&&e!==null&&(e.$$typeof===zc||e.$$typeof===Uc||e.$$typeof===Dc||e.$$typeof===Lc||e.$$typeof===Mc||e.$$typeof===_T||e.$$typeof===kT||e.$$typeof===TT||e.$$typeof===CT)};we.typeOf=nn;(function(e){e.exports=we})(AT);var CE=jr,IT={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_E={};_E[CE.ForwardRef]=IT;_E[CE.Memo]=OT;var sv={},PT={get exports(){return sv},set exports(e){sv=e}},be={};/** * @license React * react-is.production.min.js * @@ -78,33 +78,33 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $m=Symbol.for("react.element"),Hm=Symbol.for("react.portal"),jc=Symbol.for("react.fragment"),Wc=Symbol.for("react.strict_mode"),Yc=Symbol.for("react.profiler"),Vc=Symbol.for("react.provider"),$c=Symbol.for("react.context"),NT=Symbol.for("react.server_context"),Hc=Symbol.for("react.forward_ref"),Gc=Symbol.for("react.suspense"),Jc=Symbol.for("react.suspense_list"),Qc=Symbol.for("react.memo"),Kc=Symbol.for("react.lazy"),RT=Symbol.for("react.offscreen"),kE;kE=Symbol.for("react.module.reference");function gn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case $m:switch(e=e.type,e){case jc:case Yc:case Wc:case Gc:case Jc:return e;default:switch(e=e&&e.$$typeof,e){case NT:case $c:case Hc:case Kc:case Qc:case Vc:return e;default:return t}}case Hm:return t}}}be.ContextConsumer=$c;be.ContextProvider=Vc;be.Element=$m;be.ForwardRef=Hc;be.Fragment=jc;be.Lazy=Kc;be.Memo=Qc;be.Portal=Hm;be.Profiler=Yc;be.StrictMode=Wc;be.Suspense=Gc;be.SuspenseList=Jc;be.isAsyncMode=function(){return!1};be.isConcurrentMode=function(){return!1};be.isContextConsumer=function(e){return gn(e)===$c};be.isContextProvider=function(e){return gn(e)===Vc};be.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===$m};be.isForwardRef=function(e){return gn(e)===Hc};be.isFragment=function(e){return gn(e)===jc};be.isLazy=function(e){return gn(e)===Kc};be.isMemo=function(e){return gn(e)===Qc};be.isPortal=function(e){return gn(e)===Hm};be.isProfiler=function(e){return gn(e)===Yc};be.isStrictMode=function(e){return gn(e)===Wc};be.isSuspense=function(e){return gn(e)===Gc};be.isSuspenseList=function(e){return gn(e)===Jc};be.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jc||e===Yc||e===Wc||e===Gc||e===Jc||e===RT||typeof e=="object"&&e!==null&&(e.$$typeof===Kc||e.$$typeof===Qc||e.$$typeof===Vc||e.$$typeof===$c||e.$$typeof===Hc||e.$$typeof===kE||e.getModuleId!==void 0)};be.typeOf=gn;(function(e){e.exports=be})(PT);function DT(){const e=vT();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const uv={notify(){},get:()=>[]};function LT(e,t){let n,r=uv;function i(f){return s(),r.subscribe(f)}function o(){r.notify()}function l(){c.onStateChange&&c.onStateChange()}function a(){return Boolean(n)}function s(){n||(n=t?t.addNestedSub(l):e.subscribe(l),r=DT())}function u(){n&&(n(),n=void 0,r.clear(),r=uv)}const c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:l,isSubscribed:a,trySubscribe:s,tryUnsubscribe:u,getListeners:()=>r};return c}const FT=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",MT=FT?P.useLayoutEffect:P.useEffect;function BT({store:e,context:t,children:n,serverState:r}){const i=P.useMemo(()=>{const a=LT(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=P.useMemo(()=>e.getState(),[e]);MT(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const l=t||ci;return k.createElement(l.Provider,{value:i},n)}function TE(e=ci){const t=e===ci?SE:()=>P.useContext(e);return function(){const{store:r}=t();return r}}const Gm=TE();function UT(e=ci){const t=e===ci?Gm:TE(e);return function(){return t().dispatch}}const Tr=UT();bT(qp.useSyncExternalStoreWithSelector);yT(br.unstable_batchedUpdates);const Xn={ui:"",libraries:""};function qc(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var zT={};qc(zT,"ErrorBoundary",()=>Xc);var jT={};qc(jT,"ErrorBoundaryContext",()=>Jm);const Jm=P.createContext(null),fd={didCatch:!1,error:null};class Xc extends P.Component{constructor(){super(...arguments);hs(this,"state",fd);hs(this,"resetErrorBoundary",(...n)=>{var i,o;const{error:r}=this.state;r!==null&&((o=(i=this.props).onReset)==null||o.call(i,{args:n,reason:"imperative-api"}),this.setState(fd))})}static getDerivedStateFromError(n){return{didCatch:!0,error:n}}componentDidCatch(n,r){var i,o;(o=(i=this.props).onError)==null||o.call(i,n,r)}componentDidUpdate(n,r){var l,a;const{didCatch:i}=this.state,{resetKeys:o}=this.props;i&&r.error!==null&&WT(n.resetKeys,o)&&((a=(l=this.props).onReset)==null||a.call(l,{next:o,prev:n.resetKeys,reason:"keys"}),this.setState(fd))}render(){const{children:n,fallbackRender:r,FallbackComponent:i,fallback:o}=this.props,{didCatch:l,error:a}=this.state;let s=n;if(l){const u={error:a,resetErrorBoundary:this.resetErrorBoundary};if(P.isValidElement(o))s=o;else if(typeof r=="function")s=r(u);else if(i)s=P.createElement(i,u);else throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return P.createElement(Jm.Provider,{value:{didCatch:l,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function WT(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}var YT={};qc(YT,"useErrorBoundary",()=>IE);function VT(e){if(e==null||typeof e.didCatch!="boolean"||typeof e.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found");return!0}function IE(){const e=P.useContext(Jm);VT(e);const[t,n]=P.useState({error:null,hasError:!1}),r=P.useMemo(()=>({resetBoundary:()=>{e==null||e.resetErrorBoundary(),n({error:null,hasError:!1})},showBoundary:i=>n({error:i,hasError:!0})}),[e==null?void 0:e.resetErrorBoundary]);if(t.hasError)throw t.error;return r}var $T={};qc($T,"withErrorBoundary",()=>HT);function HT(e,t){const n=i=>P.createElement(Xc,t,P.createElement(e,i)),r=e.displayName||e.name||"Unknown";return n.displayName=`withErrorBoundary(${r})`,n}function Ke(...e){return e.filter(t=>t).join(" ")}const GT="_button_1y00r_1",JT="_regular_1y00r_26",QT="_icon_1y00r_34",KT="_transparent_1y00r_42",dd={button:GT,regular:JT,delete:"_delete_1y00r_30",icon:QT,transparent:KT},rt=k.forwardRef((o,i)=>{var l=o,{children:e,variant:t="regular",className:n}=l,r=ye(l,["children","variant","className"]);const a=t?Array.isArray(t)?t.map(s=>dd[s]).join(" "):dd[t]:"";return v("button",W(O({ref:i,className:Ke(dd.button,a,n)},r),{children:e}))});function xe(){return function(o){var l=o,{name:t,library:n,category:r}=l,i=ye(l,["name","library","category"]);return O({uiName:n?`${n}::${t}`:t,name:t,library:n,category:r!=null?r:"Uncategorized"},i)}}const qT="_container_1og9v_1",XT={container:qT},ZT=xe()({library:"TESTING",name:"error_node",title:"Error Throwing Node",takesChildren:!1,UiComponent:({uiArguments:e,path:t,wrapperProps:n})=>{const{showBoundary:r}=IE();return U("div",W(O({className:XT.container},n),{children:[v("h3",{children:"Error Node! I throw errors"}),v(rt,{variant:"delete","aria-label":"Throw an error",onClick:()=>{r(new Error(`Ui Node error: ${e.error_msg}`))},children:"💣"})]}))},settingsInfo:{error_msg:{label:"Message for error",inputType:"string",defaultValue:"Uh oh, an error!"}},settingsFormRender:({inputs:e,settings:t})=>{if(t.error_msg==="Trigger settings error")throw new Error(`Settings panel render error: -${t.error_msg}`);return U(Ne,{children:[v("p",{children:'Set the error message to "Trigger settings error" to cause the settings panel to throw an error'}),e.error_msg]})},category:"TESTING",description:"Node that throws an error when a button is clicked in editor or settings panel"}),eI="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEO0lEQVR4nO3dsYqcVRiH8WeNrkXMDRgLixRWRjSiXoMWG0iUXIGNsii4wRsQTApD0EIvQBCJ2RD0GqIoRjthC4vsHaRxRcbi7MDk28kMgv+c92SfH2zxfbPFmZcnZ06+LWZjNpsh/d+e6L0APZ4MSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqWIJ3svYJ2db/aW3d4Etg5/3gCePby3Mfm96RcFjfj6feAe8CtwE7gFHEx+jyvvnJne6qp8WEucB64AtSaZ8wzwwuHPJWAPuAx813NR64z0UXgC+JQ20OMS1TJngBu0WZzovJaHGmnH+gTY6b2IQuazuNx1FQ8xyo51gaNRHQDXaWesUxw9n3B4b/FnxNdP0d7jdY6erXZosylnhLA2gc8m9/aB14Bt4A7tgPu4uk97j9u097w/ef0abUaljBDWReC5hesD4C3gbpfV9HUXeBP4a+HeaeDtLqtZYYSwtibXX3I8o5r7Dfhqcm+rwzpWGiGsVyfXX3dZRS3TGZzrsooVRvhf4fOT63LniQ7usPywX8YIO9bUkafOqmfEsDQAw1LECGesdX+oPa5Kz8UdSxGGpQjDUsQIZ6xSZ4dCSs/FHUsRhqUIw1LECGes0s9rOio9F3csRRiWIgxLESOcsUqdHQopPRd3LEUYliIMSxEjnLFKP6/pqPRc3LEUYViKMCxFjHDGKnV2KKT0XNyxFGFYijAsRYxwxir9vKaj0nNxx1KEYSnCsBQxwhmr1NmhkNJzccdShGEpwrAUMcIZq/Tzmo5Kz8UdSxGGpQjDUsQIZ6xSZ4dCSs/FHUsRhqWIEcPyK08GMEJYf9Ce2cx/Xu67nBJe58GZ/Nl1NUuMENbvk+tLXVZRy3QGP3dZxQojhLU7uX4XONthHVW8SJvBot0O61hphLC+Be4tXD8NfA+81GU1fZ0FfqDNYG6fNqNSRgjrAPhwcu808CPt+5DPAScf8ZoepZO093gN+In23hd9wINf5VvCCA9Iof2LvAp8tHBvk/YF3NsL96YPDdf9oXa016euUnC3gjF2rLmPgc97L6KQL2gzKWmksP4B3gcuAHud19LTHnAReI82k5JG+ShcdAO4TRvueeAV2rnjqZ6LCvqbdkD/BbhJ++gr//XFG7PZuo9x6b8b6aNQAzEsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliL+BXaHdHGUC5uqAAAAAElFTkSuQmCC";function tI({text:e,position:t="down",size:n,children:r}){return v("span",{"aria-label":e,"data-balloon-pos":t,"data-balloon-length":n,children:r})}function Ir(l){var a=l,{text:e,position:t="down",size:n,children:r,variant:i="icon"}=a,o=ye(a,["text","position","size","children","variant"]);return v(rt,W(O({"aria-label":e,"data-balloon-pos":t,"data-balloon-length":n,variant:i},o),{children:r}))}const OE=({children:e,el:t="div"})=>{const[n]=P.useState(document.createElement(t));return P.useEffect(()=>(document.body.appendChild(n),()=>{document.body.removeChild(n)}),[n]),br.createPortal(e,n)},PE=236,nI=174,rI=31,NE={"--elements-palette-width":`${nI}px`,"--header-height":`${rI}px`,"--properties-panel-width":`${PE}px`},iI="_container_1w66f_1",oI="_full_screen_mode_1w66f_13",lI="_full_screen_button_container_1w66f_25",aI="_card_holder_1w66f_69",sI="_card_contents_holder_1w66f_76",eu={container:iI,full_screen_mode:oI,full_screen_button_container:lI,card_holder:aI,card_contents_holder:sI},RE=k.forwardRef((o,i)=>{var l=o,{children:e,style:t,card_args:{full_screen:n=!1}}=l,r=ye(l,["children","style","card_args"]);const[a,s]=k.useState(!1),u=()=>s(f=>!f),c=U("div",{style:NE,className:Ke("card",eu.container,a?eu.full_screen_mode:null),children:[n?v(uI,{isFullScreen:a,onClick:u}):null,e]});return a?v(OE,{children:c}):v("div",W(O({ref:i,style:t,className:eu.card_holder},r),{children:c}))});function uI({isFullScreen:e,onClick:t}){return v("div",{className:eu.full_screen_button_container,"data-is-full-screen":e,children:v(Ir,{text:e?"Reset full screen":"Expand to full screen",position:"left",onClick:n=>{n.preventDefault(),t()},variant:e?"regular":"icon",children:e?"Close":v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",role:"img",children:v("path",{"fill-rule":"evenodd",d:"M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"})})})})}function cv(...e){let t=0;for(const n of e)n&&(t+=1);return t}function Xp(...e){return e.filter(n=>n!==void 0).reduce((n,r,i)=>(i===0?"":n+` + */var Vm=Symbol.for("react.element"),$m=Symbol.for("react.portal"),jc=Symbol.for("react.fragment"),Wc=Symbol.for("react.strict_mode"),Yc=Symbol.for("react.profiler"),Vc=Symbol.for("react.provider"),$c=Symbol.for("react.context"),NT=Symbol.for("react.server_context"),Hc=Symbol.for("react.forward_ref"),Gc=Symbol.for("react.suspense"),Jc=Symbol.for("react.suspense_list"),Qc=Symbol.for("react.memo"),Kc=Symbol.for("react.lazy"),RT=Symbol.for("react.offscreen"),kE;kE=Symbol.for("react.module.reference");function gn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Vm:switch(e=e.type,e){case jc:case Yc:case Wc:case Gc:case Jc:return e;default:switch(e=e&&e.$$typeof,e){case NT:case $c:case Hc:case Kc:case Qc:case Vc:return e;default:return t}}case $m:return t}}}be.ContextConsumer=$c;be.ContextProvider=Vc;be.Element=Vm;be.ForwardRef=Hc;be.Fragment=jc;be.Lazy=Kc;be.Memo=Qc;be.Portal=$m;be.Profiler=Yc;be.StrictMode=Wc;be.Suspense=Gc;be.SuspenseList=Jc;be.isAsyncMode=function(){return!1};be.isConcurrentMode=function(){return!1};be.isContextConsumer=function(e){return gn(e)===$c};be.isContextProvider=function(e){return gn(e)===Vc};be.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vm};be.isForwardRef=function(e){return gn(e)===Hc};be.isFragment=function(e){return gn(e)===jc};be.isLazy=function(e){return gn(e)===Kc};be.isMemo=function(e){return gn(e)===Qc};be.isPortal=function(e){return gn(e)===$m};be.isProfiler=function(e){return gn(e)===Yc};be.isStrictMode=function(e){return gn(e)===Wc};be.isSuspense=function(e){return gn(e)===Gc};be.isSuspenseList=function(e){return gn(e)===Jc};be.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jc||e===Yc||e===Wc||e===Gc||e===Jc||e===RT||typeof e=="object"&&e!==null&&(e.$$typeof===Kc||e.$$typeof===Qc||e.$$typeof===Vc||e.$$typeof===$c||e.$$typeof===Hc||e.$$typeof===kE||e.getModuleId!==void 0)};be.typeOf=gn;(function(e){e.exports=be})(PT);function DT(){const e=vT();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const uv={notify(){},get:()=>[]};function LT(e,t){let n,r=uv;function i(f){return s(),r.subscribe(f)}function o(){r.notify()}function l(){c.onStateChange&&c.onStateChange()}function a(){return Boolean(n)}function s(){n||(n=t?t.addNestedSub(l):e.subscribe(l),r=DT())}function u(){n&&(n(),n=void 0,r.clear(),r=uv)}const c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:l,isSubscribed:a,trySubscribe:s,tryUnsubscribe:u,getListeners:()=>r};return c}const FT=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",MT=FT?O.useLayoutEffect:O.useEffect;function BT({store:e,context:t,children:n,serverState:r}){const i=O.useMemo(()=>{const a=LT(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=O.useMemo(()=>e.getState(),[e]);MT(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const l=t||ci;return k.createElement(l.Provider,{value:i},n)}function TE(e=ci){const t=e===ci?SE:()=>O.useContext(e);return function(){const{store:r}=t();return r}}const Hm=TE();function UT(e=ci){const t=e===ci?Hm:TE(e);return function(){return t().dispatch}}const Tr=UT();bT(qp.useSyncExternalStoreWithSelector);yT(br.unstable_batchedUpdates);const Xn={ui:"",libraries:""};function qc(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var zT={};qc(zT,"ErrorBoundary",()=>Xc);var jT={};qc(jT,"ErrorBoundaryContext",()=>Gm);const Gm=O.createContext(null),fd={didCatch:!1,error:null};class Xc extends O.Component{constructor(){super(...arguments);hs(this,"state",fd);hs(this,"resetErrorBoundary",(...n)=>{var i,o;const{error:r}=this.state;r!==null&&((o=(i=this.props).onReset)==null||o.call(i,{args:n,reason:"imperative-api"}),this.setState(fd))})}static getDerivedStateFromError(n){return{didCatch:!0,error:n}}componentDidCatch(n,r){var i,o;(o=(i=this.props).onError)==null||o.call(i,n,r)}componentDidUpdate(n,r){var l,a;const{didCatch:i}=this.state,{resetKeys:o}=this.props;i&&r.error!==null&&WT(n.resetKeys,o)&&((a=(l=this.props).onReset)==null||a.call(l,{next:o,prev:n.resetKeys,reason:"keys"}),this.setState(fd))}render(){const{children:n,fallbackRender:r,FallbackComponent:i,fallback:o}=this.props,{didCatch:l,error:a}=this.state;let s=n;if(l){const u={error:a,resetErrorBoundary:this.resetErrorBoundary};if(O.isValidElement(o))s=o;else if(typeof r=="function")s=r(u);else if(i)s=O.createElement(i,u);else throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return O.createElement(Gm.Provider,{value:{didCatch:l,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function WT(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}var YT={};qc(YT,"useErrorBoundary",()=>IE);function VT(e){if(e==null||typeof e.didCatch!="boolean"||typeof e.resetErrorBoundary!="function")throw new Error("ErrorBoundaryContext not found");return!0}function IE(){const e=O.useContext(Gm);VT(e);const[t,n]=O.useState({error:null,hasError:!1}),r=O.useMemo(()=>({resetBoundary:()=>{e==null||e.resetErrorBoundary(),n({error:null,hasError:!1})},showBoundary:i=>n({error:i,hasError:!0})}),[e==null?void 0:e.resetErrorBoundary]);if(t.hasError)throw t.error;return r}var $T={};qc($T,"withErrorBoundary",()=>HT);function HT(e,t){const n=i=>O.createElement(Xc,t,O.createElement(e,i)),r=e.displayName||e.name||"Unknown";return n.displayName=`withErrorBoundary(${r})`,n}function Ke(...e){return e.filter(t=>t).join(" ")}const GT="_button_1y00r_1",JT="_regular_1y00r_26",QT="_icon_1y00r_34",KT="_transparent_1y00r_42",dd={button:GT,regular:JT,delete:"_delete_1y00r_30",icon:QT,transparent:KT},rt=k.forwardRef((o,i)=>{var l=o,{children:e,variant:t="regular",className:n}=l,r=ye(l,["children","variant","className"]);const a=t?Array.isArray(t)?t.map(s=>dd[s]).join(" "):dd[t]:"";return v("button",W(P({ref:i,className:Ke(dd.button,a,n)},r),{children:e}))});function xe(){return function(o){var l=o,{name:t,library:n,category:r}=l,i=ye(l,["name","library","category"]);return P({uiName:n?`${n}::${t}`:t,name:t,library:n,category:r!=null?r:"Uncategorized"},i)}}const qT="_container_1og9v_1",XT={container:qT},ZT=xe()({library:"TESTING",name:"error_node",title:"Error Throwing Node",takesChildren:!1,UiComponent:({uiArguments:e,path:t,wrapperProps:n})=>{const{showBoundary:r}=IE();return U("div",W(P({className:XT.container},n),{children:[v("h3",{children:"Error Node! I throw errors"}),v(rt,{variant:"delete","aria-label":"Throw an error",onClick:()=>{r(new Error(`Ui Node error: ${e.error_msg}`))},children:"💣"})]}))},settingsInfo:{error_msg:{label:"Message for error",inputType:"string",defaultValue:"Uh oh, an error!"}},settingsFormRender:({inputs:e,settings:t})=>{if(t.error_msg==="Trigger settings error")throw new Error(`Settings panel render error: +${t.error_msg}`);return U(Ne,{children:[v("p",{children:'Set the error message to "Trigger settings error" to cause the settings panel to throw an error'}),e.error_msg]})},category:"TESTING",description:"Node that throws an error when a button is clicked in editor or settings panel"}),eI="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEO0lEQVR4nO3dsYqcVRiH8WeNrkXMDRgLixRWRjSiXoMWG0iUXIGNsii4wRsQTApD0EIvQBCJ2RD0GqIoRjthC4vsHaRxRcbi7MDk28kMgv+c92SfH2zxfbPFmZcnZ06+LWZjNpsh/d+e6L0APZ4MSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqWIJ3svYJ2db/aW3d4Etg5/3gCePby3Mfm96RcFjfj6feAe8CtwE7gFHEx+jyvvnJne6qp8WEucB64AtSaZ8wzwwuHPJWAPuAx813NR64z0UXgC+JQ20OMS1TJngBu0WZzovJaHGmnH+gTY6b2IQuazuNx1FQ8xyo51gaNRHQDXaWesUxw9n3B4b/FnxNdP0d7jdY6erXZosylnhLA2gc8m9/aB14Bt4A7tgPu4uk97j9u097w/ef0abUaljBDWReC5hesD4C3gbpfV9HUXeBP4a+HeaeDtLqtZYYSwtibXX3I8o5r7Dfhqcm+rwzpWGiGsVyfXX3dZRS3TGZzrsooVRvhf4fOT63LniQ7usPywX8YIO9bUkafOqmfEsDQAw1LECGesdX+oPa5Kz8UdSxGGpQjDUsQIZ6xSZ4dCSs/FHUsRhqUIw1LECGes0s9rOio9F3csRRiWIgxLESOcsUqdHQopPRd3LEUYliIMSxEjnLFKP6/pqPRc3LEUYViKMCxFjHDGKnV2KKT0XNyxFGFYijAsRYxwxir9vKaj0nNxx1KEYSnCsBQxwhmr1NmhkNJzccdShGEpwrAUMcIZq/Tzmo5Kz8UdSxGGpQjDUsQIZ6xSZ4dCSs/FHUsRhqWIEcPyK08GMEJYf9Ce2cx/Xu67nBJe58GZ/Nl1NUuMENbvk+tLXVZRy3QGP3dZxQojhLU7uX4XONthHVW8SJvBot0O61hphLC+Be4tXD8NfA+81GU1fZ0FfqDNYG6fNqNSRgjrAPhwcu808CPt+5DPAScf8ZoepZO093gN+In23hd9wINf5VvCCA9Iof2LvAp8tHBvk/YF3NsL96YPDdf9oXa016euUnC3gjF2rLmPgc97L6KQL2gzKWmksP4B3gcuAHud19LTHnAReI82k5JG+ShcdAO4TRvueeAV2rnjqZ6LCvqbdkD/BbhJ++gr//XFG7PZuo9x6b8b6aNQAzEsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliL+BXaHdHGUC5uqAAAAAElFTkSuQmCC";function tI({text:e,position:t="down",size:n,children:r}){return v("span",{"aria-label":e,"data-balloon-pos":t,"data-balloon-length":n,children:r})}function Ir(l){var a=l,{text:e,position:t="down",size:n,children:r,variant:i="icon"}=a,o=ye(a,["text","position","size","children","variant"]);return v(rt,W(P({"aria-label":e,"data-balloon-pos":t,"data-balloon-length":n,variant:i},o),{children:r}))}const OE=({children:e,el:t="div"})=>{const[n]=O.useState(document.createElement(t));return O.useEffect(()=>(document.body.appendChild(n),()=>{document.body.removeChild(n)}),[n]),br.createPortal(e,n)},PE=236,nI=174,rI=31,NE={"--elements-palette-width":`${nI}px`,"--header-height":`${rI}px`,"--properties-panel-width":`${PE}px`},iI="_container_1w66f_1",oI="_full_screen_mode_1w66f_13",lI="_full_screen_button_container_1w66f_25",aI="_card_holder_1w66f_69",sI="_card_contents_holder_1w66f_76",eu={container:iI,full_screen_mode:oI,full_screen_button_container:lI,card_holder:aI,card_contents_holder:sI},RE=k.forwardRef((o,i)=>{var l=o,{children:e,style:t,card_args:{full_screen:n=!1}}=l,r=ye(l,["children","style","card_args"]);const[a,s]=k.useState(!1),u=()=>s(f=>!f),c=U("div",{style:NE,className:Ke("card",eu.container,a?eu.full_screen_mode:null),children:[n?v(uI,{isFullScreen:a,onClick:u}):null,e]});return a?v(OE,{children:c}):v("div",W(P({ref:i,style:t,className:eu.card_holder},r),{children:c}))});function uI({isFullScreen:e,onClick:t}){return v("div",{className:eu.full_screen_button_container,"data-is-full-screen":e,children:v(Ir,{text:e?"Reset full screen":"Expand to full screen",position:"left",onClick:n=>{n.preventDefault(),t()},variant:e?"regular":"icon",children:e?"Close":v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",role:"img",children:v("path",{"fill-rule":"evenodd",d:"M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"})})})})}function cv(...e){let t=0;for(const n of e)n&&(t+=1);return t}function Xp(...e){return e.filter(n=>n!==void 0).reduce((n,r,i)=>(i===0?"":n+` `)+r,"")}function cI(e,t){const n=" ".repeat(t);return e.replaceAll(/\n/g,` ${n}`)}function DE(e,t="multi"){const n=t==="single"?"`":"\n```\n";return`${n}${e}${n}`}function fI(e){return DE(e,"single")}function pd(e){return DE(e,"multi")}function LE(e){var t,n;switch(e.app_info.mode){case"MAIN":{const r=JSON.stringify(e.app_info.ui_tree,null,2),i=(n=((t=e.selected_path)!=null?t:[]).join(" > "))!=null?n:"null";return Xp(`## Ui-Tree at error: ${pd(r)}`,`__Selection path:__ ${fI(i)}`)}case"TEMPLATE_CHOOSER":{const r=JSON.stringify(e.app_info.options,null,2);return Xp("## Template chooser options at error:",`${pd(r)}`)}default:{const r=JSON.stringify(e.app_info,null,2);return`## App state at error: ${pd(r)}`}}}function dI(e){const{node:t,path:n,app_state:r}=e;return FE({title:`Error rendering ${t.uiName}`,body:Xp(`This is what I was going when this error happened... -`,LE(r),`__Path to node at error:__ \`${n.join(" > ")}\``),labels:["testing-labels","ui-node-rendering"]})}function FE(e){const t=()=>`https://github.com/rstudio/shinyuieditor/issues/new?${[`title=${encodeURIComponent(e.title)}`,`labels=${encodeURIComponent(["autogenerated"].join(","))}`,`body=${encodeURIComponent(e.body)}`].join("&")}`,n=t(),r=65e3;return n.length>r?(e.body="State of app during error was too large to encode in url. Please describe state of app when error occured as best you can! Thank you!",t()):n}const ME=k.createContext({canGoBackward:!1,goBackward:()=>{throw new Error("No history go backward function provided")}});function pI({children:e,goBackward:t,canGoBackward:n}){return v(ME.Provider,{value:{goBackward:t,canGoBackward:n},children:e})}function hI(){return k.useContext(ME)}function Ka(e){return e.split("-")[1]}function Qm(e){return e==="y"?"height":"width"}function Bi(e){return e.split("-")[0]}function qa(e){return["top","bottom"].includes(Bi(e))?"x":"y"}function fv(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,a=qa(t),s=Qm(a),u=r[s]/2-i[s]/2,c=a==="x";let f;switch(Bi(t)){case"top":f={x:o,y:r.y-i.height};break;case"bottom":f={x:o,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:l};break;case"left":f={x:r.x-i.width,y:l};break;default:f={x:r.x,y:r.y}}switch(Ka(t)){case"start":f[a]-=u*(n&&c?-1:1);break;case"end":f[a]+=u*(n&&c?-1:1)}return f}const mI=(e,t,n)=>It(ml,null,function*(){const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),s=yield l.isRTL==null?void 0:l.isRTL(t);let u=yield l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=fv(u,r,s),d=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,fn(n){return It(this,null,function*(){const{element:r,padding:i=0}=e||{},{x:o,y:l,placement:a,rects:s,platform:u,elements:c}=n;if(r==null)return{};const f=BE(i),d={x:o,y:l},p=qa(a),h=Qm(p),m=yield u.getDimensions(r),E=p==="y",g=E?"top":"left",y=E?"bottom":"right",w=E?"clientHeight":"clientWidth",S=s.reference[h]+s.reference[p]-d[p]-s.floating[h],_=d[p]-s.reference[p],b=yield u.getOffsetParent==null?void 0:u.getOffsetParent(r);let A=b?b[w]:0;A&&(yield u.isElement==null?void 0:u.isElement(b))||(A=c.floating[w]||s.floating[h]);const T=S/2-_/2,N=f[g],R=A-m[h]-f[y],I=A/2-m[h]/2+T,F=Zp(N,I,R),L=Ka(a)!=null&&I!=F&&s.reference[h]/2-(Ie.concat(t,t+"-start",t+"-end"),[]);const wI={left:"right",right:"left",bottom:"top",top:"bottom"};function Mu(e){return e.replace(/left|right|bottom|top/g,t=>wI[t])}function bI(e,t,n){n===void 0&&(n=!1);const r=Ka(e),i=qa(e),o=Qm(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Mu(l)),{main:l,cross:Mu(l)}}const EI={start:"end",end:"start"};function hd(e){return e.replace(/start|end/g,t=>EI[t])}const SI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return It(this,null,function*(){var r;const{placement:i,middlewareData:o,rects:l,initialPlacement:a,platform:s,elements:u}=n,F=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0}=F,E=ye(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]),g=Bi(i),y=Bi(a)===a,w=yield s.isRTL==null?void 0:s.isRTL(u.floating),S=d||(y||!m?[Mu(a)]:function(L){const j=Mu(L);return[hd(L),j,hd(j)]}(a));d||h==="none"||S.push(...function(L,j,J,ee){const te=Ka(L);let D=function($,Q,C){const x=["left","right"],at=["right","left"],pt=["top","bottom"],Ut=["bottom","top"];switch($){case"top":case"bottom":return C?Q?at:x:Q?x:at;case"left":case"right":return Q?pt:Ut;default:return[]}}(Bi(L),J==="start",ee);return te&&(D=D.map($=>$+"-"+te),j&&(D=D.concat(D.map(hd)))),D}(a,m,h,w));const _=[a,...S],b=yield UE(n,E),A=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&A.push(b[g]),f){const{main:L,cross:j}=bI(i,l,w);A.push(b[L],b[j])}if(T=[...T,{placement:i,overflows:A}],!A.every(L=>L<=0)){var N,R;const L=(((N=o.flip)==null?void 0:N.index)||0)+1,j=_[L];if(j)return{data:{index:L,overflows:T},reset:{placement:j}};let J=(R=T.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:R.placement;if(!J)switch(p){case"bestFit":{var I;const ee=(I=T.map(te=>[te.placement,te.overflows.filter(D=>D>0).reduce((D,$)=>D+$,0)]).sort((te,D)=>te[1]-D[1])[0])==null?void 0:I[0];ee&&(J=ee);break}case"initialPlacement":J=a}if(i!==J)return{reset:{placement:J}}}return{}})}}},AI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return It(this,null,function*(){const{x:r,y:i}=n,o=yield function(l,a){return It(this,null,function*(){const{placement:s,platform:u,elements:c}=l,f=yield u.isRTL==null?void 0:u.isRTL(c.floating),d=Bi(s),p=Ka(s),h=qa(s)==="x",m=["left","top"].includes(d)?-1:1,E=f&&h?-1:1,g=typeof a=="function"?a(l):a;let{mainAxis:y,crossAxis:w,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:O({mainAxis:0,crossAxis:0,alignmentAxis:null},g);return p&&typeof S=="number"&&(w=p==="end"?-1*S:S),h?{x:w*E,y:y*m}:{x:y*m,y:w*E}})}(n,e);return{x:r+o.x,y:i+o.y,data:o}})}}};function xI(e){return e==="x"?"y":"x"}const CI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return It(this,null,function*(){const{x:r,y:i,placement:o}=n,g=e,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:w,y:S}=y;return{x:w,y:S}}}}=g,u=ye(g,["mainAxis","crossAxis","limiter"]),c={x:r,y:i},f=yield UE(n,u),d=qa(Bi(o)),p=xI(d);let h=c[d],m=c[p];if(l){const y=d==="y"?"bottom":"right";h=Zp(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";m=Zp(m+f[p==="y"?"top":"left"],m,m-f[y])}const E=s.fn(W(O({},n),{[d]:h,[p]:m}));return W(O({},E),{data:{x:E.x-r,y:E.y-i}})})}}};function Jt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){return Jt(e).getComputedStyle(e)}function zE(e){return e instanceof Jt(e).Node}function fi(e){return zE(e)?(e.nodeName||"").toLowerCase():""}let Ns;function jE(){if(Ns)return Ns;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Ns=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Ns):navigator.userAgent}function Rn(e){return e instanceof Jt(e).HTMLElement}function Pn(e){return e instanceof Jt(e).Element}function pv(e){return typeof ShadowRoot=="undefined"?!1:e instanceof Jt(e).ShadowRoot||e instanceof ShadowRoot}function Zc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function _I(e){return["table","td","th"].includes(fi(e))}function eh(e){const t=/firefox/i.test(jE()),n=Qn(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(i=>n.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=n.contain;return o!=null&&o.includes(i)})}function th(){return/^((?!chrome|android).)*safari/i.test(jE())}function Km(e){return["html","body","#document"].includes(fi(e))}const hv=Math.min,ia=Math.max,Bu=Math.round;function WE(e){const t=Qn(e);let n=parseFloat(t.width),r=parseFloat(t.height);const i=Rn(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=Bu(n)!==o||Bu(r)!==l;return a&&(n=o,r=l),{width:n,height:r,fallback:a}}function YE(e){return Pn(e)?e:e.contextElement}const VE={x:1,y:1};function Ro(e){const t=YE(e);if(!Rn(t))return VE;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=WE(t);let l=(o?Bu(n.width):n.width)/r,a=(o?Bu(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function Gi(e,t,n,r){var i,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),a=YE(e);let s=VE;t&&(r?Pn(r)&&(s=Ro(r)):s=Ro(e));const u=a?Jt(a):window,c=th()&&n;let f=(l.left+(c&&((i=u.visualViewport)==null?void 0:i.offsetLeft)||0))/s.x,d=(l.top+(c&&((o=u.visualViewport)==null?void 0:o.offsetTop)||0))/s.y,p=l.width/s.x,h=l.height/s.y;if(a){const m=Jt(a),E=r&&Pn(r)?Jt(r):r;let g=m.frameElement;for(;g&&r&&E!==m;){const y=Ro(g),w=g.getBoundingClientRect(),S=getComputedStyle(g);w.x+=(g.clientLeft+parseFloat(S.paddingLeft))*y.x,w.y+=(g.clientTop+parseFloat(S.paddingTop))*y.y,f*=y.x,d*=y.y,p*=y.x,h*=y.y,f+=w.x,d+=w.y,g=Jt(g).frameElement}}return Fu({width:p,height:h,x:f,y:d})}function ri(e){return((zE(e)?e.ownerDocument:e.document)||window.document).documentElement}function ef(e){return Pn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $E(e){return Gi(ri(e)).left+ef(e).scrollLeft}function Na(e){if(fi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pv(e)&&e.host||ri(e);return pv(t)?t.host:t}function HE(e){const t=Na(e);return Km(t)?t.ownerDocument.body:Rn(t)&&Zc(t)?t:HE(t)}function ii(e,t){var n;t===void 0&&(t=[]);const r=HE(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(r);return i?t.concat(o,o.visualViewport||[],Zc(r)?r:[]):t.concat(r,ii(r))}function mv(e,t,n){let r;if(t==="viewport")r=function(l,a){const s=Jt(l),u=ri(l),c=s.visualViewport;let f=u.clientWidth,d=u.clientHeight,p=0,h=0;if(c){f=c.width,d=c.height;const m=th();(!m||m&&a==="fixed")&&(p=c.offsetLeft,h=c.offsetTop)}return{width:f,height:d,x:p,y:h}}(e,n);else if(t==="document")r=function(l){const a=ri(l),s=ef(l),u=l.ownerDocument.body,c=ia(a.scrollWidth,a.clientWidth,u.scrollWidth,u.clientWidth),f=ia(a.scrollHeight,a.clientHeight,u.scrollHeight,u.clientHeight);let d=-s.scrollLeft+$E(l);const p=-s.scrollTop;return Qn(u).direction==="rtl"&&(d+=ia(a.clientWidth,u.clientWidth)-c),{width:c,height:f,x:d,y:p}}(ri(e));else if(Pn(t))r=function(l,a){const s=Gi(l,!0,a==="fixed"),u=s.top+l.clientTop,c=s.left+l.clientLeft,f=Rn(l)?Ro(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:c*f.x,y:u*f.y}}(t,n);else{const l=O({},t);if(th()){var i,o;const a=Jt(e);l.x-=((i=a.visualViewport)==null?void 0:i.offsetLeft)||0,l.y-=((o=a.visualViewport)==null?void 0:o.offsetTop)||0}r=l}return Fu(r)}function gv(e,t){return Rn(e)&&Qn(e).position!=="fixed"?t?t(e):e.offsetParent:null}function yv(e,t){const n=Jt(e);if(!Rn(e))return n;let r=gv(e,t);for(;r&&_I(r)&&Qn(r).position==="static";)r=gv(r,t);return r&&(fi(r)==="html"||fi(r)==="body"&&Qn(r).position==="static"&&!eh(r))?n:r||function(i){let o=Na(i);for(;Rn(o)&&!Km(o);){if(eh(o))return o;o=Na(o)}return null}(e)||n}function kI(e,t,n){const r=Rn(t),i=ri(t),o=Gi(e,!0,n==="fixed",t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((fi(t)!=="body"||Zc(i))&&(l=ef(t)),Rn(t)){const s=Gi(t,!0);a.x=s.x+t.clientLeft,a.y=s.y+t.clientTop}else i&&(a.x=$E(i));return{x:o.left+l.scrollLeft-a.x,y:o.top+l.scrollTop-a.y,width:o.width,height:o.height}}const GE={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?function(u,c){const f=c.get(u);if(f)return f;let d=ii(u).filter(E=>Pn(E)&&fi(E)!=="body"),p=null;const h=Qn(u).position==="fixed";let m=h?Na(u):u;for(;Pn(m)&&!Km(m);){const E=Qn(m),g=eh(m);E.position==="fixed"?p=null:(h?g||p:g||E.position!=="static"||!p||!["absolute","fixed"].includes(p.position))?p=E:d=d.filter(y=>y!==m),m=Na(m)}return c.set(u,d),d}(t,this._c):[].concat(n),l=[...o,r],a=l[0],s=l.reduce((u,c)=>{const f=mv(t,c,i);return u.top=ia(f.top,u.top),u.right=hv(f.right,u.right),u.bottom=hv(f.bottom,u.bottom),u.left=ia(f.left,u.left),u},mv(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rn(n),o=ri(n);if(n===o)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((fi(n)!=="body"||Zc(o))&&(l=ef(n)),Rn(n))){const u=Gi(n);a=Ro(n),s.x=u.x+n.clientLeft,s.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:Pn,getDimensions:function(e){return WE(e)},getOffsetParent:yv,getDocumentElement:ri,getScale:Ro,getElementRects(e){return It(this,null,function*(){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||yv,o=this.getDimensions;return{reference:kI(t,yield i(n),r),floating:O({x:0,y:0},yield o(n))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Qn(e).direction==="rtl"};function TI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=!0,animationFrame:a=!1}=r,s=i&&!a,u=s||o?[...Pn(e)?ii(e):e.contextElement?ii(e.contextElement):[],...ii(t)]:[];u.forEach(p=>{s&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});let c,f=null;l&&(f=new ResizeObserver(()=>{n()}),Pn(e)&&!a&&f.observe(e),Pn(e)||!e.contextElement||a||f.observe(e.contextElement),f.observe(t));let d=a?Gi(e):null;return a&&function p(){const h=Gi(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||n(),d=h,c=requestAnimationFrame(p)}(),n(),()=>{var p;u.forEach(h=>{s&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),(p=f)==null||p.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const II=(e,t,n)=>{const r=new Map,i=O({platform:GE},n),o=W(O({},i.platform),{_c:r});return mI(e,t,W(O({},i),{platform:o}))},OI=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?dv({element:t.current,padding:n}).fn(i):{}:t?dv({element:t,padding:n}).fn(i):{}}}};var tu=typeof document!="undefined"?P.useLayoutEffect:P.useEffect;function Uu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Uu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Uu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function vv(e){const t=P.useRef(e);return tu(()=>{t.current=e}),t}function PI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:l}=e,[a,s]=P.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,c]=P.useState(r);Uu(u,r)||c(r);const f=P.useRef(null),d=P.useRef(null),p=P.useRef(a),h=vv(o),m=vv(i),[E,g]=P.useState(null),[y,w]=P.useState(null),S=P.useCallback(R=>{f.current!==R&&(f.current=R,g(R))},[]),_=P.useCallback(R=>{d.current!==R&&(d.current=R,w(R))},[]),b=P.useCallback(()=>{if(!f.current||!d.current)return;const R={placement:t,strategy:n,middleware:u};m.current&&(R.platform=m.current),II(f.current,d.current,R).then(I=>{const F=W(O({},I),{isPositioned:!0});A.current&&!Uu(p.current,F)&&(p.current=F,br.flushSync(()=>{s(F)}))})},[u,t,n,m]);tu(()=>{l===!1&&p.current.isPositioned&&(p.current.isPositioned=!1,s(R=>W(O({},R),{isPositioned:!1})))},[l]);const A=P.useRef(!1);tu(()=>(A.current=!0,()=>{A.current=!1}),[]),tu(()=>{if(E&&y){if(h.current)return h.current(E,y,b);b()}},[E,y,b,h]);const T=P.useMemo(()=>({reference:f,floating:d,setReference:S,setFloating:_}),[S,_]),N=P.useMemo(()=>({reference:E,floating:y}),[E,y]);return P.useMemo(()=>W(O({},a),{update:b,refs:T,elements:N,reference:S,floating:_}),[a,b,T,N,S,_])}/*! +`,LE(r),`__Path to node at error:__ \`${n.join(" > ")}\``),labels:["testing-labels","ui-node-rendering"]})}function FE(e){const t=()=>`https://github.com/rstudio/shinyuieditor/issues/new?${[`title=${encodeURIComponent(e.title)}`,`labels=${encodeURIComponent(["autogenerated"].join(","))}`,`body=${encodeURIComponent(e.body)}`].join("&")}`,n=t(),r=65e3;return n.length>r?(e.body="State of app during error was too large to encode in url. Please describe state of app when error occured as best you can! Thank you!",t()):n}const ME=k.createContext({canGoBackward:!1,goBackward:()=>{throw new Error("No history go backward function provided")}});function pI({children:e,goBackward:t,canGoBackward:n}){return v(ME.Provider,{value:{goBackward:t,canGoBackward:n},children:e})}function hI(){return k.useContext(ME)}function Ka(e){return e.split("-")[1]}function Jm(e){return e==="y"?"height":"width"}function Bi(e){return e.split("-")[0]}function qa(e){return["top","bottom"].includes(Bi(e))?"x":"y"}function fv(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,a=qa(t),s=Jm(a),u=r[s]/2-i[s]/2,c=a==="x";let f;switch(Bi(t)){case"top":f={x:o,y:r.y-i.height};break;case"bottom":f={x:o,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:l};break;case"left":f={x:r.x-i.width,y:l};break;default:f={x:r.x,y:r.y}}switch(Ka(t)){case"start":f[a]-=u*(n&&c?-1:1);break;case"end":f[a]+=u*(n&&c?-1:1)}return f}const mI=(e,t,n)=>It(ml,null,function*(){const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),s=yield l.isRTL==null?void 0:l.isRTL(t);let u=yield l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=fv(u,r,s),d=r,p={},h=0;for(let m=0;m({name:"arrow",options:e,fn(n){return It(this,null,function*(){const{element:r,padding:i=0}=e||{},{x:o,y:l,placement:a,rects:s,platform:u,elements:c}=n;if(r==null)return{};const f=BE(i),d={x:o,y:l},p=qa(a),h=Jm(p),m=yield u.getDimensions(r),E=p==="y",g=E?"top":"left",y=E?"bottom":"right",w=E?"clientHeight":"clientWidth",S=s.reference[h]+s.reference[p]-d[p]-s.floating[h],_=d[p]-s.reference[p],b=yield u.getOffsetParent==null?void 0:u.getOffsetParent(r);let A=b?b[w]:0;A&&(yield u.isElement==null?void 0:u.isElement(b))||(A=c.floating[w]||s.floating[h]);const T=S/2-_/2,N=f[g],R=A-m[h]-f[y],I=A/2-m[h]/2+T,F=Zp(N,I,R),L=Ka(a)!=null&&I!=F&&s.reference[h]/2-(Ie.concat(t,t+"-start",t+"-end"),[]);const wI={left:"right",right:"left",bottom:"top",top:"bottom"};function Mu(e){return e.replace(/left|right|bottom|top/g,t=>wI[t])}function bI(e,t,n){n===void 0&&(n=!1);const r=Ka(e),i=qa(e),o=Jm(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Mu(l)),{main:l,cross:Mu(l)}}const EI={start:"end",end:"start"};function hd(e){return e.replace(/start|end/g,t=>EI[t])}const SI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return It(this,null,function*(){var r;const{placement:i,middlewareData:o,rects:l,initialPlacement:a,platform:s,elements:u}=n,F=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0}=F,E=ye(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]),g=Bi(i),y=Bi(a)===a,w=yield s.isRTL==null?void 0:s.isRTL(u.floating),S=d||(y||!m?[Mu(a)]:function(L){const j=Mu(L);return[hd(L),j,hd(j)]}(a));d||h==="none"||S.push(...function(L,j,J,ee){const te=Ka(L);let D=function($,Q,C){const x=["left","right"],at=["right","left"],pt=["top","bottom"],Ut=["bottom","top"];switch($){case"top":case"bottom":return C?Q?at:x:Q?x:at;case"left":case"right":return Q?pt:Ut;default:return[]}}(Bi(L),J==="start",ee);return te&&(D=D.map($=>$+"-"+te),j&&(D=D.concat(D.map(hd)))),D}(a,m,h,w));const _=[a,...S],b=yield UE(n,E),A=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&A.push(b[g]),f){const{main:L,cross:j}=bI(i,l,w);A.push(b[L],b[j])}if(T=[...T,{placement:i,overflows:A}],!A.every(L=>L<=0)){var N,R;const L=(((N=o.flip)==null?void 0:N.index)||0)+1,j=_[L];if(j)return{data:{index:L,overflows:T},reset:{placement:j}};let J=(R=T.filter(ee=>ee.overflows[0]<=0).sort((ee,te)=>ee.overflows[1]-te.overflows[1])[0])==null?void 0:R.placement;if(!J)switch(p){case"bestFit":{var I;const ee=(I=T.map(te=>[te.placement,te.overflows.filter(D=>D>0).reduce((D,$)=>D+$,0)]).sort((te,D)=>te[1]-D[1])[0])==null?void 0:I[0];ee&&(J=ee);break}case"initialPlacement":J=a}if(i!==J)return{reset:{placement:J}}}return{}})}}},AI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return It(this,null,function*(){const{x:r,y:i}=n,o=yield function(l,a){return It(this,null,function*(){const{placement:s,platform:u,elements:c}=l,f=yield u.isRTL==null?void 0:u.isRTL(c.floating),d=Bi(s),p=Ka(s),h=qa(s)==="x",m=["left","top"].includes(d)?-1:1,E=f&&h?-1:1,g=typeof a=="function"?a(l):a;let{mainAxis:y,crossAxis:w,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:P({mainAxis:0,crossAxis:0,alignmentAxis:null},g);return p&&typeof S=="number"&&(w=p==="end"?-1*S:S),h?{x:w*E,y:y*m}:{x:y*m,y:w*E}})}(n,e);return{x:r+o.x,y:i+o.y,data:o}})}}};function xI(e){return e==="x"?"y":"x"}const CI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return It(this,null,function*(){const{x:r,y:i,placement:o}=n,g=e,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:w,y:S}=y;return{x:w,y:S}}}}=g,u=ye(g,["mainAxis","crossAxis","limiter"]),c={x:r,y:i},f=yield UE(n,u),d=qa(Bi(o)),p=xI(d);let h=c[d],m=c[p];if(l){const y=d==="y"?"bottom":"right";h=Zp(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";m=Zp(m+f[p==="y"?"top":"left"],m,m-f[y])}const E=s.fn(W(P({},n),{[d]:h,[p]:m}));return W(P({},E),{data:{x:E.x-r,y:E.y-i}})})}}};function Jt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){return Jt(e).getComputedStyle(e)}function zE(e){return e instanceof Jt(e).Node}function fi(e){return zE(e)?(e.nodeName||"").toLowerCase():""}let Ns;function jE(){if(Ns)return Ns;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Ns=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Ns):navigator.userAgent}function Rn(e){return e instanceof Jt(e).HTMLElement}function Pn(e){return e instanceof Jt(e).Element}function pv(e){return typeof ShadowRoot=="undefined"?!1:e instanceof Jt(e).ShadowRoot||e instanceof ShadowRoot}function Zc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function _I(e){return["table","td","th"].includes(fi(e))}function eh(e){const t=/firefox/i.test(jE()),n=Qn(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(i=>n.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=n.contain;return o!=null&&o.includes(i)})}function th(){return/^((?!chrome|android).)*safari/i.test(jE())}function Qm(e){return["html","body","#document"].includes(fi(e))}const hv=Math.min,ia=Math.max,Bu=Math.round;function WE(e){const t=Qn(e);let n=parseFloat(t.width),r=parseFloat(t.height);const i=Rn(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=Bu(n)!==o||Bu(r)!==l;return a&&(n=o,r=l),{width:n,height:r,fallback:a}}function YE(e){return Pn(e)?e:e.contextElement}const VE={x:1,y:1};function Ro(e){const t=YE(e);if(!Rn(t))return VE;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=WE(t);let l=(o?Bu(n.width):n.width)/r,a=(o?Bu(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function Gi(e,t,n,r){var i,o;t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),a=YE(e);let s=VE;t&&(r?Pn(r)&&(s=Ro(r)):s=Ro(e));const u=a?Jt(a):window,c=th()&&n;let f=(l.left+(c&&((i=u.visualViewport)==null?void 0:i.offsetLeft)||0))/s.x,d=(l.top+(c&&((o=u.visualViewport)==null?void 0:o.offsetTop)||0))/s.y,p=l.width/s.x,h=l.height/s.y;if(a){const m=Jt(a),E=r&&Pn(r)?Jt(r):r;let g=m.frameElement;for(;g&&r&&E!==m;){const y=Ro(g),w=g.getBoundingClientRect(),S=getComputedStyle(g);w.x+=(g.clientLeft+parseFloat(S.paddingLeft))*y.x,w.y+=(g.clientTop+parseFloat(S.paddingTop))*y.y,f*=y.x,d*=y.y,p*=y.x,h*=y.y,f+=w.x,d+=w.y,g=Jt(g).frameElement}}return Fu({width:p,height:h,x:f,y:d})}function ri(e){return((zE(e)?e.ownerDocument:e.document)||window.document).documentElement}function ef(e){return Pn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $E(e){return Gi(ri(e)).left+ef(e).scrollLeft}function Na(e){if(fi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pv(e)&&e.host||ri(e);return pv(t)?t.host:t}function HE(e){const t=Na(e);return Qm(t)?t.ownerDocument.body:Rn(t)&&Zc(t)?t:HE(t)}function ii(e,t){var n;t===void 0&&(t=[]);const r=HE(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(r);return i?t.concat(o,o.visualViewport||[],Zc(r)?r:[]):t.concat(r,ii(r))}function mv(e,t,n){let r;if(t==="viewport")r=function(l,a){const s=Jt(l),u=ri(l),c=s.visualViewport;let f=u.clientWidth,d=u.clientHeight,p=0,h=0;if(c){f=c.width,d=c.height;const m=th();(!m||m&&a==="fixed")&&(p=c.offsetLeft,h=c.offsetTop)}return{width:f,height:d,x:p,y:h}}(e,n);else if(t==="document")r=function(l){const a=ri(l),s=ef(l),u=l.ownerDocument.body,c=ia(a.scrollWidth,a.clientWidth,u.scrollWidth,u.clientWidth),f=ia(a.scrollHeight,a.clientHeight,u.scrollHeight,u.clientHeight);let d=-s.scrollLeft+$E(l);const p=-s.scrollTop;return Qn(u).direction==="rtl"&&(d+=ia(a.clientWidth,u.clientWidth)-c),{width:c,height:f,x:d,y:p}}(ri(e));else if(Pn(t))r=function(l,a){const s=Gi(l,!0,a==="fixed"),u=s.top+l.clientTop,c=s.left+l.clientLeft,f=Rn(l)?Ro(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:c*f.x,y:u*f.y}}(t,n);else{const l=P({},t);if(th()){var i,o;const a=Jt(e);l.x-=((i=a.visualViewport)==null?void 0:i.offsetLeft)||0,l.y-=((o=a.visualViewport)==null?void 0:o.offsetTop)||0}r=l}return Fu(r)}function gv(e,t){return Rn(e)&&Qn(e).position!=="fixed"?t?t(e):e.offsetParent:null}function yv(e,t){const n=Jt(e);if(!Rn(e))return n;let r=gv(e,t);for(;r&&_I(r)&&Qn(r).position==="static";)r=gv(r,t);return r&&(fi(r)==="html"||fi(r)==="body"&&Qn(r).position==="static"&&!eh(r))?n:r||function(i){let o=Na(i);for(;Rn(o)&&!Qm(o);){if(eh(o))return o;o=Na(o)}return null}(e)||n}function kI(e,t,n){const r=Rn(t),i=ri(t),o=Gi(e,!0,n==="fixed",t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&n!=="fixed")if((fi(t)!=="body"||Zc(i))&&(l=ef(t)),Rn(t)){const s=Gi(t,!0);a.x=s.x+t.clientLeft,a.y=s.y+t.clientTop}else i&&(a.x=$E(i));return{x:o.left+l.scrollLeft-a.x,y:o.top+l.scrollTop-a.y,width:o.width,height:o.height}}const GE={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?function(u,c){const f=c.get(u);if(f)return f;let d=ii(u).filter(E=>Pn(E)&&fi(E)!=="body"),p=null;const h=Qn(u).position==="fixed";let m=h?Na(u):u;for(;Pn(m)&&!Qm(m);){const E=Qn(m),g=eh(m);E.position==="fixed"?p=null:(h?g||p:g||E.position!=="static"||!p||!["absolute","fixed"].includes(p.position))?p=E:d=d.filter(y=>y!==m),m=Na(m)}return c.set(u,d),d}(t,this._c):[].concat(n),l=[...o,r],a=l[0],s=l.reduce((u,c)=>{const f=mv(t,c,i);return u.top=ia(f.top,u.top),u.right=hv(f.right,u.right),u.bottom=hv(f.bottom,u.bottom),u.left=ia(f.left,u.left),u},mv(t,a,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Rn(n),o=ri(n);if(n===o)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((fi(n)!=="body"||Zc(o))&&(l=ef(n)),Rn(n))){const u=Gi(n);a=Ro(n),s.x=u.x+n.clientLeft,s.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}},isElement:Pn,getDimensions:function(e){return WE(e)},getOffsetParent:yv,getDocumentElement:ri,getScale:Ro,getElementRects(e){return It(this,null,function*(){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||yv,o=this.getDimensions;return{reference:kI(t,yield i(n),r),floating:P({x:0,y:0},yield o(n))}})},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Qn(e).direction==="rtl"};function TI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=!0,animationFrame:a=!1}=r,s=i&&!a,u=s||o?[...Pn(e)?ii(e):e.contextElement?ii(e.contextElement):[],...ii(t)]:[];u.forEach(p=>{s&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});let c,f=null;l&&(f=new ResizeObserver(()=>{n()}),Pn(e)&&!a&&f.observe(e),Pn(e)||!e.contextElement||a||f.observe(e.contextElement),f.observe(t));let d=a?Gi(e):null;return a&&function p(){const h=Gi(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||n(),d=h,c=requestAnimationFrame(p)}(),n(),()=>{var p;u.forEach(h=>{s&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),(p=f)==null||p.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const II=(e,t,n)=>{const r=new Map,i=P({platform:GE},n),o=W(P({},i.platform),{_c:r});return mI(e,t,W(P({},i),{platform:o}))},OI=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?dv({element:t.current,padding:n}).fn(i):{}:t?dv({element:t,padding:n}).fn(i):{}}}};var tu=typeof document!="undefined"?O.useLayoutEffect:O.useEffect;function Uu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Uu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Uu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function vv(e){const t=O.useRef(e);return tu(()=>{t.current=e}),t}function PI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:l}=e,[a,s]=O.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,c]=O.useState(r);Uu(u,r)||c(r);const f=O.useRef(null),d=O.useRef(null),p=O.useRef(a),h=vv(o),m=vv(i),[E,g]=O.useState(null),[y,w]=O.useState(null),S=O.useCallback(R=>{f.current!==R&&(f.current=R,g(R))},[]),_=O.useCallback(R=>{d.current!==R&&(d.current=R,w(R))},[]),b=O.useCallback(()=>{if(!f.current||!d.current)return;const R={placement:t,strategy:n,middleware:u};m.current&&(R.platform=m.current),II(f.current,d.current,R).then(I=>{const F=W(P({},I),{isPositioned:!0});A.current&&!Uu(p.current,F)&&(p.current=F,br.flushSync(()=>{s(F)}))})},[u,t,n,m]);tu(()=>{l===!1&&p.current.isPositioned&&(p.current.isPositioned=!1,s(R=>W(P({},R),{isPositioned:!1})))},[l]);const A=O.useRef(!1);tu(()=>(A.current=!0,()=>{A.current=!1}),[]),tu(()=>{if(E&&y){if(h.current)return h.current(E,y,b);b()}},[E,y,b,h]);const T=O.useMemo(()=>({reference:f,floating:d,setReference:S,setFloating:_}),[S,_]),N=O.useMemo(()=>({reference:E,floating:y}),[E,y]);return O.useMemo(()=>W(P({},a),{update:b,refs:T,elements:N,reference:S,floating:_}),[a,b,T,N,S,_])}/*! * tabbable 6.1.1 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE -*/var NI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],nh=NI.join(","),JE=typeof Element=="undefined",Ra=JE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zu=!JE&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ju=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",l=o||n&&t&&e(t.parentNode);return l},RI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},DI=function(t,n,r){if(ju(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(nh));return n&&Ra.call(t,nh)&&i.unshift(t),i=i.filter(r),i},LI=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var l=o.shift();if(!ju(l,!1))if(l.tagName==="SLOT"){var a=l.assignedElements(),s=a.length?a:l.children,u=e(s,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:l,candidates:u})}else{var c=Ra.call(l,nh);c&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var f=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),d=!ju(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(f&&d){var p=e(f===!0?l.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:l,candidates:p})}else o.unshift.apply(o,l.children)}}return i},QE=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||RI(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},FI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},KE=function(t){return t.tagName==="INPUT"},MI=function(t){return KE(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},UI=function(t,n){for(var r=0;rsummary:first-of-type"),l=o?t.parentElement:t;if(Ra.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var s=t.parentElement,u=zu(t);if(s&&!s.shadowRoot&&i(s)===!0)return wv(t);t.assignedSlot?t=t.assignedSlot:!s&&u!==t.ownerDocument?t=u.host:t=s}t=a}if(YI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wv(t);return!1},$I=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},JI=function e(t){var n=[],r=[];return t.forEach(function(i,o){var l=!!i.scopeParent,a=l?i.scopeParent:i,s=QE(a,l),u=l?e(i.candidates):a;s===0?l?n.push.apply(n,u):n.push(a):r.push({documentOrder:o,tabIndex:s,item:i,isScope:l,content:u})}),r.sort(FI).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},qE=function(t,n){n=n||{};var r;return n.getShadowRoot?r=LI([t],n.includeContainer,{filter:bv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:GI}):r=DI(t,n.includeContainer,bv.bind(null,n)),JI(r)};function Wu(){return Wu=Object.assign||function(e){for(var t=1;t"floating-ui-"+QI++;function KI(){const[e,t]=P.useState(()=>md?Ev():void 0);return Ji(()=>{e==null&&t(Ev())},[]),P.useEffect(()=>{md||(md=!0)},[]),e}const qI=hw["useId".toString()],tf=qI||KI,XI=P.forwardRef(function(t,n){var r;let J=t,{context:{placement:i,elements:{floating:o},middlewareData:{arrow:l}},width:a=14,height:s=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:f,stroke:d,d:p}=J,h=ye(J,["context","width","height","tipRadius","strokeWidth","staticOffset","stroke","d"]);c*=2;const m=c/2,E=a/2*(u/-8+1),g=s/2*u/4,[y,w]=i.split("-"),S=o?GE.isRTL(o):!1,_=!!p,b=y==="top"||y==="bottom",A=f&&w==="end"?"bottom":"top";let T=f&&w==="end"?"right":"left";f&&S&&(T=w==="end"?"left":"right");const N=_?0:m,R=(l==null?void 0:l.x)!=null?f||l.x:"",I=(l==null?void 0:l.y)!=null?f||l.y+N:"",F=p||"M0,0"+(" H"+a)+(" L"+(a-E)+","+(s-g))+(" Q"+a/2+","+s+" "+E+","+(s-g))+" Z",L={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[y],j=tf();return P.createElement("svg",Wu({},h,{suppressHydrationWarning:!0,"aria-hidden":!0,ref:n,width:_?a:a+c,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:W(O({},h.style),{position:"absolute",pointerEvents:"none",[T]:R,[A]:I,[y]:b||_?"100%":"calc(100% - "+c/2+"px)",transform:""+L+((r=h.style)!=null&&r.transform?" "+h.style.transform:"")})}),c>0&&P.createElement("path",{clipPath:"url(#"+j+")",fill:"none",stroke:d,strokeWidth:c+(p?0:1),d:F}),P.createElement("path",{stroke:c&&!p?h.fill:"none",d:F}),P.createElement("clipPath",{id:j},P.createElement("rect",{x:-m,y:m*(_?-1:1),width:a+c,height:a})))});function ZI(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const eO=P.createContext(null),tO=P.createContext(null),XE=()=>{var e;return((e=P.useContext(eO))==null?void 0:e.id)||null},qm=()=>P.useContext(tO);function gr(e){return(e==null?void 0:e.ownerDocument)||document}function nO(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function rO(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function nf(e){return gr(e).defaultView||window}function $n(e){return e?e instanceof nf(e).Element:!1}function ZE(e){return e?e instanceof nf(e).HTMLElement:!1}function iO(e){if(typeof ShadowRoot=="undefined")return!1;const t=nf(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oO(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(nO())||t.test(rO()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lO(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function aO(){return/apple/i.test(navigator.vendor)}function eS(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Sv(e){const t=P.useRef(e);return Ji(()=>{t.current=e}),t}const Av="data-floating-ui-safe-polygon";function gd(e,t,n){return n&&!eS(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}const sO=function(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:{domReference:l,floating:a},refs:s}=e,{enabled:u=!0,delay:c=0,handleClose:f=null,mouseOnly:d=!1,restMs:p=0,move:h=!0}=t,m=qm(),E=XE(),g=Sv(f),y=Sv(c),w=P.useRef(),S=P.useRef(),_=P.useRef(),b=P.useRef(),A=P.useRef(!0),T=P.useRef(!1),N=P.useRef(()=>{}),R=P.useCallback(()=>{var j;const J=(j=i.current.openEvent)==null?void 0:j.type;return(J==null?void 0:J.includes("mouse"))&&J!=="mousedown"},[i]);P.useEffect(()=>{if(!u)return;function j(){clearTimeout(S.current),clearTimeout(b.current),A.current=!0}return o.on("dismiss",j),()=>{o.off("dismiss",j)}},[u,o]),P.useEffect(()=>{if(!u||!g.current||!n)return;function j(){R()&&r(!1)}const J=gr(a).documentElement;return J.addEventListener("mouseleave",j),()=>{J.removeEventListener("mouseleave",j)}},[a,n,r,u,g,i,R]);const I=P.useCallback(function(j){j===void 0&&(j=!0);const J=gd(y.current,"close",w.current);J&&!_.current?(clearTimeout(S.current),S.current=setTimeout(()=>r(!1),J)):j&&(clearTimeout(S.current),r(!1))},[y,r]),F=P.useCallback(()=>{N.current(),_.current=void 0},[]),L=P.useCallback(()=>{if(T.current){const j=gr(s.floating.current).body;j.style.pointerEvents="",j.removeAttribute(Av),T.current=!1}},[s]);return P.useEffect(()=>{if(!u)return;function j(){return i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1}function J(D){if(clearTimeout(S.current),A.current=!1,d&&!eS(w.current)||p>0&&gd(y.current,"open")===0)return;i.current.openEvent=D;const $=gd(y.current,"open",w.current);$?S.current=setTimeout(()=>{r(!0)},$):r(!0)}function ee(D){if(j())return;N.current();const $=gr(a);if(clearTimeout(b.current),g.current){n||clearTimeout(S.current),_.current=g.current(W(O({},e),{tree:m,x:D.clientX,y:D.clientY,onClose(){L(),F(),I()}}));const Q=_.current;$.addEventListener("mousemove",Q),N.current=()=>{$.removeEventListener("mousemove",Q)};return}I()}function te(D){j()||g.current==null||g.current(W(O({},e),{tree:m,x:D.clientX,y:D.clientY,onClose(){L(),F(),I()}}))(D)}if($n(l)){const D=l;return n&&D.addEventListener("mouseleave",te),a==null||a.addEventListener("mouseleave",te),h&&D.addEventListener("mousemove",J,{once:!0}),D.addEventListener("mouseenter",J),D.addEventListener("mouseleave",ee),()=>{n&&D.removeEventListener("mouseleave",te),a==null||a.removeEventListener("mouseleave",te),h&&D.removeEventListener("mousemove",J),D.removeEventListener("mouseenter",J),D.removeEventListener("mouseleave",ee)}}},[l,a,u,e,d,p,h,I,F,L,r,n,m,y,g,i]),Ji(()=>{var j;if(u&&n&&(j=g.current)!=null&&j.__options.blockPointerEvents&&R()){const te=gr(a).body;if(te.setAttribute(Av,""),te.style.pointerEvents="none",T.current=!0,$n(l)&&a){var J,ee;const D=l,$=m==null||(J=m.nodesRef.current.find(Q=>Q.id===E))==null||(ee=J.context)==null?void 0:ee.elements.floating;return $&&($.style.pointerEvents=""),D.style.pointerEvents="auto",a.style.pointerEvents="auto",()=>{D.style.pointerEvents="",a.style.pointerEvents=""}}}},[u,n,E,a,l,m,g,i,R]),Ji(()=>{n||(w.current=void 0,F(),L())},[n,F,L]),P.useEffect(()=>()=>{F(),clearTimeout(S.current),clearTimeout(b.current),L()},[u,F,L]),P.useMemo(()=>{if(!u)return{};function j(J){w.current=J.pointerType}return{reference:{onPointerDown:j,onPointerEnter:j,onMouseMove(){n||p===0||(clearTimeout(b.current),b.current=setTimeout(()=>{A.current||r(!0)},p))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(){o.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),I(!1)}}}},[o,u,p,n,r,I])};function tS(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function rh(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&iO(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function yd(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)})||[],r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(l=>{var a;return i.parentId===l.id&&((a=i.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function uO(e){return"composedPath"in e?e.composedPath()[0]:e.target}const nS=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rS(e,t){const n=qE(e,nS());t==="prev"&&n.reverse();const r=n.indexOf(tS(gr(e)));return n.slice(r+1)[0]}function cO(){return rS(document.body,"next")}function fO(){return rS(document.body,"prev")}function vd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!rh(n,r)}function dO(e){qE(e,nS()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function pO(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const iS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let hO;function xv(e){e.key==="Tab"&&(e.target,clearTimeout(hO))}const Cv=P.forwardRef(function(t,n){const[r,i]=P.useState();return Ji(()=>(aO()&&i("button"),document.addEventListener("keydown",xv),()=>{document.removeEventListener("keydown",xv)}),[]),P.createElement("span",Wu({},t,{ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,"data-floating-ui-focus-guard":"",style:iS}))}),oS=P.createContext(null),mO=function(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=P.useState(null),o=tf(),l=yO();return Ji(()=>{const a=t?document.getElementById(t):null,s="data-floating-ui-portal";if(a){const u=document.createElement("div");return u.id=o,u.setAttribute(s,""),a.appendChild(u),i(u),()=>{u.remove()}}else{let u=(l==null?void 0:l.portalNode)||n||document.body,c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const f=document.createElement("div");return f.id=o,f.setAttribute(s,""),i(f),u=c||u,u.appendChild(f),()=>{var d;f.remove(),(d=c)==null||d.remove()}}},[t,n,l,o]),r},gO=e=>{let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=mO({id:n,root:r}),[l,a]=P.useState(null),s=P.useRef(null),u=P.useRef(null),c=P.useRef(null),f=P.useRef(null),d=!!l&&!l.modal&&!!(r||o)&&i;return P.useEffect(()=>{if(!o||!i||l!=null&&l.modal)return;function p(h){o&&vd(h)&&(h.type==="focusin"?pO:dO)(o)}return o.addEventListener("focusin",p,!0),o.addEventListener("focusout",p,!0),()=>{o.removeEventListener("focusin",p,!0),o.removeEventListener("focusout",p,!0)}},[o,i,l==null?void 0:l.modal]),P.createElement(oS.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o])},d&&o&&P.createElement(Cv,{"data-type":"outside",ref:s,onFocus:p=>{if(vd(p,o)){var h;(h=c.current)==null||h.focus()}else{const m=fO()||(l==null?void 0:l.refs.domReference.current);m==null||m.focus()}}}),d&&o&&P.createElement("span",{"aria-owns":o.id,style:iS}),o&&br.createPortal(t,o),d&&o&&P.createElement(Cv,{"data-type":"outside",ref:u,onFocus:p=>{if(vd(p,o)){var h;(h=f.current)==null||h.focus()}else{const m=cO()||(l==null?void 0:l.refs.domReference.current);m==null||m.focus(),l!=null&&l.closeOnFocusOut&&(l==null||l.onOpenChange(!1))}}}))},yO=()=>P.useContext(oS),vO=hw["useInsertionEffect".toString()],wO=vO||(e=>e());function nu(e){const t=P.useRef(()=>{});return wO(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}},AO=function(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:l,domReference:a,floating:s},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:E=!1,bubbles:g}=t,y=qm(),w=XE()!=null,S=nu(typeof d=="function"?d:()=>!1),_=typeof d=="function"?S:d,b=P.useRef(!1),{escapeKeyBubbles:A,outsidePressBubbles:T}=SO(g),N=nu(I=>{if(!n||!c||!f||I.key!=="Escape")return;const F=y?yd(y.nodesRef.current,o):[];if(!A&&(I.stopPropagation(),F.length>0)){let L=!0;if(F.forEach(j=>{var J;if((J=j.context)!=null&&J.open&&!j.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}),R=nu(I=>{const F=b.current;if(b.current=!1,F||typeof _=="function"&&!_(I))return;const L=uO(I);if(ZE(L)&&s){const ee=L.clientWidth>0&&L.scrollWidth>L.clientWidth,te=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let D=te&&I.offsetX>L.clientWidth;if(te&&nf(s).getComputedStyle(L).direction==="rtl"&&(D=I.offsetX<=L.offsetWidth-L.clientWidth),D||ee&&I.offsetY>L.clientHeight)return}const j=y&&yd(y.nodesRef.current,o).some(ee=>{var te;return ru(I,(te=ee.context)==null?void 0:te.elements.floating)});if(ru(I,s)||ru(I,a)||j)return;const J=y?yd(y.nodesRef.current,o):[];if(J.length>0){let ee=!0;if(J.forEach(te=>{var D;if((D=te.context)!=null&&D.open&&!te.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:oO(I)||lO(I)}}),r(!1)});return P.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=A,u.current.__outsidePressBubbles=T;function I(){r(!1)}const F=gr(s);f&&F.addEventListener("keydown",N),_&&F.addEventListener(p,R);let L=[];return E&&($n(a)&&(L=ii(a)),$n(s)&&(L=L.concat(ii(s))),!$n(l)&&l&&l.contextElement&&(L=L.concat(ii(l.contextElement)))),L=L.filter(j=>{var J;return j!==((J=F.defaultView)==null?void 0:J.visualViewport)}),L.forEach(j=>{j.addEventListener("scroll",I,{passive:!0})}),()=>{f&&F.removeEventListener("keydown",N),_&&F.removeEventListener(p,R),L.forEach(j=>{j.removeEventListener("scroll",I)})}},[u,s,a,l,f,_,p,n,r,E,c,A,T,N,R]),P.useEffect(()=>{b.current=!1},[_,p]),P.useMemo(()=>c?{reference:{onKeyDown:N,[bO[m]]:()=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{onKeyDown:N,[EO[p]]:()=>{b.current=!0}}}:{},[c,i,h,p,m,r,N])},xO=function(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,refs:l,elements:{floating:a,domReference:s}}=e,{enabled:u=!0,keyboardOnly:c=!0}=t,f=P.useRef(""),d=P.useRef(!1),p=P.useRef();return P.useEffect(()=>{if(!u)return;const m=gr(a).defaultView||window;function E(){!n&&ZE(s)&&s===tS(gr(s))&&(d.current=!0)}return m.addEventListener("blur",E),()=>{m.removeEventListener("blur",E)}},[a,s,n,u]),P.useEffect(()=>{if(!u)return;function h(m){(m.type==="referencePress"||m.type==="escapeKey")&&(d.current=!0)}return o.on("dismiss",h),()=>{o.off("dismiss",h)}},[o,u]),P.useEffect(()=>()=>{clearTimeout(p.current)},[]),P.useMemo(()=>u?{reference:{onPointerDown(h){let{pointerType:m}=h;f.current=m,d.current=!!(m&&c)},onMouseLeave(){d.current=!1},onFocus(h){var m;d.current||h.type==="focus"&&((m=i.current.openEvent)==null?void 0:m.type)==="mousedown"&&i.current.openEvent&&ru(i.current.openEvent,s)||(i.current.openEvent=h.nativeEvent,r(!0))},onBlur(h){d.current=!1;const m=h.relatedTarget,E=$n(m)&&m.hasAttribute("data-floating-ui-focus-guard")&&m.getAttribute("data-type")==="outside";p.current=setTimeout(()=>{rh(l.floating.current,m)||rh(s,m)||E||r(!1)})}}}:{},[u,c,s,l,i,r])};function lS(e){return P.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const CO=function(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,l=tf();return P.useMemo(()=>{const a={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:a}:{reference:O(O({"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0},o==="listbox"&&{role:"combobox"}),o==="menu"&&{id:l}),floating:O(O({},a),o==="menu"&&{"aria-labelledby":l})}:{}},[i,o,n,r,l])};function _O(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,i=PI(e),o=qm(),l=P.useRef(null),a=P.useRef({}),s=P.useState(()=>ZI())[0],u=tf(),[c,f]=P.useState(null),d=P.useCallback(y=>{const w=$n(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;i.refs.setReference(w)},[i.refs]),p=P.useCallback(y=>{($n(y)||y===null)&&(l.current=y,f(y)),($n(i.refs.reference.current)||i.refs.reference.current===null||y!==null&&!$n(y))&&i.refs.setReference(y)},[i.refs]),h=P.useMemo(()=>W(O({},i.refs),{setReference:p,setPositionReference:d,domReference:l}),[i.refs,p,d]),m=P.useMemo(()=>W(O({},i.elements),{domReference:c}),[i.elements,c]),E=nu(n),g=P.useMemo(()=>W(O({},i),{refs:h,elements:m,dataRef:a,nodeId:r,floatingId:u,events:s,open:t,onOpenChange:E}),[i,r,u,s,t,E,h,m]);return Ji(()=>{const y=o==null?void 0:o.nodesRef.current.find(w=>w.id===r);y&&(y.context=g)}),P.useMemo(()=>W(O({},i),{context:g,refs:h,elements:m,reference:p,positionReference:d}),[i,h,m,g,p,d])}function wd(e,t,n){const r=new Map;return O(O(O({},n==="floating"&&{tabIndex:-1}),e),t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(l=>{let[a,s]=l;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof s=="function"){var u;(u=r.get(a))==null||u.push(s),i[a]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;ph(...d))}}}else i[a]=s}),i),{}))}const kO=function(e){e===void 0&&(e=[]);const t=e,n=P.useCallback(o=>wd(o,e,"reference"),t),r=P.useCallback(o=>wd(o,e,"floating"),t),i=P.useCallback(o=>wd(o,e,"item"),e.map(o=>o==null?void 0:o.item));return P.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])},_v=["http","https","mailto","tel"];function TO(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<_v.length;){const o=_v[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*! +*/var NI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],nh=NI.join(","),JE=typeof Element=="undefined",Ra=JE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zu=!JE&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ju=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",l=o||n&&t&&e(t.parentNode);return l},RI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},DI=function(t,n,r){if(ju(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(nh));return n&&Ra.call(t,nh)&&i.unshift(t),i=i.filter(r),i},LI=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var l=o.shift();if(!ju(l,!1))if(l.tagName==="SLOT"){var a=l.assignedElements(),s=a.length?a:l.children,u=e(s,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:l,candidates:u})}else{var c=Ra.call(l,nh);c&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var f=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),d=!ju(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(f&&d){var p=e(f===!0?l.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:l,candidates:p})}else o.unshift.apply(o,l.children)}}return i},QE=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||RI(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},FI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},KE=function(t){return t.tagName==="INPUT"},MI=function(t){return KE(t)&&t.type==="hidden"},BI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},UI=function(t,n){for(var r=0;rsummary:first-of-type"),l=o?t.parentElement:t;if(Ra.call(l,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var s=t.parentElement,u=zu(t);if(s&&!s.shadowRoot&&i(s)===!0)return wv(t);t.assignedSlot?t=t.assignedSlot:!s&&u!==t.ownerDocument?t=u.host:t=s}t=a}if(YI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return wv(t);return!1},$I=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},JI=function e(t){var n=[],r=[];return t.forEach(function(i,o){var l=!!i.scopeParent,a=l?i.scopeParent:i,s=QE(a,l),u=l?e(i.candidates):a;s===0?l?n.push.apply(n,u):n.push(a):r.push({documentOrder:o,tabIndex:s,item:i,isScope:l,content:u})}),r.sort(FI).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},qE=function(t,n){n=n||{};var r;return n.getShadowRoot?r=LI([t],n.includeContainer,{filter:bv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:GI}):r=DI(t,n.includeContainer,bv.bind(null,n)),JI(r)};function Wu(){return Wu=Object.assign||function(e){for(var t=1;t"floating-ui-"+QI++;function KI(){const[e,t]=O.useState(()=>md?Ev():void 0);return Ji(()=>{e==null&&t(Ev())},[]),O.useEffect(()=>{md||(md=!0)},[]),e}const qI=hw["useId".toString()],tf=qI||KI,XI=O.forwardRef(function(t,n){var r;let J=t,{context:{placement:i,elements:{floating:o},middlewareData:{arrow:l}},width:a=14,height:s=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:f,stroke:d,d:p}=J,h=ye(J,["context","width","height","tipRadius","strokeWidth","staticOffset","stroke","d"]);c*=2;const m=c/2,E=a/2*(u/-8+1),g=s/2*u/4,[y,w]=i.split("-"),S=o?GE.isRTL(o):!1,_=!!p,b=y==="top"||y==="bottom",A=f&&w==="end"?"bottom":"top";let T=f&&w==="end"?"right":"left";f&&S&&(T=w==="end"?"left":"right");const N=_?0:m,R=(l==null?void 0:l.x)!=null?f||l.x:"",I=(l==null?void 0:l.y)!=null?f||l.y+N:"",F=p||"M0,0"+(" H"+a)+(" L"+(a-E)+","+(s-g))+(" Q"+a/2+","+s+" "+E+","+(s-g))+" Z",L={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[y],j=tf();return O.createElement("svg",Wu({},h,{suppressHydrationWarning:!0,"aria-hidden":!0,ref:n,width:_?a:a+c,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:W(P({},h.style),{position:"absolute",pointerEvents:"none",[T]:R,[A]:I,[y]:b||_?"100%":"calc(100% - "+c/2+"px)",transform:""+L+((r=h.style)!=null&&r.transform?" "+h.style.transform:"")})}),c>0&&O.createElement("path",{clipPath:"url(#"+j+")",fill:"none",stroke:d,strokeWidth:c+(p?0:1),d:F}),O.createElement("path",{stroke:c&&!p?h.fill:"none",d:F}),O.createElement("clipPath",{id:j},O.createElement("rect",{x:-m,y:m*(_?-1:1),width:a+c,height:a})))});function ZI(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const eO=O.createContext(null),tO=O.createContext(null),XE=()=>{var e;return((e=O.useContext(eO))==null?void 0:e.id)||null},Km=()=>O.useContext(tO);function gr(e){return(e==null?void 0:e.ownerDocument)||document}function nO(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function rO(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function nf(e){return gr(e).defaultView||window}function $n(e){return e?e instanceof nf(e).Element:!1}function ZE(e){return e?e instanceof nf(e).HTMLElement:!1}function iO(e){if(typeof ShadowRoot=="undefined")return!1;const t=nf(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oO(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(nO())||t.test(rO()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function lO(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function aO(){return/apple/i.test(navigator.vendor)}function eS(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Sv(e){const t=O.useRef(e);return Ji(()=>{t.current=e}),t}const Av="data-floating-ui-safe-polygon";function gd(e,t,n){return n&&!eS(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}const sO=function(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:{domReference:l,floating:a},refs:s}=e,{enabled:u=!0,delay:c=0,handleClose:f=null,mouseOnly:d=!1,restMs:p=0,move:h=!0}=t,m=Km(),E=XE(),g=Sv(f),y=Sv(c),w=O.useRef(),S=O.useRef(),_=O.useRef(),b=O.useRef(),A=O.useRef(!0),T=O.useRef(!1),N=O.useRef(()=>{}),R=O.useCallback(()=>{var j;const J=(j=i.current.openEvent)==null?void 0:j.type;return(J==null?void 0:J.includes("mouse"))&&J!=="mousedown"},[i]);O.useEffect(()=>{if(!u)return;function j(){clearTimeout(S.current),clearTimeout(b.current),A.current=!0}return o.on("dismiss",j),()=>{o.off("dismiss",j)}},[u,o]),O.useEffect(()=>{if(!u||!g.current||!n)return;function j(){R()&&r(!1)}const J=gr(a).documentElement;return J.addEventListener("mouseleave",j),()=>{J.removeEventListener("mouseleave",j)}},[a,n,r,u,g,i,R]);const I=O.useCallback(function(j){j===void 0&&(j=!0);const J=gd(y.current,"close",w.current);J&&!_.current?(clearTimeout(S.current),S.current=setTimeout(()=>r(!1),J)):j&&(clearTimeout(S.current),r(!1))},[y,r]),F=O.useCallback(()=>{N.current(),_.current=void 0},[]),L=O.useCallback(()=>{if(T.current){const j=gr(s.floating.current).body;j.style.pointerEvents="",j.removeAttribute(Av),T.current=!1}},[s]);return O.useEffect(()=>{if(!u)return;function j(){return i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1}function J(D){if(clearTimeout(S.current),A.current=!1,d&&!eS(w.current)||p>0&&gd(y.current,"open")===0)return;i.current.openEvent=D;const $=gd(y.current,"open",w.current);$?S.current=setTimeout(()=>{r(!0)},$):r(!0)}function ee(D){if(j())return;N.current();const $=gr(a);if(clearTimeout(b.current),g.current){n||clearTimeout(S.current),_.current=g.current(W(P({},e),{tree:m,x:D.clientX,y:D.clientY,onClose(){L(),F(),I()}}));const Q=_.current;$.addEventListener("mousemove",Q),N.current=()=>{$.removeEventListener("mousemove",Q)};return}I()}function te(D){j()||g.current==null||g.current(W(P({},e),{tree:m,x:D.clientX,y:D.clientY,onClose(){L(),F(),I()}}))(D)}if($n(l)){const D=l;return n&&D.addEventListener("mouseleave",te),a==null||a.addEventListener("mouseleave",te),h&&D.addEventListener("mousemove",J,{once:!0}),D.addEventListener("mouseenter",J),D.addEventListener("mouseleave",ee),()=>{n&&D.removeEventListener("mouseleave",te),a==null||a.removeEventListener("mouseleave",te),h&&D.removeEventListener("mousemove",J),D.removeEventListener("mouseenter",J),D.removeEventListener("mouseleave",ee)}}},[l,a,u,e,d,p,h,I,F,L,r,n,m,y,g,i]),Ji(()=>{var j;if(u&&n&&(j=g.current)!=null&&j.__options.blockPointerEvents&&R()){const te=gr(a).body;if(te.setAttribute(Av,""),te.style.pointerEvents="none",T.current=!0,$n(l)&&a){var J,ee;const D=l,$=m==null||(J=m.nodesRef.current.find(Q=>Q.id===E))==null||(ee=J.context)==null?void 0:ee.elements.floating;return $&&($.style.pointerEvents=""),D.style.pointerEvents="auto",a.style.pointerEvents="auto",()=>{D.style.pointerEvents="",a.style.pointerEvents=""}}}},[u,n,E,a,l,m,g,i,R]),Ji(()=>{n||(w.current=void 0,F(),L())},[n,F,L]),O.useEffect(()=>()=>{F(),clearTimeout(S.current),clearTimeout(b.current),L()},[u,F,L]),O.useMemo(()=>{if(!u)return{};function j(J){w.current=J.pointerType}return{reference:{onPointerDown:j,onPointerEnter:j,onMouseMove(){n||p===0||(clearTimeout(b.current),b.current=setTimeout(()=>{A.current||r(!0)},p))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(){o.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),I(!1)}}}},[o,u,p,n,r,I])};function tS(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function rh(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&iO(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function yd(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)})||[],r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(l=>{var a;return i.parentId===l.id&&((a=i.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function uO(e){return"composedPath"in e?e.composedPath()[0]:e.target}const nS=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rS(e,t){const n=qE(e,nS());t==="prev"&&n.reverse();const r=n.indexOf(tS(gr(e)));return n.slice(r+1)[0]}function cO(){return rS(document.body,"next")}function fO(){return rS(document.body,"prev")}function vd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!rh(n,r)}function dO(e){qE(e,nS()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function pO(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const iS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let hO;function xv(e){e.key==="Tab"&&(e.target,clearTimeout(hO))}const Cv=O.forwardRef(function(t,n){const[r,i]=O.useState();return Ji(()=>(aO()&&i("button"),document.addEventListener("keydown",xv),()=>{document.removeEventListener("keydown",xv)}),[]),O.createElement("span",Wu({},t,{ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,"data-floating-ui-focus-guard":"",style:iS}))}),oS=O.createContext(null),mO=function(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=O.useState(null),o=tf(),l=yO();return Ji(()=>{const a=t?document.getElementById(t):null,s="data-floating-ui-portal";if(a){const u=document.createElement("div");return u.id=o,u.setAttribute(s,""),a.appendChild(u),i(u),()=>{u.remove()}}else{let u=(l==null?void 0:l.portalNode)||n||document.body,c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const f=document.createElement("div");return f.id=o,f.setAttribute(s,""),i(f),u=c||u,u.appendChild(f),()=>{var d;f.remove(),(d=c)==null||d.remove()}}},[t,n,l,o]),r},gO=e=>{let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=mO({id:n,root:r}),[l,a]=O.useState(null),s=O.useRef(null),u=O.useRef(null),c=O.useRef(null),f=O.useRef(null),d=!!l&&!l.modal&&!!(r||o)&&i;return O.useEffect(()=>{if(!o||!i||l!=null&&l.modal)return;function p(h){o&&vd(h)&&(h.type==="focusin"?pO:dO)(o)}return o.addEventListener("focusin",p,!0),o.addEventListener("focusout",p,!0),()=>{o.removeEventListener("focusin",p,!0),o.removeEventListener("focusout",p,!0)}},[o,i,l==null?void 0:l.modal]),O.createElement(oS.Provider,{value:O.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o])},d&&o&&O.createElement(Cv,{"data-type":"outside",ref:s,onFocus:p=>{if(vd(p,o)){var h;(h=c.current)==null||h.focus()}else{const m=fO()||(l==null?void 0:l.refs.domReference.current);m==null||m.focus()}}}),d&&o&&O.createElement("span",{"aria-owns":o.id,style:iS}),o&&br.createPortal(t,o),d&&o&&O.createElement(Cv,{"data-type":"outside",ref:u,onFocus:p=>{if(vd(p,o)){var h;(h=f.current)==null||h.focus()}else{const m=cO()||(l==null?void 0:l.refs.domReference.current);m==null||m.focus(),l!=null&&l.closeOnFocusOut&&(l==null||l.onOpenChange(!1))}}}))},yO=()=>O.useContext(oS),vO=hw["useInsertionEffect".toString()],wO=vO||(e=>e());function nu(e){const t=O.useRef(()=>{});return wO(()=>{t.current=e}),O.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}},AO=function(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:l,domReference:a,floating:s},dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:E=!1,bubbles:g}=t,y=Km(),w=XE()!=null,S=nu(typeof d=="function"?d:()=>!1),_=typeof d=="function"?S:d,b=O.useRef(!1),{escapeKeyBubbles:A,outsidePressBubbles:T}=SO(g),N=nu(I=>{if(!n||!c||!f||I.key!=="Escape")return;const F=y?yd(y.nodesRef.current,o):[];if(!A&&(I.stopPropagation(),F.length>0)){let L=!0;if(F.forEach(j=>{var J;if((J=j.context)!=null&&J.open&&!j.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}),R=nu(I=>{const F=b.current;if(b.current=!1,F||typeof _=="function"&&!_(I))return;const L=uO(I);if(ZE(L)&&s){const ee=L.clientWidth>0&&L.scrollWidth>L.clientWidth,te=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let D=te&&I.offsetX>L.clientWidth;if(te&&nf(s).getComputedStyle(L).direction==="rtl"&&(D=I.offsetX<=L.offsetWidth-L.clientWidth),D||ee&&I.offsetY>L.clientHeight)return}const j=y&&yd(y.nodesRef.current,o).some(ee=>{var te;return ru(I,(te=ee.context)==null?void 0:te.elements.floating)});if(ru(I,s)||ru(I,a)||j)return;const J=y?yd(y.nodesRef.current,o):[];if(J.length>0){let ee=!0;if(J.forEach(te=>{var D;if((D=te.context)!=null&&D.open&&!te.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:oO(I)||lO(I)}}),r(!1)});return O.useEffect(()=>{if(!n||!c)return;u.current.__escapeKeyBubbles=A,u.current.__outsidePressBubbles=T;function I(){r(!1)}const F=gr(s);f&&F.addEventListener("keydown",N),_&&F.addEventListener(p,R);let L=[];return E&&($n(a)&&(L=ii(a)),$n(s)&&(L=L.concat(ii(s))),!$n(l)&&l&&l.contextElement&&(L=L.concat(ii(l.contextElement)))),L=L.filter(j=>{var J;return j!==((J=F.defaultView)==null?void 0:J.visualViewport)}),L.forEach(j=>{j.addEventListener("scroll",I,{passive:!0})}),()=>{f&&F.removeEventListener("keydown",N),_&&F.removeEventListener(p,R),L.forEach(j=>{j.removeEventListener("scroll",I)})}},[u,s,a,l,f,_,p,n,r,E,c,A,T,N,R]),O.useEffect(()=>{b.current=!1},[_,p]),O.useMemo(()=>c?{reference:{onKeyDown:N,[bO[m]]:()=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{onKeyDown:N,[EO[p]]:()=>{b.current=!0}}}:{},[c,i,h,p,m,r,N])},xO=function(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,refs:l,elements:{floating:a,domReference:s}}=e,{enabled:u=!0,keyboardOnly:c=!0}=t,f=O.useRef(""),d=O.useRef(!1),p=O.useRef();return O.useEffect(()=>{if(!u)return;const m=gr(a).defaultView||window;function E(){!n&&ZE(s)&&s===tS(gr(s))&&(d.current=!0)}return m.addEventListener("blur",E),()=>{m.removeEventListener("blur",E)}},[a,s,n,u]),O.useEffect(()=>{if(!u)return;function h(m){(m.type==="referencePress"||m.type==="escapeKey")&&(d.current=!0)}return o.on("dismiss",h),()=>{o.off("dismiss",h)}},[o,u]),O.useEffect(()=>()=>{clearTimeout(p.current)},[]),O.useMemo(()=>u?{reference:{onPointerDown(h){let{pointerType:m}=h;f.current=m,d.current=!!(m&&c)},onMouseLeave(){d.current=!1},onFocus(h){var m;d.current||h.type==="focus"&&((m=i.current.openEvent)==null?void 0:m.type)==="mousedown"&&i.current.openEvent&&ru(i.current.openEvent,s)||(i.current.openEvent=h.nativeEvent,r(!0))},onBlur(h){d.current=!1;const m=h.relatedTarget,E=$n(m)&&m.hasAttribute("data-floating-ui-focus-guard")&&m.getAttribute("data-type")==="outside";p.current=setTimeout(()=>{rh(l.floating.current,m)||rh(s,m)||E||r(!1)})}}}:{},[u,c,s,l,i,r])};function lS(e){return O.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const CO=function(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,l=tf();return O.useMemo(()=>{const a={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:a}:{reference:P(P({"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0},o==="listbox"&&{role:"combobox"}),o==="menu"&&{id:l}),floating:P(P({},a),o==="menu"&&{"aria-labelledby":l})}:{}},[i,o,n,r,l])};function _O(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,i=PI(e),o=Km(),l=O.useRef(null),a=O.useRef({}),s=O.useState(()=>ZI())[0],u=tf(),[c,f]=O.useState(null),d=O.useCallback(y=>{const w=$n(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;i.refs.setReference(w)},[i.refs]),p=O.useCallback(y=>{($n(y)||y===null)&&(l.current=y,f(y)),($n(i.refs.reference.current)||i.refs.reference.current===null||y!==null&&!$n(y))&&i.refs.setReference(y)},[i.refs]),h=O.useMemo(()=>W(P({},i.refs),{setReference:p,setPositionReference:d,domReference:l}),[i.refs,p,d]),m=O.useMemo(()=>W(P({},i.elements),{domReference:c}),[i.elements,c]),E=nu(n),g=O.useMemo(()=>W(P({},i),{refs:h,elements:m,dataRef:a,nodeId:r,floatingId:u,events:s,open:t,onOpenChange:E}),[i,r,u,s,t,E,h,m]);return Ji(()=>{const y=o==null?void 0:o.nodesRef.current.find(w=>w.id===r);y&&(y.context=g)}),O.useMemo(()=>W(P({},i),{context:g,refs:h,elements:m,reference:p,positionReference:d}),[i,h,m,g,p,d])}function wd(e,t,n){const r=new Map;return P(P(P({},n==="floating"&&{tabIndex:-1}),e),t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(l=>{let[a,s]=l;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof s=="function"){var u;(u=r.get(a))==null||u.push(s),i[a]=function(){for(var c,f=arguments.length,d=new Array(f),p=0;ph(...d))}}}else i[a]=s}),i),{}))}const kO=function(e){e===void 0&&(e=[]);const t=e,n=O.useCallback(o=>wd(o,e,"reference"),t),r=O.useCallback(o=>wd(o,e,"floating"),t),i=O.useCallback(o=>wd(o,e,"item"),e.map(o=>o==null?void 0:o.item));return O.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])},_v=["http","https","mailto","tel"];function TO(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<_v.length;){const o=_v[i];if(r===o.length&&t.slice(0,o.length).toLowerCase()===o)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT - */var aS=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};function oa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?kv(e.position):"start"in e||"end"in e?kv(e):"line"in e||"column"in e?ih(e):""}function ih(e){return Tv(e&&e.line)+":"+Tv(e&&e.column)}function kv(e){return ih(e&&e.start)+"-"+ih(e&&e.end)}function Tv(e){return e&&typeof e=="number"?e:1}class yn extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const l=r.indexOf(":");l===-1?i[1]=r:(i[0]=r.slice(0,l),i[1]=r.slice(l+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=oa(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}yn.prototype.file="";yn.prototype.name="";yn.prototype.reason="";yn.prototype.message="";yn.prototype.stack="";yn.prototype.fatal=null;yn.prototype.column=null;yn.prototype.line=null;yn.prototype.source=null;yn.prototype.ruleId=null;yn.prototype.position=null;const Un={basename:IO,dirname:OO,extname:PO,join:NO,sep:"/"};function IO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xa(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.charCodeAt(i)===t.charCodeAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function OO(e){if(Xa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function PO(e){Xa(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function NO(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function DO(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const LO={cwd:FO};function FO(){return"/"}function oh(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function MO(e){if(typeof e=="string")e=new URL(e);else if(!oh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return BO(e)}function BO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++nl.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(s instanceof Promise?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const WO=fS().freeze(),cS={}.hasOwnProperty;function fS(){const e=zO(),t=[];let n={},r,i=-1;return o.data=l,o.Parser=void 0,o.Compiler=void 0,o.freeze=a,o.attachers=t,o.use=s,o.parse=u,o.stringify=c,o.run=f,o.runSync=d,o.process=p,o.processSync=h,o;function o(){const m=fS();let E=-1;for(;++E{if(b||!A||!T)_(b);else{const N=o.stringify(A,T);N==null||($O(N)?T.value=N:T.result=N),_(b,T)}});function _(b,A){b||!A?w(b):y?y(A):E(null,A)}}}function h(m){let E;o.freeze(),Ad("processSync",o.Parser),xd("processSync",o.Compiler);const g=_l(m);return o.process(g,y),zv("processSync","process",E),g;function y(w){E=!0,Ov(w)}}}function Bv(e,t){return typeof e=="function"&&e.prototype&&(YO(e.prototype)||t in e.prototype)}function YO(e){let t;for(t in e)if(cS.call(e,t))return!0;return!1}function Ad(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Cd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uv(e){if(!lh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _l(e){return VO(e)?e:new sS(e)}function VO(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $O(e){return typeof e=="string"||aS(e)}function HO(e,t){const n=(t||{}).includeImageAlt;return dS(e,typeof n=="boolean"?n:!0)}function dS(e,t){return GO(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&jv(e.children,t))||Array.isArray(e)&&jv(e,t)||""}function jv(e,t){const n=[];let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),[].splice.apply(e,l);else for(n&&[].splice.apply(e,[t,n]);o0?(Zn(e,e.length,0,t),e):t}const Wv={}.hasOwnProperty;function JO(e){const t={};let n=-1;for(;++nl))return;const A=t.events.length;let T=A,N,R;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(N){R=t.events[T][1].end;break}N=!0}for(g(r),b=A;bw;){const _=n[S];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function l4(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $v(e){if(e===null||dn(e)||e4(e))return 1;if(t4(e))return 2}function Xm(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Hv(f,-s),Hv(d,s),l={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=an(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=an(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=an(u,Xm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=an(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=an(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Zn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n=4?l(u):n(u)}function l(u){return u===null?s(u):oe(u)?e.attempt(v4,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||oe(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function b4(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):oe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):_e(e,o,"linePrefix",4+1)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):oe(l)?i(l):n(l)}}const E4={name:"codeText",tokenize:x4,resolve:S4,previous:A4};function S4(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function yS(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===41||sh(g)?n(g):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),d(g)):g===null||g===60||oe(g)?n(g):(e.consume(g),g===92?h:p)}function h(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function m(g){return g===40?++c>u?n(g):(e.consume(g),m):g===41?c--?(e.consume(g),m):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):g===null||dn(g)?c?n(g):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):sh(g)?n(g):(e.consume(g),g===92?E:m)}function E(g){return g===40||g===41||g===92?(e.consume(g),m):m(g)}}function vS(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs||a>999?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):oe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||oe(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s=s||!Ze(p),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function wS(e,t,n,r,i,o){let l;return a;function a(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,s}function s(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),s(l)):d===null?n(d):oe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),_e(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||oe(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===l||d===92?(e.consume(d),c):c(d)}}function la(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ze(i)?_e(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Do(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const P4={name:"definition",tokenize:R4},N4={tokenize:D4,partial:!0};function R4(e,t,n){const r=this;let i;return o;function o(s){return e.enter("definition"),vS.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(s)}function l(s){return i=Do(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),s===58?(e.enter("definitionMarker"),e.consume(s),e.exit("definitionMarker"),la(e,yS(e,e.attempt(N4,_e(e,a,"whitespace"),_e(e,a,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(s)}function a(s){return s===null||oe(s)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(s)):n(s)}}function D4(e,t,n){return r;function r(l){return dn(l)?la(e,i)(l):n(l)}function i(l){return l===34||l===39||l===40?wS(e,_e(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l):n(l)}function o(l){return l===null||oe(l)?t(l):n(l)}}const L4={name:"hardBreakEscape",tokenize:F4};function F4(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(o),i}function i(o){return oe(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}const M4={name:"headingAtx",tokenize:U4,resolve:B4};function B4(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Zn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function U4(e,t,n){const r=this;let i=0;return o;function o(c){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&i++<6?(e.consume(c),l):c===null||dn(c)?(e.exit("atxHeadingSequence"),r.interrupt?t(c):a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||oe(c)?(e.exit("atxHeading"),t(c)):Ze(c)?_e(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||dn(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const z4=["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","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qv=["pre","script","style","textarea"],j4={name:"htmlFlow",tokenize:V4,resolveTo:Y4,concrete:!0},W4={tokenize:$4,partial:!0};function Y4(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function V4(e,t,n){const r=this;let i,o,l,a,s;return u;function u(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),f):x===47?(e.consume(x),h):x===63?(e.consume(x),i=3,r.interrupt?t:$):Wn(x)?(e.consume(x),l=String.fromCharCode(x),o=!0,m):n(x)}function f(x){return x===45?(e.consume(x),i=2,d):x===91?(e.consume(x),i=5,l="CDATA[",a=0,p):Wn(x)?(e.consume(x),i=4,r.interrupt?t:$):n(x)}function d(x){return x===45?(e.consume(x),r.interrupt?t:$):n(x)}function p(x){return x===l.charCodeAt(a++)?(e.consume(x),a===l.length?r.interrupt?t:I:p):n(x)}function h(x){return Wn(x)?(e.consume(x),l=String.fromCharCode(x),m):n(x)}function m(x){return x===null||x===47||x===62||dn(x)?x!==47&&o&&Qv.includes(l.toLowerCase())?(i=1,r.interrupt?t(x):I(x)):z4.includes(l.toLowerCase())?(i=6,x===47?(e.consume(x),E):r.interrupt?t(x):I(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?y(x):g(x)):x===45||Qt(x)?(e.consume(x),l+=String.fromCharCode(x),m):n(x)}function E(x){return x===62?(e.consume(x),r.interrupt?t:I):n(x)}function g(x){return Ze(x)?(e.consume(x),g):N(x)}function y(x){return x===47?(e.consume(x),N):x===58||x===95||Wn(x)?(e.consume(x),w):Ze(x)?(e.consume(x),y):N(x)}function w(x){return x===45||x===46||x===58||x===95||Qt(x)?(e.consume(x),w):S(x)}function S(x){return x===61?(e.consume(x),_):Ze(x)?(e.consume(x),S):y(x)}function _(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),s=x,b):Ze(x)?(e.consume(x),_):(s=null,A(x))}function b(x){return x===null||oe(x)?n(x):x===s?(e.consume(x),T):(e.consume(x),b)}function A(x){return x===null||x===34||x===39||x===60||x===61||x===62||x===96||dn(x)?S(x):(e.consume(x),A)}function T(x){return x===47||x===62||Ze(x)?y(x):n(x)}function N(x){return x===62?(e.consume(x),R):n(x)}function R(x){return Ze(x)?(e.consume(x),R):x===null||oe(x)?I(x):n(x)}function I(x){return x===45&&i===2?(e.consume(x),J):x===60&&i===1?(e.consume(x),ee):x===62&&i===4?(e.consume(x),Q):x===63&&i===3?(e.consume(x),$):x===93&&i===5?(e.consume(x),D):oe(x)&&(i===6||i===7)?e.check(W4,Q,F)(x):x===null||oe(x)?F(x):(e.consume(x),I)}function F(x){return e.exit("htmlFlowData"),L(x)}function L(x){return x===null?C(x):oe(x)?e.attempt({tokenize:j,partial:!0},L,C)(x):(e.enter("htmlFlowData"),I(x))}function j(x,at,pt){return Ut;function Ut(st){return x.enter("lineEnding"),x.consume(st),x.exit("lineEnding"),Se}function Se(st){return r.parser.lazy[r.now().line]?pt(st):at(st)}}function J(x){return x===45?(e.consume(x),$):I(x)}function ee(x){return x===47?(e.consume(x),l="",te):I(x)}function te(x){return x===62&&Qv.includes(l.toLowerCase())?(e.consume(x),Q):Wn(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),te):I(x)}function D(x){return x===93?(e.consume(x),$):I(x)}function $(x){return x===62?(e.consume(x),Q):x===45&&i===2?(e.consume(x),$):I(x)}function Q(x){return x===null||oe(x)?(e.exit("htmlFlowData"),C(x)):(e.consume(x),Q)}function C(x){return e.exit("htmlFlow"),t(x)}}function $4(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(rf,t,n)}}const H4={name:"htmlText",tokenize:G4};function G4(e,t,n){const r=this;let i,o,l,a;return s;function s(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),u}function u(C){return C===33?(e.consume(C),c):C===47?(e.consume(C),A):C===63?(e.consume(C),_):Wn(C)?(e.consume(C),R):n(C)}function c(C){return C===45?(e.consume(C),f):C===91?(e.consume(C),o="CDATA[",l=0,E):Wn(C)?(e.consume(C),S):n(C)}function f(C){return C===45?(e.consume(C),d):n(C)}function d(C){return C===null||C===62?n(C):C===45?(e.consume(C),p):h(C)}function p(C){return C===null||C===62?n(C):h(C)}function h(C){return C===null?n(C):C===45?(e.consume(C),m):oe(C)?(a=h,D(C)):(e.consume(C),h)}function m(C){return C===45?(e.consume(C),Q):h(C)}function E(C){return C===o.charCodeAt(l++)?(e.consume(C),l===o.length?g:E):n(C)}function g(C){return C===null?n(C):C===93?(e.consume(C),y):oe(C)?(a=g,D(C)):(e.consume(C),g)}function y(C){return C===93?(e.consume(C),w):g(C)}function w(C){return C===62?Q(C):C===93?(e.consume(C),w):g(C)}function S(C){return C===null||C===62?Q(C):oe(C)?(a=S,D(C)):(e.consume(C),S)}function _(C){return C===null?n(C):C===63?(e.consume(C),b):oe(C)?(a=_,D(C)):(e.consume(C),_)}function b(C){return C===62?Q(C):_(C)}function A(C){return Wn(C)?(e.consume(C),T):n(C)}function T(C){return C===45||Qt(C)?(e.consume(C),T):N(C)}function N(C){return oe(C)?(a=N,D(C)):Ze(C)?(e.consume(C),N):Q(C)}function R(C){return C===45||Qt(C)?(e.consume(C),R):C===47||C===62||dn(C)?I(C):n(C)}function I(C){return C===47?(e.consume(C),Q):C===58||C===95||Wn(C)?(e.consume(C),F):oe(C)?(a=I,D(C)):Ze(C)?(e.consume(C),I):Q(C)}function F(C){return C===45||C===46||C===58||C===95||Qt(C)?(e.consume(C),F):L(C)}function L(C){return C===61?(e.consume(C),j):oe(C)?(a=L,D(C)):Ze(C)?(e.consume(C),L):I(C)}function j(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,J):oe(C)?(a=j,D(C)):Ze(C)?(e.consume(C),j):(e.consume(C),i=void 0,te)}function J(C){return C===i?(e.consume(C),ee):C===null?n(C):oe(C)?(a=J,D(C)):(e.consume(C),J)}function ee(C){return C===62||C===47||dn(C)?I(C):n(C)}function te(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===62||dn(C)?I(C):(e.consume(C),te)}function D(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),_e(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $(C){return e.enter("htmlTextData"),a(C)}function Q(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}}const eg={name:"labelEnd",tokenize:Z4,resolveTo:X4,resolveAll:q4},J4={tokenize:eP},Q4={tokenize:tP},K4={tokenize:nP};function q4(e){let t=-1,n;for(;++t-1&&(l[0]=l[0].slice(r)),o>0&&l.push(e[i].slice(0,o))),l}function _P(e,t){let n=-1;const r=[];let i;for(;++ne.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.charCodeAt(i)===t.charCodeAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function OO(e){if(Xa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function PO(e){Xa(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function NO(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function DO(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function Xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const LO={cwd:FO};function FO(){return"/"}function oh(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function MO(e){if(typeof e=="string")e=new URL(e);else if(!oh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return BO(e)}function BO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++nl.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(s instanceof Promise?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const WO=fS().freeze(),cS={}.hasOwnProperty;function fS(){const e=zO(),t=[];let n={},r,i=-1;return o.data=l,o.Parser=void 0,o.Compiler=void 0,o.freeze=a,o.attachers=t,o.use=s,o.parse=u,o.stringify=c,o.run=f,o.runSync=d,o.process=p,o.processSync=h,o;function o(){const m=fS();let E=-1;for(;++E{if(b||!A||!T)_(b);else{const N=o.stringify(A,T);N==null||($O(N)?T.value=N:T.result=N),_(b,T)}});function _(b,A){b||!A?w(b):y?y(A):E(null,A)}}}function h(m){let E;o.freeze(),Ad("processSync",o.Parser),xd("processSync",o.Compiler);const g=_l(m);return o.process(g,y),zv("processSync","process",E),g;function y(w){E=!0,Ov(w)}}}function Bv(e,t){return typeof e=="function"&&e.prototype&&(YO(e.prototype)||t in e.prototype)}function YO(e){let t;for(t in e)if(cS.call(e,t))return!0;return!1}function Ad(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Cd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uv(e){if(!lh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _l(e){return VO(e)?e:new sS(e)}function VO(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $O(e){return typeof e=="string"||aS(e)}function HO(e,t){const n=(t||{}).includeImageAlt;return dS(e,typeof n=="boolean"?n:!0)}function dS(e,t){return GO(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&jv(e.children,t))||Array.isArray(e)&&jv(e,t)||""}function jv(e,t){const n=[];let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),[].splice.apply(e,l);else for(n&&[].splice.apply(e,[t,n]);o0?(Zn(e,e.length,0,t),e):t}const Wv={}.hasOwnProperty;function JO(e){const t={};let n=-1;for(;++nl))return;const A=t.events.length;let T=A,N,R;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(N){R=t.events[T][1].end;break}N=!0}for(g(r),b=A;bw;){const _=n[S];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function l4(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $v(e){if(e===null||dn(e)||e4(e))return 1;if(t4(e))return 2}function qm(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Hv(f,-s),Hv(d,s),l={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=an(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=an(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=an(u,qm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=an(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=an(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Zn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n=4?l(u):n(u)}function l(u){return u===null?s(u):oe(u)?e.attempt(v4,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||oe(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function b4(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):oe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):_e(e,o,"linePrefix",4+1)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):oe(l)?i(l):n(l)}}const E4={name:"codeText",tokenize:x4,resolve:S4,previous:A4};function S4(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function yS(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===41||sh(g)?n(g):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(a),d(g)):g===null||g===60||oe(g)?n(g):(e.consume(g),g===92?h:p)}function h(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function m(g){return g===40?++c>u?n(g):(e.consume(g),m):g===41?c--?(e.consume(g),m):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):g===null||dn(g)?c?n(g):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):sh(g)?n(g):(e.consume(g),g===92?E:m)}function E(g){return g===40||g===41||g===92?(e.consume(g),m):m(g)}}function vS(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs||a>999?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):oe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||oe(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s=s||!Ze(p),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function wS(e,t,n,r,i,o){let l;return a;function a(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,s}function s(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),s(l)):d===null?n(d):oe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),_e(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||oe(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===l||d===92?(e.consume(d),c):c(d)}}function la(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ze(i)?_e(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Do(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const P4={name:"definition",tokenize:R4},N4={tokenize:D4,partial:!0};function R4(e,t,n){const r=this;let i;return o;function o(s){return e.enter("definition"),vS.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(s)}function l(s){return i=Do(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),s===58?(e.enter("definitionMarker"),e.consume(s),e.exit("definitionMarker"),la(e,yS(e,e.attempt(N4,_e(e,a,"whitespace"),_e(e,a,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(s)}function a(s){return s===null||oe(s)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(s)):n(s)}}function D4(e,t,n){return r;function r(l){return dn(l)?la(e,i)(l):n(l)}function i(l){return l===34||l===39||l===40?wS(e,_e(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l):n(l)}function o(l){return l===null||oe(l)?t(l):n(l)}}const L4={name:"hardBreakEscape",tokenize:F4};function F4(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(o),i}function i(o){return oe(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}const M4={name:"headingAtx",tokenize:U4,resolve:B4};function B4(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Zn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function U4(e,t,n){const r=this;let i=0;return o;function o(c){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&i++<6?(e.consume(c),l):c===null||dn(c)?(e.exit("atxHeadingSequence"),r.interrupt?t(c):a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||oe(c)?(e.exit("atxHeading"),t(c)):Ze(c)?_e(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||dn(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const z4=["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","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qv=["pre","script","style","textarea"],j4={name:"htmlFlow",tokenize:V4,resolveTo:Y4,concrete:!0},W4={tokenize:$4,partial:!0};function Y4(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function V4(e,t,n){const r=this;let i,o,l,a,s;return u;function u(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),f):x===47?(e.consume(x),h):x===63?(e.consume(x),i=3,r.interrupt?t:$):Wn(x)?(e.consume(x),l=String.fromCharCode(x),o=!0,m):n(x)}function f(x){return x===45?(e.consume(x),i=2,d):x===91?(e.consume(x),i=5,l="CDATA[",a=0,p):Wn(x)?(e.consume(x),i=4,r.interrupt?t:$):n(x)}function d(x){return x===45?(e.consume(x),r.interrupt?t:$):n(x)}function p(x){return x===l.charCodeAt(a++)?(e.consume(x),a===l.length?r.interrupt?t:I:p):n(x)}function h(x){return Wn(x)?(e.consume(x),l=String.fromCharCode(x),m):n(x)}function m(x){return x===null||x===47||x===62||dn(x)?x!==47&&o&&Qv.includes(l.toLowerCase())?(i=1,r.interrupt?t(x):I(x)):z4.includes(l.toLowerCase())?(i=6,x===47?(e.consume(x),E):r.interrupt?t(x):I(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?y(x):g(x)):x===45||Qt(x)?(e.consume(x),l+=String.fromCharCode(x),m):n(x)}function E(x){return x===62?(e.consume(x),r.interrupt?t:I):n(x)}function g(x){return Ze(x)?(e.consume(x),g):N(x)}function y(x){return x===47?(e.consume(x),N):x===58||x===95||Wn(x)?(e.consume(x),w):Ze(x)?(e.consume(x),y):N(x)}function w(x){return x===45||x===46||x===58||x===95||Qt(x)?(e.consume(x),w):S(x)}function S(x){return x===61?(e.consume(x),_):Ze(x)?(e.consume(x),S):y(x)}function _(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),s=x,b):Ze(x)?(e.consume(x),_):(s=null,A(x))}function b(x){return x===null||oe(x)?n(x):x===s?(e.consume(x),T):(e.consume(x),b)}function A(x){return x===null||x===34||x===39||x===60||x===61||x===62||x===96||dn(x)?S(x):(e.consume(x),A)}function T(x){return x===47||x===62||Ze(x)?y(x):n(x)}function N(x){return x===62?(e.consume(x),R):n(x)}function R(x){return Ze(x)?(e.consume(x),R):x===null||oe(x)?I(x):n(x)}function I(x){return x===45&&i===2?(e.consume(x),J):x===60&&i===1?(e.consume(x),ee):x===62&&i===4?(e.consume(x),Q):x===63&&i===3?(e.consume(x),$):x===93&&i===5?(e.consume(x),D):oe(x)&&(i===6||i===7)?e.check(W4,Q,F)(x):x===null||oe(x)?F(x):(e.consume(x),I)}function F(x){return e.exit("htmlFlowData"),L(x)}function L(x){return x===null?C(x):oe(x)?e.attempt({tokenize:j,partial:!0},L,C)(x):(e.enter("htmlFlowData"),I(x))}function j(x,at,pt){return Ut;function Ut(st){return x.enter("lineEnding"),x.consume(st),x.exit("lineEnding"),Se}function Se(st){return r.parser.lazy[r.now().line]?pt(st):at(st)}}function J(x){return x===45?(e.consume(x),$):I(x)}function ee(x){return x===47?(e.consume(x),l="",te):I(x)}function te(x){return x===62&&Qv.includes(l.toLowerCase())?(e.consume(x),Q):Wn(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),te):I(x)}function D(x){return x===93?(e.consume(x),$):I(x)}function $(x){return x===62?(e.consume(x),Q):x===45&&i===2?(e.consume(x),$):I(x)}function Q(x){return x===null||oe(x)?(e.exit("htmlFlowData"),C(x)):(e.consume(x),Q)}function C(x){return e.exit("htmlFlow"),t(x)}}function $4(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(rf,t,n)}}const H4={name:"htmlText",tokenize:G4};function G4(e,t,n){const r=this;let i,o,l,a;return s;function s(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),u}function u(C){return C===33?(e.consume(C),c):C===47?(e.consume(C),A):C===63?(e.consume(C),_):Wn(C)?(e.consume(C),R):n(C)}function c(C){return C===45?(e.consume(C),f):C===91?(e.consume(C),o="CDATA[",l=0,E):Wn(C)?(e.consume(C),S):n(C)}function f(C){return C===45?(e.consume(C),d):n(C)}function d(C){return C===null||C===62?n(C):C===45?(e.consume(C),p):h(C)}function p(C){return C===null||C===62?n(C):h(C)}function h(C){return C===null?n(C):C===45?(e.consume(C),m):oe(C)?(a=h,D(C)):(e.consume(C),h)}function m(C){return C===45?(e.consume(C),Q):h(C)}function E(C){return C===o.charCodeAt(l++)?(e.consume(C),l===o.length?g:E):n(C)}function g(C){return C===null?n(C):C===93?(e.consume(C),y):oe(C)?(a=g,D(C)):(e.consume(C),g)}function y(C){return C===93?(e.consume(C),w):g(C)}function w(C){return C===62?Q(C):C===93?(e.consume(C),w):g(C)}function S(C){return C===null||C===62?Q(C):oe(C)?(a=S,D(C)):(e.consume(C),S)}function _(C){return C===null?n(C):C===63?(e.consume(C),b):oe(C)?(a=_,D(C)):(e.consume(C),_)}function b(C){return C===62?Q(C):_(C)}function A(C){return Wn(C)?(e.consume(C),T):n(C)}function T(C){return C===45||Qt(C)?(e.consume(C),T):N(C)}function N(C){return oe(C)?(a=N,D(C)):Ze(C)?(e.consume(C),N):Q(C)}function R(C){return C===45||Qt(C)?(e.consume(C),R):C===47||C===62||dn(C)?I(C):n(C)}function I(C){return C===47?(e.consume(C),Q):C===58||C===95||Wn(C)?(e.consume(C),F):oe(C)?(a=I,D(C)):Ze(C)?(e.consume(C),I):Q(C)}function F(C){return C===45||C===46||C===58||C===95||Qt(C)?(e.consume(C),F):L(C)}function L(C){return C===61?(e.consume(C),j):oe(C)?(a=L,D(C)):Ze(C)?(e.consume(C),L):I(C)}function j(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),i=C,J):oe(C)?(a=j,D(C)):Ze(C)?(e.consume(C),j):(e.consume(C),i=void 0,te)}function J(C){return C===i?(e.consume(C),ee):C===null?n(C):oe(C)?(a=J,D(C)):(e.consume(C),J)}function ee(C){return C===62||C===47||dn(C)?I(C):n(C)}function te(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===62||dn(C)?I(C):(e.consume(C),te)}function D(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),_e(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $(C){return e.enter("htmlTextData"),a(C)}function Q(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}}const Zm={name:"labelEnd",tokenize:Z4,resolveTo:X4,resolveAll:q4},J4={tokenize:eP},Q4={tokenize:tP},K4={tokenize:nP};function q4(e){let t=-1,n;for(;++t-1&&(l[0]=l[0].slice(r)),o>0&&l.push(e[i].slice(0,o))),l}function _P(e,t){let n=-1;const r=[];let i;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const zP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jP(e){return e.replace(zP,WP)}function WP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return SS(n.slice(o?2:1),o?16:10)}return Zm(n)||e}const AS={}.hasOwnProperty,YP=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),VP(n)(UP(MP(n).document().write(BP()(e,t,!0))))};function VP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Jg),autolinkProtocol:I,autolinkEmail:I,atxHeading:a($g),blockQuote:a(Df),characterEscape:I,characterReference:I,codeFenced:a(Vg),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Vg,s),codeText:a(XC,s),codeTextData:I,data:I,codeFlowValue:I,definition:a(ZC),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(e_),hardBreakEscape:a(Hg),hardBreakTrailing:a(Hg),htmlFlow:a(Gg,s),htmlFlowData:I,htmlText:a(Gg,s),htmlTextData:I,image:a(t_),label:s,link:a(Jg),listItem:a(n_),listItemValue:h,listOrdered:a(Qg,p),listUnordered:a(Qg),paragraph:a(r_),reference:Ut,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a($g),strong:a(i_),thematicBreak:a(l_)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ir,autolinkProtocol:Si,blockQuote:c(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:rr,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:E,codeFlowValue:F,codeIndented:c(w),codeText:c(te),codeTextData:F,data:F,definition:c(),definitionDestinationString:b,definitionLabelString:S,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(J),htmlFlowData:F,htmlText:c(ee),htmlTextData:F,image:c($),label:C,labelText:Q,lineEnding:L,link:c(D),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Se,resourceDestinationString:x,resourceTitleString:at,resource:pt,setextHeading:c(R),setextHeadingLineSequence:N,setextHeadingText:T,strong:c(),thematicBreak:c()}};xS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let H={type:"root",children:[]};const ie={stack:[H],tokenStack:[],config:t,enter:u,exit:f,buffer:s,resume:d,setData:o,getData:l},Ae=[];let Ce=-1;for(;++Ce0){const bn=ie.tokenStack[ie.tokenStack.length-1];(bn[1]||Xv).call(ie,void 0,bn[0])}for(H.position={start:Lr(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Lr(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce{const r=this.data("settings");return YP(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function GP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function JP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` +`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}const kP={[42]:Nt,[43]:Nt,[45]:Nt,[48]:Nt,[49]:Nt,[50]:Nt,[51]:Nt,[52]:Nt,[53]:Nt,[54]:Nt,[55]:Nt,[56]:Nt,[57]:Nt,[62]:pS},TP={[91]:P4},IP={[-2]:_d,[-1]:_d,[32]:_d},OP={[35]:M4,[42]:ou,[45]:[Kv,ou],[60]:j4,[61]:Kv,[95]:ou,[96]:Jv,[126]:Jv},PP={[38]:mS,[92]:hS},NP={[-5]:kd,[-4]:kd,[-3]:kd,[33]:rP,[38]:mS,[42]:uh,[60]:[u4,H4],[91]:oP,[92]:[L4,hS],[93]:Zm,[95]:uh,[96]:E4},RP={null:[uh,bP]},DP={null:[42,95]},LP={null:[]},FP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:DP,contentInitial:TP,disable:LP,document:kP,flow:OP,flowInitial:IP,insideSpan:RP,string:PP,text:NP},Symbol.toStringTag,{value:"Module"}));function MP(e={}){const t=JO([FP].concat(e.extensions||[])),n={defined:[],lazy:{},constructs:t,content:r(n4),document:r(i4),flow:r(vP),string:r(EP),text:r(SP)};return n;function r(i){return o;function o(l){return xP(n,i,l)}}}const qv=/[\0\t\n\r]/g;function BP(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,c,f,d,p;for(o=t+o.toString(l),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const zP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jP(e){return e.replace(zP,WP)}function WP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return SS(n.slice(o?2:1),o?16:10)}return Xm(n)||e}const AS={}.hasOwnProperty,YP=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),VP(n)(UP(MP(n).document().write(BP()(e,t,!0))))};function VP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Jg),autolinkProtocol:I,autolinkEmail:I,atxHeading:a($g),blockQuote:a(Df),characterEscape:I,characterReference:I,codeFenced:a(Vg),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Vg,s),codeText:a(XC,s),codeTextData:I,data:I,codeFlowValue:I,definition:a(ZC),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(e_),hardBreakEscape:a(Hg),hardBreakTrailing:a(Hg),htmlFlow:a(Gg,s),htmlFlowData:I,htmlText:a(Gg,s),htmlTextData:I,image:a(t_),label:s,link:a(Jg),listItem:a(n_),listItemValue:h,listOrdered:a(Qg,p),listUnordered:a(Qg),paragraph:a(r_),reference:Ut,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a($g),strong:a(i_),thematicBreak:a(l_)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ir,autolinkProtocol:Si,blockQuote:c(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:rr,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:E,codeFlowValue:F,codeIndented:c(w),codeText:c(te),codeTextData:F,data:F,definition:c(),definitionDestinationString:b,definitionLabelString:S,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(J),htmlFlowData:F,htmlText:c(ee),htmlTextData:F,image:c($),label:C,labelText:Q,lineEnding:L,link:c(D),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Se,resourceDestinationString:x,resourceTitleString:at,resource:pt,setextHeading:c(R),setextHeadingLineSequence:N,setextHeadingText:T,strong:c(),thematicBreak:c()}};xS(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let H={type:"root",children:[]};const ie={stack:[H],tokenStack:[],config:t,enter:u,exit:f,buffer:s,resume:d,setData:o,getData:l},Ae=[];let Ce=-1;for(;++Ce0){const bn=ie.tokenStack[ie.tokenStack.length-1];(bn[1]||Xv).call(ie,void 0,bn[0])}for(H.position={start:Lr(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Lr(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce{const r=this.data("settings");return YP(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function GP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function JP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` `}]}function QP(e,t){const n=t.value?t.value+` `:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function KP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ll(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function CS(e,t){const n=String(t.identifier).toUpperCase(),r=ll(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const l=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,a);const s={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)}function XP(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},CS(e,{type:"footnoteReference",identifier:i,position:t.position})}function ZP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eN(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function _S(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function tN(e,t){const n=e.definition(t.identifier);if(!n)return _S(e,t);const r={src:ll(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function nN(e,t){const n={src:ll(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function iN(e,t){const n=e.definition(t.identifier);if(!n)return _S(e,t);const r={href:ll(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function oN(e,t){const n={href:ll(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lN(e,t,n){const r=e.all(t),i=n?aN(n):kS(t),o={},l=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1:t}function sN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i-1?r.offset:null}}}function pN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=tg(t.children[1]),s=ng(t.children[t.children.length-1]);a.line&&s.line&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function hN(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(t1(t.slice(i),i>0,!1)),o.join("")}function t1(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Zv||o===e1;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Zv||o===e1;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function yN(e,t){const n={type:"text",value:gN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wN={blockquote:GP,break:JP,code:QP,delete:KP,emphasis:qP,footnoteReference:CS,footnote:XP,heading:ZP,html:eN,imageReference:tN,image:nN,inlineCode:rN,linkReference:iN,link:oN,listItem:lN,list:sN,paragraph:uN,root:cN,strong:fN,table:pN,tableCell:mN,tableRow:hN,text:yN,thematicBreak:vN,toml:Rs,yaml:Rs,definition:Rs,footnoteDefinition:Rs};function Rs(){return null}const IS=function(e){if(e==null)return AN;if(typeof e=="string")return SN(e);if(typeof e=="object")return Array.isArray(e)?bN(e):EN(e);if(typeof e=="function")return of(e);throw new Error("Expected function, string, or object as test")};function bN(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let d=[],p,h,m;if((!t||i(a,s,u[u.length-1]||null))&&(d=kN(n(a,u)),d[0]===n1))return d;if(a.children&&d[0]!==CN)for(h=(r?a.children.length:-1)+o,m=u.concat(a);h>-1&&h{const i=i1(r.identifier);i&&!r1.call(t,i)&&(t[i]=r)}),n;function n(r){const i=i1(r);return i&&r1.call(t,i)?t[i]:null}}function i1(e){return String(e||"").toUpperCase()}const Yu={}.hasOwnProperty;function ON(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return l.dangerous=r,l.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,l.footnoteLabel=n.footnoteLabel||"Footnotes",l.footnoteLabelTagName=n.footnoteLabelTagName||"h2",l.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},l.footnoteBackLabel=n.footnoteBackLabel||"Back to content",l.unknownHandler=n.unknownHandler,l.passThrough=n.passThrough,l.handlers=O(O({},wN),n.handlers),l.definition=IN(e),l.footnoteById=i,l.footnoteOrder=[],l.footnoteCounts={},l.patch=PN,l.applyData=NN,l.one=a,l.all=s,l.wrap=DN,l.augment=o,OS(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();Yu.call(i,c)||(i[c]=u)}),l;function o(u,c){if(u&&"data"in u&&u.data){const f=u.data;f.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=f.hName),c.type==="element"&&f.hProperties&&(c.properties=O(O({},c.properties),f.hProperties)),"children"in c&&c.children&&f.hChildren&&(c.children=f.hChildren)}if(u){const f="type"in u?u:{position:u};TN(f)||(c.position={start:tg(f),end:ng(f)})}return c}function l(u,c,f,d){return Array.isArray(f)&&(d=f,f={}),o(u,{type:"element",tagName:c,properties:f||{},children:d||[]})}function a(u,c){return PS(l,u,c)}function s(u){return rg(l,u)}}function PN(e,t){e.position&&(t.position=dN(e))}function NN(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties=O(O({},n.properties),o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function PS(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Yu.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?W(O({},t),{children:rg(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):RN(e,t)}function rg(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i1:t}function sN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i-1?r.offset:null}}}function pN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=eg(t.children[1]),s=tg(t.children[t.children.length-1]);a.line&&s.line&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function hN(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(t1(t.slice(i),i>0,!1)),o.join("")}function t1(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Zv||o===e1;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Zv||o===e1;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function yN(e,t){const n={type:"text",value:gN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wN={blockquote:GP,break:JP,code:QP,delete:KP,emphasis:qP,footnoteReference:CS,footnote:XP,heading:ZP,html:eN,imageReference:tN,image:nN,inlineCode:rN,linkReference:iN,link:oN,listItem:lN,list:sN,paragraph:uN,root:cN,strong:fN,table:pN,tableCell:mN,tableRow:hN,text:yN,thematicBreak:vN,toml:Rs,yaml:Rs,definition:Rs,footnoteDefinition:Rs};function Rs(){return null}const IS=function(e){if(e==null)return AN;if(typeof e=="string")return SN(e);if(typeof e=="object")return Array.isArray(e)?bN(e):EN(e);if(typeof e=="function")return of(e);throw new Error("Expected function, string, or object as test")};function bN(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let d=[],p,h,m;if((!t||i(a,s,u[u.length-1]||null))&&(d=kN(n(a,u)),d[0]===n1))return d;if(a.children&&d[0]!==CN)for(h=(r?a.children.length:-1)+o,m=u.concat(a);h>-1&&h{const i=i1(r.identifier);i&&!r1.call(t,i)&&(t[i]=r)}),n;function n(r){const i=i1(r);return i&&r1.call(t,i)?t[i]:null}}function i1(e){return String(e||"").toUpperCase()}const Yu={}.hasOwnProperty;function ON(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return l.dangerous=r,l.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,l.footnoteLabel=n.footnoteLabel||"Footnotes",l.footnoteLabelTagName=n.footnoteLabelTagName||"h2",l.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},l.footnoteBackLabel=n.footnoteBackLabel||"Back to content",l.unknownHandler=n.unknownHandler,l.passThrough=n.passThrough,l.handlers=P(P({},wN),n.handlers),l.definition=IN(e),l.footnoteById=i,l.footnoteOrder=[],l.footnoteCounts={},l.patch=PN,l.applyData=NN,l.one=a,l.all=s,l.wrap=DN,l.augment=o,OS(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();Yu.call(i,c)||(i[c]=u)}),l;function o(u,c){if(u&&"data"in u&&u.data){const f=u.data;f.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=f.hName),c.type==="element"&&f.hProperties&&(c.properties=P(P({},c.properties),f.hProperties)),"children"in c&&c.children&&f.hChildren&&(c.children=f.hChildren)}if(u){const f="type"in u?u:{position:u};TN(f)||(c.position={start:eg(f),end:tg(f)})}return c}function l(u,c,f,d){return Array.isArray(f)&&(d=f,f={}),o(u,{type:"element",tagName:c,properties:f||{},children:d||[]})}function a(u,c){return PS(l,u,c)}function s(u){return ng(l,u)}}function PN(e,t){e.position&&(t.position=dN(e))}function NN(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties=P(P({},n.properties),o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function PS(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Yu.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?W(P({},t),{children:ng(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):RN(e,t)}function ng(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i0&&n.push({type:"text",value:` -`}),n}function LN(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(f)}const u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const f=u.children[u.children.length-1];f&&f.type==="text"?f.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...s)}else i.push(...s);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+l},children:e.wrap(i,!0)};e.patch(r,c),t.push(c)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:W(O({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` +`}),n}function LN(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(f)}const u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const f=u.children[u.children.length-1];f&&f.type==="text"?f.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...s)}else i.push(...s);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+l},children:e.wrap(i,!0)};e.patch(r,c),t.push(c)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:W(P({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:` `}]}}function NS(e,t){const n=ON(e,t),r=n.one(e,null),i=LN(n);return i&&r.children.push({type:"text",value:` -`},i),Array.isArray(r)?{type:"root",children:r}:r}const FN=function(e,t){return e&&"run"in e?BN(e,t):UN(e||t)},MN=FN;function BN(e,t){return(n,r,i)=>{e.run(NS(n,t),r,o=>{i(o)})}}function UN(e){return t=>NS(t,e)}var M={},zN={get exports(){return M},set exports(e){M=e}},jN="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",WN=jN,YN=WN;function RS(){}function DS(){}DS.resetWarningCache=RS;var VN=function(){function e(r,i,o,l,a,s){if(s!==YN){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:DS,resetWarningCache:RS};return n.PropTypes=n,n};zN.exports=VN();class Za{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Za.prototype.property={};Za.prototype.normal={};Za.prototype.space=null;function LS(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&QN.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(l1,ZN);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!l1.test(o)){let l=o.replace(KN,XN);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=ig}return new i(r,t)}function XN(e){return"-"+e.toLowerCase()}function ZN(e){return e.charAt(1).toUpperCase()}const a1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},e3=LS([BS,MS,jS,WS,GN],"html"),t3=LS([BS,MS,jS,WS,JN],"svg"),YS=function(e){if(e==null)return o3;if(typeof e=="string")return i3(e);if(typeof e=="object")return Array.isArray(e)?n3(e):r3(e);if(typeof e=="function")return lf(e);throw new Error("Expected function, string, or object as test")};function n3(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let d=[],p,h,m;if((!t||i(a,s,u[u.length-1]||null))&&(d=u3(n(a,u)),d[0]===s1))return d;if(a.children&&d[0]!==a3)for(h=(r?a.children.length:-1)+o,m=u.concat(a);h>-1&&h{c3(t,"element",(n,r,i)=>{const o=i;let l;if(e.allowedElements?l=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(n.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(n,r,o)),l&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var dh={},d3={get exports(){return dh},set exports(e){dh=e}},Ee={};/** +`},i),Array.isArray(r)?{type:"root",children:r}:r}const FN=function(e,t){return e&&"run"in e?BN(e,t):UN(e||t)},MN=FN;function BN(e,t){return(n,r,i)=>{e.run(NS(n,t),r,o=>{i(o)})}}function UN(e){return t=>NS(t,e)}var M={},zN={get exports(){return M},set exports(e){M=e}},jN="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",WN=jN,YN=WN;function RS(){}function DS(){}DS.resetWarningCache=RS;var VN=function(){function e(r,i,o,l,a,s){if(s!==YN){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:DS,resetWarningCache:RS};return n.PropTypes=n,n};zN.exports=VN();class Za{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Za.prototype.property={};Za.prototype.normal={};Za.prototype.space=null;function LS(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&QN.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(l1,ZN);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!l1.test(o)){let l=o.replace(KN,XN);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=rg}return new i(r,t)}function XN(e){return"-"+e.toLowerCase()}function ZN(e){return e.charAt(1).toUpperCase()}const a1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},e3=LS([BS,MS,jS,WS,GN],"html"),t3=LS([BS,MS,jS,WS,JN],"svg"),YS=function(e){if(e==null)return o3;if(typeof e=="string")return i3(e);if(typeof e=="object")return Array.isArray(e)?n3(e):r3(e);if(typeof e=="function")return lf(e);throw new Error("Expected function, string, or object as test")};function n3(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let d=[],p,h,m;if((!t||i(a,s,u[u.length-1]||null))&&(d=u3(n(a,u)),d[0]===s1))return d;if(a.children&&d[0]!==a3)for(h=(r?a.children.length:-1)+o,m=u.concat(a);h>-1&&h{c3(t,"element",(n,r,i)=>{const o=i;let l;if(e.allowedElements?l=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(n.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(n,r,o)),l&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var dh={},d3={get exports(){return dh},set exports(e){dh=e}},Ee={};/** * @license React * react-is.production.min.js * @@ -112,60 +112,60 @@ ${pd(r)}`}}}function dI(e){const{node:t,path:n,app_state:r}=e;return FE({title:` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var og=Symbol.for("react.element"),lg=Symbol.for("react.portal"),af=Symbol.for("react.fragment"),sf=Symbol.for("react.strict_mode"),uf=Symbol.for("react.profiler"),cf=Symbol.for("react.provider"),ff=Symbol.for("react.context"),p3=Symbol.for("react.server_context"),df=Symbol.for("react.forward_ref"),pf=Symbol.for("react.suspense"),hf=Symbol.for("react.suspense_list"),mf=Symbol.for("react.memo"),gf=Symbol.for("react.lazy"),h3=Symbol.for("react.offscreen"),VS;VS=Symbol.for("react.module.reference");function wn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case og:switch(e=e.type,e){case af:case uf:case sf:case pf:case hf:return e;default:switch(e=e&&e.$$typeof,e){case p3:case ff:case df:case gf:case mf:case cf:return e;default:return t}}case lg:return t}}}Ee.ContextConsumer=ff;Ee.ContextProvider=cf;Ee.Element=og;Ee.ForwardRef=df;Ee.Fragment=af;Ee.Lazy=gf;Ee.Memo=mf;Ee.Portal=lg;Ee.Profiler=uf;Ee.StrictMode=sf;Ee.Suspense=pf;Ee.SuspenseList=hf;Ee.isAsyncMode=function(){return!1};Ee.isConcurrentMode=function(){return!1};Ee.isContextConsumer=function(e){return wn(e)===ff};Ee.isContextProvider=function(e){return wn(e)===cf};Ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===og};Ee.isForwardRef=function(e){return wn(e)===df};Ee.isFragment=function(e){return wn(e)===af};Ee.isLazy=function(e){return wn(e)===gf};Ee.isMemo=function(e){return wn(e)===mf};Ee.isPortal=function(e){return wn(e)===lg};Ee.isProfiler=function(e){return wn(e)===uf};Ee.isStrictMode=function(e){return wn(e)===sf};Ee.isSuspense=function(e){return wn(e)===pf};Ee.isSuspenseList=function(e){return wn(e)===hf};Ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===af||e===uf||e===sf||e===pf||e===hf||e===h3||typeof e=="object"&&e!==null&&(e.$$typeof===gf||e.$$typeof===mf||e.$$typeof===cf||e.$$typeof===ff||e.$$typeof===df||e.$$typeof===VS||e.getModuleId!==void 0)};Ee.typeOf=wn;(function(e){e.exports=Ee})(d3);const m3=Gh(dh);function g3(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function y3(e){return e.join(" ").trim()}function v3(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Vu={},w3={get exports(){return Vu},set exports(e){Vu=e}},u1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b3=/\n/g,E3=/^\s*/,S3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A3=/^:\s*/,x3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,C3=/^[;\s]*/,_3=/^\s+|\s+$/g,k3=` -`,c1="/",f1="*",Pi="",T3="comment",I3="declaration",O3=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(h){var m=h.match(b3);m&&(n+=m.length);var E=h.lastIndexOf(k3);r=~E?h.length-E:r+h.length}function o(){var h={line:n,column:r};return function(m){return m.position=new l(h),u(),m}}function l(h){this.start=h,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function s(h){var m=h.exec(e);if(m){var E=m[0];return i(E),e=e.slice(E.length),m}}function u(){s(E3)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=o();if(!(c1!=e.charAt(0)||f1!=e.charAt(1))){for(var m=2;Pi!=e.charAt(m)&&(f1!=e.charAt(m)||c1!=e.charAt(m+1));)++m;if(m+=2,Pi===e.charAt(m-1))return a("End of comment missing");var E=e.slice(2,m-2);return r+=2,i(E),e=e.slice(m),r+=2,h({type:T3,comment:E})}}function d(){var h=o(),m=s(S3);if(m){if(f(),!s(A3))return a("property missing ':'");var E=s(x3),g=h({type:I3,property:d1(m[0].replace(u1,Pi)),value:E?d1(E[0].replace(u1,Pi)):Pi});return s(C3),g}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),p()};function d1(e){return e?e.replace(_3,Pi):Pi}var P3=O3;function $S(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=P3(e),o=typeof t=="function",l,a,s=0,u=i.length;s0?k.createElement(p,s,f):k.createElement(p,s)}function L3(e){let t=-1;for(;++t for more info)`),delete Ds[o]}const t=WO().use(HP).use(e.remarkPlugins||[]).use(MN,W(O({},e.remarkRehypeOptions),{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(f3,e),n=new sS;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=k.createElement(k.Fragment,{},HS({options:e,schema:e3,listDepth:0},r));return e.className&&(i=k.createElement("div",{className:e.className},i)),i}GS.propTypes={children:M.string,className:M.string,allowElement:M.func,allowedElements:M.arrayOf(M.string),disallowedElements:M.arrayOf(M.string),unwrapDisallowed:M.bool,remarkPlugins:M.arrayOf(M.oneOfType([M.object,M.func,M.arrayOf(M.oneOfType([M.bool,M.string,M.object,M.func,M.arrayOf(M.any)]))])),rehypePlugins:M.arrayOf(M.oneOfType([M.object,M.func,M.arrayOf(M.oneOfType([M.bool,M.string,M.object,M.func,M.arrayOf(M.any)]))])),sourcePos:M.bool,rawSourcePos:M.bool,skipHtml:M.bool,includeElementIndex:M.bool,transformLinkUri:M.oneOfType([M.func,M.bool]),linkTarget:M.oneOfType([M.func,M.string]),transformImageUri:M.func,components:M.object};const j3="_tooltip_base_w63jb_1",W3="_popoverMarkdown_w63jb_10",JS={tooltip_base:j3,popoverMarkdown:W3};function Y3({initialOpen:e=!1,placement:t="top",open:n,onOpenChange:r}={}){const[i,o]=P.useState(e),l=P.useRef(null),a=n!=null?n:i,s=r!=null?r:o,u=P.useCallback(()=>{s(g=>!g)},[s]),c=_O({placement:t,open:a,onOpenChange:s,whileElementsMounted:TI,middleware:[AI(7),SI({fallbackAxisSideDirection:"start"}),OI({element:l}),CI({padding:5})]}),f=c.context,d=sO(f,{move:!1,enabled:n==null}),p=xO(f,{enabled:n==null}),h=AO(f),m=CO(f,{role:"tooltip"}),E=kO([d,p,h,m]);return P.useMemo(()=>O(O({open:a,setOpen:s,toggleOpen:u,arrowRef:l},E),c),[a,s,u,E,c])}const QS=P.createContext(null),KS=()=>{const e=P.useContext(QS);if(e==null)throw new Error("Tooltip components must be wrapped in ");return e};function yf(n){var r=n,{children:e}=r,t=ye(r,["children"]);const i=Y3(t);return v(QS.Provider,{value:i,children:e})}const vf=P.forwardRef(function(o,i){var l=o,{children:t,asChild:n=!1}=l,r=ye(l,["children","asChild"]);const a=KS(),s=t.ref,u=lS([a.refs.setReference,i,s]),c=P.useMemo(()=>({onMouseDown:a.toggleOpen,onMouseUp:a.toggleOpen}),[a.toggleOpen]);return n&&P.isValidElement(t)?P.cloneElement(t,a.getReferenceProps(W(O(O(O({ref:u},r),t.props),c),{"data-state":a.open?"open":"closed"}))):v("button",W(O(O({ref:u,"data-state":a.open?"open":"closed"},a.getReferenceProps(r)),c),{children:t}))}),qS=P.forwardRef(function({content:t},n){return v(ag,{ref:n,children:v(GS,{className:JS.popoverMarkdown,children:t})})}),ag=P.forwardRef(function(i,r){var o=i,{children:t}=o,n=ye(o,["children"]);var s,u;const l=KS(),a=lS([l.refs.setFloating,r]);return v(gO,{children:l.open&&v(Ne,{children:U("div",W(O({ref:a,className:JS.tooltip_base,style:O({position:l.strategy,zIndex:10,top:(s=l.y)!=null?s:0,left:(u=l.x)!=null?u:0,visibility:l.x==null?"hidden":"visible"},n.style)},l.getFloatingProps(n)),{children:[t,v(XI,{ref:l.arrowRef,context:l.context,fill:"var(--tooltip-bg-color, pink)"})]}))})})}),lu=i=>{var o=i,{placement:e="right",popoverContent:t,tooltipClass:n}=o,r=ye(o,["placement","popoverContent","tooltipClass"]);return U(yf,{placement:e,children:[v(vf,{asChild:!0,children:v(rt,O({},r))}),v(ag,{children:v("div",{className:n,children:t})})]})},V3="_container_valbi_1",$3="_header_valbi_14",H3="_information_valbi_19",G3="_error_msg_valbi_24",J3="_actions_valbi_32",kl={container:V3,header:$3,information:H3,error_msg:G3,actions:J3};function XS({header:e,error:t,generateIssueLink:n,resetErrorBoundary:r}){const i=Gm(),{goBackward:o,canGoBackward:l}=hI();return U("div",{className:kl.container,children:[v("h3",{className:kl.header,children:e}),v("p",{className:kl.information,children:"Error message:"}),v("code",{className:kl.error_msg,children:t.message}),U("div",{className:kl.actions,children:[v(lu,{placement:"top",popoverContent:"Try rendering again to see if it fixes the error",onClick:()=>r(),children:"Reset"}),l?v(lu,{variant:"regular",placement:"top",popoverContent:"Undo the last state change to see if that fixes issue",onClick:()=>{o(),r()},children:"Undo last change"}):null,v(lu,{role:"link",popoverContent:"Generate a bug report for github",variant:"regular",placement:"top",onClick:()=>{window.open(n(i.getState()),"_blank")},children:"Submit bug report"})]})]})}function Q3({node:e,path:t,error:n,resetErrorBoundary:r}){return v(XS,{header:`Something went wrong rendering ${e.uiName}()`,error:n,resetErrorBoundary:r,generateIssueLink:i=>dI({node:e,path:t,app_state:i})})}function Tn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:sg(e)?2:ug(e)?3:0}function Fo(e,t){return sl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function K3(e,t){return sl(e)===2?e.get(t):e[t]}function ZS(e,t,n){var r=sl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function eA(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function sg(e){return nR&&e instanceof Map}function ug(e){return rR&&e instanceof Set}function Ii(e){return e.o||e.t}function cg(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=nA(e);delete t[Le];for(var n=Mo(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=q3),Object.freeze(e),t&&Qi(e,function(n,r){return fg(r,!0)},!0)),e}function q3(){Tn(2)}function dg(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Kn(e){var t=yh[e];return t||Tn(18,e),t}function X3(e,t){yh[e]||(yh[e]=t)}function hh(){return Da}function Od(e,t){t&&(Kn("Patches"),e.u=[],e.s=[],e.v=t)}function $u(e){mh(e),e.p.forEach(Z3),e.p=null}function mh(e){e===Da&&(Da=e.l)}function h1(e){return Da={p:[],l:Da,h:e,m:!0,_:0}}function Z3(e){var t=e[Le];t.i===0||t.i===1?t.j():t.O=!0}function Pd(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Kn("ES5").S(t,e,r),r?(n[Le].P&&($u(t),Tn(4)),Cr(e)&&(e=Hu(t,e),t.l||Gu(t,e)),t.u&&Kn("Patches").M(n[Le].t,e,t.u,t.s)):e=Hu(t,n,[]),$u(t),t.u&&t.v(t.u,t.s),e!==tA?e:void 0}function Hu(e,t,n){if(dg(t))return t;var r=t[Le];if(!r)return Qi(t,function(a,s){return m1(e,r,t,a,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Gu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=cg(r.k):r.o,o=i,l=!1;r.i===3&&(o=new Set(i),i.clear(),l=!0),Qi(o,function(a,s){return m1(e,r,i,a,s,n,l)}),Gu(e,i,!1),n&&e.u&&Kn("Patches").N(r,n,e.u,e.s)}return r.o}function m1(e,t,n,r,i,o,l){if(di(i)){var a=Hu(e,i,o&&t&&t.i!==3&&!Fo(t.R,r)?o.concat(r):void 0);if(ZS(n,r,a),!di(a))return;e.m=!1}else l&&n.add(i);if(Cr(i)&&!dg(i)){if(!e.h.D&&e._<1)return;Hu(e,i),t&&t.A.l||Gu(e,i)}}function Gu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&fg(t,n)}function Nd(e,t){var n=e[Le];return(n?Ii(n):e)[t]}function g1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Wr(e){e.P||(e.P=!0,e.l&&Wr(e.l))}function Rd(e){e.o||(e.o=cg(e.t))}function gh(e,t,n){var r=sg(t)?Kn("MapSet").F(t,n):ug(t)?Kn("MapSet").T(t,n):e.g?function(i,o){var l=Array.isArray(i),a={i:l?1:0,A:o?o.A:hh(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=a,u=La;l&&(s=[a],u=Wl);var c=Proxy.revocable(s,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):Kn("ES5").J(t,n);return(n?n.A:hh()).p.push(r),r}function eR(e){return di(e)||Tn(22,e),function t(n){if(!Cr(n))return n;var r,i=n[Le],o=sl(n);if(i){if(!i.P&&(i.i<4||!Kn("ES5").K(i)))return i.t;i.I=!0,r=y1(n,o),i.I=!1}else r=y1(n,o);return Qi(r,function(l,a){i&&K3(i.t,l)===a||ZS(r,l,t(a))}),o===3?new Set(r):r}(e)}function y1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return cg(e)}function tR(){function e(o,l){var a=i[o];return a?a.enumerable=l:i[o]=a={configurable:!0,enumerable:l,get:function(){var s=this[Le];return La.get(s,o)},set:function(s){var u=this[Le];La.set(u,o,s)}},a}function t(o){for(var l=o.length-1;l>=0;l--){var a=o[l][Le];if(!a.P)switch(a.i){case 5:r(a)&&Wr(a);break;case 4:n(a)&&Wr(a)}}}function n(o){for(var l=o.t,a=o.k,s=Mo(a),u=s.length-1;u>=0;u--){var c=s[u];if(c!==Le){var f=l[c];if(f===void 0&&!Fo(l,c))return!0;var d=a[c],p=d&&d[Le];if(p?p.t!==f:!eA(d,f))return!0}}var h=!!l[Le];return s.length!==Mo(l).length+(h?0:1)}function r(o){var l=o.k;if(l.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(l,l.length-1);if(a&&!a.get)return!0;for(var s=0;s1?g-1:0),w=1;w1?c-1:0),d=1;d=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var l=Kn("Patches").$;return di(n)?l(n,r):this.produce(n,function(a){return l(a,r)})},e}(),Zt=new oR,wi=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function Fa(e){return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function lR(e,t){if(Fa(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fa(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aR(e){var t=lR(e,"string");return Fa(t)==="symbol"?t:String(t)}function sR(e,t,n){return t=aR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S1(e){for(var t=1;t0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)for(var w=p.getState(),S=Array.from(n.values()),_=0,b=S;_t.payload.node_info,UNSET_DRAGGED:e=>null}}),{SET_DRAGGED:QR,UNSET_DRAGGED:KR}=gA.actions;function yA(){return Qa(e=>e.currentlyDraggedNode)}function qR(){const e=Tr();return t=>e(QR({node_info:t}))}function vA(){const e=Tr();return()=>e(KR())}const XR=gA.reducer;function wA(e){const t=k.useRef(!1),n=qR(),r=vA(),i=k.useCallback(l=>{t.current!==!1&&(l.stopPropagation(),r(),t.current=!1,document.body.removeEventListener("dragover",P1),document.body.removeEventListener("drop",i))},[r]);return{onDragStart:k.useCallback(l=>{l.stopPropagation(),t.current=!0,document.body.addEventListener("dragover",P1),document.body.addEventListener("drop",i),n(e)},[i,e,n]),onDragEnd:i,draggable:!0}}function P1(e){e.preventDefault()}function er(e,t){return[...e,t]}function Ef(e){return e.join("-")}function ul(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n!n.includes(o)),i=Object.keys(t).filter(o=>!n.includes(o));if(!ul(r,i))return!1;for(let o of r)if(e[o]!==t[o])return!1;return!0}const bA=wf({name:"selectedPath",initialState:[],reducers:{SET_SELECTION:(e,t)=>t.payload.path,STEP_BACK_SELECTION:e=>e===null||e.length===0?null:(e.pop(),e)}}),{SET_SELECTION:Sf,STEP_BACK_SELECTION:RW}=bA.actions;function rs(){return Qa(e=>e.selected_path)}function EA(){const e=Tr();return k.useCallback(n=>{e(Sf({path:n}))},[e])}const e5=bA.reducer;function t5(e){const t=rs(),n=EA(),r=k.useCallback(o=>{o.stopPropagation(),n(e)},[e,n]),i=Boolean(t&&ul(t,e));return{onClick:r,isSelected:i}}function SA({node:e,path:t,canDrag:n}){const r=wA({node:e,currentPath:t}),{onClick:i,isSelected:o}=t5(t);return O({onClick:i,"data-sue-path":Ef(t),"data-is-selected-node":o,"aria-label":e.uiName},n?r:{})}const bi=({path:e,node:t,canDrag:n=!0})=>{var a;const i=to(t.uiName).UiComponent,o=SA({path:e,node:t,canDrag:n}),l=k.useMemo(()=>s=>v(Q3,O({node:t,path:e},s)),[t,e]);return v(Xc,{fallbackRender:l,children:v(i,{wrapperProps:o,uiArguments:t.uiArguments,uiChildren:no(t)?(a=t.uiChildren)!=null?a:[]:[],path:e})})};function Ui(e){return e.length}function AA(e,t,n){return n===0?!0:ul(e.slice(0,n),t.slice(0,n))}function n5(e,t){const n=Ui(e),r=Ui(t);return n>=r?!1:AA(e,t,n)}function xA(e,t){const n=Math.min(e.length,t.length)-1;return n<=0?!0:AA(e,t,n)}function r5({fromPath:e,toPath:t}){if(e==null)return!0;if(n5(e,t))return!1;if(xA(e,t)){const n=e.length,r=e[n-1],i=t[n-1];if(r===i||r===i-1)return!1}return!0}function i5({child:e,wrapper:t}){if(typeof t=="function"){const n=t(e);if(n===null)return e;t=n}return W(O({},t),{uiChildren:[e]})}function CA(e){return typeof e=="object"&&e!==null}const o5={symbol:"s",character:"c",boolean:"b",number:"n",unknown:"u",expression:"e"};class Yn extends Error{constructor({message:t,cause:n}){super(),this.name="AST_PARSING_ERROR",this.message=t,this.cause=n}}function qt(e,t){return e.type===o5[t]}const l5=new Set(["c","n","b"]);function a5(e){return l5.has(e.type)}function nr(e){return e.type==="e"&&Array.isArray(e.val)}function s5(e,t){if(!nr(e))return!1;const{val:n}=e;return n[0].val==="<-"||n[0].val==="="?t?n[1].val===t:!0:!1}function _A(e){return e.val[1]}function u5(e){return e.val[2]}function qu(e){let t=[];return e.forEach(n=>{if(s5(n)){const r=_A(n);c5(r)?t.push({name:r.val[2].val,is_output:!0,node:n}):r.type==="s"&&t.push({name:r.val,is_output:!1,node:n})}if(nr(n)){const r=qu(n.val);t.push(...r)}}),t}function c5(e){if(!nr(e))return!1;const{val:t}=e;return t.length===3&&t[1].val==="output"&&typeof t[2].val=="string"}function kA(e){const t=e.filter(({is_output:r})=>r),n=new Set;return t.forEach(({name:r})=>{n.add(r)}),n}function f5(e){return!Boolean(e.pos)||!(_A(e).val==="ui")?!1:nr(u5(e))}function TA(e){const t=e.find(({name:r,is_output:i})=>r==="ui"&&!i);if(!t)throw new Yn({message:"No ui assignment node was found in provided ast"});const{node:n}=t;if(!f5(n))throw new Yn({message:"No position info attached to the ui assignment node",cause:n});return n}function Jo({node:e,explanation:t}){return{uiName:"unknownUiFunction",uiArguments:{text:nr(e)?NA(e.val):vg(e),explanation:t}}}function d5(e){return e[0].val==="c"}function p5(e){const t=e[0].val;return t==="c"||t==="list"}function h5(e){return nr(e)&&d5(e.val)}function m5(e){return nr(e)&&e.val[0].val==="list"}function g5(e){try{return IA(e)}catch(t){if(!(t instanceof Yn))throw t;return Jo({node:e,explanation:t.message})}}function IA(e){if(!nr(e))throw new Yn({message:"Tried to flatten a leaf/primative node"});const[t,...n]=e.val;if(t.val!=="c")throw new Yn({message:"Tried to flatten non array as array"});return n.map(r=>OA(r.val)?r.val:IA(r))}function y5(e){if(!nr(e))throw new Yn({message:"Tried to flatten a leaf/primative node"});try{const[t,...n]=e.val;if(t.val!=="list")throw new Yn({message:"Tried to flatten non array as array",cause:e});let r={};return n.forEach(({name:i,val:o})=>{if(typeof i!="string")throw new Yn({message:"All elements in list must have a name",cause:e});if(!OA(o))throw new Yn({message:"Nested lists are not supported",cause:e});r[i]=o}),r}catch(t){if(!(t instanceof Yn))throw t;return Jo({node:e,explanation:t.message})}}function OA(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function v5(e){return qt(e[0],"symbol")&&e[0].val==="function"}function w5(e){if(!qt(e,"expression")||e.val.length!==2)return!1;const[t,n]=e.val;return qt(t,"symbol")&&t.val==="("?qt(n,"expression")&&v5(n.val):!1}function b5([,e,t]){return`function(${e.val.map(r=>{var l;const i=(l=r.name)!=null?l:"name",o=r.val?` = ${r.val}`:"";return`${i}${o}`}).join(", ")}) {...}`}const PA=2,E5=" ".repeat(PA),yg=60,pi=` -${E5}`;function NA(e){const[t,...n]=e;let r;if(w5(t))r=`(${b5(t.val[1].val)})`;else if(qt(t,"symbol"))r=t.val;else return"Unknown Ui Code";const i=n.map(s=>`${s.name?`${s.name} = `:""}${vg(s)}`),o=RA({fn_name:r,fn_args_list:i,max_line_length_for_multi_args:p5(e)?yg:0}),l=`,${o?pi:" "}`,a=i.join(l);return`${r}(${o?pi:""}${a}${o?` + */var ig=Symbol.for("react.element"),og=Symbol.for("react.portal"),af=Symbol.for("react.fragment"),sf=Symbol.for("react.strict_mode"),uf=Symbol.for("react.profiler"),cf=Symbol.for("react.provider"),ff=Symbol.for("react.context"),p3=Symbol.for("react.server_context"),df=Symbol.for("react.forward_ref"),pf=Symbol.for("react.suspense"),hf=Symbol.for("react.suspense_list"),mf=Symbol.for("react.memo"),gf=Symbol.for("react.lazy"),h3=Symbol.for("react.offscreen"),VS;VS=Symbol.for("react.module.reference");function wn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ig:switch(e=e.type,e){case af:case uf:case sf:case pf:case hf:return e;default:switch(e=e&&e.$$typeof,e){case p3:case ff:case df:case gf:case mf:case cf:return e;default:return t}}case og:return t}}}Ee.ContextConsumer=ff;Ee.ContextProvider=cf;Ee.Element=ig;Ee.ForwardRef=df;Ee.Fragment=af;Ee.Lazy=gf;Ee.Memo=mf;Ee.Portal=og;Ee.Profiler=uf;Ee.StrictMode=sf;Ee.Suspense=pf;Ee.SuspenseList=hf;Ee.isAsyncMode=function(){return!1};Ee.isConcurrentMode=function(){return!1};Ee.isContextConsumer=function(e){return wn(e)===ff};Ee.isContextProvider=function(e){return wn(e)===cf};Ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ig};Ee.isForwardRef=function(e){return wn(e)===df};Ee.isFragment=function(e){return wn(e)===af};Ee.isLazy=function(e){return wn(e)===gf};Ee.isMemo=function(e){return wn(e)===mf};Ee.isPortal=function(e){return wn(e)===og};Ee.isProfiler=function(e){return wn(e)===uf};Ee.isStrictMode=function(e){return wn(e)===sf};Ee.isSuspense=function(e){return wn(e)===pf};Ee.isSuspenseList=function(e){return wn(e)===hf};Ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===af||e===uf||e===sf||e===pf||e===hf||e===h3||typeof e=="object"&&e!==null&&(e.$$typeof===gf||e.$$typeof===mf||e.$$typeof===cf||e.$$typeof===ff||e.$$typeof===df||e.$$typeof===VS||e.getModuleId!==void 0)};Ee.typeOf=wn;(function(e){e.exports=Ee})(d3);const m3=Hh(dh);function g3(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function y3(e){return e.join(" ").trim()}function v3(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Vu={},w3={get exports(){return Vu},set exports(e){Vu=e}},u1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,b3=/\n/g,E3=/^\s*/,S3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A3=/^:\s*/,x3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,C3=/^[;\s]*/,_3=/^\s+|\s+$/g,k3=` +`,c1="/",f1="*",Pi="",T3="comment",I3="declaration",O3=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(h){var m=h.match(b3);m&&(n+=m.length);var E=h.lastIndexOf(k3);r=~E?h.length-E:r+h.length}function o(){var h={line:n,column:r};return function(m){return m.position=new l(h),u(),m}}function l(h){this.start=h,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function s(h){var m=h.exec(e);if(m){var E=m[0];return i(E),e=e.slice(E.length),m}}function u(){s(E3)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=o();if(!(c1!=e.charAt(0)||f1!=e.charAt(1))){for(var m=2;Pi!=e.charAt(m)&&(f1!=e.charAt(m)||c1!=e.charAt(m+1));)++m;if(m+=2,Pi===e.charAt(m-1))return a("End of comment missing");var E=e.slice(2,m-2);return r+=2,i(E),e=e.slice(m),r+=2,h({type:T3,comment:E})}}function d(){var h=o(),m=s(S3);if(m){if(f(),!s(A3))return a("property missing ':'");var E=s(x3),g=h({type:I3,property:d1(m[0].replace(u1,Pi)),value:E?d1(E[0].replace(u1,Pi)):Pi});return s(C3),g}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),p()};function d1(e){return e?e.replace(_3,Pi):Pi}var P3=O3;function $S(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=P3(e),o=typeof t=="function",l,a,s=0,u=i.length;s0?k.createElement(p,s,f):k.createElement(p,s)}function L3(e){let t=-1;for(;++t for more info)`),delete Ds[o]}const t=WO().use(HP).use(e.remarkPlugins||[]).use(MN,W(P({},e.remarkRehypeOptions),{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(f3,e),n=new sS;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=k.createElement(k.Fragment,{},HS({options:e,schema:e3,listDepth:0},r));return e.className&&(i=k.createElement("div",{className:e.className},i)),i}GS.propTypes={children:M.string,className:M.string,allowElement:M.func,allowedElements:M.arrayOf(M.string),disallowedElements:M.arrayOf(M.string),unwrapDisallowed:M.bool,remarkPlugins:M.arrayOf(M.oneOfType([M.object,M.func,M.arrayOf(M.oneOfType([M.bool,M.string,M.object,M.func,M.arrayOf(M.any)]))])),rehypePlugins:M.arrayOf(M.oneOfType([M.object,M.func,M.arrayOf(M.oneOfType([M.bool,M.string,M.object,M.func,M.arrayOf(M.any)]))])),sourcePos:M.bool,rawSourcePos:M.bool,skipHtml:M.bool,includeElementIndex:M.bool,transformLinkUri:M.oneOfType([M.func,M.bool]),linkTarget:M.oneOfType([M.func,M.string]),transformImageUri:M.func,components:M.object};const j3="_tooltip_base_w63jb_1",W3="_popoverMarkdown_w63jb_10",JS={tooltip_base:j3,popoverMarkdown:W3};function Y3({initialOpen:e=!1,placement:t="top",open:n,onOpenChange:r}={}){const[i,o]=O.useState(e),l=O.useRef(null),a=n!=null?n:i,s=r!=null?r:o,u=O.useCallback(()=>{s(g=>!g)},[s]),c=_O({placement:t,open:a,onOpenChange:s,whileElementsMounted:TI,middleware:[AI(7),SI({fallbackAxisSideDirection:"start"}),OI({element:l}),CI({padding:5})]}),f=c.context,d=sO(f,{move:!1,enabled:n==null}),p=xO(f,{enabled:n==null}),h=AO(f),m=CO(f,{role:"tooltip"}),E=kO([d,p,h,m]);return O.useMemo(()=>P(P({open:a,setOpen:s,toggleOpen:u,arrowRef:l},E),c),[a,s,u,E,c])}const QS=O.createContext(null),KS=()=>{const e=O.useContext(QS);if(e==null)throw new Error("Tooltip components must be wrapped in ");return e};function yf(n){var r=n,{children:e}=r,t=ye(r,["children"]);const i=Y3(t);return v(QS.Provider,{value:i,children:e})}const vf=O.forwardRef(function(o,i){var l=o,{children:t,asChild:n=!1}=l,r=ye(l,["children","asChild"]);const a=KS(),s=t.ref,u=lS([a.refs.setReference,i,s]),c=O.useMemo(()=>({onMouseDown:a.toggleOpen,onMouseUp:a.toggleOpen}),[a.toggleOpen]);return n&&O.isValidElement(t)?O.cloneElement(t,a.getReferenceProps(W(P(P(P({ref:u},r),t.props),c),{"data-state":a.open?"open":"closed"}))):v("button",W(P(P({ref:u,"data-state":a.open?"open":"closed"},a.getReferenceProps(r)),c),{children:t}))}),qS=O.forwardRef(function({content:t},n){return v(lg,{ref:n,children:v(GS,{className:JS.popoverMarkdown,children:t})})}),lg=O.forwardRef(function(i,r){var o=i,{children:t}=o,n=ye(o,["children"]);var s,u;const l=KS(),a=lS([l.refs.setFloating,r]);return v(gO,{children:l.open&&v(Ne,{children:U("div",W(P({ref:a,className:JS.tooltip_base,style:P({position:l.strategy,zIndex:10,top:(s=l.y)!=null?s:0,left:(u=l.x)!=null?u:0,visibility:l.x==null?"hidden":"visible"},n.style)},l.getFloatingProps(n)),{children:[t,v(XI,{ref:l.arrowRef,context:l.context,fill:"var(--tooltip-bg-color, pink)"})]}))})})}),lu=i=>{var o=i,{placement:e="right",popoverContent:t,tooltipClass:n}=o,r=ye(o,["placement","popoverContent","tooltipClass"]);return U(yf,{placement:e,children:[v(vf,{asChild:!0,children:v(rt,P({},r))}),v(lg,{children:v("div",{className:n,children:t})})]})},V3="_container_valbi_1",$3="_header_valbi_14",H3="_information_valbi_19",G3="_error_msg_valbi_24",J3="_actions_valbi_32",kl={container:V3,header:$3,information:H3,error_msg:G3,actions:J3};function XS({header:e,error:t,generateIssueLink:n,resetErrorBoundary:r}){const i=Hm(),{goBackward:o,canGoBackward:l}=hI();return U("div",{className:kl.container,children:[v("h3",{className:kl.header,children:e}),v("p",{className:kl.information,children:"Error message:"}),v("code",{className:kl.error_msg,children:t.message}),U("div",{className:kl.actions,children:[v(lu,{placement:"top",popoverContent:"Try rendering again to see if it fixes the error",onClick:()=>r(),children:"Reset"}),l?v(lu,{variant:"regular",placement:"top",popoverContent:"Undo the last state change to see if that fixes issue",onClick:()=>{o(),r()},children:"Undo last change"}):null,v(lu,{role:"link",popoverContent:"Generate a bug report for github",variant:"regular",placement:"top",onClick:()=>{window.open(n(i.getState()),"_blank")},children:"Submit bug report"})]})]})}function Q3({node:e,path:t,error:n,resetErrorBoundary:r}){return v(XS,{header:`Something went wrong rendering ${e.uiName}()`,error:n,resetErrorBoundary:r,generateIssueLink:i=>dI({node:e,path:t,app_state:i})})}function Tn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:ag(e)?2:sg(e)?3:0}function Fo(e,t){return sl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function K3(e,t){return sl(e)===2?e.get(t):e[t]}function ZS(e,t,n){var r=sl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function eA(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ag(e){return nR&&e instanceof Map}function sg(e){return rR&&e instanceof Set}function Ii(e){return e.o||e.t}function ug(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=nA(e);delete t[Le];for(var n=Mo(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=q3),Object.freeze(e),t&&Qi(e,function(n,r){return cg(r,!0)},!0)),e}function q3(){Tn(2)}function fg(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Kn(e){var t=yh[e];return t||Tn(18,e),t}function X3(e,t){yh[e]||(yh[e]=t)}function hh(){return Da}function Od(e,t){t&&(Kn("Patches"),e.u=[],e.s=[],e.v=t)}function $u(e){mh(e),e.p.forEach(Z3),e.p=null}function mh(e){e===Da&&(Da=e.l)}function h1(e){return Da={p:[],l:Da,h:e,m:!0,_:0}}function Z3(e){var t=e[Le];t.i===0||t.i===1?t.j():t.O=!0}function Pd(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Kn("ES5").S(t,e,r),r?(n[Le].P&&($u(t),Tn(4)),Cr(e)&&(e=Hu(t,e),t.l||Gu(t,e)),t.u&&Kn("Patches").M(n[Le].t,e,t.u,t.s)):e=Hu(t,n,[]),$u(t),t.u&&t.v(t.u,t.s),e!==tA?e:void 0}function Hu(e,t,n){if(fg(t))return t;var r=t[Le];if(!r)return Qi(t,function(a,s){return m1(e,r,t,a,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Gu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=ug(r.k):r.o,o=i,l=!1;r.i===3&&(o=new Set(i),i.clear(),l=!0),Qi(o,function(a,s){return m1(e,r,i,a,s,n,l)}),Gu(e,i,!1),n&&e.u&&Kn("Patches").N(r,n,e.u,e.s)}return r.o}function m1(e,t,n,r,i,o,l){if(di(i)){var a=Hu(e,i,o&&t&&t.i!==3&&!Fo(t.R,r)?o.concat(r):void 0);if(ZS(n,r,a),!di(a))return;e.m=!1}else l&&n.add(i);if(Cr(i)&&!fg(i)){if(!e.h.D&&e._<1)return;Hu(e,i),t&&t.A.l||Gu(e,i)}}function Gu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&cg(t,n)}function Nd(e,t){var n=e[Le];return(n?Ii(n):e)[t]}function g1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Wr(e){e.P||(e.P=!0,e.l&&Wr(e.l))}function Rd(e){e.o||(e.o=ug(e.t))}function gh(e,t,n){var r=ag(t)?Kn("MapSet").F(t,n):sg(t)?Kn("MapSet").T(t,n):e.g?function(i,o){var l=Array.isArray(i),a={i:l?1:0,A:o?o.A:hh(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=a,u=La;l&&(s=[a],u=Wl);var c=Proxy.revocable(s,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):Kn("ES5").J(t,n);return(n?n.A:hh()).p.push(r),r}function eR(e){return di(e)||Tn(22,e),function t(n){if(!Cr(n))return n;var r,i=n[Le],o=sl(n);if(i){if(!i.P&&(i.i<4||!Kn("ES5").K(i)))return i.t;i.I=!0,r=y1(n,o),i.I=!1}else r=y1(n,o);return Qi(r,function(l,a){i&&K3(i.t,l)===a||ZS(r,l,t(a))}),o===3?new Set(r):r}(e)}function y1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ug(e)}function tR(){function e(o,l){var a=i[o];return a?a.enumerable=l:i[o]=a={configurable:!0,enumerable:l,get:function(){var s=this[Le];return La.get(s,o)},set:function(s){var u=this[Le];La.set(u,o,s)}},a}function t(o){for(var l=o.length-1;l>=0;l--){var a=o[l][Le];if(!a.P)switch(a.i){case 5:r(a)&&Wr(a);break;case 4:n(a)&&Wr(a)}}}function n(o){for(var l=o.t,a=o.k,s=Mo(a),u=s.length-1;u>=0;u--){var c=s[u];if(c!==Le){var f=l[c];if(f===void 0&&!Fo(l,c))return!0;var d=a[c],p=d&&d[Le];if(p?p.t!==f:!eA(d,f))return!0}}var h=!!l[Le];return s.length!==Mo(l).length+(h?0:1)}function r(o){var l=o.k;if(l.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(l,l.length-1);if(a&&!a.get)return!0;for(var s=0;s1?g-1:0),w=1;w1?c-1:0),d=1;d=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var l=Kn("Patches").$;return di(n)?l(n,r):this.produce(n,function(a){return l(a,r)})},e}(),Zt=new oR,wi=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function Fa(e){return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function lR(e,t){if(Fa(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fa(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aR(e){var t=lR(e,"string");return Fa(t)==="symbol"?t:String(t)}function sR(e,t,n){return t=aR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S1(e){for(var t=1;t0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)for(var w=p.getState(),S=Array.from(n.values()),_=0,b=S;_t.payload.node_info,UNSET_DRAGGED:e=>null}}),{SET_DRAGGED:QR,UNSET_DRAGGED:KR}=gA.actions;function yA(){return Qa(e=>e.currentlyDraggedNode)}function qR(){const e=Tr();return t=>e(QR({node_info:t}))}function vA(){const e=Tr();return()=>e(KR())}const XR=gA.reducer;function wA(e){const t=k.useRef(!1),n=qR(),r=vA(),i=k.useCallback(l=>{t.current!==!1&&(l.stopPropagation(),r(),t.current=!1,document.body.removeEventListener("dragover",P1),document.body.removeEventListener("drop",i))},[r]);return{onDragStart:k.useCallback(l=>{l.stopPropagation(),t.current=!0,document.body.addEventListener("dragover",P1),document.body.addEventListener("drop",i),n(e)},[i,e,n]),onDragEnd:i,draggable:!0}}function P1(e){e.preventDefault()}function er(e,t){return[...e,t]}function Ef(e){return e.join("-")}function ul(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n!n.includes(o)),i=Object.keys(t).filter(o=>!n.includes(o));if(!ul(r,i))return!1;for(let o of r)if(e[o]!==t[o])return!1;return!0}const bA=wf({name:"selectedPath",initialState:[],reducers:{SET_SELECTION:(e,t)=>t.payload.path,STEP_BACK_SELECTION:e=>e===null||e.length===0?null:(e.pop(),e)}}),{SET_SELECTION:Sf,STEP_BACK_SELECTION:LW}=bA.actions;function rs(){return Qa(e=>e.selected_path)}function EA(){const e=Tr();return k.useCallback(n=>{e(Sf({path:n}))},[e])}const e5=bA.reducer;function t5(e){const t=rs(),n=EA(),r=k.useCallback(o=>{o.stopPropagation(),n(e)},[e,n]),i=Boolean(t&&ul(t,e));return{onClick:r,isSelected:i}}function SA({node:e,path:t,canDrag:n}){const r=wA({node:e,currentPath:t}),{onClick:i,isSelected:o}=t5(t);return P({onClick:i,"data-sue-path":Ef(t),"data-is-selected-node":o,"aria-label":e.uiName},n?r:{})}const bi=({path:e,node:t,canDrag:n=!0})=>{var a;const i=to(t.uiName).UiComponent,o=SA({path:e,node:t,canDrag:n}),l=k.useMemo(()=>s=>v(Q3,P({node:t,path:e},s)),[t,e]);return v(Xc,{fallbackRender:l,children:v(i,{wrapperProps:o,uiArguments:t.uiArguments,uiChildren:no(t)?(a=t.uiChildren)!=null?a:[]:[],path:e})})};function Ui(e){return e.length}function AA(e,t,n){return n===0?!0:ul(e.slice(0,n),t.slice(0,n))}function n5(e,t){const n=Ui(e),r=Ui(t);return n>=r?!1:AA(e,t,n)}function xA(e,t){const n=Math.min(e.length,t.length)-1;return n<=0?!0:AA(e,t,n)}function r5({fromPath:e,toPath:t}){if(e==null)return!0;if(n5(e,t))return!1;if(xA(e,t)){const n=e.length,r=e[n-1],i=t[n-1];if(r===i||r===i-1)return!1}return!0}function i5({child:e,wrapper:t}){if(typeof t=="function"){const n=t(e);if(n===null)return e;t=n}return W(P({},t),{uiChildren:[e]})}function CA(e){return typeof e=="object"&&e!==null}const o5={symbol:"s",character:"c",boolean:"b",number:"n",unknown:"u",expression:"e"};class Yn extends Error{constructor({message:t,cause:n}){super(),this.name="AST_PARSING_ERROR",this.message=t,this.cause=n}}function qt(e,t){return e.type===o5[t]}const l5=new Set(["c","n","b"]);function a5(e){return l5.has(e.type)}function nr(e){return e.type==="e"&&Array.isArray(e.val)}function s5(e,t){if(!nr(e))return!1;const{val:n}=e;return n[0].val==="<-"||n[0].val==="="?t?n[1].val===t:!0:!1}function _A(e){return e.val[1]}function u5(e){return e.val[2]}function qu(e){let t=[];return e.forEach(n=>{if(s5(n)){const r=_A(n);c5(r)?t.push({name:r.val[2].val,is_output:!0,node:n}):r.type==="s"&&t.push({name:r.val,is_output:!1,node:n})}if(nr(n)){const r=qu(n.val);t.push(...r)}}),t}function c5(e){if(!nr(e))return!1;const{val:t}=e;return t.length===3&&t[1].val==="output"&&typeof t[2].val=="string"}function kA(e){const t=e.filter(({is_output:r})=>r),n=new Set;return t.forEach(({name:r})=>{n.add(r)}),n}function f5(e){return!Boolean(e.pos)||!(_A(e).val==="ui")?!1:nr(u5(e))}function TA(e){const t=e.find(({name:r,is_output:i})=>r==="ui"&&!i);if(!t)throw new Yn({message:"No ui assignment node was found in provided ast"});const{node:n}=t;if(!f5(n))throw new Yn({message:"No position info attached to the ui assignment node",cause:n});return n}function Jo({node:e,explanation:t}){return{uiName:"unknownUiFunction",uiArguments:{text:nr(e)?NA(e.val):yg(e),explanation:t}}}function d5(e){return e[0].val==="c"}function p5(e){const t=e[0].val;return t==="c"||t==="list"}function h5(e){return nr(e)&&d5(e.val)}function m5(e){return nr(e)&&e.val[0].val==="list"}function g5(e){try{return IA(e)}catch(t){if(!(t instanceof Yn))throw t;return Jo({node:e,explanation:t.message})}}function IA(e){if(!nr(e))throw new Yn({message:"Tried to flatten a leaf/primative node"});const[t,...n]=e.val;if(t.val!=="c")throw new Yn({message:"Tried to flatten non array as array"});return n.map(r=>OA(r.val)?r.val:IA(r))}function y5(e){if(!nr(e))throw new Yn({message:"Tried to flatten a leaf/primative node"});try{const[t,...n]=e.val;if(t.val!=="list")throw new Yn({message:"Tried to flatten non array as array",cause:e});let r={};return n.forEach(({name:i,val:o})=>{if(typeof i!="string")throw new Yn({message:"All elements in list must have a name",cause:e});if(!OA(o))throw new Yn({message:"Nested lists are not supported",cause:e});r[i]=o}),r}catch(t){if(!(t instanceof Yn))throw t;return Jo({node:e,explanation:t.message})}}function OA(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function v5(e){return qt(e[0],"symbol")&&e[0].val==="function"}function w5(e){if(!qt(e,"expression")||e.val.length!==2)return!1;const[t,n]=e.val;return qt(t,"symbol")&&t.val==="("?qt(n,"expression")&&v5(n.val):!1}function b5([,e,t]){return`function(${e.val.map(r=>{var l;const i=(l=r.name)!=null?l:"name",o=r.val?` = ${r.val}`:"";return`${i}${o}`}).join(", ")}) {...}`}const PA=2,E5=" ".repeat(PA),gg=60,pi=` +${E5}`;function NA(e){const[t,...n]=e;let r;if(w5(t))r=`(${b5(t.val[1].val)})`;else if(qt(t,"symbol"))r=t.val;else return"Unknown Ui Code";const i=n.map(s=>`${s.name?`${s.name} = `:""}${yg(s)}`),o=RA({fn_name:r,fn_args_list:i,max_line_length_for_multi_args:p5(e)?gg:0}),l=`,${o?pi:" "}`,a=i.join(l);return`${r}(${o?pi:""}${a}${o?` `:""})`}function RA({fn_name:e,fn_args_list:t,max_line_length_for_multi_args:n}){if(t.some(l=>l.includes(` -`)))return!0;if(n===0)return t.length>1;const i=t.reduce((l,a)=>l+a.length+2,0),o=e.length+2;return i+o>n}function vg({val:e,type:t}){switch(t){case"b":return e?"TRUE":"FALSE";case"c":return`"${e}"`;case"m":return"";case"n":return String(e);case"s":return e;case"e":return Ba(NA(e));case"u":return"<...>"}}function Ba(e){return cI(e,PA)}const DA={default:null,bold:"strong",italic:"em"},S5={strong:"bold",em:"italic"},LA={default:"span",small:"small",headline:"h1",subtitle:"h2"},FA={h1:"headline",h2:"subtitle",small:"small"};function A5(e){return!!(qt(e,"character")||Xu(e)||MA(e))}function N1(e){return{contents:e.val[1].val,decoration:S5[e.val[0].val]}}function Xu(e){if(!qt(e,"expression"))return!1;const t=e.val[0];if(!(qt(t,"symbol")&&Object.values(DA).includes(t.val)))return!1;const r=e.val[1];return qt(r,"character")}function MA(e){if(!qt(e,"expression"))return!1;const t=e.val[0];if(!(qt(t,"symbol")&&t.val in FA))return!1;const r=e.val[1];return qt(r,"character")||Xu(r)}function R1(e){const t={uiName:"textNode",uiArguments:{contents:"TO_REPLACE"}};if(typeof e=="string")return t.uiArguments.contents=e,t;if(MA(e)){t.uiArguments.size=FA[e.val[0].val];const n=e.val[1];if(Xu(n)){const{decoration:r,contents:i}=N1(n);t.uiArguments.decoration=r,t.uiArguments.contents=i}else t.uiArguments.contents=n.val}else if(Xu(e)){const{decoration:n,contents:r}=N1(e);t.uiArguments.decoration=n,t.uiArguments.contents=r}else t.uiArguments.contents=e.val;return t}function wg(e){const[t,...n]=e.val;if(typeof t.val!="string")return Jo({node:e});let r={},i=[];n.forEach(l=>{l.name?r[l.name]=x5(l):i.push(C5(l))});const o=t9.get(t.val);return o===void 0?Jo({node:e}):{uiName:o,uiArguments:r,uiChildren:i.length>0?i:void 0}}function x5(e){return a5(e)?e.val:h5(e)?g5(e):m5(e)?y5(e):Jo({node:e})}function C5(e,t){return qt(e,"symbol")?Jo({node:e,explanation:"Unknown symbol"}):A5(e)?R1(e):nr(e)?wg(e):R1(vg(e))}function BA(e){return e.app_type==="SINGLE-FILE"?_5(e):k5(e)}function _5({app:{ast:e}}){const t=qu(e),n=TA(t);return{app_type:"SINGLE-FILE",app:{ui_tree:wg(n.val[2]),ui_pos:n.pos,ui_assignment_operator:n.val[0].val,known_outputs:kA(t)}}}function k5({ui:e,server:t}){const n=qu(e.ast),r=TA(n),i=qu(t.ast);return{app_type:"MULTI-FILE",ui:{ui_tree:wg(r.val[2]),ui_pos:r.pos,ui_assignment_operator:r.val[0].val},server:{known_outputs:kA(i)}}}function T5(e){if("ui_tree"in e)return O({mode:"MAIN"},e);try{const t=e.app_type==="SINGLE-FILE"?I5(e):P5(e);return O({mode:"MAIN"},t)}catch(t){const n=t instanceof Error?t.message:null;return n===null&&console.error("Unknown error type seen",t),{mode:"ERROR",msg:n!=null?n:"Unknown error",context:"Parsing app information from backend"}}}function I5(e){const t=BA(e),{app:{ui_pos:n,ui_assignment_operator:r,ui_tree:i,known_outputs:o}}=t,a=e.app.script.split(` -`);let s=["shiny"],u=[],c;return a.forEach((f,d)=>{var h,m;const p=UA({line:f,line_number:d,ui_pos:n});if(p==="Other"){u.push(f);return}if(p==="Library"){const E=(m=(h=bg.exec(f))==null?void 0:h.groups)==null?void 0:m.library;E&&E!=="shiny"&&s.push(E)}if(p!==c)if(c=p,p==="UI")u.push(`ui ${r} ${Xn.ui}`);else if(p==="Library")u.push(Xn.libraries);else throw new Error("Unknown line type")}),{app_type:"SINGLE-FILE",ui_tree:i,known_outputs:o,app:{code:u.join(` +`)))return!0;if(n===0)return t.length>1;const i=t.reduce((l,a)=>l+a.length+2,0),o=e.length+2;return i+o>n}function yg({val:e,type:t}){switch(t){case"b":return e?"TRUE":"FALSE";case"c":return`"${e}"`;case"m":return"";case"n":return String(e);case"s":return e;case"e":return Ba(NA(e));case"u":return"<...>"}}function Ba(e){return cI(e,PA)}const DA={default:null,bold:"strong",italic:"em"},S5={strong:"bold",em:"italic"},LA={default:"span",small:"small",headline:"h1",subtitle:"h2"},FA={h1:"headline",h2:"subtitle",small:"small"};function A5(e){return!!(qt(e,"character")||Xu(e)||MA(e))}function N1(e){return{contents:e.val[1].val,decoration:S5[e.val[0].val]}}function Xu(e){if(!qt(e,"expression"))return!1;const t=e.val[0];if(!(qt(t,"symbol")&&Object.values(DA).includes(t.val)))return!1;const r=e.val[1];return qt(r,"character")}function MA(e){if(!qt(e,"expression"))return!1;const t=e.val[0];if(!(qt(t,"symbol")&&t.val in FA))return!1;const r=e.val[1];return qt(r,"character")||Xu(r)}function R1(e){const t={uiName:"textNode",uiArguments:{contents:"TO_REPLACE"}};if(typeof e=="string")return t.uiArguments.contents=e,t;if(MA(e)){t.uiArguments.size=FA[e.val[0].val];const n=e.val[1];if(Xu(n)){const{decoration:r,contents:i}=N1(n);t.uiArguments.decoration=r,t.uiArguments.contents=i}else t.uiArguments.contents=n.val}else if(Xu(e)){const{decoration:n,contents:r}=N1(e);t.uiArguments.decoration=n,t.uiArguments.contents=r}else t.uiArguments.contents=e.val;return t}function vg(e){const[t,...n]=e.val;if(typeof t.val!="string")return Jo({node:e});let r={},i=[];n.forEach(l=>{l.name?r[l.name]=x5(l):i.push(C5(l))});const o=r9.get(t.val);return o===void 0?Jo({node:e}):{uiName:o,uiArguments:r,uiChildren:i.length>0?i:void 0}}function x5(e){return a5(e)?e.val:h5(e)?g5(e):m5(e)?y5(e):Jo({node:e})}function C5(e,t){return qt(e,"symbol")?Jo({node:e,explanation:"Unknown symbol"}):A5(e)?R1(e):nr(e)?vg(e):R1(yg(e))}function BA(e){return e.app_type==="SINGLE-FILE"?_5(e):k5(e)}function _5({app:{ast:e}}){const t=qu(e),n=TA(t);return{app_type:"SINGLE-FILE",app:{ui_tree:vg(n.val[2]),ui_pos:n.pos,ui_assignment_operator:n.val[0].val,known_outputs:kA(t)}}}function k5({ui:e,server:t}){const n=qu(e.ast),r=TA(n),i=qu(t.ast);return{app_type:"MULTI-FILE",ui:{ui_tree:vg(r.val[2]),ui_pos:r.pos,ui_assignment_operator:r.val[0].val},server:{known_outputs:kA(i)}}}function T5(e){if("ui_tree"in e)return P({mode:"MAIN"},e);try{const t=e.app_type==="SINGLE-FILE"?I5(e):P5(e);return P({mode:"MAIN"},t)}catch(t){const n=t instanceof Error?t.message:null;return n===null&&console.error("Unknown error type seen",t),{mode:"ERROR",msg:n!=null?n:"Unknown error",context:"Parsing app information from backend"}}}function I5(e){const t=BA(e),{app:{ui_pos:n,ui_assignment_operator:r,ui_tree:i,known_outputs:o}}=t,a=e.app.script.split(` +`);let s=["shiny"],u=[],c;return a.forEach((f,d)=>{var h,m;const p=UA({line:f,line_number:d,ui_pos:n});if(p==="Other"){u.push(f);return}if(p==="Library"){const E=(m=(h=wg.exec(f))==null?void 0:h.groups)==null?void 0:m.library;E&&E!=="shiny"&&s.push(E)}if(p!==c)if(c=p,p==="UI")u.push(`ui ${r} ${Xn.ui}`);else if(p==="Library")u.push(Xn.libraries);else throw new Error("Unknown line type")}),{app_type:"SINGLE-FILE",ui_tree:i,known_outputs:o,app:{code:u.join(` `),libraries:s}}}function O5({ui_pos:e,ui_assignment_operator:t},n){const r=n.split(` -`);let i=["shiny"],o=[],l;return r.forEach((a,s)=>{var c,f;const u=UA({line:a,line_number:s,ui_pos:e});if(u==="Other"){o.push(a);return}if(u==="Library"){const d=(f=(c=bg.exec(a))==null?void 0:c.groups)==null?void 0:f.library;d&&d!=="shiny"&&i.push(d)}if(u!==l)if(l=u,u==="UI")o.push(`ui ${t} ${Xn.ui}`);else if(u==="Library")o.push(Xn.libraries);else throw new Error("Unknown line type")}),{code:o.join(` -`),libraries:i}}function P5(e){const{ui:t,server:{known_outputs:n}}=BA(e);return{app_type:"MULTI-FILE",ui_tree:t.ui_tree,known_outputs:n,ui:O5(t,e.ui.script),server:{code:e.server.script}}}function N5(e,[t,n,r,i]){return e>=t-1&&e<=r-1}function UA({line:e,line_number:t,ui_pos:n}){return N5(t,n)?"UI":bg.test(e)?"Library":"Other"}const bg=new RegExp("^\\s*library\\((?\\w+)\\)"),Zu=(e,t)=>Array.from({length:e},(n,r)=>r),ec=(e,t)=>{const n=Math.abs(t-e)+1,r=ee+o*r)};function D1(e){let t=1/0,n=-1/0;for(let o of e)on&&(n=o);const r=n-t,i=Array.isArray(e)?e.length:e.size;return{minVal:t,maxVal:n,span:r,isSequence:r===i-1}}function Ua(e,t){return[...new Array(t)].fill(e)}function R5(e,t){return e.filter(n=>!t.includes(n))}function Eh(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function Qo(e,t,n){if(t<0)throw new Error("Can't add item at a negative index");const r=[...e];return t>r.length-1&&(r.length=t),r.splice(t,0,n),r}function D5(e,t,n){if(n<0)throw new Error("Can't add item at a negative index");if(t<0||t>e.length)throw new Error("Requested to move an element that is not in array");let r=[...e];const i=r[t];return r[t]=void 0,r=Qo(r,n,i),r.filter(o=>typeof o!="undefined")}function L5(e,t=", ",n=" and "){const r=e.length;if(r===1)return e[0];const i=e[r-1];return[...e].splice(0,r-1).join(t)+n+i}function F5(e){return[...new Set(e)]}function aa(e){return Array.isArray(e)?e:[e]}function Ei(e,t){let n=e,r;for(r of t){if(!no(n))throw new Error("Somehow trying to enter a leaf node");n=M5(n,r)}return n}function M5(e,t){var r;const n=(r=e.uiChildren)==null?void 0:r[t];if(!n)throw new Error(`Requested path does not exist. Attempt: parent: ${JSON.stringify(e,null,2)}, child_index: ${t}`);return n}function zA(e){return e.slice(0,e.length-1)}function B5(e){return e[e.length-1]}function U5(e,{path:t,node:n}){const r=zA(t),i=t[t.length-1],o=Ei(e,r);if(!no(o))throw new Error("Can't add a child to a non-container node. Check the path");Array.isArray(o.uiChildren)||(o.uiChildren=[]),o.uiChildren=Qo(o.uiChildren,i,n)}function jA(e,t){return z5(e,t)&&e.at(-1)!==t.at(-1)}function z5(e,t){const n=e.length,r=t.length;if(n!==r)return!1;const i=n-1;return ul(e.slice(0,i),t.slice(0,i))}function j5(e){if(!e.uiChildren)throw new Error("Somehow trying to enter a leaf node")}function WA(e,{path:t}){const{parentNode:n,indexToNode:r}=W5(e,t);if(!no(n))throw new Error("Somehow trying to enter a leaf node");j5(n),n.uiChildren.splice(r,1)}function W5(e,t){const n=[...t],r=n.pop();if(typeof r=="undefined")throw new Error("Path to node must have at least one element");const i=n.length===0?e:Ei(e,n);if(!no(i))throw new Error("Somehow trying to enter a leaf node");return{parentNode:i,indexToNode:r}}function Y5(e,{path:t,currentPath:n,node:r}){const i=zA(t),o=t[t.length-1],l=Ei(e,i);if(!no(l))throw new Error("Can't add a child to a non-container node. Check the path");Array.isArray(l.uiChildren)||(l.uiChildren=[]);const a=[...i,o];if(jA(n,a)){const s=n[n.length-1];l.uiChildren=D5(l.uiChildren,s,o);return}WA(e,{path:n}),l.uiChildren=Qo(l.uiChildren,o,r)}function YA(e){return"currentPath"in e&&e.currentPath!==void 0}function V5(e,t){const{path:n,node:r}=t;if(YA(t)){Y5(e,{path:n,currentPath:t.currentPath,node:r});return}U5(e,{path:n,node:r})}function $5(e,{path:t,node:n}){const r=Ei(e,t);Object.assign(r,n)}function VA(e){let t=null;return()=>{var n;if(t!==null)return t;t=new Set;for(const r of qo)if("stateUpdateSubscribers"in r){const i=(n=r.stateUpdateSubscribers)==null?void 0:n[e];i&&t.add(i)}return t}}const H5=VA("DELETE_NODE"),G5=VA("UPDATE_NODE"),$A=wf({name:"state",initialState:{mode:"LOADING"},reducers:{SET_FULL_STATE:(e,t)=>t.payload.state,SET_APP_INFO:(e,t)=>T5(t.payload),SET_ERROR:(e,{payload:t})=>O({mode:"ERROR"},t),SHOW_TEMPLATE_CHOOSER:(e,{payload:t})=>({mode:"TEMPLATE_CHOOSER",options:t}),SET_LOADING:e=>({mode:"LOADING"}),UPDATE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to update a node when in template chooser mode");for(const n of G5())n(e.ui_tree,t.payload);$5(e.ui_tree,t.payload)},PLACE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to move a node when in template chooser mode");V5(e.ui_tree,t.payload)},DELETE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to delete a node when in template chooser mode");for(const n of H5())n(e.ui_tree,{path:t.payload.path});WA(e.ui_tree,t.payload)}}}),{UPDATE_NODE:HA,PLACE_NODE:GA,DELETE_NODE:JA,SET_APP_INFO:J5,SET_ERROR:Q5,SET_FULL_STATE:QA,SHOW_TEMPLATE_CHOOSER:K5,SET_LOADING:DW}=$A.actions;function KA(){return Qa(e=>e.app_info)}const q5=$A.reducer;function Eg(){const e=Tr();return k.useCallback(o=>{var l=o,{wrappingNode:n,node:r}=l,i=ye(l,["wrappingNode","node"]);n&&(r=i5({child:r,wrapper:n})),e(GA(O({node:r},i)))},[e])}function Sg({getCanAcceptDrop:e,onDrop:t,onDragOver:n,canAcceptDropClass:r="can-accept-drop",hoveringOverClass:i="hovering-over"}){const o=k.useRef(null),l=yA(),a=vA(),{addCanAcceptDropHighlight:s,addHoveredOverHighlight:u,removeHoveredOverHighlight:c,removeAllHighlights:f}=X5({watcherRef:o,canAcceptDropClass:r,hoveringOverClass:i}),d=l?e(l):!1,p=k.useCallback(E=>{E.preventDefault(),E.stopPropagation(),u(),n==null||n()},[u,n]),h=k.useCallback(E=>{E.preventDefault(),c()},[c]),m=k.useCallback(E=>{if(E.stopPropagation(),c(),!l){console.error("No dragged node in context but a drop was detected...");return}d?t(l):console.error("Incompatable drag pairing"),a()},[d,l,t,c,a]);return k.useEffect(()=>{const E=o.current;if(E)return d&&(s(),E.addEventListener("dragenter",p),E.addEventListener("dragleave",h),E.addEventListener("dragover",p),E.addEventListener("drop",m)),()=>{f(),E.removeEventListener("dragenter",p),E.removeEventListener("dragleave",h),E.removeEventListener("dragover",p),E.removeEventListener("drop",m)}},[s,d,h,p,m,f,o]),o}function X5({watcherRef:e,canAcceptDropClass:t,hoveringOverClass:n}){const r=k.useCallback(()=>{e.current&&setTimeout(()=>{var a,s;(a=e.current)==null||a.classList.add(t),(s=e.current)==null||s.classList.add("can-accept-drop")},1)},[t,e]),i=k.useCallback(()=>{e.current&&e.current.classList.add(n)},[n,e]),o=k.useCallback(()=>{e.current&&e.current.classList.remove(n)},[n,e]),l=k.useCallback(()=>{e.current&&(e.current.classList.remove(n),e.current.classList.remove(t),e.current.classList.remove("can-accept-drop"))},[t,n,e]);return{addCanAcceptDropHighlight:r,addHoveredOverHighlight:i,removeHoveredOverHighlight:o,removeAllHighlights:l}}function zi(s){var u=s,{index:e,parentNodeType:t,parentPath:n,dropHandlerArgs:r,className:i="",wrappingNode:o,dropFilters:l}=u,a=ye(u,["index","parentNodeType","parentPath","dropHandlerArgs","className","wrappingNode","dropFilters"]);const c=Eg(),f=Sg(O({onDrop:p=>{c(W(O({},p),{path:er(n,e),wrappingNode:o}))},getCanAcceptDrop:p=>{var g;const{node:h,currentPath:m}=p;if(!r5({fromPath:m,toPath:[...n,e]}))return!1;const E=to(h.uiName);return"allowedParents"in E&&!((g=E.allowedParents)!=null&&g.includes(t))?!1:l?"accepted"in l?h.uiName in l.accepted:!(h.uiName in l.rejected):!0}},r)),d=typeof i=="string"?i:i(e);return v("div",W(O({ref:f,className:d},a),{"data-index":e}))}const Z5="_card_body_fill_bahaw_1",eD="_card_children_container_bahaw_17",tD="_empty_msg_bahaw_34",nD="_drop_watcher_bahaw_42",rD="_missing_card_element_bahaw_66",iD="_card_footer_bahaw_91",oD="_card_header_bahaw_97",sn={card_body_fill:Z5,card_children_container:eD,empty_msg:tD,drop_watcher:nD,missing_card_element:rD,card_footer:iD,card_header:oD};function qA({children:e}){return v("div",{className:sn.card_children_container,children:e})}function XA(i){var o=i,{className:e,children:t,args:n={}}=o,r=ye(o,["className","children","args"]);const l={gap:n==null?void 0:n.gap};return v("div",W(O({className:Ke(e,"card-body",sn.card_body_fill)},r),{children:v("div",{className:sn.card_children_container,style:l,children:t})}))}function ZA(r){var i=r,{className:e,children:t}=i,n=ye(i,["className","children"]);return v("div",W(O({className:Ke(e,"card-footer",sn.card_footer)},n),{children:v(qA,{children:t})}))}function ex(r){var i=r,{className:e,children:t}=i,n=ye(i,["className","children"]);return v("div",W(O({className:Ke(e,"card-header",sn.card_header)},n),{children:v(qA,{children:t})}))}const lD=new Set(["bslib::card_body_fill","bslib::card_header","bslib::card_footer"]),aD={uiName:"bslib::card_header",uiArguments:{}},sD={uiName:"bslib::card_body_fill",uiArguments:{}},uD={uiName:"bslib::card_footer",uiArguments:{}};function tx(e=[],t){let n=null,r=null,i=null,o=0;e.forEach(s=>{const{uiName:u}=s;if(!lD.has(u)){console.warn("Unknown child of a grid card seen. Ignoring",s);return}const c=v(bi,{node:s,path:er(t,o),canDrag:!1});o++,u==="bslib::card_header"?n=c:u==="bslib::card_body_fill"?r=c:u==="bslib::card_footer"&&(i=c)});const l=Boolean(n),a=Boolean(r);return U(Ne,{children:[n!=null?n:v(ex,{className:sn.missing_card_element,children:v(zi,{className:sn.drop_watcher,index:0,parentPath:t,wrappingNode:aD,parentNodeType:"bslib::card_header"})}),r!=null?r:v(XA,{className:sn.missing_card_element,children:v(zi,{className:sn.drop_watcher,index:cv(l),parentPath:t,wrappingNode:sD,parentNodeType:"bslib::card_body_fill"})}),i!=null?i:v(ZA,{className:sn.missing_card_element,children:v(zi,{className:sn.drop_watcher,index:cv(l,a),parentPath:t,wrappingNode:uD,parentNodeType:"bslib::card_footer"})})]})}const cD=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(RE,W(O({},r),{card_args:e,children:tx(t,n)})),nx={full_screen:{inputType:"boolean",defaultValue:!0,label:"Allow fullscreen mode?",optional:!0}},fD=xe()({library:"bslib",name:"card",title:"Card",takesChildren:!0,UiComponent:cD,settingsInfo:nx,iconSrc:eI,category:"Containers",description:"Bootstrap card with smart fill behavior",default_node:{uiArguments:{full_screen:!0},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Header"}}]}]}});function dD(e){return e.uiName==="bslib::card"}function Ag({parentUiName:e,uiChildren:t=[],path:n,dropPanelClass:r=sn.drop_watcher,showOnEmpty:i}){return U(Ne,{children:[v(zi,{className:r,index:0,parentPath:n,parentNodeType:e,children:t.length===0?i:null}),t.map((o,l)=>U(k.Fragment,{children:[v(bi,{path:er(n,l),node:o}),v(zi,{className:r,index:l+1,parentPath:n,parentNodeType:e})]},n.join(".")+l))]})}const pD=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(XA,W(O({},r),{args:e,children:v(Ag,{uiChildren:t,path:n,parentUiName:"bslib::card_body_fill"})})),hD=xe()({library:"bslib",name:"card_body_fill",title:"Card Body",takesChildren:!0,UiComponent:pD,settingsInfo:{gap:{label:"Gap between items",inputType:"cssMeasure",optional:!0,defaultValue:"10px",units:["px","rem"]},max_height:{label:"Max allowed height",inputType:"cssMeasure",optional:!0,defaultValue:e=>{var t;return e&&(t=e.uiArguments.min_height)!=null?t:"500px"},units:["px","%"]},min_height:{label:"Min allowed height",inputType:"cssMeasure",optional:!0,defaultValue:e=>{var t;return e&&(t=e.uiArguments.max_height)!=null?t:"100px"},units:["px","%"]}},category:"Cards",description:"body holder for bslib cards"}),mD=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(ZA,W(O({},r),{children:v(Ag,{uiChildren:t,path:n,parentUiName:"bslib::card_footer"})})),gD=xe()({library:"bslib",name:"card_footer",title:"Card Footer",takesChildren:!0,UiComponent:mD,settingsInfo:{},category:"Cards",description:"Header for bslib cards"}),yD=e=>{const{uiChildren:t,path:n,wrapperProps:r}=e;return v(ex,W(O({},r),{children:v(Ag,{uiChildren:t,path:n,parentUiName:"bslib::card_header"})}))},vD=xe()({library:"bslib",name:"card_header",title:"Card Header",takesChildren:!0,UiComponent:yD,settingsInfo:{},category:"Cards",description:"Header for bslib cards"}),wD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEA0lEQVR4nO3du24cZRyG8ceIQ0FKuINtEBEHK1IqXwEIylUiKmwp0KO5iK3ScZATGoQ1JQi4ATehiAMSEc223EGIFFMsxcyCZaEVG++7M//V82vGa49X32c9+400I8/sLRYLpE17YegBaDcZliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliJeHHoA62ra+eVv7QO3gAPgTeDatse0YU+Ax8ApcAKcXfzhbDoZYkxrq75iHQMPgc+Am9SPCro53KSb00PguEpMF5VbsS74DvgAOAe+oPt0/zabTp78n1/uV77lk9b3AuP7573XCaNp59eA63Sr8CfAYdPOXwc+3PgIg6qGdUwX1R/A+7Pp5Jdhh7M5/QfjAfCgaedfAz/QzfUecDjk2NZR8VD4Lt0f+Jwdi+qyfm7vAc+Aj+nmXkLFsG732y93Oaql2XTyK/BV//L2qn3HpGJYB/3220FHsV3LuR6s3GtEKoa132/PVu61Wx71Ww+FQS8BzKaT86EHsi2z6eRZ/+XLgw5kDRXDUgGGpQjDUkTVE6T/dc1wtCqNdVPKhsW/l0zG9l7bfO/R8lCoiMor1iYuHG/lIvSG368EVyxFGJYiDEsRhqUIw1KEYSnCsBRhWIqofILUSzoj5oqliMorlpd0RswVSxGGpQjDUoRhKcKwFGFYijAsRRiWIiqfIPWSzoi5Yimi8orlJZ0RKxvWVW/4us3/Tt7EzWmr/Te1h0JFGJYiDEsRFcP6C6Bp52XubndV/b3foXtqRQkVw1ree3R/5V675Xq/fTzoKNZQMazTfntr0FFs13Kupyv3GpGKYZ302ztNO3970JFsQdPO3wLu9C9PVu07JhXDOgPuA68APzbt/J1hh5PTf3B+opvrfQrdgrzqCdJD4DW6Z8z83LTzz4FvgN9n08mfg47sipp2/irwBvAR8CndLbi/p9BzdAD2FotSVwoun4E+ptgf/Dncm00nR8t5V3nEXMVD4UVHwA3gLt2z/Z4OOprNeEo3l7vAjdl0cjTscJ5PuRVLNVRfsTRShqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYi/gbCBJi6eIkmgAAAAABJRU5ErkJggg==",Af=({type:e,name:t,className:n})=>U("code",{className:n,children:[U("span",{style:{opacity:.55},children:[e,"$"]}),v("span",{children:t})]}),bD=4,ED=25,SD=Zu(ED).map(e=>v("div",{className:"faux-row",children:Zu(bD).map(t=>v("div",{className:"faux-cell",children:"i"},t))},e)),AD=({uiArguments:e,path:t,wrapperProps:n})=>v("div",W(O({className:"dtDTOutput"},n),{children:U("div",{className:"faux-table",style:{"--table-w":e.width,"--table-h":e.height},children:[U("div",{className:"faux-header",children:["Table: ",v(Af,{type:"output",name:e.outputId})]}),v("div",{className:"faux-table-body",children:SD})]})})),xD=xe()({library:"DT",name:"DTOutput",title:"DT Table",takesChildren:!1,UiComponent:AD,settingsInfo:{outputId:{inputType:"string",label:"Output ID",defaultValue:"myTable"},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"auto",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderDT({ +`);let i=["shiny"],o=[],l;return r.forEach((a,s)=>{var c,f;const u=UA({line:a,line_number:s,ui_pos:e});if(u==="Other"){o.push(a);return}if(u==="Library"){const d=(f=(c=wg.exec(a))==null?void 0:c.groups)==null?void 0:f.library;d&&d!=="shiny"&&i.push(d)}if(u!==l)if(l=u,u==="UI")o.push(`ui ${t} ${Xn.ui}`);else if(u==="Library")o.push(Xn.libraries);else throw new Error("Unknown line type")}),{code:o.join(` +`),libraries:i}}function P5(e){const{ui:t,server:{known_outputs:n}}=BA(e);return{app_type:"MULTI-FILE",ui_tree:t.ui_tree,known_outputs:n,ui:O5(t,e.ui.script),server:{code:e.server.script}}}function N5(e,[t,n,r,i]){return e>=t-1&&e<=r-1}function UA({line:e,line_number:t,ui_pos:n}){return N5(t,n)?"UI":wg.test(e)?"Library":"Other"}const wg=new RegExp("^\\s*library\\((?\\w+)\\)"),Zu=(e,t)=>Array.from({length:e},(n,r)=>r),ec=(e,t)=>{const n=Math.abs(t-e)+1,r=ee+o*r)};function D1(e){let t=1/0,n=-1/0;for(let o of e)on&&(n=o);const r=n-t,i=Array.isArray(e)?e.length:e.size;return{minVal:t,maxVal:n,span:r,isSequence:r===i-1}}function Ua(e,t){return[...new Array(t)].fill(e)}function R5(e,t){return e.filter(n=>!t.includes(n))}function Eh(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function Qo(e,t,n){if(t<0)throw new Error("Can't add item at a negative index");const r=[...e];return t>r.length-1&&(r.length=t),r.splice(t,0,n),r}function D5(e,t,n){if(n<0)throw new Error("Can't add item at a negative index");if(t<0||t>e.length)throw new Error("Requested to move an element that is not in array");let r=[...e];const i=r[t];return r[t]=void 0,r=Qo(r,n,i),r.filter(o=>typeof o!="undefined")}function L5(e,t=", ",n=" and "){const r=e.length;if(r===1)return e[0];const i=e[r-1];return[...e].splice(0,r-1).join(t)+n+i}function F5(e){return[...new Set(e)]}function aa(e){return Array.isArray(e)?e:[e]}function Ei(e,t){let n=e,r;for(r of t){if(!no(n))throw new Error("Somehow trying to enter a leaf node");n=M5(n,r)}return n}function M5(e,t){var r;const n=(r=e.uiChildren)==null?void 0:r[t];if(!n)throw new Error(`Requested path does not exist. Attempt: parent: ${JSON.stringify(e,null,2)}, child_index: ${t}`);return n}function zA(e){return e.slice(0,e.length-1)}function B5(e){return e[e.length-1]}function U5(e,{path:t,node:n}){const r=zA(t),i=t[t.length-1],o=Ei(e,r);if(!no(o))throw new Error("Can't add a child to a non-container node. Check the path");Array.isArray(o.uiChildren)||(o.uiChildren=[]),o.uiChildren=Qo(o.uiChildren,i,n)}function jA(e,t){return z5(e,t)&&e.at(-1)!==t.at(-1)}function z5(e,t){const n=e.length,r=t.length;if(n!==r)return!1;const i=n-1;return ul(e.slice(0,i),t.slice(0,i))}function j5(e){if(!e.uiChildren)throw new Error("Somehow trying to enter a leaf node")}function WA(e,{path:t}){const{parentNode:n,indexToNode:r}=W5(e,t);if(!no(n))throw new Error("Somehow trying to enter a leaf node");j5(n),n.uiChildren.splice(r,1)}function W5(e,t){const n=[...t],r=n.pop();if(typeof r=="undefined")throw new Error("Path to node must have at least one element");const i=n.length===0?e:Ei(e,n);if(!no(i))throw new Error("Somehow trying to enter a leaf node");return{parentNode:i,indexToNode:r}}function Y5(e,{path:t,currentPath:n,node:r}){const i=zA(t),o=t[t.length-1],l=Ei(e,i);if(!no(l))throw new Error("Can't add a child to a non-container node. Check the path");Array.isArray(l.uiChildren)||(l.uiChildren=[]);const a=[...i,o];if(jA(n,a)){const s=n[n.length-1];l.uiChildren=D5(l.uiChildren,s,o);return}WA(e,{path:n}),l.uiChildren=Qo(l.uiChildren,o,r)}function YA(e){return"currentPath"in e&&e.currentPath!==void 0}function V5(e,t){const{path:n,node:r}=t;if(YA(t)){Y5(e,{path:n,currentPath:t.currentPath,node:r});return}U5(e,{path:n,node:r})}function $5(e,{path:t,node:n}){const r=Ei(e,t);Object.assign(r,n)}function VA(e){let t=null;return()=>{var n;if(t!==null)return t;t=new Set;for(const r of qo)if("stateUpdateSubscribers"in r){const i=(n=r.stateUpdateSubscribers)==null?void 0:n[e];i&&t.add(i)}return t}}const H5=VA("DELETE_NODE"),G5=VA("UPDATE_NODE"),$A=wf({name:"state",initialState:{mode:"LOADING"},reducers:{SET_FULL_STATE:(e,t)=>t.payload.state,SET_APP_INFO:(e,t)=>T5(t.payload),SET_ERROR:(e,{payload:t})=>P({mode:"ERROR"},t),SHOW_TEMPLATE_CHOOSER:(e,{payload:t})=>({mode:"TEMPLATE_CHOOSER",options:t}),SET_LOADING:e=>({mode:"LOADING"}),UPDATE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to update a node when in template chooser mode");for(const n of G5())n(e.ui_tree,t.payload);$5(e.ui_tree,t.payload)},PLACE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to move a node when in template chooser mode");V5(e.ui_tree,t.payload)},DELETE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to delete a node when in template chooser mode");for(const n of H5())n(e.ui_tree,{path:t.payload.path});WA(e.ui_tree,t.payload)}}}),{UPDATE_NODE:HA,PLACE_NODE:GA,DELETE_NODE:JA,SET_APP_INFO:J5,SET_ERROR:Q5,SET_FULL_STATE:QA,SHOW_TEMPLATE_CHOOSER:K5,SET_LOADING:FW}=$A.actions;function KA(){return Qa(e=>e.app_info)}const q5=$A.reducer;function bg(){const e=Tr();return k.useCallback(o=>{var l=o,{wrappingNode:n,node:r}=l,i=ye(l,["wrappingNode","node"]);n&&(r=i5({child:r,wrapper:n})),e(GA(P({node:r},i)))},[e])}function Eg({getCanAcceptDrop:e,onDrop:t,onDragOver:n,canAcceptDropClass:r="can-accept-drop",hoveringOverClass:i="hovering-over"}){const o=k.useRef(null),l=yA(),a=vA(),{addCanAcceptDropHighlight:s,addHoveredOverHighlight:u,removeHoveredOverHighlight:c,removeAllHighlights:f}=X5({watcherRef:o,canAcceptDropClass:r,hoveringOverClass:i}),d=l?e(l):!1,p=k.useCallback(E=>{E.preventDefault(),E.stopPropagation(),u(),n==null||n()},[u,n]),h=k.useCallback(E=>{E.preventDefault(),c()},[c]),m=k.useCallback(E=>{if(E.stopPropagation(),c(),!l){console.error("No dragged node in context but a drop was detected...");return}d?t(l):console.error("Incompatable drag pairing"),a()},[d,l,t,c,a]);return k.useEffect(()=>{const E=o.current;if(E)return d&&(s(),E.addEventListener("dragenter",p),E.addEventListener("dragleave",h),E.addEventListener("dragover",p),E.addEventListener("drop",m)),()=>{f(),E.removeEventListener("dragenter",p),E.removeEventListener("dragleave",h),E.removeEventListener("dragover",p),E.removeEventListener("drop",m)}},[s,d,h,p,m,f,o]),o}function X5({watcherRef:e,canAcceptDropClass:t,hoveringOverClass:n}){const r=k.useCallback(()=>{e.current&&setTimeout(()=>{var a,s;(a=e.current)==null||a.classList.add(t),(s=e.current)==null||s.classList.add("can-accept-drop")},1)},[t,e]),i=k.useCallback(()=>{e.current&&e.current.classList.add(n)},[n,e]),o=k.useCallback(()=>{e.current&&e.current.classList.remove(n)},[n,e]),l=k.useCallback(()=>{e.current&&(e.current.classList.remove(n),e.current.classList.remove(t),e.current.classList.remove("can-accept-drop"))},[t,n,e]);return{addCanAcceptDropHighlight:r,addHoveredOverHighlight:i,removeHoveredOverHighlight:o,removeAllHighlights:l}}function zi(s){var u=s,{index:e,parentNodeType:t,parentPath:n,dropHandlerArgs:r,className:i="",wrappingNode:o,dropFilters:l}=u,a=ye(u,["index","parentNodeType","parentPath","dropHandlerArgs","className","wrappingNode","dropFilters"]);const c=bg(),f=Eg(P({onDrop:p=>{c(W(P({},p),{path:er(n,e),wrappingNode:o}))},getCanAcceptDrop:p=>{var g;const{node:h,currentPath:m}=p;if(!r5({fromPath:m,toPath:[...n,e]}))return!1;const E=to(h.uiName);return"allowedParents"in E&&!((g=E.allowedParents)!=null&&g.includes(t))?!1:l?"accepted"in l?h.uiName in l.accepted:!(h.uiName in l.rejected):!0}},r)),d=typeof i=="string"?i:i(e);return v("div",W(P({ref:f,className:d},a),{"data-index":e}))}const Z5="_card_body_fill_bahaw_1",eD="_card_children_container_bahaw_17",tD="_empty_msg_bahaw_34",nD="_drop_watcher_bahaw_42",rD="_missing_card_element_bahaw_66",iD="_card_footer_bahaw_91",oD="_card_header_bahaw_97",sn={card_body_fill:Z5,card_children_container:eD,empty_msg:tD,drop_watcher:nD,missing_card_element:rD,card_footer:iD,card_header:oD};function qA({children:e}){return v("div",{className:sn.card_children_container,children:e})}function XA(i){var o=i,{className:e,children:t,args:n={}}=o,r=ye(o,["className","children","args"]);const l={gap:n==null?void 0:n.gap};return v("div",W(P({className:Ke(e,"card-body",sn.card_body_fill)},r),{children:v("div",{className:sn.card_children_container,style:l,children:t})}))}function ZA(r){var i=r,{className:e,children:t}=i,n=ye(i,["className","children"]);return v("div",W(P({className:Ke(e,"card-footer",sn.card_footer)},n),{children:v(qA,{children:t})}))}function ex(r){var i=r,{className:e,children:t}=i,n=ye(i,["className","children"]);return v("div",W(P({className:Ke(e,"card-header",sn.card_header)},n),{children:v(qA,{children:t})}))}const lD=new Set(["bslib::card_body_fill","bslib::card_header","bslib::card_footer"]),aD={uiName:"bslib::card_header",uiArguments:{}},sD={uiName:"bslib::card_body_fill",uiArguments:{}},uD={uiName:"bslib::card_footer",uiArguments:{}};function tx(e=[],t){let n=null,r=null,i=null,o=0;e.forEach(s=>{const{uiName:u}=s;if(!lD.has(u)){console.warn("Unknown child of a grid card seen. Ignoring",s);return}const c=v(bi,{node:s,path:er(t,o),canDrag:!1});o++,u==="bslib::card_header"?n=c:u==="bslib::card_body_fill"?r=c:u==="bslib::card_footer"&&(i=c)});const l=Boolean(n),a=Boolean(r);return U(Ne,{children:[n!=null?n:v(ex,{className:sn.missing_card_element,children:v(zi,{className:sn.drop_watcher,index:0,parentPath:t,wrappingNode:aD,parentNodeType:"bslib::card_header"})}),r!=null?r:v(XA,{className:sn.missing_card_element,children:v(zi,{className:sn.drop_watcher,index:cv(l),parentPath:t,wrappingNode:sD,parentNodeType:"bslib::card_body_fill"})}),i!=null?i:v(ZA,{className:sn.missing_card_element,children:v(zi,{className:sn.drop_watcher,index:cv(l,a),parentPath:t,wrappingNode:uD,parentNodeType:"bslib::card_footer"})})]})}const cD=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(RE,W(P({},r),{card_args:e,children:tx(t,n)})),nx={full_screen:{inputType:"boolean",defaultValue:!0,label:"Allow fullscreen mode?",optional:!0}},fD=xe()({library:"bslib",name:"card",title:"Card",takesChildren:!0,UiComponent:cD,settingsInfo:nx,iconSrc:eI,category:"Containers",description:"Bootstrap card with smart fill behavior",default_node:{uiArguments:{full_screen:!0},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Header"}}]}]}});function dD(e){return e.uiName==="bslib::card"}function Sg({parentUiName:e,uiChildren:t=[],path:n,dropPanelClass:r=sn.drop_watcher,showOnEmpty:i}){return U(Ne,{children:[v(zi,{className:r,index:0,parentPath:n,parentNodeType:e,children:t.length===0?i:null}),t.map((o,l)=>U(k.Fragment,{children:[v(bi,{path:er(n,l),node:o}),v(zi,{className:r,index:l+1,parentPath:n,parentNodeType:e})]},n.join(".")+l))]})}const pD=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(XA,W(P({},r),{args:e,children:v(Sg,{uiChildren:t,path:n,parentUiName:"bslib::card_body_fill"})})),hD=xe()({library:"bslib",name:"card_body_fill",title:"Card Body",takesChildren:!0,UiComponent:pD,settingsInfo:{gap:{label:"Gap between items",inputType:"cssMeasure",optional:!0,defaultValue:"10px",units:["px","rem"]},max_height:{label:"Max allowed height",inputType:"cssMeasure",optional:!0,defaultValue:e=>{var t;return e&&(t=e.uiArguments.min_height)!=null?t:"500px"},units:["px","%"]},min_height:{label:"Min allowed height",inputType:"cssMeasure",optional:!0,defaultValue:e=>{var t;return e&&(t=e.uiArguments.max_height)!=null?t:"100px"},units:["px","%"]}},category:"Cards",description:"body holder for bslib cards"}),mD=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(ZA,W(P({},r),{children:v(Sg,{uiChildren:t,path:n,parentUiName:"bslib::card_footer"})})),gD=xe()({library:"bslib",name:"card_footer",title:"Card Footer",takesChildren:!0,UiComponent:mD,settingsInfo:{},category:"Cards",description:"Header for bslib cards"}),yD=e=>{const{uiChildren:t,path:n,wrapperProps:r}=e;return v(ex,W(P({},r),{children:v(Sg,{uiChildren:t,path:n,parentUiName:"bslib::card_header"})}))},vD=xe()({library:"bslib",name:"card_header",title:"Card Header",takesChildren:!0,UiComponent:yD,settingsInfo:{},category:"Cards",description:"Header for bslib cards"}),wD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEA0lEQVR4nO3du24cZRyG8ceIQ0FKuINtEBEHK1IqXwEIylUiKmwp0KO5iK3ScZATGoQ1JQi4ATehiAMSEc223EGIFFMsxcyCZaEVG++7M//V82vGa49X32c9+400I8/sLRYLpE17YegBaDcZliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliJeHHoA62ra+eVv7QO3gAPgTeDatse0YU+Ax8ApcAKcXfzhbDoZYkxrq75iHQMPgc+Am9SPCro53KSb00PguEpMF5VbsS74DvgAOAe+oPt0/zabTp78n1/uV77lk9b3AuP7573XCaNp59eA63Sr8CfAYdPOXwc+3PgIg6qGdUwX1R/A+7Pp5Jdhh7M5/QfjAfCgaedfAz/QzfUecDjk2NZR8VD4Lt0f+Jwdi+qyfm7vAc+Aj+nmXkLFsG732y93Oaql2XTyK/BV//L2qn3HpGJYB/3220FHsV3LuR6s3GtEKoa132/PVu61Wx71Ww+FQS8BzKaT86EHsi2z6eRZ/+XLgw5kDRXDUgGGpQjDUkTVE6T/dc1wtCqNdVPKhsW/l0zG9l7bfO/R8lCoiMor1iYuHG/lIvSG368EVyxFGJYiDEsRhqUIw1KEYSnCsBRhWIqofILUSzoj5oqliMorlpd0RswVSxGGpQjDUoRhKcKwFGFYijAsRRiWIiqfIPWSzoi5Yimi8orlJZ0RKxvWVW/4us3/Tt7EzWmr/Te1h0JFGJYiDEsRFcP6C6Bp52XubndV/b3foXtqRQkVw1ree3R/5V675Xq/fTzoKNZQMazTfntr0FFs13Kupyv3GpGKYZ302ztNO3970JFsQdPO3wLu9C9PVu07JhXDOgPuA68APzbt/J1hh5PTf3B+opvrfQrdgrzqCdJD4DW6Z8z83LTzz4FvgN9n08mfg47sipp2/irwBvAR8CndLbi/p9BzdAD2FotSVwoun4E+ptgf/Dncm00nR8t5V3nEXMVD4UVHwA3gLt2z/Z4OOprNeEo3l7vAjdl0cjTscJ5PuRVLNVRfsTRShqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYi/gbCBJi6eIkmgAAAAABJRU5ErkJggg==",Af=({type:e,name:t,className:n})=>U("code",{className:n,children:[U("span",{style:{opacity:.55},children:[e,"$"]}),v("span",{children:t})]}),bD=4,ED=25,SD=Zu(ED).map(e=>v("div",{className:"faux-row",children:Zu(bD).map(t=>v("div",{className:"faux-cell",children:"i"},t))},e)),AD=({uiArguments:e,path:t,wrapperProps:n})=>v("div",W(P({className:"dtDTOutput"},n),{children:U("div",{className:"faux-table",style:{"--table-w":e.width,"--table-h":e.height},children:[U("div",{className:"faux-header",children:["Table: ",v(Af,{type:"output",name:e.outputId})]}),v("div",{className:"faux-table-body",children:SD})]})})),xD=xe()({library:"DT",name:"DTOutput",title:"DT Table",takesChildren:!1,UiComponent:AD,settingsInfo:{outputId:{inputType:"string",label:"Output ID",defaultValue:"myTable"},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"auto",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderDT({ iris -})`}},iconSrc:wD,category:"Outputs",description:"`DataTable` table output"}),xg=["gridlayout::grid_container","gridlayout::grid_page"],CD=new Set(["gridlayout::grid_card_text","gridlayout::grid_card","gridlayout::grid_card_plot"]);function Sh(e){return CD.has(e.uiName)}const _D="_hoveringOverSwap_l95oj_1",kD="_availableToSwap_l95oj_2",TD="_pulse_l95oj_1",ID="_emptyGridCard_l95oj_52",OD="_emptyMessage_l95oj_69",L1={hoveringOverSwap:_D,availableToSwap:kD,pulse:TD,emptyGridCard:ID,emptyMessage:OD},rx=k.createContext(null);function PD(){return k.useContext(rx)}function Cg({path:e,area:t}){const n=yA(),r=PD(),i=k.useCallback(({node:a,currentPath:s})=>s===void 0||!Sh(a)?!1:jA(s,e),[e]),o=k.useCallback(a=>{var u;if(!("area"in a.node.uiArguments)){console.error("Invalid grid area swap drop",{dropInfo:a});return}const s=(u=a.node.uiArguments.area)!=null?u:"__BAD_DROP__";r==null||r({type:"SWAP_ITEMS",item_a:t,item_b:s})},[t,r]),l=Sg({getCanAcceptDrop:i,onDrop:o,canAcceptDropClass:L1.availableToSwap,hoveringOverClass:L1.hoveringOverSwap});return k.useEffect(()=>{l.current&&(l.current.dataset.gridArea=t)},[t,l]),k.useEffect(()=>{l.current&&(n!=null&&n.node)&&"area"in n.node.uiArguments&&(l.current.dataset.swapWith=n.node.uiArguments.area)},[n==null?void 0:n.node,l]),l}const ND=e=>{const a=e,{uiArguments:s}=a,u=s,{area:t}=u,n=ye(u,["area"]),{uiChildren:r=[],path:i,wrapperProps:o}=a,l=Cg({area:t,path:i});return v(RE,W(O({ref:l,style:{gridArea:t},card_args:n},o),{children:tx(r,i)}))},RD=xe()({library:"gridlayout",name:"grid_card",title:"Grid Card",takesChildren:!0,UiComponent:ND,settingsInfo:O({area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"}},nx),allowedParents:xg,category:"gridlayout",description:"bslib styled card for grid layouts"}),_g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAACYElEQVR4nO3cMYoUQQBA0RqRPYBn8E5GhqYbLiZeYDNzs428k1dwU8M2UGFZFmYUf/d013vRTEFDBZ+qomj6tCzLgP/t1dYT4JiERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEXi9dYT+Fd3X78tz4ZOm0xkJffv3m49hb9ixSIhrPNuxhifxxjfxxiPv3/fbDqjHdjtVrii+zHG7ZP/t2OMH2OMj9tMZx+sWOe9f2Hsw+qz2BlhnffmwjGeEBYJYZEQFglhkRAWCWF1pr5YdUHamfpi1YrVmfpiVVidqS9WZwpr6jPP2mY6Y0195lnbTCvW1Geetc0U1tRnnrXNFBYrEhYJYZEQFglhkRAWCWGREBYJYZEQFglhkRAWiZnCerxwbOvnDmGmsB5eGPtyhc8dwkwv+t2NXx9n+/Ne1sMY49MVPncIp2V5/mG8ffBFv+s201bIioRF4khnrH3u6Zfb1VZvxSIhLBLCIrHb6waumxWLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi8RPaOk2ptnQzzIAAAAASUVORK5CYII=";var ix={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},F1=k.createContext&&k.createContext(ix),li=globalThis&&globalThis.__assign||function(){return li=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{if(typeof ResizeObserver=="undefined")return;const r=new ResizeObserver(i=>{if(!e.current)return;const{offsetHeight:o,offsetWidth:l}=e.current;n({width:l,height:o})});return e.current&&r.observe(e.current),()=>r.disconnect()},[e]),t}const ax=k.forwardRef((i,r)=>{var o=i,{className:e="",children:t}=o,n=ye(o,["className","children"]);const l=e+" card";return v("div",W(O({ref:r,className:l},n),{children:t}))});k.forwardRef((r,n)=>{var i=r,{className:e=""}=i,t=ye(i,["className"]);const o=e+" card-header";return v("div",O({ref:n,className:o},t))});const jD="_gridCardPlot_1a94v_1",WD={gridCardPlot:jD},YD=({uiArguments:{outputId:e,area:t},path:n,wrapperProps:r})=>{const i=Cg({area:t,path:n});return v(ax,W(O({ref:i,style:{gridArea:t},className:Ke(WD.gridCardPlot,"gridlayout-gridCardPlot")},r),{children:v(lx,{outputId:e!=null?e:t})}))},VD=xe()({library:"gridlayout",name:"grid_card_plot",title:"Grid Plot Card",takesChildren:!1,UiComponent:YD,settingsInfo:{area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"},outputId:{label:"Output ID",inputType:"string",defaultValue:function(e){return e&&"area"in e.uiArguments?e.uiArguments.area:"MyPlot"},optional:!0}},serverBindings:{outputs:{outputIdKey:e=>e.outputId?"outputId":"area",renderScaffold:`renderPlot({ +})`}},iconSrc:wD,category:"Outputs",description:"`DataTable` table output"}),Ag=["gridlayout::grid_container","gridlayout::grid_page"],CD=["gridlayout::grid_card","gridlayout::grid_card_text","gridlayout::grid_card_plot"],_D=new Set(CD);function xg(e){return _D.has(e.uiName)}const kD="_hoveringOverSwap_l95oj_1",TD="_availableToSwap_l95oj_2",ID="_pulse_l95oj_1",OD="_emptyGridCard_l95oj_52",PD="_emptyMessage_l95oj_69",L1={hoveringOverSwap:kD,availableToSwap:TD,pulse:ID,emptyGridCard:OD,emptyMessage:PD},rx=k.createContext(null);function ND(){return k.useContext(rx)}function Cg({path:e,area:t}){const n=yA(),r=ND(),i=k.useCallback(({node:a,currentPath:s})=>s===void 0||!xg(a)?!1:jA(s,e),[e]),o=k.useCallback(a=>{var u;if(!("area"in a.node.uiArguments)){console.error("Invalid grid area swap drop",{dropInfo:a});return}const s=(u=a.node.uiArguments.area)!=null?u:"__BAD_DROP__";r==null||r({type:"SWAP_ITEMS",item_a:t,item_b:s})},[t,r]),l=Eg({getCanAcceptDrop:i,onDrop:o,canAcceptDropClass:L1.availableToSwap,hoveringOverClass:L1.hoveringOverSwap});return k.useEffect(()=>{l.current&&(l.current.dataset.gridArea=t)},[t,l]),k.useEffect(()=>{l.current&&(n!=null&&n.node)&&"area"in n.node.uiArguments&&(l.current.dataset.swapWith=n.node.uiArguments.area)},[n==null?void 0:n.node,l]),l}const RD=e=>{const a=e,{uiArguments:s}=a,u=s,{area:t}=u,n=ye(u,["area"]),{uiChildren:r=[],path:i,wrapperProps:o}=a,l=Cg({area:t,path:i});return v(RE,W(P({ref:l,style:{gridArea:t},card_args:n},o),{children:tx(r,i)}))},DD=xe()({library:"gridlayout",name:"grid_card",title:"Grid Card",takesChildren:!0,UiComponent:RD,settingsInfo:P({area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"}},nx),allowedParents:Ag,category:"gridlayout",description:"bslib styled card for grid layouts"}),_g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAACYElEQVR4nO3cMYoUQQBA0RqRPYBn8E5GhqYbLiZeYDNzs428k1dwU8M2UGFZFmYUf/d013vRTEFDBZ+qomj6tCzLgP/t1dYT4JiERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEXi9dYT+Fd3X78tz4ZOm0xkJffv3m49hb9ixSIhrPNuxhifxxjfxxiPv3/fbDqjHdjtVrii+zHG7ZP/t2OMH2OMj9tMZx+sWOe9f2Hsw+qz2BlhnffmwjGeEBYJYZEQFglhkRAWCWF1pr5YdUHamfpi1YrVmfpiVVidqS9WZwpr6jPP2mY6Y0195lnbTCvW1Geetc0U1tRnnrXNFBYrEhYJYZEQFglhkRAWCWGREBYJYZEQFglhkRAWiZnCerxwbOvnDmGmsB5eGPtyhc8dwkwv+t2NXx9n+/Ne1sMY49MVPncIp2V5/mG8ffBFv+s201bIioRF4khnrH3u6Zfb1VZvxSIhLBLCIrHb6waumxWLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi8RPaOk2ptnQzzIAAAAASUVORK5CYII=";var ix={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},F1=k.createContext&&k.createContext(ix),li=globalThis&&globalThis.__assign||function(){return li=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{if(typeof ResizeObserver=="undefined")return;const r=new ResizeObserver(i=>{if(!e.current)return;const{offsetHeight:o,offsetWidth:l}=e.current;n({width:l,height:o})});return e.current&&r.observe(e.current),()=>r.disconnect()},[e]),t}const ax=k.forwardRef((i,r)=>{var o=i,{className:e="",children:t}=o,n=ye(o,["className","children"]);const l=e+" card";return v("div",W(P({ref:r,className:l},n),{children:t}))});k.forwardRef((r,n)=>{var i=r,{className:e=""}=i,t=ye(i,["className"]);const o=e+" card-header";return v("div",P({ref:n,className:o},t))});const WD="_gridCardPlot_1a94v_1",YD={gridCardPlot:WD},VD=({uiArguments:{outputId:e,area:t},path:n,wrapperProps:r})=>{const i=Cg({area:t,path:n});return v(ax,W(P({ref:i,style:{gridArea:t},className:Ke(YD.gridCardPlot,"gridlayout-gridCardPlot")},r),{children:v(lx,{outputId:e!=null?e:t})}))},$D=xe()({library:"gridlayout",name:"grid_card_plot",title:"Grid Plot Card",takesChildren:!1,UiComponent:VD,settingsInfo:{area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"},outputId:{label:"Output ID",inputType:"string",defaultValue:function(e){return e&&"area"in e.uiArguments?e.uiArguments.area:"MyPlot"},optional:!0}},serverBindings:{outputs:{outputIdKey:e=>e.outputId?"outputId":"area",renderScaffold:`renderPlot({ #Plot code goes here $0plot(rnorm(100)) -})`}},allowedParents:xg,iconSrc:_g,category:"gridlayout",description:"A wrapper for `shiny::plotOutput()` that uses `gridlayout`-friendly sizing defaults. \n For when you want to have a grid area filled entirely with a single plot."}),sx="data:image/png;base64,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",$D="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAABq0lEQVRYhe2YsU7DMBCGvyDUDToxsuUREN27gUACBpZuvAMFXgBBH4KtCwMggWDrDuIRujIxAVuXMMRIbuU09vlKiMgnRYniO/uv4zv7mmRZRh1YDjHuX4+Lmsp+beJ6OThMvcde8rasmEaoNo1QbSRCL8mj3L7KmLUfhA4qEXoKDAV+PwyBk1AnidAMOAJGAt+R8Q3eZaRrdAIcAC8BPq/GZyIZMCaYPoAdoHC7shgD28ZHRGzUvwNb5h5jU4pGehoDu8Cno+3LtPnM+ly08ugzsM/0+psAe6YtGs2Eb0d0TGZwEnTM82AIrFvPamgLBbhYQJ/12esTVyky5yT/a8ye/os+/V8opKbKl9p8+qIZdRZjVeJco0Vor92mCvXkGOhrd6qd8HvkpQrAG4q7k+aMdoEr8kBMzHNXq3MtoRvADdCy3rXMu02NATSEpsAj0Ha0tYEHYxNFrNA14MncY2xKiRG6AtzjN1upsV2VDiYV2gLugE6ATwe4ZXodeyMRGhPRdmYIQiL0nDxfSumZPoKQJPwzc9mI/nEO4V/v9QuhEapNbYQGnfCr5BtYaFWUrHRSSwAAAABJRU5ErkJggg==",HD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAiElEQVRYhe3YwQmAIBhA4YxGaaZGaYhGaaZ2sauCB8MX9cP7bnaIxx9imHLOUwTz1wG9DKWFCV1aD/fzKpdPdlsaqikc21qtw0zUUJqhNENphtLChDaP0BcMH8NhJmoozVCaoTRDaYbSDKUZSuv5HyWuaYbfEX6if7iGrr5CmIkm7/BhhtIMpd2GuAxXhhY/aAAAAABJRU5ErkJggg==",GD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAhUlEQVRYhe3ZwQmAMBAAwZxYijVZikVYijXZS/zmoRDJQjjY+ZlHWE6RiFFrLRksswN6GUozlLa+LR7XPf1VcO5btNe5J1pKiY/1adJPtPXnef26E8N7pJmooTRDaYbSDKUZSjOUZiit5zxKGP5iSDNRQ2mG0gylGUpLExr+bIAZSksT+gD98QxXbjF/TQAAAABJRU5ErkJggg==",xh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAgklEQVRYhe3Y0QmAIBRA0Wc0SjM1SkM0SjO1i00gGl2MB/f+2sfhQSqWWmtkaPkbMJpQOqF0aaBr74PjuqftX+e+ldZamokKpRNKJ5ROKF0aaPcIjYjmsTazNBMVSieUbuSvb/XlQv16J0kzUaF0QumE0gmlSwMtPo3DCaUTSpcG+gDcmgtUpwOm6gAAAABJRU5ErkJggg==",ux="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAjElEQVRYhe3ZwQmAMBBEUVcsxZosxSIsxZrsJZ4UIQYUh5WB/456+awhCRillM5B/3fAU4SqDa0X87odizeSWk7LNFbPbCZqE9r89Dcy97FqudlMlFA1QtUIVSNUzSb0zRGafou6spkooWqEqmVenD/tGjYTJVSNUDVC1QhVswnl4qwW/GwQI1TNJnQHKA8MWeSBgoAAAAAASUVORK5CYII=",cx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAkklEQVRYhe3ZwQmAMAyF4UQcxZkcxSEcxZncJV70UmlVfEYevO/ay0+KNKBHhDHo/g64S6Fofe1gWtbMjkOYmc3j4OUBzURpQqtXb/s1JDlddYlmogpFUyiaQtEUikYT2npCL5+1TDQTVSiaQtFaX/0Tb5dsLc7pFIqmUDSFoikUDfWEfr5k00zU9bMBTKFoNKEbp/QMWe71dFoAAAAASUVORK5CYII=",JD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABA0lEQVRYhe2ZwQ6CMBBEH8Yv9uDNsMabB38ZLxBRkdDtxlmSzqUktDAvs2yb0A3DwJ51UBuoVQNQqwGotXuAY8nk8+3hfc+8Vxtw3brwfjmt3lckYEAf9TBVCRlBEP8G6HiVjxEAoSqhMAhlCYVAFHUh3rtJrWwc+9n15u40Sb0PGJVJlCYwqXOuW5KNoysJdQKTDGcSWQDACZEJABwQ2QDgG2JVGQGgoF1nBCjqRtkAPs3bz5mjMgEUm4c8AC7z4N+JvWeipR3cbR70CVSZh/IEvGegpcSqzYMugRDzoAEIMw/+j9ireSlVmwddCYWYBw1AmHmArv3gEKsBqNUA1No9wBNu3jnWLc/KGQAAAABJRU5ErkJggg==",QD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAADT0lEQVRYhe2ZP2gUURDGf1ELSy/YpUrELt1BLHIpxAtCOO0SBP80woWAiGyxuWZB2eayxYIiSAJpTBPuQARtJNedacTrgk3IWYlWuVR2EouZl907Lwnue8cRyMDj7e3OMvO9mTfzvb2Rw8NDzrJcGLYDtnIOYNhy5gFcyvqiH8anqZSAMjADdIAmUAF+HvdCFHj/7UdmAKdICfiQ+n0FGAfmgJvAjitDg0ihaRLnK8AocA2oA1eBdZfGBhGBeZ1XosBb0esOsOCH8VdgConQRxfGBhGBgs71Ps/MvRlXxgYB4EDnXJ9nEzrvuTI2CABNnat+GB+B8MM4j1SlP8BnV8Zc74ExIK/XeWDPD+M6Eg2zN14D31wZdAlgDHiHbNIOsAK0kbSpqs5L4JlDm84ATCLlcQpoAbNR4HXMQz+M20ANiYqzCgRu9kB65f9xHiAKvDoSlQLSI0oO7AJuIrAOXAcaUeDNnqDXRspoFQHxXe83gQawkcW4bQSmgdvq3AKAH8a5dPVJizY209zGdTwC3gIPszhgC8A0pHoUeB11fIuk3gPgh/EEkkJEgVdBqIUZi6pWzOKALQCz0ibn8zo6fXSLfhgXAaLAa5uBpA9k7M62e8CsdFvnvqmTur/lh3GDboBm5ZtkEFsAvRHo/W3ENLdd+qfKJrCUxQFbAE3gFpIeLZJuW6SbzBmnQ+AX3ZFqcsIh5zSx3QMmf5eBfRJHq8dUojlkk9dSI7PzYA9gm6Q5HZCQtBawmtKrIGl1D3hqabNLXHTibeAuUhILQCcKPNMTlkGqDkm5fAJcdmAXcEunH+jc0nkRKKdKZx1JuetIyjkRVwBKCNMEWANQPpSjO5VMF76Poyi4ADAJvNfriq40fhiXEQATek0UeA0cR8EWgGGiF4E1c4jXtEmvfNpZp1GwBfCGhIkuwhHvqenz50hlOi4KZUv7VgBGgTvoJxMQJorU+RzSXV+ge4LuKJh71l8nbAAc0YbUAaaG8KNPwGO9t0FPFFyKDZXYQxwr6AcrEM6zizj/O6W7hvSIVT+M50m4USYClxZbLrREchYG+II4/6NHz5y2AhK6sQm8srRvDWAHuEGyoq0TdDcQgjejevuWtgEYOf+PbMhyDmDY8hfkuOfRCqd6WwAAAABJRU5ErkJggg==",KD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABDElEQVRYhe2ZsQ7CMAxEr4gvZmBDXMXGwC+XgVQqERDbCbEr5ZaoalXdq+0kTqdlWbBnHbwN1GoAeGsAeGv3AMdfN8+3h+ZdVwDcXE8GP7hfTqrnW0UgN99NLQDczAP1AFvzM4xpU6MagNw8vz75R1kBQpgHCrPQF0nNW3eJqjTURiDMl1+liYDUvLWQTRGTRiDcl18lAQhrHigDhDYPlAGYxpDmAXkNhG2cSwBzGolXOoWTJIVCQ0hSiAgMIa0BIiiEZiVmGvOpNVfXgtfuhYhgkbDsRpnGUiS6NDfWfoAIEomajowIAFHbExPvEN1X7BanEsTnGuiiVudChBPENH5wOGsAeGsAeGv3AE8yEDlUwXXxqQAAAABJRU5ErkJggg==",qD="_icon_1467k_1",XD={icon:qD},ZD={undo:KD,redo:JD,tour:QD,alignTop:GD,alignBottom:HD,alignCenter:$D,alignSpread:xh,alignTextCenter:xh,alignTextLeft:ux,alignTextRight:cx};function eL({id:e,alt:t=e,size:n}){return v("img",{src:ZD[e],alt:t,className:XD.icon,style:n?{height:n}:{}})}function tL(e){return Tt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 90c44.3 0 86 17.3 117.4 48.6C404.7 170 422 211.7 422 256s-17.3 86-48.6 117.4C342 404.7 300.3 422 256 422s-86-17.3-117.4-48.6C107.3 342 90 300.3 90 256s17.3-86 48.6-117.4C170 107.3 211.7 90 256 90m0-42C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"}},{tag:"path",attr:{d:"M277 360h-42V235h42v125zm0-166h-42v-42h42v42z"}}]})(e)}const nL=e=>v("svg",W(O({width:"1em",height:"1em",viewBox:"0 0 15 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:v("path",{d:"M7.38 7.477 14.432.691H.328L7.38 7.477Z",fill:"#75A8DB"})})),rL=e=>v("svg",W(O({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 49 40",width:"1em",height:"1em"},e),{children:v("path",{stroke:"currentColor",strokeWidth:2,d:"M27.42 8.115h2.074l10.592 11.414v1.052L28.705 32.04H27.4v-5.954H13.328l.105-11.975 13.988-.058V8.115Z"})})),xf=e=>U("svg",W(O({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 20",width:"1em",height:"1em"},e),{children:[v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M0 4h16"}),v("path",{stroke:"currentColor",strokeLinejoin:"round",d:"M5.5 6.5 6 16m2-9.5V16m2.5-9.5L10 16"}),v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M5.5 4.5v-2l1.5-1h2l1.5 1v2m-8 0 .5 12 1.5 2h7l1.5-2 .5-12"})]})),iL=e=>v("svg",W(O({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 44 40",width:"1em",height:"1em"},e),{children:v("path",{stroke:"currentColor",strokeWidth:2,d:"M17.08 8.115h-2.074L4.414 19.529v1.052L15.795 32.04H17.1v-5.954h14.072l-.105-11.975-13.988-.058V8.115Z"})})),oL=e=>v("svg",W(O({width:"1em",height:"1em",viewBox:"0 0 15 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:v("path",{d:"m7.38.477 7.052 6.786H.328L7.38.477Z",fill:"#75A8DB"})})),lL="_textPanel_7ayjk_1",aL="_text_holder_7ayjk_12",M1={textPanel:lL,text_holder:aL},sL=({uiArguments:{content:e,area:t,alignment:n},path:r,wrapperProps:i})=>{const o=Cg({area:t,path:r});return v(ax,W(O({ref:o,className:Ke(M1.textPanel,"gridlayout-textPanel"),style:{gridArea:t,justifyItems:n}},i),{children:v("div",{className:M1.text_holder,children:v("h1",{children:e})})}))},uL=xe()({library:"gridlayout",name:"grid_card_text",title:"Grid Text Card",takesChildren:!1,UiComponent:sL,settingsInfo:{content:{label:"Panel text",inputType:"string",defaultValue:"Text for card"},alignment:{label:"Text alignment",inputType:"radio",defaultValue:"start",choices:{start:{icon:ux,label:"left"},center:{icon:xh,label:"center"},end:{icon:cx,label:"right"}}},area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"},is_title:{label:"Use text as website title",inputType:"boolean",defaultValue:!1,optional:!0}},allowedParents:xg,iconSrc:sx,category:"gridlayout",description:"A grid card that contains just text that is vertically centered within the panel. Useful for app titles or displaying text-based statistics."}),fx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEVklEQVR4nO3cwYpcRRiG4XeMjouYGzAuXGThyohG1GvQxQQSJVfgRhkUnOANCCYLh6ALvQBBQkxE9BqiKEZ3wixcZO4gm4xIu6geaE+PDMp8VZU67wNncc5ppqqrP7r++Q/0xmKxQDppj7WegMZksBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBTxeK2Bdr7aO+ryJrC1PF4Dnl5e25i8bvqTON5fv/8AuA/8AtwGvgEOJq/j2lvnppciqgXrCBeBa0Cddzq+p4DnlscVYA+4CnzdYjIttsJTwMeUN2yocs4Btyhrfar24C2+sT4CdhqMO1eHa3215qC1v7EusR6qA+AGpcY6w3r9wPLa6uH99ftnKGt4g/Xaaoey9tXUDNYm8Mnk2j7wCrAN3KUUoPp/HlDWcJuypvuT+7uUz6CKmsG6DDyzcn4AvAHcqziHubgHvA48XLl2Fniz1gRqBmtrcv45hirpV+CLybWtWoPXDNbLk/MvT/BvLyaHiukaX6g1cM3/Cp+dnFfb72fsLkcX+3EtH+msdYU1Dp8VKqLlI52T1OTrXv+uZrCOe5CqjCbr7laoCIOliFFqLLfZztQMlh92G7PrY2lgBksRo9RYbrOdsY81PvtYGofBUsQoNZbbbGfsY43PPpbGYbAUMUqN5TbbGftY47OPpXEYLEWMUmO5zXbGPtb47GNpHAZLEaPUWG6znbGPNT77WBqHwVLEKDVWD7+z3sv9LkoM+1jjs4+lcRgsRYxSYx33dT/3+9XZxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIUWqsnrbZnubSjH2s8dnH0jgMliJGqbF62mZ7mksz9rHGZx9L4zBYihilxuppm+1pLs3YxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIlsHabDi2wmoG63dKYXt4vHiCf3tjcrTU01xe5Z9r/ketgWsG67fJ+ZWKY8/VdI1/qjVwzWDdmZy/DZyvOP7cPE9Z41V3ag1eM1g3gfsr508C3wEvVJzDXJwHvqes8aF9ymdQRc1gHQDvT66dBX4AdoELwOmK8xnNacoa7gI/UtZ21XvAw1qTqd15vwlcBz5YubYJbC+PQz3/Yt6jcH/qOhW/raBNu+FD4NMG487VZ5Q1r6pFsP4C3gUuAXsNxp+LPeAy8A5lzatq+RD6FvAt5c1fBF6i1AVPNJzTo+xPSoH+M3CbsvUdtJrMxmJx3PYs/Xc+K1SEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVLE32A0lLomuWLgAAAAAElFTkSuQmCC";var Cf=Yl;function Yl(e){let t=e;var n={}.toString.call(e).slice(8,-1);if(n=="Set")return new Set([...e].map(i=>Yl(i)));if(n=="Map")return new Map([...e].map(i=>[Yl(i[0]),Yl(i[1])]));if(n=="Date")return new Date(e.getTime());if(n=="RegExp")return RegExp(e.source,cL(e));if(n=="Array"||n=="Object"){t=Array.isArray(e)?[]:{};for(var r in e)t[r]=Yl(e[r])}return t}function cL(e){if(typeof e.source.flags=="string")return e.source.flags;var t=[];return e.global&&t.push("g"),e.ignoreCase&&t.push("i"),e.multiline&&t.push("m"),e.sticky&&t.push("y"),e.unicode&&t.push("u"),t.join("")}function cl(e){const t=e.length,n=e[0].length;for(let r of e)if(r.length!==n)throw new Error("Inconsistant number of columns in matrix");return{numRows:t,numCols:n}}function fL(e,{index:t,arr:n,dir:r}){const i=Cf(e);switch(r){case"rows":return Qo(i,t,n);case"cols":return i.map((o,l)=>Qo(o,t,n[l]))}}function dL(e,{index:t,dir:n}){const r=Cf(e);switch(n){case"rows":return Eh(r,t);case"cols":return r.map((i,o)=>Eh(i,t))}}const Dn=".";function kg(e){const t=new Map;return pL(e).forEach(({itemRows:n,itemCols:r},i)=>{if(i===Dn)return;const o=D1(n),l=D1(r);t.set(i,{colStart:l.minVal,rowStart:o.minVal,colSpan:l.span+1,rowSpan:o.span+1,isValid:o.isSequence&&l.isSequence})}),t}function pL(e){var i;const t=new Map,{numRows:n,numCols:r}=cl(e);for(let o=0;o{if("area"in n.uiArguments&&n.uiArguments.area!==void 0){const r=n.uiArguments.area;t.push(r)}}),t}function mL(e,r){var i=r,{name:t}=i,n=ye(i,["name"]);const{rowStart:o,colStart:l}=n,a="rowEnd"in n?n.rowEnd:o+n.rowSpan-1,s="colEnd"in n?n.colEnd:l+n.colSpan-1,u=Cf(e.areas);for(let c=0;c=o-1&&c=l-1&&d{const o=r==="rows"?"cols":"rows",l=gL(i);if(t>l[r].length)throw new Error(`Can't add a tract after index ${t}. Not enought tracts.`);if(t<0)throw new Error("Cant add a tract at a negative index");const a=kg(i.areas);let s=Ua(Dn,l[o].length);a.forEach((u,c)=>{const{itemStart:f,itemEnd:d}=Ch(u,r);if(f<=t&&d>t){const h=Ch(u,o);for(let m=h.itemStart-1;m{for(let i of n)yL(r,i)})}function vL(e,t){return px(e,t)}function hx(e,t,n=!1){const{dir:r,index:i}=t,o=t.index-1;if(!n){const s=mx(e.areas,t);if(s.length!==0)throw new Error(`Can't remove ${r==="rows"?"row":"col"} ${i} as items ${L5(s)} are entirely contained within it.`)}const l={areas:dL(e.areas,{index:o,dir:r})},a=r==="rows"?"row_sizes":"col_sizes";return wL(e[a])&&(l[a]=Eh(e[a],o)),O(O({},e),l)}function mx(e,t){const n=kg(e);return bL(n,t)}function wL(e){return Array.isArray(e)&&e.length>1}function bL(e,{index:t,dir:n}){let r=[];return e.forEach((i,o)=>{const l=Ch(i,n);if(!l)return;const{itemStart:a,itemEnd:s}=l;a===t&&a===s&&r.push(o)}),r}function EL(e,t,n){return wi(e,({areas:r})=>{const{numRows:i,numCols:o}=cl(r);for(let l=0;l{const o=n==="rows"?"row_sizes":"col_sizes";i[o][t-1]=r})}function AL(e,{item_a:t,item_b:n}){return t===n?e:wi(e,r=>{const{n_rows:i,n_cols:o}=xL(r.areas);let l=!1,a=!1;for(let s=0;s{f!==Dn&&l.add(f)});const c=u.length;if(i===-1&&(i=c),i!==c)throw new Error("Invalid layout definition. Not consistant number of columns in every row")}if(!n)n=Ua("1fr",i);else if(n.length!==i)throw new Error("Column sizes vector doesn't match layout definition.");if(!t)t=Ua("1fr",o);else if(t.length!==o)throw new Error("Row sizes vector doesn't match layout definition.");return{uniqueAreas:[...l],areas:a,col_sizes:n,row_sizes:t,gap_size:r!=null?r:"12px"}}function _L(e){const t=[];for(let n of e)t.push(n.trim().split(/\s+/));return t}function gx(n){var r=n,{areas:e}=r,t=ye(r,["areas"]);return O({layout:TL(e)},t)}function kL(n){var r=n,{layout:e}=r,t=ye(r,["layout"]);return O({areas:_L(e)},t)}function TL(e){const{numCols:t}=cl(e),n=[],r=Ua(-1,t);for(let i of e)for(let o=0;oo+l.padEnd(r[a]," ")+(a1,c=r>1,f=[];return(j1({colRange:s,rowIndex:e-1,layoutAreas:i})||u)&&f.push("up"),(j1({colRange:s,rowIndex:o+1,layoutAreas:i})||u)&&f.push("down"),(W1({rowRange:a,colIndex:n-1,layoutAreas:i})||c)&&f.push("left"),(W1({rowRange:a,colIndex:l+1,layoutAreas:i})||c)&&f.push("right"),f}function j1({colRange:e,rowIndex:t,layoutAreas:n}){return t<1||t>n.length?!1:e.every(r=>n[t-1][r-1]===Dn)}function W1({rowRange:e,colIndex:t,layoutAreas:n}){return t<1||t>n[0].length?!1:e.every(r=>n[r-1][t-1]===Dn)}const ML="_marker_mumaw_1",BL="_dragger_mumaw_32",UL="_move_mumaw_52",Y1={marker:ML,dragger:BL,move:UL};function bx(e,t,n){const r=t=r&&e<=i}function za({rowStart:e,rowSpan:t,colStart:n,colSpan:r}){return{rowStart:e,rowEnd:e+t-1,colStart:n,colEnd:n+r-1}}function zL(e,t){return typeof e=="undefined"&&typeof t=="undefined"?!0:typeof e=="undefined"||typeof t=="undefined"?!1:("colSpan"in e&&(e=za(e)),"colSpan"in t&&(t=za(t)),e.colStart===t.colStart&&e.colEnd===t.colEnd&&e.rowStart===t.rowStart&&e.rowEnd===t.rowEnd)}function jL({row:e,col:t}){return`row${e}-col${t}`}function WL({dragDirection:e,gridLocation:t,layoutAreas:n}){const{rowStart:r,rowEnd:i,colStart:o,colEnd:l}=za(t),a=n.length,s=n[0].length;let u,c,f;switch(e){case"up":if(r===1)return{shrinkExtent:i,growExtent:1};u=r-1,c=1,f=i;break;case"left":if(o===1)return{shrinkExtent:l,growExtent:1};u=o-1,c=1,f=l;break;case"down":if(i===a)return{shrinkExtent:r,growExtent:a};u=i+1,c=a,f=r;break;case"right":if(l===s)return{shrinkExtent:o,growExtent:s};u=l+1,c=s,f=o;break}const d=e==="up"||e==="down",p=e==="left"||e==="up",[h,m]=d?[o,l]:[r,i],E=(w,S)=>{const[_,b]=d?[w,S]:[S,w];return n[_-1][b-1]!==Dn},g=ec(h,m),y=ec(u,c);for(let w of y)for(let S of g)if(E(w,S))return{shrinkExtent:f,growExtent:w+(p?1:-1)};return{shrinkExtent:f,growExtent:c}}function YL({dir:e,gridContainerStyles:t,gridContainerBoundingRect:n}){const r=_h(t.getPropertyValue("gap")),o=_h(t.getPropertyValue("padding"))+r/2,l=n[e==="rows"?"y":"x"],a=VL(t,e),s=a.length,u=[];for(let c=0;cbx(o,s,u));if(l===void 0)return;const a=HL[n];return i[a]=l.index,i}const HL={right:"colEnd",left:"colStart",up:"rowStart",down:"rowEnd"};function GL({overlayRef:e,gridLocation:t,layoutAreas:n,onDragEnd:r}){const i=za(t),o=k.useRef(null),l=k.useCallback(u=>{const c=e.current,f=o.current;if(!c||!f)throw new Error("For some reason we are observing dragging when we shouldn't");const d=$L({mousePos:u,dragState:f});d&&$1(c,d)},[e]),a=k.useCallback(()=>{const u=e.current,c=o.current;if(!u||!c)return;const f=c.gridItemExtent;zL(f,i)||r(f),u.classList.remove("dragging"),document.removeEventListener("mousemove",l),V1("on")},[i,l,r,e]);return k.useCallback(u=>{const c=e.current;if(!c)return;const f=c.parentElement;if(!f)return;const d=getComputedStyle(c.parentElement),p=f.getBoundingClientRect(),h=u==="down"||u==="up"?"rows":"cols",{shrinkExtent:m,growExtent:E}=WL({dragDirection:u,gridLocation:t,layoutAreas:n});o.current={dragHandle:u,gridItemExtent:za(t),tractExtents:YL({dir:h,gridContainerStyles:d,gridContainerBoundingRect:p}).filter(({index:g})=>bx(g,m,E))},$1(e.current,o.current.gridItemExtent),c.classList.add("dragging"),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a,{once:!0}),V1("off")},[a,t,n,l,e])}function V1(e){var n;const t=(n=document.querySelector("body"))==null?void 0:n.classList;e==="off"?t==null||t.add("disable-text-selection"):t==null||t.remove("disable-text-selection")}function $1(e,{rowStart:t,rowEnd:n,colStart:r,colEnd:i}){e.style.setProperty("--drag-grid-row-start",String(t)),e.style.setProperty("--drag-grid-row-end",String(n+1)),e.style.setProperty("--drag-grid-column-start",String(r)),e.style.setProperty("--drag-grid-column-end",String(i+1))}function JL({area:e,gridLocation:t,areas:n,onNewPos:r}){if(typeof t=="undefined")throw new Error(`Item in ${e} is not in the location map`);const i=k.useRef(null),o=GL({overlayRef:i,gridLocation:t,layoutAreas:n,onDragEnd:r}),l=k.useMemo(()=>FL({gridLocation:t,layoutAreas:n}),[t,n]),a=k.useMemo(()=>{let s=[];for(let u of l)s.push(v("div",{className:Ke(Y1.dragger,u),title:`resize ${e} ${u}`,onMouseDown:c=>{H1(c),o(u)},children:QL[u]},u));return s},[e,l,o]);return k.useEffect(()=>{var s;(s=i.current)==null||s.style.setProperty("--grid-area",e)},[e]),v("div",{ref:i,onClick:H1,className:Y1.marker+" grid-area-overlay",children:a})}function H1(e){e.preventDefault(),e.stopPropagation()}const QL={up:v(z1,{}),down:v(z1,{}),left:v(U1,{}),right:v(U1,{})},KL="_ResizableGrid_i4cq9_1",qL={ResizableGrid:KL,"size-detection-cell":"_size-detection-cell_i4cq9_1"},XL=/(^[\d|.]+)\s*(px|%|rem|fr)|(^auto$)/;function ZL(e){return XL.test(e)}const e6=/(px|%|rem|fr|auto)/g,t6=/^[\d|.]*/g;function tc(e){var i,o;const t=((i=e.match(e6))==null?void 0:i[0])||"px",n=(o=e.match(t6))==null?void 0:o[0],r=n?Number(n):null;if(t==="auto"){if(r!==null)throw new Error("Cant have a count value with auto units.");return{count:null,unit:"auto"}}if(r===null)throw new Error("You must have a count for non-auto units.");if(t==="fr"&&r<0)throw new Error(`Can't have a negative count with ${t} units.`);return{count:r,unit:t}}function Tl(e){return e.unit==="auto"?"auto":`${e.count}${e.unit}`}const n6="_infoIcon_15ri6_1",r6="_container_15ri6_10",i6="_header_15ri6_15",o6="_info_15ri6_1",l6="_unit_15ri6_27",a6="_description_15ri6_31",fo={infoIcon:n6,container:r6,header:i6,info:o6,unit:l6,description:a6},s6=({units:e})=>U(yf,{placement:"right",children:[v(vf,{className:fo.infoIcon,children:v(tL,{})}),v(ag,{children:v(u6,{units:e})})]});function u6({units:e}){return U("div",{className:fo.container,children:[v("div",{className:fo.header,children:"CSS size options"}),v("div",{className:fo.info,children:e.map(t=>U(k.Fragment,{children:[v("div",{className:fo.unit,children:t}),v("div",{className:fo.description,children:c6[t]})]},t))})]})}const c6={"%":"Relative to percentage of container size",auto:"Let the content decide size",fr:"Relative unit. E.g. 2fr is twice the size of 1fr",px:"Screen pixels",rem:"Pixel size of app font. Typically 16 pixels."},f6="_wrapper_3jy8f_1",d6="_unitSelector_3jy8f_9",Ex={wrapper:f6,unitSelector:d6};function Sx({unit:e,availableUnits:t,onChange:n}){return U(Ne,{children:[v("select",{className:Ex.unitSelector,"aria-label":"value-unit",name:"value-unit",value:e,onChange:r=>n(r.target.value),children:t.map(r=>v("option",{value:r,children:r},r))}),v(s6,{units:t})]})}function _r(e){return e+"-label"}function p6({id:e,label:t,value:n,onChange:r}){return v(_f,{id:e,"aria-label":t,"aria-labelledby":_r(e),value:n,onChange:r})}function _f(a){var s=a,{value:e,onChange:t,min:n=0,max:r,step:i,disabled:o}=s,l=ye(s,["value","onChange","min","max","step","disabled"]);const{displayedVal:u,handleChange:c,handleBlur:f,incrementUp:d,incrementDown:p}=h6({min:n,max:r,step:i,value:e,onChange:t});return U("div",{className:"NumberInput SUE-Input","aria-disabled":o,onBlur:f,children:[v("input",W(O({},l),{className:"input-field",type:"number",placeholder:"0",value:u,min:n,max:r,step:i,disabled:o,onChange:c})),U("div",{className:"incrementer-buttons",children:[v("button",{className:"up-button","aria-label":"Increment number up",onClick:d,type:"button",children:v(oL,{})}),v("button",{className:"down-button","aria-label":"Increment number down",onClick:p,type:"button",children:v(nL,{})})]})]})}function h6({min:e=-1/0,max:t=1/0,step:n=1,value:r,onChange:i}){const o=k.useCallback(p=>h=>{if(h.preventDefault(),typeof r!="number"||typeof n!="number")return;const m=r+(p==="up"?1:-1)*n;typeof e=="number"&&e>m||typeof t=="number"&&to("up"),[o]),a=k.useMemo(()=>o("down"),[o]),[s,u]=k.useState(r);k.useEffect(()=>u(r),[r]);const c=k.useCallback(p=>{const h=p.target.value;u(m=>Number(m)===Number(h)?m:h),i(Number(h))},[i]),f=k.useCallback(()=>{u(p=>Number(p).toString())},[]);return{incrementUp:l,incrementDown:a,handleChange:c,displayedVal:s===0||s===null?"":s,handleBlur:f}}function G1(e,t){const n=Math.abs(t-e)+1,r=ee+o*r)}function m6({areas:e,row_sizes:t,col_sizes:n,gap_size:r}){return{gridTemplateAreas:e.map(i=>`"${i.join(" ")}"`).join(` - `),gridTemplateRows:t.join(" "),gridTemplateColumns:n.join(" "),"--grid-gap":r}}function J1(e){return e.split(" ")}function g6(e){const t=e.match(/"([.\w\s]+)"/g);if(!t)throw new Error("Can't parse area definition");return t.map(n=>n.replaceAll('"',"").split(" "))}function y6(e){const t=J1(e.style.gridTemplateRows),n=J1(e.style.gridTemplateColumns),r=g6(e.style.gridTemplateAreas),i=e.style.getPropertyValue("--grid-gap");return{row_sizes:t,col_sizes:n,areas:r,gap_size:i}}function Ax({container:e,dir:t}){return getComputedStyle(e).getPropertyValue(t==="rows"?"grid-template-rows":"grid-template-columns").split(" ").map(n=>Number(n.replaceAll("px","")))}const kh=e=>Number(e.toFixed(4)),nc=40,v6=.15,xx=e=>t=>Math.round(t/e)*e,w6=5,kf=xx(w6),b6=.01,Cx=xx(b6);function E6(e,{pixelToFrRatio:t,beforeInfo:n,afterInfo:r}){const i=Cx(e*t),o=n.count+i,l=r.count-i;return(i<0?o/l:l/o)=o.length?null:o[u];if(c==="auto"||f==="auto"){const h=getComputedStyle(r).getPropertyValue(t==="rows"?"grid-template-rows":"grid-template-columns").split(" ");c==="auto"&&(c=h[s],o[s]=c),f==="auto"&&(f=h[u],o[u]=f),r.style[i]=h.join(" ")}const d=C6(c,f);if(d.type==="unsupported")throw new Error("Unsupported drag type");r.classList.add("been-dragged");const p=W(O({dir:t,mouseStart:kx(e,t),originalSizes:o,currentSizes:[...o],beforeIndex:s,afterIndex:u},d),{pixelToFrRatio:1});return d.type==="both-relative"&&(p.pixelToFrRatio=_6({container:r,index:n,dir:t,frCounts:{before:d.beforeInfo.count,after:d.afterInfo.count}})),p}function T6({mousePosition:e,drag:t,container:n}){const i=kx(e,t.dir)-t.mouseStart,o=[...t.originalSizes];let l;switch(t.type){case"before-pixel":l=A6(i,t);break;case"after-pixel":l=x6(i,t);break;case"both-pixel":l=S6(i,t);break;case"both-relative":l=E6(i,t);break}l!=="no-change"&&(l.beforeSize&&(o[t.beforeIndex]=l.beforeSize),l.afterSize&&(o[t.afterIndex]=l.afterSize),t.currentSizes=o,t.dir==="cols"?n.style.gridTemplateColumns=o.join(" "):n.style.gridTemplateRows=o.join(" "))}function I6(e){return e.match(/[0-9|.]+px/)!==null}function _x(e){return e.match(/[0-9|.]+fr/)!==null}function Th(e){if(_x(e))return{type:"fr",count:Number(e.replace("fr","")),value:e};if(I6(e))return{type:"pixel",count:Number(e.replace("px","")),value:e};throw new Error("Unknown tract sizing unit: "+e)}function kx(e,t){return t==="rows"?e.clientY:e.clientX}function O6(e){return e.some(t=>_x(t))}function P6(e){return e.some(t=>t==="auto")}const N6="_tractInfoDisplay_cvtwo_1",R6="_sizeWidget_cvtwo_61",D6="_cssSizeInput_cvtwo_80",L6="_hoverListener_cvtwo_94",F6="_buttons_cvtwo_114",M6="_tractAddButton_cvtwo_127",B6="_deleteButton_cvtwo_128",Yr={tractInfoDisplay:N6,sizeWidget:R6,cssSizeInput:D6,hoverListener:L6,buttons:F6,tractAddButton:M6,deleteButton:B6},U6=["fr","px"];function z6({dir:e,index:t,size:n,deletionConflicts:r,addTract:i,deleteTract:o,changeUnit:l,changeCount:a}){const{unit:s,count:u}=tc(n);return U("div",{className:Yr.tractInfoDisplay,"data-drag-dir":e,style:{"--tract-index":t+1},children:[v("div",{className:Yr.hoverListener}),U("div",{className:Yr.sizeWidget,onClick:Y6,children:[U("div",{className:Yr.buttons,children:[v(Q1,{dir:e,onClick:()=>i("before")}),v(j6,{dir:e,onClick:o,deletionConflicts:r}),v(Q1,{dir:e,onClick:()=>i("after")})]}),U("div",{className:Yr.cssSizeInput,children:[v(_f,{name:"value-count","aria-label":"value-count",value:u,onChange:a,min:0}),v(Sx,{unit:s,availableUnits:U6,onChange:c=>l(c)})]})]})]})}function j6({dir:e,onClick:t,deletionConflicts:n}){const r=e==="rows"?"right":"down",i=n.length===0,o=i?"Delete tract":`Can't delete because the items ${n.join(",")} are entirely contained in tract`;return v(Ir,{className:Yr.deleteButton,onClick:Tx(i?t:void 0),"data-enabled":i,text:o,size:"medium",position:r,children:v(xf,{})})}function Q1({dir:e,onClick:t}){const n=e==="rows"?"right":"down",r=e==="rows"?"Add row":"Add column";return v(Ir,{className:Yr.tractAddButton,onClick:Tx(t),position:n,text:r,children:v(Ig,{})})}function Tx(e){return function(t){t.currentTarget.blur(),e==null||e()}}function W6(e,t){let n=0,r=0;for(let i=0;imx(r,{dir:c,index:f+1}),[r]),l=c=>f=>{const{unit:d}=tc(t[c]);i({type:"RESIZE",index:c,dir:e,size:`${f}${d}`})},a=c=>f=>{const d=n(),{count:p}=tc(t[c]);let h=1;f==="px"&&(h=kf(d[c]));const m=W6(d,t);f==="fr"&&m!=="NO_FR_UNITS"&&(h=kh(Cx(p?p*m:1))),i({type:"RESIZE",index:c,dir:e,size:`${h}${f}`})},s=c=>f=>i({type:"ADD",dir:e,index:f==="before"?c:c+1}),u=c=>()=>{i({type:"DELETE",dir:e,index:c+1})};return v(Ne,{children:t.map((c,f)=>v(z6,{index:f,dir:e,addTract:s(f),deleteTract:u(f),changeUnit:a(f),changeCount:l(f),size:c,deletionConflicts:o({dir:e,index:f})},e+f))})}function Y6(e){e.stopPropagation()}function q1(e,t){e.querySelectorAll(`.${Yr.tractInfoDisplay}`).forEach(n=>{n.style.display=t==="hide"?"none":"block"})}const V6="_columnSizer_9b32k_1",$6="_rowSizer_9b32k_2",X1={columnSizer:V6,rowSizer:$6};function Z1({dir:e,index:t,onStartDrag:n}){return v("div",{className:e==="rows"?X1.rowSizer:X1.columnSizer,title:`resize ${e==="rows"?"rows":"columns"} ${t-1} and ${t}`,onMouseDown:r=>n({e:r,dir:e,index:t}),style:{[e==="rows"?"gridRow":"gridColumn"]:t}})}function H6(e,t="Ref is not yet initialized"){if(e.current===null)throw new Error(t);return e.current}function G6({containerRef:e,onDragEnd:t}){return k.useCallback(({e:r,dir:i,index:o})=>{const l=H6(e,"How are you dragging on an element without a container?");r.preventDefault();const a=k6({mousePosition:r,dir:i,index:o,container:l}),{beforeIndex:s,afterIndex:u}=a,c=e0(l,{dir:i,index:s,size:a.currentSizes[s]}),f=e0(l,{dir:i,index:u,size:a.currentSizes[u]});J6(l,a.dir,{move:d=>{T6({mousePosition:d,drag:a,container:l}),c.update(a.currentSizes[s]),f.update(a.currentSizes[u])},end:()=>{c.remove(),f.remove(),t&&t(y6(l))}})},[e,t])}function e0(e,{dir:t,index:n,size:r}){const i=document.createElement("div"),o=t==="rows"?{gridRow:String(n+1),gridColumn:"1",flexDirection:"row"}:{gridColumn:String(n+1),gridRow:"1",flexDirection:"column"};Object.assign(i.style,o,{zIndex:"1",display:"flex",alignItems:"center"});const l=document.createElement("div");return Object.assign(l.style,{padding:"3px 7px",borderRadius:"var(--corner-radius)",backgroundColor:"var(--light-grey, pink)"}),l.innerHTML=r,i.appendChild(l),e.appendChild(i),q1(e,"hide"),{remove:()=>{i.remove(),q1(e,"show")},update:a=>{l.innerHTML=a}}}function J6(e,t,n){const r=document.createElement("div");Object.assign(r.style,{position:"fixed",inset:"0px",zIndex:"3",cursor:t==="rows"?"ns-resize":"ew-resize"}),e.appendChild(r);const i=()=>{o(),n.end()};r.addEventListener("mousemove",n.move),r.addEventListener("mouseup",i),r.addEventListener("mouseleave",i);function o(){r.removeEventListener("mousemove",n.move),r.removeEventListener("mouseup",i),r.removeEventListener("mouseleave",i),r.remove()}}function Q6({areas:e,col_sizes:t,row_sizes:n,gap_size:r}){return{areas:e,gap_size:r,col_sizes:aa(t),row_sizes:aa(n)}}const K6="1fr";function q6(i){var o=i,{className:e,children:t,onNewLayout:n}=o,r=ye(o,["className","children","onNewLayout"]);r=Q6(r);let{row_sizes:l,col_sizes:a}=r;const s=P.useRef(null),u=m6(r),c=a.length<2?[]:G1(2,a.length),f=l.length<2?[]:G1(2,l.length),d=G6({containerRef:s,onDragEnd:n}),p=[qL.ResizableGrid];e&&p.push(e);const h=P.useCallback(g=>{switch(g.type){case"ADD":return dx(r,{afterIndex:g.index,dir:g.dir,size:K6});case"RESIZE":return X6(r,g);case"DELETE":return hx(r,g)}},[r]),m=P.useCallback(g=>n(h(g)),[h,n]),E=P.useCallback(g=>{const y=s.current;return y?Ax({container:y,dir:g}):[]},[]);return U("div",{className:Ke(...p),ref:s,style:u,children:[c.map(g=>v(Z1,{dir:"cols",index:g,onStartDrag:d},"cols"+g)),f.map(g=>v(Z1,{dir:"rows",index:g,onStartDrag:d},"rows"+g)),t,v(K1,{dir:"cols",sizes:a,getActualSizes:()=>E("cols"),areas:r.areas,onUpdate:m}),v(K1,{dir:"rows",sizes:l,getActualSizes:()=>E("rows"),areas:r.areas,onUpdate:m})]})}function X6(e,{dir:t,index:n,size:r}){return wi(e,i=>{i[t==="rows"?"row_sizes":"col_sizes"][n]=r})}function Z6({gridRow:e,gridColumn:t,onDroppedNode:n}){const r=Sg({getCanAcceptDrop:i=>!0,onDrop:i=>{n(W(O({},i),{pos:{rowStart:e,rowEnd:e,colStart:t,colEnd:t}}))}});return v("div",{className:"grid-cell",ref:r,"data-cell-pos":e+"-"+t,style:{gridRow:e,gridColumn:t,margin:"2px"}})}var rc=Symbol("@ts-pattern/matcher"),t0="@ts-pattern/anonymous-select-key",n0=function(e){return Boolean(e&&typeof e=="object")},Md=function(e){return e&&!!e[rc]},eF=function e(t,n,r){if(n0(t)){if(Md(t)){var i=t[rc]().match(n),o=i.matched,l=i.selections;return o&&l&&Object.keys(l).forEach(function(s){return r(s,l[s])}),o}if(!n0(n))return!1;if(Array.isArray(t))return!!Array.isArray(n)&&t.length===n.length&&t.every(function(s,u){return e(s,n[u],r)});if(t instanceof Map)return n instanceof Map&&Array.from(t.keys()).every(function(s){return e(t.get(s),n.get(s),r)});if(t instanceof Set){if(!(n instanceof Set))return!1;if(t.size===0)return n.size===0;if(t.size===1){var a=Array.from(t.values())[0];return Md(a)?Array.from(n.values()).every(function(s){return e(a,s,r)}):n.has(a)}return Array.from(t.values()).every(function(s){return n.has(s)})}return Object.keys(t).every(function(s){var u,c=t[s];return(s in n||Md(u=c)&&u[rc]().matcherType==="optional")&&e(c,n[s],r)})}return Object.is(n,t)};function eo(e){var t;return(t={})[rc]=function(){return{match:function(n){return{matched:Boolean(e(n))}}}},t}eo(function(e){return!0});eo(function(e){return typeof e=="string"});eo(function(e){return typeof e=="number"});eo(function(e){return typeof e=="boolean"});eo(function(e){return typeof e=="bigint"});eo(function(e){return typeof e=="symbol"});eo(function(e){return e==null});var tF=function(e){return new nF(e,[])},nF=function(){function e(n,r){this.value=void 0,this.cases=void 0,this.value=n,this.cases=r}var t=e.prototype;return t.with=function(){var n=[].slice.call(arguments),r=n[n.length-1],i=[n[0]],o=[];return n.length===3&&typeof n[1]=="function"?(i.push(n[0]),o.push(n[1])):n.length>2&&i.push.apply(i,n.slice(1,n.length-1)),new e(this.value,this.cases.concat([{match:function(l){var a={},s=Boolean(i.some(function(u){return eF(u,l,function(c,f){a[c]=f})})&&o.every(function(u){return u(l)}));return{matched:s,value:s&&Object.keys(a).length?t0 in a?a[t0]:a:l}},handler:r}]))},t.when=function(n,r){return new e(this.value,this.cases.concat([{match:function(i){return{matched:Boolean(n(i)),value:i}},handler:r}]))},t.otherwise=function(n){return new e(this.value,this.cases.concat([{match:function(r){return{matched:!0,value:r}},handler:n}])).run()},t.exhaustive=function(){return this.run()},t.run=function(){for(var n=this.value,r=void 0,i=0;ir(l.target.checked);return U(Ne,{children:[v("input",{className:Ke("SUE-Input",r0.checkboxInput),id:i,"aria-labelledby":_r(e),"aria-label":t,type:"checkbox",checked:n,onChange:o}),v("label",{className:r0.checkboxLabel,htmlFor:i,"data-value":n?"TRUE":"FALSE",children:"Toggle"})]})}const lF={fr:1,px:10,rem:1,"%":100};function aF({id:e,label:t,value:n,onChange:r,units:i=["px","rem","%"]}){const{count:o,unit:l}=tc(n),a=k.useCallback(c=>{if(c===void 0){if(l!=="auto")throw new Error("Undefined count with auto units");r(Tl({unit:l,count:null}));return}if(l==="auto"){console.error("How did you change the count of an auto unit?");return}r(Tl({unit:l,count:c}))},[r,l]),s=k.useCallback(c=>{if(c==="auto"){r(Tl({unit:c,count:null}));return}if(l==="auto"){r(Tl({unit:c,count:lF[c]}));return}r(Tl({unit:c,count:o}))},[o,r,l]);i.includes(l)||i.push(l);const u=o===null;return U("div",{className:Ke("SUE-Input",Ex.wrapper),"aria-label":t,"aria-labelledby":_r(e),children:[v(_f,{name:"value-count","aria-label":"value-count",value:o,disabled:u,onChange:a,min:0}),v(Sx,{unit:l,availableUnits:i,onChange:s})]})}function sF(e){return Tt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}}]})(e)}var Ih={},uF={get exports(){return Ih},set exports(e){Ih=e}};/**! +})`}},allowedParents:Ag,iconSrc:_g,category:"gridlayout",description:"A wrapper for `shiny::plotOutput()` that uses `gridlayout`-friendly sizing defaults. \n For when you want to have a grid area filled entirely with a single plot."}),sx="data:image/png;base64,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",HD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAABq0lEQVRYhe2YsU7DMBCGvyDUDToxsuUREN27gUACBpZuvAMFXgBBH4KtCwMggWDrDuIRujIxAVuXMMRIbuU09vlKiMgnRYniO/uv4zv7mmRZRh1YDjHuX4+Lmsp+beJ6OThMvcde8rasmEaoNo1QbSRCL8mj3L7KmLUfhA4qEXoKDAV+PwyBk1AnidAMOAJGAt+R8Q3eZaRrdAIcAC8BPq/GZyIZMCaYPoAdoHC7shgD28ZHRGzUvwNb5h5jU4pGehoDu8Cno+3LtPnM+ly08ugzsM/0+psAe6YtGs2Eb0d0TGZwEnTM82AIrFvPamgLBbhYQJ/12esTVyky5yT/a8ye/os+/V8opKbKl9p8+qIZdRZjVeJco0Vor92mCvXkGOhrd6qd8HvkpQrAG4q7k+aMdoEr8kBMzHNXq3MtoRvADdCy3rXMu02NATSEpsAj0Ha0tYEHYxNFrNA14MncY2xKiRG6AtzjN1upsV2VDiYV2gLugE6ATwe4ZXodeyMRGhPRdmYIQiL0nDxfSumZPoKQJPwzc9mI/nEO4V/v9QuhEapNbYQGnfCr5BtYaFWUrHRSSwAAAABJRU5ErkJggg==",GD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAiElEQVRYhe3YwQmAIBhA4YxGaaZGaYhGaaZ2sauCB8MX9cP7bnaIxx9imHLOUwTz1wG9DKWFCV1aD/fzKpdPdlsaqikc21qtw0zUUJqhNENphtLChDaP0BcMH8NhJmoozVCaoTRDaYbSDKUZSuv5HyWuaYbfEX6if7iGrr5CmIkm7/BhhtIMpd2GuAxXhhY/aAAAAABJRU5ErkJggg==",JD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAhUlEQVRYhe3ZwQmAMBAAwZxYijVZikVYijXZS/zmoRDJQjjY+ZlHWE6RiFFrLRksswN6GUozlLa+LR7XPf1VcO5btNe5J1pKiY/1adJPtPXnef26E8N7pJmooTRDaYbSDKUZSjOUZiit5zxKGP5iSDNRQ2mG0gylGUpLExr+bIAZSksT+gD98QxXbjF/TQAAAABJRU5ErkJggg==",Ah="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAgklEQVRYhe3Y0QmAIBRA0Wc0SjM1SkM0SjO1i00gGl2MB/f+2sfhQSqWWmtkaPkbMJpQOqF0aaBr74PjuqftX+e+ldZamokKpRNKJ5ROKF0aaPcIjYjmsTazNBMVSieUbuSvb/XlQv16J0kzUaF0QumE0gmlSwMtPo3DCaUTSpcG+gDcmgtUpwOm6gAAAABJRU5ErkJggg==",ux="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAjElEQVRYhe3ZwQmAMBBEUVcsxZosxSIsxZrsJZ4UIQYUh5WB/456+awhCRillM5B/3fAU4SqDa0X87odizeSWk7LNFbPbCZqE9r89Dcy97FqudlMlFA1QtUIVSNUzSb0zRGafou6spkooWqEqmVenD/tGjYTJVSNUDVC1QhVswnl4qwW/GwQI1TNJnQHKA8MWeSBgoAAAAAASUVORK5CYII=",cx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAkklEQVRYhe3ZwQmAMAyF4UQcxZkcxSEcxZncJV70UmlVfEYevO/ay0+KNKBHhDHo/g64S6Fofe1gWtbMjkOYmc3j4OUBzURpQqtXb/s1JDlddYlmogpFUyiaQtEUikYT2npCL5+1TDQTVSiaQtFaX/0Tb5dsLc7pFIqmUDSFoikUDfWEfr5k00zU9bMBTKFoNKEbp/QMWe71dFoAAAAASUVORK5CYII=",QD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABA0lEQVRYhe2ZwQ6CMBBEH8Yv9uDNsMabB38ZLxBRkdDtxlmSzqUktDAvs2yb0A3DwJ51UBuoVQNQqwGotXuAY8nk8+3hfc+8Vxtw3brwfjmt3lckYEAf9TBVCRlBEP8G6HiVjxEAoSqhMAhlCYVAFHUh3rtJrWwc+9n15u40Sb0PGJVJlCYwqXOuW5KNoysJdQKTDGcSWQDACZEJABwQ2QDgG2JVGQGgoF1nBCjqRtkAPs3bz5mjMgEUm4c8AC7z4N+JvWeipR3cbR70CVSZh/IEvGegpcSqzYMugRDzoAEIMw/+j9ireSlVmwddCYWYBw1AmHmArv3gEKsBqNUA1No9wBNu3jnWLc/KGQAAAABJRU5ErkJggg==",KD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAADT0lEQVRYhe2ZP2gUURDGf1ELSy/YpUrELt1BLHIpxAtCOO0SBP80woWAiGyxuWZB2eayxYIiSAJpTBPuQARtJNedacTrgk3IWYlWuVR2EouZl907Lwnue8cRyMDj7e3OMvO9mTfzvb2Rw8NDzrJcGLYDtnIOYNhy5gFcyvqiH8anqZSAMjADdIAmUAF+HvdCFHj/7UdmAKdICfiQ+n0FGAfmgJvAjitDg0ihaRLnK8AocA2oA1eBdZfGBhGBeZ1XosBb0esOsOCH8VdgConQRxfGBhGBgs71Ps/MvRlXxgYB4EDnXJ9nEzrvuTI2CABNnat+GB+B8MM4j1SlP8BnV8Zc74ExIK/XeWDPD+M6Eg2zN14D31wZdAlgDHiHbNIOsAK0kbSpqs5L4JlDm84ATCLlcQpoAbNR4HXMQz+M20ANiYqzCgRu9kB65f9xHiAKvDoSlQLSI0oO7AJuIrAOXAcaUeDNnqDXRspoFQHxXe83gQawkcW4bQSmgdvq3AKAH8a5dPVJizY209zGdTwC3gIPszhgC8A0pHoUeB11fIuk3gPgh/EEkkJEgVdBqIUZi6pWzOKALQCz0ibn8zo6fXSLfhgXAaLAa5uBpA9k7M62e8CsdFvnvqmTur/lh3GDboBm5ZtkEFsAvRHo/W3ENLdd+qfKJrCUxQFbAE3gFpIeLZJuW6SbzBmnQ+AX3ZFqcsIh5zSx3QMmf5eBfRJHq8dUojlkk9dSI7PzYA9gm6Q5HZCQtBawmtKrIGl1D3hqabNLXHTibeAuUhILQCcKPNMTlkGqDkm5fAJcdmAXcEunH+jc0nkRKKdKZx1JuetIyjkRVwBKCNMEWANQPpSjO5VMF76Poyi4ADAJvNfriq40fhiXEQATek0UeA0cR8EWgGGiF4E1c4jXtEmvfNpZp1GwBfCGhIkuwhHvqenz50hlOi4KZUv7VgBGgTvoJxMQJorU+RzSXV+ge4LuKJh71l8nbAAc0YbUAaaG8KNPwGO9t0FPFFyKDZXYQxwr6AcrEM6zizj/O6W7hvSIVT+M50m4USYClxZbLrREchYG+II4/6NHz5y2AhK6sQm8srRvDWAHuEGyoq0TdDcQgjejevuWtgEYOf+PbMhyDmDY8hfkuOfRCqd6WwAAAABJRU5ErkJggg==",qD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABDElEQVRYhe2ZsQ7CMAxEr4gvZmBDXMXGwC+XgVQqERDbCbEr5ZaoalXdq+0kTqdlWbBnHbwN1GoAeGsAeGv3AMdfN8+3h+ZdVwDcXE8GP7hfTqrnW0UgN99NLQDczAP1AFvzM4xpU6MagNw8vz75R1kBQpgHCrPQF0nNW3eJqjTURiDMl1+liYDUvLWQTRGTRiDcl18lAQhrHigDhDYPlAGYxpDmAXkNhG2cSwBzGolXOoWTJIVCQ0hSiAgMIa0BIiiEZiVmGvOpNVfXgtfuhYhgkbDsRpnGUiS6NDfWfoAIEomajowIAFHbExPvEN1X7BanEsTnGuiiVudChBPENH5wOGsAeGsAeGv3AE8yEDlUwXXxqQAAAABJRU5ErkJggg==",XD="_icon_1467k_1",ZD={icon:XD},eL={undo:qD,redo:QD,tour:KD,alignTop:JD,alignBottom:GD,alignCenter:HD,alignSpread:Ah,alignTextCenter:Ah,alignTextLeft:ux,alignTextRight:cx};function tL({id:e,alt:t=e,size:n}){return v("img",{src:eL[e],alt:t,className:ZD.icon,style:n?{height:n}:{}})}function nL(e){return Tt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 90c44.3 0 86 17.3 117.4 48.6C404.7 170 422 211.7 422 256s-17.3 86-48.6 117.4C342 404.7 300.3 422 256 422s-86-17.3-117.4-48.6C107.3 342 90 300.3 90 256s17.3-86 48.6-117.4C170 107.3 211.7 90 256 90m0-42C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"}},{tag:"path",attr:{d:"M277 360h-42V235h42v125zm0-166h-42v-42h42v42z"}}]})(e)}const rL=e=>v("svg",W(P({width:"1em",height:"1em",viewBox:"0 0 15 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:v("path",{d:"M7.38 7.477 14.432.691H.328L7.38 7.477Z",fill:"#75A8DB"})})),iL=e=>v("svg",W(P({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 49 40",width:"1em",height:"1em"},e),{children:v("path",{stroke:"currentColor",strokeWidth:2,d:"M27.42 8.115h2.074l10.592 11.414v1.052L28.705 32.04H27.4v-5.954H13.328l.105-11.975 13.988-.058V8.115Z"})})),xf=e=>U("svg",W(P({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 20",width:"1em",height:"1em"},e),{children:[v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M0 4h16"}),v("path",{stroke:"currentColor",strokeLinejoin:"round",d:"M5.5 6.5 6 16m2-9.5V16m2.5-9.5L10 16"}),v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M5.5 4.5v-2l1.5-1h2l1.5 1v2m-8 0 .5 12 1.5 2h7l1.5-2 .5-12"})]})),oL=e=>v("svg",W(P({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 44 40",width:"1em",height:"1em"},e),{children:v("path",{stroke:"currentColor",strokeWidth:2,d:"M17.08 8.115h-2.074L4.414 19.529v1.052L15.795 32.04H17.1v-5.954h14.072l-.105-11.975-13.988-.058V8.115Z"})})),lL=e=>v("svg",W(P({width:"1em",height:"1em",viewBox:"0 0 15 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:v("path",{d:"m7.38.477 7.052 6.786H.328L7.38.477Z",fill:"#75A8DB"})})),aL="_textPanel_7ayjk_1",sL="_text_holder_7ayjk_12",M1={textPanel:aL,text_holder:sL},uL=({uiArguments:{content:e,area:t,alignment:n},path:r,wrapperProps:i})=>{const o=Cg({area:t,path:r});return v(ax,W(P({ref:o,className:Ke(M1.textPanel,"gridlayout-textPanel"),style:{gridArea:t,justifyItems:n}},i),{children:v("div",{className:M1.text_holder,children:v("h1",{children:e})})}))},cL=xe()({library:"gridlayout",name:"grid_card_text",title:"Grid Text Card",takesChildren:!1,UiComponent:uL,settingsInfo:{content:{label:"Panel text",inputType:"string",defaultValue:"Text for card"},alignment:{label:"Text alignment",inputType:"radio",defaultValue:"start",choices:{start:{icon:ux,label:"left"},center:{icon:Ah,label:"center"},end:{icon:cx,label:"right"}}},area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"},is_title:{label:"Use text as website title",inputType:"boolean",defaultValue:!1,optional:!0}},allowedParents:Ag,iconSrc:sx,category:"gridlayout",description:"A grid card that contains just text that is vertically centered within the panel. Useful for app titles or displaying text-based statistics."}),fx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEVklEQVR4nO3cwYpcRRiG4XeMjouYGzAuXGThyohG1GvQxQQSJVfgRhkUnOANCCYLh6ALvQBBQkxE9BqiKEZ3wixcZO4gm4xIu6geaE+PDMp8VZU67wNncc5ppqqrP7r++Q/0xmKxQDppj7WegMZksBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBTxeK2Bdr7aO+ryJrC1PF4Dnl5e25i8bvqTON5fv/8AuA/8AtwGvgEOJq/j2lvnppciqgXrCBeBa0Cddzq+p4DnlscVYA+4CnzdYjIttsJTwMeUN2yocs4Btyhrfar24C2+sT4CdhqMO1eHa3215qC1v7EusR6qA+AGpcY6w3r9wPLa6uH99ftnKGt4g/Xaaoey9tXUDNYm8Mnk2j7wCrAN3KUUoPp/HlDWcJuypvuT+7uUz6CKmsG6DDyzcn4AvAHcqziHubgHvA48XLl2Fniz1gRqBmtrcv45hirpV+CLybWtWoPXDNbLk/MvT/BvLyaHiukaX6g1cM3/Cp+dnFfb72fsLkcX+3EtH+msdYU1Dp8VKqLlI52T1OTrXv+uZrCOe5CqjCbr7laoCIOliFFqLLfZztQMlh92G7PrY2lgBksRo9RYbrOdsY81PvtYGofBUsQoNZbbbGfsY43PPpbGYbAUMUqN5TbbGftY47OPpXEYLEWMUmO5zXbGPtb47GNpHAZLEaPUWG6znbGPNT77WBqHwVLEKDVWD7+z3sv9LkoM+1jjs4+lcRgsRYxSYx33dT/3+9XZxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIUWqsnrbZnubSjH2s8dnH0jgMliJGqbF62mZ7mksz9rHGZx9L4zBYihilxuppm+1pLs3YxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIlsHabDi2wmoG63dKYXt4vHiCf3tjcrTU01xe5Z9r/ketgWsG67fJ+ZWKY8/VdI1/qjVwzWDdmZy/DZyvOP7cPE9Z41V3ag1eM1g3gfsr508C3wEvVJzDXJwHvqes8aF9ymdQRc1gHQDvT66dBX4AdoELwOmK8xnNacoa7gI/UtZ21XvAw1qTqd15vwlcBz5YubYJbC+PQz3/Yt6jcH/qOhW/raBNu+FD4NMG487VZ5Q1r6pFsP4C3gUuAXsNxp+LPeAy8A5lzatq+RD6FvAt5c1fBF6i1AVPNJzTo+xPSoH+M3CbsvUdtJrMxmJx3PYs/Xc+K1SEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVLE32A0lLomuWLgAAAAAElFTkSuQmCC";var Cf=Yl;function Yl(e){let t=e;var n={}.toString.call(e).slice(8,-1);if(n=="Set")return new Set([...e].map(i=>Yl(i)));if(n=="Map")return new Map([...e].map(i=>[Yl(i[0]),Yl(i[1])]));if(n=="Date")return new Date(e.getTime());if(n=="RegExp")return RegExp(e.source,fL(e));if(n=="Array"||n=="Object"){t=Array.isArray(e)?[]:{};for(var r in e)t[r]=Yl(e[r])}return t}function fL(e){if(typeof e.source.flags=="string")return e.source.flags;var t=[];return e.global&&t.push("g"),e.ignoreCase&&t.push("i"),e.multiline&&t.push("m"),e.sticky&&t.push("y"),e.unicode&&t.push("u"),t.join("")}function cl(e){const t=e.length,n=e[0].length;for(let r of e)if(r.length!==n)throw new Error("Inconsistant number of columns in matrix");return{numRows:t,numCols:n}}function dL(e,{index:t,arr:n,dir:r}){const i=Cf(e);switch(r){case"rows":return Qo(i,t,n);case"cols":return i.map((o,l)=>Qo(o,t,n[l]))}}function pL(e,{index:t,dir:n}){const r=Cf(e);switch(n){case"rows":return Eh(r,t);case"cols":return r.map((i,o)=>Eh(i,t))}}const Dn=".";function kg(e){const t=new Map;return hL(e).forEach(({itemRows:n,itemCols:r},i)=>{if(i===Dn)return;const o=D1(n),l=D1(r);t.set(i,{colStart:l.minVal,rowStart:o.minVal,colSpan:l.span+1,rowSpan:o.span+1,isValid:o.isSequence&&l.isSequence})}),t}function hL(e){var i;const t=new Map,{numRows:n,numCols:r}=cl(e);for(let o=0;o{if("area"in n.uiArguments&&n.uiArguments.area!==void 0){const r=n.uiArguments.area;t.push(r)}}),t}function gL(e,r){var i=r,{name:t}=i,n=ye(i,["name"]);const{rowStart:o,colStart:l}=n,a="rowEnd"in n?n.rowEnd:o+n.rowSpan-1,s="colEnd"in n?n.colEnd:l+n.colSpan-1,u=Cf(e.areas);for(let c=0;c=o-1&&c=l-1&&d{const o=r==="rows"?"cols":"rows",l=yL(i);if(t>l[r].length)throw new Error(`Can't add a tract after index ${t}. Not enought tracts.`);if(t<0)throw new Error("Cant add a tract at a negative index");const a=kg(i.areas);let s=Ua(Dn,l[o].length);a.forEach((u,c)=>{const{itemStart:f,itemEnd:d}=xh(u,r);if(f<=t&&d>t){const h=xh(u,o);for(let m=h.itemStart-1;m{for(let i of n)vL(r,i)})}function wL(e,t){return px(e,t)}function hx(e,t,n=!1){const{dir:r,index:i}=t,o=t.index-1;if(!n){const s=mx(e.areas,t);if(s.length!==0)throw new Error(`Can't remove ${r==="rows"?"row":"col"} ${i} as items ${L5(s)} are entirely contained within it.`)}const l={areas:pL(e.areas,{index:o,dir:r})},a=r==="rows"?"row_sizes":"col_sizes";return bL(e[a])&&(l[a]=Eh(e[a],o)),P(P({},e),l)}function mx(e,t){const n=kg(e);return EL(n,t)}function bL(e){return Array.isArray(e)&&e.length>1}function EL(e,{index:t,dir:n}){let r=[];return e.forEach((i,o)=>{const l=xh(i,n);if(!l)return;const{itemStart:a,itemEnd:s}=l;a===t&&a===s&&r.push(o)}),r}function SL(e,t,n){return wi(e,({areas:r})=>{const{numRows:i,numCols:o}=cl(r);for(let l=0;l{const o=n==="rows"?"row_sizes":"col_sizes";i[o][t-1]=r})}function xL(e,{item_a:t,item_b:n}){return t===n?e:wi(e,r=>{const{n_rows:i,n_cols:o}=CL(r.areas);let l=!1,a=!1;for(let s=0;s{f!==Dn&&l.add(f)});const c=u.length;if(i===-1&&(i=c),i!==c)throw new Error("Invalid layout definition. Not consistant number of columns in every row")}if(!n)n=Ua("1fr",i);else if(n.length!==i)throw new Error("Column sizes vector doesn't match layout definition.");if(!t)t=Ua("1fr",o);else if(t.length!==o)throw new Error("Row sizes vector doesn't match layout definition.");return{uniqueAreas:[...l],areas:a,col_sizes:n,row_sizes:t,gap_size:r!=null?r:"12px"}}function kL(e){const t=[];for(let n of e)t.push(n.trim().split(/\s+/));return t}function gx(n){var r=n,{areas:e}=r,t=ye(r,["areas"]);return P({layout:IL(e)},t)}function TL(n){var r=n,{layout:e}=r,t=ye(r,["layout"]);return P({areas:kL(e)},t)}function IL(e){const{numCols:t}=cl(e),n=[],r=Ua(-1,t);for(let i of e)for(let o=0;oo+l.padEnd(r[a]," ")+(a1,c=r>1,f=[];return(j1({colRange:s,rowIndex:e-1,layoutAreas:i})||u)&&f.push("up"),(j1({colRange:s,rowIndex:o+1,layoutAreas:i})||u)&&f.push("down"),(W1({rowRange:a,colIndex:n-1,layoutAreas:i})||c)&&f.push("left"),(W1({rowRange:a,colIndex:l+1,layoutAreas:i})||c)&&f.push("right"),f}function j1({colRange:e,rowIndex:t,layoutAreas:n}){return t<1||t>n.length?!1:e.every(r=>n[t-1][r-1]===Dn)}function W1({rowRange:e,colIndex:t,layoutAreas:n}){return t<1||t>n[0].length?!1:e.every(r=>n[r-1][t-1]===Dn)}const UL="_marker_mumaw_1",zL="_dragger_mumaw_32",jL="_move_mumaw_52",Y1={marker:UL,dragger:zL,move:jL};function bx(e,t,n){const r=t=r&&e<=i}function za({rowStart:e,rowSpan:t,colStart:n,colSpan:r}){return{rowStart:e,rowEnd:e+t-1,colStart:n,colEnd:n+r-1}}function WL(e,t){return typeof e=="undefined"&&typeof t=="undefined"?!0:typeof e=="undefined"||typeof t=="undefined"?!1:("colSpan"in e&&(e=za(e)),"colSpan"in t&&(t=za(t)),e.colStart===t.colStart&&e.colEnd===t.colEnd&&e.rowStart===t.rowStart&&e.rowEnd===t.rowEnd)}function YL({row:e,col:t}){return`row${e}-col${t}`}function VL({dragDirection:e,gridLocation:t,layoutAreas:n}){const{rowStart:r,rowEnd:i,colStart:o,colEnd:l}=za(t),a=n.length,s=n[0].length;let u,c,f;switch(e){case"up":if(r===1)return{shrinkExtent:i,growExtent:1};u=r-1,c=1,f=i;break;case"left":if(o===1)return{shrinkExtent:l,growExtent:1};u=o-1,c=1,f=l;break;case"down":if(i===a)return{shrinkExtent:r,growExtent:a};u=i+1,c=a,f=r;break;case"right":if(l===s)return{shrinkExtent:o,growExtent:s};u=l+1,c=s,f=o;break}const d=e==="up"||e==="down",p=e==="left"||e==="up",[h,m]=d?[o,l]:[r,i],E=(w,S)=>{const[_,b]=d?[w,S]:[S,w];return n[_-1][b-1]!==Dn},g=ec(h,m),y=ec(u,c);for(let w of y)for(let S of g)if(E(w,S))return{shrinkExtent:f,growExtent:w+(p?1:-1)};return{shrinkExtent:f,growExtent:c}}function $L({dir:e,gridContainerStyles:t,gridContainerBoundingRect:n}){const r=Ch(t.getPropertyValue("gap")),o=Ch(t.getPropertyValue("padding"))+r/2,l=n[e==="rows"?"y":"x"],a=HL(t,e),s=a.length,u=[];for(let c=0;cbx(o,s,u));if(l===void 0)return;const a=JL[n];return i[a]=l.index,i}const JL={right:"colEnd",left:"colStart",up:"rowStart",down:"rowEnd"};function QL({overlayRef:e,gridLocation:t,layoutAreas:n,onDragEnd:r}){const i=za(t),o=k.useRef(null),l=k.useCallback(u=>{const c=e.current,f=o.current;if(!c||!f)throw new Error("For some reason we are observing dragging when we shouldn't");const d=GL({mousePos:u,dragState:f});d&&$1(c,d)},[e]),a=k.useCallback(()=>{const u=e.current,c=o.current;if(!u||!c)return;const f=c.gridItemExtent;WL(f,i)||r(f),u.classList.remove("dragging"),document.removeEventListener("mousemove",l),V1("on")},[i,l,r,e]);return k.useCallback(u=>{const c=e.current;if(!c)return;const f=c.parentElement;if(!f)return;const d=getComputedStyle(c.parentElement),p=f.getBoundingClientRect(),h=u==="down"||u==="up"?"rows":"cols",{shrinkExtent:m,growExtent:E}=VL({dragDirection:u,gridLocation:t,layoutAreas:n});o.current={dragHandle:u,gridItemExtent:za(t),tractExtents:$L({dir:h,gridContainerStyles:d,gridContainerBoundingRect:p}).filter(({index:g})=>bx(g,m,E))},$1(e.current,o.current.gridItemExtent),c.classList.add("dragging"),document.addEventListener("mousemove",l),document.addEventListener("mouseup",a,{once:!0}),V1("off")},[a,t,n,l,e])}function V1(e){var n;const t=(n=document.querySelector("body"))==null?void 0:n.classList;e==="off"?t==null||t.add("disable-text-selection"):t==null||t.remove("disable-text-selection")}function $1(e,{rowStart:t,rowEnd:n,colStart:r,colEnd:i}){e.style.setProperty("--drag-grid-row-start",String(t)),e.style.setProperty("--drag-grid-row-end",String(n+1)),e.style.setProperty("--drag-grid-column-start",String(r)),e.style.setProperty("--drag-grid-column-end",String(i+1))}function KL({area:e,gridLocation:t,areas:n,onNewPos:r}){if(typeof t=="undefined")throw new Error(`Item in ${e} is not in the location map`);const i=k.useRef(null),o=QL({overlayRef:i,gridLocation:t,layoutAreas:n,onDragEnd:r}),l=k.useMemo(()=>BL({gridLocation:t,layoutAreas:n}),[t,n]),a=k.useMemo(()=>{let s=[];for(let u of l)s.push(v("div",{className:Ke(Y1.dragger,u),title:`resize ${e} ${u}`,onMouseDown:c=>{H1(c),o(u)},children:qL[u]},u));return s},[e,l,o]);return k.useEffect(()=>{var s;(s=i.current)==null||s.style.setProperty("--grid-area",e)},[e]),v("div",{ref:i,onClick:H1,className:Y1.marker+" grid-area-overlay",children:a})}function H1(e){e.preventDefault(),e.stopPropagation()}const qL={up:v(z1,{}),down:v(z1,{}),left:v(U1,{}),right:v(U1,{})},XL="_ResizableGrid_i4cq9_1",ZL={ResizableGrid:XL,"size-detection-cell":"_size-detection-cell_i4cq9_1"},e6=/(^[\d|.]+)\s*(px|%|rem|fr)|(^auto$)/;function t6(e){return e6.test(e)}const n6=/(px|%|rem|fr|auto)/g,r6=/^[\d|.]*/g;function tc(e){var i,o;const t=((i=e.match(n6))==null?void 0:i[0])||"px",n=(o=e.match(r6))==null?void 0:o[0],r=n?Number(n):null;if(t==="auto"){if(r!==null)throw new Error("Cant have a count value with auto units.");return{count:null,unit:"auto"}}if(r===null)throw new Error("You must have a count for non-auto units.");if(t==="fr"&&r<0)throw new Error(`Can't have a negative count with ${t} units.`);return{count:r,unit:t}}function Tl(e){return e.unit==="auto"?"auto":`${e.count}${e.unit}`}const i6="_infoIcon_15ri6_1",o6="_container_15ri6_10",l6="_header_15ri6_15",a6="_info_15ri6_1",s6="_unit_15ri6_27",u6="_description_15ri6_31",fo={infoIcon:i6,container:o6,header:l6,info:a6,unit:s6,description:u6},c6=({units:e})=>U(yf,{placement:"right",children:[v(vf,{className:fo.infoIcon,children:v(nL,{})}),v(lg,{children:v(f6,{units:e})})]});function f6({units:e}){return U("div",{className:fo.container,children:[v("div",{className:fo.header,children:"CSS size options"}),v("div",{className:fo.info,children:e.map(t=>U(k.Fragment,{children:[v("div",{className:fo.unit,children:t}),v("div",{className:fo.description,children:d6[t]})]},t))})]})}const d6={"%":"Relative to percentage of container size",auto:"Let the content decide size",fr:"Relative unit. E.g. 2fr is twice the size of 1fr",px:"Screen pixels",rem:"Pixel size of app font. Typically 16 pixels."},p6="_wrapper_3jy8f_1",h6="_unitSelector_3jy8f_9",Ex={wrapper:p6,unitSelector:h6};function Sx({unit:e,availableUnits:t,onChange:n}){return U(Ne,{children:[v("select",{className:Ex.unitSelector,"aria-label":"value-unit",name:"value-unit",value:e,onChange:r=>n(r.target.value),children:t.map(r=>v("option",{value:r,children:r},r))}),v(c6,{units:t})]})}function _r(e){return e+"-label"}function m6({id:e,label:t,value:n,onChange:r}){return v(_f,{id:e,"aria-label":t,"aria-labelledby":_r(e),value:n,onChange:r})}function _f(a){var s=a,{value:e,onChange:t,min:n=0,max:r,step:i,disabled:o}=s,l=ye(s,["value","onChange","min","max","step","disabled"]);const{displayedVal:u,handleChange:c,handleBlur:f,incrementUp:d,incrementDown:p}=g6({min:n,max:r,step:i,value:e,onChange:t});return U("div",{className:"NumberInput SUE-Input","aria-disabled":o,onBlur:f,children:[v("input",W(P({},l),{className:"input-field",type:"number",placeholder:"0",value:u,min:n,max:r,step:i,disabled:o,onChange:c})),U("div",{className:"incrementer-buttons",children:[v("button",{className:"up-button","aria-label":"Increment number up",onClick:d,type:"button",children:v(lL,{})}),v("button",{className:"down-button","aria-label":"Increment number down",onClick:p,type:"button",children:v(rL,{})})]})]})}function g6({min:e=-1/0,max:t=1/0,step:n=1,value:r,onChange:i}){const o=k.useCallback(p=>h=>{if(h.preventDefault(),typeof r!="number"||typeof n!="number")return;const m=r+(p==="up"?1:-1)*n;typeof e=="number"&&e>m||typeof t=="number"&&to("up"),[o]),a=k.useMemo(()=>o("down"),[o]),[s,u]=k.useState(r);k.useEffect(()=>u(r),[r]);const c=k.useCallback(p=>{const h=p.target.value;u(m=>Number(m)===Number(h)?m:h),i(Number(h))},[i]),f=k.useCallback(()=>{u(p=>Number(p).toString())},[]);return{incrementUp:l,incrementDown:a,handleChange:c,displayedVal:s===0||s===null?"":s,handleBlur:f}}function G1(e,t){const n=Math.abs(t-e)+1,r=ee+o*r)}function y6({areas:e,row_sizes:t,col_sizes:n,gap_size:r}){return{gridTemplateAreas:e.map(i=>`"${i.join(" ")}"`).join(` + `),gridTemplateRows:t.join(" "),gridTemplateColumns:n.join(" "),"--grid-gap":r}}function J1(e){return e.split(" ")}function v6(e){const t=e.match(/"([.\w\s]+)"/g);if(!t)throw new Error("Can't parse area definition");return t.map(n=>n.replaceAll('"',"").split(" "))}function w6(e){const t=J1(e.style.gridTemplateRows),n=J1(e.style.gridTemplateColumns),r=v6(e.style.gridTemplateAreas),i=e.style.getPropertyValue("--grid-gap");return{row_sizes:t,col_sizes:n,areas:r,gap_size:i}}function Ax({container:e,dir:t}){return getComputedStyle(e).getPropertyValue(t==="rows"?"grid-template-rows":"grid-template-columns").split(" ").map(n=>Number(n.replaceAll("px","")))}const _h=e=>Number(e.toFixed(4)),nc=40,b6=.15,xx=e=>t=>Math.round(t/e)*e,E6=5,kf=xx(E6),S6=.01,Cx=xx(S6);function A6(e,{pixelToFrRatio:t,beforeInfo:n,afterInfo:r}){const i=Cx(e*t),o=n.count+i,l=r.count-i;return(i<0?o/l:l/o)=o.length?null:o[u];if(c==="auto"||f==="auto"){const h=getComputedStyle(r).getPropertyValue(t==="rows"?"grid-template-rows":"grid-template-columns").split(" ");c==="auto"&&(c=h[s],o[s]=c),f==="auto"&&(f=h[u],o[u]=f),r.style[i]=h.join(" ")}const d=k6(c,f);if(d.type==="unsupported")throw new Error("Unsupported drag type");r.classList.add("been-dragged");const p=W(P({dir:t,mouseStart:kx(e,t),originalSizes:o,currentSizes:[...o],beforeIndex:s,afterIndex:u},d),{pixelToFrRatio:1});return d.type==="both-relative"&&(p.pixelToFrRatio=T6({container:r,index:n,dir:t,frCounts:{before:d.beforeInfo.count,after:d.afterInfo.count}})),p}function O6({mousePosition:e,drag:t,container:n}){const i=kx(e,t.dir)-t.mouseStart,o=[...t.originalSizes];let l;switch(t.type){case"before-pixel":l=C6(i,t);break;case"after-pixel":l=_6(i,t);break;case"both-pixel":l=x6(i,t);break;case"both-relative":l=A6(i,t);break}l!=="no-change"&&(l.beforeSize&&(o[t.beforeIndex]=l.beforeSize),l.afterSize&&(o[t.afterIndex]=l.afterSize),t.currentSizes=o,t.dir==="cols"?n.style.gridTemplateColumns=o.join(" "):n.style.gridTemplateRows=o.join(" "))}function P6(e){return e.match(/[0-9|.]+px/)!==null}function _x(e){return e.match(/[0-9|.]+fr/)!==null}function kh(e){if(_x(e))return{type:"fr",count:Number(e.replace("fr","")),value:e};if(P6(e))return{type:"pixel",count:Number(e.replace("px","")),value:e};throw new Error("Unknown tract sizing unit: "+e)}function kx(e,t){return t==="rows"?e.clientY:e.clientX}function N6(e){return e.some(t=>_x(t))}function R6(e){return e.some(t=>t==="auto")}const D6="_tractInfoDisplay_cvtwo_1",L6="_sizeWidget_cvtwo_61",F6="_cssSizeInput_cvtwo_80",M6="_hoverListener_cvtwo_94",B6="_buttons_cvtwo_114",U6="_tractAddButton_cvtwo_127",z6="_deleteButton_cvtwo_128",Yr={tractInfoDisplay:D6,sizeWidget:L6,cssSizeInput:F6,hoverListener:M6,buttons:B6,tractAddButton:U6,deleteButton:z6},j6=["fr","px"];function W6({dir:e,index:t,size:n,deletionConflicts:r,addTract:i,deleteTract:o,changeUnit:l,changeCount:a}){const{unit:s,count:u}=tc(n);return U("div",{className:Yr.tractInfoDisplay,"data-drag-dir":e,style:{"--tract-index":t+1},children:[v("div",{className:Yr.hoverListener}),U("div",{className:Yr.sizeWidget,onClick:$6,children:[U("div",{className:Yr.buttons,children:[v(Q1,{dir:e,onClick:()=>i("before")}),v(Y6,{dir:e,onClick:o,deletionConflicts:r}),v(Q1,{dir:e,onClick:()=>i("after")})]}),U("div",{className:Yr.cssSizeInput,children:[v(_f,{name:"value-count","aria-label":"value-count",value:u,onChange:a,min:0}),v(Sx,{unit:s,availableUnits:j6,onChange:c=>l(c)})]})]})]})}function Y6({dir:e,onClick:t,deletionConflicts:n}){const r=e==="rows"?"right":"down",i=n.length===0,o=i?"Delete tract":`Can't delete because the items ${n.join(",")} are entirely contained in tract`;return v(Ir,{className:Yr.deleteButton,onClick:Tx(i?t:void 0),"data-enabled":i,text:o,size:"medium",position:r,children:v(xf,{})})}function Q1({dir:e,onClick:t}){const n=e==="rows"?"right":"down",r=e==="rows"?"Add row":"Add column";return v(Ir,{className:Yr.tractAddButton,onClick:Tx(t),position:n,text:r,children:v(Ig,{})})}function Tx(e){return function(t){t.currentTarget.blur(),e==null||e()}}function V6(e,t){let n=0,r=0;for(let i=0;imx(r,{dir:c,index:f+1}),[r]),l=c=>f=>{const{unit:d}=tc(t[c]);i({type:"RESIZE",index:c,dir:e,size:`${f}${d}`})},a=c=>f=>{const d=n(),{count:p}=tc(t[c]);let h=1;f==="px"&&(h=kf(d[c]));const m=V6(d,t);f==="fr"&&m!=="NO_FR_UNITS"&&(h=_h(Cx(p?p*m:1))),i({type:"RESIZE",index:c,dir:e,size:`${h}${f}`})},s=c=>f=>i({type:"ADD",dir:e,index:f==="before"?c:c+1}),u=c=>()=>{i({type:"DELETE",dir:e,index:c+1})};return v(Ne,{children:t.map((c,f)=>v(W6,{index:f,dir:e,addTract:s(f),deleteTract:u(f),changeUnit:a(f),changeCount:l(f),size:c,deletionConflicts:o({dir:e,index:f})},e+f))})}function $6(e){e.stopPropagation()}function q1(e,t){e.querySelectorAll(`.${Yr.tractInfoDisplay}`).forEach(n=>{n.style.display=t==="hide"?"none":"block"})}const H6="_columnSizer_9b32k_1",G6="_rowSizer_9b32k_2",X1={columnSizer:H6,rowSizer:G6};function Z1({dir:e,index:t,onStartDrag:n}){return v("div",{className:e==="rows"?X1.rowSizer:X1.columnSizer,title:`resize ${e==="rows"?"rows":"columns"} ${t-1} and ${t}`,onMouseDown:r=>n({e:r,dir:e,index:t}),style:{[e==="rows"?"gridRow":"gridColumn"]:t}})}function J6(e,t="Ref is not yet initialized"){if(e.current===null)throw new Error(t);return e.current}function Q6({containerRef:e,onDragEnd:t}){return k.useCallback(({e:r,dir:i,index:o})=>{const l=J6(e,"How are you dragging on an element without a container?");r.preventDefault();const a=I6({mousePosition:r,dir:i,index:o,container:l}),{beforeIndex:s,afterIndex:u}=a,c=e0(l,{dir:i,index:s,size:a.currentSizes[s]}),f=e0(l,{dir:i,index:u,size:a.currentSizes[u]});K6(l,a.dir,{move:d=>{O6({mousePosition:d,drag:a,container:l}),c.update(a.currentSizes[s]),f.update(a.currentSizes[u])},end:()=>{c.remove(),f.remove(),t&&t(w6(l))}})},[e,t])}function e0(e,{dir:t,index:n,size:r}){const i=document.createElement("div"),o=t==="rows"?{gridRow:String(n+1),gridColumn:"1",flexDirection:"row"}:{gridColumn:String(n+1),gridRow:"1",flexDirection:"column"};Object.assign(i.style,o,{zIndex:"1",display:"flex",alignItems:"center"});const l=document.createElement("div");return Object.assign(l.style,{padding:"3px 7px",borderRadius:"var(--corner-radius)",backgroundColor:"var(--light-grey, pink)"}),l.innerHTML=r,i.appendChild(l),e.appendChild(i),q1(e,"hide"),{remove:()=>{i.remove(),q1(e,"show")},update:a=>{l.innerHTML=a}}}function K6(e,t,n){const r=document.createElement("div");Object.assign(r.style,{position:"fixed",inset:"0px",zIndex:"3",cursor:t==="rows"?"ns-resize":"ew-resize"}),e.appendChild(r);const i=()=>{o(),n.end()};r.addEventListener("mousemove",n.move),r.addEventListener("mouseup",i),r.addEventListener("mouseleave",i);function o(){r.removeEventListener("mousemove",n.move),r.removeEventListener("mouseup",i),r.removeEventListener("mouseleave",i),r.remove()}}function q6({areas:e,col_sizes:t,row_sizes:n,gap_size:r}){return{areas:e,gap_size:r,col_sizes:aa(t),row_sizes:aa(n)}}const X6="1fr";function Z6(i){var o=i,{className:e,children:t,onNewLayout:n}=o,r=ye(o,["className","children","onNewLayout"]);r=q6(r);let{row_sizes:l,col_sizes:a}=r;const s=O.useRef(null),u=y6(r),c=a.length<2?[]:G1(2,a.length),f=l.length<2?[]:G1(2,l.length),d=Q6({containerRef:s,onDragEnd:n}),p=[ZL.ResizableGrid];e&&p.push(e);const h=O.useCallback(g=>{switch(g.type){case"ADD":return dx(r,{afterIndex:g.index,dir:g.dir,size:X6});case"RESIZE":return eF(r,g);case"DELETE":return hx(r,g)}},[r]),m=O.useCallback(g=>n(h(g)),[h,n]),E=O.useCallback(g=>{const y=s.current;return y?Ax({container:y,dir:g}):[]},[]);return U("div",{className:Ke(...p),ref:s,style:u,children:[c.map(g=>v(Z1,{dir:"cols",index:g,onStartDrag:d},"cols"+g)),f.map(g=>v(Z1,{dir:"rows",index:g,onStartDrag:d},"rows"+g)),t,v(K1,{dir:"cols",sizes:a,getActualSizes:()=>E("cols"),areas:r.areas,onUpdate:m}),v(K1,{dir:"rows",sizes:l,getActualSizes:()=>E("rows"),areas:r.areas,onUpdate:m})]})}function eF(e,{dir:t,index:n,size:r}){return wi(e,i=>{i[t==="rows"?"row_sizes":"col_sizes"][n]=r})}function tF({gridRow:e,gridColumn:t,onDroppedNode:n}){const r=Eg({getCanAcceptDrop:i=>!0,onDrop:i=>{n(W(P({},i),{pos:{rowStart:e,rowEnd:e,colStart:t,colEnd:t}}))}});return v("div",{className:"grid-cell",ref:r,"data-cell-pos":e+"-"+t,style:{gridRow:e,gridColumn:t,margin:"2px"}})}var rc=Symbol("@ts-pattern/matcher"),t0="@ts-pattern/anonymous-select-key",n0=function(e){return Boolean(e&&typeof e=="object")},Md=function(e){return e&&!!e[rc]},nF=function e(t,n,r){if(n0(t)){if(Md(t)){var i=t[rc]().match(n),o=i.matched,l=i.selections;return o&&l&&Object.keys(l).forEach(function(s){return r(s,l[s])}),o}if(!n0(n))return!1;if(Array.isArray(t))return!!Array.isArray(n)&&t.length===n.length&&t.every(function(s,u){return e(s,n[u],r)});if(t instanceof Map)return n instanceof Map&&Array.from(t.keys()).every(function(s){return e(t.get(s),n.get(s),r)});if(t instanceof Set){if(!(n instanceof Set))return!1;if(t.size===0)return n.size===0;if(t.size===1){var a=Array.from(t.values())[0];return Md(a)?Array.from(n.values()).every(function(s){return e(a,s,r)}):n.has(a)}return Array.from(t.values()).every(function(s){return n.has(s)})}return Object.keys(t).every(function(s){var u,c=t[s];return(s in n||Md(u=c)&&u[rc]().matcherType==="optional")&&e(c,n[s],r)})}return Object.is(n,t)};function eo(e){var t;return(t={})[rc]=function(){return{match:function(n){return{matched:Boolean(e(n))}}}},t}eo(function(e){return!0});eo(function(e){return typeof e=="string"});eo(function(e){return typeof e=="number"});eo(function(e){return typeof e=="boolean"});eo(function(e){return typeof e=="bigint"});eo(function(e){return typeof e=="symbol"});eo(function(e){return e==null});var rF=function(e){return new iF(e,[])},iF=function(){function e(n,r){this.value=void 0,this.cases=void 0,this.value=n,this.cases=r}var t=e.prototype;return t.with=function(){var n=[].slice.call(arguments),r=n[n.length-1],i=[n[0]],o=[];return n.length===3&&typeof n[1]=="function"?(i.push(n[0]),o.push(n[1])):n.length>2&&i.push.apply(i,n.slice(1,n.length-1)),new e(this.value,this.cases.concat([{match:function(l){var a={},s=Boolean(i.some(function(u){return nF(u,l,function(c,f){a[c]=f})})&&o.every(function(u){return u(l)}));return{matched:s,value:s&&Object.keys(a).length?t0 in a?a[t0]:a:l}},handler:r}]))},t.when=function(n,r){return new e(this.value,this.cases.concat([{match:function(i){return{matched:Boolean(n(i)),value:i}},handler:r}]))},t.otherwise=function(n){return new e(this.value,this.cases.concat([{match:function(r){return{matched:!0,value:r}},handler:n}])).run()},t.exhaustive=function(){return this.run()},t.run=function(){for(var n=this.value,r=void 0,i=0;ir(l.target.checked);return U(Ne,{children:[v("input",{className:Ke("SUE-Input",r0.checkboxInput),id:i,"aria-labelledby":_r(e),"aria-label":t,type:"checkbox",checked:n,onChange:o}),v("label",{className:r0.checkboxLabel,htmlFor:i,"data-value":n?"TRUE":"FALSE",children:"Toggle"})]})}const sF={fr:1,px:10,rem:1,"%":100};function uF({id:e,label:t,value:n,onChange:r,units:i=["px","rem","%"]}){const{count:o,unit:l}=tc(n),a=k.useCallback(c=>{if(c===void 0){if(l!=="auto")throw new Error("Undefined count with auto units");r(Tl({unit:l,count:null}));return}if(l==="auto"){console.error("How did you change the count of an auto unit?");return}r(Tl({unit:l,count:c}))},[r,l]),s=k.useCallback(c=>{if(c==="auto"){r(Tl({unit:c,count:null}));return}if(l==="auto"){r(Tl({unit:c,count:sF[c]}));return}r(Tl({unit:c,count:o}))},[o,r,l]);i.includes(l)||i.push(l);const u=o===null;return U("div",{className:Ke("SUE-Input",Ex.wrapper),"aria-label":t,"aria-labelledby":_r(e),children:[v(_f,{name:"value-count","aria-label":"value-count",value:o,disabled:u,onChange:a,min:0}),v(Sx,{unit:l,availableUnits:i,onChange:s})]})}function cF(e){return Tt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}}]})(e)}var Th={},fF={get exports(){return Th},set exports(e){Th=e}};/**! * Sortable 1.15.0 * @author RubaXa * @author owenm * @license MIT - */function i0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function dF(e,t){if(e==null)return{};var n=fF(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pF(e){return hF(e)||mF(e)||gF(e)||yF()}function hF(e){if(Array.isArray(e))return Oh(e)}function mF(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gF(e,t){if(e){if(typeof e=="string")return Oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oh(e,t)}}function Oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function wF(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function _n(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&ic(e,t):ic(e,t))||r&&e===n)return e;if(e===n)break}while(e=wF(e))}return null}var l0=/\s+/g;function Ue(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(l0," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(l0," ")}}function Z(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function ji(e,t){var n="";if(typeof e=="string")n=e;else do{var r=Z(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Nx(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:l=i<=o,!l)return r;if(r===qn())break;r=Jr(r,!1)}return!1}function Ko(e,t,n,r){for(var i=0,o=0,l=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=dF(r,_F);os.pluginEvent.bind(re)(t,n,tr({dragEl:G,parentEl:Ve,ghostEl:ae,rootEl:Re,nextEl:Oi,lastDownEl:su,cloneEl:Be,cloneHidden:Vr,dragStarted:$l,putSortable:ut,activeSortable:re.active,originalEvent:i,oldIndex:_o,oldDraggableIndex:ca,newIndex:Yt,newDraggableIndex:Br,hideGhostForTarget:Bx,unhideGhostForTarget:Ux,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(a){St({sortable:n,name:a,originalEvent:i})}},o))};function St(e){Vl(tr({putSortable:ut,cloneEl:Be,targetEl:G,rootEl:Re,oldIndex:_o,oldDraggableIndex:ca,newIndex:Yt,newDraggableIndex:Br},e))}var G,Ve,ae,Re,Oi,su,Be,Vr,_o,Yt,ca,Br,Ls,ut,po=!1,oc=!1,lc=[],Ai,Sn,jd,Wd,c0,f0,$l,so,fa,da=!1,Fs=!1,uu,gt,Yd=[],Ph=!1,ac=[],Tf=typeof document!="undefined",Ms=Ix,d0=is||Or?"cssFloat":"float",kF=Tf&&!Ox&&!Ix&&"draggable"in document.createElement("div"),Lx=function(){if(Tf){if(Or)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Fx=function(t,n){var r=Z(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Ko(t,0,n),l=Ko(t,1,n),a=o&&Z(o),s=l&&Z(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Fe(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Fe(l).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return l&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=i&&r[d0]==="none"||l&&r[d0]==="none"&&u+c>i)?"vertical":"horizontal"},TF=function(t,n,r){var i=r?t.left:t.top,o=r?t.right:t.bottom,l=r?t.width:t.height,a=r?n.left:n.top,s=r?n.right:n.bottom,u=r?n.width:n.height;return i===a||o===s||i+l/2===a+u/2},IF=function(t,n){var r;return lc.some(function(i){var o=i[bt].options.emptyInsertThreshold;if(!(!o||Og(i))){var l=Fe(i),a=t>=l.left-o&&t<=l.right+o,s=n>=l.top-o&&n<=l.bottom+o;if(a&&s)return r=i}}),r},Mx=function(t){function n(o,l){return function(a,s,u,c){var f=a.options.group.name&&s.options.group.name&&a.options.group.name===s.options.group.name;if(o==null&&(l||f))return!0;if(o==null||o===!1)return!1;if(l&&o==="clone")return o;if(typeof o=="function")return n(o(a,s,u,c),l)(a,s,u,c);var d=(l?a:s).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var r={},i=t.group;(!i||au(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},Bx=function(){!Lx&&ae&&Z(ae,"display","none")},Ux=function(){!Lx&&ae&&Z(ae,"display","")};Tf&&!Ox&&document.addEventListener("click",function(e){if(oc)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),oc=!1,!1},!0);var xi=function(t){if(G){t=t.touches?t.touches[0]:t;var n=IF(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[bt]._onDragOver(r)}}},OF=function(t){G&&G.parentNode[bt]._isOutsideThisEl(t.target)};function re(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=mn({},t),e[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fx(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,a){l.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:re.supportPointer!==!1&&"PointerEvent"in window&&!sa,emptyInsertThreshold:5};os.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);Mx(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:kF,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pe(e,"pointerdown",this._onTapStart):(pe(e,"mousedown",this._onTapStart),pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pe(e,"dragover",this),pe(e,"dragenter",this)),lc.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),mn(this,AF())}re.prototype={constructor:re,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(so=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,o=i.preventOnFilter,l=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(BF(r),!G&&!(/mousedown|pointerdown/.test(l)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&sa&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=_n(s,i.draggable,r,!1),!(s&&s.animated)&&su!==s)){if(_o=He(s),ca=He(s,i.draggable),typeof c=="function"){if(c.call(this,t,s,this)){St({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:r,fromEl:r}),Ot("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=_n(u,f.trim(),r,!1),f)return St({sortable:n,rootEl:f,name:"filter",targetEl:s,fromEl:r,toEl:r}),Ot("filter",n,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!_n(u,i.handle,r,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,n,r){var i=this,o=i.el,l=i.options,a=o.ownerDocument,s;if(r&&!G&&r.parentNode===o){var u=Fe(r);if(Re=o,G=r,Ve=G.parentNode,Oi=G.nextSibling,su=r,Ls=l.group,re.dragged=G,Ai={target:G,clientX:(n||t).clientX,clientY:(n||t).clientY},c0=Ai.clientX-u.left,f0=Ai.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,G.style["will-change"]="all",s=function(){if(Ot("delayEnded",i,{evt:t}),re.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!o0&&i.nativeDraggable&&(G.draggable=!0),i._triggerDragStart(t,n),St({sortable:i,name:"choose",originalEvent:t}),Ue(G,l.chosenClass,!0)},l.ignore.split(",").forEach(function(c){Nx(G,c.trim(),Vd)}),pe(a,"dragover",xi),pe(a,"mousemove",xi),pe(a,"touchmove",xi),pe(a,"mouseup",i._onDrop),pe(a,"touchend",i._onDrop),pe(a,"touchcancel",i._onDrop),o0&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),Ot("delayStart",this,{evt:t}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(is||Or))){if(re.eventCanceled){this._onDrop();return}pe(a,"mouseup",i._disableDelayedDrag),pe(a,"touchend",i._disableDelayedDrag),pe(a,"touchcancel",i._disableDelayedDrag),pe(a,"mousemove",i._delayedDragTouchMoveHandler),pe(a,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&pe(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,l.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Vd(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ce(t,"mouseup",this._disableDelayedDrag),ce(t,"touchend",this._disableDelayedDrag),ce(t,"touchcancel",this._disableDelayedDrag),ce(t,"mousemove",this._delayedDragTouchMoveHandler),ce(t,"touchmove",this._delayedDragTouchMoveHandler),ce(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?pe(document,"pointermove",this._onTouchMove):n?pe(document,"touchmove",this._onTouchMove):pe(document,"mousemove",this._onTouchMove):(pe(G,"dragend",this),pe(Re,"dragstart",this._onDragStart));try{document.selection?cu(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(t,n){if(po=!1,Re&&G){Ot("dragStarted",this,{evt:n}),this.nativeDraggable&&pe(document,"dragover",OF);var r=this.options;!t&&Ue(G,r.dragClass,!1),Ue(G,r.ghostClass,!0),re.active=this,t&&this._appendGhost(),St({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Sn){this._lastX=Sn.clientX,this._lastY=Sn.clientY,Bx();for(var t=document.elementFromPoint(Sn.clientX,Sn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Sn.clientX,Sn.clientY),t!==n);)n=t;if(G.parentNode[bt]._isOutsideThisEl(t),n)do{if(n[bt]){var r=void 0;if(r=n[bt]._onDragOver({clientX:Sn.clientX,clientY:Sn.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Ux()}},_onTouchMove:function(t){if(Ai){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,l=ae&&ji(ae,!0),a=ae&&l&&l.a,s=ae&&l&&l.d,u=Ms&>&&s0(gt),c=(o.clientX-Ai.clientX+i.x)/(a||1)+(u?u[0]-Yd[0]:0)/(a||1),f=(o.clientY-Ai.clientY+i.y)/(s||1)+(u?u[1]-Yd[1]:0)/(s||1);if(!re.active&&!po){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(St({rootEl:Ve,name:"add",toEl:Ve,fromEl:Re,originalEvent:t}),St({sortable:this,name:"remove",toEl:Ve,originalEvent:t}),St({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Re,originalEvent:t}),St({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),ut&&ut.save()):Yt!==_o&&Yt>=0&&(St({sortable:this,name:"update",toEl:Ve,originalEvent:t}),St({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),re.active&&((Yt==null||Yt===-1)&&(Yt=_o,Br=ca),St({sortable:this,name:"end",toEl:Ve,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Ot("nulling",this),Re=G=Ve=ae=Oi=Be=su=Vr=Ai=Sn=$l=Yt=Br=_o=ca=so=fa=ut=Ls=re.dragged=re.ghost=re.clone=re.active=null,ac.forEach(function(t){t.checked=!0}),ac.length=jd=Wd=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),PF(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,o=r.length,l=this.options;ir.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function LF(e,t,n,r,i,o,l,a){var s=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!l){if(a&&uuc+u*o/2:sf-uu)return-fa}else if(s>c+u*(1-i)/2&&sf-u*o/2)?s>c+u/2?1:-1:0}function FF(e){return He(G)1&&(le.forEach(function(a){o.addAnimationState({target:a,rect:Pt?Fe(a):l}),Ud(a),a.fromRect=l,r.removeAnimationState(a)}),Pt=!1,YF(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(n){var r=n.sortable,i=n.isOwner,o=n.insertion,l=n.activeSortable,a=n.parentEl,s=n.putSortable,u=this.options;if(o){if(i&&l._hideClone(),Ol=!1,u.animation&&le.length>1&&(Pt||!i&&!l.options.sort&&!s)){var c=Fe(ke,!1,!0,!0);le.forEach(function(d){d!==ke&&(u0(d,c),a.appendChild(d))}),Pt=!0}if(!i)if(Pt||zs(),le.length>1){var f=Us;l._showClone(r),l.options.animation&&!Us&&f&&Wt.forEach(function(d){l.addAnimationState({target:d,rect:Pl}),d.fromRect=Pl,d.thisAnimationDuration=null})}else l._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,i=n.isOwner,o=n.activeSortable;if(le.forEach(function(a){a.thisAnimationDuration=null}),o.options.animation&&!i&&o.multiDrag.isMultiDrag){Pl=mn({},r);var l=ji(ke,!0);Pl.top-=l.f,Pl.left-=l.e}},dragOverAnimationComplete:function(){Pt&&(Pt=!1,zs())},drop:function(n){var r=n.originalEvent,i=n.rootEl,o=n.parentEl,l=n.sortable,a=n.dispatchSortableEvent,s=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(r){var f=this.options,d=o.children;if(!uo)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ue(ke,f.selectedClass,!~le.indexOf(ke)),~le.indexOf(ke))le.splice(le.indexOf(ke),1),Il=null,Vl({sortable:l,rootEl:i,name:"deselect",targetEl:ke,originalEvent:r});else{if(le.push(ke),Vl({sortable:l,rootEl:i,name:"select",targetEl:ke,originalEvent:r}),r.shiftKey&&Il&&l.el.contains(Il)){var p=He(Il),h=He(ke);if(~p&&~h&&p!==h){var m,E;for(h>p?(E=p,m=h):(E=h,m=p+1);E1){var g=Fe(ke),y=He(ke,":not(."+this.options.selectedClass+")");if(!Ol&&f.animation&&(ke.thisAnimationDuration=null),c.captureAnimationState(),!Ol&&(f.animation&&(ke.fromRect=g,le.forEach(function(S){if(S.thisAnimationDuration=null,S!==ke){var _=Pt?Fe(S):g;S.fromRect=_,c.addAnimationState({target:S,rect:_})}})),zs(),le.forEach(function(S){d[y]?o.insertBefore(S,d[y]):o.appendChild(S),y++}),s===He(ke))){var w=!1;le.forEach(function(S){if(S.sortableIndex!==He(S)){w=!0;return}}),w&&a("update")}le.forEach(function(S){Ud(S)}),c.animateAll()}An=c}(i===o||u&&u.lastPutMode!=="clone")&&Wt.forEach(function(S){S.parentNode&&S.parentNode.removeChild(S)})}},nullingGlobal:function(){this.isMultiDrag=uo=!1,Wt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),ce(document,"pointerup",this._deselectMultiDrag),ce(document,"mouseup",this._deselectMultiDrag),ce(document,"touchend",this._deselectMultiDrag),ce(document,"keydown",this._checkKeyDown),ce(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof uo!="undefined"&&uo)&&An===this.sortable&&!(n&&_n(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;le.length;){var r=le[0];Ue(r,this.options.selectedClass,!1),le.shift(),Vl({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvent:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},mn(e,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[bt];!r||!r.options.multiDrag||~le.indexOf(n)||(An&&An!==r&&(An.multiDrag._deselectMultiDrag(),An=r),Ue(n,r.options.selectedClass,!0),le.push(n))},deselect:function(n){var r=n.parentNode[bt],i=le.indexOf(n);!r||!r.options.multiDrag||!~i||(Ue(n,r.options.selectedClass,!1),le.splice(i,1))}},eventProperties:function(){var n=this,r=[],i=[];return le.forEach(function(o){r.push({multiDragElement:o,index:o.sortableIndex});var l;Pt&&o!==ke?l=-1:Pt?l=He(o,":not(."+n.options.selectedClass+")"):l=He(o),i.push({multiDragElement:o,index:l})}),{items:pF(le),clones:[].concat(Wt),oldIndicies:r,newIndicies:i}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function YF(e,t){le.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function h0(e,t){Wt.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function zs(){le.forEach(function(e){e!==ke&&e.parentNode&&e.parentNode.removeChild(e)})}re.mount(new UF);re.mount(Rg,Ng);const VF=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:WF,Sortable:re,Swap:zF,default:re},Symbol.toStringTag,{value:"Module"})),$F=lw(VF);var Lh={},HF={get exports(){return Lh},set exports(e){Lh=e}};/*! + */function i0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function hF(e,t){if(e==null)return{};var n=pF(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mF(e){return gF(e)||yF(e)||vF(e)||wF()}function gF(e){if(Array.isArray(e))return Ih(e)}function yF(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vF(e,t){if(e){if(typeof e=="string")return Ih(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ih(e,t)}}function Ih(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function EF(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function _n(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&ic(e,t):ic(e,t))||r&&e===n)return e;if(e===n)break}while(e=EF(e))}return null}var l0=/\s+/g;function Ue(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(l0," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(l0," ")}}function Z(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function ji(e,t){var n="";if(typeof e=="string")n=e;else do{var r=Z(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Nx(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:l=i<=o,!l)return r;if(r===qn())break;r=Jr(r,!1)}return!1}function Ko(e,t,n,r){for(var i=0,o=0,l=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=hF(r,TF);os.pluginEvent.bind(re)(t,n,tr({dragEl:G,parentEl:Ve,ghostEl:ae,rootEl:Re,nextEl:Oi,lastDownEl:su,cloneEl:Be,cloneHidden:Vr,dragStarted:$l,putSortable:ut,activeSortable:re.active,originalEvent:i,oldIndex:_o,oldDraggableIndex:ca,newIndex:Yt,newDraggableIndex:Br,hideGhostForTarget:Bx,unhideGhostForTarget:Ux,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(a){St({sortable:n,name:a,originalEvent:i})}},o))};function St(e){Vl(tr({putSortable:ut,cloneEl:Be,targetEl:G,rootEl:Re,oldIndex:_o,oldDraggableIndex:ca,newIndex:Yt,newDraggableIndex:Br},e))}var G,Ve,ae,Re,Oi,su,Be,Vr,_o,Yt,ca,Br,Ls,ut,po=!1,oc=!1,lc=[],Ai,Sn,jd,Wd,c0,f0,$l,so,fa,da=!1,Fs=!1,uu,gt,Yd=[],Oh=!1,ac=[],Tf=typeof document!="undefined",Ms=Ix,d0=is||Or?"cssFloat":"float",IF=Tf&&!Ox&&!Ix&&"draggable"in document.createElement("div"),Lx=function(){if(Tf){if(Or)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Fx=function(t,n){var r=Z(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Ko(t,0,n),l=Ko(t,1,n),a=o&&Z(o),s=l&&Z(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Fe(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Fe(l).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return l&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=i&&r[d0]==="none"||l&&r[d0]==="none"&&u+c>i)?"vertical":"horizontal"},OF=function(t,n,r){var i=r?t.left:t.top,o=r?t.right:t.bottom,l=r?t.width:t.height,a=r?n.left:n.top,s=r?n.right:n.bottom,u=r?n.width:n.height;return i===a||o===s||i+l/2===a+u/2},PF=function(t,n){var r;return lc.some(function(i){var o=i[bt].options.emptyInsertThreshold;if(!(!o||Og(i))){var l=Fe(i),a=t>=l.left-o&&t<=l.right+o,s=n>=l.top-o&&n<=l.bottom+o;if(a&&s)return r=i}}),r},Mx=function(t){function n(o,l){return function(a,s,u,c){var f=a.options.group.name&&s.options.group.name&&a.options.group.name===s.options.group.name;if(o==null&&(l||f))return!0;if(o==null||o===!1)return!1;if(l&&o==="clone")return o;if(typeof o=="function")return n(o(a,s,u,c),l)(a,s,u,c);var d=(l?a:s).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var r={},i=t.group;(!i||au(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},Bx=function(){!Lx&&ae&&Z(ae,"display","none")},Ux=function(){!Lx&&ae&&Z(ae,"display","")};Tf&&!Ox&&document.addEventListener("click",function(e){if(oc)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),oc=!1,!1},!0);var xi=function(t){if(G){t=t.touches?t.touches[0]:t;var n=PF(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[bt]._onDragOver(r)}}},NF=function(t){G&&G.parentNode[bt]._isOutsideThisEl(t.target)};function re(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=mn({},t),e[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Fx(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,a){l.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:re.supportPointer!==!1&&"PointerEvent"in window&&!sa,emptyInsertThreshold:5};os.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);Mx(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:IF,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pe(e,"pointerdown",this._onTapStart):(pe(e,"mousedown",this._onTapStart),pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pe(e,"dragover",this),pe(e,"dragenter",this)),lc.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),mn(this,CF())}re.prototype={constructor:re,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(so=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,o=i.preventOnFilter,l=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(zF(r),!G&&!(/mousedown|pointerdown/.test(l)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&sa&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=_n(s,i.draggable,r,!1),!(s&&s.animated)&&su!==s)){if(_o=He(s),ca=He(s,i.draggable),typeof c=="function"){if(c.call(this,t,s,this)){St({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:r,fromEl:r}),Ot("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=_n(u,f.trim(),r,!1),f)return St({sortable:n,rootEl:f,name:"filter",targetEl:s,fromEl:r,toEl:r}),Ot("filter",n,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!_n(u,i.handle,r,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,n,r){var i=this,o=i.el,l=i.options,a=o.ownerDocument,s;if(r&&!G&&r.parentNode===o){var u=Fe(r);if(Re=o,G=r,Ve=G.parentNode,Oi=G.nextSibling,su=r,Ls=l.group,re.dragged=G,Ai={target:G,clientX:(n||t).clientX,clientY:(n||t).clientY},c0=Ai.clientX-u.left,f0=Ai.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,G.style["will-change"]="all",s=function(){if(Ot("delayEnded",i,{evt:t}),re.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!o0&&i.nativeDraggable&&(G.draggable=!0),i._triggerDragStart(t,n),St({sortable:i,name:"choose",originalEvent:t}),Ue(G,l.chosenClass,!0)},l.ignore.split(",").forEach(function(c){Nx(G,c.trim(),Vd)}),pe(a,"dragover",xi),pe(a,"mousemove",xi),pe(a,"touchmove",xi),pe(a,"mouseup",i._onDrop),pe(a,"touchend",i._onDrop),pe(a,"touchcancel",i._onDrop),o0&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),Ot("delayStart",this,{evt:t}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(is||Or))){if(re.eventCanceled){this._onDrop();return}pe(a,"mouseup",i._disableDelayedDrag),pe(a,"touchend",i._disableDelayedDrag),pe(a,"touchcancel",i._disableDelayedDrag),pe(a,"mousemove",i._delayedDragTouchMoveHandler),pe(a,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&pe(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,l.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Vd(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ce(t,"mouseup",this._disableDelayedDrag),ce(t,"touchend",this._disableDelayedDrag),ce(t,"touchcancel",this._disableDelayedDrag),ce(t,"mousemove",this._delayedDragTouchMoveHandler),ce(t,"touchmove",this._delayedDragTouchMoveHandler),ce(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?pe(document,"pointermove",this._onTouchMove):n?pe(document,"touchmove",this._onTouchMove):pe(document,"mousemove",this._onTouchMove):(pe(G,"dragend",this),pe(Re,"dragstart",this._onDragStart));try{document.selection?cu(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(t,n){if(po=!1,Re&&G){Ot("dragStarted",this,{evt:n}),this.nativeDraggable&&pe(document,"dragover",NF);var r=this.options;!t&&Ue(G,r.dragClass,!1),Ue(G,r.ghostClass,!0),re.active=this,t&&this._appendGhost(),St({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Sn){this._lastX=Sn.clientX,this._lastY=Sn.clientY,Bx();for(var t=document.elementFromPoint(Sn.clientX,Sn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Sn.clientX,Sn.clientY),t!==n);)n=t;if(G.parentNode[bt]._isOutsideThisEl(t),n)do{if(n[bt]){var r=void 0;if(r=n[bt]._onDragOver({clientX:Sn.clientX,clientY:Sn.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Ux()}},_onTouchMove:function(t){if(Ai){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,l=ae&&ji(ae,!0),a=ae&&l&&l.a,s=ae&&l&&l.d,u=Ms&>&&s0(gt),c=(o.clientX-Ai.clientX+i.x)/(a||1)+(u?u[0]-Yd[0]:0)/(a||1),f=(o.clientY-Ai.clientY+i.y)/(s||1)+(u?u[1]-Yd[1]:0)/(s||1);if(!re.active&&!po){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(St({rootEl:Ve,name:"add",toEl:Ve,fromEl:Re,originalEvent:t}),St({sortable:this,name:"remove",toEl:Ve,originalEvent:t}),St({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Re,originalEvent:t}),St({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),ut&&ut.save()):Yt!==_o&&Yt>=0&&(St({sortable:this,name:"update",toEl:Ve,originalEvent:t}),St({sortable:this,name:"sort",toEl:Ve,originalEvent:t})),re.active&&((Yt==null||Yt===-1)&&(Yt=_o,Br=ca),St({sortable:this,name:"end",toEl:Ve,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Ot("nulling",this),Re=G=Ve=ae=Oi=Be=su=Vr=Ai=Sn=$l=Yt=Br=_o=ca=so=fa=ut=Ls=re.dragged=re.ghost=re.clone=re.active=null,ac.forEach(function(t){t.checked=!0}),ac.length=jd=Wd=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),RF(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,o=r.length,l=this.options;ir.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function MF(e,t,n,r,i,o,l,a){var s=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!l){if(a&&uuc+u*o/2:sf-uu)return-fa}else if(s>c+u*(1-i)/2&&sf-u*o/2)?s>c+u/2?1:-1:0}function BF(e){return He(G)1&&(le.forEach(function(a){o.addAnimationState({target:a,rect:Pt?Fe(a):l}),Ud(a),a.fromRect=l,r.removeAnimationState(a)}),Pt=!1,$F(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(n){var r=n.sortable,i=n.isOwner,o=n.insertion,l=n.activeSortable,a=n.parentEl,s=n.putSortable,u=this.options;if(o){if(i&&l._hideClone(),Ol=!1,u.animation&&le.length>1&&(Pt||!i&&!l.options.sort&&!s)){var c=Fe(ke,!1,!0,!0);le.forEach(function(d){d!==ke&&(u0(d,c),a.appendChild(d))}),Pt=!0}if(!i)if(Pt||zs(),le.length>1){var f=Us;l._showClone(r),l.options.animation&&!Us&&f&&Wt.forEach(function(d){l.addAnimationState({target:d,rect:Pl}),d.fromRect=Pl,d.thisAnimationDuration=null})}else l._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,i=n.isOwner,o=n.activeSortable;if(le.forEach(function(a){a.thisAnimationDuration=null}),o.options.animation&&!i&&o.multiDrag.isMultiDrag){Pl=mn({},r);var l=ji(ke,!0);Pl.top-=l.f,Pl.left-=l.e}},dragOverAnimationComplete:function(){Pt&&(Pt=!1,zs())},drop:function(n){var r=n.originalEvent,i=n.rootEl,o=n.parentEl,l=n.sortable,a=n.dispatchSortableEvent,s=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(r){var f=this.options,d=o.children;if(!uo)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ue(ke,f.selectedClass,!~le.indexOf(ke)),~le.indexOf(ke))le.splice(le.indexOf(ke),1),Il=null,Vl({sortable:l,rootEl:i,name:"deselect",targetEl:ke,originalEvent:r});else{if(le.push(ke),Vl({sortable:l,rootEl:i,name:"select",targetEl:ke,originalEvent:r}),r.shiftKey&&Il&&l.el.contains(Il)){var p=He(Il),h=He(ke);if(~p&&~h&&p!==h){var m,E;for(h>p?(E=p,m=h):(E=h,m=p+1);E1){var g=Fe(ke),y=He(ke,":not(."+this.options.selectedClass+")");if(!Ol&&f.animation&&(ke.thisAnimationDuration=null),c.captureAnimationState(),!Ol&&(f.animation&&(ke.fromRect=g,le.forEach(function(S){if(S.thisAnimationDuration=null,S!==ke){var _=Pt?Fe(S):g;S.fromRect=_,c.addAnimationState({target:S,rect:_})}})),zs(),le.forEach(function(S){d[y]?o.insertBefore(S,d[y]):o.appendChild(S),y++}),s===He(ke))){var w=!1;le.forEach(function(S){if(S.sortableIndex!==He(S)){w=!0;return}}),w&&a("update")}le.forEach(function(S){Ud(S)}),c.animateAll()}An=c}(i===o||u&&u.lastPutMode!=="clone")&&Wt.forEach(function(S){S.parentNode&&S.parentNode.removeChild(S)})}},nullingGlobal:function(){this.isMultiDrag=uo=!1,Wt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),ce(document,"pointerup",this._deselectMultiDrag),ce(document,"mouseup",this._deselectMultiDrag),ce(document,"touchend",this._deselectMultiDrag),ce(document,"keydown",this._checkKeyDown),ce(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof uo!="undefined"&&uo)&&An===this.sortable&&!(n&&_n(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;le.length;){var r=le[0];Ue(r,this.options.selectedClass,!1),le.shift(),Vl({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvent:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},mn(e,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[bt];!r||!r.options.multiDrag||~le.indexOf(n)||(An&&An!==r&&(An.multiDrag._deselectMultiDrag(),An=r),Ue(n,r.options.selectedClass,!0),le.push(n))},deselect:function(n){var r=n.parentNode[bt],i=le.indexOf(n);!r||!r.options.multiDrag||!~i||(Ue(n,r.options.selectedClass,!1),le.splice(i,1))}},eventProperties:function(){var n=this,r=[],i=[];return le.forEach(function(o){r.push({multiDragElement:o,index:o.sortableIndex});var l;Pt&&o!==ke?l=-1:Pt?l=He(o,":not(."+n.options.selectedClass+")"):l=He(o),i.push({multiDragElement:o,index:l})}),{items:mF(le),clones:[].concat(Wt),oldIndicies:r,newIndicies:i}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function $F(e,t){le.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function h0(e,t){Wt.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function zs(){le.forEach(function(e){e!==ke&&e.parentNode&&e.parentNode.removeChild(e)})}re.mount(new jF);re.mount(Rg,Ng);const HF=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:VF,Sortable:re,Swap:WF,default:re},Symbol.toStringTag,{value:"Module"})),GF=lw(HF);var Dh={},JF={get exports(){return Dh},set exports(e){Dh=e}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i$882b6d93070905b3$re_export$Sortable),l(e.exports,"Direction",()=>$882b6d93070905b3$re_export$Direction),l(e.exports,"DOMRect",()=>$882b6d93070905b3$re_export$DOMRect),l(e.exports,"GroupOptions",()=>$882b6d93070905b3$re_export$GroupOptions),l(e.exports,"MoveEvent",()=>$882b6d93070905b3$re_export$MoveEvent),l(e.exports,"Options",()=>$882b6d93070905b3$re_export$Options),l(e.exports,"PullResult",()=>$882b6d93070905b3$re_export$PullResult),l(e.exports,"PutResult",()=>$882b6d93070905b3$re_export$PutResult),l(e.exports,"SortableEvent",()=>$882b6d93070905b3$re_export$SortableEvent),l(e.exports,"SortableOptions",()=>$882b6d93070905b3$re_export$SortableOptions),l(e.exports,"Utils",()=>$882b6d93070905b3$re_export$Utils),l(e.exports,"ReactSortable",()=>S);function s(b){b.parentElement!==null&&b.parentElement.removeChild(b)}function u(b,A,T){const N=b.children[T]||null;b.insertBefore(A,N)}function c(b){b.forEach(A=>s(A.element))}function f(b){b.forEach(A=>{u(A.parentElement,A.element,A.oldIndex)})}function d(b,A){const T=E(b),N={parentElement:b.from};let R=[];switch(T){case"normal":R=[{element:b.item,newIndex:b.newIndex,oldIndex:b.oldIndex,parentElement:b.from}];break;case"swap":const L=O({element:b.item,oldIndex:b.oldIndex,newIndex:b.newIndex},N),j=O({element:b.swapItem,oldIndex:b.newIndex,newIndex:b.oldIndex},N);R=[L,j];break;case"multidrag":R=b.oldIndicies.map((J,ee)=>O({element:J.multiDragElement,oldIndex:J.index,newIndex:b.newIndicies[ee].index},N));break}return g(R,A)}function p(b,A){const T=h(b,A);return m(b,T)}function h(b,A){const T=[...A];return b.concat().reverse().forEach(N=>T.splice(N.oldIndex,1)),T}function m(b,A,T,N){const R=[...A];return b.forEach(I=>{const F=N&&T&&N(I.item,T);R.splice(I.newIndex,0,F||I.item)}),R}function E(b){return b.oldIndicies&&b.oldIndicies.length>0?"multidrag":b.swapItem?"swap":"normal"}function g(b,A){return b.map(N=>W(O({},N),{item:A[N.oldIndex]})).sort((N,R)=>N.oldIndex-R.oldIndex)}function y(b){const ir=b,{list:A,setList:T,children:N,tag:R,style:I,className:F,clone:L,onAdd:j,onChange:J,onChoose:ee,onClone:te,onEnd:D,onFilter:$,onRemove:Q,onSort:C,onStart:x,onUnchoose:at,onUpdate:pt,onMove:Ut,onSpill:Se,onSelect:st,onDeselect:rr}=ir;return ye(ir,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"])}const w={dragging:null};class S extends r.Component{constructor(A){super(A),this.ref=(0,r.createRef)();const T=[...A.list].map(N=>Object.assign(N,{chosen:!1,selected:!1}));A.setList(T,this.sortable,w),o(i)(!A.plugins,` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i$882b6d93070905b3$re_export$Sortable),l(e.exports,"Direction",()=>$882b6d93070905b3$re_export$Direction),l(e.exports,"DOMRect",()=>$882b6d93070905b3$re_export$DOMRect),l(e.exports,"GroupOptions",()=>$882b6d93070905b3$re_export$GroupOptions),l(e.exports,"MoveEvent",()=>$882b6d93070905b3$re_export$MoveEvent),l(e.exports,"Options",()=>$882b6d93070905b3$re_export$Options),l(e.exports,"PullResult",()=>$882b6d93070905b3$re_export$PullResult),l(e.exports,"PutResult",()=>$882b6d93070905b3$re_export$PutResult),l(e.exports,"SortableEvent",()=>$882b6d93070905b3$re_export$SortableEvent),l(e.exports,"SortableOptions",()=>$882b6d93070905b3$re_export$SortableOptions),l(e.exports,"Utils",()=>$882b6d93070905b3$re_export$Utils),l(e.exports,"ReactSortable",()=>S);function s(b){b.parentElement!==null&&b.parentElement.removeChild(b)}function u(b,A,T){const N=b.children[T]||null;b.insertBefore(A,N)}function c(b){b.forEach(A=>s(A.element))}function f(b){b.forEach(A=>{u(A.parentElement,A.element,A.oldIndex)})}function d(b,A){const T=E(b),N={parentElement:b.from};let R=[];switch(T){case"normal":R=[{element:b.item,newIndex:b.newIndex,oldIndex:b.oldIndex,parentElement:b.from}];break;case"swap":const L=P({element:b.item,oldIndex:b.oldIndex,newIndex:b.newIndex},N),j=P({element:b.swapItem,oldIndex:b.newIndex,newIndex:b.oldIndex},N);R=[L,j];break;case"multidrag":R=b.oldIndicies.map((J,ee)=>P({element:J.multiDragElement,oldIndex:J.index,newIndex:b.newIndicies[ee].index},N));break}return g(R,A)}function p(b,A){const T=h(b,A);return m(b,T)}function h(b,A){const T=[...A];return b.concat().reverse().forEach(N=>T.splice(N.oldIndex,1)),T}function m(b,A,T,N){const R=[...A];return b.forEach(I=>{const F=N&&T&&N(I.item,T);R.splice(I.newIndex,0,F||I.item)}),R}function E(b){return b.oldIndicies&&b.oldIndicies.length>0?"multidrag":b.swapItem?"swap":"normal"}function g(b,A){return b.map(N=>W(P({},N),{item:A[N.oldIndex]})).sort((N,R)=>N.oldIndex-R.oldIndex)}function y(b){const ir=b,{list:A,setList:T,children:N,tag:R,style:I,className:F,clone:L,onAdd:j,onChange:J,onChoose:ee,onClone:te,onEnd:D,onFilter:$,onRemove:Q,onSort:C,onStart:x,onUnchoose:at,onUpdate:pt,onMove:Ut,onSpill:Se,onSelect:st,onDeselect:rr}=ir;return ye(ir,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"])}const w={dragging:null};class S extends r.Component{constructor(A){super(A),this.ref=(0,r.createRef)();const T=[...A.list].map(N=>Object.assign(N,{chosen:!1,selected:!1}));A.setList(T,this.sortable,w),o(i)(!A.plugins,` Plugins prop is no longer supported. Instead, mount it with "Sortable.mount(new MultiDrag())" Please read the updated README.md at https://github.com/SortableJS/react-sortablejs. - `)}componentDidMount(){if(this.ref.current===null)return;const A=this.makeOptions();o(t).create(this.ref.current,A)}componentDidUpdate(A){A.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:A,style:T,className:N,id:R}=this.props,I={style:T,className:N,id:R},F=!A||A===null?"div":A;return(0,r.createElement)(F,O({ref:this.ref},I),this.getChildren())}getChildren(){const{children:A,dataIdAttr:T,selectedClass:N="sortable-selected",chosenClass:R="sortable-chosen",dragClass:I="sortable-drag",fallbackClass:F="sortable-falback",ghostClass:L="sortable-ghost",swapClass:j="sortable-swap-highlight",filter:J="sortable-filter",list:ee}=this.props;if(!A||A==null)return null;const te=T||"data-id";return r.Children.map(A,(D,$)=>{if(D===void 0)return;const Q=ee[$]||{},{className:C}=D.props,x=typeof J=="string"&&{[J.replace(".","")]:!!Q.filtered},at=o(n)(C,O({[N]:Q.selected,[R]:Q.chosen},x));return(0,r.cloneElement)(D,{[te]:D.key,className:at})})}get sortable(){const A=this.ref.current;if(A===null)return null;const T=Object.keys(A).find(N=>N.includes("Sortable"));return T?A[T]:null}makeOptions(){const A=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],T=["onChange","onClone","onFilter","onSort"],N=y(this.props);A.forEach(I=>N[I]=this.prepareOnHandlerPropAndDOM(I)),T.forEach(I=>N[I]=this.prepareOnHandlerProp(I));const R=(I,F)=>{const{onMove:L}=this.props,j=I.willInsertAfter||-1;if(!L)return j;const J=L(I,F,this.sortable,w);return typeof J=="undefined"?!1:J};return W(O({},N),{onMove:R})}prepareOnHandlerPropAndDOM(A){return T=>{this.callOnHandlerProp(T,A),this[A](T)}}prepareOnHandlerProp(A){return T=>{this.callOnHandlerProp(T,A)}}callOnHandlerProp(A,T){const N=this.props[T];N&&N(A,this.sortable,w)}onAdd(A){const{list:T,setList:N,clone:R}=this.props,I=[...w.dragging.props.list],F=d(A,I);c(F);const L=m(F,T,A,R).map(j=>Object.assign(j,{selected:!1}));N(L,this.sortable,w)}onRemove(A){const{list:T,setList:N}=this.props,R=E(A),I=d(A,T);f(I);let F=[...T];if(A.pullMode!=="clone")F=h(I,F);else{let L=I;switch(R){case"multidrag":L=I.map((j,J)=>W(O({},j),{element:A.clones[J]}));break;case"normal":L=I.map(j=>W(O({},j),{element:A.clone}));break;case"swap":default:o(i)(!0,`mode "${R}" cannot clone. Please remove "props.clone" from when using the "${R}" plugin`)}c(L),I.forEach(j=>{const J=j.oldIndex,ee=this.props.clone(j.item,A);F.splice(J,1,ee)})}F=F.map(L=>Object.assign(L,{selected:!1})),N(F,this.sortable,w)}onUpdate(A){const{list:T,setList:N}=this.props,R=d(A,T);c(R),f(R);const I=p(R,T);return N(I,this.sortable,w)}onStart(){w.dragging=this}onEnd(){w.dragging=null}onChoose(A){const{list:T,setList:N}=this.props,R=T.map((I,F)=>{let L=I;return F===A.oldIndex&&(L=Object.assign(I,{chosen:!0})),L});N(R,this.sortable,w)}onUnchoose(A){const{list:T,setList:N}=this.props,R=T.map((I,F)=>{let L=I;return F===A.oldIndex&&(L=Object.assign(L,{chosen:!1})),L});N(R,this.sortable,w)}onSpill(A){const{removeOnSpill:T,revertOnSpill:N}=this.props;T&&!N&&s(A.item)}onSelect(A){const{list:T,setList:N}=this.props,R=T.map(I=>Object.assign(I,{selected:!1}));A.newIndicies.forEach(I=>{const F=I.index;if(F===-1){console.log(`"${A.type}" had indice of "${I.index}", which is probably -1 and doesn't usually happen here.`),console.log(A);return}R[F].selected=!0}),N(R,this.sortable,w)}onDeselect(A){const{list:T,setList:N}=this.props,R=T.map(I=>Object.assign(I,{selected:!1}));A.newIndicies.forEach(I=>{const F=I.index;F!==-1&&(R[F].selected=!0)}),N(R,this.sortable,w)}}hs(S,"defaultProps",{clone:A=>A});var _={};a(e.exports,_)})(uF);const qF="_container_xt7ji_1",XF="_list_xt7ji_6",ZF="_item_xt7ji_15",eM="_keyField_xt7ji_29",tM="_valueField_xt7ji_34",nM="_header_xt7ji_39",rM="_dragHandle_xt7ji_45",iM="_deleteButton_xt7ji_55",oM="_addItemButton_xt7ji_65",lM="_separator_xt7ji_72",zt={container:qF,list:XF,item:ZF,keyField:eM,valueField:tM,header:nM,dragHandle:rM,deleteButton:iM,addItemButton:oM,separator:lM};function aM(e){return!(typeof e!="object"||Object.values(e).find(n=>typeof n!="string"))}function sM({id:e,label:t,value:n,onChange:r,newItemValue:i={key:"myKey",value:"myValue"}}){const{state:o,setState:l,addItem:a,deleteItem:s}=uM({value:n,onChange:r,newItemValue:i});return U("div",{className:zt.list,"aria-labelledby":_r(e),"aria-label":t,children:[U("div",{className:zt.item+" "+zt.header,"aria-label":"Columns field labels",children:[v("span",{className:zt.keyField,children:"Key"}),v("span",{className:zt.valueField,children:"Value"})]}),v(Ih.ReactSortable,{list:o,setList:l,handle:`.${zt.dragHandle}`,children:o.map((u,c)=>U("div",{className:zt.item,children:[v("div",{className:zt.dragHandle,title:"Reorder list",children:v(sF,{})}),v("input",{title:"Key Field",className:zt.keyField,type:"text",value:u.key,onChange:f=>{const d=[...o];d[c]=W(O({},u),{key:f.target.value}),l(d)}}),v("span",{className:zt.separator,children:":"}),v("input",{title:"Value Field",className:zt.valueField,type:"text",value:u.value,onChange:f=>{const d=[...o];d[c]=W(O({},u),{value:f.target.value}),l(d)}}),v(rt,{className:zt.deleteButton,onClick:()=>s(u.id),variant:["icon","transparent"],title:`Delete ${u.value}`,children:v(xf,{})})]},u.id))}),v(rt,{className:zt.addItemButton,onClick:()=>a(),variant:["icon","transparent"],title:"Add new item","aria-label":"Add new item to list",children:v(Ig,{})})]})}function uM({value:e,onChange:t,newItemValue:n}){const[r,i]=k.useState(e!==void 0?Object.keys(e).map((a,s)=>({id:s,key:a,value:e[a]})):[]);k.useEffect(()=>{const a=cM(r);ZR(a,e!=null?e:{})||t(a)},[t,r,e]);const o=k.useCallback(a=>{i(s=>s.filter(({id:u})=>u!==a))},[]),l=k.useCallback(()=>{i(a=>[...a,O({id:-1},n)].map((s,u)=>W(O({},s),{id:u})))},[n]);return{state:r,setState:i,deleteItem:o,addItem:l}}function cM(e){return e.reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}const fM="__DEFAULT-DROPDOWN-CHOICE__";function dM({id:e,label:t,choices:n,onChange:r,value:i}){k.useEffect(()=>{i===fM&&r(n[0]),n.length>0&&!n.includes(i)&&r(n[0])},[r,n,i]);const o=a=>{const s=a.target.selectedIndex;r(n[s])},l=F5(n);return l.length===0?v("select",{title:`${t} selector`,"aria-labelledby":_r(e),"aria-label":t,className:"OptionsDropdown SUE-Input",placeholder:"No available options"}):v("select",{title:`${t} selector`,"aria-labelledby":_r(e),className:"OptionsDropdown SUE-Input",onChange:o,value:i,children:l.map(a=>v("option",{value:a,children:a},a))})}const pM="_radioContainer_ow37t_1",hM="_option_ow37t_15",mM="_radioInput_ow37t_22",gM="_radioLabel_ow37t_26",yM="_icon_ow37t_41",vM="_text_only_label_ow37t_87",co={radioContainer:pM,option:hM,radioInput:mM,radioLabel:gM,icon:yM,text_only_label:vM},wM="__DEFAULT-RADIO-CHOICE__";function bM({id:e,label:t,choices:n,value:r,onChange:i,optionsPerColumn:o}){const l=Object.keys(n);P.useEffect(()=>{r===wM&&i(l[0])},[l,r,i]);const a=P.useMemo(()=>({gridTemplateColumns:o?`repeat(${o}, 1fr)`:void 0}),[o]);return v("fieldset",{className:co.radioContainer,"aria-labelledby":_r(e),"aria-label":t,style:a,children:l.map(s=>{var h;const u=e+s,c=n[s],f="icon"in c?c.icon:null,d=f===null,p=(h=c.label)!=null?h:s;return U("div",{className:co.option,children:[v("input",{className:co.radioInput,name:e,id:u,type:"radio",value:s,onChange:()=>i(s),checked:s===r}),v("label",{className:co.radioLabel,htmlFor:u,"data-name":d?null:p,children:d?v("span",{className:co.text_only_label,children:p}):typeof f=="string"?v("img",{src:f,alt:p,className:co.icon}):f})]},s)})})}function EM({id:e,label:t,value:n,onChange:r,longform:i}){const o={className:"SUE-Input","aria-label":t,"aria-labelledby":_r(e),id:e,value:n,onChange:l=>{const a=l.target.value;r(a)}};return i?v("textarea",O({},o)):v("input",W(O({},o),{type:"text"}))}function SM(e){return tF(e).with({inputType:"string"},t=>v(EM,O({},t))).with({inputType:"number"},t=>v(p6,O({},t))).with({inputType:"cssMeasure"},t=>v(aF,O({},t))).with({inputType:"boolean"},t=>v(oF,O({},t))).with({inputType:"list"},t=>v(sM,O({},t))).with({inputType:"dropdown"},t=>v(dM,O({},t))).with({inputType:"radio"},t=>v(bM,O({},t))).otherwise(({inputType:t})=>U("div",{children:["I don't know how to render the input of type ",t," yet! Sorry."]}))}function AM(e,t){if(e===void 0)return!0;if(t==="number")return typeof e=="number";if(t==="string")return typeof e=="string";if(t==="cssMeasure")return ZL(e);if(t==="boolean")return typeof e=="boolean";if(t==="list")return aM(e);if(t==="dropdown"||t==="radio")return typeof e=="string";if(t==="string-array")return Array.isArray(e)&&typeof e[0]=="string";if(t==="omitted")return!0;throw new Error("Unimplemented argument type check",t)}function jx(n){var r=n,{onUpdate:e}=r,t=ye(r,["onUpdate"]);var d;const i=t.value===void 0,o=t.optional,l=_r(t.name),a=(d=t.label)!=null?d:t.name,s=()=>e({type:"UPDATE",value:t.defaultValue}),u=p=>e({type:"UPDATE",value:p}),c=()=>e({type:"REMOVE"});let f;return t.value===void 0?t.optional?f=v(_M,{labelledBy:l}):f=v(CM,{name:t.name,onReset:s}):AM(t.value,t.inputType)?f=v(SM,O({label:a,id:t.name,onChange:u},t)):f=v(xM,{name:t.name,onReset:s}),U("div",{className:"SUE-SettingsInput",children:[U("div",{className:"info","data-unset":i,children:[o?v("input",{type:"checkbox",checked:!i,title:`Use ${t.name} argument`,"aria-label":`Use ${t.name} argument`,onChange:i?s:c}):null,v("label",{id:l,children:a})]}),f]})}function xM({name:e,onReset:t}){return U("div",{className:"mismatched-argument-types",children:["Argument for ",e," of unsupported type.",v(rt,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:t,children:"Reset"})]})}function CM({name:e,onReset:t}){return U("div",{className:"missing-required-argument-message",children:['Required argument "',e,'" not provided.',v(rt,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:t,children:"Reset"})]})}function _M({labelledBy:e}){return v("input",{className:"unset-argument SUE-Input","aria-labelledby":e,placeholder:"Default",disabled:!0})}const kM="_EditorSkeleton_18fvc_1",TM="_app_view_18fvc_14",IM="_elements_panel_18fvc_28",OM="_properties_panel_18fvc_33",PM="_app_preview_18fvc_38",NM="_panel_18fvc_63",RM="_panel_title_18fvc_74",ar={EditorSkeleton:kM,app_view:TM,elements_panel:IM,properties_panel:OM,app_preview:PM,panel:NM,panel_title:RM};function fl({children:e,className:t=""}){return v("h3",{className:Ke(t,ar.panel_title),children:e})}const DM="_portalHolder_18ua3_1",LM="_portalModal_18ua3_11",FM="_title_18ua3_21",MM="_body_18ua3_25",BM="_portalForm_18ua3_30",UM="_portalFormInputs_18ua3_35",zM="_portalFormFooter_18ua3_42",jM="_validationMsg_18ua3_48",WM="_infoText_18ua3_53",dr={portalHolder:DM,portalModal:LM,title:FM,body:MM,portalForm:BM,portalFormInputs:UM,portalFormFooter:zM,validationMsg:jM,infoText:WM};function Wx({children:e,title:t,label:n,onConfirm:r,onCancel:i}){return v(OE,{children:v("div",{className:dr.portalHolder,onClick:()=>i(),onKeyDown:o=>{o.key==="Escape"&&i()},children:U("div",{className:dr.portalModal,onClick:o=>o.stopPropagation(),"aria-label":n!=null?n:"popup modal",children:[t?v(fl,{className:dr.title,children:t}):null,v("div",{className:dr.body,children:e})]})})})}function YM({onCancel:e,onDone:t,existingAreaNames:n}){const r=`area${n.length}`,[i,o]=k.useState(r),[l,a]=k.useState(null),s=k.useCallback(c=>{c&&c.preventDefault();const f=VM({name:i,existingAreaNames:n});if(f){a(f);return}t(i)},[n,i,t]),u=k.useCallback(c=>{c.type!=="REMOVE"&&(a(null),o(c.value))},[]);return U(Wx,{title:"Name new grid area",label:"New grid area naming modal",onConfirm:()=>t(i),onCancel:e,children:[v("form",{className:dr.portalForm,onSubmit:s,children:U("div",{className:dr.portalFormInputs,children:[v("span",{className:dr.infoText,children:"Name for grid area needs to be unique, start with a letter, and contain only letters and numbers."}),v(jx,{label:"Name of new grid area",name:"New-Item-Name",inputType:"string",onUpdate:u,value:i,defaultValue:r}),l?v("div",{className:dr.validationMsg,children:l}):null]})}),U("div",{className:dr.portalFormFooter,children:[v(rt,{variant:"delete",onClick:e,children:"Cancel"}),v(rt,{onClick:()=>s(),children:"Done"})]})]})}function VM({name:e,existingAreaNames:t}){return e===""?"A name is needed for the grid area":t.includes(e)?`You already have an item with the name "${e}", all names - need to be unique.`:e.match(/^[^a-zA-Z]/g)?"Valid item names need to start with a character.":e.match(/\s/g)?"Spaces not allowed in grid area names":e.match(/[^\w]/g)?"Only letters and numbers allowed in area names":null}function $M(e){const t=Tr();return k.useCallback(r=>{t(HA({path:e,node:{uiArguments:r}}))},[t,e])}function HM({layout:e,row_sizes:t,col_sizes:n,gap_size:r}){return e=aa(e),t=aa(t),n=aa(n),{layout:e,row_sizes:t,col_sizes:n,gap_size:r}}const GM="_container_1hvsg_1",JM={container:GM},Yx=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{const i=HM(e),o=Eg(),w=CL(i),{uniqueAreas:l}=w,a=ye(w,["uniqueAreas"]),{areas:s}=a,u=$M(n),c=k.useMemo(()=>kg(s),[s]),[f,d]=k.useState(null),p=S=>{const{node:_,currentPath:b,pos:A}=S,T=b!==void 0,N=Sh(_);if(T&&N&&"area"in _.uiArguments&&_.uiArguments.area){const R=_.uiArguments.area;h({type:"MOVE_ITEM",name:R,pos:A});return}d(S)},h=S=>{u(Tg(i,S))},m=k.useCallback(S=>{u(gx(S))},[u]),E=l.map(S=>v(JL,{area:S,areas:s,gridLocation:c.get(S),onNewPos:_=>h({type:"MOVE_ITEM",name:S,pos:_})},S)),g={"--gap":i.gap_size,"--row-gutter":"150px","--col-gutter":"100px","--pad":"8px"},y=(S,{node:_,currentPath:b,pos:A})=>{var N;let T=_;if(Sh(_))T.uiArguments=W(O({},_.uiArguments),{area:S});else if(dD(_)){const{uiArguments:R,uiChildren:I}=_;T={uiName:"gridlayout::grid_card",uiArguments:O({area:S},R),uiChildren:I}}o({path:er(n,(N=t==null?void 0:t.length)!=null?N:0),node:T,currentPath:b}),h({type:"ADD_ITEM",name:S,pos:A}),d(null)};return U(rx.Provider,{value:h,children:[v("div",W(O({style:g,className:JM.container},r),{draggable:!1,onDragStart:()=>{},children:U(q6,W(O({},a),{onNewLayout:m,children:[RL(s).map(({row:S,col:_})=>v(Z6,{gridRow:S,gridColumn:_,onDroppedNode:p},jL({row:S,col:_}))),t==null?void 0:t.map((S,_)=>v(bi,{path:[...n,_],node:S},n.join(".")+_)),E]}))})),f?v(YM,{info:f,onCancel:()=>d(null),onDone:S=>y(S,f),existingAreaNames:l}):null]})},QM=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>v(Yx,{uiArguments:e,uiChildren:t,path:n,wrapperProps:r}),KM=xe()({library:"gridlayout",name:"grid_container",title:"Grid Container",takesChildren:!0,UiComponent:QM,settingsInfo:{gap_size:{label:"Width",inputType:"cssMeasure",defaultValue:"10px",units:["px","rem"]},layout:{inputType:"omitted",defaultValue:[". .",". ."]},row_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},col_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]}},iconSrc:fx,category:"Tabs",stateUpdateSubscribers:{UPDATE_NODE:yx,DELETE_NODE:vx},description:"A general container for arranging items using `gridlayout`"}),qM=e=>v(Yx,O({},e)),XM=xe()({library:"gridlayout",name:"grid_page",title:"Grid Page",takesChildren:!0,UiComponent:qM,settingsInfo:{gap_size:{label:"Width",inputType:"cssMeasure",defaultValue:"10px",units:["px","rem"]},layout:{inputType:"omitted",defaultValue:[". .",". ."]},row_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},col_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},theme:{inputType:"omitted",optional:!0}},stateUpdateSubscribers:{UPDATE_NODE:yx,DELETE_NODE:vx},category:"gridlayout"}),ZM=11,e8=n8(Zu(ZM).map(e=>Math.random())).map(e=>`${Math.round(e*100)}%`);function t8({title:e=v("span",{children:"My Plot"})}){return v("div",{className:"PlotPlaceholder",children:U("div",{className:"plot",children:[v("div",{className:"title",children:e}),v("div",{className:"plot-body",children:e8.map((t,n)=>v("div",{className:"bar",style:{"--value":t}},`${n}-${t}`))})]})})}function n8(e){let i=-1/0,o=1/0;for(let s of e)i=Math.max(i,s),o=Math.min(o,s);const l=i-o;return e.map(s=>((s-o)/l+.1)*.85)}const r8=({uiArguments:{outputId:e,width:t="100%",height:n="400px"},wrapperProps:r})=>v("div",W(O({className:"plotlyPlotlyOutput",style:{height:n,width:t}},r),{children:v(t8,{title:U("span",{className:"title-bar",children:[v(Af,{type:"output",name:e}),v("span",{className:"plotly-name",children:"Plotly"})]})})})),i8=xe()({library:"plotly",name:"plotlyOutput",title:"Plotly Plot",takesChildren:!1,UiComponent:r8,settingsInfo:{outputId:{inputType:"string",label:"Output ID for plot",defaultValue:"plot"},width:{label:"Width",inputType:"cssMeasure",defaultValue:"100%",optional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"400px",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderPlotly({ + `)}componentDidMount(){if(this.ref.current===null)return;const A=this.makeOptions();o(t).create(this.ref.current,A)}componentDidUpdate(A){A.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:A,style:T,className:N,id:R}=this.props,I={style:T,className:N,id:R},F=!A||A===null?"div":A;return(0,r.createElement)(F,P({ref:this.ref},I),this.getChildren())}getChildren(){const{children:A,dataIdAttr:T,selectedClass:N="sortable-selected",chosenClass:R="sortable-chosen",dragClass:I="sortable-drag",fallbackClass:F="sortable-falback",ghostClass:L="sortable-ghost",swapClass:j="sortable-swap-highlight",filter:J="sortable-filter",list:ee}=this.props;if(!A||A==null)return null;const te=T||"data-id";return r.Children.map(A,(D,$)=>{if(D===void 0)return;const Q=ee[$]||{},{className:C}=D.props,x=typeof J=="string"&&{[J.replace(".","")]:!!Q.filtered},at=o(n)(C,P({[N]:Q.selected,[R]:Q.chosen},x));return(0,r.cloneElement)(D,{[te]:D.key,className:at})})}get sortable(){const A=this.ref.current;if(A===null)return null;const T=Object.keys(A).find(N=>N.includes("Sortable"));return T?A[T]:null}makeOptions(){const A=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],T=["onChange","onClone","onFilter","onSort"],N=y(this.props);A.forEach(I=>N[I]=this.prepareOnHandlerPropAndDOM(I)),T.forEach(I=>N[I]=this.prepareOnHandlerProp(I));const R=(I,F)=>{const{onMove:L}=this.props,j=I.willInsertAfter||-1;if(!L)return j;const J=L(I,F,this.sortable,w);return typeof J=="undefined"?!1:J};return W(P({},N),{onMove:R})}prepareOnHandlerPropAndDOM(A){return T=>{this.callOnHandlerProp(T,A),this[A](T)}}prepareOnHandlerProp(A){return T=>{this.callOnHandlerProp(T,A)}}callOnHandlerProp(A,T){const N=this.props[T];N&&N(A,this.sortable,w)}onAdd(A){const{list:T,setList:N,clone:R}=this.props,I=[...w.dragging.props.list],F=d(A,I);c(F);const L=m(F,T,A,R).map(j=>Object.assign(j,{selected:!1}));N(L,this.sortable,w)}onRemove(A){const{list:T,setList:N}=this.props,R=E(A),I=d(A,T);f(I);let F=[...T];if(A.pullMode!=="clone")F=h(I,F);else{let L=I;switch(R){case"multidrag":L=I.map((j,J)=>W(P({},j),{element:A.clones[J]}));break;case"normal":L=I.map(j=>W(P({},j),{element:A.clone}));break;case"swap":default:o(i)(!0,`mode "${R}" cannot clone. Please remove "props.clone" from when using the "${R}" plugin`)}c(L),I.forEach(j=>{const J=j.oldIndex,ee=this.props.clone(j.item,A);F.splice(J,1,ee)})}F=F.map(L=>Object.assign(L,{selected:!1})),N(F,this.sortable,w)}onUpdate(A){const{list:T,setList:N}=this.props,R=d(A,T);c(R),f(R);const I=p(R,T);return N(I,this.sortable,w)}onStart(){w.dragging=this}onEnd(){w.dragging=null}onChoose(A){const{list:T,setList:N}=this.props,R=T.map((I,F)=>{let L=I;return F===A.oldIndex&&(L=Object.assign(I,{chosen:!0})),L});N(R,this.sortable,w)}onUnchoose(A){const{list:T,setList:N}=this.props,R=T.map((I,F)=>{let L=I;return F===A.oldIndex&&(L=Object.assign(L,{chosen:!1})),L});N(R,this.sortable,w)}onSpill(A){const{removeOnSpill:T,revertOnSpill:N}=this.props;T&&!N&&s(A.item)}onSelect(A){const{list:T,setList:N}=this.props,R=T.map(I=>Object.assign(I,{selected:!1}));A.newIndicies.forEach(I=>{const F=I.index;if(F===-1){console.log(`"${A.type}" had indice of "${I.index}", which is probably -1 and doesn't usually happen here.`),console.log(A);return}R[F].selected=!0}),N(R,this.sortable,w)}onDeselect(A){const{list:T,setList:N}=this.props,R=T.map(I=>Object.assign(I,{selected:!1}));A.newIndicies.forEach(I=>{const F=I.index;F!==-1&&(R[F].selected=!0)}),N(R,this.sortable,w)}}hs(S,"defaultProps",{clone:A=>A});var _={};a(e.exports,_)})(fF);const ZF="_container_xt7ji_1",eM="_list_xt7ji_6",tM="_item_xt7ji_15",nM="_keyField_xt7ji_29",rM="_valueField_xt7ji_34",iM="_header_xt7ji_39",oM="_dragHandle_xt7ji_45",lM="_deleteButton_xt7ji_55",aM="_addItemButton_xt7ji_65",sM="_separator_xt7ji_72",zt={container:ZF,list:eM,item:tM,keyField:nM,valueField:rM,header:iM,dragHandle:oM,deleteButton:lM,addItemButton:aM,separator:sM};function uM(e){return!(typeof e!="object"||Object.values(e).find(n=>typeof n!="string"))}function cM({id:e,label:t,value:n,onChange:r,newItemValue:i={key:"myKey",value:"myValue"}}){const{state:o,setState:l,addItem:a,deleteItem:s}=fM({value:n,onChange:r,newItemValue:i});return U("div",{className:zt.list,"aria-labelledby":_r(e),"aria-label":t,children:[U("div",{className:zt.item+" "+zt.header,"aria-label":"Columns field labels",children:[v("span",{className:zt.keyField,children:"Key"}),v("span",{className:zt.valueField,children:"Value"})]}),v(Th.ReactSortable,{list:o,setList:l,handle:`.${zt.dragHandle}`,children:o.map((u,c)=>U("div",{className:zt.item,children:[v("div",{className:zt.dragHandle,title:"Reorder list",children:v(cF,{})}),v("input",{title:"Key Field",className:zt.keyField,type:"text",value:u.key,onChange:f=>{const d=[...o];d[c]=W(P({},u),{key:f.target.value}),l(d)}}),v("span",{className:zt.separator,children:":"}),v("input",{title:"Value Field",className:zt.valueField,type:"text",value:u.value,onChange:f=>{const d=[...o];d[c]=W(P({},u),{value:f.target.value}),l(d)}}),v(rt,{className:zt.deleteButton,onClick:()=>s(u.id),variant:["icon","transparent"],title:`Delete ${u.value}`,children:v(xf,{})})]},u.id))}),v(rt,{className:zt.addItemButton,onClick:()=>a(),variant:["icon","transparent"],title:"Add new item","aria-label":"Add new item to list",children:v(Ig,{})})]})}function fM({value:e,onChange:t,newItemValue:n}){const[r,i]=k.useState(e!==void 0?Object.keys(e).map((a,s)=>({id:s,key:a,value:e[a]})):[]);k.useEffect(()=>{const a=dM(r);ZR(a,e!=null?e:{})||t(a)},[t,r,e]);const o=k.useCallback(a=>{i(s=>s.filter(({id:u})=>u!==a))},[]),l=k.useCallback(()=>{i(a=>[...a,P({id:-1},n)].map((s,u)=>W(P({},s),{id:u})))},[n]);return{state:r,setState:i,deleteItem:o,addItem:l}}function dM(e){return e.reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}const pM="__DEFAULT-DROPDOWN-CHOICE__";function hM({id:e,label:t,choices:n,onChange:r,value:i}){k.useEffect(()=>{i===pM&&r(n[0]),n.length>0&&!n.includes(i)&&r(n[0])},[r,n,i]);const o=a=>{const s=a.target.selectedIndex;r(n[s])},l=F5(n);return l.length===0?v("select",{title:`${t} selector`,"aria-labelledby":_r(e),"aria-label":t,className:"OptionsDropdown SUE-Input",placeholder:"No available options"}):v("select",{title:`${t} selector`,"aria-labelledby":_r(e),className:"OptionsDropdown SUE-Input",onChange:o,value:i,children:l.map(a=>v("option",{value:a,children:a},a))})}const mM="_radioContainer_ow37t_1",gM="_option_ow37t_15",yM="_radioInput_ow37t_22",vM="_radioLabel_ow37t_26",wM="_icon_ow37t_41",bM="_text_only_label_ow37t_87",co={radioContainer:mM,option:gM,radioInput:yM,radioLabel:vM,icon:wM,text_only_label:bM},EM="__DEFAULT-RADIO-CHOICE__";function SM({id:e,label:t,choices:n,value:r,onChange:i,optionsPerColumn:o}){const l=Object.keys(n);O.useEffect(()=>{r===EM&&i(l[0])},[l,r,i]);const a=O.useMemo(()=>({gridTemplateColumns:o?`repeat(${o}, 1fr)`:void 0}),[o]);return v("fieldset",{className:co.radioContainer,"aria-labelledby":_r(e),"aria-label":t,style:a,children:l.map(s=>{var h;const u=e+s,c=n[s],f="icon"in c?c.icon:null,d=f===null,p=(h=c.label)!=null?h:s;return U("div",{className:co.option,children:[v("input",{className:co.radioInput,name:e,id:u,type:"radio",value:s,onChange:()=>i(s),checked:s===r}),v("label",{className:co.radioLabel,htmlFor:u,"data-name":d?null:p,children:d?v("span",{className:co.text_only_label,children:p}):typeof f=="string"?v("img",{src:f,alt:p,className:co.icon}):f})]},s)})})}function AM({id:e,label:t,value:n,onChange:r,longform:i}){const o={className:"SUE-Input","aria-label":t,"aria-labelledby":_r(e),id:e,value:n,onChange:l=>{const a=l.target.value;r(a)}};return i?v("textarea",P({},o)):v("input",W(P({},o),{type:"text"}))}function xM(e){return rF(e).with({inputType:"string"},t=>v(AM,P({},t))).with({inputType:"number"},t=>v(m6,P({},t))).with({inputType:"cssMeasure"},t=>v(uF,P({},t))).with({inputType:"boolean"},t=>v(aF,P({},t))).with({inputType:"list"},t=>v(cM,P({},t))).with({inputType:"dropdown"},t=>v(hM,P({},t))).with({inputType:"radio"},t=>v(SM,P({},t))).otherwise(({inputType:t})=>U("div",{children:["I don't know how to render the input of type ",t," yet! Sorry."]}))}function CM(e,t){if(e===void 0)return!0;if(t==="number")return typeof e=="number";if(t==="string")return typeof e=="string";if(t==="cssMeasure")return t6(e);if(t==="boolean")return typeof e=="boolean";if(t==="list")return uM(e);if(t==="dropdown"||t==="radio")return typeof e=="string";if(t==="string-array")return Array.isArray(e)&&typeof e[0]=="string";if(t==="omitted")return!0;throw new Error("Unimplemented argument type check",t)}function jx(n){var r=n,{onUpdate:e}=r,t=ye(r,["onUpdate"]);var d;const i=t.value===void 0,o=t.optional,l=_r(t.name),a=(d=t.label)!=null?d:t.name,s=()=>e({type:"UPDATE",value:t.defaultValue}),u=p=>e({type:"UPDATE",value:p}),c=()=>e({type:"REMOVE"});let f;return t.value===void 0?t.optional?f=v(TM,{labelledBy:l}):f=v(kM,{name:t.name,onReset:s}):CM(t.value,t.inputType)?f=v(xM,P({label:a,id:t.name,onChange:u},t)):f=v(_M,{name:t.name,onReset:s}),U("div",{className:"SUE-SettingsInput",children:[U("div",{className:"info","data-unset":i,children:[o?v("input",{type:"checkbox",checked:!i,title:`Use ${t.name} argument`,"aria-label":`Use ${t.name} argument`,onChange:i?s:c}):null,v("label",{id:l,children:a})]}),f]})}function _M({name:e,onReset:t}){return U("div",{className:"mismatched-argument-types",children:["Argument for ",e," of unsupported type.",v(rt,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:t,children:"Reset"})]})}function kM({name:e,onReset:t}){return U("div",{className:"missing-required-argument-message",children:['Required argument "',e,'" not provided.',v(rt,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:t,children:"Reset"})]})}function TM({labelledBy:e}){return v("input",{className:"unset-argument SUE-Input","aria-labelledby":e,placeholder:"Default",disabled:!0})}const IM="_EditorSkeleton_18fvc_1",OM="_app_view_18fvc_14",PM="_elements_panel_18fvc_28",NM="_properties_panel_18fvc_33",RM="_app_preview_18fvc_38",DM="_panel_18fvc_63",LM="_panel_title_18fvc_74",ar={EditorSkeleton:IM,app_view:OM,elements_panel:PM,properties_panel:NM,app_preview:RM,panel:DM,panel_title:LM};function fl({children:e,className:t=""}){return v("h3",{className:Ke(t,ar.panel_title),children:e})}const FM="_portalHolder_18ua3_1",MM="_portalModal_18ua3_11",BM="_title_18ua3_21",UM="_body_18ua3_25",zM="_portalForm_18ua3_30",jM="_portalFormInputs_18ua3_35",WM="_portalFormFooter_18ua3_42",YM="_validationMsg_18ua3_48",VM="_infoText_18ua3_53",dr={portalHolder:FM,portalModal:MM,title:BM,body:UM,portalForm:zM,portalFormInputs:jM,portalFormFooter:WM,validationMsg:YM,infoText:VM};function Wx({children:e,title:t,label:n,onConfirm:r,onCancel:i}){return v(OE,{children:v("div",{className:dr.portalHolder,onClick:()=>i(),onKeyDown:o=>{o.key==="Escape"&&i()},children:U("div",{className:dr.portalModal,onClick:o=>o.stopPropagation(),"aria-label":n!=null?n:"popup modal",children:[t?v(fl,{className:dr.title,children:t}):null,v("div",{className:dr.body,children:e})]})})})}function $M({onCancel:e,onDone:t,existingAreaNames:n}){const r=`area${n.length}`,[i,o]=k.useState(r),[l,a]=k.useState(null),s=k.useCallback(c=>{c&&c.preventDefault();const f=HM({name:i,existingAreaNames:n});if(f){a(f);return}t(i)},[n,i,t]),u=k.useCallback(c=>{c.type!=="REMOVE"&&(a(null),o(c.value))},[]);return U(Wx,{title:"Name new grid area",label:"New grid area naming modal",onConfirm:()=>t(i),onCancel:e,children:[v("form",{className:dr.portalForm,onSubmit:s,children:U("div",{className:dr.portalFormInputs,children:[v("span",{className:dr.infoText,children:"Name for grid area needs to be unique, start with a letter, and contain only letters and numbers."}),v(jx,{label:"Name of new grid area",name:"New-Item-Name",inputType:"string",onUpdate:u,value:i,defaultValue:r}),l?v("div",{className:dr.validationMsg,children:l}):null]})}),U("div",{className:dr.portalFormFooter,children:[v(rt,{variant:"delete",onClick:e,children:"Cancel"}),v(rt,{onClick:()=>s(),children:"Done"})]})]})}function HM({name:e,existingAreaNames:t}){return e===""?"A name is needed for the grid area":t.includes(e)?`You already have an item with the name "${e}", all names + need to be unique.`:e.match(/^[^a-zA-Z]/g)?"Valid item names need to start with a character.":e.match(/\s/g)?"Spaces not allowed in grid area names":e.match(/[^\w]/g)?"Only letters and numbers allowed in area names":null}function GM(e){const t=Tr();return k.useCallback(r=>{t(HA({path:e,node:{uiArguments:r}}))},[t,e])}function JM({layout:e,row_sizes:t,col_sizes:n,gap_size:r}){return e=aa(e),t=aa(t),n=aa(n),{layout:e,row_sizes:t,col_sizes:n,gap_size:r}}const QM="_container_1hvsg_1",KM={container:QM},Yx=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{const i=JM(e),o=bg(),w=_L(i),{uniqueAreas:l}=w,a=ye(w,["uniqueAreas"]),{areas:s}=a,u=GM(n),c=k.useMemo(()=>kg(s),[s]),[f,d]=k.useState(null),p=S=>{const{node:_,currentPath:b,pos:A}=S,T=b!==void 0,N=xg(_);if(T&&N&&"area"in _.uiArguments&&_.uiArguments.area){const R=_.uiArguments.area;h({type:"MOVE_ITEM",name:R,pos:A});return}d(S)},h=S=>{u(Tg(i,S))},m=k.useCallback(S=>{u(gx(S))},[u]),E=l.map(S=>v(KL,{area:S,areas:s,gridLocation:c.get(S),onNewPos:_=>h({type:"MOVE_ITEM",name:S,pos:_})},S)),g={"--gap":i.gap_size,"--row-gutter":"150px","--col-gutter":"100px","--pad":"8px"},y=(S,{node:_,currentPath:b,pos:A})=>{var T;o({path:er(n,(T=t==null?void 0:t.length)!=null?T:0),node:LL(_,S),currentPath:b}),h({type:"ADD_ITEM",name:S,pos:A}),d(null)};return U(rx.Provider,{value:h,children:[v("div",W(P({style:g,className:KM.container},r),{draggable:!1,onDragStart:()=>{},children:U(Z6,W(P({},a),{onNewLayout:m,children:[DL(s).map(({row:S,col:_})=>v(tF,{gridRow:S,gridColumn:_,onDroppedNode:p},YL({row:S,col:_}))),t==null?void 0:t.map((S,_)=>v(bi,{path:[...n,_],node:S},n.join(".")+_)),E]}))})),f?v($M,{info:f,onCancel:()=>d(null),onDone:S=>y(S,f),existingAreaNames:l}):null]})},qM=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>v(Yx,{uiArguments:e,uiChildren:t,path:n,wrapperProps:r}),XM=xe()({library:"gridlayout",name:"grid_container",title:"Grid Container",takesChildren:!0,UiComponent:qM,settingsInfo:{gap_size:{label:"Width",inputType:"cssMeasure",defaultValue:"10px",units:["px","rem"]},layout:{inputType:"omitted",defaultValue:[". .",". ."]},row_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},col_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]}},iconSrc:fx,category:"Tabs",stateUpdateSubscribers:{UPDATE_NODE:yx,DELETE_NODE:vx},description:"A general container for arranging items using `gridlayout`"}),ZM=e=>v(Yx,P({},e)),e8=xe()({library:"gridlayout",name:"grid_page",title:"Grid Page",takesChildren:!0,UiComponent:ZM,settingsInfo:{gap_size:{label:"Width",inputType:"cssMeasure",defaultValue:"10px",units:["px","rem"]},layout:{inputType:"omitted",defaultValue:[". .",". ."]},row_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},col_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},theme:{inputType:"omitted",optional:!0}},stateUpdateSubscribers:{UPDATE_NODE:yx,DELETE_NODE:vx},category:"gridlayout"}),t8=11,n8=i8(Zu(t8).map(e=>Math.random())).map(e=>`${Math.round(e*100)}%`);function r8({title:e=v("span",{children:"My Plot"})}){return v("div",{className:"PlotPlaceholder",children:U("div",{className:"plot",children:[v("div",{className:"title",children:e}),v("div",{className:"plot-body",children:n8.map((t,n)=>v("div",{className:"bar",style:{"--value":t}},`${n}-${t}`))})]})})}function i8(e){let i=-1/0,o=1/0;for(let s of e)i=Math.max(i,s),o=Math.min(o,s);const l=i-o;return e.map(s=>((s-o)/l+.1)*.85)}const o8=({uiArguments:{outputId:e,width:t="100%",height:n="400px"},wrapperProps:r})=>v("div",W(P({className:"plotlyPlotlyOutput",style:{height:n,width:t}},r),{children:v(r8,{title:U("span",{className:"title-bar",children:[v(Af,{type:"output",name:e}),v("span",{className:"plotly-name",children:"Plotly"})]})})})),l8=xe()({library:"plotly",name:"plotlyOutput",title:"Plotly Plot",takesChildren:!1,UiComponent:o8,settingsInfo:{outputId:{inputType:"string",label:"Output ID for plot",defaultValue:"plot"},width:{label:"Width",inputType:"cssMeasure",defaultValue:"100%",optional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"400px",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderPlotly({ plot_ly(z = ~volcano, type = "surface") -})`}},iconSrc:_g,category:"Plotting",description:"Output for interactive `plotly` plots."}),o8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAADKUlEQVR4nO3cMY5VVQDG8Q8QaFyACiWFvVqwiyERjHuQAoohbsAEKLTARRiCYtgGxsR6So0LgAYIeRR3bmKGZ0Hi5zl3+P2S17xM8eXkP/e9meKc2e12gf/a2dEDOJ2ERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUfDB6wD8d/nS07+0LSQ6OX1eTfHL83vvmeZI/k/ye5JckvyZ5efKH7n115X+etd9UYe1xLcm9JHOc1lgfJvn0+PV1kqMkd5L8PHLUv5n1o/BckrtZDk1U+11J8ijLOZ0bvOUtsz6xvktyOHrERqzndGfoihNmfGJ9GVG9q8Ms5zaN2cK6kOT70SM26odM9EfNbGFdT3J59IiNupTkxugRq9nCOhg9YOMORg9YzRbWF6MHbNznowesZgvro9EDNu7j0QNWs4V1cfSAjfPlndNNWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIi4rZwno2esDGvXX7zCizhfX36AEbN835zRbWH6MHbNzT0QNWs4X1ePSAjXs8esBqtrAeZrm1jnf3V5bzm8JsYb1Mcnv0iI26leTF6BGr2cJKlt+6+6NHbMz9TPS0SuYMK0m+TfJg9IiN+DHLeU1l1rBeJ7mZ5Za6vVcpk6Ms94l9k+W8pjLrHaSrR0meZDnAa0k+y3LB2PmRowZ5leUL+m9ZruN+mIn+IXrSmd1uN3oDp9CsH4VsnLCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIi4o3LCE7MROKhbQAAAAASUVORK5CYII=",l8="_container_tyghz_1",a8={container:l8},s8=({uiArguments:e,wrapperProps:t})=>{const{label:n="My Action Button",width:r}=e;return v("div",W(O({className:a8.container},t),{children:v(rt,{style:r?{width:r}:void 0,children:n})}))},u8=xe()({title:"Action Button",library:"shiny",name:"actionButton",takesChildren:!1,UiComponent:s8,iconSrc:o8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myButton"},label:{inputType:"string",label:"Label",defaultValue:"My Button"},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},category:"Inputs",description:"Creates an action button whose value is initially zero, and increments by one each time it is pressed."}),c8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEtklEQVR4nO3cP2zcVADH8V8QA2QrEh2RqCxRiY2OYQplpFvikY0qS0YndK9UvMFSyASjCRMIiUopU7tRtiJUWWEHiW6VYDkGP+sOp07Of37yXd73I0XxucmLh6/8bPfubcxmMwFje2XqA8DlRFiwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsHh16gOYSlaUbf90JXz18Tx8nZGnSc8h11O0YTVcl7Qn6QNJ7w4c66mkh5LuS/p94Fhri6lQui3pN0n7Gh6Vwhj7YczbI4y3lmI/Y30s6cvGvtbpbAmL0+hGGPsfSV/3HG9txRzWm6qmq9pjSft5mvw6ZNCsKN+T9IWkrbDrvqQfJf01ZNx1E/NUuCfp9bD9RNL20KgkKYyxLemXsOu18LeiEnNY7y9sf5qnyb9jDRzGutPyt6IQ81S4tbD9eMhAWVEeSDoILz/M0+RJY8yts791ucV8xtqsN/I0edF3kKwov5J0L7yso2qOuXnmFy+5mMMaLJypPgkvd+uoQFi9ZUV5TfMz1WGeJidTHs+qIaz+vg3fj/M0+WzSI1lBhNVDmAJvqHqQejjx4awkwuooTIH1HeBhnianUx7PqiKs7g5U/bfNSZ4mR1MfzKoirA6yoryh+V0gU+A5CKub+i7wiEcL54v5yXurcHF+T9Ud327Yd1PSzfAj3AVegDNWQ1aUVzQ/M+1kRVk/VtgJ34+4YL8YYTXkafJc0u7Crp3GE3Yu2JdAWC+Rp8mx/n9xXp/BTri2Wg5htQhP048bu5uv0SLmsP6uN7KifKPlZw41f5vyaZfnVuFardb3rc5rK+a7wkeSboXtjyR90/yBcJHeFt1Fbi1sP+o5xtqK+Yz1w8L23awo3xpr4DDW3YVd34819rrYmM1mUx/DJMIHVk8lvR12/akqhp8l9X3j36aqzybekXQ17PtD0jU+sBqXPUk/he2rkj43/Y3oxDwVStIDVWeYZ4axn4WxHxjGXnmxn7Gkaup7R9WT9W1Vn6jp+x71F6ou1B9K+m6Uo1tThDV3LJ5TjSb2qRAmhAULwoIFYcGCi/ezLCv6xYawKqzoNzKmQlb0s4j9jMWKfiYxh8WKfkYxT4Ws6GcUc1is6GcU81TIin5GMZ+xWNHPKOawBmNFv3aE1RMr+p2PsPpjRb9zEFYPrOh3McLqiBX9lkNY3bGi3xIIqwNW9FseYXXDin5LivnJeytW9BuOM1YDK/qNg7AaWNFvHIT1EqzoNxxhtWBFv2FiDosV/YxivitkRT+jmM9YrOhnxIp+rOhnEfNUKLGin03MU6HEin42sZ+xJFb0s4j2GgtesU+FMCEsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiz+AwEFRrQUQeonAAAAAElFTkSuQmCC",f8="_container_162lp_1",d8="_checkbox_162lp_14",Jd={container:f8,checkbox:d8},p8=({uiArguments:e,wrapperProps:t})=>{const n=e.choices;return U("div",W(O({className:Jd.container,style:{width:e.width}},t),{children:[v("label",{children:e.label}),v("div",{children:Object.keys(n).map((r,i)=>v("div",{className:Jd.radio,children:U("label",{className:Jd.checkbox,children:[v("input",{type:"checkbox",name:n[r],value:n[r],defaultChecked:i===0}),v("span",{children:r})]})},r))})]}))},h8=xe()({library:"shiny",name:"checkboxGroupInput",title:"Checkbox Group",takesChildren:!1,UiComponent:p8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myCheckboxGroup"},label:{inputType:"string",label:"label",defaultValue:"Checkbox Group"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:c8,category:"Inputs",description:"Create a group of checkboxes that can be used to toggle multiple choices independently. The server will receive the input as a character vector of the selected values."}),m8="data:image/png;base64,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",g8="_container_1x0tz_1",y8="_label_1x0tz_10",m0={container:g8,label:y8},v8=({uiArguments:e,wrapperProps:t})=>{var l;const n=(l=e.width)!=null?l:"auto",r=O({},e),[i,o]=P.useState(r.value);return P.useEffect(()=>{o(r.value)},[r.value]),v("div",W(O({className:m0.container+" shiny::checkbox",style:{width:n}},t),{children:U("label",{htmlFor:r.inputId,children:[v("input",{id:r.inputId,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),v("span",{className:m0.label,children:r.label})]})}))},w8=xe()({library:"shiny",name:"checkboxInput",title:"Checkbox Input",takesChildren:!1,UiComponent:v8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myCheckboxInput"},label:{inputType:"string",label:"label",defaultValue:"Checkbox Input"},value:{inputType:"boolean",label:"Starting value",defaultValue:!1},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:m8,category:"Inputs",description:"Create a checkbox that can be used to specify logical values."}),b8=["shiny::tabPanel"];function Vx(e){return b8.includes(e.uiName)}function Dg(e){return Vx(e)?e.uiArguments.title:null}function $x({uiChildren:e}){let t=[];return e==null||e.forEach(n=>{const r=Dg(n);r&&t.push(r)}),t}function Hx({uiChildren:e}){var n;const t=e==null?void 0:e[0];return t&&(n=Dg(t))!=null?n:"First Tab"}const E8="_container_10z2l_1",S8={container:E8};function Gx(r){var i=r,{title:e,children:t}=i,n=ye(i,["title","children"]);return v("div",W(O({className:S8.container,"data-tab-id":e,"aria-label":`tab panel ${e}`},n),{children:t}))}function Lg(e){return CA(e)&&"uiName"in e&&typeof e.uiName=="string"&&eC.has(e.uiName)}function A8(e,t){return!e||!t?!1:ul(e,t)}const x8="_container_qbb7e_1",C8="_header_qbb7e_13",_8="_tabContents_qbb7e_21",k8="_pageTitle_qbb7e_26",T8="_tabHolder_qbb7e_39",I8="_tab_qbb7e_21",O8="_newTabDropDetector_qbb7e_99",P8="_addTabButton_qbb7e_104",N8="_tabDropDetector_qbb7e_112",fr={container:x8,header:C8,tabContents:_8,pageTitle:k8,tabHolder:T8,tab:I8,newTabDropDetector:O8,addTabButton:P8,tabDropDetector:N8},R8={uiName:"unknownUiFunction",uiArguments:{text:"Dummy ui node for app previews"}};function D8(e){const t=Qa(r=>r.app_info);return k.useMemo(()=>Lg(t)?Ei(t,e):R8,[e,t])}const L8=({name:e,isActive:t,index:n,parentPath:r})=>{const i=er(r,n),o=rs(),l=D8(i),a=SA({node:l,path:i,canDrag:!0}),s=A8(i,o);return v("div",W(O({className:fr.tab,"data-active-tab":t,"data-selected-tab":s},a),{style:{order:n},"aria-label":t?`Active tab ${e}`:`Select ${e} tab`,children:e}))};function F8({uiChildren:e,parentPath:t}){return v(Ne,{children:e.map((n,r)=>{const i=er(t,r);return v(bi,{path:i,node:n},Ef(i))})})}const M8="_container_fe3r8_1",B8="_emptyTabPanelDropDetector_fe3r8_8",g0={container:M8,emptyTabPanelDropDetector:B8},Jx=["shiny::navbarPage","shiny::tabPanel","gridlayout::grid_card","gridlayout::grid_card_plot","gridlayout::grid_card_text"],U8={rejected:Jx},z8=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{const i=t&&t.length>0;return v("div",W(O({className:g0.container},r),{children:i?v(F8,{uiChildren:t,parentPath:n}):v(zi,{className:g0.emptyTabPanelDropDetector,index:0,parentPath:n,dropFilters:U8,parentNodeType:"shiny::tabPanel"})}))},j8={rejected:Jx.filter(e=>e!=="shiny::tabPanel")},W8=({uiName:e})=>e!=="shiny::tabPanel"?{uiName:"shiny::tabPanel",uiArguments:{title:"Tab Panel"}}:null;function y0({index:e,parentPath:t,children:n,baseWidth:r}){return v(zi,{className:fr.tabDropDetector,"aria-label":"tab drop detector",parentPath:t,parentNodeType:"shiny::tabPanel",index:e,dropFilters:j8,wrappingNode:W8,style:{"--baseWidth":r,order:e-1},children:n})}function Y8(e,t=0){const[n,r]=k.useState(t);return k.useEffect(()=>{e<=n&&r(e-1)},[n,e]),{activeTab:n,setActiveTab:o=>{r(o)}}}function Qx(o){var l=o,{path:e,title:t,children:n,className:r=""}=l,i=ye(l,["path","title","children","className"]);const a=$8(n),s=a.length,u=rs(),{activeTab:c,setActiveTab:f}=Y8(a.length),d=Eg();return k.useEffect(()=>{const p=er(e,c);if(!u)return;Ui(u)>=Ui(p)&&f(u[Ui(p)-1])},[c,e,u,f]),U("div",W(O({className:Ke(r,fr.container)},i),{children:[U("div",{className:fr.header,children:[v("h1",{className:fr.pageTitle,children:t}),U("div",{className:fr.tabHolder,"aria-label":"tabs container",children:[a.map((p,h)=>v(L8,{name:p,parentPath:e,isActive:h===c,index:h},p+h)),Zu(s).map(p=>v(y0,{parentPath:e,index:p,baseWidth:"10px"},p)),v(y0,{parentPath:e,index:s,baseWidth:"25px",children:v(J8,{className:fr.addTabButton,label:"Add new tab",onClick:p=>{p.stopPropagation(),d({path:er(e,s),node:V8})}})})]})]}),v("div",{className:fr.tabContents,children:H8(n,c)})]}))}const V8={uiName:"shiny::tabPanel",uiArguments:{title:"Empty Tab"},uiChildren:[]};function $8(e){let t=[];return k.Children.forEach(e,n=>{if(!k.isValidElement(n))return null;const r=n.props.title;typeof r=="string"&&t.push(r)}),t}function H8(e,t){return k.Children.map(e,(n,r)=>k.isValidElement(n)&&typeof n.props.title=="string"?v("div",{className:fr.tabContents,"data-active-tab":r===t,children:n}):n)}const G8={display:"block"};function J8({label:e,onClick:t,className:n}){return v(lu,{variant:["icon","transparent"],className:n,placement:"bottom-start","aria-label":e,popoverContent:e,onClick:t,children:v(Ig,{style:G8})})}const Q8="_noTabsMessage_130qz_1",Kx={noTabsMessage:Q8},K8=({uiArguments:{title:e},uiChildren:t,path:n,wrapperProps:r})=>{var l;const o=((l=t==null?void 0:t.length)!=null?l:0)>0;return v(Qx,W(O({path:n,title:e,className:Kx.container},r),{children:t?t.map((a,s)=>{const u=er(n,s),c=Vx(a)?a.uiArguments.title:"unknown tab";return v(Gx,{title:c,children:v(bi,{path:u,node:a})},Ef(u))}):v(q8,{hasChildren:o})}))};function q8({hasChildren:e}){return e?null:v("div",{className:Kx.noTabsMessage,children:v("span",{children:"Empty page. Drag elements or Tab Panel on to add content"})})}const X8=xe()({library:"shiny",name:"navbarPage",title:"Navbar Page",takesChildren:!0,UiComponent:K8,settingsInfo:{title:{inputType:"string",label:"Page title",defaultValue:"navbar-page"},collapsible:{label:"Collapse navigation on mobile",inputType:"boolean",defaultValue:!1},id:{inputType:"string",label:"Id for tabset",defaultValue:"tabset-default-id",optional:!0},selected:{inputType:"dropdown",optional:!0,label:"Selected tab on load",defaultValue:e=>e?Hx(e):"First Tab",choices:e=>e?$x(e):["First Tab"]},theme:{inputType:"omitted",optional:!0}},category:"layouts",description:"Layout an app with tab-based navigation"}),Z8="data:image/png;base64,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";function qx({label:e,children:t}){return U("div",{className:"LabeledInputCategory",children:[v("div",{className:"divider-line",children:v("label",{children:e})}),v("section",{className:"grouped-inputs",children:t}),v("div",{className:"divider-line"})]})}const e7="_container_yicbr_1",t7={container:e7},n7=({uiArguments:e,wrapperProps:t})=>{var l;const n=O({},e),r=(l=n.width)!=null?l:"200px",[i,o]=P.useState(n.value);return P.useEffect(()=>{o(n.value)},[n.value]),U("div",W(O({className:Ke(t7.container,"shiny::numericInput"),style:{width:r}},t),{children:[v("span",{children:n.label}),v(_f,{type:"number",value:i,onChange:o,min:n.min,max:n.max,step:n.step})]}))},r7=xe()({library:"shiny",name:"numericInput",title:"Numeric Input",takesChildren:!1,UiComponent:n7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myNumericInput"},label:{inputType:"string",label:"label",defaultValue:"Numeric Input"},min:{label:"Min",inputType:"number",defaultValue:0,optional:!0},max:{label:"Max",inputType:"number",defaultValue:10,optional:!0},value:{label:"Start value",inputType:"number",defaultValue:5},step:{inputType:"number",label:"Step size",defaultValue:1,optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},settingsFormRender:({inputs:e})=>U(Ne,{children:[e.inputId,e.label,U(qx,{label:"Values",children:[e.min,e.max,e.value,e.step]}),e.width]}),serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:Z8,category:"Inputs",description:"An input control for entry of numeric values"}),i7=({uiArguments:{outputId:e,width:t,height:n="400px"},wrapperProps:r})=>v("div",W(O({className:Ah.container,style:{height:n,width:t}},r),{children:v(lx,{outputId:e})})),o7=xe()({library:"shiny",name:"plotOutput",title:"Plot Output",takesChildren:!1,UiComponent:i7,settingsInfo:{outputId:{inputType:"string",label:"Output ID for plot",defaultValue:"plot"},width:{label:"Width",inputType:"cssMeasure",defaultValue:"100%",optional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"400px",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderPlot({ +})`}},iconSrc:_g,category:"Plotting",description:"Output for interactive `plotly` plots."}),a8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAADKUlEQVR4nO3cMY5VVQDG8Q8QaFyACiWFvVqwiyERjHuQAoohbsAEKLTARRiCYtgGxsR6So0LgAYIeRR3bmKGZ0Hi5zl3+P2S17xM8eXkP/e9meKc2e12gf/a2dEDOJ2ERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUfDB6wD8d/nS07+0LSQ6OX1eTfHL83vvmeZI/k/ye5JckvyZ5efKH7n115X+etd9UYe1xLcm9JHOc1lgfJvn0+PV1kqMkd5L8PHLUv5n1o/BckrtZDk1U+11J8ijLOZ0bvOUtsz6xvktyOHrERqzndGfoihNmfGJ9GVG9q8Ms5zaN2cK6kOT70SM26odM9EfNbGFdT3J59IiNupTkxugRq9nCOhg9YOMORg9YzRbWF6MHbNznowesZgvro9EDNu7j0QNWs4V1cfSAjfPlndNNWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIi4rZwno2esDGvXX7zCizhfX36AEbN835zRbWH6MHbNzT0QNWs4X1ePSAjXs8esBqtrAeZrm1jnf3V5bzm8JsYb1Mcnv0iI26leTF6BGr2cJKlt+6+6NHbMz9TPS0SuYMK0m+TfJg9IiN+DHLeU1l1rBeJ7mZ5Za6vVcpk6Ms94l9k+W8pjLrHaSrR0meZDnAa0k+y3LB2PmRowZ5leUL+m9ZruN+mIn+IXrSmd1uN3oDp9CsH4VsnLCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIi4o3LCE7MROKhbQAAAAASUVORK5CYII=",s8="_container_tyghz_1",u8={container:s8},c8=({uiArguments:e,wrapperProps:t})=>{const{label:n="My Action Button",width:r}=e;return v("div",W(P({className:u8.container},t),{children:v(rt,{style:r?{width:r}:void 0,children:n})}))},f8=xe()({title:"Action Button",library:"shiny",name:"actionButton",takesChildren:!1,UiComponent:c8,iconSrc:a8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myButton"},label:{inputType:"string",label:"Label",defaultValue:"My Button"},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},category:"Inputs",description:"Creates an action button whose value is initially zero, and increments by one each time it is pressed."}),d8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEtklEQVR4nO3cP2zcVADH8V8QA2QrEh2RqCxRiY2OYQplpFvikY0qS0YndK9UvMFSyASjCRMIiUopU7tRtiJUWWEHiW6VYDkGP+sOp07Of37yXd73I0XxucmLh6/8bPfubcxmMwFje2XqA8DlRFiwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsHh16gOYSlaUbf90JXz18Tx8nZGnSc8h11O0YTVcl7Qn6QNJ7w4c66mkh5LuS/p94Fhri6lQui3pN0n7Gh6Vwhj7YczbI4y3lmI/Y30s6cvGvtbpbAmL0+hGGPsfSV/3HG9txRzWm6qmq9pjSft5mvw6ZNCsKN+T9IWkrbDrvqQfJf01ZNx1E/NUuCfp9bD9RNL20KgkKYyxLemXsOu18LeiEnNY7y9sf5qnyb9jDRzGutPyt6IQ81S4tbD9eMhAWVEeSDoILz/M0+RJY8yts791ucV8xtqsN/I0edF3kKwov5J0L7yso2qOuXnmFy+5mMMaLJypPgkvd+uoQFi9ZUV5TfMz1WGeJidTHs+qIaz+vg3fj/M0+WzSI1lBhNVDmAJvqHqQejjx4awkwuooTIH1HeBhnianUx7PqiKs7g5U/bfNSZ4mR1MfzKoirA6yoryh+V0gU+A5CKub+i7wiEcL54v5yXurcHF+T9Ud327Yd1PSzfAj3AVegDNWQ1aUVzQ/M+1kRVk/VtgJ34+4YL8YYTXkafJc0u7Crp3GE3Yu2JdAWC+Rp8mx/n9xXp/BTri2Wg5htQhP048bu5uv0SLmsP6uN7KifKPlZw41f5vyaZfnVuFardb3rc5rK+a7wkeSboXtjyR90/yBcJHeFt1Fbi1sP+o5xtqK+Yz1w8L23awo3xpr4DDW3YVd34819rrYmM1mUx/DJMIHVk8lvR12/akqhp8l9X3j36aqzybekXQ17PtD0jU+sBqXPUk/he2rkj43/Y3oxDwVStIDVWeYZ4axn4WxHxjGXnmxn7Gkaup7R9WT9W1Vn6jp+x71F6ou1B9K+m6Uo1tThDV3LJ5TjSb2qRAmhAULwoIFYcGCi/ezLCv6xYawKqzoNzKmQlb0s4j9jMWKfiYxh8WKfkYxT4Ws6GcUc1is6GcU81TIin5GMZ+xWNHPKOawBmNFv3aE1RMr+p2PsPpjRb9zEFYPrOh3McLqiBX9lkNY3bGi3xIIqwNW9FseYXXDin5LivnJeytW9BuOM1YDK/qNg7AaWNFvHIT1EqzoNxxhtWBFv2FiDosV/YxivitkRT+jmM9YrOhnxIp+rOhnEfNUKLGin03MU6HEin42sZ+xJFb0s4j2GgtesU+FMCEsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiz+AwEFRrQUQeonAAAAAElFTkSuQmCC",p8="_container_162lp_1",h8="_checkbox_162lp_14",Jd={container:p8,checkbox:h8},m8=({uiArguments:e,wrapperProps:t})=>{const n=e.choices;return U("div",W(P({className:Jd.container,style:{width:e.width}},t),{children:[v("label",{children:e.label}),v("div",{children:Object.keys(n).map((r,i)=>v("div",{className:Jd.radio,children:U("label",{className:Jd.checkbox,children:[v("input",{type:"checkbox",name:n[r],value:n[r],defaultChecked:i===0}),v("span",{children:r})]})},r))})]}))},g8=xe()({library:"shiny",name:"checkboxGroupInput",title:"Checkbox Group",takesChildren:!1,UiComponent:m8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myCheckboxGroup"},label:{inputType:"string",label:"label",defaultValue:"Checkbox Group"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:d8,category:"Inputs",description:"Create a group of checkboxes that can be used to toggle multiple choices independently. The server will receive the input as a character vector of the selected values."}),y8="data:image/png;base64,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",v8="_container_1x0tz_1",w8="_label_1x0tz_10",m0={container:v8,label:w8},b8=({uiArguments:e,wrapperProps:t})=>{var l;const n=(l=e.width)!=null?l:"auto",r=P({},e),[i,o]=O.useState(r.value);return O.useEffect(()=>{o(r.value)},[r.value]),v("div",W(P({className:m0.container+" shiny::checkbox",style:{width:n}},t),{children:U("label",{htmlFor:r.inputId,children:[v("input",{id:r.inputId,type:"checkbox",checked:i,onChange:a=>o(a.target.checked)}),v("span",{className:m0.label,children:r.label})]})}))},E8=xe()({library:"shiny",name:"checkboxInput",title:"Checkbox Input",takesChildren:!1,UiComponent:b8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myCheckboxInput"},label:{inputType:"string",label:"label",defaultValue:"Checkbox Input"},value:{inputType:"boolean",label:"Starting value",defaultValue:!1},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:y8,category:"Inputs",description:"Create a checkbox that can be used to specify logical values."}),S8=["shiny::tabPanel"];function Vx(e){return S8.includes(e.uiName)}function Dg(e){return Vx(e)?e.uiArguments.title:null}function $x({uiChildren:e}){let t=[];return e==null||e.forEach(n=>{const r=Dg(n);r&&t.push(r)}),t}function Hx({uiChildren:e}){var n;const t=e==null?void 0:e[0];return t&&(n=Dg(t))!=null?n:"First Tab"}const A8="_container_10z2l_1",x8={container:A8};function Gx(r){var i=r,{title:e,children:t}=i,n=ye(i,["title","children"]);return v("div",W(P({className:x8.container,"data-tab-id":e,"aria-label":`tab panel ${e}`},n),{children:t}))}function Lg(e){return CA(e)&&"uiName"in e&&typeof e.uiName=="string"&&eC.has(e.uiName)}function C8(e,t){return!e||!t?!1:ul(e,t)}const _8="_container_qbb7e_1",k8="_header_qbb7e_13",T8="_tabContents_qbb7e_21",I8="_pageTitle_qbb7e_26",O8="_tabHolder_qbb7e_39",P8="_tab_qbb7e_21",N8="_newTabDropDetector_qbb7e_99",R8="_addTabButton_qbb7e_104",D8="_tabDropDetector_qbb7e_112",fr={container:_8,header:k8,tabContents:T8,pageTitle:I8,tabHolder:O8,tab:P8,newTabDropDetector:N8,addTabButton:R8,tabDropDetector:D8},L8={uiName:"unknownUiFunction",uiArguments:{text:"Dummy ui node for app previews"}};function F8(e){const t=Qa(r=>r.app_info);return k.useMemo(()=>Lg(t)?Ei(t,e):L8,[e,t])}const M8=({name:e,isActive:t,index:n,parentPath:r})=>{const i=er(r,n),o=rs(),l=F8(i),a=SA({node:l,path:i,canDrag:!0}),s=C8(i,o);return v("div",W(P({className:fr.tab,"data-active-tab":t,"data-selected-tab":s},a),{style:{order:n},"aria-label":t?`Active tab ${e}`:`Select ${e} tab`,children:e}))};function B8({uiChildren:e,parentPath:t}){return v(Ne,{children:e.map((n,r)=>{const i=er(t,r);return v(bi,{path:i,node:n},Ef(i))})})}const U8="_container_fe3r8_1",z8="_emptyTabPanelDropDetector_fe3r8_8",g0={container:U8,emptyTabPanelDropDetector:z8},Jx=["shiny::navbarPage","shiny::tabPanel","gridlayout::grid_card","gridlayout::grid_card_plot","gridlayout::grid_card_text"],j8={rejected:Jx},W8=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{const i=t&&t.length>0;return v("div",W(P({className:g0.container},r),{children:i?v(B8,{uiChildren:t,parentPath:n}):v(zi,{className:g0.emptyTabPanelDropDetector,index:0,parentPath:n,dropFilters:j8,parentNodeType:"shiny::tabPanel"})}))},Y8={rejected:Jx.filter(e=>e!=="shiny::tabPanel")},V8=({uiName:e})=>e!=="shiny::tabPanel"?{uiName:"shiny::tabPanel",uiArguments:{title:"Tab Panel"}}:null;function y0({index:e,parentPath:t,children:n,baseWidth:r}){return v(zi,{className:fr.tabDropDetector,"aria-label":"tab drop detector",parentPath:t,parentNodeType:"shiny::tabPanel",index:e,dropFilters:Y8,wrappingNode:V8,style:{"--baseWidth":r,order:e-1},children:n})}function $8(e,t=0){const[n,r]=k.useState(t);return k.useEffect(()=>{e<=n&&r(e-1)},[n,e]),{activeTab:n,setActiveTab:o=>{r(o)}}}function Qx(o){var l=o,{path:e,title:t,children:n,className:r=""}=l,i=ye(l,["path","title","children","className"]);const a=G8(n),s=a.length,u=rs(),{activeTab:c,setActiveTab:f}=$8(a.length),d=bg();return k.useEffect(()=>{const p=er(e,c);if(!u)return;Ui(u)>=Ui(p)&&f(u[Ui(p)-1])},[c,e,u,f]),U("div",W(P({className:Ke(r,fr.container)},i),{children:[U("div",{className:fr.header,children:[v("h1",{className:fr.pageTitle,children:t}),U("div",{className:fr.tabHolder,"aria-label":"tabs container",children:[a.map((p,h)=>v(M8,{name:p,parentPath:e,isActive:h===c,index:h},p+h)),Zu(s).map(p=>v(y0,{parentPath:e,index:p,baseWidth:"10px"},p)),v(y0,{parentPath:e,index:s,baseWidth:"25px",children:v(K8,{className:fr.addTabButton,label:"Add new tab",onClick:p=>{p.stopPropagation(),d({path:er(e,s),node:H8})}})})]})]}),v("div",{className:fr.tabContents,children:J8(n,c)})]}))}const H8={uiName:"shiny::tabPanel",uiArguments:{title:"Empty Tab"},uiChildren:[]};function G8(e){let t=[];return k.Children.forEach(e,n=>{if(!k.isValidElement(n))return null;const r=n.props.title;typeof r=="string"&&t.push(r)}),t}function J8(e,t){return k.Children.map(e,(n,r)=>k.isValidElement(n)&&typeof n.props.title=="string"?v("div",{className:fr.tabContents,"data-active-tab":r===t,children:n}):n)}const Q8={display:"block"};function K8({label:e,onClick:t,className:n}){return v(lu,{variant:["icon","transparent"],className:n,placement:"bottom-start","aria-label":e,popoverContent:e,onClick:t,children:v(Ig,{style:Q8})})}const q8="_noTabsMessage_130qz_1",Kx={noTabsMessage:q8},X8=({uiArguments:{title:e},uiChildren:t,path:n,wrapperProps:r})=>{var l;const o=((l=t==null?void 0:t.length)!=null?l:0)>0;return v(Qx,W(P({path:n,title:e,className:Kx.container},r),{children:t?t.map((a,s)=>{const u=er(n,s),c=Vx(a)?a.uiArguments.title:"unknown tab";return v(Gx,{title:c,children:v(bi,{path:u,node:a})},Ef(u))}):v(Z8,{hasChildren:o})}))};function Z8({hasChildren:e}){return e?null:v("div",{className:Kx.noTabsMessage,children:v("span",{children:"Empty page. Drag elements or Tab Panel on to add content"})})}const e7=xe()({library:"shiny",name:"navbarPage",title:"Navbar Page",takesChildren:!0,UiComponent:X8,settingsInfo:{title:{inputType:"string",label:"Page title",defaultValue:"navbar-page"},collapsible:{label:"Collapse navigation on mobile",inputType:"boolean",defaultValue:!1},id:{inputType:"string",label:"Id for tabset",defaultValue:"tabset-default-id",optional:!0},selected:{inputType:"dropdown",optional:!0,label:"Selected tab on load",defaultValue:e=>e?Hx(e):"First Tab",choices:e=>e?$x(e):["First Tab"]},theme:{inputType:"omitted",optional:!0}},category:"layouts",description:"Layout an app with tab-based navigation"}),t7="data:image/png;base64,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";function qx({label:e,children:t}){return U("div",{className:"LabeledInputCategory",children:[v("div",{className:"divider-line",children:v("label",{children:e})}),v("section",{className:"grouped-inputs",children:t}),v("div",{className:"divider-line"})]})}const n7="_container_yicbr_1",r7={container:n7},i7=({uiArguments:e,wrapperProps:t})=>{var l;const n=P({},e),r=(l=n.width)!=null?l:"200px",[i,o]=O.useState(n.value);return O.useEffect(()=>{o(n.value)},[n.value]),U("div",W(P({className:Ke(r7.container,"shiny::numericInput"),style:{width:r}},t),{children:[v("span",{children:n.label}),v(_f,{type:"number",value:i,onChange:o,min:n.min,max:n.max,step:n.step})]}))},o7=xe()({library:"shiny",name:"numericInput",title:"Numeric Input",takesChildren:!1,UiComponent:i7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myNumericInput"},label:{inputType:"string",label:"label",defaultValue:"Numeric Input"},min:{label:"Min",inputType:"number",defaultValue:0,optional:!0},max:{label:"Max",inputType:"number",defaultValue:10,optional:!0},value:{label:"Start value",inputType:"number",defaultValue:5},step:{inputType:"number",label:"Step size",defaultValue:1,optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},settingsFormRender:({inputs:e})=>U(Ne,{children:[e.inputId,e.label,U(qx,{label:"Values",children:[e.min,e.max,e.value,e.step]}),e.width]}),serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:t7,category:"Inputs",description:"An input control for entry of numeric values"}),l7=({uiArguments:{outputId:e,width:t,height:n="400px"},wrapperProps:r})=>v("div",W(P({className:Sh.container,style:{height:n,width:t}},r),{children:v(lx,{outputId:e})})),a7=xe()({library:"shiny",name:"plotOutput",title:"Plot Output",takesChildren:!1,UiComponent:l7,settingsInfo:{outputId:{inputType:"string",label:"Output ID for plot",defaultValue:"plot"},width:{label:"Width",inputType:"cssMeasure",defaultValue:"100%",optional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"400px",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderPlot({ #Plot code goes here $0plot(rnorm(100)) -})`}},iconSrc:_g,category:"Outputs",description:"Render a `renderPlot()` within an application page."}),l7="data:image/png;base64,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",a7="_container_sgn7c_1",v0={container:a7},s7=({uiArguments:e,wrapperProps:t})=>{const n=e.choices,r=Object.keys(n),i=Object.values(n),[o,l]=k.useState(i[0]);return k.useEffect(()=>{i.includes(o)||l(i[0])},[o,i]),U("div",W(O({className:v0.container,style:{width:e.width}},t),{children:[v("label",{children:e.label}),v("div",{children:i.map((a,s)=>v("div",{className:v0.radio,children:U("label",{children:[v("input",{type:"radio",name:e.inputId,value:a,onChange:u=>l(u.target.value),checked:a===o}),v("span",{children:r[s]})]})},a))})]}))},u7=xe()({library:"shiny",name:"radioButtons",title:"Radio Buttons",takesChildren:!1,UiComponent:s7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myRadioButtons"},label:{inputType:"string",label:"label",defaultValue:"Radio Buttons"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:l7,category:"Inputs",description:"Create a set of radio buttons used to select an item from a list."}),c7="data:image/png;base64,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",f7="_container_1e5dd_1",d7={container:f7},p7=({uiArguments:e,wrapperProps:t})=>{const n=e.choices,r=e.inputId;return U("div",W(O({className:d7.container},t),{children:[v("label",{htmlFor:r,children:e.label}),v("select",{id:r,children:Object.keys(n).map((i,o)=>v("option",{value:n[i],children:i},i))})]}))},h7=xe()({library:"shiny",name:"selectInput",title:"Select Input",takesChildren:!1,UiComponent:p7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"mySelectInput"},label:{inputType:"string",label:"label",defaultValue:"Select Input"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:c7,category:"Inputs",description:"Create a select list that can be used to choose a single or multiple items from a list of values."}),m7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAES0lEQVR4nO3aP4gcZRyH8eckosWRQ4uAhaYJmCqNJmIpaGWiVl5voykV3QSSwuIscioqCNHu2rWSqIUIsdMiRkEbi2v8A4FYJUfAf7AW72xy6no32Zvvju/u84FhE5J597e5h93Mu7M0Go2QunZH3wNoPhmWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSliX98DJA2Gm7v9lbuAx4BngEeBg8AKcA34AfgS+BD4HPhtt8XWVw9NPeu8meuwdrAPeA54Fbhvwp+vAEea43ngKnAOeBf4fTYj1m0RPwofBC4D7zM5qkkOAG8Cl4DDobnmyqKFdRT4gvJONI0jzfmPdDbRnFqksA4DnwH37nGde4BP8Z1rR4sS1p3AkPJ/py6sAB8062qCpdFo1PcMrbS4wtvJy8DrHY2y3SvAG4F1/6W2K84a37FOABeBLWDU8khERbNu2xmmPbaAi4Ph5vHQa4ioLaw14AJl72m551lmZZnyej8aDDfX+h6mrZrCOg6caX59CtgPLLU4NsJzbbScY9pjP3C6ea4zg+HmifDr6URNYb3UPJ4G1ikfEW08lBnnpofD629RNmdPNb9/Mfx8nagprPEP8PxtnvdA14P8w/3h9cfeax7TIXeiprCm1dUWQ1/rj40v35dm9Hx7UlNYXzWPL9zmede7HmTG64+dbB4vzej59qSmsN5qHs9R9o/aXhX+lBnnpp/D6y8DA8rrhlv/Dv9rtW2QrnHrynARvba+euhs30O0UdM7FsBZ4GnK/VE3ep5lVm5QXu9TtUQFdd6PdaE52rqbctPegcAsv1CuOn8NrP03tX2lU81H4TS2fb+Y+q5wsH3d2n74SbV9FE7rHeDbjtf8Dni74zXnxqKE9QewSrmXvQvXgGebdTXBooQF8D3wOOX+9b24CjzRrKf/sEhhQdlkPQp8PeX53wDHqGSTsk+LFhbAj5R71k8CV1qec4Wy43+McoWpXdS43dCFPylf6m5Qbsd5knIXxEHKbSrXKQFdBj4BPmYGWwrzZK63G9SfRfwo1AwYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNSxF+9/aKLFqf7gQAAAABJRU5ErkJggg==",g7="_container_1f2js_1",y7="_sliderWrapper_1f2js_11",v7="_sliderInput_1f2js_16",Qd={container:g7,sliderWrapper:y7,sliderInput:v7},w7=({uiArguments:e,wrapperProps:t})=>{const n=O({},e),{width:r="200px"}=n,[i,o]=P.useState(n.value);return U("div",W(O({className:Ke(Qd.container,"shiny::sliderInput"),style:{width:r}},t),{children:[v("div",{children:n.label}),v("div",{className:Qd.sliderWrapper,children:v("input",{type:"range",min:n.min,max:n.max,value:i,onChange:l=>o(Number(l.target.value)),className:"slider "+Qd.sliderInput,"aria-label":"slider input","data-min":n.min,"data-max":n.max,draggable:!0,onDragStartCapture:l=>{l.stopPropagation(),l.preventDefault()}})}),U("div",{children:[v(Af,{type:"input",name:n.inputId})," = ",i]})]}))},b7=xe()({library:"shiny",name:"sliderInput",title:"Slider Input",takesChildren:!1,UiComponent:w7,settingsInfo:{inputId:{label:"Input ID",inputType:"string",defaultValue:"inputId"},label:{label:"Label text",inputType:"string",defaultValue:"Slider Input"},min:{label:"Min",inputType:"number",defaultValue:0},max:{label:"Max",inputType:"number",defaultValue:10},value:{label:"Start",inputType:"number",defaultValue:5},step:{inputType:"number",label:"Step size",defaultValue:1,optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0}},settingsFormRender:({inputs:e})=>U(Ne,{children:[e.inputId,e.label,U(qx,{label:"Values",children:[e.min,e.max,e.value,e.step]}),e.width]}),serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:m7,category:"Inputs",description:"Constructs a slider widget to select a number from a range. _(Dates and date-times not currently supported.)_"}),E7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAADSklEQVR4nO3cv0vUYQDH8c/pmWfpmV1G0uAPjAqiyYqWoK1oDKq5PdqE9qaG/ozAKWjpL4jWoKayrcWtIgqiuAYd9LQo8u3zfO39ghvux/C54y3PV9Br9fv9SLttqPQA7U+GJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlRLv0gF9ZXlkdfGg6yf0k15PMJhnd6007+JrkXZInSR4l+bD5yYe3FgtMqkO1YQ1YSvIsydHSQwaMJTm7cbuT5FqSV0UXVaIJR2EvydPUF9WgE1nfOVl6SA2aENa9JDOlR/yhuSR3S4+oQROOwhs7PTjb6+TS4mTmp8cy0RlOe7iFD/n+o5+PX7/n7dqXPH/zMWufvu30sttJHuBjKteEsLZdAV85M5Vr53p7PqQ93EpvfCS98ckszXfz+MVaXr//PPiy//eKfZMmHIUHNt+ZO9rJ1QJRDWoPtXLzwrF0x7b9bNbw22pxTQhri/ML3fCH3p/pjAzl4kK39IwqNS6s2V6n9IQtTh4/WHpClRoX1pHxkdITtpieqGtPLRoXVnuoloNw3ehI4z7CPeGn8o9qC70WhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCVHFP6zu8M0y+0Lp91Xy226qCCtJv/SAXVbL+yn2B/kehUIYlhCGJUQt11i/uxaYunzqcPf0zKGFjfuf9mLQ39i4SP6xvLL6svCUarT6/VquM7WfeBQKYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQvwEAzs9K42yqRkAAAAASUVORK5CYII=",S7=xe()({library:"shiny",name:"tabPanel",title:"Tab Panel",takesChildren:!0,UiComponent:z8,settingsInfo:{title:{label:"Title of panel",inputType:"string",defaultValue:"My Shiny App"}},iconSrc:E7,category:"Tabs",description:"Panel containing content for tab-based interfaces like navbar pages"}),Xx="data:image/png;base64,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",A7=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{var o;const i=(o=t==null?void 0:t.length)!=null?o:0;return v(Qx,W(O({path:n},r),{children:i>0?t==null?void 0:t.map((l,a)=>{var c;const s=er(n,a),u=(c=Dg(l))!=null?c:"unknown tab";return v(Gx,{title:u,children:v(bi,{path:s,node:l})},Ef(s))}):v("div",{style:{padding:"5px"},children:v("span",{children:"Empty tabset. Drag elements or Tab Panel on to add content"})})}))},x7=xe()({library:"shiny",name:"tabsetPanel",title:"Tabset Panel",takesChildren:!0,UiComponent:A7,settingsInfo:{id:{inputType:"string",label:"Id for tabset",defaultValue:"tabset-default-id",optional:!0},selected:{inputType:"dropdown",optional:!0,label:"Selected tab on load",defaultValue:e=>e?Hx(e):"First Tab",choices:e=>e?$x(e):["First Tab"]}},iconSrc:Xx,category:"Tabs",description:"A container filled with tabs"}),C7="data:image/png;base64,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",_7="_container_yicbr_1",k7={container:_7},T7=r=>{var i=r,{uiArguments:o}=i,l=o,{width:e="200px"}=l,t=ye(l,["width"]),{wrapperProps:n}=i;const a="auto",s=O({},t),[u,c]=P.useState(s.value);return P.useEffect(()=>{c(s.value)},[s.value]),U("div",W(O({className:Ke(k7.container,"shiny::textInput"),style:{height:a,width:e}},n),{children:[v("label",{htmlFor:s.inputId,children:s.label}),v("input",{id:s.inputId,type:"text",value:u,onChange:f=>c(f.target.value),placeholder:s.placeholder})]}))},I7=xe()({library:"shiny",name:"textInput",title:"Text Input",takesChildren:!1,UiComponent:T7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myTextInput"},label:{inputType:"string",label:"label",defaultValue:"Text Input"},value:{inputType:"string",label:"Starting text",defaultValue:""},placeholder:{inputType:"string",label:"Empty input placeholder",defaultValue:"placeholder text",optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:C7,category:"Inputs",description:"Create an input control for entry of unstructured text values."}),O7="data:image/png;base64,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",P7="_container_1i6yi_1",N7={container:P7},R7=({uiArguments:e,wrapperProps:t})=>U("div",W(O({className:N7.container},t),{children:["Dynamic text from ",U("code",{children:["output$",e.outputId]})]})),D7=xe()({library:"shiny",name:"textOutput",title:"Text Output",takesChildren:!1,UiComponent:R7,settingsInfo:{outputId:{label:"Output ID",inputType:"string",defaultValue:"textOutput"}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderText({ +})`}},iconSrc:_g,category:"Outputs",description:"Render a `renderPlot()` within an application page."}),s7="data:image/png;base64,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",u7="_container_sgn7c_1",v0={container:u7},c7=({uiArguments:e,wrapperProps:t})=>{const n=e.choices,r=Object.keys(n),i=Object.values(n),[o,l]=k.useState(i[0]);return k.useEffect(()=>{i.includes(o)||l(i[0])},[o,i]),U("div",W(P({className:v0.container,style:{width:e.width}},t),{children:[v("label",{children:e.label}),v("div",{children:i.map((a,s)=>v("div",{className:v0.radio,children:U("label",{children:[v("input",{type:"radio",name:e.inputId,value:a,onChange:u=>l(u.target.value),checked:a===o}),v("span",{children:r[s]})]})},a))})]}))},f7=xe()({library:"shiny",name:"radioButtons",title:"Radio Buttons",takesChildren:!1,UiComponent:c7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myRadioButtons"},label:{inputType:"string",label:"label",defaultValue:"Radio Buttons"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:s7,category:"Inputs",description:"Create a set of radio buttons used to select an item from a list."}),d7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAGcElEQVR4nO3cz28UZRzH8feKSgJcSvTmqU4PRkClJMQDt3JRgyeZop6EUH8ET+6UP4FOL0QTsA3oRXEHThLxUm4cRGNRROJhh57wSi9AAoash+cZmC5L2U3323m2/bySzbK7T9eH8d1nprNTaq1WC5F+e6bqCcjapLDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITz1Y9gUKS5e1P7QQOAHuAV4Etqz2nwN0GrgOXgB+AK+UX0ziqYk4PBRNWm1PAwaonEbgtwG5/+wI4DRyqdEYlIYb1I7APuA98jftu/DuNo9uVziowSZZvAbbhVvWPcd+ILwLvVjmvQmhhncJF9S/wThpHf1Y7nXD5b7TLwOUky78FfsJtu9MEsNqHdPD+Bm6D3EdR9cRvq7eBe8BHuG1ZqZBWrPf9/cx6iqrDDy1dKx+gp3F0NcnyWeAIblv+seLJrUBIYe3x92d6+aJarfbE1+qN5i1gCNg6PT6y2GlMq9Xq5T8XujO4sPY8baC1kHaFO/39lWVHrR+f+FsvilWq8l1hSGE9B5DG0f2qJxKAfcBX/rav2y9K4+ie/+PzFpPqRUhhibMd+B7Y4G9n/HMDJaRjrK4lWX4MOAwM1RvN4ulzwNT0+Mh8hy8Zrjeax4Ax//gicLR9bJLlQ0Dx3kveN42jTu/bby8BP7P0U4bN/rk3gZurMIe+GLgVK8nyOWASd1Be9h4wV280258HmONRVPg/z9UbzeHS+w4Dv7M0qofv61+3tAm4gIurXRHcJuM59M1AhZVk+RguigVgVxpHtenxkdr0+EgNtwoN8XgYAIvAhB+3tTT2WGnMDDDsX3s5jaNaGkc1YLbD2H7bgPuEYccyY7b7MRsM59E3A7UrTOPoIvCk8wsXcdF1WrH2F7u96fGRxXqjOQHc8OOL1WoMF+D+NI4enppI42gCmOjbX6KzL+nuIL04qP/UdjorN1BhFZIsn8StTMOlY6zlLJQfTI+PLNQbzQVgOMnyUdxKBTBfjmoVfeZva8bAheWPscaeOvDpOgVURVRr0kCFlWT5YR4dY+1P42i+OPNebzQn6e04qNhlLnZ4TlZooA7eebTLml3Jj//1RrPY/S2mcbQAFO816k85rLYTQKvL24kK5tezQQurWF3GygH4c1STy3zd2eLUgr+f8c/PAvi4zuFWrLPlUwtJls8kWd5Ksvxs//4ajzkCnO9i3Hk/NngDtSvEhTCJ2x3eSrKcLg/ex4AbbWPnganS46PAaDG27aqDRf+6lQe4KxJ+4cln2a8BH/ixwRuoFcv/xLYXd2qhbIrl/8dPtT0+B+wtX/HgV61d+FWsfax/3dId4C06n12/6V8bmKtoa6FcNpJkeQvAn5RcNzpcj7Udd2VocZb9Lu7jnL/aB3b6hYlQtmNIK9Z/AEmWV/7JfMWu4a5jf+BvB+gQVSf+OngIYGULKaziOqydy45aH4qD9M/p7qC+sM3fX+/7jHoUUliX/P2BSmcRjpP0fmqh2HaXlh21CkI6xtqJ+0ntHrA7jaOrFU9poCRZvgP4DdgIjKZxVOmVuCGtWFeAb3Ab5kKS5a9XO53BkWT5a7jLajbitmHll3eHdh7rIPAC7lP8X5MsPwl8B/yTxtGdSmcWmCTLNwOvAB/iro1/Hnc8VvnvFEJYu8LyQ/2Kfe+W/Ip91f92Q0i7wrJDuJOVx3HHXXcrnU2Y7uK2zXHctgrm322AgFYsWVtCXbFkwCksMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDEhMISEwpLTCgsMaGwxITCEhMKS0woLDGhsMSEwhITCktMKCwxobDExP/hwWjHA5DRAwAAAABJRU5ErkJggg==",p7="_container_1e5dd_1",h7={container:p7},m7=({uiArguments:e,wrapperProps:t})=>{const n=e.choices,r=e.inputId;return U("div",W(P({className:h7.container},t),{children:[v("label",{htmlFor:r,children:e.label}),v("select",{id:r,children:Object.keys(n).map((i,o)=>v("option",{value:n[i],children:i},i))})]}))},g7=xe()({library:"shiny",name:"selectInput",title:"Select Input",takesChildren:!1,UiComponent:m7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"mySelectInput"},label:{inputType:"string",label:"label",defaultValue:"Select Input"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:d7,category:"Inputs",description:"Create a select list that can be used to choose a single or multiple items from a list of values."}),y7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAES0lEQVR4nO3aP4gcZRyH8eckosWRQ4uAhaYJmCqNJmIpaGWiVl5voykV3QSSwuIscioqCNHu2rWSqIUIsdMiRkEbi2v8A4FYJUfAf7AW72xy6no32Zvvju/u84FhE5J597e5h93Mu7M0Go2QunZH3wNoPhmWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSliX98DJA2Gm7v9lbuAx4BngEeBg8AKcA34AfgS+BD4HPhtt8XWVw9NPeu8meuwdrAPeA54Fbhvwp+vAEea43ngKnAOeBf4fTYj1m0RPwofBC4D7zM5qkkOAG8Cl4DDobnmyqKFdRT4gvJONI0jzfmPdDbRnFqksA4DnwH37nGde4BP8Z1rR4sS1p3AkPJ/py6sAB8062qCpdFo1PcMrbS4wtvJy8DrHY2y3SvAG4F1/6W2K84a37FOABeBLWDU8khERbNu2xmmPbaAi4Ph5vHQa4ioLaw14AJl72m551lmZZnyej8aDDfX+h6mrZrCOg6caX59CtgPLLU4NsJzbbScY9pjP3C6ea4zg+HmifDr6URNYb3UPJ4G1ikfEW08lBnnpofD629RNmdPNb9/Mfx8nagprPEP8PxtnvdA14P8w/3h9cfeax7TIXeiprCm1dUWQ1/rj40v35dm9Hx7UlNYXzWPL9zmede7HmTG64+dbB4vzej59qSmsN5qHs9R9o/aXhX+lBnnpp/D6y8DA8rrhlv/Dv9rtW2QrnHrynARvba+euhs30O0UdM7FsBZ4GnK/VE3ep5lVm5QXu9TtUQFdd6PdaE52rqbctPegcAsv1CuOn8NrP03tX2lU81H4TS2fb+Y+q5wsH3d2n74SbV9FE7rHeDbjtf8Dni74zXnxqKE9QewSrmXvQvXgGebdTXBooQF8D3wOOX+9b24CjzRrKf/sEhhQdlkPQp8PeX53wDHqGSTsk+LFhbAj5R71k8CV1qec4Wy43+McoWpXdS43dCFPylf6m5Qbsd5knIXxEHKbSrXKQFdBj4BPmYGWwrzZK63G9SfRfwo1AwYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNSxF+9/aKLFqf7gQAAAABJRU5ErkJggg==",v7="_container_1f2js_1",w7="_sliderWrapper_1f2js_11",b7="_sliderInput_1f2js_16",Qd={container:v7,sliderWrapper:w7,sliderInput:b7},E7=({uiArguments:e,wrapperProps:t})=>{const n=P({},e),{width:r="200px"}=n,[i,o]=O.useState(n.value);return U("div",W(P({className:Ke(Qd.container,"shiny::sliderInput"),style:{width:r}},t),{children:[v("div",{children:n.label}),v("div",{className:Qd.sliderWrapper,children:v("input",{type:"range",min:n.min,max:n.max,value:i,onChange:l=>o(Number(l.target.value)),className:"slider "+Qd.sliderInput,"aria-label":"slider input","data-min":n.min,"data-max":n.max,draggable:!0,onDragStartCapture:l=>{l.stopPropagation(),l.preventDefault()}})}),U("div",{children:[v(Af,{type:"input",name:n.inputId})," = ",i]})]}))},S7=xe()({library:"shiny",name:"sliderInput",title:"Slider Input",takesChildren:!1,UiComponent:E7,settingsInfo:{inputId:{label:"Input ID",inputType:"string",defaultValue:"inputId"},label:{label:"Label text",inputType:"string",defaultValue:"Slider Input"},min:{label:"Min",inputType:"number",defaultValue:0},max:{label:"Max",inputType:"number",defaultValue:10},value:{label:"Start",inputType:"number",defaultValue:5},step:{inputType:"number",label:"Step size",defaultValue:1,optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0}},settingsFormRender:({inputs:e})=>U(Ne,{children:[e.inputId,e.label,U(qx,{label:"Values",children:[e.min,e.max,e.value,e.step]}),e.width]}),serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:y7,category:"Inputs",description:"Constructs a slider widget to select a number from a range. _(Dates and date-times not currently supported.)_"}),A7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAADSklEQVR4nO3cv0vUYQDH8c/pmWfpmV1G0uAPjAqiyYqWoK1oDKq5PdqE9qaG/ozAKWjpL4jWoKayrcWtIgqiuAYd9LQo8u3zfO39ghvux/C54y3PV9Br9fv9SLttqPQA7U+GJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlRLv0gF9ZXlkdfGg6yf0k15PMJhnd6007+JrkXZInSR4l+bD5yYe3FgtMqkO1YQ1YSvIsydHSQwaMJTm7cbuT5FqSV0UXVaIJR2EvydPUF9WgE1nfOVl6SA2aENa9JDOlR/yhuSR3S4+oQROOwhs7PTjb6+TS4mTmp8cy0RlOe7iFD/n+o5+PX7/n7dqXPH/zMWufvu30sttJHuBjKteEsLZdAV85M5Vr53p7PqQ93EpvfCS98ckszXfz+MVaXr//PPiy//eKfZMmHIUHNt+ZO9rJ1QJRDWoPtXLzwrF0x7b9bNbw22pxTQhri/ML3fCH3p/pjAzl4kK39IwqNS6s2V6n9IQtTh4/WHpClRoX1pHxkdITtpieqGtPLRoXVnuoloNw3ehI4z7CPeGn8o9qC70WhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCVHFP6zu8M0y+0Lp91Xy226qCCtJv/SAXVbL+yn2B/kehUIYlhCGJUQt11i/uxaYunzqcPf0zKGFjfuf9mLQ39i4SP6xvLL6svCUarT6/VquM7WfeBQKYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQvwEAzs9K42yqRkAAAAASUVORK5CYII=",x7=xe()({library:"shiny",name:"tabPanel",title:"Tab Panel",takesChildren:!0,UiComponent:W8,settingsInfo:{title:{label:"Title of panel",inputType:"string",defaultValue:"My Shiny App"}},iconSrc:A7,category:"Tabs",description:"Panel containing content for tab-based interfaces like navbar pages"}),Xx="data:image/png;base64,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",C7=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{var o;const i=(o=t==null?void 0:t.length)!=null?o:0;return v(Qx,W(P({path:n},r),{children:i>0?t==null?void 0:t.map((l,a)=>{var c;const s=er(n,a),u=(c=Dg(l))!=null?c:"unknown tab";return v(Gx,{title:u,children:v(bi,{path:s,node:l})},Ef(s))}):v("div",{style:{padding:"5px"},children:v("span",{children:"Empty tabset. Drag elements or Tab Panel on to add content"})})}))},_7=xe()({library:"shiny",name:"tabsetPanel",title:"Tabset Panel",takesChildren:!0,UiComponent:C7,settingsInfo:{id:{inputType:"string",label:"Id for tabset",defaultValue:"tabset-default-id",optional:!0},selected:{inputType:"dropdown",optional:!0,label:"Selected tab on load",defaultValue:e=>e?Hx(e):"First Tab",choices:e=>e?$x(e):["First Tab"]}},iconSrc:Xx,category:"Tabs",description:"A container filled with tabs"}),k7="data:image/png;base64,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",T7="_container_yicbr_1",I7={container:T7},O7=r=>{var i=r,{uiArguments:o}=i,l=o,{width:e="200px"}=l,t=ye(l,["width"]),{wrapperProps:n}=i;const a="auto",s=P({},t),[u,c]=O.useState(s.value);return O.useEffect(()=>{c(s.value)},[s.value]),U("div",W(P({className:Ke(I7.container,"shiny::textInput"),style:{height:a,width:e}},n),{children:[v("label",{htmlFor:s.inputId,children:s.label}),v("input",{id:s.inputId,type:"text",value:u,onChange:f=>c(f.target.value),placeholder:s.placeholder})]}))},P7=xe()({library:"shiny",name:"textInput",title:"Text Input",takesChildren:!1,UiComponent:O7,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myTextInput"},label:{inputType:"string",label:"label",defaultValue:"Text Input"},value:{inputType:"string",label:"Starting text",defaultValue:""},placeholder:{inputType:"string",label:"Empty input placeholder",defaultValue:"placeholder text",optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:k7,category:"Inputs",description:"Create an input control for entry of unstructured text values."}),N7="data:image/png;base64,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",R7="_container_1i6yi_1",D7={container:R7},L7=({uiArguments:e,wrapperProps:t})=>U("div",W(P({className:D7.container},t),{children:["Dynamic text from ",U("code",{children:["output$",e.outputId]})]})),F7=xe()({library:"shiny",name:"textOutput",title:"Text Output",takesChildren:!1,UiComponent:L7,settingsInfo:{outputId:{label:"Output ID",inputType:"string",defaultValue:"textOutput"}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderText({ "Hello, World" -})`}},iconSrc:O7,category:"Outputs",description:` +})`}},iconSrc:N7,category:"Outputs",description:` Render a reactive output variable as text within an application page. Usually paired with \`renderText()\`. - `}),L7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAFGElEQVR4nO3cW4iUZRzH8e9o2ZGkpKOUFylBURCUnQuLki4qtBPd1E0lkVERGh1vogIvKugiwou6S8sIKoQwKwmjugnEICLIIMospL3oIFHTxTNLtuge9P3NM/PO9wPLLLPv7P5398v7vjP7vNvpdrtITZtVewC1k2EpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDqk9QFNWr/9m/N0LgXuAi4D5wJG1ZprCHmAn8BmwFngfYM2tC2vO1Ji27bEeBrYCtwOLGNyoAA4DFgC3AJuANXXHaVabwroCeJbyPf0A3A2cStkrdwbsbRZwEnAb8HVv/lXA1c3+SOppU1j3UX5p3wLnUg4v3wN/1xxqP7rAT8A6YDHwVe/+FdUmalibwrqkd/sksKvmIDM0BjzRe//imoM0qU1hndi73VR1igOzpXc7r+oUDWrNs0LKYRDKIaa2DnA9cB0llh3AeuDT/Wz/c+92TnyyPmlTWINiHvAWcNmE+x8AXgbuZTDP+xrVpkPhIOhQ9kwToxq3Aniqf+PUY1jNuha4aoptHgJO6cMsVRlWs5ZOY5s5wJXpQWozrGYd1/B2Q8uwmvXdNLfbkRxiEBhWs9YB/0yxzS5gcx9mqcqwmrUdeH6Sj3eBlcBv/RmnHsNq3irgceCPCff/CNwMvNH3iSrwBdLmdYGngZeAJZQT9R3Ax8Cf9cbqL8PK2Q28WXuIWgyrOJnyqvj5wF/AB5RlNxMPZ5omw4LlwCvAMXvddwPlJHsZ8GWNoYbdqJ+8Pwhs4P9RjVtEOS+6vK8TtcSohtUBnuu9dSbZ7ljgPeDGfgzVJqMY1hzgNcreajoOp6xYWBmbqIVG7RxrLmWt1JIZPm428CJlVcJjlJcUJjMLuImy0uF3Ssifz/BrDrVRCms+sBE45yA+xyOUuO6iPHvcl+MpLzPsvSbrfsrlXY8y9Z98WmFUDoVnAp9wcFGNuwN4Bzh6Hx9bQDnhn7jQr0O55nEDcEQDMwy8UQjrUsov+7QGP+dS4EP+u4ADSrxbgTMmedwy4CPKNYWt1vawllOu2kmsfzqPEtJC4AJKvPOn8bjFlIsqzgrMNDDaHNZK4HXKs7qU0ylxbWZm8S7oPe6axFCDoI1hdYBnKM/iZvfh650AHHUAj5sLvAvc2ew4g6GNzwpfpfxTkGFwKOVvkotqD9K0Nu6xhiWqva2uPUDT2hjWMGvNa1xtCmus9gAN+LX2AE1pU1jbag/QgO21B2hKm8J6u/YADdhYe4CmtCmstUz/ur5B9Avle2iFNoU1RvmTyc7agxyAMcpqiN21B2lKm8IC+AI4m3KVzDYGe836Hsr/H32BMvOWSbceMp1ud6qlRdLMtW2PpQFhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUsS/YEGHz1NNdrMAAAAASUVORK5CYII=",F7="_container_1xnzo_1",M7={container:F7},B7=({uiArguments:e,wrapperProps:t})=>{const{outputId:n="shiny-ui-output"}=e;return v("div",W(O({className:M7.container},t),{children:U("div",{style:{gridArea:"1/1",placeSelf:"center"},children:["This is a a dynamic UI Output ",n,"!"]})}))},U7=xe()({library:"shiny",name:"uiOutput",title:"Dynamic UI Output",takesChildren:!1,UiComponent:B7,settingsInfo:{outputId:{label:"Output ID",inputType:"string",defaultValue:"dynamicUiOutput"}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderUI({ + `}),M7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAFGElEQVR4nO3cW4iUZRzH8e9o2ZGkpKOUFylBURCUnQuLki4qtBPd1E0lkVERGh1vogIvKugiwou6S8sIKoQwKwmjugnEICLIIMospL3oIFHTxTNLtuge9P3NM/PO9wPLLLPv7P5398v7vjP7vNvpdrtITZtVewC1k2EpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDqk9QFNWr/9m/N0LgXuAi4D5wJG1ZprCHmAn8BmwFngfYM2tC2vO1Ji27bEeBrYCtwOLGNyoAA4DFgC3AJuANXXHaVabwroCeJbyPf0A3A2cStkrdwbsbRZwEnAb8HVv/lXA1c3+SOppU1j3UX5p3wLnUg4v3wN/1xxqP7rAT8A6YDHwVe/+FdUmalibwrqkd/sksKvmIDM0BjzRe//imoM0qU1hndi73VR1igOzpXc7r+oUDWrNs0LKYRDKIaa2DnA9cB0llh3AeuDT/Wz/c+92TnyyPmlTWINiHvAWcNmE+x8AXgbuZTDP+xrVpkPhIOhQ9kwToxq3Aniqf+PUY1jNuha4aoptHgJO6cMsVRlWs5ZOY5s5wJXpQWozrGYd1/B2Q8uwmvXdNLfbkRxiEBhWs9YB/0yxzS5gcx9mqcqwmrUdeH6Sj3eBlcBv/RmnHsNq3irgceCPCff/CNwMvNH3iSrwBdLmdYGngZeAJZQT9R3Ax8Cf9cbqL8PK2Q28WXuIWgyrOJnyqvj5wF/AB5RlNxMPZ5omw4LlwCvAMXvddwPlJHsZ8GWNoYbdqJ+8Pwhs4P9RjVtEOS+6vK8TtcSohtUBnuu9dSbZ7ljgPeDGfgzVJqMY1hzgNcreajoOp6xYWBmbqIVG7RxrLmWt1JIZPm428CJlVcJjlJcUJjMLuImy0uF3Ssifz/BrDrVRCms+sBE45yA+xyOUuO6iPHvcl+MpLzPsvSbrfsrlXY8y9Z98WmFUDoVnAp9wcFGNuwN4Bzh6Hx9bQDnhn7jQr0O55nEDcEQDMwy8UQjrUsov+7QGP+dS4EP+u4ADSrxbgTMmedwy4CPKNYWt1vawllOu2kmsfzqPEtJC4AJKvPOn8bjFlIsqzgrMNDDaHNZK4HXKs7qU0ylxbWZm8S7oPe6axFCDoI1hdYBnKM/iZvfh650AHHUAj5sLvAvc2ew4g6GNzwpfpfxTkGFwKOVvkotqD9K0Nu6xhiWqva2uPUDT2hjWMGvNa1xtCmus9gAN+LX2AE1pU1jbag/QgO21B2hKm8J6u/YADdhYe4CmtCmstUz/ur5B9Avle2iFNoU1RvmTyc7agxyAMcpqiN21B2lKm8IC+AI4m3KVzDYGe836Hsr/H32BMvOWSbceMp1ud6qlRdLMtW2PpQFhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUsS/YEGHz1NNdrMAAAAASUVORK5CYII=",B7="_container_1xnzo_1",U7={container:B7},z7=({uiArguments:e,wrapperProps:t})=>{const{outputId:n="shiny-ui-output"}=e;return v("div",W(P({className:U7.container},t),{children:U("div",{style:{gridArea:"1/1",placeSelf:"center"},children:["This is a a dynamic UI Output ",n,"!"]})}))},j7=xe()({library:"shiny",name:"uiOutput",title:"Dynamic UI Output",takesChildren:!1,UiComponent:z7,settingsInfo:{outputId:{label:"Output ID",inputType:"string",defaultValue:"dynamicUiOutput"}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderUI({ h1("Hello, World") -})`}},iconSrc:L7,category:"Outputs",description:` +})`}},iconSrc:M7,category:"Outputs",description:` Render a reactive output variable as HTML within an application page. The text will be included within an HTML \`div\` tag, and is presumed to contain HTML content which should not be escaped. - `}),z7="_wrapper_bjscz_1",j7={wrapper:z7},W7=({uiArguments:{contents:e,decoration:t,size:n="default"},wrapperProps:r})=>{const i=LA[n];return v(i,W(O({className:j7.wrapper},r),{"data-decoration":t,children:e}))};function Y7(e){return"contents"in e.uiArguments&&e.uiName==="textNode"}const V7=xe()({name:"textNode",title:"Static Text",category:"Utilities",description:"Add static text to your ui for things like descriptions and headers.",takesChildren:!1,UiComponent:W7,settingsInfo:{contents:{label:"Text contents",inputType:"string",defaultValue:"Lorem Ipsum",longform:!0},decoration:{label:"Decoration",optional:!0,inputType:"radio",defaultValue:"default",choices:{default:{label:"Normal"},italic:{label:"Italic"},bold:{label:"Bold"}},optionsPerColumn:2},size:{label:"Font size",inputType:"radio",optional:!0,defaultValue:"default",choices:{default:{label:"Normal"},small:{label:"Small"},headline:{label:"Headline"},subtitle:{label:"Subtitle"}},optionsPerColumn:2}},iconSrc:sx});function $7(e){return Tt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attr:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"}}]})(e)}function H7(e){return Tt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 0 0-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L447.9 585a7.9 7.9 0 0 0-8.9-8.9z"}}]})(e)}const G7="_categoryDivider_bdwku_1",J7={categoryDivider:G7};function Q7({children:e}){return v("div",{className:J7.categoryDivider,children:e})}function K7(e){return e.replaceAll(/\(/g,`( + `}),W7="_wrapper_bjscz_1",Y7={wrapper:W7},V7=({uiArguments:{contents:e,decoration:t,size:n="default"},wrapperProps:r})=>{const i=LA[n];return v(i,W(P({className:Y7.wrapper},r),{"data-decoration":t,children:e}))};function $7(e){return"contents"in e.uiArguments&&e.uiName==="textNode"}const H7=xe()({name:"textNode",title:"Static Text",category:"Utilities",description:"Add static text to your ui for things like descriptions and headers.",takesChildren:!1,UiComponent:V7,settingsInfo:{contents:{label:"Text contents",inputType:"string",defaultValue:"Lorem Ipsum",longform:!0},decoration:{label:"Decoration",optional:!0,inputType:"radio",defaultValue:"default",choices:{default:{label:"Normal"},italic:{label:"Italic"},bold:{label:"Bold"}},optionsPerColumn:2},size:{label:"Font size",inputType:"radio",optional:!0,defaultValue:"default",choices:{default:{label:"Normal"},small:{label:"Small"},headline:{label:"Headline"},subtitle:{label:"Subtitle"}},optionsPerColumn:2}},iconSrc:sx});function G7(e){return Tt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attr:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"}}]})(e)}function J7(e){return Tt({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 0 0-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L447.9 585a7.9 7.9 0 0 0-8.9-8.9z"}}]})(e)}const Q7="_categoryDivider_bdwku_1",K7={categoryDivider:Q7};function q7({children:e}){return v("div",{className:K7.categoryDivider,children:e})}function X7(e){return e.replaceAll(/\(/g,`( `).replaceAll(/\)/g,` )`).replaceAll(/\(\s+\)/g,"()").replaceAll(/,/g,`, - `).replaceAll(/(\s+)$/g,"")}const q7=20,X7=({uiArguments:e,wrapperProps:t})=>{const n=e.text.slice(0,q7).replaceAll(/\s$/g,"")+"...";return v("div",W(O({className:"unknown-ui-function-display"},t),{children:U("div",{children:["unknown ui output: ",v("code",{children:n})]})}))};function Zx(e){return"text"in e.uiArguments&&e.uiName==="unknownUiFunction"}const Z7=xe()({name:"unknownUiFunction",title:"Unknown UI Function",takesChildren:!1,UiComponent:X7,settingsInfo:{text:{inputType:"omitted",defaultValue:"Unknown Ui Function"},explanation:{inputType:"omitted",optional:!0}},settingsFormRender:({settings:e})=>U("div",{className:"unknown-ui-function-settings",children:[v("div",{className:"SUE-SettingsInput",children:U("span",{className:"info-msg",children:[v($7,{}),"Unknown function call. Can't modify with visual editor."]})}),v(Q7,{children:v("span",{children:"Code"})}),v("div",{className:"SUE-SettingsInput",children:v("pre",{className:"code-holder",children:K7(e.text)})})]})}),qo=[u8,r7,b7,I7,w8,h8,h7,u7,o7,D7,U7,X8,S7,x7,XM,RD,uL,VD,KM,xD,fD,hD,vD,gD,i8,V7,Z7,ZT],w0=new Map(qo.map(e=>[e.uiName,e])),e9=new Set(qo.filter(e=>e.takesChildren).map(e=>e.uiName));function to(e){if(!w0.has(e))throw new Error(`Failed to find node info for requested node: ${e}`);return w0.get(e)}const eC=new Set(qo.map(({uiName:e})=>e)),t9=new Map([...qo.map(({name:e,uiName:t})=>[e,t]),...qo.map(({uiName:e})=>[e,e])]);function no(e){return"uiChildren"in e||e9.has(e.uiName)}function n9(e){let t=e.uiArguments.size;const{contents:n,decoration:r}=e.uiArguments,i=`"${n}"`,o=r?DA[r]:"",l=o?`${o}(${i})`:i;return t?`${LA[t]}(${l})`:l}function tC(e,t){const{ui_code:n,removed_namespaces:r}=nC(e,t);return{ui_code:n,library_calls:Array.from(r)}}function nC(e,t){var u,c;const{uiName:n,uiArguments:r}=e,i=new Set;if(Zx(e))return{ui_code:rC(e),removed_namespaces:i};if(Y7(e))return{ui_code:n9(e),removed_namespaces:i};let o=n;if(t.remove_namespace){const f=(u=o.match(/\w+(?=::)/))==null?void 0:u[0];f&&i.add(f),o=o.replace(/\w+::/,"")}const l=Object.entries(r).map(([f,d])=>Ba(`${f} = ${a9(d)}`));no(e)&&((c=e.uiChildren)==null||c.forEach(f=>{const d=nC(f,t);d.removed_namespaces.forEach(p=>i.add(p)),l.push(Ba(d.ui_code))}));const a=RA({fn_name:n,fn_args_list:l,max_line_length_for_multi_args:yg}),s=`,${a?pi:" "}`;return{removed_namespaces:i,ui_code:`${o}(${a?pi:""}${l.join(s)}${a?` -`:""})`}}function rC({uiArguments:e}){return e.text}function r9(e){return!(typeof e!="object"||Object.values(e).find(n=>typeof n!="string"))}function i9(e){const t=Object.keys(e).map(o=>`"${o}" = "${e[o]}"`),r=t.reduce((o,l)=>o+l.length,0)+6>yg,i=r?`,${pi}`:", ";return`list(${r?pi:""}${t.join(i)}${r?` -`:""})`}function o9(e){const t=e.map(l9);return`c(${pi}${t.join(`,${pi}`)} -)`}function l9(e){switch(typeof e){case"string":return`"${e}"`;default:return String(e)}}function a9(e){return Array.isArray(e)?o9(e):r9(e)?i9(e):typeof e=="boolean"?e?"TRUE":"FALSE":Lg(e)&&Zx(e)?rC(e):JSON.stringify(e)}function b0({ui_tree:e,libraries:t,code:n}){const{ui_code:r,library_calls:i}=tC(e,{remove_namespace:!0}),o=[...t];return i.forEach(l=>{t.includes(l)||o.push(l)}),n.replace(Xn.ui,r).replace(Xn.libraries,iC(o))}function iC(e){return e.map(t=>`library(${t})`).join(` -`)}function Fg(e,{include_info:t}){const{app_type:n,ui_tree:r}=e;switch(n){case"SINGLE-FILE":return O({app_type:n,app:b0(O({ui_tree:r},e.app))},t&&{info:e});case"MULTI-FILE":return O({app_type:n,ui:b0(O({ui_tree:r},e.ui)),server:e.server.code},t&&{info:e})}}function oC(e){const t=Tr();return P.useCallback(()=>{e!==null&&t(JA({path:e}))},[t,e])}class s9{constructor({comparisonFn:t}){this.stack=[],this.stepsBack=0,this.lastRequested=null,this.isSameFn=t}isEntryFromHistory(t){return this.lastRequested?this.isSameFn(t,this.lastRequested):!1}lastEntry(){return this.stack[this.stack.length-1]}isDuplicateOfLastEntry(t){return this.isSameFn(t,this.lastEntry())}startNewHistoryBranch(){this.stack=this.stack.slice(0,-this.stepsBack),this.stepsBack=0}addEntry(t){this.isEntryFromHistory(t)||this.isDuplicateOfLastEntry(t)||(this.stepsBack>0&&this.startNewHistoryBranch(),this.stack=[...this.stack,t])}canGoBackwards(){return this.stack.length===1?!1:this.stack.length-this.stepsBack>1}canGoForwards(){return this.stepsBack>0}getEntryFromHistory(t){this.stepsBack-=t;const n=this.stack.length,r=n-this.stepsBack-1;if(r<0)throw new Error("Requested history entry too far backwards.");if(r>n)throw new Error(`Not enough entries in history to go ${t} steps forward`);return this.lastRequested=this.stack[r],this.lastRequested}goBackwards(){if(!this.canGoBackwards())throw new Error("Can't go backwards. At first entry in history");return this.getEntryFromHistory(-1)}goForwards(){if(!this.canGoForwards())throw new Error("Can't go forwards. At latest entry in history");return this.getEntryFromHistory(1)}}function u9(e){const t=Tr(),[n,r]=k.useState(!1),[i,o]=k.useState(!1),l=k.useRef(new s9({comparisonFn:c9}));k.useEffect(()=>{if(!e||e.mode==="LOADING")return;const c=l.current;c.addEntry(e),o(c.canGoBackwards()),r(c.canGoForwards())},[e]);const a=k.useCallback(c=>{t(QA({state:c}))},[t]),s=k.useCallback(()=>{try{a(l.current.goBackwards())}catch(c){}},[a]),u=k.useCallback(()=>{try{a(l.current.goForwards())}catch(c){}},[a]);return{goBackward:s,goForward:u,canGoBackward:i,canGoForward:n}}function c9(e,t){return typeof t=="undefined"?!1:t.mode==="LOADING"&&e.mode==="LOADING"?!0:t.mode==="TEMPLATE_CHOOSER"&&e.mode==="TEMPLATE_CHOOSER"?JSON.stringify(t.options)===JSON.stringify(e.options):e.mode==="MAIN"&&t.mode==="MAIN"?t.ui_tree===e.ui_tree:!1}function lC(){return/mac/i.test(window.navigator.platform)}function f9(e){const t=P.useCallback(n=>{!(n.target instanceof Element)||n.target.tagName!=="BODY"||(e.filter(r=>d9(n,r)).forEach(({onPress:r})=>r()),n.defaultPrevented||n.stopPropagation())},[e]);P.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}),[t])}function d9(e,t){return e.key===t.key&&t.withCmdCtrl===(lC()?e.metaKey:e.ctrlKey)&&t.withShift===e.shiftKey}function p9(){const{sendMsg:e,incomingMsgs:t}=Ja(),n=KA(),r=rs(),i=Tr(),o=u9(n),l=oC(r);f9([{key:"z",withCmdCtrl:!0,withShift:!1,onPress:o.goBackward},{key:"z",withCmdCtrl:!0,withShift:!0,onPress:o.goForward},{key:"Backspace",onPress:l,withCmdCtrl:!1,withShift:!1}]),P.useEffect(()=>{const s=t.subscribe("APP-INFO",f=>{i(J5(f))}),u=t.subscribe("TEMPLATE_CHOOSER",f=>{i(K5({outputChoices:f}))}),c=t.subscribe("BACKEND-ERROR",f=>i(Q5(f)));return e({path:"READY-FOR-STATE"}),()=>{s.unsubscribe(),u.unsubscribe(),c.unsubscribe()}},[t,i,e]);const a=P.useMemo(()=>vE(e,500,!0),[e]);return P.useEffect(()=>{if(!(n.mode==="LOADING"||n.mode==="ERROR")){if(n.mode==="TEMPLATE_CHOOSER"){e({path:"ENTERED-TEMPLATE-SELECTOR"});return}a({path:"UPDATED-APP",payload:Fg(n,{include_info:!1})})}},[n,a,e]),{state:n,history:o}}const h9="_EditorContainer_1p1tb_1",m9={EditorContainer:h9};function aC(e){return Tt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z"}}]})(e)}const g9="_appViewerHolder_zkojo_1",y9="_title_zkojo_55",v9="_appContainer_zkojo_89",w9="_previewFrame_zkojo_109",b9="_expandButton_zkojo_134",E9="_reloadButtonContainer_zkojo_135",S9="_reloadButton_zkojo_135",A9="_spin_zkojo_174",x9="_restartButton_zkojo_211",C9="_loadingMessage_zkojo_238",_9="_error_zkojo_249",$t={appViewerHolder:g9,title:y9,appContainer:v9,previewFrame:w9,expandButton:b9,reloadButtonContainer:E9,reloadButton:S9,spin:A9,restartButton:x9,loadingMessage:C9,error:_9};function k9(e){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"}}]})(e)}function T9(e){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"}}]})(e)}function I9(e){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"circle",attr:{cx:"8",cy:"8",r:"8"}}]})(e)}function O9(e){return Tt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",stroke:"#000",strokeWidth:"2",d:"M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M5,5 L19,19"}}]})(e)}const P9="_logs_xjp5l_2",N9="_logsContents_xjp5l_25",R9="_expandTab_xjp5l_29",D9="_clearLogsButton_xjp5l_69",L9="_logLine_xjp5l_75",F9="_noLogsMsg_xjp5l_81",M9="_expandedLogs_xjp5l_93",B9="_expandLogsButton_xjp5l_101",U9="_unseenLogsNotification_xjp5l_108",z9="_slidein_xjp5l_1",Ci={logs:P9,logsContents:N9,expandTab:R9,clearLogsButton:D9,logLine:L9,noLogsMsg:F9,expandedLogs:M9,expandLogsButton:B9,unseenLogsNotification:U9,slidein:z9};function j9({appLogs:e,clearLogs:t}){const{logsExpanded:n,toggleLogExpansion:r,unseenLogs:i}=W9(e),o=e.length===0;return U("div",{className:Ci.logs,"data-expanded":n,children:[U("button",{className:Ci.expandTab,title:n?"hide logs":"show logs",onClick:r,children:[v(I9,{className:Ci.unseenLogsNotification,"data-show":i}),"App Logs",n?v(k9,{}):v(T9,{})]}),U("div",{className:Ci.logsContents,children:[o?v("p",{className:Ci.noLogsMsg,children:"No recent logs"}):e.map((l,a)=>v("p",{className:Ci.logLine,children:l},a)),o?null:v(rt,{variant:"icon",title:"clear logs",className:Ci.clearLogsButton,onClick:t,children:v(O9,{})})]})]})}function W9(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),[o,l]=k.useState(null),[a,s]=k.useState(new Date),u=k.useCallback(()=>{if(t){n(!1),l(new Date);return}n(!0),i(!1)},[t]);return k.useEffect(()=>{s(new Date)},[e]),k.useEffect(()=>{if(t||e.length===0){i(!1);return}if(o===null||o{if(!o.current||typeof t=="undefined")return;const l=o.current;function a(s){s.target===l&&(t==null||t())}l.addEventListener("click",a);try{l.showModal()}catch(s){}return()=>{l.removeEventListener("click",a)}},[t]),v("dialog",W(O({},n),{ref:o,onClose:t,children:e}))}const V9="_show_btn_83j0t_1",$9="_modal_83j0t_5",H9="_title_83j0t_18",G9="_description_83j0t_22",J9="_code_holder_83j0t_26",Q9="_footer_83j0t_43",zn={show_btn:V9,modal:$9,title:H9,description:G9,code_holder:J9,footer:Q9};function K9({info:e}){const t=Fg(e,{include_info:!1});return t.app_type==="SINGLE-FILE"?U(Ne,{children:[v("h2",{className:zn.title,children:"App script"}),U("p",{className:zn.description,children:["The following code defines the currently being edited app. Copy and paste it to an ",v("code",{children:"app.R"})," file to use."]}),U("div",{className:zn.code_holder,children:[v("label",{children:"app.R"}),v("pre",{children:t.app})]})]}):U(Ne,{children:[v("h2",{className:zn.title,children:"App scripts"}),U("p",{className:zn.description,children:["The following code defines the currently being edited app. Copy and paste the ui and server scripts into ",v("code",{children:"ui.R"})," and"," ",v("code",{children:"server.R"})," files to use."]}),U("div",{className:zn.code_holder,children:[v("label",{children:"ui.R"}),v("pre",{children:t.ui})]}),U("div",{className:zn.code_holder,children:[v("label",{children:"server.R"}),v("pre",{children:t.server})]})]})}function q9(){const[e,t]=k.useState(!1),r=Gm().getState().app_info;return r.mode!=="MAIN"?null:U(Ne,{children:[v(fl,{className:$t.title,children:"Code"}),v(Ir,{className:zn.show_btn,text:"See current application code",position:"left",onClick:()=>t(i=>!i),variant:"regular",children:"Get app script"}),e?v(Y9,{className:zn.modal,title:"App Script",onClose:()=>t(!1),children:U("form",{method:"dialog",children:[v(K9,{info:r}),v("div",{className:zn.footer,children:v(rt,{type:"submit",children:"Okay"})})]})}):null]})}function X9(){const{sendMsg:e,incomingMsgs:t}=Ja(),[n,r]=k.useState("HIDDEN"),[i,o]=k.useState([]),[l,a]=k.useState(null);k.useEffect(()=>{const p=t.subscribe("APP-PREVIEW-STATUS",E=>{a(null),r(E)}),h=t.subscribe("APP-PREVIEW-LOGS",E=>{o(Z9(E))}),m=t.subscribe("APP-PREVIEW-CRASH",E=>{a(E)});return e({path:"APP-PREVIEW-REQUEST"}),u(()=>()=>e({path:"APP-PREVIEW-RESTART"})),f(()=>()=>e({path:"APP-PREVIEW-STOP"})),()=>{p.unsubscribe(),h.unsubscribe(),m.unsubscribe()}},[t,e]);const[s,u]=k.useState(()=>()=>console.warn("No app running to reset")),[c,f]=k.useState(()=>()=>console.warn("No app running to stop")),d=k.useCallback(()=>{o([])},[]);return{appLogs:i,clearLogs:d,restartApp:s,stopApp:c,appLoc:n,errors:l}}function Z9(e){return Array.isArray(e)?e:[e]}function eB(){const e=tB();return nB(e.width)}function tB(){const[e,t]=k.useState(E0()),n=k.useMemo(()=>vE(()=>{t(E0())},500),[]);return k.useEffect(()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[n]),e}function nB(e){const t=PE-sC*2,n=e-uC*2;return t/n}function E0(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}const sC=16,uC=55;function rB(){const e=k.useRef(null),[t,n]=k.useState(!1),r=k.useCallback(()=>{n(d=>!d)},[]),{appLoc:i,errors:o,appLogs:l,clearLogs:a,restartApp:s}=X9(),u=eB(),c=k.useCallback(d=>{lB(d.currentTarget),!(!e.current||typeof i=="string")&&(d.metaKey?s():e.current.src=i.url)},[i,s]);if(i==="HIDDEN")return v(q9,{});const f=({isExpandedMode:d})=>v("div",{className:$t.reloadButtonContainer,children:v(Ir,{text:`Reload app session (hold ${aB()} to restart app server also)`,className:$t.reloadButton,onClick:c,position:d?"right":"up-right",children:v(aC,{})})});return U(Ne,{children:[U(fl,{className:$t.title,children:[v(f,{isExpandedMode:!1}),"App Preview"]}),v("div",{className:$t.appViewerHolder,"data-expanded":t,style:{"--app-scale-amnt":u,"--preview-inset-horizontal":`${sC}px`,"--expanded-inset-horizontal":`${uC}px`},children:o!==null?v(iB,{onClick:s}):U(Ne,{children:[v(f,{isExpandedMode:!0}),U("div",{className:$t.appContainer,children:[i==="LOADING"?v(oB,{}):v("iframe",{className:$t.previewFrame,src:i.url,title:"Application Preview",ref:e}),v(rt,{variant:"icon",className:$t.expandButton,title:t?"Shrink app preview":"Expand app preview",onClick:r,children:t?v(H7,{}):v(LL,{})})]}),v(j9,{appLogs:l,clearLogs:a})]})})]})}function iB({onClick:e}){return U("div",{className:$t.appContainer,children:[U("p",{children:["App preview crashed.",v("br",{})," Try and restart?"]}),U(rt,{className:$t.restartButton,title:"Restart app preview",onClick:e,children:["Restart app preview ",v(aC,{})]})]})}function oB(){return v("div",{className:$t.loadingMessage,children:v("h2",{children:"Loading app preview..."})})}function lB(e){const t=e.querySelector("svg");t==null||t.classList.add($t.spin),e.addEventListener("animationend",()=>t==null?void 0:t.classList.remove($t.spin),!1)}function aB(){return lC()?"⌘":"Alt"}function cC({main:e,properties:t,preview:n,left:r}){return v(Ne,{children:U("div",{className:ar.EditorSkeleton,children:[v("div",{className:Ke(ar.elements_panel,ar.panel),children:r}),v("div",{className:ar.app_view,children:e}),v("div",{className:Ke(ar.properties_panel,ar.panel),children:t}),v("div",{className:Ke(ar.app_preview,ar.panel),children:n})]})})}const sB={uiName:"gridlayout::grid_page",uiArguments:{row_sizes:["70px","1fr","1fr"],col_sizes:["250px","1fr"],gap_size:"1rem",layout:["header header","sidebar linePlots","dists dists"]},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"sidebar"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"numChicks",label:"Number of Chicks",min:1,max:15,value:5,width:"100%",step:1}},{uiName:"shiny::radioButtons",uiArguments:{inputId:"distFacet",label:"Facet Distribution By",choices:{"Diet Type":"Diet","Measure Time":"Time"}}}]}]},{uiName:"gridlayout::grid_card_text",uiArguments:{area:"header",content:"Chick Weights",alignment:"center",is_title:!1}},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"dists"}},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"linePlots"}}]},uB={title:"Chick Weights Grid",description:"Plots investigating the ChickWeights built-in dataset",uiTree:sB,otherCode:{serverLibraries:["ggplot2"],serverFunctionBody:` + `).replaceAll(/(\s+)$/g,"")}const Z7=20,e9=({uiArguments:e,wrapperProps:t})=>{const n=e.text.slice(0,Z7).replaceAll(/\s$/g,"")+"...";return v("div",W(P({className:"unknown-ui-function-display"},t),{children:U("div",{children:["unknown ui output: ",v("code",{children:n})]})}))};function Zx(e){return"text"in e.uiArguments&&e.uiName==="unknownUiFunction"}const t9=xe()({name:"unknownUiFunction",title:"Unknown UI Function",takesChildren:!1,UiComponent:e9,settingsInfo:{text:{inputType:"omitted",defaultValue:"Unknown Ui Function"},explanation:{inputType:"omitted",optional:!0}},settingsFormRender:({settings:e})=>U("div",{className:"unknown-ui-function-settings",children:[v("div",{className:"SUE-SettingsInput",children:U("span",{className:"info-msg",children:[v(G7,{}),"Unknown function call. Can't modify with visual editor."]})}),v(q7,{children:v("span",{children:"Code"})}),v("div",{className:"SUE-SettingsInput",children:v("pre",{className:"code-holder",children:X7(e.text)})})]})}),qo=[f8,o7,S7,P7,E8,g8,g7,f7,a7,F7,j7,e7,x7,_7,e8,DD,cL,$D,XM,xD,fD,hD,vD,gD,l8,H7,t9,ZT],w0=new Map(qo.map(e=>[e.uiName,e])),n9=new Set(qo.filter(e=>e.takesChildren).map(e=>e.uiName));function to(e){if(!w0.has(e))throw new Error(`Failed to find node info for requested node: ${e}`);return w0.get(e)}const eC=new Set(qo.map(({uiName:e})=>e)),r9=new Map([...qo.map(({name:e,uiName:t})=>[e,t]),...qo.map(({uiName:e})=>[e,e])]);function no(e){return"uiChildren"in e||n9.has(e.uiName)}function i9(e){let t=e.uiArguments.size;const{contents:n,decoration:r}=e.uiArguments,i=`"${n}"`,o=r?DA[r]:"",l=o?`${o}(${i})`:i;return t?`${LA[t]}(${l})`:l}function tC(e,t){const{ui_code:n,removed_namespaces:r}=nC(e,t);return{ui_code:n,library_calls:Array.from(r)}}function nC(e,t){var u,c;const{uiName:n,uiArguments:r}=e,i=new Set;if(Zx(e))return{ui_code:rC(e),removed_namespaces:i};if($7(e))return{ui_code:i9(e),removed_namespaces:i};let o=n;if(t.remove_namespace){const f=(u=o.match(/\w+(?=::)/))==null?void 0:u[0];f&&i.add(f),o=o.replace(/\w+::/,"")}const l=Object.entries(r).map(([f,d])=>Ba(`${f} = ${u9(d)}`));no(e)&&((c=e.uiChildren)==null||c.forEach(f=>{const d=nC(f,t);d.removed_namespaces.forEach(p=>i.add(p)),l.push(Ba(d.ui_code))}));const a=RA({fn_name:n,fn_args_list:l,max_line_length_for_multi_args:gg}),s=`,${a?pi:" "}`;return{removed_namespaces:i,ui_code:`${o}(${a?pi:""}${l.join(s)}${a?` +`:""})`}}function rC({uiArguments:e}){return e.text}function o9(e){return!(typeof e!="object"||Object.values(e).find(n=>typeof n!="string"))}function l9(e){const t=Object.keys(e).map(o=>`"${o}" = "${e[o]}"`),r=t.reduce((o,l)=>o+l.length,0)+6>gg,i=r?`,${pi}`:", ";return`list(${r?pi:""}${t.join(i)}${r?` +`:""})`}function a9(e){const t=e.map(s9);return`c(${pi}${t.join(`,${pi}`)} +)`}function s9(e){switch(typeof e){case"string":return`"${e}"`;default:return String(e)}}function u9(e){return Array.isArray(e)?a9(e):o9(e)?l9(e):typeof e=="boolean"?e?"TRUE":"FALSE":Lg(e)&&Zx(e)?rC(e):JSON.stringify(e)}function b0({ui_tree:e,libraries:t,code:n}){const{ui_code:r,library_calls:i}=tC(e,{remove_namespace:!0}),o=[...t];return i.forEach(l=>{t.includes(l)||o.push(l)}),n.replace(Xn.ui,r).replace(Xn.libraries,iC(o))}function iC(e){return e.map(t=>`library(${t})`).join(` +`)}function Fg(e,{include_info:t}){const{app_type:n,ui_tree:r}=e;switch(n){case"SINGLE-FILE":return P({app_type:n,app:b0(P({ui_tree:r},e.app))},t&&{info:e});case"MULTI-FILE":return P({app_type:n,ui:b0(P({ui_tree:r},e.ui)),server:e.server.code},t&&{info:e})}}function oC(e){const t=Tr();return O.useCallback(()=>{e!==null&&t(JA({path:e}))},[t,e])}class c9{constructor({comparisonFn:t}){this.stack=[],this.stepsBack=0,this.lastRequested=null,this.isSameFn=t}isEntryFromHistory(t){return this.lastRequested?this.isSameFn(t,this.lastRequested):!1}lastEntry(){return this.stack[this.stack.length-1]}isDuplicateOfLastEntry(t){return this.isSameFn(t,this.lastEntry())}startNewHistoryBranch(){this.stack=this.stack.slice(0,-this.stepsBack),this.stepsBack=0}addEntry(t){this.isEntryFromHistory(t)||this.isDuplicateOfLastEntry(t)||(this.stepsBack>0&&this.startNewHistoryBranch(),this.stack=[...this.stack,t])}canGoBackwards(){return this.stack.length===1?!1:this.stack.length-this.stepsBack>1}canGoForwards(){return this.stepsBack>0}getEntryFromHistory(t){this.stepsBack-=t;const n=this.stack.length,r=n-this.stepsBack-1;if(r<0)throw new Error("Requested history entry too far backwards.");if(r>n)throw new Error(`Not enough entries in history to go ${t} steps forward`);return this.lastRequested=this.stack[r],this.lastRequested}goBackwards(){if(!this.canGoBackwards())throw new Error("Can't go backwards. At first entry in history");return this.getEntryFromHistory(-1)}goForwards(){if(!this.canGoForwards())throw new Error("Can't go forwards. At latest entry in history");return this.getEntryFromHistory(1)}}function f9(e){const t=Tr(),[n,r]=k.useState(!1),[i,o]=k.useState(!1),l=k.useRef(new c9({comparisonFn:d9}));k.useEffect(()=>{if(!e||e.mode==="LOADING")return;const c=l.current;c.addEntry(e),o(c.canGoBackwards()),r(c.canGoForwards())},[e]);const a=k.useCallback(c=>{t(QA({state:c}))},[t]),s=k.useCallback(()=>{try{a(l.current.goBackwards())}catch(c){}},[a]),u=k.useCallback(()=>{try{a(l.current.goForwards())}catch(c){}},[a]);return{goBackward:s,goForward:u,canGoBackward:i,canGoForward:n}}function d9(e,t){return typeof t=="undefined"?!1:t.mode==="LOADING"&&e.mode==="LOADING"?!0:t.mode==="TEMPLATE_CHOOSER"&&e.mode==="TEMPLATE_CHOOSER"?JSON.stringify(t.options)===JSON.stringify(e.options):e.mode==="MAIN"&&t.mode==="MAIN"?t.ui_tree===e.ui_tree:!1}function lC(){return/mac/i.test(window.navigator.platform)}function p9(e){const t=O.useCallback(n=>{!(n.target instanceof Element)||n.target.tagName!=="BODY"||(e.filter(r=>h9(n,r)).forEach(({onPress:r})=>r()),n.defaultPrevented||n.stopPropagation())},[e]);O.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}),[t])}function h9(e,t){return e.key===t.key&&t.withCmdCtrl===(lC()?e.metaKey:e.ctrlKey)&&t.withShift===e.shiftKey}function m9(){const{sendMsg:e,incomingMsgs:t}=Ja(),n=KA(),r=rs(),i=Tr(),o=f9(n),l=oC(r);p9([{key:"z",withCmdCtrl:!0,withShift:!1,onPress:o.goBackward},{key:"z",withCmdCtrl:!0,withShift:!0,onPress:o.goForward},{key:"Backspace",onPress:l,withCmdCtrl:!1,withShift:!1}]),O.useEffect(()=>{const s=t.subscribe("APP-INFO",f=>{i(J5(f))}),u=t.subscribe("TEMPLATE_CHOOSER",f=>{i(K5({outputChoices:f}))}),c=t.subscribe("BACKEND-ERROR",f=>i(Q5(f)));return e({path:"READY-FOR-STATE"}),()=>{s.unsubscribe(),u.unsubscribe(),c.unsubscribe()}},[t,i,e]);const a=O.useMemo(()=>vE(e,500,!0),[e]);return O.useEffect(()=>{if(!(n.mode==="LOADING"||n.mode==="ERROR")){if(n.mode==="TEMPLATE_CHOOSER"){e({path:"ENTERED-TEMPLATE-SELECTOR"});return}a({path:"UPDATED-APP",payload:Fg(n,{include_info:!1})})}},[n,a,e]),{state:n,history:o}}const g9="_EditorContainer_1p1tb_1",y9={EditorContainer:g9};function aC(e){return Tt({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z"}}]})(e)}const v9="_appViewerHolder_zkojo_1",w9="_title_zkojo_55",b9="_appContainer_zkojo_89",E9="_previewFrame_zkojo_109",S9="_expandButton_zkojo_134",A9="_reloadButtonContainer_zkojo_135",x9="_reloadButton_zkojo_135",C9="_spin_zkojo_174",_9="_restartButton_zkojo_211",k9="_loadingMessage_zkojo_238",T9="_error_zkojo_249",$t={appViewerHolder:v9,title:w9,appContainer:b9,previewFrame:E9,expandButton:S9,reloadButtonContainer:A9,reloadButton:x9,spin:C9,restartButton:_9,loadingMessage:k9,error:T9};function I9(e){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"}}]})(e)}function O9(e){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"}}]})(e)}function P9(e){return Tt({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"circle",attr:{cx:"8",cy:"8",r:"8"}}]})(e)}function N9(e){return Tt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",stroke:"#000",strokeWidth:"2",d:"M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M5,5 L19,19"}}]})(e)}const R9="_logs_xjp5l_2",D9="_logsContents_xjp5l_25",L9="_expandTab_xjp5l_29",F9="_clearLogsButton_xjp5l_69",M9="_logLine_xjp5l_75",B9="_noLogsMsg_xjp5l_81",U9="_expandedLogs_xjp5l_93",z9="_expandLogsButton_xjp5l_101",j9="_unseenLogsNotification_xjp5l_108",W9="_slidein_xjp5l_1",Ci={logs:R9,logsContents:D9,expandTab:L9,clearLogsButton:F9,logLine:M9,noLogsMsg:B9,expandedLogs:U9,expandLogsButton:z9,unseenLogsNotification:j9,slidein:W9};function Y9({appLogs:e,clearLogs:t}){const{logsExpanded:n,toggleLogExpansion:r,unseenLogs:i}=V9(e),o=e.length===0;return U("div",{className:Ci.logs,"data-expanded":n,children:[U("button",{className:Ci.expandTab,title:n?"hide logs":"show logs",onClick:r,children:[v(P9,{className:Ci.unseenLogsNotification,"data-show":i}),"App Logs",n?v(I9,{}):v(O9,{})]}),U("div",{className:Ci.logsContents,children:[o?v("p",{className:Ci.noLogsMsg,children:"No recent logs"}):e.map((l,a)=>v("p",{className:Ci.logLine,children:l},a)),o?null:v(rt,{variant:"icon",title:"clear logs",className:Ci.clearLogsButton,onClick:t,children:v(N9,{})})]})]})}function V9(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),[o,l]=k.useState(null),[a,s]=k.useState(new Date),u=k.useCallback(()=>{if(t){n(!1),l(new Date);return}n(!0),i(!1)},[t]);return k.useEffect(()=>{s(new Date)},[e]),k.useEffect(()=>{if(t||e.length===0){i(!1);return}if(o===null||o{if(!o.current||typeof t=="undefined")return;const l=o.current;function a(s){s.target===l&&(t==null||t())}l.addEventListener("click",a);try{l.showModal()}catch(s){}return()=>{l.removeEventListener("click",a)}},[t]),v("dialog",W(P({},n),{ref:o,onClose:t,children:e}))}const H9="_show_btn_83j0t_1",G9="_modal_83j0t_5",J9="_title_83j0t_18",Q9="_description_83j0t_22",K9="_code_holder_83j0t_26",q9="_footer_83j0t_43",zn={show_btn:H9,modal:G9,title:J9,description:Q9,code_holder:K9,footer:q9};function X9({info:e}){const t=Fg(e,{include_info:!1});return t.app_type==="SINGLE-FILE"?U(Ne,{children:[v("h2",{className:zn.title,children:"App script"}),U("p",{className:zn.description,children:["The following code defines the currently being edited app. Copy and paste it to an ",v("code",{children:"app.R"})," file to use."]}),U("div",{className:zn.code_holder,children:[v("label",{children:"app.R"}),v("pre",{children:t.app})]})]}):U(Ne,{children:[v("h2",{className:zn.title,children:"App scripts"}),U("p",{className:zn.description,children:["The following code defines the currently being edited app. Copy and paste the ui and server scripts into ",v("code",{children:"ui.R"})," and"," ",v("code",{children:"server.R"})," files to use."]}),U("div",{className:zn.code_holder,children:[v("label",{children:"ui.R"}),v("pre",{children:t.ui})]}),U("div",{className:zn.code_holder,children:[v("label",{children:"server.R"}),v("pre",{children:t.server})]})]})}function Z9(){const[e,t]=k.useState(!1),r=Hm().getState().app_info;return r.mode!=="MAIN"?null:U(Ne,{children:[v(fl,{className:$t.title,children:"Code"}),v(Ir,{className:zn.show_btn,text:"See current application code",position:"left",onClick:()=>t(i=>!i),variant:"regular",children:"Get app script"}),e?v($9,{className:zn.modal,title:"App Script",onClose:()=>t(!1),children:U("form",{method:"dialog",children:[v(X9,{info:r}),v("div",{className:zn.footer,children:v(rt,{type:"submit",children:"Okay"})})]})}):null]})}function eB(){const{sendMsg:e,incomingMsgs:t}=Ja(),[n,r]=k.useState("HIDDEN"),[i,o]=k.useState([]),[l,a]=k.useState(null);k.useEffect(()=>{const p=t.subscribe("APP-PREVIEW-STATUS",E=>{a(null),r(E)}),h=t.subscribe("APP-PREVIEW-LOGS",E=>{o(tB(E))}),m=t.subscribe("APP-PREVIEW-CRASH",E=>{a(E)});return e({path:"APP-PREVIEW-REQUEST"}),u(()=>()=>e({path:"APP-PREVIEW-RESTART"})),f(()=>()=>e({path:"APP-PREVIEW-STOP"})),()=>{p.unsubscribe(),h.unsubscribe(),m.unsubscribe()}},[t,e]);const[s,u]=k.useState(()=>()=>console.warn("No app running to reset")),[c,f]=k.useState(()=>()=>console.warn("No app running to stop")),d=k.useCallback(()=>{o([])},[]);return{appLogs:i,clearLogs:d,restartApp:s,stopApp:c,appLoc:n,errors:l}}function tB(e){return Array.isArray(e)?e:[e]}function nB(){const e=rB();return iB(e.width)}function rB(){const[e,t]=k.useState(E0()),n=k.useMemo(()=>vE(()=>{t(E0())},500),[]);return k.useEffect(()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[n]),e}function iB(e){const t=PE-sC*2,n=e-uC*2;return t/n}function E0(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}const sC=16,uC=55;function oB(){const e=k.useRef(null),[t,n]=k.useState(!1),r=k.useCallback(()=>{n(d=>!d)},[]),{appLoc:i,errors:o,appLogs:l,clearLogs:a,restartApp:s}=eB(),u=nB(),c=k.useCallback(d=>{sB(d.currentTarget),!(!e.current||typeof i=="string")&&(d.metaKey?s():e.current.src=i.url)},[i,s]);if(i==="HIDDEN")return v(Z9,{});const f=({isExpandedMode:d})=>v("div",{className:$t.reloadButtonContainer,children:v(Ir,{text:`Reload app session (hold ${uB()} to restart app server also)`,className:$t.reloadButton,onClick:c,position:d?"right":"up-right",children:v(aC,{})})});return U(Ne,{children:[U(fl,{className:$t.title,children:[v(f,{isExpandedMode:!1}),"App Preview"]}),v("div",{className:$t.appViewerHolder,"data-expanded":t,style:{"--app-scale-amnt":u,"--preview-inset-horizontal":`${sC}px`,"--expanded-inset-horizontal":`${uC}px`},children:o!==null?v(lB,{onClick:s}):U(Ne,{children:[v(f,{isExpandedMode:!0}),U("div",{className:$t.appContainer,children:[i==="LOADING"?v(aB,{}):v("iframe",{className:$t.previewFrame,src:i.url,title:"Application Preview",ref:e}),v(rt,{variant:"icon",className:$t.expandButton,title:t?"Shrink app preview":"Expand app preview",onClick:r,children:t?v(J7,{}):v(ML,{})})]}),v(Y9,{appLogs:l,clearLogs:a})]})})]})}function lB({onClick:e}){return U("div",{className:$t.appContainer,children:[U("p",{children:["App preview crashed.",v("br",{})," Try and restart?"]}),U(rt,{className:$t.restartButton,title:"Restart app preview",onClick:e,children:["Restart app preview ",v(aC,{})]})]})}function aB(){return v("div",{className:$t.loadingMessage,children:v("h2",{children:"Loading app preview..."})})}function sB(e){const t=e.querySelector("svg");t==null||t.classList.add($t.spin),e.addEventListener("animationend",()=>t==null?void 0:t.classList.remove($t.spin),!1)}function uB(){return lC()?"⌘":"Alt"}function cC({main:e,properties:t,preview:n,left:r}){return v(Ne,{children:U("div",{className:ar.EditorSkeleton,children:[v("div",{className:Ke(ar.elements_panel,ar.panel),children:r}),v("div",{className:ar.app_view,children:e}),v("div",{className:Ke(ar.properties_panel,ar.panel),children:t}),v("div",{className:Ke(ar.app_preview,ar.panel),children:n})]})})}const cB={uiName:"gridlayout::grid_page",uiArguments:{row_sizes:["70px","1fr","1fr"],col_sizes:["250px","1fr"],gap_size:"1rem",layout:["header header","sidebar linePlots","dists dists"]},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"sidebar"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"numChicks",label:"Number of Chicks",min:1,max:15,value:5,width:"100%",step:1}},{uiName:"shiny::radioButtons",uiArguments:{inputId:"distFacet",label:"Facet Distribution By",choices:{"Diet Type":"Diet","Measure Time":"Time"}}}]}]},{uiName:"gridlayout::grid_card_text",uiArguments:{area:"header",content:"Chick Weights",alignment:"center",is_title:!1}},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"dists"}},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"linePlots"}}]},fB={title:"Chick Weights Grid",description:"Plots investigating the ChickWeights built-in dataset",uiTree:cB,otherCode:{serverLibraries:["ggplot2"],serverFunctionBody:` output$linePlots <- renderPlot({ obs_to_include <- as.integer(ChickWeight$Chick) <= input$numChicks chicks <- ChickWeight[obs_to_include, ] @@ -190,7 +190,7 @@ output$dists <- renderPlot({ facet_wrap(input$distFacet) + geom_density(fill = "#fa551b", color = "#ee6331") + ggtitle("Distribution of weights by diet") -})`}},cB={uiName:"shiny::navbarPage",uiArguments:{title:"Chick Weights",selected:"Line Plots",collapsible:!0,theme:{uiName:"unknownUiFunction",uiArguments:{text:"bslib::bs_theme()"}}},uiChildren:[{uiName:"shiny::tabPanel",uiArguments:{title:"Line Plots"},uiChildren:[{uiName:"gridlayout::grid_container",uiArguments:{row_sizes:["1fr"],col_sizes:["250px","1fr"],gap_size:"10px",layout:["num_chicks linePlots"]},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"num_chicks"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"numChicks",label:"Number of chicks",min:1,max:15,value:5,step:1,width:"100%"}}]}]},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"linePlots"}}]}]},{uiName:"shiny::tabPanel",uiArguments:{title:"Distributions"},uiChildren:[{uiName:"gridlayout::grid_container",uiArguments:{row_sizes:["165px","1fr"],col_sizes:["1fr"],gap_size:"10px",layout:["facetOption","dists"]},uiChildren:[{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"dists"}},{uiName:"gridlayout::grid_card",uiArguments:{area:"facetOption"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Distribution Plot Options"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::radioButtons",uiArguments:{inputId:"distFacet",label:"Facet distribution by",choices:{"Diet Option":"Diet","Measure Time":"Time"}}}]}]}]}]}]},fB={title:"Chick Weights navbar",description:"Plots investigating the ChickWeights built-in dataset in a `navbarPage()` view",uiTree:cB,otherCode:{serverLibraries:["ggplot2"],serverFunctionBody:` +})`}},dB={uiName:"shiny::navbarPage",uiArguments:{title:"Chick Weights",selected:"Line Plots",collapsible:!0,theme:{uiName:"unknownUiFunction",uiArguments:{text:"bslib::bs_theme()"}}},uiChildren:[{uiName:"shiny::tabPanel",uiArguments:{title:"Line Plots"},uiChildren:[{uiName:"gridlayout::grid_container",uiArguments:{row_sizes:["1fr"],col_sizes:["250px","1fr"],gap_size:"10px",layout:["num_chicks linePlots"]},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"num_chicks"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"numChicks",label:"Number of chicks",min:1,max:15,value:5,step:1,width:"100%"}}]}]},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"linePlots"}}]}]},{uiName:"shiny::tabPanel",uiArguments:{title:"Distributions"},uiChildren:[{uiName:"gridlayout::grid_container",uiArguments:{row_sizes:["165px","1fr"],col_sizes:["1fr"],gap_size:"10px",layout:["facetOption","dists"]},uiChildren:[{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"dists"}},{uiName:"gridlayout::grid_card",uiArguments:{area:"facetOption"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Distribution Plot Options"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::radioButtons",uiArguments:{inputId:"distFacet",label:"Facet distribution by",choices:{"Diet Option":"Diet","Measure Time":"Time"}}}]}]}]}]}]},pB={title:"Chick Weights navbar",description:"Plots investigating the ChickWeights built-in dataset in a `navbarPage()` view",uiTree:dB,otherCode:{serverLibraries:["ggplot2"],serverFunctionBody:` output$linePlots <- renderPlot({ obs_to_include <- as.integer(ChickWeight$Chick) <= input$numChicks chicks <- ChickWeight[obs_to_include, ] @@ -216,7 +216,7 @@ output$dists <- renderPlot({ geom_density(fill = "#fa551b", color = "#ee6331") + ggtitle("Distribution of weights by diet") }) -`}},dB={uiName:"gridlayout::grid_page",uiArguments:{layout:["header header header","sidebar bluePlot bluePlot","table table plotly","table table plotly"],row_sizes:["100px","1fr","1fr","1fr"],col_sizes:["250px","0.59fr","1.41fr"],gap_size:"1rem"},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"sidebar"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"bins",label:"Number of Bins",min:12,max:100,value:30,width:"100%"}},{uiName:"shiny::numericInput",uiArguments:{inputId:"numRows",label:"Number of table rows",value:10,min:1,step:1,width:"100%"}}]}]},{uiName:"gridlayout::grid_card_text",uiArguments:{area:"header",content:"Geysers!",alignment:"start",is_title:!1}},{uiName:"gridlayout::grid_card",uiArguments:{area:"table"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Table"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"DT::DTOutput",uiArguments:{outputId:"myTable",width:"100%"}}]}]},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"bluePlot"}},{uiName:"gridlayout::grid_card",uiArguments:{area:"plotly"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Interactive Plot"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"plotly::plotlyOutput",uiArguments:{outputId:"distPlot",width:"100%",height:"100%"}}]}]}]},pB={title:"Grid Geyser",description:"The classic geyser app in a gridlayout grid page",uiTree:dB,otherCode:{serverLibraries:["plotly"],serverFunctionBody:` +`}},hB={uiName:"gridlayout::grid_page",uiArguments:{layout:["header header header","sidebar bluePlot bluePlot","table table plotly","table table plotly"],row_sizes:["100px","1fr","1fr","1fr"],col_sizes:["250px","0.59fr","1.41fr"],gap_size:"1rem"},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"sidebar"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"bins",label:"Number of Bins",min:12,max:100,value:30,width:"100%"}},{uiName:"shiny::numericInput",uiArguments:{inputId:"numRows",label:"Number of table rows",value:10,min:1,step:1,width:"100%"}}]}]},{uiName:"gridlayout::grid_card_text",uiArguments:{area:"header",content:"Geysers!",alignment:"start",is_title:!1}},{uiName:"gridlayout::grid_card",uiArguments:{area:"table"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Table"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"DT::DTOutput",uiArguments:{outputId:"myTable",width:"100%"}}]}]},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"bluePlot"}},{uiName:"gridlayout::grid_card",uiArguments:{area:"plotly"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Interactive Plot"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"plotly::plotlyOutput",uiArguments:{outputId:"distPlot",width:"100%",height:"100%"}}]}]}]},mB={title:"Grid Geyser",description:"The classic geyser app in a gridlayout grid page",uiTree:hB,otherCode:{serverLibraries:["plotly"],serverFunctionBody:` output$distPlot <- renderPlotly({ # generate bins based on input$bins from ui.R plot_ly(x = ~ faithful[, 2], type = "histogram") @@ -233,7 +233,7 @@ output$bluePlot <- renderPlot({ output$myTable <- renderDT({ head(faithful, input$numRows) -})`}},fC=[pB,fB,uB];function hB(e){const t=e.outputType==="SINGLE-FILE"?mB(e):gB(e);return Fg(t,{include_info:!0})}function mB({uiTree:e,otherCode:{uiExtra:t="",serverExtra:n="",serverFunctionBody:r="",serverLibraries:i=[]}}){const o=`${Xn.libraries} +})`}},fC=[mB,pB,fB];function gB(e){const t=e.outputType==="SINGLE-FILE"?yB(e):vB(e);return Fg(t,{include_info:!0})}function yB({uiTree:e,otherCode:{uiExtra:t="",serverExtra:n="",serverFunctionBody:r="",serverLibraries:i=[]}}){const o=`${Xn.libraries} ${t} ui <- ${Xn.ui} @@ -245,7 +245,7 @@ server <- function(input, output) { shinyApp(ui, server) -`;return{app_type:"SINGLE-FILE",ui_tree:e,app:{code:o,libraries:["shiny",...i]}}}function gB({uiTree:e,otherCode:{uiExtra:t="",serverExtra:n="",serverFunctionBody:r="",serverLibraries:i=[]}}){const o=`${Xn.libraries} +`;return{app_type:"SINGLE-FILE",ui_tree:e,app:{code:o,libraries:["shiny",...i]}}}function vB({uiTree:e,otherCode:{uiExtra:t="",serverExtra:n="",serverFunctionBody:r="",serverLibraries:i=[]}}){const o=`${Xn.libraries} ${t} ui <- ${Xn.ui} @@ -255,14 +255,14 @@ ${n} server <- function(input, output) { ${Ba(r)} } -`;return{app_type:"MULTI-FILE",ui_tree:e,ui:{code:o,libraries:["shiny",...i]},server:{code:l}}}const Kd=1260,S0=800;function yB({uiTree:e,width_px:t}){const n=S0*(t/Kd),r=t/Kd;return v("div",{className:"AppTemplatePreview",style:{width:`${t}px`,height:`${n}px`,"--full-w":`${Kd}px`,"--full-h":`${S0}px`,"--shrink-ratio":r},children:v("div",{className:"template-container",children:v(bi,{path:[],node:e})})})}function dC(e){return e.uiName==="gridlayout::grid_page"?"grid":"navbarPage"}const vB={grid:fx,navbarPage:Xx},pC=5,wB={"--card-pad":`${pC}px`};function bB({info:{title:e,uiTree:t,description:n},onSelect:r,width_px:i,selected:o}){const l=dC(t),a=vB[l],s=i-2*pC;return U(yf,{placement:"bottom",children:[v(vf,{asChild:!0,children:U("article",{className:"AppTemplateCard","aria-label":"App template preview card",onClick:r,style:wB,"data-selected":o,children:[v("div",{className:"preview-container",children:v(yB,{uiTree:t,width_px:s})}),U("footer",{children:[v("span",{children:e}),v("img",{src:a,alt:`${l} layout icon`,title:`${l} layout app`,className:"layout-icon"})]})]})}),v(qS,{content:n})]})}function EB(){const{sendMsg:e}=Ja();return k.useCallback(n=>{e({path:"UPDATED-APP",payload:hB(n)})},[e])}const hC=["grid","navbarPage"];function SB(e){return fC.filter(({uiTree:t})=>{const n=dC(t);return!!e.layoutTypes.includes(n)})}function AB({outputChoices:e}){const t=EB(),[n,r]=k.useState({layoutTypes:hC}),[i,o]=k.useState(null),[l,a]=k.useState(e==="USER-CHOICE"?"SINGLE-FILE":e),s=f=>{o(d=>d===f?null:f)},u=k.useMemo(()=>SB(n),[n]);return k.useEffect(()=>{i&&!u.map(f=>f.title).includes(i)&&o(null)},[i,u]),{filterState:n,setFilterState:r,shownTemplates:u,selectedTemplate:i,setSelectedTemplate:s,selectedOutput:l,setSelectedOutput:a,finishSelection:()=>{const f=u.find(({title:p})=>p===i);if(!f)return;const d=tC(f.uiTree,{remove_namespace:!0});t(W(O(O({},f),d),{outputType:l}))}}}const xB=["SINGLE-FILE","MULTI-FILE"],CB={"SINGLE-FILE":"Single file mode","MULTI-FILE":"Multi file mode"};function _B({selectedOutput:e,setSelectedOutput:t}){return U("form",{className:"App_TypeForm",children:[v("legend",{children:"Generate app in:"}),xB.map(n=>{const r=CB[n];return U("div",{className:"labeled-form-option",children:[v("input",{type:"radio",id:`${n}-choice`,name:r,value:n,checked:n===e,onChange:i=>t(n)}),v("label",{htmlFor:`${n}-choice`,children:r})]},n)})]})}const kB={grid:"Grid",navbarPage:"Tabs"};function TB({filterState:e,setFilterState:t}){const{layoutTypes:n}=e;return v("form",{className:"TemplateFiltersForm",onSubmit:r=>{r.preventDefault()},children:U("fieldset",{"aria-label":"App layout type filters",children:[v("legend",{children:"Show templates based on selected layouts:"}),v("div",{className:"layout-options",children:hC.map(r=>{const i=kB[r],o=n.includes(r);return U("div",{className:"labeled-form-option",children:[v("input",{type:"checkbox",id:`${r}-choice`,name:i,value:r,checked:o,onChange:()=>{t(W(O({},e),{layoutTypes:o?n.filter(l=>l!==r):[...n,r]}))}}),v("label",{htmlFor:`${r}-choice`,children:i})]},r)})})]})})}const mC=294,IB={"--card-w":`${mC}px`};function OB({selectedTemplate:e,setSelectedTemplate:t,templates:n=fC}){return n.length===0?v("div",{className:"TemplatePreviewGrid empty-results",children:"No app templates fit current filters. Try broadening your search."}):v("div",{className:"TemplatePreviewGrid",style:IB,children:n.map(r=>v(bB,{info:r,selected:r.title===e,onSelect:()=>{t(r.title)},width_px:mC},r.title))})}function PB(e){const{filterState:t,setFilterState:n,shownTemplates:r,selectedTemplate:i,setSelectedTemplate:o,finishSelection:l,selectedOutput:a,setSelectedOutput:s}=AB(e),u=i!==null,c=u?"Next":"Select a template";return v(cC,{main:v(OB,{templates:r,selectedTemplate:i,setSelectedTemplate:o}),left:U(Ne,{children:[v(fl,{children:"Choose App Template"}),U("div",{className:"TemplateChooserSidebar",children:[v("section",{className:"instructions",children:"Hover over a template to see a description and what elements are used. Select the desired template and click next to edit."}),v(TB,{filterState:t,setFilterState:n}),e.outputChoices==="USER-CHOICE"?v(_B,{selectedOutput:a,setSelectedOutput:s}):null,v(rt,{disabled:!u,onClick:l,"aria-label":u?"Start editor with selected template":"Need to select a template to proceed","data-balloon-pos":"right",children:c})]})]})})}const NB="_elementsPalette_qmlez_1",RB="_OptionContainer_qmlez_18",DB="_OptionItem_qmlez_24",LB="_OptionIcon_qmlez_33",FB="_OptionLabel_qmlez_41",Jl={elementsPalette:NB,OptionContainer:RB,OptionItem:DB,OptionIcon:LB,OptionLabel:FB};function MB(e,t){const n={};for(const r in e)n[r]=BB(e[r],t);return n}function BB(e,t){const n=O({},e);for(const r in n){const i=n[r];typeof i=="function"&&(n[r]=i(t))}return n}function UB(e){const t={};for(const n in e){const r=e[n],i="optional"in r,o="useDefaultIfOptional"in r;if(i&&!o)continue;const l=r.defaultValue;t[n]=typeof l=="function"?l():l}return t}function zB({uiName:e}){const{iconSrc:t,title:n,settingsInfo:r,description:i=n,default_node:o}=to(e),l=o?O({uiName:e},o):{uiName:e,uiArguments:UB(r)},a=wA({node:l});return t===void 0?null:U(yf,{placement:"right",children:[v(vf,{children:v("div",{className:Jl.OptionContainer,children:U("div",W(O({className:Jl.OptionItem,"data-ui-name":e},a),{children:[v("img",{src:t,alt:n,className:Jl.OptionIcon}),v("label",{className:Jl.OptionLabel,children:n})]}))})}),v(qS,{content:i})]})}const jB={Utilities:1,Inputs:1,Outputs:1,layouts:1,gridlayout:1,Tabs:1,Containers:1,Cards:1,Plotting:1,Uncategorized:1},A0=Object.keys(jB);function x0(e){const t=to(e);return"category"in t&&t.category?t.category:"uncategorized"}function WB(e,t){const n=A0.indexOf(x0(e)),r=A0.indexOf(x0(t));return nr?1:0}function YB({availableUiNodes:e=eC}){const t=[...e].sort(WB);return U(Ne,{children:[v(fl,{children:"Elements"}),v("div",{className:Jl.elementsPalette,children:t.map(n=>v(zB,{uiName:n},n))})]})}const VB="_deleteButton_1en02_1",$B={deleteButton:VB};function HB({path:e,justIcon:t=!1,label:n="Delete Node"}){const r=oC(e);return U(rt,{className:$B.deleteButton,onClick:i=>{i.stopPropagation(),r()},"aria-label":n,title:n,variant:t?"icon":"delete",type:"button",children:[v(xf,{}),t?null:"Delete Element"]})}function GB({settings:e,settingsInfo:t,onSettingsChange:n}){const r=R5(Object.keys(e),Object.keys(t));return r.length===0?null:U("section",{className:"unknown-arguments-list",children:[v("div",{className:"divider-line",children:v("label",{children:v(tI,{text:"Arguments present in UI code but not known about or editable by the shinyuieditor",position:"left",size:"fit",children:"Unknown arguments"})})}),v("ul",{className:"unknown-form-fields","aria-label":"Unknown arguments list",children:r.map(i=>U("li",{className:"unknown-argument","aria-label":"Unknown argument",style:{cursor:"default"},children:[v("code",{"aria-label":QB(e[i]),"data-balloon-pos":"left",style:{cursor:"inherit"},children:i}),v(Ir,{text:`Remove ${i} argument`,onClick:()=>n(i,{type:"REMOVE"}),type:"button",position:"left",children:v(xf,{})})]},i))})]})}function JB(e){return Lg(e)?e.uiName==="unknownUiFunction":!1}const C0=50;function QB(e){let t=JSON.stringify(JB(e)?e.uiArguments.text:e);return t.length>C0+4&&(t=t.substring(0,C0),t+="..."),"Value: "+t}function KB(e){const{settings:t,settingsInfo:n,onSettingsChange:r,renderInputs:i=({inputs:l})=>v(Ne,{children:Object.values(l)})}=e,o={inputs:XB({settings:t,settingsInfo:n,onSettingsChange:r}),settings:t};return U("form",{className:"FormBuilder",onSubmit:qB,children:[i(o),v(GB,O({},e))]})}const qB=e=>{e.preventDefault()};function XB({settings:e,settingsInfo:t,onSettingsChange:n}){const r={};for(const i in t){const o=t[i];if(!CA(o)||!("inputType"in o)||!("defaultValue"in o)||o.inputType==="omitted")continue;const l=e[i],a=W(O({},o),{name:i,value:l,onUpdate:s=>n(i,s)});r[i]=v(jx,O({},a),i)}return r}function ZB({node:e}){var i;const{sendMsg:t,mode:n}=Ja();if(n!=="VSCODE"||!e)return null;const r=(i=to(e.uiName).serverBindings)!=null?i:{};return U("div",{children:[v(eU,{serverOutputInfo:r==null?void 0:r.outputs,node:e,sendMsg:t}),v(tU,{serverInputInfo:r==null?void 0:r.inputs,node:e,sendMsg:t})]})}function eU({serverOutputInfo:e,node:{uiArguments:t},sendMsg:n}){const r=KA();if(!(r.mode==="MAIN"&&"known_outputs"in r)||typeof e=="undefined")return null;const i=r.known_outputs,{outputIdKey:o,renderScaffold:l}=e,a=typeof o=="string"?o:o(t),s=t[a];if(typeof s!="string")return null;const u=i.has(s);return v(Ir,{text:u?"Show output declaration in app script":"Create output binding in app server",position:"left",variant:"regular",onClick:()=>{n(u?{path:"FIND-SERVER-USES",payload:{type:"Output",outputId:s}}:{path:"INSERT-SNIPPET",payload:{snippet:` -output\\$${s} <- ${l}`,where_in_server:"end"}})},children:u?"Show in server":"Generate server code"})}function tU({serverInputInfo:e,node:{uiArguments:t},sendMsg:n}){if(typeof e=="undefined")return null;const{inputIdKey:r}=e,i=typeof r=="string"?r:r(t),o=t[i];return typeof o!="string"?null:v(Ir,{text:`Find uses of bound input (input$${o}) in app script`,position:"left",variant:"regular",onClick:()=>{n({path:"FIND-SERVER-USES",payload:{type:"Input",inputId:o}})},children:"Find in server"})}function nU(e,t){const n=e.length;let r=[];for(let i=0;i<=n;i++){const o=Ei(t,e.slice(0,i));if(o===void 0)break;r.push(to(o.uiName).title)}return r}const rU="_container_1fh41_1",iU="_node_1fh41_12",_0={container:rU,node:iU};function oU({tree:e,path:t,onSelect:n}){const r=nU(t,e),i=t.length;return v("div",{className:_0.container,"aria-label":"Path to selected node",children:r.map((o,l)=>{const a=l===i,s=lU(o);return v("div",{className:_0.node,"aria-label":a?"current selection":"ancestor of selection",onClick:a?void 0:()=>n(t.slice(0,l)),children:s},o+l)})})}function lU(e){return e.replace(/[a-z]+::/,"")}const aU="_settingsPanel_a44hx_1",sU="_currentElementAbout_a44hx_10",uU="_settingsForm_a44hx_17",cU="_settingsInputs_a44hx_24",fU="_buttonsHolder_a44hx_28",dU="_validationErrorMsg_a44hx_45",qd={settingsPanel:aU,currentElementAbout:sU,settingsForm:uU,settingsInputs:cU,buttonsHolder:fU,validationErrorMsg:dU};var pU=hU;function hU(e,t){var n={};typeof t=="string"&&(t=[].slice.call(arguments,1));for(var r in e)(!e.hasOwnProperty||e.hasOwnProperty(r))&&t.indexOf(r)===-1&&(n[r]=e[r]);return n}function mU(e){const t=Tr(),n=rs(),r=EA(),[i,o]=P.useState(n!==null?k0(e,n):null),l=P.useRef(!1),a=P.useCallback(c=>{n&&l.current&&t(HA({path:n,node:c}))},[t,n]);return P.useEffect(()=>{if(l.current=!1,n===null){o(null);return}o(k0(e,n))},[e,n]),P.useEffect(()=>{i&&a(i)},[i,a]),{currentNode:i,updateArgumentsByName:(c,f)=>{o(d=>W(O({},d),{uiArguments:W(O({},d==null?void 0:d.uiArguments),{[c]:f})})),l.current=!0},deleteArgumentByName:c=>{o(f=>{var d;return f===null?f:W(O({},f),{uiArguments:pU((d=f.uiArguments)!=null?d:{},c)})}),l.current=!0},selectedPath:n,setNodeSelection:r}}function k0(...e){try{return Ei(...e)}catch(t){return console.warn("Failed to get node. Args:",e),null}}function gU(e){const t=k.useMemo(()=>n=>v(XS,O({header:"Error rendering settings panel",generateIssueLink:r=>FE({title:"Error rendering settings panel",body:`Error rendering settings panel: -${LE(r)}`,labels:["Settings-Panel"]})},n)),[]);return U(Ne,{children:[v(fl,{children:"Properties"}),v(Xc,{fallbackRender:t,children:v(yU,O({},e))})]})}function yU({tree:e}){const{currentNode:t,updateArgumentsByName:n,deleteArgumentByName:r,selectedPath:i,setNodeSelection:o}=mU(e);if(i===null)return v("div",{children:"Select an element to edit properties"});if(t===null)return U("div",{children:["Error finding requested node at path ",i.join(".")]});const l=i.length===0,{uiName:a,uiArguments:s}=t,u=to(a),c=MB(u.settingsInfo,t);return v(Ne,{children:U("div",{className:qd.settingsPanel,children:[v("div",{className:qd.currentElementAbout,children:v(oU,{tree:e,path:i,onSelect:o})}),v(KB,{settings:s,settingsInfo:c,renderInputs:"settingsFormRender"in u?u.settingsFormRender:void 0,onSettingsChange:(f,d)=>{switch(d.type){case"UPDATE":n(f,d.value);return;case"REMOVE":r(f);return}}}),v(ZB,{node:t}),v("div",{className:qd.buttonsHolder,children:l?null:v(HB,{path:i})})]})})}const vU="_message_for_user_hxksa_1",wU="_message_container_hxksa_6",bU="_error_msg_hxksa_25",Fh={message_for_user:vU,message_container:wU,error_msg:bU};function gC({children:e}){return v("div",{className:Fh.message_for_user,children:v("div",{className:Fh.message_container,children:e})})}function EU({msg:e}){const t=e.split(` -`);return v(Ne,{children:t.map(n=>v("p",{className:Fh.error_msg,children:n}))})}function SU({state:e}){switch(e.mode){case"MAIN":return v(AU,{state:e});case"LOADING":return v(CU,{});case"ERROR":return v(xU,{state:e});case"TEMPLATE_CHOOSER":return v(PB,O({},e.options))}}function AU({state:e}){return v(cC,{main:v(bi,{node:e.ui_tree,path:[],canDrag:!1}),left:v(YB,{}),properties:v(gU,{tree:e.ui_tree}),preview:v(rB,{})})}function xU({state:e}){return U(gC,{children:[U("h2",{children:["Error ",e.context?`while ${e.context}`:""]}),v(EU,{msg:e.msg})]})}function CU(){return v(gC,{children:v("h2",{children:"Loading initial state from server"})})}function yC(e){return function(t){return typeof t===e}}var _U=yC("function"),kU=function(e){return e===null},T0=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},I0=function(e){return!TU(e)&&!kU(e)&&(_U(e)||typeof e=="object")},TU=yC("undefined"),Mh=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function IU(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=n;r--!==0;)if(!Lt(e[r],t[r]))return!1;return!0}function OU(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e.buffer),r=new DataView(t.buffer),i=e.byteLength;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function PU(e,t){var n,r,i,o;if(e.size!==t.size)return!1;try{for(var l=Mh(e.entries()),a=l.next();!a.done;a=l.next()){var s=a.value;if(!t.has(s[0]))return!1}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}try{for(var u=Mh(e.entries()),c=u.next();!c.done;c=u.next()){var s=c.value;if(!Lt(s[1],t.get(s[0])))return!1}}catch(f){i={error:f}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return!0}function NU(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=Mh(e.entries()),o=i.next();!o.done;o=i.next()){var l=o.value;if(!t.has(l[0]))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Lt(e,t){if(e===t)return!0;if(e&&I0(e)&&t&&I0(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return IU(e,t);if(e instanceof Map&&t instanceof Map)return PU(e,t);if(e instanceof Set&&t instanceof Set)return NU(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return OU(e,t);if(T0(e)&&T0(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=n.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(var i=n.length;i--!==0;){var o=n[i];if(!(o==="_owner"&&e.$$typeof)&&!Lt(e[o],t[o]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var RU=["innerHTML","ownerDocument","style","attributes","nodeValue"],DU=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],LU=["bigint","boolean","null","number","string","symbol","undefined"];function If(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(FU(t))return t}function Ln(e){return function(t){return If(t)===e}}function FU(e){return DU.includes(e)}function dl(e){return function(t){return typeof t===e}}function MU(e){return LU.includes(e)}function B(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(B.array(e))return"Array";if(B.plainFunction(e))return"Function";var t=If(e);return t||"Object"}B.array=Array.isArray;B.arrayOf=function(e,t){return!B.array(e)&&!B.function(t)?!1:e.every(function(n){return t(n)})};B.asyncGeneratorFunction=function(e){return If(e)==="AsyncGeneratorFunction"};B.asyncFunction=Ln("AsyncFunction");B.bigint=dl("bigint");B.boolean=function(e){return e===!0||e===!1};B.date=Ln("Date");B.defined=function(e){return!B.undefined(e)};B.domElement=function(e){return B.object(e)&&!B.plainObject(e)&&e.nodeType===1&&B.string(e.nodeName)&&RU.every(function(t){return t in e})};B.empty=function(e){return B.string(e)&&e.length===0||B.array(e)&&e.length===0||B.object(e)&&!B.map(e)&&!B.set(e)&&Object.keys(e).length===0||B.set(e)&&e.size===0||B.map(e)&&e.size===0};B.error=Ln("Error");B.function=dl("function");B.generator=function(e){return B.iterable(e)&&B.function(e.next)&&B.function(e.throw)};B.generatorFunction=Ln("GeneratorFunction");B.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};B.iterable=function(e){return!B.nullOrUndefined(e)&&B.function(e[Symbol.iterator])};B.map=Ln("Map");B.nan=function(e){return Number.isNaN(e)};B.null=function(e){return e===null};B.nullOrUndefined=function(e){return B.null(e)||B.undefined(e)};B.number=function(e){return dl("number")(e)&&!B.nan(e)};B.numericString=function(e){return B.string(e)&&e.length>0&&!Number.isNaN(Number(e))};B.object=function(e){return!B.nullOrUndefined(e)&&(B.function(e)||typeof e=="object")};B.oneOf=function(e,t){return B.array(e)?e.indexOf(t)>-1:!1};B.plainFunction=Ln("Function");B.plainObject=function(e){if(If(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};B.primitive=function(e){return B.null(e)||MU(typeof e)};B.promise=Ln("Promise");B.propertyOf=function(e,t,n){if(!B.object(e)||!t)return!1;var r=e[t];return B.function(n)?n(r):B.defined(r)};B.regexp=Ln("RegExp");B.set=Ln("Set");B.string=dl("string");B.symbol=dl("symbol");B.undefined=dl("undefined");B.weakMap=Ln("WeakMap");B.weakSet=Ln("WeakSet");function BU(){for(var e=[],t=0;ts);return B.undefined(r)||(u=u&&s===r),B.undefined(o)||(u=u&&a===o),u}function P0(e,t,n){var r=n.key,i=n.type,o=n.value,l=Hn(e,r),a=Hn(t,r),s=i==="added"?l:a,u=i==="added"?a:l;if(!B.nullOrUndefined(o)){if(B.defined(s)){if(B.array(s)||B.plainObject(s))return UU(s,u,o)}else return Lt(u,o);return!1}return[l,a].every(B.array)?!u.every(Mg(s)):[l,a].every(B.plainObject)?zU(Object.keys(s),Object.keys(u)):![l,a].every(function(c){return B.primitive(c)&&B.defined(c)})&&(i==="added"?!B.defined(l)&&B.defined(a):B.defined(l)&&!B.defined(a))}function N0(e,t,n){var r=n===void 0?{}:n,i=r.key,o=Hn(e,i),l=Hn(t,i);if(!vC(o,l))throw new TypeError("Inputs have different types");if(!BU(o,l))throw new TypeError("Inputs don't have length");return[o,l].every(B.plainObject)&&(o=Object.keys(o),l=Object.keys(l)),[o,l]}function R0(e){return function(t){var n=t[0],r=t[1];return B.array(e)?Lt(e,r)||e.some(function(i){return Lt(i,r)||B.array(r)&&Mg(r)(i)}):B.plainObject(e)&&e[n]?!!e[n]&&Lt(e[n],r):Lt(e,r)}}function zU(e,t){return t.some(function(n){return!e.includes(n)})}function D0(e){return function(t){return B.array(e)?e.some(function(n){return Lt(n,t)||B.array(t)&&Mg(t)(n)}):Lt(e,t)}}function Nl(e,t){return B.array(e)?e.some(function(n){return Lt(n,t)}):Lt(e,t)}function Mg(e){return function(t){return e.some(function(n){return Lt(n,t)})}}function vC(){for(var e=[],t=0;tOf(t)===e}function VU(e){return WU.includes(e)}function pl(e){return t=>typeof t===e}function $U(e){return YU.includes(e)}function q(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(q.array(e))return"Array";if(q.plainFunction(e))return"Function";const t=Of(e);return t||"Object"}q.array=Array.isArray;q.arrayOf=(e,t)=>!q.array(e)&&!q.function(t)?!1:e.every(n=>t(n));q.asyncGeneratorFunction=e=>Of(e)==="AsyncGeneratorFunction";q.asyncFunction=Fn("AsyncFunction");q.bigint=pl("bigint");q.boolean=e=>e===!0||e===!1;q.date=Fn("Date");q.defined=e=>!q.undefined(e);q.domElement=e=>q.object(e)&&!q.plainObject(e)&&e.nodeType===1&&q.string(e.nodeName)&&jU.every(t=>t in e);q.empty=e=>q.string(e)&&e.length===0||q.array(e)&&e.length===0||q.object(e)&&!q.map(e)&&!q.set(e)&&Object.keys(e).length===0||q.set(e)&&e.size===0||q.map(e)&&e.size===0;q.error=Fn("Error");q.function=pl("function");q.generator=e=>q.iterable(e)&&q.function(e.next)&&q.function(e.throw);q.generatorFunction=Fn("GeneratorFunction");q.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;q.iterable=e=>!q.nullOrUndefined(e)&&q.function(e[Symbol.iterator]);q.map=Fn("Map");q.nan=e=>Number.isNaN(e);q.null=e=>e===null;q.nullOrUndefined=e=>q.null(e)||q.undefined(e);q.number=e=>pl("number")(e)&&!q.nan(e);q.numericString=e=>q.string(e)&&e.length>0&&!Number.isNaN(Number(e));q.object=e=>!q.nullOrUndefined(e)&&(q.function(e)||typeof e=="object");q.oneOf=(e,t)=>q.array(e)?e.indexOf(t)>-1:!1;q.plainFunction=Fn("Function");q.plainObject=e=>{if(Of(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};q.primitive=e=>q.null(e)||$U(typeof e);q.promise=Fn("Promise");q.propertyOf=(e,t,n)=>{if(!q.object(e)||!t)return!1;const r=e[t];return q.function(n)?n(r):q.defined(r)};q.regexp=Fn("RegExp");q.set=Fn("Set");q.string=pl("string");q.symbol=pl("symbol");q.undefined=pl("undefined");q.weakMap=Fn("WeakMap");q.weakSet=Fn("WeakSet");var Ge=q,Bh={},HU={get exports(){return Bh},set exports(e){Bh=e}};/*! +`;return{app_type:"MULTI-FILE",ui_tree:e,ui:{code:o,libraries:["shiny",...i]},server:{code:l}}}const Kd=1260,S0=800;function wB({uiTree:e,width_px:t}){const n=S0*(t/Kd),r=t/Kd;return v("div",{className:"AppTemplatePreview",style:{width:`${t}px`,height:`${n}px`,"--full-w":`${Kd}px`,"--full-h":`${S0}px`,"--shrink-ratio":r},children:v("div",{className:"template-container",children:v(bi,{path:[],node:e})})})}function dC(e){return e.uiName==="gridlayout::grid_page"?"grid":"navbarPage"}const bB={grid:fx,navbarPage:Xx},pC=5,EB={"--card-pad":`${pC}px`};function SB({info:{title:e,uiTree:t,description:n},onSelect:r,width_px:i,selected:o}){const l=dC(t),a=bB[l],s=i-2*pC;return U(yf,{placement:"bottom",children:[v(vf,{asChild:!0,children:U("article",{className:"AppTemplateCard","aria-label":"App template preview card",onClick:r,style:EB,"data-selected":o,children:[v("div",{className:"preview-container",children:v(wB,{uiTree:t,width_px:s})}),U("footer",{children:[v("span",{children:e}),v("img",{src:a,alt:`${l} layout icon`,title:`${l} layout app`,className:"layout-icon"})]})]})}),v(qS,{content:n})]})}function AB(){const{sendMsg:e}=Ja();return k.useCallback(n=>{e({path:"UPDATED-APP",payload:gB(n)})},[e])}const hC=["grid","navbarPage"];function xB(e){return fC.filter(({uiTree:t})=>{const n=dC(t);return!!e.layoutTypes.includes(n)})}function CB({outputChoices:e}){const t=AB(),[n,r]=k.useState({layoutTypes:hC}),[i,o]=k.useState(null),[l,a]=k.useState(e==="USER-CHOICE"?"SINGLE-FILE":e),s=f=>{o(d=>d===f?null:f)},u=k.useMemo(()=>xB(n),[n]);return k.useEffect(()=>{i&&!u.map(f=>f.title).includes(i)&&o(null)},[i,u]),{filterState:n,setFilterState:r,shownTemplates:u,selectedTemplate:i,setSelectedTemplate:s,selectedOutput:l,setSelectedOutput:a,finishSelection:()=>{const f=u.find(({title:p})=>p===i);if(!f)return;const d=tC(f.uiTree,{remove_namespace:!0});t(W(P(P({},f),d),{outputType:l}))}}}const _B=["SINGLE-FILE","MULTI-FILE"],kB={"SINGLE-FILE":"Single file mode","MULTI-FILE":"Multi file mode"};function TB({selectedOutput:e,setSelectedOutput:t}){return U("form",{className:"App_TypeForm",children:[v("legend",{children:"Generate app in:"}),_B.map(n=>{const r=kB[n];return U("div",{className:"labeled-form-option",children:[v("input",{type:"radio",id:`${n}-choice`,name:r,value:n,checked:n===e,onChange:i=>t(n)}),v("label",{htmlFor:`${n}-choice`,children:r})]},n)})]})}const IB={grid:"Grid",navbarPage:"Tabs"};function OB({filterState:e,setFilterState:t}){const{layoutTypes:n}=e;return v("form",{className:"TemplateFiltersForm",onSubmit:r=>{r.preventDefault()},children:U("fieldset",{"aria-label":"App layout type filters",children:[v("legend",{children:"Show templates based on selected layouts:"}),v("div",{className:"layout-options",children:hC.map(r=>{const i=IB[r],o=n.includes(r);return U("div",{className:"labeled-form-option",children:[v("input",{type:"checkbox",id:`${r}-choice`,name:i,value:r,checked:o,onChange:()=>{t(W(P({},e),{layoutTypes:o?n.filter(l=>l!==r):[...n,r]}))}}),v("label",{htmlFor:`${r}-choice`,children:i})]},r)})})]})})}const mC=294,PB={"--card-w":`${mC}px`};function NB({selectedTemplate:e,setSelectedTemplate:t,templates:n=fC}){return n.length===0?v("div",{className:"TemplatePreviewGrid empty-results",children:"No app templates fit current filters. Try broadening your search."}):v("div",{className:"TemplatePreviewGrid",style:PB,children:n.map(r=>v(SB,{info:r,selected:r.title===e,onSelect:()=>{t(r.title)},width_px:mC},r.title))})}function RB(e){const{filterState:t,setFilterState:n,shownTemplates:r,selectedTemplate:i,setSelectedTemplate:o,finishSelection:l,selectedOutput:a,setSelectedOutput:s}=CB(e),u=i!==null,c=u?"Next":"Select a template";return v(cC,{main:v(NB,{templates:r,selectedTemplate:i,setSelectedTemplate:o}),left:U(Ne,{children:[v(fl,{children:"Choose App Template"}),U("div",{className:"TemplateChooserSidebar",children:[v("section",{className:"instructions",children:"Hover over a template to see a description and what elements are used. Select the desired template and click next to edit."}),v(OB,{filterState:t,setFilterState:n}),e.outputChoices==="USER-CHOICE"?v(TB,{selectedOutput:a,setSelectedOutput:s}):null,v(rt,{disabled:!u,onClick:l,"aria-label":u?"Start editor with selected template":"Need to select a template to proceed","data-balloon-pos":"right",children:c})]})]})})}const DB="_elementsPalette_qmlez_1",LB="_OptionContainer_qmlez_18",FB="_OptionItem_qmlez_24",MB="_OptionIcon_qmlez_33",BB="_OptionLabel_qmlez_41",Jl={elementsPalette:DB,OptionContainer:LB,OptionItem:FB,OptionIcon:MB,OptionLabel:BB};function UB(e,t){const n={};for(const r in e)n[r]=zB(e[r],t);return n}function zB(e,t){const n=P({},e);for(const r in n){const i=n[r];typeof i=="function"&&(n[r]=i(t))}return n}function jB(e){const t={};for(const n in e){const r=e[n],i="optional"in r,o="useDefaultIfOptional"in r;if(i&&!o)continue;const l=r.defaultValue;t[n]=typeof l=="function"?l():l}return t}function WB({uiName:e}){const{iconSrc:t,title:n,settingsInfo:r,description:i=n,default_node:o}=to(e),l=o?P({uiName:e},o):{uiName:e,uiArguments:jB(r)},a=wA({node:l});return t===void 0?null:U(yf,{placement:"right",children:[v(vf,{asChild:!0,children:v("div",{className:Jl.OptionContainer,children:U("div",W(P({className:Jl.OptionItem,"data-ui-name":e},a),{children:[v("img",{src:t,alt:n,className:Jl.OptionIcon}),v("label",{className:Jl.OptionLabel,children:n})]}))})}),v(qS,{content:i})]})}const YB={Utilities:1,Inputs:1,Outputs:1,layouts:1,gridlayout:1,Tabs:1,Containers:1,Cards:1,Plotting:1,Uncategorized:1},A0=Object.keys(YB);function x0(e){const t=to(e);return"category"in t&&t.category?t.category:"uncategorized"}function VB(e,t){const n=A0.indexOf(x0(e)),r=A0.indexOf(x0(t));return nr?1:0}function $B({availableUiNodes:e=eC}){const t=[...e].sort(VB);return U(Ne,{children:[v(fl,{children:"Elements"}),v("div",{className:Jl.elementsPalette,children:t.map(n=>v(WB,{uiName:n},n))})]})}const HB="_deleteButton_1en02_1",GB={deleteButton:HB};function JB({path:e,justIcon:t=!1,label:n="Delete Node"}){const r=oC(e);return U(rt,{className:GB.deleteButton,onClick:i=>{i.stopPropagation(),r()},"aria-label":n,title:n,variant:t?"icon":"delete",type:"button",children:[v(xf,{}),t?null:"Delete Element"]})}function QB({settings:e,settingsInfo:t,onSettingsChange:n}){const r=R5(Object.keys(e),Object.keys(t));return r.length===0?null:U("section",{className:"unknown-arguments-list",children:[v("div",{className:"divider-line",children:v("label",{children:v(tI,{text:"Arguments present in UI code but not known about or editable by the shinyuieditor",position:"left",size:"fit",children:"Unknown arguments"})})}),v("ul",{className:"unknown-form-fields","aria-label":"Unknown arguments list",children:r.map(i=>U("li",{className:"unknown-argument","aria-label":"Unknown argument",style:{cursor:"default"},children:[v("code",{"aria-label":qB(e[i]),"data-balloon-pos":"left",style:{cursor:"inherit"},children:i}),v(Ir,{text:`Remove ${i} argument`,onClick:()=>n(i,{type:"REMOVE"}),type:"button",position:"left",children:v(xf,{})})]},i))})]})}function KB(e){return Lg(e)?e.uiName==="unknownUiFunction":!1}const C0=50;function qB(e){let t=JSON.stringify(KB(e)?e.uiArguments.text:e);return t.length>C0+4&&(t=t.substring(0,C0),t+="..."),"Value: "+t}function XB(e){const{settings:t,settingsInfo:n,onSettingsChange:r,renderInputs:i=({inputs:l})=>v(Ne,{children:Object.values(l)})}=e,o={inputs:eU({settings:t,settingsInfo:n,onSettingsChange:r}),settings:t};return U("form",{className:"FormBuilder",onSubmit:ZB,children:[i(o),v(QB,P({},e))]})}const ZB=e=>{e.preventDefault()};function eU({settings:e,settingsInfo:t,onSettingsChange:n}){const r={};for(const i in t){const o=t[i];if(!CA(o)||!("inputType"in o)||!("defaultValue"in o)||o.inputType==="omitted")continue;const l=e[i],a=W(P({},o),{name:i,value:l,onUpdate:s=>n(i,s)});r[i]=v(jx,P({},a),i)}return r}function tU({node:e}){var i;const{sendMsg:t,mode:n}=Ja();if(n!=="VSCODE"||!e)return null;const r=(i=to(e.uiName).serverBindings)!=null?i:{};return U("div",{children:[v(nU,{serverOutputInfo:r==null?void 0:r.outputs,node:e,sendMsg:t}),v(rU,{serverInputInfo:r==null?void 0:r.inputs,node:e,sendMsg:t})]})}function nU({serverOutputInfo:e,node:{uiArguments:t},sendMsg:n}){const r=KA();if(!(r.mode==="MAIN"&&"known_outputs"in r)||typeof e=="undefined")return null;const i=r.known_outputs,{outputIdKey:o,renderScaffold:l}=e,a=typeof o=="string"?o:o(t),s=t[a];if(typeof s!="string")return null;const u=i.has(s);return v(Ir,{text:u?"Show output declaration in app script":"Create output binding in app server",position:"left",variant:"regular",onClick:()=>{n(u?{path:"FIND-SERVER-USES",payload:{type:"Output",outputId:s}}:{path:"INSERT-SNIPPET",payload:{snippet:` +output\\$${s} <- ${l}`,where_in_server:"end"}})},children:u?"Show in server":"Generate server code"})}function rU({serverInputInfo:e,node:{uiArguments:t},sendMsg:n}){if(typeof e=="undefined")return null;const{inputIdKey:r}=e,i=typeof r=="string"?r:r(t),o=t[i];return typeof o!="string"?null:v(Ir,{text:`Find uses of bound input (input$${o}) in app script`,position:"left",variant:"regular",onClick:()=>{n({path:"FIND-SERVER-USES",payload:{type:"Input",inputId:o}})},children:"Find in server"})}function iU(e,t){const n=e.length;let r=[];for(let i=0;i<=n;i++){const o=Ei(t,e.slice(0,i));if(o===void 0)break;r.push(to(o.uiName).title)}return r}const oU="_container_1fh41_1",lU="_node_1fh41_12",_0={container:oU,node:lU};function aU({tree:e,path:t,onSelect:n}){const r=iU(t,e),i=t.length;return v("div",{className:_0.container,"aria-label":"Path to selected node",children:r.map((o,l)=>{const a=l===i,s=sU(o);return v("div",{className:_0.node,"aria-label":a?"current selection":"ancestor of selection",onClick:a?void 0:()=>n(t.slice(0,l)),children:s},o+l)})})}function sU(e){return e.replace(/[a-z]+::/,"")}const uU="_settingsPanel_a44hx_1",cU="_currentElementAbout_a44hx_10",fU="_settingsForm_a44hx_17",dU="_settingsInputs_a44hx_24",pU="_buttonsHolder_a44hx_28",hU="_validationErrorMsg_a44hx_45",qd={settingsPanel:uU,currentElementAbout:cU,settingsForm:fU,settingsInputs:dU,buttonsHolder:pU,validationErrorMsg:hU};var mU=gU;function gU(e,t){var n={};typeof t=="string"&&(t=[].slice.call(arguments,1));for(var r in e)(!e.hasOwnProperty||e.hasOwnProperty(r))&&t.indexOf(r)===-1&&(n[r]=e[r]);return n}function yU(e){const t=Tr(),n=rs(),r=EA(),[i,o]=O.useState(n!==null?k0(e,n):null),l=O.useRef(!1),a=O.useCallback(c=>{n&&l.current&&t(HA({path:n,node:c}))},[t,n]);return O.useEffect(()=>{if(l.current=!1,n===null){o(null);return}o(k0(e,n))},[e,n]),O.useEffect(()=>{i&&a(i)},[i,a]),{currentNode:i,updateArgumentsByName:(c,f)=>{o(d=>W(P({},d),{uiArguments:W(P({},d==null?void 0:d.uiArguments),{[c]:f})})),l.current=!0},deleteArgumentByName:c=>{o(f=>{var d;return f===null?f:W(P({},f),{uiArguments:mU((d=f.uiArguments)!=null?d:{},c)})}),l.current=!0},selectedPath:n,setNodeSelection:r}}function k0(...e){try{return Ei(...e)}catch(t){return console.warn("Failed to get node. Args:",e),null}}function vU(e){const t=k.useMemo(()=>n=>v(XS,P({header:"Error rendering settings panel",generateIssueLink:r=>FE({title:"Error rendering settings panel",body:`Error rendering settings panel: +${LE(r)}`,labels:["Settings-Panel"]})},n)),[]);return U(Ne,{children:[v(fl,{children:"Properties"}),v(Xc,{fallbackRender:t,children:v(wU,P({},e))})]})}function wU({tree:e}){const{currentNode:t,updateArgumentsByName:n,deleteArgumentByName:r,selectedPath:i,setNodeSelection:o}=yU(e);if(i===null)return v("div",{children:"Select an element to edit properties"});if(t===null)return U("div",{children:["Error finding requested node at path ",i.join(".")]});const l=i.length===0,{uiName:a,uiArguments:s}=t,u=to(a),c=UB(u.settingsInfo,t);return v(Ne,{children:U("div",{className:qd.settingsPanel,children:[v("div",{className:qd.currentElementAbout,children:v(aU,{tree:e,path:i,onSelect:o})}),v(XB,{settings:s,settingsInfo:c,renderInputs:"settingsFormRender"in u?u.settingsFormRender:void 0,onSettingsChange:(f,d)=>{switch(d.type){case"UPDATE":n(f,d.value);return;case"REMOVE":r(f);return}}}),v(tU,{node:t}),v("div",{className:qd.buttonsHolder,children:l?null:v(JB,{path:i})})]})})}const bU="_message_for_user_hxksa_1",EU="_message_container_hxksa_6",SU="_error_msg_hxksa_25",Lh={message_for_user:bU,message_container:EU,error_msg:SU};function gC({children:e}){return v("div",{className:Lh.message_for_user,children:v("div",{className:Lh.message_container,children:e})})}function AU({msg:e}){const t=e.split(` +`);return v(Ne,{children:t.map(n=>v("p",{className:Lh.error_msg,children:n}))})}function xU({state:e}){switch(e.mode){case"MAIN":return v(CU,{state:e});case"LOADING":return v(kU,{});case"ERROR":return v(_U,{state:e});case"TEMPLATE_CHOOSER":return v(RB,P({},e.options))}}function CU({state:e}){return v(cC,{main:v(bi,{node:e.ui_tree,path:[],canDrag:!1}),left:v($B,{}),properties:v(vU,{tree:e.ui_tree}),preview:v(oB,{})})}function _U({state:e}){return U(gC,{children:[U("h2",{children:["Error ",e.context?`while ${e.context}`:""]}),v(AU,{msg:e.msg})]})}function kU(){return v(gC,{children:v("h2",{children:"Loading initial state from server"})})}function yC(e){return function(t){return typeof t===e}}var TU=yC("function"),IU=function(e){return e===null},T0=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},I0=function(e){return!OU(e)&&!IU(e)&&(TU(e)||typeof e=="object")},OU=yC("undefined"),Fh=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function PU(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=n;r--!==0;)if(!Lt(e[r],t[r]))return!1;return!0}function NU(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e.buffer),r=new DataView(t.buffer),i=e.byteLength;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function RU(e,t){var n,r,i,o;if(e.size!==t.size)return!1;try{for(var l=Fh(e.entries()),a=l.next();!a.done;a=l.next()){var s=a.value;if(!t.has(s[0]))return!1}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}try{for(var u=Fh(e.entries()),c=u.next();!c.done;c=u.next()){var s=c.value;if(!Lt(s[1],t.get(s[0])))return!1}}catch(f){i={error:f}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return!0}function DU(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=Fh(e.entries()),o=i.next();!o.done;o=i.next()){var l=o.value;if(!t.has(l[0]))return!1}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Lt(e,t){if(e===t)return!0;if(e&&I0(e)&&t&&I0(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return PU(e,t);if(e instanceof Map&&t instanceof Map)return RU(e,t);if(e instanceof Set&&t instanceof Set)return DU(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return NU(e,t);if(T0(e)&&T0(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=n.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(var i=n.length;i--!==0;){var o=n[i];if(!(o==="_owner"&&e.$$typeof)&&!Lt(e[o],t[o]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var LU=["innerHTML","ownerDocument","style","attributes","nodeValue"],FU=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],MU=["bigint","boolean","null","number","string","symbol","undefined"];function If(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(BU(t))return t}function Ln(e){return function(t){return If(t)===e}}function BU(e){return FU.includes(e)}function dl(e){return function(t){return typeof t===e}}function UU(e){return MU.includes(e)}function B(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(B.array(e))return"Array";if(B.plainFunction(e))return"Function";var t=If(e);return t||"Object"}B.array=Array.isArray;B.arrayOf=function(e,t){return!B.array(e)&&!B.function(t)?!1:e.every(function(n){return t(n)})};B.asyncGeneratorFunction=function(e){return If(e)==="AsyncGeneratorFunction"};B.asyncFunction=Ln("AsyncFunction");B.bigint=dl("bigint");B.boolean=function(e){return e===!0||e===!1};B.date=Ln("Date");B.defined=function(e){return!B.undefined(e)};B.domElement=function(e){return B.object(e)&&!B.plainObject(e)&&e.nodeType===1&&B.string(e.nodeName)&&LU.every(function(t){return t in e})};B.empty=function(e){return B.string(e)&&e.length===0||B.array(e)&&e.length===0||B.object(e)&&!B.map(e)&&!B.set(e)&&Object.keys(e).length===0||B.set(e)&&e.size===0||B.map(e)&&e.size===0};B.error=Ln("Error");B.function=dl("function");B.generator=function(e){return B.iterable(e)&&B.function(e.next)&&B.function(e.throw)};B.generatorFunction=Ln("GeneratorFunction");B.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};B.iterable=function(e){return!B.nullOrUndefined(e)&&B.function(e[Symbol.iterator])};B.map=Ln("Map");B.nan=function(e){return Number.isNaN(e)};B.null=function(e){return e===null};B.nullOrUndefined=function(e){return B.null(e)||B.undefined(e)};B.number=function(e){return dl("number")(e)&&!B.nan(e)};B.numericString=function(e){return B.string(e)&&e.length>0&&!Number.isNaN(Number(e))};B.object=function(e){return!B.nullOrUndefined(e)&&(B.function(e)||typeof e=="object")};B.oneOf=function(e,t){return B.array(e)?e.indexOf(t)>-1:!1};B.plainFunction=Ln("Function");B.plainObject=function(e){if(If(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};B.primitive=function(e){return B.null(e)||UU(typeof e)};B.promise=Ln("Promise");B.propertyOf=function(e,t,n){if(!B.object(e)||!t)return!1;var r=e[t];return B.function(n)?n(r):B.defined(r)};B.regexp=Ln("RegExp");B.set=Ln("Set");B.string=dl("string");B.symbol=dl("symbol");B.undefined=dl("undefined");B.weakMap=Ln("WeakMap");B.weakSet=Ln("WeakSet");function zU(){for(var e=[],t=0;ts);return B.undefined(r)||(u=u&&s===r),B.undefined(o)||(u=u&&a===o),u}function P0(e,t,n){var r=n.key,i=n.type,o=n.value,l=Hn(e,r),a=Hn(t,r),s=i==="added"?l:a,u=i==="added"?a:l;if(!B.nullOrUndefined(o)){if(B.defined(s)){if(B.array(s)||B.plainObject(s))return jU(s,u,o)}else return Lt(u,o);return!1}return[l,a].every(B.array)?!u.every(Mg(s)):[l,a].every(B.plainObject)?WU(Object.keys(s),Object.keys(u)):![l,a].every(function(c){return B.primitive(c)&&B.defined(c)})&&(i==="added"?!B.defined(l)&&B.defined(a):B.defined(l)&&!B.defined(a))}function N0(e,t,n){var r=n===void 0?{}:n,i=r.key,o=Hn(e,i),l=Hn(t,i);if(!vC(o,l))throw new TypeError("Inputs have different types");if(!zU(o,l))throw new TypeError("Inputs don't have length");return[o,l].every(B.plainObject)&&(o=Object.keys(o),l=Object.keys(l)),[o,l]}function R0(e){return function(t){var n=t[0],r=t[1];return B.array(e)?Lt(e,r)||e.some(function(i){return Lt(i,r)||B.array(r)&&Mg(r)(i)}):B.plainObject(e)&&e[n]?!!e[n]&&Lt(e[n],r):Lt(e,r)}}function WU(e,t){return t.some(function(n){return!e.includes(n)})}function D0(e){return function(t){return B.array(e)?e.some(function(n){return Lt(n,t)||B.array(t)&&Mg(t)(n)}):Lt(e,t)}}function Nl(e,t){return B.array(e)?e.some(function(n){return Lt(n,t)}):Lt(e,t)}function Mg(e){return function(t){return e.some(function(n){return Lt(n,t)})}}function vC(){for(var e=[],t=0;tOf(t)===e}function HU(e){return VU.includes(e)}function pl(e){return t=>typeof t===e}function GU(e){return $U.includes(e)}function q(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(q.array(e))return"Array";if(q.plainFunction(e))return"Function";const t=Of(e);return t||"Object"}q.array=Array.isArray;q.arrayOf=(e,t)=>!q.array(e)&&!q.function(t)?!1:e.every(n=>t(n));q.asyncGeneratorFunction=e=>Of(e)==="AsyncGeneratorFunction";q.asyncFunction=Fn("AsyncFunction");q.bigint=pl("bigint");q.boolean=e=>e===!0||e===!1;q.date=Fn("Date");q.defined=e=>!q.undefined(e);q.domElement=e=>q.object(e)&&!q.plainObject(e)&&e.nodeType===1&&q.string(e.nodeName)&&YU.every(t=>t in e);q.empty=e=>q.string(e)&&e.length===0||q.array(e)&&e.length===0||q.object(e)&&!q.map(e)&&!q.set(e)&&Object.keys(e).length===0||q.set(e)&&e.size===0||q.map(e)&&e.size===0;q.error=Fn("Error");q.function=pl("function");q.generator=e=>q.iterable(e)&&q.function(e.next)&&q.function(e.throw);q.generatorFunction=Fn("GeneratorFunction");q.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;q.iterable=e=>!q.nullOrUndefined(e)&&q.function(e[Symbol.iterator]);q.map=Fn("Map");q.nan=e=>Number.isNaN(e);q.null=e=>e===null;q.nullOrUndefined=e=>q.null(e)||q.undefined(e);q.number=e=>pl("number")(e)&&!q.nan(e);q.numericString=e=>q.string(e)&&e.length>0&&!Number.isNaN(Number(e));q.object=e=>!q.nullOrUndefined(e)&&(q.function(e)||typeof e=="object");q.oneOf=(e,t)=>q.array(e)?e.indexOf(t)>-1:!1;q.plainFunction=Fn("Function");q.plainObject=e=>{if(Of(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};q.primitive=e=>q.null(e)||GU(typeof e);q.promise=Fn("Promise");q.propertyOf=(e,t,n)=>{if(!q.object(e)||!t)return!1;const r=e[t];return q.function(n)?n(r):q.defined(r)};q.regexp=Fn("RegExp");q.set=Fn("Set");q.string=pl("string");q.symbol=pl("symbol");q.undefined=pl("undefined");q.weakMap=Fn("WeakMap");q.weakSet=Fn("WeakSet");var Ge=q,Mh={},JU={get exports(){return Mh},set exports(e){Mh=e}};/*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. -*/(function(e){(function(){var t=!!(typeof window!="undefined"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(HU);const wC=Bh;var GU=new Error("Element already at target scroll position"),JU=new Error("Scroll cancelled"),QU=Math.min,L0=Date.now,KU={left:F0("scrollLeft"),top:F0("scrollTop")};function F0(e){return function(n,r,i,o){i=i||{},typeof i=="function"&&(o=i,i={}),typeof o!="function"&&(o=XU);var l=L0(),a=n[e],s=i.ease||qU,u=isNaN(i.duration)?350:+i.duration,c=!1;return a===r?o(GU,n[e]):requestAnimationFrame(d),f;function f(){c=!0}function d(p){if(c)return o(JU,n[e]);var h=L0(),m=QU(1,(h-l)/u),E=s(m);n[e]=E*(r-a)+a,m<1?requestAnimationFrame(d):requestAnimationFrame(function(){o(null,n[e])})}}}function qU(e){return .5*(1-Math.cos(Math.PI*e))}function XU(){}var Uh={},ZU={get exports(){return Uh},set exports(e){Uh=e}};(function(e){(function(t,n){e.exports?e.exports=n():t.Scrollparent=n()})(b_,function(){var t=/(auto|scroll)/,n=function(a,s){return a.parentNode===null?s:n(a.parentNode,s.concat([a]))},r=function(a,s){return getComputedStyle(a,null).getPropertyValue(s)},i=function(a){return r(a,"overflow")+r(a,"overflow-y")+r(a,"overflow-x")},o=function(a){return t.test(i(a))},l=function(a){if(a instanceof HTMLElement||a instanceof SVGElement){for(var s=n(a.parentNode,[]),u=0;u=0)return 1;return 0}();function Ez(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function Sz(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},bz))}}var Az=ls&&window.Promise,xz=Az?Ez:Sz;function AC(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function ro(e,t){if(e.nodeType!==1)return[];var n=e.ownerDocument.defaultView,r=n.getComputedStyle(e,null);return t?r[t]:r}function Bg(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function as(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=ro(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:as(Bg(e))}function xC(e){return e&&e.referenceNode?e.referenceNode:e}var U0=ls&&!!(window.MSInputMethodContext&&document.documentMode),z0=ls&&/MSIE 10/.test(navigator.userAgent);function hl(e){return e===11?U0:e===10?z0:U0||z0}function Zo(e){if(!e)return document.documentElement;for(var t=hl(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return!r||r==="BODY"||r==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(n.nodeName)!==-1&&ro(n,"position")==="static"?Zo(n):n}function Cz(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Zo(e.firstElementChild)===e}function zh(e){return e.parentNode!==null?zh(e.parentNode):e}function uc(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return Cz(l)?l:Zo(l);var a=zh(e);return a.host?uc(a.host,t):uc(e,zh(t).host)}function el(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",n=t==="top"?"scrollTop":"scrollLeft",r=e.nodeName;if(r==="BODY"||r==="HTML"){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function _z(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=el(t,"top"),i=el(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function j0(e,t){var n=t==="x"?"Left":"Top",r=n==="Left"?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function W0(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],hl(10)?parseInt(n["offset"+e])+parseInt(r["margin"+(e==="Height"?"Top":"Left")])+parseInt(r["margin"+(e==="Height"?"Bottom":"Right")]):0)}function CC(e){var t=e.body,n=e.documentElement,r=hl(10)&&getComputedStyle(n);return{height:W0("Height",t,n,r),width:W0("Width",t,n,r)}}var kz=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Tz=function(){function e(t,n){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=hl(10),i=t.nodeName==="HTML",o=jh(e),l=jh(t),a=as(e),s=ro(t),u=parseFloat(s.borderTopWidth),c=parseFloat(s.borderLeftWidth);n&&i&&(l.top=Math.max(l.top,0),l.left=Math.max(l.left,0));var f=hi({top:o.top-l.top-u,left:o.left-l.left-c,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var d=parseFloat(s.marginTop),p=parseFloat(s.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(r&&!n?t.contains(a):t===a&&a.nodeName!=="BODY")&&(f=_z(f,t)),f}function Iz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.ownerDocument.documentElement,r=Ug(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),l=t?0:el(n),a=t?0:el(n,"left"),s={top:l-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:i,height:o};return hi(s)}function _C(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(ro(e,"position")==="fixed")return!0;var n=Bg(e);return n?_C(n):!1}function kC(e){if(!e||!e.parentElement||hl())return document.documentElement;for(var t=e.parentElement;t&&ro(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function zg(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o={top:0,left:0},l=i?kC(e):uc(e,xC(t));if(r==="viewport")o=Iz(l,i);else{var a=void 0;r==="scrollParent"?(a=as(Bg(t)),a.nodeName==="BODY"&&(a=e.ownerDocument.documentElement)):r==="window"?a=e.ownerDocument.documentElement:a=r;var s=Ug(a,l,i);if(a.nodeName==="HTML"&&!_C(l)){var u=CC(e.ownerDocument),c=u.height,f=u.width;o.top+=s.top-s.marginTop,o.bottom=c+s.top,o.left+=s.left-s.marginLeft,o.right=f+s.left}else o=s}n=n||0;var d=typeof n=="number";return o.left+=d?n:n.left||0,o.top+=d?n:n.top||0,o.right-=d?n:n.right||0,o.bottom-=d?n:n.bottom||0,o}function Oz(e){var t=e.width,n=e.height;return t*n}function TC(e,t,n,r,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var l=zg(n,r,o,i),a={top:{width:l.width,height:t.top-l.top},right:{width:l.right-t.right,height:l.height},bottom:{width:l.width,height:l.bottom-t.bottom},left:{width:t.left-l.left,height:l.height}},s=Object.keys(a).map(function(d){return cn({key:d},a[d],{area:Oz(a[d])})}).sort(function(d,p){return p.area-d.area}),u=s.filter(function(d){var p=d.width,h=d.height;return p>=n.clientWidth&&h>=n.clientHeight}),c=u.length>0?u[0].key:s[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function IC(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=r?kC(t):uc(t,xC(n));return Ug(n,i,r)}function OC(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),r=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),i=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),o={width:e.offsetWidth+i,height:e.offsetHeight+r};return o}function cc(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(n){return t[n]})}function PC(e,t,n){n=n.split("-")[0];var r=OC(e),i={width:r.width,height:r.height},o=["right","left"].indexOf(n)!==-1,l=o?"top":"left",a=o?"left":"top",s=o?"height":"width",u=o?"width":"height";return i[l]=t[l]+t[s]/2-r[s]/2,n===a?i[a]=t[a]-r[u]:i[a]=t[cc(a)],i}function ss(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Pz(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===n});var r=ss(e,function(i){return i[t]===n});return e.indexOf(r)}function NC(e,t,n){var r=n===void 0?e:e.slice(0,Pz(e,"name",n));return r.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=i.function||i.fn;i.enabled&&AC(o)&&(t.offsets.popper=hi(t.offsets.popper),t.offsets.reference=hi(t.offsets.reference),t=o(t,i))}),t}function Nz(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=IC(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=TC(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=PC(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=NC(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function RC(e,t){return e.some(function(n){var r=n.name,i=n.enabled;return i&&r===t})}function jg(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;rl[p]&&(e.offsets.popper[f]+=a[f]+h-l[p]),e.offsets.popper=hi(e.offsets.popper);var m=a[f]+a[u]/2-h/2,E=ro(e.instance.popper),g=parseFloat(E["margin"+c]),y=parseFloat(E["border"+c+"Width"]),w=m-e.offsets.popper[f]-g-y;return w=Math.max(Math.min(l[u]-h,w),0),e.arrowElement=r,e.offsets.arrow=(n={},tl(n,f,Math.round(w)),tl(n,d,""),n),e}function $z(e){return e==="end"?"start":e==="start"?"end":e}var MC=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Xd=MC.slice(3);function Y0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Xd.indexOf(e),r=Xd.slice(n+1).concat(Xd.slice(0,n));return t?r.reverse():r}var Zd={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Hz(e,t){if(RC(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var n=zg(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=cc(r),o=e.placement.split("-")[1]||"",l=[];switch(t.behavior){case Zd.FLIP:l=[r,i];break;case Zd.CLOCKWISE:l=Y0(r);break;case Zd.COUNTERCLOCKWISE:l=Y0(r,!0);break;default:l=t.behavior}return l.forEach(function(a,s){if(r!==a||l.length===s+1)return e;r=e.placement.split("-")[0],i=cc(r);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=r==="left"&&f(u.right)>f(c.left)||r==="right"&&f(u.left)f(c.top)||r==="bottom"&&f(u.top)f(n.right),m=f(u.top)f(n.bottom),g=r==="left"&&p||r==="right"&&h||r==="top"&&m||r==="bottom"&&E,y=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(y&&o==="start"&&p||y&&o==="end"&&h||!y&&o==="start"&&m||!y&&o==="end"&&E),S=!!t.flipVariationsByContent&&(y&&o==="start"&&h||y&&o==="end"&&p||!y&&o==="start"&&E||!y&&o==="end"&&m),_=w||S;(d||g||_)&&(e.flipped=!0,(d||g)&&(r=l[s+1]),_&&(o=$z(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=cn({},e.offsets.popper,PC(e.instance.popper,e.offsets.reference,e.placement)),e=NC(e.instance.modifiers,e,"flip"))}),e}function Gz(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,l=["top","bottom"].indexOf(i)!==-1,a=l?"right":"bottom",s=l?"left":"top",u=l?"width":"height";return n[a]o(r[a])&&(e.offsets.popper[s]=o(r[a])),e}function Jz(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],l=i[2];if(!o)return e;if(l.indexOf("%")===0){var a=void 0;switch(l){case"%p":a=n;break;case"%":case"%r":default:a=r}var s=hi(a);return s[t]/100*o}else if(l==="vh"||l==="vw"){var u=void 0;return l==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*o}else return o}function Qz(e,t,n,r){var i=[0,0],o=["right","left"].indexOf(r)!==-1,l=e.split(/(\+|\-)/).map(function(c){return c.trim()}),a=l.indexOf(ss(l,function(c){return c.search(/,|\s/)!==-1}));l[a]&&l[a].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,u=a!==-1?[l.slice(0,a).concat([l[a].split(s)[0]]),[l[a].split(s)[1]].concat(l.slice(a+1))]:[l];return u=u.map(function(c,f){var d=(f===1?!o:o)?"height":"width",p=!1;return c.reduce(function(h,m){return h[h.length-1]===""&&["+","-"].indexOf(m)!==-1?(h[h.length-1]=m,p=!0,h):p?(h[h.length-1]+=m,p=!1,h):h.concat(m)},[]).map(function(h){return Jz(h,d,t,n)})}),u.forEach(function(c,f){c.forEach(function(d,p){Wg(d)&&(i[f]+=d*(c[p-1]==="-"?-1:1))})}),i}function Kz(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,l=i.reference,a=r.split("-")[0],s=void 0;return Wg(+n)?s=[+n,0]:s=Qz(n,o,l,a),a==="left"?(o.top+=s[0],o.left-=s[1]):a==="right"?(o.top+=s[0],o.left+=s[1]):a==="top"?(o.left+=s[0],o.top-=s[1]):a==="bottom"&&(o.left+=s[0],o.top+=s[1]),e.popper=o,e}function qz(e,t){var n=t.boundariesElement||Zo(e.instance.popper);e.instance.reference===n&&(n=Zo(n));var r=jg("transform"),i=e.instance.popper.style,o=i.top,l=i.left,a=i[r];i.top="",i.left="",i[r]="";var s=zg(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=l,i[r]=a,t.boundaries=s;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]s[p]&&!t.escapeWithReference&&(m=Math.min(c[h],s[p]-(p==="right"?c.width:c.height))),tl({},h,m)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=cn({},c,f[p](d))}),e.offsets.popper=c,e}function Xz(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,l=i.popper,a=["bottom","top"].indexOf(n)!==-1,s=a?"left":"top",u=a?"width":"height",c={start:tl({},s,o[s]),end:tl({},s,o[s]+o[u]-l[u])};e.offsets.popper=cn({},l,c[r])}return e}function Zz(e){if(!FC(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=ss(e.instance.modifiers,function(r){return r.name==="preventOverflow"}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};kz(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=xz(this.update.bind(this)),this.options=cn({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(cn({},e.Defaults.modifiers,i.modifiers)).forEach(function(l){r.options.modifiers[l]=cn({},e.Defaults.modifiers[l]||{},i.modifiers?i.modifiers[l]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(l){return cn({name:l},r.options.modifiers[l])}).sort(function(l,a){return l.order-a.order}),this.modifiers.forEach(function(l){l.enabled&&AC(l.onLoad)&&l.onLoad(r.reference,r.popper,r.options,l,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return Tz(e,[{key:"update",value:function(){return Nz.call(this)}},{key:"destroy",value:function(){return Rz.call(this)}},{key:"enableEventListeners",value:function(){return Lz.call(this)}},{key:"disableEventListeners",value:function(){return Mz.call(this)}}]),e}();Pf.Utils=(typeof window!="undefined"?window:global).PopperUtils;Pf.placements=MC;Pf.Defaults=nj;const V0=Pf;function $0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function BC(e,t){if(e==null)return{};var n=ij(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oj(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sr(e)}function ds(e){var t=rj();return function(){var r=fc(e),i;if(t){var o=fc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return oj(this,i)}}var lj={flip:{padding:20},preventOverflow:{padding:10}},me={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},pr=wC.canUseDOM,Rl=Mi.createPortal!==void 0;function ep(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function js(e){var t=e.title,n=e.data,r=e.warn,i=r===void 0?!1:r,o=e.debug,l=o===void 0?!1:o,a=i?console.warn||console.error:console.log;l&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(s){B.plainObject(s)&&s.key?a.apply(console,[s.key,s.value]):a.apply(console,[s])}):a.apply(console,[n]),console.groupEnd())}function aj(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,n,r)}function sj(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,n,r)}function uj(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i;i=function(l){n(l),sj(e,t,i)},aj(e,t,i,r)}function G0(){}var UC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"componentDidMount",value:function(){pr&&(this.node||this.appendNode(),Rl||this.renderPortal())}},{key:"componentDidUpdate",value:function(){pr&&(Rl||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!pr||!this.node||(Rl||Mi.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var i=this.props,o=i.id,l=i.zIndex;this.node||(this.node=document.createElement("div"),o&&(this.node.id=o),l&&(this.node.style.zIndex=l),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!pr)return null;var i=this.props,o=i.children,l=i.setRef;if(this.node||this.appendNode(),Rl)return Mi.createPortal(o,this.node);var a=Mi.unstable_renderSubtreeIntoContainer(this,o.length>1?k.createElement("div",null,o):o[0],this.node);return l(a),null}},{key:"renderReact16",value:function(){var i=this.props,o=i.hasChildren,l=i.placement,a=i.target;return o?this.renderPortal():a||l==="center"?this.renderPortal():null}},{key:"render",value:function(){return Rl?this.renderReact16():null}}]),n}(k.Component);vt(UC,"propTypes",{children:M.oneOfType([M.element,M.array]),hasChildren:M.bool,id:M.oneOfType([M.string,M.number]),placement:M.string,setRef:M.func.isRequired,target:M.oneOfType([M.object,M.string]),zIndex:M.number});var zC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"parentStyle",get:function(){var i=this.props,o=i.placement,l=i.styles,a=l.arrow.length,s={pointerEvents:"none",position:"absolute",width:"100%"};return o.startsWith("top")?(s.bottom=0,s.left=0,s.right=0,s.height=a):o.startsWith("bottom")?(s.left=0,s.right=0,s.top=0,s.height=a):o.startsWith("left")?(s.right=0,s.top=0,s.bottom=0):o.startsWith("right")&&(s.left=0,s.top=0),s}},{key:"render",value:function(){var i=this.props,o=i.placement,l=i.setArrowRef,a=i.styles,s=a.arrow,u=s.color,c=s.display,f=s.length,d=s.margin,p=s.position,h=s.spread,m={display:c,position:p},E,g=h,y=f;return o.startsWith("top")?(E="0,0 ".concat(g/2,",").concat(y," ").concat(g,",0"),m.bottom=0,m.marginLeft=d,m.marginRight=d):o.startsWith("bottom")?(E="".concat(g,",").concat(y," ").concat(g/2,",0 0,").concat(y),m.top=0,m.marginLeft=d,m.marginRight=d):o.startsWith("left")?(y=h,g=f,E="0,0 ".concat(g,",").concat(y/2," 0,").concat(y),m.right=0,m.marginTop=d,m.marginBottom=d):o.startsWith("right")&&(y=h,g=f,E="".concat(g,",").concat(y," ").concat(g,",0 0,").concat(y/2),m.left=0,m.marginTop=d,m.marginBottom=d),k.createElement("div",{className:"__floater__arrow",style:this.parentStyle},k.createElement("span",{ref:l,style:m},k.createElement("svg",{width:g,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k.createElement("polygon",{points:E,fill:u}))))}}]),n}(k.Component);vt(zC,"propTypes",{placement:M.string.isRequired,setArrowRef:M.func.isRequired,styles:M.object.isRequired});var cj=["color","height","width"],jC=function(t){var n=t.handleClick,r=t.styles,i=r.color,o=r.height,l=r.width,a=BC(r,cj);return k.createElement("button",{"aria-label":"close",onClick:n,style:a,type:"button"},k.createElement("svg",{width:"".concat(l,"px"),height:"".concat(o,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},k.createElement("g",null,k.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:i}))))};jC.propTypes={handleClick:M.func.isRequired,styles:M.object.isRequired};var WC=function(t){var n=t.content,r=t.footer,i=t.handleClick,o=t.open,l=t.positionWrapper,a=t.showCloseButton,s=t.title,u=t.styles,c={content:k.isValidElement(n)?n:k.createElement("div",{className:"__floater__content",style:u.content},n)};return s&&(c.title=k.isValidElement(s)?s:k.createElement("div",{className:"__floater__title",style:u.title},s)),r&&(c.footer=k.isValidElement(r)?r:k.createElement("div",{className:"__floater__footer",style:u.footer},r)),(a||l)&&!B.boolean(o)&&(c.close=k.createElement(jC,{styles:u.close,handleClick:i})),k.createElement("div",{className:"__floater__container",style:u.container},c.close,c.title,c.content,c.footer)};WC.propTypes={content:M.node.isRequired,footer:M.node,handleClick:M.func.isRequired,open:M.bool,positionWrapper:M.bool.isRequired,showCloseButton:M.bool.isRequired,styles:M.object.isRequired,title:M.node};var YC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"style",get:function(){var i=this.props,o=i.disableAnimation,l=i.component,a=i.placement,s=i.hideArrow,u=i.status,c=i.styles,f=c.arrow.length,d=c.floater,p=c.floaterCentered,h=c.floaterClosing,m=c.floaterOpening,E=c.floaterWithAnimation,g=c.floaterWithComponent,y={};return s||(a.startsWith("top")?y.padding="0 0 ".concat(f,"px"):a.startsWith("bottom")?y.padding="".concat(f,"px 0 0"):a.startsWith("left")?y.padding="0 ".concat(f,"px 0 0"):a.startsWith("right")&&(y.padding="0 0 0 ".concat(f,"px"))),[me.OPENING,me.OPEN].indexOf(u)!==-1&&(y=De(De({},y),m)),u===me.CLOSING&&(y=De(De({},y),h)),u===me.OPEN&&!o&&(y=De(De({},y),E)),a==="center"&&(y=De(De({},y),p)),l&&(y=De(De({},y),g)),De(De({},d),y)}},{key:"render",value:function(){var i=this.props,o=i.component,l=i.handleClick,a=i.hideArrow,s=i.setFloaterRef,u=i.status,c={},f=["__floater"];return o?k.isValidElement(o)?c.content=k.cloneElement(o,{closeFn:l}):c.content=o({closeFn:l}):c.content=k.createElement(WC,this.props),u===me.OPEN&&f.push("__floater__open"),a||(c.arrow=k.createElement(zC,this.props)),k.createElement("div",{ref:s,className:f.join(" "),style:this.style},k.createElement("div",{className:"__floater__body"},c.content,c.arrow))}}]),n}(k.Component);vt(YC,"propTypes",{component:M.oneOfType([M.func,M.element]),content:M.node,disableAnimation:M.bool.isRequired,footer:M.node,handleClick:M.func.isRequired,hideArrow:M.bool.isRequired,open:M.bool,placement:M.string.isRequired,positionWrapper:M.bool.isRequired,setArrowRef:M.func.isRequired,setFloaterRef:M.func.isRequired,showCloseButton:M.bool,status:M.string.isRequired,styles:M.object.isRequired,title:M.node});var VC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"render",value:function(){var i=this.props,o=i.children,l=i.handleClick,a=i.handleMouseEnter,s=i.handleMouseLeave,u=i.setChildRef,c=i.setWrapperRef,f=i.style,d=i.styles,p;if(o)if(k.Children.count(o)===1)if(!k.isValidElement(o))p=k.createElement("span",null,o);else{var h=B.function(o.type)?"innerRef":"ref";p=k.cloneElement(k.Children.only(o),vt({},h,u))}else p=o;return p?k.createElement("span",{ref:c,style:De(De({},d),f),onClick:l,onMouseEnter:a,onMouseLeave:s},p):null}}]),n}(k.Component);vt(VC,"propTypes",{children:M.node,handleClick:M.func.isRequired,handleMouseEnter:M.func.isRequired,handleMouseLeave:M.func.isRequired,setChildRef:M.func.isRequired,setWrapperRef:M.func.isRequired,style:M.object,styles:M.object.isRequired});var fj={zIndex:100};function dj(e){var t=Vn(fj,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var pj=["arrow","flip","offset"],hj=["position","top","right","bottom","left"],Yg=function(e){fs(n,e);var t=ds(n);function n(r){var i;return us(this,n),i=t.call(this,r),vt(sr(i),"setArrowRef",function(o){i.arrowRef=o}),vt(sr(i),"setChildRef",function(o){i.childRef=o}),vt(sr(i),"setFloaterRef",function(o){i.floaterRef=o}),vt(sr(i),"setWrapperRef",function(o){i.wrapperRef=o}),vt(sr(i),"handleTransitionEnd",function(){var o=i.state.status,l=i.props.callback;i.wrapperPopper&&i.wrapperPopper.instance.update(),i.setState({status:o===me.OPENING?me.OPEN:me.IDLE},function(){var a=i.state.status;l(a===me.OPEN?"open":"close",i.props)})}),vt(sr(i),"handleClick",function(){var o=i.props,l=o.event,a=o.open;if(!B.boolean(a)){var s=i.state,u=s.positionWrapper,c=s.status;(i.event==="click"||i.event==="hover"&&u)&&(js({title:"click",data:[{event:l,status:c===me.OPEN?"closing":"opening"}],debug:i.debug}),i.toggle())}}),vt(sr(i),"handleMouseEnter",function(){var o=i.props,l=o.event,a=o.open;if(!(B.boolean(a)||ep())){var s=i.state.status;i.event==="hover"&&s===me.IDLE&&(js({title:"mouseEnter",data:[{key:"originalEvent",value:l}],debug:i.debug}),clearTimeout(i.eventDelayTimeout),i.toggle())}}),vt(sr(i),"handleMouseLeave",function(){var o=i.props,l=o.event,a=o.eventDelay,s=o.open;if(!(B.boolean(s)||ep())){var u=i.state,c=u.status,f=u.positionWrapper;i.event==="hover"&&(js({title:"mouseLeave",data:[{key:"originalEvent",value:l}],debug:i.debug}),a?[me.OPENING,me.OPEN].indexOf(c)!==-1&&!f&&!i.eventDelayTimeout&&(i.eventDelayTimeout=setTimeout(function(){delete i.eventDelayTimeout,i.toggle()},a*1e3)):i.toggle(me.IDLE))}}),i.state={currentPlacement:r.placement,needsUpdate:!1,positionWrapper:r.wrapperOptions.position&&!!r.target,status:me.INIT,statusWrapper:me.INIT},i._isMounted=!1,i.hasMounted=!1,pr&&window.addEventListener("load",function(){i.popper&&i.popper.instance.update(),i.wrapperPopper&&i.wrapperPopper.instance.update()}),i}return cs(n,[{key:"componentDidMount",value:function(){if(pr){var i=this.state.positionWrapper,o=this.props,l=o.children,a=o.open,s=o.target;this._isMounted=!0,js({title:"init",data:{hasChildren:!!l,hasTarget:!!s,isControlled:B.boolean(a),positionWrapper:i,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!l&&s&&B.boolean(a)}}},{key:"componentDidUpdate",value:function(i,o){if(pr){var l=this.props,a=l.autoOpen,s=l.open,u=l.target,c=l.wrapperOptions,f=ja(o,this.state),d=f.changedFrom,p=f.changed;if(i.open!==s){var h;B.boolean(s)&&(h=s?me.OPENING:me.CLOSING),this.toggle(h)}(i.wrapperOptions.position!==c.position||i.target!==u)&&this.changeWrapperPosition(this.props),p("status",me.IDLE)&&s?this.toggle(me.OPEN):d("status",me.INIT,me.IDLE)&&a&&this.toggle(me.OPEN),this.popper&&p("status",me.OPENING)&&this.popper.instance.update(),this.floaterRef&&(p("status",me.OPENING)||p("status",me.CLOSING))&&uj(this.floaterRef,"transitionend",this.handleTransitionEnd),p("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){pr&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,l=this.state.positionWrapper,a=this.props,s=a.disableFlip,u=a.getPopper,c=a.hideArrow,f=a.offset,d=a.placement,p=a.wrapperOptions,h=d==="top"||d==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(d==="center")this.setState({status:me.IDLE});else if(o&&this.floaterRef){var m=this.options,E=m.arrow,g=m.flip,y=m.offset,w=BC(m,pj);new V0(o,this.floaterRef,{placement:d,modifiers:De({arrow:De({enabled:!c,element:this.arrowRef},E),flip:De({enabled:!s,behavior:h},g),offset:De({offset:"0, ".concat(f,"px")},y)},w),onCreate:function(b){var A;if(i.popper=b,!((A=i.floaterRef)!==null&&A!==void 0&&A.isConnected)){i.setState({needsUpdate:!0});return}u(b,"floater"),i._isMounted&&i.setState({currentPlacement:b.placement,status:me.IDLE}),d!==b.placement&&setTimeout(function(){b.instance.update()},1)},onUpdate:function(b){i.popper=b;var A=i.state.currentPlacement;i._isMounted&&b.placement!==A&&i.setState({currentPlacement:b.placement})}})}if(l){var S=B.undefined(p.offset)?0:p.offset;new V0(this.target,this.wrapperRef,{placement:p.placement||d,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(S,"px")},flip:{enabled:!1}},onCreate:function(b){i.wrapperPopper=b,i._isMounted&&i.setState({statusWrapper:me.IDLE}),u(b,"wrapper"),d!==b.placement&&setTimeout(function(){b.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var i=this;this.floaterRefInterval=setInterval(function(){var o;(o=i.floaterRef)!==null&&o!==void 0&&o.isConnected&&(clearInterval(i.floaterRefInterval),i.setState({needsUpdate:!1}),i.initPopper())},50)}},{key:"changeWrapperPosition",value:function(i){var o=i.target,l=i.wrapperOptions;this.setState({positionWrapper:l.position&&!!o})}},{key:"toggle",value:function(i){var o=this.state.status,l=o===me.OPEN?me.CLOSING:me.OPENING;B.undefined(i)||(l=i),this.setState({status:l})}},{key:"debug",get:function(){var i=this.props.debug;return i||!!global.ReactFloaterDebug}},{key:"event",get:function(){var i=this.props,o=i.disableHoverToClick,l=i.event;return l==="hover"&&ep()&&!o?"click":l}},{key:"options",get:function(){var i=this.props.options;return Vn(lj,i||{})}},{key:"styles",get:function(){var i=this,o=this.state,l=o.status,a=o.positionWrapper,s=o.statusWrapper,u=this.props.styles,c=Vn(dj(u),u);if(a){var f;[me.IDLE].indexOf(l)===-1||[me.IDLE].indexOf(s)===-1?f=c.wrapperPosition:f=this.wrapperPopper.styles,c.wrapper=De(De({},c.wrapper),f)}if(this.target){var d=window.getComputedStyle(this.target);this.wrapperStyles?c.wrapper=De(De({},c.wrapper),this.wrapperStyles):["relative","static"].indexOf(d.position)===-1&&(this.wrapperStyles={},a||(hj.forEach(function(p){i.wrapperStyles[p]=d[p]}),c.wrapper=De(De({},c.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return c}},{key:"target",get:function(){if(!pr)return null;var i=this.props.target;return i?B.domElement(i)?i:document.querySelector(i):this.childRef||this.wrapperRef}},{key:"render",value:function(){var i=this.state,o=i.currentPlacement,l=i.positionWrapper,a=i.status,s=this.props,u=s.children,c=s.component,f=s.content,d=s.disableAnimation,p=s.footer,h=s.hideArrow,m=s.id,E=s.open,g=s.showCloseButton,y=s.style,w=s.target,S=s.title,_=k.createElement(VC,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:y,styles:this.styles.wrapper},u),b={};return l?b.wrapperInPortal=_:b.wrapperAsChildren=_,k.createElement("span",null,k.createElement(UC,{hasChildren:!!u,id:m,placement:o,setRef:this.setFloaterRef,target:w,zIndex:this.styles.options.zIndex},k.createElement(YC,{component:c,content:f,disableAnimation:d,footer:p,handleClick:this.handleClick,hideArrow:h||o==="center",open:E,placement:o,positionWrapper:l,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:g,status:a,styles:this.styles,title:S}),b.wrapperInPortal),b.wrapperAsChildren)}}]),n}(k.Component);vt(Yg,"propTypes",{autoOpen:M.bool,callback:M.func,children:M.node,component:B0(M.oneOfType([M.func,M.element]),function(e){return!e.content}),content:B0(M.node,function(e){return!e.component}),debug:M.bool,disableAnimation:M.bool,disableFlip:M.bool,disableHoverToClick:M.bool,event:M.oneOf(["hover","click"]),eventDelay:M.number,footer:M.node,getPopper:M.func,hideArrow:M.bool,id:M.oneOfType([M.string,M.number]),offset:M.number,open:M.bool,options:M.object,placement:M.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:M.bool,style:M.object,styles:M.object,target:M.oneOfType([M.object,M.string]),title:M.node,wrapperOptions:M.shape({offset:M.number,placement:M.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:M.bool})});vt(Yg,"defaultProps",{autoOpen:!1,callback:G0,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:G0,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});function J0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function pc(e,t){if(e==null)return{};var n=gj(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function je(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yj(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return je(e)}function oo(e){var t=mj();return function(){var r=dc(e),i;if(t){var o=dc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return yj(this,i)}}var fe={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},xt={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},ue={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},de={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"},$r=wC.canUseDOM,Dl=br.createPortal!==void 0;function $C(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:navigator.userAgent,t=e;return typeof window=="undefined"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.indexOf(" OPR/")>=0?t="opera":typeof window.InstallTrigger!="undefined"?t="firefox":window.chrome?t="chrome":/(Version\/([0-9._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function tp(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function Ll(e){var t=[],n=function r(i){if(typeof i=="string"||typeof i=="number")t.push(i);else if(Array.isArray(i))i.forEach(function(l){return r(l)});else if(i&&i.props){var o=i.props.children;Array.isArray(o)?o.forEach(function(l){return r(l)}):r(o)}};return n(e),t.join(" ").trim()}function K0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vj(e,t){return!Ge.plainObject(e)||!Ge.array(t)?!1:Object.keys(e).every(function(n){return t.indexOf(n)!==-1})}function wj(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=e.replace(t,function(i,o,l,a){return o+o+l+l+a+a}),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:[]}function q0(e){return e.disableBeacon||e.placement==="center"}function $h(e,t){var n,r=P.isValidElement(e)||P.isValidElement(t),i=Ge.undefined(e)||Ge.undefined(t);if(tp(e)!==tp(t)||r||i)return!1;if(Ge.domElement(e))return e.isSameNode(t);if(Ge.number(e))return e===t;if(Ge.function(e))return e.toString()===t.toString();for(var o in e)if(K0(e,o)){if(typeof e[o]=="undefined"||typeof t[o]=="undefined")return!1;if(n=tp(e[o]),["object","array"].indexOf(n)!==-1&&$h(e[o],t[o])||n==="function"&&$h(e[o],t[o]))continue;if(e[o]!==t[o])return!1}for(var l in t)if(K0(t,l)&&typeof e[l]=="undefined")return!1;return!0}function X0(){return["chrome","safari","firefox","opera"].indexOf($C())===-1}function Ki(e){var t=e.title,n=e.data,r=e.warn,i=r===void 0?!1:r,o=e.debug,l=o===void 0?!1:o,a=i?console.warn||console.error:console.log;l&&(t&&n?(console.groupCollapsed("%creact-joyride: ".concat(t),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(s){Ge.plainObject(s)&&s.key?a.apply(console,[s.key,s.value]):a.apply(console,[s])}):a.apply(console,[n]),console.groupEnd()):console.error("Missing title or data props"))}var bj={action:"",controlled:!1,index:0,lifecycle:ue.INIT,size:0,status:de.IDLE},Z0=["action","index","lifecycle","status"];function Ej(e){var t=new Map,n=new Map,r=function(){function i(){var o=this,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=l.continuous,s=a===void 0?!1:a,u=l.stepIndex,c=l.steps,f=c===void 0?[]:c;Pr(this,i),ne(this,"listener",void 0),ne(this,"setSteps",function(d){var p=o.getState(),h=p.size,m=p.status,E={size:d.length,status:m};n.set("steps",d),m===de.WAITING&&!h&&d.length&&(E.status=de.RUNNING),o.setState(E)}),ne(this,"addListener",function(d){o.listener=d}),ne(this,"update",function(d){if(!vj(d,Z0))throw new Error("State is not valid. Valid keys: ".concat(Z0.join(", ")));o.setState(K({},o.getNextState(K(K(K({},o.getState()),d),{},{action:d.action||fe.UPDATE}),!0)))}),ne(this,"start",function(d){var p=o.getState(),h=p.index,m=p.size;o.setState(K(K({},o.getNextState({action:fe.START,index:Ge.number(d)?d:h},!0)),{},{status:m?de.RUNNING:de.WAITING}))}),ne(this,"stop",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=o.getState(),h=p.index,m=p.status;[de.FINISHED,de.SKIPPED].indexOf(m)===-1&&o.setState(K(K({},o.getNextState({action:fe.STOP,index:h+(d?1:0)})),{},{status:de.PAUSED}))}),ne(this,"close",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(K({},o.getNextState({action:fe.CLOSE,index:p+1})))}),ne(this,"go",function(d){var p=o.getState(),h=p.controlled,m=p.status;if(!(h||m!==de.RUNNING)){var E=o.getSteps()[d];o.setState(K(K({},o.getNextState({action:fe.GO,index:d})),{},{status:E?m:de.FINISHED}))}}),ne(this,"info",function(){return o.getState()}),ne(this,"next",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(o.getNextState({action:fe.NEXT,index:p+1}))}),ne(this,"open",function(){var d=o.getState(),p=d.status;p===de.RUNNING&&o.setState(K({},o.getNextState({action:fe.UPDATE,lifecycle:ue.TOOLTIP})))}),ne(this,"prev",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(K({},o.getNextState({action:fe.PREV,index:p-1})))}),ne(this,"reset",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=o.getState(),h=p.controlled;h||o.setState(K(K({},o.getNextState({action:fe.RESET,index:0})),{},{status:d?de.RUNNING:de.READY}))}),ne(this,"skip",function(){var d=o.getState(),p=d.status;p===de.RUNNING&&o.setState({action:fe.SKIP,lifecycle:ue.INIT,status:de.SKIPPED})}),this.setState({action:fe.INIT,controlled:Ge.number(u),continuous:s,index:Ge.number(u)?u:0,lifecycle:ue.INIT,status:f.length?de.READY:de.IDLE},!0),this.setSteps(f)}return Nr(i,[{key:"setState",value:function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.getState(),u=K(K({},s),l),c=u.action,f=u.index,d=u.lifecycle,p=u.size,h=u.status;t.set("action",c),t.set("index",f),t.set("lifecycle",d),t.set("size",p),t.set("status",h),a&&(t.set("controlled",l.controlled),t.set("continuous",l.continuous)),this.listener&&this.hasUpdatedState(s)&&this.listener(this.getState())}},{key:"getState",value:function(){return t.size?{action:t.get("action")||"",controlled:t.get("controlled")||!1,index:parseInt(t.get("index"),10),lifecycle:t.get("lifecycle")||"",size:t.get("size")||0,status:t.get("status")||""}:K({},bj)}},{key:"getNextState",value:function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.getState(),u=s.action,c=s.controlled,f=s.index,d=s.size,p=s.status,h=Ge.number(l.index)?l.index:f,m=c&&!a?f:Math.min(Math.max(h,0),d);return{action:l.action||u,controlled:c,index:m,lifecycle:l.lifecycle||ue.INIT,size:l.size||d,status:m===d?de.FINISHED:l.status||p}}},{key:"hasUpdatedState",value:function(l){var a=JSON.stringify(l),s=JSON.stringify(this.getState());return a!==s}},{key:"getSteps",value:function(){var l=n.get("steps");return Array.isArray(l)?l:[]}},{key:"getHelpers",value:function(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}}]),i}();return new r(e)}function HC(e){return e?e.getBoundingClientRect():{}}function Sj(){var e=document,t=e.body,n=e.documentElement;return!t||!n?0:Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function ai(e){return typeof e=="string"?document.querySelector(e):e}function Aj(e){return!e||e.nodeType!==1?{}:getComputedStyle(e)}function Nf(e,t,n){var r=bC(e);if(r.isSameNode(pa()))return n?document:pa();var i=r.scrollHeight>r.offsetHeight;return!i&&!t?(r.style.overflow="initial",pa()):r}function Rf(e,t){if(!e)return!1;var n=Nf(e,t);return!n.isSameNode(pa())}function xj(e){return e.offsetParent!==document.body}function nl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"fixed";if(!e||!(e instanceof HTMLElement))return!1;var n=e.nodeName;return n==="BODY"||n==="HTML"?!1:Aj(e).position===t?!0:nl(e.parentNode,t)}function Cj(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if(t instanceof HTMLElement){var n=getComputedStyle(t),r=n.display,i=n.visibility;if(r==="none"||i==="hidden")return!1}t=t.parentNode}return!0}function _j(e,t,n){var r=HC(e),i=Nf(e,n),o=Rf(e,n),l=0;i instanceof HTMLElement&&(l=i.scrollTop);var a=r.top+(!o&&!nl(e)?l:0);return Math.floor(a-t)}function Hh(e){return e instanceof HTMLElement?e.offsetParent instanceof HTMLElement?Hh(e.offsetParent)+e.offsetTop:e.offsetTop:0}function kj(e,t,n){if(!e)return 0;var r=bC(e),i=Hh(e);return Rf(e,n)&&!xj(e)&&(i-=Hh(r)),Math.floor(i-t)}function pa(){return document.scrollingElement||document.createElement("body")}function Tj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pa(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300;return new Promise(function(r,i){var o=t.scrollTop,l=e>o?e-o:o-e;KU.top(t,e,{duration:l<100?50:n},function(a){return a&&a.message!=="Element already at target scroll position"?i(a):r()})})}function Ij(e){function t(r,i,o,l,a,s){var u=l||"<>",c=s||o;if(i[o]==null)return r?new Error("Required ".concat(a," `").concat(c,"` was not specified in `").concat(u,"`.")):null;for(var f=arguments.length,d=new Array(f>6?f-6:0),p=6;p0&&arguments[0]!==void 0?arguments[0]:{},t=Vn(Oj,e.options||{}),n=290;window.innerWidth>480&&(n=380),t.width&&(window.innerWidth1&&arguments[1]!==void 0?arguments[1]:!1;return Ge.plainObject(e)?e.target?!0:(Ki({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(Ki({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function tw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ge.array(e)?e.every(function(n){return GC(n,t)}):(Ki({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Rj=Nr(function e(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Pr(this,e),ne(this,"element",void 0),ne(this,"options",void 0),ne(this,"canBeTabbed",function(i){var o=i.tabIndex;(o===null||o<0)&&(o=void 0);var l=isNaN(o);return!l&&n.canHaveFocus(i)}),ne(this,"canHaveFocus",function(i){var o=/input|select|textarea|button|object/,l=i.nodeName.toLowerCase(),a=o.test(l)&&!i.getAttribute("disabled")||l==="a"&&!!i.getAttribute("href");return a&&n.isVisible(i)}),ne(this,"findValidTabElements",function(){return[].slice.call(n.element.querySelectorAll("*"),0).filter(n.canBeTabbed)}),ne(this,"handleKeyDown",function(i){var o=n.options.keyCode,l=o===void 0?9:o;i.keyCode===l&&n.interceptTab(i)}),ne(this,"interceptTab",function(i){var o=n.findValidTabElements();if(o.length){i.preventDefault();var l=i.shiftKey,a=o.indexOf(document.activeElement);a===-1||!l&&a+1===o.length?a=0:l&&a===0?a=o.length-1:a+=l?-1:1,o[a].focus()}}),ne(this,"isHidden",function(i){var o=i.offsetWidth<=0&&i.offsetHeight<=0,l=window.getComputedStyle(i);return o&&!i.innerHTML?!0:o&&l.getPropertyValue("overflow")!=="visible"||l.getPropertyValue("display")==="none"}),ne(this,"isVisible",function(i){for(var o=i;o;)if(o instanceof HTMLElement){if(o===document.body)break;if(n.isHidden(o))return!1;o=o.parentNode}return!0}),ne(this,"removeScope",function(){window.removeEventListener("keydown",n.handleKeyDown)}),ne(this,"checkFocus",function(i){document.activeElement!==i&&(i.focus(),window.requestAnimationFrame(function(){return n.checkFocus(i)}))}),ne(this,"setFocus",function(){var i=n.options.selector;if(i){var o=n.element.querySelector(i);o&&window.requestAnimationFrame(function(){return n.checkFocus(o)})}}),!(t instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=t,this.options=r,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}),Dj=function(e){io(n,e);var t=oo(n);function n(r){var i;if(Pr(this,n),i=t.call(this,r),ne(je(i),"setBeaconRef",function(s){i.beacon=s}),!r.beaconComponent){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style"),a=` + */var ls=typeof window!="undefined"&&typeof document!="undefined"&&typeof navigator!="undefined",Sz=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();function Az(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function xz(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Sz))}}var Cz=ls&&window.Promise,_z=Cz?Az:xz;function AC(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function ro(e,t){if(e.nodeType!==1)return[];var n=e.ownerDocument.defaultView,r=n.getComputedStyle(e,null);return t?r[t]:r}function Bg(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function as(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=ro(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:as(Bg(e))}function xC(e){return e&&e.referenceNode?e.referenceNode:e}var U0=ls&&!!(window.MSInputMethodContext&&document.documentMode),z0=ls&&/MSIE 10/.test(navigator.userAgent);function hl(e){return e===11?U0:e===10?z0:U0||z0}function Zo(e){if(!e)return document.documentElement;for(var t=hl(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return!r||r==="BODY"||r==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(n.nodeName)!==-1&&ro(n,"position")==="static"?Zo(n):n}function kz(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Zo(e.firstElementChild)===e}function Uh(e){return e.parentNode!==null?Uh(e.parentNode):e}function uc(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return kz(l)?l:Zo(l);var a=Uh(e);return a.host?uc(a.host,t):uc(e,Uh(t).host)}function el(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",n=t==="top"?"scrollTop":"scrollLeft",r=e.nodeName;if(r==="BODY"||r==="HTML"){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function Tz(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=el(t,"top"),i=el(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function j0(e,t){var n=t==="x"?"Left":"Top",r=n==="Left"?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function W0(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],hl(10)?parseInt(n["offset"+e])+parseInt(r["margin"+(e==="Height"?"Top":"Left")])+parseInt(r["margin"+(e==="Height"?"Bottom":"Right")]):0)}function CC(e){var t=e.body,n=e.documentElement,r=hl(10)&&getComputedStyle(n);return{height:W0("Height",t,n,r),width:W0("Width",t,n,r)}}var Iz=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Oz=function(){function e(t,n){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=hl(10),i=t.nodeName==="HTML",o=zh(e),l=zh(t),a=as(e),s=ro(t),u=parseFloat(s.borderTopWidth),c=parseFloat(s.borderLeftWidth);n&&i&&(l.top=Math.max(l.top,0),l.left=Math.max(l.left,0));var f=hi({top:o.top-l.top-u,left:o.left-l.left-c,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var d=parseFloat(s.marginTop),p=parseFloat(s.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(r&&!n?t.contains(a):t===a&&a.nodeName!=="BODY")&&(f=Tz(f,t)),f}function Pz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.ownerDocument.documentElement,r=Ug(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),l=t?0:el(n),a=t?0:el(n,"left"),s={top:l-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:i,height:o};return hi(s)}function _C(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(ro(e,"position")==="fixed")return!0;var n=Bg(e);return n?_C(n):!1}function kC(e){if(!e||!e.parentElement||hl())return document.documentElement;for(var t=e.parentElement;t&&ro(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function zg(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o={top:0,left:0},l=i?kC(e):uc(e,xC(t));if(r==="viewport")o=Pz(l,i);else{var a=void 0;r==="scrollParent"?(a=as(Bg(t)),a.nodeName==="BODY"&&(a=e.ownerDocument.documentElement)):r==="window"?a=e.ownerDocument.documentElement:a=r;var s=Ug(a,l,i);if(a.nodeName==="HTML"&&!_C(l)){var u=CC(e.ownerDocument),c=u.height,f=u.width;o.top+=s.top-s.marginTop,o.bottom=c+s.top,o.left+=s.left-s.marginLeft,o.right=f+s.left}else o=s}n=n||0;var d=typeof n=="number";return o.left+=d?n:n.left||0,o.top+=d?n:n.top||0,o.right-=d?n:n.right||0,o.bottom-=d?n:n.bottom||0,o}function Nz(e){var t=e.width,n=e.height;return t*n}function TC(e,t,n,r,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var l=zg(n,r,o,i),a={top:{width:l.width,height:t.top-l.top},right:{width:l.right-t.right,height:l.height},bottom:{width:l.width,height:l.bottom-t.bottom},left:{width:t.left-l.left,height:l.height}},s=Object.keys(a).map(function(d){return cn({key:d},a[d],{area:Nz(a[d])})}).sort(function(d,p){return p.area-d.area}),u=s.filter(function(d){var p=d.width,h=d.height;return p>=n.clientWidth&&h>=n.clientHeight}),c=u.length>0?u[0].key:s[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function IC(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=r?kC(t):uc(t,xC(n));return Ug(n,i,r)}function OC(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),r=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),i=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),o={width:e.offsetWidth+i,height:e.offsetHeight+r};return o}function cc(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(n){return t[n]})}function PC(e,t,n){n=n.split("-")[0];var r=OC(e),i={width:r.width,height:r.height},o=["right","left"].indexOf(n)!==-1,l=o?"top":"left",a=o?"left":"top",s=o?"height":"width",u=o?"width":"height";return i[l]=t[l]+t[s]/2-r[s]/2,n===a?i[a]=t[a]-r[u]:i[a]=t[cc(a)],i}function ss(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Rz(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===n});var r=ss(e,function(i){return i[t]===n});return e.indexOf(r)}function NC(e,t,n){var r=n===void 0?e:e.slice(0,Rz(e,"name",n));return r.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=i.function||i.fn;i.enabled&&AC(o)&&(t.offsets.popper=hi(t.offsets.popper),t.offsets.reference=hi(t.offsets.reference),t=o(t,i))}),t}function Dz(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=IC(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=TC(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=PC(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=NC(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function RC(e,t){return e.some(function(n){var r=n.name,i=n.enabled;return i&&r===t})}function jg(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;rl[p]&&(e.offsets.popper[f]+=a[f]+h-l[p]),e.offsets.popper=hi(e.offsets.popper);var m=a[f]+a[u]/2-h/2,E=ro(e.instance.popper),g=parseFloat(E["margin"+c]),y=parseFloat(E["border"+c+"Width"]),w=m-e.offsets.popper[f]-g-y;return w=Math.max(Math.min(l[u]-h,w),0),e.arrowElement=r,e.offsets.arrow=(n={},tl(n,f,Math.round(w)),tl(n,d,""),n),e}function Gz(e){return e==="end"?"start":e==="start"?"end":e}var MC=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Xd=MC.slice(3);function Y0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Xd.indexOf(e),r=Xd.slice(n+1).concat(Xd.slice(0,n));return t?r.reverse():r}var Zd={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Jz(e,t){if(RC(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var n=zg(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=cc(r),o=e.placement.split("-")[1]||"",l=[];switch(t.behavior){case Zd.FLIP:l=[r,i];break;case Zd.CLOCKWISE:l=Y0(r);break;case Zd.COUNTERCLOCKWISE:l=Y0(r,!0);break;default:l=t.behavior}return l.forEach(function(a,s){if(r!==a||l.length===s+1)return e;r=e.placement.split("-")[0],i=cc(r);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=r==="left"&&f(u.right)>f(c.left)||r==="right"&&f(u.left)f(c.top)||r==="bottom"&&f(u.top)f(n.right),m=f(u.top)f(n.bottom),g=r==="left"&&p||r==="right"&&h||r==="top"&&m||r==="bottom"&&E,y=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(y&&o==="start"&&p||y&&o==="end"&&h||!y&&o==="start"&&m||!y&&o==="end"&&E),S=!!t.flipVariationsByContent&&(y&&o==="start"&&h||y&&o==="end"&&p||!y&&o==="start"&&E||!y&&o==="end"&&m),_=w||S;(d||g||_)&&(e.flipped=!0,(d||g)&&(r=l[s+1]),_&&(o=Gz(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=cn({},e.offsets.popper,PC(e.instance.popper,e.offsets.reference,e.placement)),e=NC(e.instance.modifiers,e,"flip"))}),e}function Qz(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,l=["top","bottom"].indexOf(i)!==-1,a=l?"right":"bottom",s=l?"left":"top",u=l?"width":"height";return n[a]o(r[a])&&(e.offsets.popper[s]=o(r[a])),e}function Kz(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],l=i[2];if(!o)return e;if(l.indexOf("%")===0){var a=void 0;switch(l){case"%p":a=n;break;case"%":case"%r":default:a=r}var s=hi(a);return s[t]/100*o}else if(l==="vh"||l==="vw"){var u=void 0;return l==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*o}else return o}function qz(e,t,n,r){var i=[0,0],o=["right","left"].indexOf(r)!==-1,l=e.split(/(\+|\-)/).map(function(c){return c.trim()}),a=l.indexOf(ss(l,function(c){return c.search(/,|\s/)!==-1}));l[a]&&l[a].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,u=a!==-1?[l.slice(0,a).concat([l[a].split(s)[0]]),[l[a].split(s)[1]].concat(l.slice(a+1))]:[l];return u=u.map(function(c,f){var d=(f===1?!o:o)?"height":"width",p=!1;return c.reduce(function(h,m){return h[h.length-1]===""&&["+","-"].indexOf(m)!==-1?(h[h.length-1]=m,p=!0,h):p?(h[h.length-1]+=m,p=!1,h):h.concat(m)},[]).map(function(h){return Kz(h,d,t,n)})}),u.forEach(function(c,f){c.forEach(function(d,p){Wg(d)&&(i[f]+=d*(c[p-1]==="-"?-1:1))})}),i}function Xz(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,l=i.reference,a=r.split("-")[0],s=void 0;return Wg(+n)?s=[+n,0]:s=qz(n,o,l,a),a==="left"?(o.top+=s[0],o.left-=s[1]):a==="right"?(o.top+=s[0],o.left+=s[1]):a==="top"?(o.left+=s[0],o.top-=s[1]):a==="bottom"&&(o.left+=s[0],o.top+=s[1]),e.popper=o,e}function Zz(e,t){var n=t.boundariesElement||Zo(e.instance.popper);e.instance.reference===n&&(n=Zo(n));var r=jg("transform"),i=e.instance.popper.style,o=i.top,l=i.left,a=i[r];i.top="",i.left="",i[r]="";var s=zg(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=l,i[r]=a,t.boundaries=s;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]s[p]&&!t.escapeWithReference&&(m=Math.min(c[h],s[p]-(p==="right"?c.width:c.height))),tl({},h,m)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=cn({},c,f[p](d))}),e.offsets.popper=c,e}function ej(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,l=i.popper,a=["bottom","top"].indexOf(n)!==-1,s=a?"left":"top",u=a?"width":"height",c={start:tl({},s,o[s]),end:tl({},s,o[s]+o[u]-l[u])};e.offsets.popper=cn({},l,c[r])}return e}function tj(e){if(!FC(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=ss(e.instance.modifiers,function(r){return r.name==="preventOverflow"}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};Iz(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=_z(this.update.bind(this)),this.options=cn({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(cn({},e.Defaults.modifiers,i.modifiers)).forEach(function(l){r.options.modifiers[l]=cn({},e.Defaults.modifiers[l]||{},i.modifiers?i.modifiers[l]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(l){return cn({name:l},r.options.modifiers[l])}).sort(function(l,a){return l.order-a.order}),this.modifiers.forEach(function(l){l.enabled&&AC(l.onLoad)&&l.onLoad(r.reference,r.popper,r.options,l,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return Oz(e,[{key:"update",value:function(){return Dz.call(this)}},{key:"destroy",value:function(){return Lz.call(this)}},{key:"enableEventListeners",value:function(){return Mz.call(this)}},{key:"disableEventListeners",value:function(){return Uz.call(this)}}]),e}();Pf.Utils=(typeof window!="undefined"?window:global).PopperUtils;Pf.placements=MC;Pf.Defaults=ij;const V0=Pf;function $0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function De(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function BC(e,t){if(e==null)return{};var n=lj(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aj(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sr(e)}function ds(e){var t=oj();return function(){var r=fc(e),i;if(t){var o=fc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return aj(this,i)}}var sj={flip:{padding:20},preventOverflow:{padding:10}},me={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},pr=wC.canUseDOM,Rl=Mi.createPortal!==void 0;function ep(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function js(e){var t=e.title,n=e.data,r=e.warn,i=r===void 0?!1:r,o=e.debug,l=o===void 0?!1:o,a=i?console.warn||console.error:console.log;l&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(s){B.plainObject(s)&&s.key?a.apply(console,[s.key,s.value]):a.apply(console,[s])}):a.apply(console,[n]),console.groupEnd())}function uj(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,n,r)}function cj(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,n,r)}function fj(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i;i=function(l){n(l),cj(e,t,i)},uj(e,t,i,r)}function G0(){}var UC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"componentDidMount",value:function(){pr&&(this.node||this.appendNode(),Rl||this.renderPortal())}},{key:"componentDidUpdate",value:function(){pr&&(Rl||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!pr||!this.node||(Rl||Mi.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var i=this.props,o=i.id,l=i.zIndex;this.node||(this.node=document.createElement("div"),o&&(this.node.id=o),l&&(this.node.style.zIndex=l),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!pr)return null;var i=this.props,o=i.children,l=i.setRef;if(this.node||this.appendNode(),Rl)return Mi.createPortal(o,this.node);var a=Mi.unstable_renderSubtreeIntoContainer(this,o.length>1?k.createElement("div",null,o):o[0],this.node);return l(a),null}},{key:"renderReact16",value:function(){var i=this.props,o=i.hasChildren,l=i.placement,a=i.target;return o?this.renderPortal():a||l==="center"?this.renderPortal():null}},{key:"render",value:function(){return Rl?this.renderReact16():null}}]),n}(k.Component);vt(UC,"propTypes",{children:M.oneOfType([M.element,M.array]),hasChildren:M.bool,id:M.oneOfType([M.string,M.number]),placement:M.string,setRef:M.func.isRequired,target:M.oneOfType([M.object,M.string]),zIndex:M.number});var zC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"parentStyle",get:function(){var i=this.props,o=i.placement,l=i.styles,a=l.arrow.length,s={pointerEvents:"none",position:"absolute",width:"100%"};return o.startsWith("top")?(s.bottom=0,s.left=0,s.right=0,s.height=a):o.startsWith("bottom")?(s.left=0,s.right=0,s.top=0,s.height=a):o.startsWith("left")?(s.right=0,s.top=0,s.bottom=0):o.startsWith("right")&&(s.left=0,s.top=0),s}},{key:"render",value:function(){var i=this.props,o=i.placement,l=i.setArrowRef,a=i.styles,s=a.arrow,u=s.color,c=s.display,f=s.length,d=s.margin,p=s.position,h=s.spread,m={display:c,position:p},E,g=h,y=f;return o.startsWith("top")?(E="0,0 ".concat(g/2,",").concat(y," ").concat(g,",0"),m.bottom=0,m.marginLeft=d,m.marginRight=d):o.startsWith("bottom")?(E="".concat(g,",").concat(y," ").concat(g/2,",0 0,").concat(y),m.top=0,m.marginLeft=d,m.marginRight=d):o.startsWith("left")?(y=h,g=f,E="0,0 ".concat(g,",").concat(y/2," 0,").concat(y),m.right=0,m.marginTop=d,m.marginBottom=d):o.startsWith("right")&&(y=h,g=f,E="".concat(g,",").concat(y," ").concat(g,",0 0,").concat(y/2),m.left=0,m.marginTop=d,m.marginBottom=d),k.createElement("div",{className:"__floater__arrow",style:this.parentStyle},k.createElement("span",{ref:l,style:m},k.createElement("svg",{width:g,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k.createElement("polygon",{points:E,fill:u}))))}}]),n}(k.Component);vt(zC,"propTypes",{placement:M.string.isRequired,setArrowRef:M.func.isRequired,styles:M.object.isRequired});var dj=["color","height","width"],jC=function(t){var n=t.handleClick,r=t.styles,i=r.color,o=r.height,l=r.width,a=BC(r,dj);return k.createElement("button",{"aria-label":"close",onClick:n,style:a,type:"button"},k.createElement("svg",{width:"".concat(l,"px"),height:"".concat(o,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},k.createElement("g",null,k.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:i}))))};jC.propTypes={handleClick:M.func.isRequired,styles:M.object.isRequired};var WC=function(t){var n=t.content,r=t.footer,i=t.handleClick,o=t.open,l=t.positionWrapper,a=t.showCloseButton,s=t.title,u=t.styles,c={content:k.isValidElement(n)?n:k.createElement("div",{className:"__floater__content",style:u.content},n)};return s&&(c.title=k.isValidElement(s)?s:k.createElement("div",{className:"__floater__title",style:u.title},s)),r&&(c.footer=k.isValidElement(r)?r:k.createElement("div",{className:"__floater__footer",style:u.footer},r)),(a||l)&&!B.boolean(o)&&(c.close=k.createElement(jC,{styles:u.close,handleClick:i})),k.createElement("div",{className:"__floater__container",style:u.container},c.close,c.title,c.content,c.footer)};WC.propTypes={content:M.node.isRequired,footer:M.node,handleClick:M.func.isRequired,open:M.bool,positionWrapper:M.bool.isRequired,showCloseButton:M.bool.isRequired,styles:M.object.isRequired,title:M.node};var YC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"style",get:function(){var i=this.props,o=i.disableAnimation,l=i.component,a=i.placement,s=i.hideArrow,u=i.status,c=i.styles,f=c.arrow.length,d=c.floater,p=c.floaterCentered,h=c.floaterClosing,m=c.floaterOpening,E=c.floaterWithAnimation,g=c.floaterWithComponent,y={};return s||(a.startsWith("top")?y.padding="0 0 ".concat(f,"px"):a.startsWith("bottom")?y.padding="".concat(f,"px 0 0"):a.startsWith("left")?y.padding="0 ".concat(f,"px 0 0"):a.startsWith("right")&&(y.padding="0 0 0 ".concat(f,"px"))),[me.OPENING,me.OPEN].indexOf(u)!==-1&&(y=De(De({},y),m)),u===me.CLOSING&&(y=De(De({},y),h)),u===me.OPEN&&!o&&(y=De(De({},y),E)),a==="center"&&(y=De(De({},y),p)),l&&(y=De(De({},y),g)),De(De({},d),y)}},{key:"render",value:function(){var i=this.props,o=i.component,l=i.handleClick,a=i.hideArrow,s=i.setFloaterRef,u=i.status,c={},f=["__floater"];return o?k.isValidElement(o)?c.content=k.cloneElement(o,{closeFn:l}):c.content=o({closeFn:l}):c.content=k.createElement(WC,this.props),u===me.OPEN&&f.push("__floater__open"),a||(c.arrow=k.createElement(zC,this.props)),k.createElement("div",{ref:s,className:f.join(" "),style:this.style},k.createElement("div",{className:"__floater__body"},c.content,c.arrow))}}]),n}(k.Component);vt(YC,"propTypes",{component:M.oneOfType([M.func,M.element]),content:M.node,disableAnimation:M.bool.isRequired,footer:M.node,handleClick:M.func.isRequired,hideArrow:M.bool.isRequired,open:M.bool,placement:M.string.isRequired,positionWrapper:M.bool.isRequired,setArrowRef:M.func.isRequired,setFloaterRef:M.func.isRequired,showCloseButton:M.bool,status:M.string.isRequired,styles:M.object.isRequired,title:M.node});var VC=function(e){fs(n,e);var t=ds(n);function n(){return us(this,n),t.apply(this,arguments)}return cs(n,[{key:"render",value:function(){var i=this.props,o=i.children,l=i.handleClick,a=i.handleMouseEnter,s=i.handleMouseLeave,u=i.setChildRef,c=i.setWrapperRef,f=i.style,d=i.styles,p;if(o)if(k.Children.count(o)===1)if(!k.isValidElement(o))p=k.createElement("span",null,o);else{var h=B.function(o.type)?"innerRef":"ref";p=k.cloneElement(k.Children.only(o),vt({},h,u))}else p=o;return p?k.createElement("span",{ref:c,style:De(De({},d),f),onClick:l,onMouseEnter:a,onMouseLeave:s},p):null}}]),n}(k.Component);vt(VC,"propTypes",{children:M.node,handleClick:M.func.isRequired,handleMouseEnter:M.func.isRequired,handleMouseLeave:M.func.isRequired,setChildRef:M.func.isRequired,setWrapperRef:M.func.isRequired,style:M.object,styles:M.object.isRequired});var pj={zIndex:100};function hj(e){var t=Vn(pj,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var mj=["arrow","flip","offset"],gj=["position","top","right","bottom","left"],Yg=function(e){fs(n,e);var t=ds(n);function n(r){var i;return us(this,n),i=t.call(this,r),vt(sr(i),"setArrowRef",function(o){i.arrowRef=o}),vt(sr(i),"setChildRef",function(o){i.childRef=o}),vt(sr(i),"setFloaterRef",function(o){i.floaterRef=o}),vt(sr(i),"setWrapperRef",function(o){i.wrapperRef=o}),vt(sr(i),"handleTransitionEnd",function(){var o=i.state.status,l=i.props.callback;i.wrapperPopper&&i.wrapperPopper.instance.update(),i.setState({status:o===me.OPENING?me.OPEN:me.IDLE},function(){var a=i.state.status;l(a===me.OPEN?"open":"close",i.props)})}),vt(sr(i),"handleClick",function(){var o=i.props,l=o.event,a=o.open;if(!B.boolean(a)){var s=i.state,u=s.positionWrapper,c=s.status;(i.event==="click"||i.event==="hover"&&u)&&(js({title:"click",data:[{event:l,status:c===me.OPEN?"closing":"opening"}],debug:i.debug}),i.toggle())}}),vt(sr(i),"handleMouseEnter",function(){var o=i.props,l=o.event,a=o.open;if(!(B.boolean(a)||ep())){var s=i.state.status;i.event==="hover"&&s===me.IDLE&&(js({title:"mouseEnter",data:[{key:"originalEvent",value:l}],debug:i.debug}),clearTimeout(i.eventDelayTimeout),i.toggle())}}),vt(sr(i),"handleMouseLeave",function(){var o=i.props,l=o.event,a=o.eventDelay,s=o.open;if(!(B.boolean(s)||ep())){var u=i.state,c=u.status,f=u.positionWrapper;i.event==="hover"&&(js({title:"mouseLeave",data:[{key:"originalEvent",value:l}],debug:i.debug}),a?[me.OPENING,me.OPEN].indexOf(c)!==-1&&!f&&!i.eventDelayTimeout&&(i.eventDelayTimeout=setTimeout(function(){delete i.eventDelayTimeout,i.toggle()},a*1e3)):i.toggle(me.IDLE))}}),i.state={currentPlacement:r.placement,needsUpdate:!1,positionWrapper:r.wrapperOptions.position&&!!r.target,status:me.INIT,statusWrapper:me.INIT},i._isMounted=!1,i.hasMounted=!1,pr&&window.addEventListener("load",function(){i.popper&&i.popper.instance.update(),i.wrapperPopper&&i.wrapperPopper.instance.update()}),i}return cs(n,[{key:"componentDidMount",value:function(){if(pr){var i=this.state.positionWrapper,o=this.props,l=o.children,a=o.open,s=o.target;this._isMounted=!0,js({title:"init",data:{hasChildren:!!l,hasTarget:!!s,isControlled:B.boolean(a),positionWrapper:i,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!l&&s&&B.boolean(a)}}},{key:"componentDidUpdate",value:function(i,o){if(pr){var l=this.props,a=l.autoOpen,s=l.open,u=l.target,c=l.wrapperOptions,f=ja(o,this.state),d=f.changedFrom,p=f.changed;if(i.open!==s){var h;B.boolean(s)&&(h=s?me.OPENING:me.CLOSING),this.toggle(h)}(i.wrapperOptions.position!==c.position||i.target!==u)&&this.changeWrapperPosition(this.props),p("status",me.IDLE)&&s?this.toggle(me.OPEN):d("status",me.INIT,me.IDLE)&&a&&this.toggle(me.OPEN),this.popper&&p("status",me.OPENING)&&this.popper.instance.update(),this.floaterRef&&(p("status",me.OPENING)||p("status",me.CLOSING))&&fj(this.floaterRef,"transitionend",this.handleTransitionEnd),p("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){pr&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,l=this.state.positionWrapper,a=this.props,s=a.disableFlip,u=a.getPopper,c=a.hideArrow,f=a.offset,d=a.placement,p=a.wrapperOptions,h=d==="top"||d==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(d==="center")this.setState({status:me.IDLE});else if(o&&this.floaterRef){var m=this.options,E=m.arrow,g=m.flip,y=m.offset,w=BC(m,mj);new V0(o,this.floaterRef,{placement:d,modifiers:De({arrow:De({enabled:!c,element:this.arrowRef},E),flip:De({enabled:!s,behavior:h},g),offset:De({offset:"0, ".concat(f,"px")},y)},w),onCreate:function(b){var A;if(i.popper=b,!((A=i.floaterRef)!==null&&A!==void 0&&A.isConnected)){i.setState({needsUpdate:!0});return}u(b,"floater"),i._isMounted&&i.setState({currentPlacement:b.placement,status:me.IDLE}),d!==b.placement&&setTimeout(function(){b.instance.update()},1)},onUpdate:function(b){i.popper=b;var A=i.state.currentPlacement;i._isMounted&&b.placement!==A&&i.setState({currentPlacement:b.placement})}})}if(l){var S=B.undefined(p.offset)?0:p.offset;new V0(this.target,this.wrapperRef,{placement:p.placement||d,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(S,"px")},flip:{enabled:!1}},onCreate:function(b){i.wrapperPopper=b,i._isMounted&&i.setState({statusWrapper:me.IDLE}),u(b,"wrapper"),d!==b.placement&&setTimeout(function(){b.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var i=this;this.floaterRefInterval=setInterval(function(){var o;(o=i.floaterRef)!==null&&o!==void 0&&o.isConnected&&(clearInterval(i.floaterRefInterval),i.setState({needsUpdate:!1}),i.initPopper())},50)}},{key:"changeWrapperPosition",value:function(i){var o=i.target,l=i.wrapperOptions;this.setState({positionWrapper:l.position&&!!o})}},{key:"toggle",value:function(i){var o=this.state.status,l=o===me.OPEN?me.CLOSING:me.OPENING;B.undefined(i)||(l=i),this.setState({status:l})}},{key:"debug",get:function(){var i=this.props.debug;return i||!!global.ReactFloaterDebug}},{key:"event",get:function(){var i=this.props,o=i.disableHoverToClick,l=i.event;return l==="hover"&&ep()&&!o?"click":l}},{key:"options",get:function(){var i=this.props.options;return Vn(sj,i||{})}},{key:"styles",get:function(){var i=this,o=this.state,l=o.status,a=o.positionWrapper,s=o.statusWrapper,u=this.props.styles,c=Vn(hj(u),u);if(a){var f;[me.IDLE].indexOf(l)===-1||[me.IDLE].indexOf(s)===-1?f=c.wrapperPosition:f=this.wrapperPopper.styles,c.wrapper=De(De({},c.wrapper),f)}if(this.target){var d=window.getComputedStyle(this.target);this.wrapperStyles?c.wrapper=De(De({},c.wrapper),this.wrapperStyles):["relative","static"].indexOf(d.position)===-1&&(this.wrapperStyles={},a||(gj.forEach(function(p){i.wrapperStyles[p]=d[p]}),c.wrapper=De(De({},c.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return c}},{key:"target",get:function(){if(!pr)return null;var i=this.props.target;return i?B.domElement(i)?i:document.querySelector(i):this.childRef||this.wrapperRef}},{key:"render",value:function(){var i=this.state,o=i.currentPlacement,l=i.positionWrapper,a=i.status,s=this.props,u=s.children,c=s.component,f=s.content,d=s.disableAnimation,p=s.footer,h=s.hideArrow,m=s.id,E=s.open,g=s.showCloseButton,y=s.style,w=s.target,S=s.title,_=k.createElement(VC,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:y,styles:this.styles.wrapper},u),b={};return l?b.wrapperInPortal=_:b.wrapperAsChildren=_,k.createElement("span",null,k.createElement(UC,{hasChildren:!!u,id:m,placement:o,setRef:this.setFloaterRef,target:w,zIndex:this.styles.options.zIndex},k.createElement(YC,{component:c,content:f,disableAnimation:d,footer:p,handleClick:this.handleClick,hideArrow:h||o==="center",open:E,placement:o,positionWrapper:l,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:g,status:a,styles:this.styles,title:S}),b.wrapperInPortal),b.wrapperAsChildren)}}]),n}(k.Component);vt(Yg,"propTypes",{autoOpen:M.bool,callback:M.func,children:M.node,component:B0(M.oneOfType([M.func,M.element]),function(e){return!e.content}),content:B0(M.node,function(e){return!e.component}),debug:M.bool,disableAnimation:M.bool,disableFlip:M.bool,disableHoverToClick:M.bool,event:M.oneOf(["hover","click"]),eventDelay:M.number,footer:M.node,getPopper:M.func,hideArrow:M.bool,id:M.oneOfType([M.string,M.number]),offset:M.number,open:M.bool,options:M.object,placement:M.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:M.bool,style:M.object,styles:M.object,target:M.oneOfType([M.object,M.string]),title:M.node,wrapperOptions:M.shape({offset:M.number,placement:M.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:M.bool})});vt(Yg,"defaultProps",{autoOpen:!1,callback:G0,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:G0,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});function J0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function pc(e,t){if(e==null)return{};var n=vj(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function je(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wj(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return je(e)}function oo(e){var t=yj();return function(){var r=dc(e),i;if(t){var o=dc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return wj(this,i)}}var fe={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},xt={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},ue={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},de={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"},$r=wC.canUseDOM,Dl=br.createPortal!==void 0;function $C(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:navigator.userAgent,t=e;return typeof window=="undefined"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.indexOf(" OPR/")>=0?t="opera":typeof window.InstallTrigger!="undefined"?t="firefox":window.chrome?t="chrome":/(Version\/([0-9._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function tp(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function Ll(e){var t=[],n=function r(i){if(typeof i=="string"||typeof i=="number")t.push(i);else if(Array.isArray(i))i.forEach(function(l){return r(l)});else if(i&&i.props){var o=i.props.children;Array.isArray(o)?o.forEach(function(l){return r(l)}):r(o)}};return n(e),t.join(" ").trim()}function K0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function bj(e,t){return!Ge.plainObject(e)||!Ge.array(t)?!1:Object.keys(e).every(function(n){return t.indexOf(n)!==-1})}function Ej(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=e.replace(t,function(i,o,l,a){return o+o+l+l+a+a}),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:[]}function q0(e){return e.disableBeacon||e.placement==="center"}function Vh(e,t){var n,r=O.isValidElement(e)||O.isValidElement(t),i=Ge.undefined(e)||Ge.undefined(t);if(tp(e)!==tp(t)||r||i)return!1;if(Ge.domElement(e))return e.isSameNode(t);if(Ge.number(e))return e===t;if(Ge.function(e))return e.toString()===t.toString();for(var o in e)if(K0(e,o)){if(typeof e[o]=="undefined"||typeof t[o]=="undefined")return!1;if(n=tp(e[o]),["object","array"].indexOf(n)!==-1&&Vh(e[o],t[o])||n==="function"&&Vh(e[o],t[o]))continue;if(e[o]!==t[o])return!1}for(var l in t)if(K0(t,l)&&typeof e[l]=="undefined")return!1;return!0}function X0(){return["chrome","safari","firefox","opera"].indexOf($C())===-1}function Ki(e){var t=e.title,n=e.data,r=e.warn,i=r===void 0?!1:r,o=e.debug,l=o===void 0?!1:o,a=i?console.warn||console.error:console.log;l&&(t&&n?(console.groupCollapsed("%creact-joyride: ".concat(t),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(s){Ge.plainObject(s)&&s.key?a.apply(console,[s.key,s.value]):a.apply(console,[s])}):a.apply(console,[n]),console.groupEnd()):console.error("Missing title or data props"))}var Sj={action:"",controlled:!1,index:0,lifecycle:ue.INIT,size:0,status:de.IDLE},Z0=["action","index","lifecycle","status"];function Aj(e){var t=new Map,n=new Map,r=function(){function i(){var o=this,l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=l.continuous,s=a===void 0?!1:a,u=l.stepIndex,c=l.steps,f=c===void 0?[]:c;Pr(this,i),ne(this,"listener",void 0),ne(this,"setSteps",function(d){var p=o.getState(),h=p.size,m=p.status,E={size:d.length,status:m};n.set("steps",d),m===de.WAITING&&!h&&d.length&&(E.status=de.RUNNING),o.setState(E)}),ne(this,"addListener",function(d){o.listener=d}),ne(this,"update",function(d){if(!bj(d,Z0))throw new Error("State is not valid. Valid keys: ".concat(Z0.join(", ")));o.setState(K({},o.getNextState(K(K(K({},o.getState()),d),{},{action:d.action||fe.UPDATE}),!0)))}),ne(this,"start",function(d){var p=o.getState(),h=p.index,m=p.size;o.setState(K(K({},o.getNextState({action:fe.START,index:Ge.number(d)?d:h},!0)),{},{status:m?de.RUNNING:de.WAITING}))}),ne(this,"stop",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=o.getState(),h=p.index,m=p.status;[de.FINISHED,de.SKIPPED].indexOf(m)===-1&&o.setState(K(K({},o.getNextState({action:fe.STOP,index:h+(d?1:0)})),{},{status:de.PAUSED}))}),ne(this,"close",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(K({},o.getNextState({action:fe.CLOSE,index:p+1})))}),ne(this,"go",function(d){var p=o.getState(),h=p.controlled,m=p.status;if(!(h||m!==de.RUNNING)){var E=o.getSteps()[d];o.setState(K(K({},o.getNextState({action:fe.GO,index:d})),{},{status:E?m:de.FINISHED}))}}),ne(this,"info",function(){return o.getState()}),ne(this,"next",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(o.getNextState({action:fe.NEXT,index:p+1}))}),ne(this,"open",function(){var d=o.getState(),p=d.status;p===de.RUNNING&&o.setState(K({},o.getNextState({action:fe.UPDATE,lifecycle:ue.TOOLTIP})))}),ne(this,"prev",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(K({},o.getNextState({action:fe.PREV,index:p-1})))}),ne(this,"reset",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=o.getState(),h=p.controlled;h||o.setState(K(K({},o.getNextState({action:fe.RESET,index:0})),{},{status:d?de.RUNNING:de.READY}))}),ne(this,"skip",function(){var d=o.getState(),p=d.status;p===de.RUNNING&&o.setState({action:fe.SKIP,lifecycle:ue.INIT,status:de.SKIPPED})}),this.setState({action:fe.INIT,controlled:Ge.number(u),continuous:s,index:Ge.number(u)?u:0,lifecycle:ue.INIT,status:f.length?de.READY:de.IDLE},!0),this.setSteps(f)}return Nr(i,[{key:"setState",value:function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.getState(),u=K(K({},s),l),c=u.action,f=u.index,d=u.lifecycle,p=u.size,h=u.status;t.set("action",c),t.set("index",f),t.set("lifecycle",d),t.set("size",p),t.set("status",h),a&&(t.set("controlled",l.controlled),t.set("continuous",l.continuous)),this.listener&&this.hasUpdatedState(s)&&this.listener(this.getState())}},{key:"getState",value:function(){return t.size?{action:t.get("action")||"",controlled:t.get("controlled")||!1,index:parseInt(t.get("index"),10),lifecycle:t.get("lifecycle")||"",size:t.get("size")||0,status:t.get("status")||""}:K({},Sj)}},{key:"getNextState",value:function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.getState(),u=s.action,c=s.controlled,f=s.index,d=s.size,p=s.status,h=Ge.number(l.index)?l.index:f,m=c&&!a?f:Math.min(Math.max(h,0),d);return{action:l.action||u,controlled:c,index:m,lifecycle:l.lifecycle||ue.INIT,size:l.size||d,status:m===d?de.FINISHED:l.status||p}}},{key:"hasUpdatedState",value:function(l){var a=JSON.stringify(l),s=JSON.stringify(this.getState());return a!==s}},{key:"getSteps",value:function(){var l=n.get("steps");return Array.isArray(l)?l:[]}},{key:"getHelpers",value:function(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}}]),i}();return new r(e)}function HC(e){return e?e.getBoundingClientRect():{}}function xj(){var e=document,t=e.body,n=e.documentElement;return!t||!n?0:Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function ai(e){return typeof e=="string"?document.querySelector(e):e}function Cj(e){return!e||e.nodeType!==1?{}:getComputedStyle(e)}function Nf(e,t,n){var r=bC(e);if(r.isSameNode(pa()))return n?document:pa();var i=r.scrollHeight>r.offsetHeight;return!i&&!t?(r.style.overflow="initial",pa()):r}function Rf(e,t){if(!e)return!1;var n=Nf(e,t);return!n.isSameNode(pa())}function _j(e){return e.offsetParent!==document.body}function nl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"fixed";if(!e||!(e instanceof HTMLElement))return!1;var n=e.nodeName;return n==="BODY"||n==="HTML"?!1:Cj(e).position===t?!0:nl(e.parentNode,t)}function kj(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if(t instanceof HTMLElement){var n=getComputedStyle(t),r=n.display,i=n.visibility;if(r==="none"||i==="hidden")return!1}t=t.parentNode}return!0}function Tj(e,t,n){var r=HC(e),i=Nf(e,n),o=Rf(e,n),l=0;i instanceof HTMLElement&&(l=i.scrollTop);var a=r.top+(!o&&!nl(e)?l:0);return Math.floor(a-t)}function $h(e){return e instanceof HTMLElement?e.offsetParent instanceof HTMLElement?$h(e.offsetParent)+e.offsetTop:e.offsetTop:0}function Ij(e,t,n){if(!e)return 0;var r=bC(e),i=$h(e);return Rf(e,n)&&!_j(e)&&(i-=$h(r)),Math.floor(i-t)}function pa(){return document.scrollingElement||document.createElement("body")}function Oj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pa(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300;return new Promise(function(r,i){var o=t.scrollTop,l=e>o?e-o:o-e;XU.top(t,e,{duration:l<100?50:n},function(a){return a&&a.message!=="Element already at target scroll position"?i(a):r()})})}function Pj(e){function t(r,i,o,l,a,s){var u=l||"<>",c=s||o;if(i[o]==null)return r?new Error("Required ".concat(a," `").concat(c,"` was not specified in `").concat(u,"`.")):null;for(var f=arguments.length,d=new Array(f>6?f-6:0),p=6;p0&&arguments[0]!==void 0?arguments[0]:{},t=Vn(Nj,e.options||{}),n=290;window.innerWidth>480&&(n=380),t.width&&(window.innerWidth1&&arguments[1]!==void 0?arguments[1]:!1;return Ge.plainObject(e)?e.target?!0:(Ki({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(Ki({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function tw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ge.array(e)?e.every(function(n){return GC(n,t)}):(Ki({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var Lj=Nr(function e(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Pr(this,e),ne(this,"element",void 0),ne(this,"options",void 0),ne(this,"canBeTabbed",function(i){var o=i.tabIndex;(o===null||o<0)&&(o=void 0);var l=isNaN(o);return!l&&n.canHaveFocus(i)}),ne(this,"canHaveFocus",function(i){var o=/input|select|textarea|button|object/,l=i.nodeName.toLowerCase(),a=o.test(l)&&!i.getAttribute("disabled")||l==="a"&&!!i.getAttribute("href");return a&&n.isVisible(i)}),ne(this,"findValidTabElements",function(){return[].slice.call(n.element.querySelectorAll("*"),0).filter(n.canBeTabbed)}),ne(this,"handleKeyDown",function(i){var o=n.options.keyCode,l=o===void 0?9:o;i.keyCode===l&&n.interceptTab(i)}),ne(this,"interceptTab",function(i){var o=n.findValidTabElements();if(o.length){i.preventDefault();var l=i.shiftKey,a=o.indexOf(document.activeElement);a===-1||!l&&a+1===o.length?a=0:l&&a===0?a=o.length-1:a+=l?-1:1,o[a].focus()}}),ne(this,"isHidden",function(i){var o=i.offsetWidth<=0&&i.offsetHeight<=0,l=window.getComputedStyle(i);return o&&!i.innerHTML?!0:o&&l.getPropertyValue("overflow")!=="visible"||l.getPropertyValue("display")==="none"}),ne(this,"isVisible",function(i){for(var o=i;o;)if(o instanceof HTMLElement){if(o===document.body)break;if(n.isHidden(o))return!1;o=o.parentNode}return!0}),ne(this,"removeScope",function(){window.removeEventListener("keydown",n.handleKeyDown)}),ne(this,"checkFocus",function(i){document.activeElement!==i&&(i.focus(),window.requestAnimationFrame(function(){return n.checkFocus(i)}))}),ne(this,"setFocus",function(){var i=n.options.selector;if(i){var o=n.element.querySelector(i);o&&window.requestAnimationFrame(function(){return n.checkFocus(o)})}}),!(t instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=t,this.options=r,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}),Fj=function(e){io(n,e);var t=oo(n);function n(r){var i;if(Pr(this,n),i=t.call(this,r),ne(je(i),"setBeaconRef",function(s){i.beacon=s}),!r.beaconComponent){var o=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style"),a=` @keyframes joyride-beacon-inner { 20% { opacity: 0.9; @@ -311,4 +311,4 @@ ${LE(r)}`,labels:["Settings-Panel"]})},n)),[]);return U(Ne,{children:[v(fl,{chil transform: scale(1); } } - `;l.type="text/css",l.id="joyride-beacon-animation",r.nonce!==void 0&&l.setAttribute("nonce",r.nonce),l.appendChild(document.createTextNode(a)),o.appendChild(l)}return i}return Nr(n,[{key:"componentDidMount",value:function(){var i=this,o=this.props.shouldFocus;setTimeout(function(){Ge.domElement(i.beacon)&&o&&i.beacon.focus()},0)}},{key:"componentWillUnmount",value:function(){var i=document.getElementById("joyride-beacon-animation");i&&i.parentNode.removeChild(i)}},{key:"render",value:function(){var i=this.props,o=i.beaconComponent,l=i.locale,a=i.onClickOrHover,s=i.styles,u={"aria-label":l.open,onClick:a,onMouseEnter:a,ref:this.setBeaconRef,title:l.open},c;if(o){var f=o;c=k.createElement(f,u)}else c=k.createElement("button",Ht({key:"JoyrideBeacon",className:"react-joyride__beacon",style:s.beacon,type:"button"},u),k.createElement("span",{style:s.beaconInner}),k.createElement("span",{style:s.beaconOuter}));return c}}]),n}(k.Component);function Lj(e){var t=e.styles;return k.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight",style:t})}var Fj=["mixBlendMode","zIndex"],Mj=function(e){io(n,e);var t=oo(n);function n(){var r;Pr(this,n);for(var i=arguments.length,o=new Array(i),l=0;l=p&&m<=p+c,y=E>=f&&E<=f+h,w=y&&g;w!==s&&r.updateState({mouseOverSpotlight:w})}),ne(je(r),"handleScroll",function(){var a=r.props.target,s=ai(a);if(r.scrollParent!==document){var u=r.state.isScrolling;u||r.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(function(){r.updateState({isScrolling:!1,showSpotlight:!0})},50)}else nl(s,"sticky")&&r.updateState({})}),ne(je(r),"handleResize",function(){clearTimeout(r.resizeTimeout),r.resizeTimeout=setTimeout(function(){r._isMounted&&r.forceUpdate()},100)}),r}return Nr(n,[{key:"componentDidMount",value:function(){var i=this.props;i.debug,i.disableScrolling;var o=i.disableScrollParentFix,l=i.target,a=ai(l);this.scrollParent=Nf(a,o,!0),this._isMounted=!0,window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(i){var o=this,l=this.props,a=l.lifecycle,s=l.spotlightClicks,u=ja(i,this.props),c=u.changed;c("lifecycle",ue.TOOLTIP)&&(this.scrollParent.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(function(){var f=o.state.isScrolling;f||o.updateState({showSpotlight:!0})},100)),(c("spotlightClicks")||c("disableOverlay")||c("lifecycle"))&&(s&&a===ue.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):a!==ue.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),this.scrollParent.removeEventListener("scroll",this.handleScroll)}},{key:"spotlightStyles",get:function(){var i=this.state.showSpotlight,o=this.props,l=o.disableScrollParentFix,a=o.spotlightClicks,s=o.spotlightPadding,u=o.styles,c=o.target,f=ai(c),d=HC(f),p=nl(f),h=_j(f,s,l);return K(K({},X0()?u.spotlightLegacy:u.spotlight),{},{height:Math.round(d.height+s*2),left:Math.round(d.left-s),opacity:i?1:0,pointerEvents:a?"none":"auto",position:p?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round(d.width+s*2)})}},{key:"updateState",value:function(i){this._isMounted&&this.setState(i)}},{key:"render",value:function(){var i=this.state,o=i.mouseOverSpotlight,l=i.showSpotlight,a=this.props,s=a.disableOverlay,u=a.disableOverlayClose,c=a.lifecycle,f=a.onClickOverlay,d=a.placement,p=a.styles;if(s||c!==ue.TOOLTIP)return null;var h=p.overlay;X0()&&(h=d==="center"?p.overlayLegacyCenter:p.overlayLegacy);var m=K({cursor:u?"default":"pointer",height:Sj(),pointerEvents:o?"none":"auto"},h),E=d!=="center"&&l&&k.createElement(Lj,{styles:this.spotlightStyles});if($C()==="safari"){m.mixBlendMode,m.zIndex;var g=pc(m,Fj);E=k.createElement("div",{style:K({},g)},E),delete m.backgroundColor}return k.createElement("div",{className:"react-joyride__overlay",style:m,onClick:f},E)}}]),n}(k.Component),Bj=["styles"],Uj=["color","height","width"];function zj(e){var t=e.styles,n=pc(e,Bj),r=t.color,i=t.height,o=t.width,l=pc(t,Uj);return k.createElement("button",Ht({style:l,type:"button"},n),k.createElement("svg",{width:typeof o=="number"?"".concat(o,"px"):o,height:typeof i=="number"?"".concat(i,"px"):i,viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},k.createElement("g",null,k.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var jj=function(e){io(n,e);var t=oo(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Nr(n,[{key:"render",value:function(){var i=this.props,o=i.backProps,l=i.closeProps,a=i.continuous,s=i.index,u=i.isLastStep,c=i.primaryProps,f=i.size,d=i.skipProps,p=i.step,h=i.tooltipProps,m=p.content,E=p.hideBackButton,g=p.hideCloseButton,y=p.hideFooter,w=p.showProgress,S=p.showSkipButton,_=p.title,b=p.styles,A=p.locale,T=A.back,N=A.close,R=A.last,I=A.next,F=A.skip,L={primary:N};return a&&(L.primary=u?R:I,w&&(L.primary=k.createElement("span",null,L.primary," (",s+1,"/",f,")"))),S&&!u&&(L.skip=k.createElement("button",Ht({style:b.buttonSkip,type:"button","aria-live":"off"},d),F)),!E&&s>0&&(L.back=k.createElement("button",Ht({style:b.buttonBack,type:"button"},o),T)),L.close=!g&&k.createElement(zj,Ht({styles:b.buttonClose},l)),k.createElement("div",Ht({key:"JoyrideTooltip",className:"react-joyride__tooltip",style:b.tooltip},h),k.createElement("div",{style:b.tooltipContainer},_&&k.createElement("h4",{style:b.tooltipTitle,"aria-label":_},_),k.createElement("div",{style:b.tooltipContent},m)),!y&&k.createElement("div",{style:b.tooltipFooter},k.createElement("div",{style:b.tooltipFooterSpacer},L.skip),L.back,k.createElement("button",Ht({style:b.buttonNext,type:"button"},c),L.primary)),L.close)}}]),n}(k.Component),Wj=["beaconComponent","tooltipComponent"],Yj=function(e){io(n,e);var t=oo(n);function n(){var r;Pr(this,n);for(var i=arguments.length,o=new Array(i),l=0;l0||l===fe.PREV),b=y("action")||y("index")||y("lifecycle")||y("status"),A=w("lifecycle",[ue.TOOLTIP,ue.INIT],ue.INIT),T=y("action",[fe.NEXT,fe.PREV,fe.SKIP,fe.CLOSE]);if(T&&(A||u)&&a(K(K({},S),{},{index:i.index,lifecycle:ue.COMPLETE,step:i.step,type:xt.STEP_AFTER})),m.placement==="center"&&h===de.RUNNING&&y("index")&&l!==fe.START&&d===ue.INIT&&E({lifecycle:ue.READY}),b){var N=ai(m.target),R=!!N,I=R&&Cj(N);I?(w("status",de.READY,de.RUNNING)||w("lifecycle",ue.INIT,ue.READY))&&a(K(K({},S),{},{step:m,type:xt.STEP_BEFORE})):(console.warn(R?"Target not visible":"Target not mounted",m),a(K(K({},S),{},{type:xt.TARGET_NOT_FOUND,step:m})),u||E({index:f+([fe.PREV].indexOf(l)!==-1?-1:1)}))}w("lifecycle",ue.INIT,ue.READY)&&E({lifecycle:q0(m)||_?ue.TOOLTIP:ue.BEACON}),y("index")&&Ki({title:"step:".concat(d),data:[{key:"props",value:this.props}],debug:c}),y("lifecycle",ue.BEACON)&&a(K(K({},S),{},{step:m,type:xt.BEACON})),y("lifecycle",ue.TOOLTIP)&&(a(K(K({},S),{},{step:m,type:xt.TOOLTIP})),this.scope=new Rj(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus()),w("lifecycle",[ue.TOOLTIP,ue.INIT],ue.INIT)&&(this.scope.removeScope(),delete this.beaconPopper,delete this.tooltipPopper)}},{key:"componentWillUnmount",value:function(){this.scope.removeScope()}},{key:"open",get:function(){var i=this.props,o=i.step,l=i.lifecycle;return!!(q0(o)||l===ue.TOOLTIP)}},{key:"render",value:function(){var i=this.props,o=i.continuous,l=i.debug,a=i.helpers,s=i.index,u=i.lifecycle,c=i.nonce,f=i.shouldScroll,d=i.size,p=i.step,h=ai(p.target);return!GC(p)||!Ge.domElement(h)?null:k.createElement("div",{key:"JoyrideStep-".concat(s),className:"react-joyride__step"},k.createElement(Vj,{id:"react-joyride-portal"},k.createElement(Mj,Ht({},p,{debug:l,lifecycle:u,onClickOverlay:this.handleClickOverlay}))),k.createElement(Yg,Ht({component:k.createElement(Yj,{continuous:o,helpers:a,index:s,isLastStep:s+1===d,setTooltipRef:this.setTooltipRef,size:d,step:p}),debug:l,getPopper:this.setPopper,id:"react-joyride-step-".concat(s),isPositioned:p.isFixed||nl(h),open:this.open,placement:p.placement,target:p.target},p.floaterProps),k.createElement(Dj,{beaconComponent:p.beaconComponent,locale:p.locale,nonce:c,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:f,styles:p.styles})))}}]),n}(k.Component),JC=function(e){io(n,e);var t=oo(n);function n(r){var i;return Pr(this,n),i=t.call(this,r),ne(je(i),"initStore",function(){var o=i.props,l=o.debug,a=o.getHelpers,s=o.run,u=o.stepIndex;i.store=new Ej(K(K({},i.props),{},{controlled:s&&Ge.number(u)})),i.helpers=i.store.getHelpers();var c=i.store.addListener;return Ki({title:"init",data:[{key:"props",value:i.props},{key:"state",value:i.state}],debug:l}),c(i.syncState),a(i.helpers),i.store.getState()}),ne(je(i),"callback",function(o){var l=i.props.callback;Ge.function(l)&&l(o)}),ne(je(i),"handleKeyboard",function(o){var l=i.state,a=l.index,s=l.lifecycle,u=i.props.steps,c=u[a],f=window.Event?o.which:o.keyCode;s===ue.TOOLTIP&&f===27&&c&&!c.disableCloseOnEsc&&i.store.close()}),ne(je(i),"syncState",function(o){i.setState(o)}),ne(je(i),"setPopper",function(o,l){l==="wrapper"?i.beaconPopper=o:i.tooltipPopper=o}),ne(je(i),"shouldScroll",function(o,l,a,s,u,c,f){return!o&&(l!==0||a||s===ue.TOOLTIP)&&u.placement!=="center"&&(!u.isFixed||!nl(c))&&f.lifecycle!==s&&[ue.BEACON,ue.TOOLTIP].indexOf(s)!==-1}),i.state=i.initStore(),i}return Nr(n,[{key:"componentDidMount",value:function(){if($r){var i=this.props,o=i.disableCloseOnEsc,l=i.debug,a=i.run,s=i.steps,u=this.store.start;tw(s,l)&&a&&u(),o||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}}},{key:"componentDidUpdate",value:function(i,o){if($r){var l=this.state,a=l.action,s=l.controlled,u=l.index,c=l.lifecycle,f=l.status,d=this.props,p=d.debug,h=d.run,m=d.stepIndex,E=d.steps,g=i.steps,y=i.stepIndex,w=this.store,S=w.reset,_=w.setSteps,b=w.start,A=w.stop,T=w.update,N=ja(i,this.props),R=N.changed,I=ja(o,this.state),F=I.changed,L=I.changedFrom,j=Ml(E[u],this.props),J=!$h(g,E),ee=Ge.number(m)&&R("stepIndex"),te=ai(j==null?void 0:j.target);if(J&&(tw(E,p)?_(E):console.warn("Steps are not valid",E)),R("run")&&(h?b(m):A()),ee){var D=y=0?b:0,s===de.RUNNING&&Tj(b,_,m)}}}},{key:"render",value:function(){if(!$r)return null;var i=this.state,o=i.index,l=i.status,a=this.props,s=a.continuous,u=a.debug,c=a.nonce,f=a.scrollToFirstStep,d=a.steps,p=Ml(d[o],this.props),h;return l===de.RUNNING&&p&&(h=k.createElement($j,Ht({},this.state,{callback:this.callback,continuous:s,debug:u,setPopper:this.setPopper,helpers:this.helpers,nonce:c,shouldScroll:!p.disableScrolling&&(o!==0||f),step:p,update:this.store.update}))),k.createElement("div",{className:"react-joyride"},h)}}]),n}(k.Component);ne(JC,"defaultProps",{continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:function(){},hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]});const Hj=U("div",{children:[v("p",{children:"You can see how the changes impact your app with the app preview."}),v("p",{children:"Click in the center of the preview to expand it to full screen to get a better view of your app."}),v("p",{children:'Any log messages from the app will be placed into the "App Logs" drawer.'})]}),Gj=U("div",{children:[v("p",{children:"The app view shows a skeleton view of the current state of your app's UI."}),v("p",{children:"You can click on elements to select them or drag them around to move them."}),v("p",{children:"Cards can be resized by dragging resize handles on the sides."}),v("p",{children:"Rows and Columns can be resized by dragging between tracts and added by hovering over the left and top respectively to reveal the tract controls widget."}),v("p",{children:v("a",{href:"https://rstudio.github.io/shinyuieditor/articles/how-to.html#show-size-widget",children:"More info"})})]}),Jj=U("div",{children:["Drag elements from the elements palette into the app pane on the right to add them to your app. ",v("br",{})," In the app view, the areas available for the element to be dropped in will pulse with an"," ",v("span",{className:"can-accept-drop",style:{padding:"2px"},children:"orange outline."})]}),Qj=U("div",{children:[v("p",{children:"After selecting an element in your app, you can adjust the settings for that element in the properties pane."}),v("p",{children:"Changes made will be automatically applied to your element both in the app view and your code so there's no need to save or submit these changes."})]}),Kj=[{target:".app-view",content:Gj,disableBeacon:!0},{target:".elements-panel",content:Jj,placement:"right-start",disableBeacon:!0},{target:".properties-panel",content:Qj,placement:"left-start"},{target:".app-preview",content:Hj,placement:"top-start"},{target:".undo-redo-buttons",content:"Mess something up? You can use the change history to undo or redo your changes",placement:"bottom"}];function qj(){const[e,t]=P.useState(0),[n,r]=P.useState(!1),i=P.useCallback(l=>{const{action:a,index:s,type:u}=l;(u===xt.STEP_AFTER||u===xt.TARGET_NOT_FOUND)&&(a===fe.NEXT?t(s+1):a===fe.PREV?t(s-1):a===fe.CLOSE&&r(!1)),u===xt.TOUR_END&&(a===fe.NEXT&&(r(!1),t(0)),a===fe.SKIP&&r(!1))},[]),o=P.useCallback(()=>{r(!0)},[]);return U(Ne,{children:[U(rt,{onClick:o,title:"Take a guided tour of app",variant:"transparent",children:[v(eL,{id:"tour",size:"24px"}),"Tour App"]}),v(JC,{callback:i,steps:Kj,stepIndex:e,run:n,continuous:!0,showProgress:!0,showSkipButton:!0,disableScrolling:!0,locale:{next:"Next",back:"Back",close:"Close",last:"Let's go!",open:"Open the dialog",skip:"Skip tour"},styles:Zj})]})}const nw="#e07189",Xj="#f6d5dc",Zj={options:{arrowColor:"var(--rstudio-white, white)",backgroundColor:"var(--rstudio-white, white)",primaryColor:"var(--rstudio-blue, steelblue)",textColor:"var(--rstudio-grey, black)"},beaconInner:{backgroundColor:nw},beaconOuter:{backgroundColor:Xj,border:`2px solid ${nw}`}},eW=e=>v("svg",W(O({viewBox:"0 0 168 114",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Shiny Logo"},e),{children:v("path",{opacity:.9,d:"M17.524 62.626c-.898-.027-.3 0 0 0Zm-.027 0c-.871-.027-.49 0-.19 0h.462-.272c.272.027.19 0 0 0Zm.244 0c9.497.218 19.43-1.986 22.313-13.279 1.878-7.293-2.802-12.599-6.938-17.932-.028-.027-.055-.054-.055-.109-.163-.68-4.653-4.816-5.904-6.367 0-.027-.028-.027-.055-.055-.599-.435-1.224-2.64-1.524-3.864a3.323 3.323 0 0 1-.027-1.55c1.089-5.552 1.687-9.606 9.061-8.409 5.306.871 2.558 8.653 5.415 9.415h.055c1.714.164 5.06-3.945 5.55-5.333 1.905-5.388-9.088-8.68-12.435-8.463-6.72.408-11.129 4.055-13.823 10.068-4.952 11.075 4.3 18.45 9.905 26.041 4.245 5.742 4.054 10.857-1.143 15.782-5.714 5.415-12.354-2.04-13.116-7.292-.68-4.816-.625-8.163-4.653-2.04-3.728 5.686.11 13.088 7.374 13.387ZM167.266 36.34v.055a13.555 13.555 0 0 1-.762 3.428 27.79 27.79 0 0 1-2.693 5.306c-1.334 2.041-2.041 2.857-3.429 4.653-2.612 3.402-4.626 5.932-7.674 9.17-4.244 4.49-8.979 9.633-14.149 13.306-7.374 5.28-16.68 6.722-25.497 7.538-25.796 2.34-63.755 5.823-71.755 33.741-.054.164-.19.245-.354.191-.081-.027-.136-.055-.163-.136-7.837-13.388-24.68-23.211-40.3-22.748-.162.027-.299-.055-.326-.218-.027-.163.055-.3.218-.327 40.218-19.972 81.306-10.394 124.735-18.15 10.857-1.931 19.972-9.06 26.53-17.632 2.504-3.238 5.715-5.986 7.919-9.442.353-.572 2.176-5.116-.653-3.184-4.381 2.966-8.082 6.64-12.844 8.953a5.605 5.605 0 0 1-.707.299c-.082.027-.137.109-.164.19a27.286 27.286 0 0 1-2.857 6.368 18.325 18.325 0 0 1-5.66 5.632c-2.122 1.415-4.598 2.232-7.129 2.422-.354.027-.68.027-1.034.027-2.014 0-3.32-.163-4.871-.952-1.986-1.034-2.612-2.721-2.748-4.762-.082-1.224.68-2.558 1.306-3.565.626-1.006 1.633-2.122 2.34-2.421l.055-.028c3.537-2.612 9.551-2.802 13.632-3.918.109-.027.191-.109.191-.19l2.041-7.456c.054-.163-.055-.3-.191-.354a.301.301 0 0 0-.299.109 40.263 40.263 0 0 1-3.402 4.326c-1.605 1.688-2.857 2.721-3.809 3.102a11.152 11.152 0 0 1-3.374.708c-1.361.082-2.531-.463-3.429-1.605-.898-1.143-1.388-2.83-1.496-5.062a8.521 8.521 0 0 1 0-1.197.312.312 0 0 0-.191-.354.313.313 0 0 0-.354.19c-.435.844-.87 1.633-1.306 2.34-1.279 2.232-2.884 4.273-4.707 6.096-1.796 1.796-3.538 2.748-5.143 2.857-3.021.19-4.653-1.523-4.871-5.115-.218-3.429 1.143-10.477 4.082-20.98.163-.462.217-.952.19-1.415-.054-.952-.598-1.333-1.714-1.252a6.312 6.312 0 0 0-3.51 1.47 12.19 12.19 0 0 0-3.021 3.837c-.898 1.632-1.687 3.32-2.421 5.034a42.75 42.75 0 0 0-1.878 5.823c-.544 2.204-1.007 4.054-1.306 5.496a144.944 144.944 0 0 0-.925 4.708c-.218 1.143-.463 2.557-.517 2.775l-.055.218-7.483.49-.027-.272c-.054-.654.49-2.966 1.578-7.02l-.653 1.142a29.066 29.066 0 0 1-4.68 6.095c-1.796 1.796-3.537 2.749-5.143 2.857h-.326c-2.64 0-4.136-2.068-4.381-6.15-.055-.816-.082-1.632-.055-2.475a.312.312 0 0 0-.19-.354.312.312 0 0 0-.354.19c-4.109 7.538-7.81 11.347-11.238 11.565-3.02.19-4.653-1.605-4.898-5.36-.272-4.164.87-10.26 3.401-18.096.545-1.932.79-3.265.735-3.973-.082-1.088-.571-1.224-.98-1.224h-.108c-.354.027-1.116.245-2.722 1.252a14.477 14.477 0 0 0-3.646 3.4c-1.17 1.525-2.095 3.239-2.775 5.035-.708 1.905-1.28 3.565-1.687 4.952-.408 1.388-.817 3.102-1.225 5.062-.408 1.959-.762 3.646-1.088 4.898a73.777 73.777 0 0 0-.98 4.353l-.054.218-7.184.462c-.163 0-.3-.108-.3-.272v-.108c1.062-3.674 2.559-9.633 4.463-17.688 1.905-8.054 3.647-14.503 5.061-19.129 1.225-4.027 2.667-8 4.354-11.836a32.438 32.438 0 0 1 5.225-8.273c2.04-2.285 4.326-3.51 6.748-3.673 2.558-.163 3.919 1.116 4.109 3.755.109 1.769-.408 4.136-1.524 7.102-2.04 5.252-5.442 11.374-10.15 18.204a.296.296 0 0 0 0 .408c.11.11.3.11.409 0a16.315 16.315 0 0 1 2.612-1.66c1.36-.707 2.857-1.115 4.408-1.251 2.912-.19 4.463 1.143 4.653 3.945a8.216 8.216 0 0 1-.326 3.048c-.273.898-.572 1.96-.926 3.13-.326 1.17-.598 2.149-.816 2.884-.218.761-.49 1.768-.844 3.047-.353 1.28-.625 2.395-.789 3.266-.49 2.204-.68 3.972-.598 5.251.109 1.633.762 1.633.98 1.633h.081c2.748-.163 5.986-4.953 9.66-14.204.027-.055.027-.082.054-.136a64.454 64.454 0 0 1 3.184-8.925c1.524-3.347 3.374-5.116 5.551-5.252l4.354-.218c.163 0 .299.109.299.272a.31.31 0 0 1-.082.218c-.68.653-1.578 2.395-2.666 5.197-1.143 3.02-1.932 5.089-2.45 6.476-.516 1.443-1.115 3.402-1.74 5.85-.627 2.45-.899 4.409-.79 5.878.136 1.932.87 1.932 1.116 1.932h.081c.381-.027 1.089-.299 2.368-1.47a14.924 14.924 0 0 0 2.53-3.02c.653-1.06 1.36-2.394 2.15-4.027.79-1.632 1.47-3.047 2.04-4.245.627-1.279.872-1.714 1.035-1.877l.354-.653c1.333-5.388 1.959-9.17 1.823-11.266a2.31 2.31 0 0 0-.245-1.034c-.082-.108-.082-.299.054-.38a.387.387 0 0 1 .163-.055l3.02-.19c1.77-.11 2.885 0 3.457.38.571.381.925 1.007.952 1.66a9.83 9.83 0 0 1-.19 1.987c-.028.163.081.3.245.326.081.028.19-.027.244-.081 3.402-3.538 6.939-5.442 10.585-5.66 2.912-.19 4.49 1.197 4.654 4.109.054.925 0 1.85-.191 2.775-.19.925-.653 2.721-1.469 5.497-1.715 5.959-2.531 9.959-2.395 11.918.082 1.388.626 1.551 1.034 1.551h.082c.381-.027 1.088-.3 2.34-1.496a17.296 17.296 0 0 0 2.558-3.075 43.208 43.208 0 0 0 2.177-3.973c.789-1.578 1.442-2.993 2.013-4.19.191-.436.354-.762.49-1.035 0-.027.027-.027.027-.054.789-3.32 1.714-6.068 2.776-8.19 1.224-2.504 2.612-4.164 4.081-4.98 1.47-.816 3.483-1.279 6.068-1.442a.58.58 0 0 1 .626.517v.054c.027.3-.136.626-.462 1.034-1.824 1.987-3.592 5.497-5.307 10.45-1.714 4.952-2.448 9.115-2.258 12.435.109 1.523.49 2.313 1.143 2.313h.054c1.606-.11 3.647-2.096 6.014-5.932a50.108 50.108 0 0 0 5.442-11.674c.163-.544.381-1.306.68-2.34.3-1.034.517-1.714.626-2.095.109-.381.327-.925.599-1.606.19-.544.462-1.034.789-1.496.218-.245.544-.572.925-.98.381-.408.816-.707 1.333-.87a19.15 19.15 0 0 1 3.919-.735l3.02-.19c.136-.055.3.026.354.162.054.137-.027.3-.163.354l-.055.055c-1.36 1.06-2.694 3.591-3.945 7.537-1.034 3.347-1.905 6.449-2.585 9.197a295.694 295.694 0 0 1-1.279 5.034c-.164.599-.517 2.068-1.061 4.3a177.514 177.514 0 0 1-1.062 4.19c-.054.136 0 .3.136.354.082.027.191.027.272-.055a43.638 43.638 0 0 0 8.164-6.313c1.387-1.387 11.918-13.088 12.408-5.66l.054.327ZM66.503 2.708c-1.06.054-2.938 1.687-5.768 8.98-1.96 5.033-3.864 10.775-5.687 17.087-.055.164.054.3.19.354.109.027.245 0 .327-.109 4.898-7.483 8.299-13.714 10.095-18.585 1.115-3.32 1.633-5.523 1.578-6.503-.082-1.197-.544-1.197-.68-1.197l-.055-.027ZM137.17 54c.054-.136-.027-.3-.163-.354a.173.173 0 0 0-.163 0c-1.47.3-2.939.544-4.381.898-2.041.49-5.143.98-6.722 2.694-.027.027-.027.054-.054.082-.272.598-.326 1.55-.272 2.748.054.844.871 1.633 1.578 2.204a3.24 3.24 0 0 0 2.313.68c3.211-.244 5.85-3.238 7.864-8.952ZM88.517 18.98c1.742-.082 3.918-.735 4.435-3.32.245-1.17-.462-2.504-.898-2.885-.435-.38-1.034-.544-1.823-.49-.789.055-1.741.545-2.64 1.389-1.196 1.115-1.142 2.72-.761 3.782.354.898.98 1.496 1.687 1.524Z",fill:"#fff"})})),tW="_container_1d7pe_1",nW={container:tW};function rW({goBackward:e,canGoBackward:t,goForward:n,canGoForward:r}){return U("div",{className:Ke(nW.container,"undo-redo-buttons"),children:[v(rt,{variant:["transparent","icon"],disabled:!t,"aria-label":"Undo last change",title:"Undo last change",onClick:e,children:v(iL,{height:"100%"})}),v(rt,{variant:["transparent","icon"],disabled:!r,"aria-label":"Redo last change",title:"Redo last change",onClick:n,children:v(rL,{height:"100%"})})]})}const iW="_shiny_logo_1exlx_1",oW="_app_title_1exlx_10",lW="_divider_1exlx_15",aW="_header_1exlx_21",sW="_OpenSideBySideWindowButton_1exlx_29",uW="_right_1exlx_54",cW="_spacer_1exlx_66",fW="_last_1exlx_70",_i={shiny_logo:iW,app_title:oW,divider:lW,header:aW,OpenSideBySideWindowButton:sW,"react-joyride":"_react-joyride_1exlx_46","undo-redo-buttons":"_undo-redo-buttons_1exlx_50",right:uW,spacer:cW,last:fW};function dW(){const{sendMsg:e,mode:t}=Ja();return t!=="VSCODE"?null:U(Ne,{children:[v(Ir,{text:"Open app code next to editor",onClick:()=>{e({path:"OPEN-COMPANION-EDITOR",payload:"BESIDE"})},className:"OpenSideBySideWindowButton",children:v(DL,{})}),v("div",{className:"divider"})]})}function pW({state:e,history:t}){return U("header",{className:_i.header,children:[v(eW,{className:_i.shiny_logo}),v("h1",{className:_i.app_title,children:"Shiny UI Editor"}),U("div",{className:_i.right,children:[e.mode==="MAIN"?U(Ne,{children:[v(dW,{}),v(qj,{})]}):null,v("div",{className:_i.divider}),v(rW,O({},t)),v("div",{className:Ke(_i.spacer,_i.last)})]})]})}function hW(){return Qa(t=>t.connected_to_server)?null:v(Wx,{onConfirm:()=>{},onCancel:()=>{},children:v("p",{style:{color:"var(--red, pink)",textAlign:"center"},children:"Lost connection to backend. Check console where editor was launched for details."})})}function mW(){const{state:e,history:t}=p9();return v(pI,{goBackward:t.goBackward,canGoBackward:t.canGoBackward,children:U("div",{className:m9.EditorContainer,style:NE,children:[v(pW,{state:e,history:t}),v(SU,{state:e}),v(hW,{})]})})}const gW=wf({name:"connectedToServer",initialState:!0,reducers:{DISCONNECTED_FROM_SERVER:(e,t)=>!1}}),yW=gW.reducer;function vW({selectedPath:e,deletedPath:t}){if(e===null)return e;if(ul(t,e))return wW(e);if(e.lengthi)return e;const o=[...e],l=i-1;return l<0||(o[n]=l),o}function wW(e){return e.slice(0,e.length-1)}const QC=gg();QC.startListening({actionCreator:JA,effect:(e,t)=>It(ml,null,function*(){const n=e.payload.path,r=t.getState().selected_path;if(r===null)return;const i=vW({selectedPath:r,deletedPath:n});t.dispatch(Sf({path:i}))})});const bW=QC.middleware;function EW({fromPath:e,toPath:t}){const n=Ui(e);if(Ui(t)=t[i])return t;const o=[...t];return o[i]--,o}const KC=gg();KC.startListening({actionCreator:GA,effect:(e,t)=>It(ml,null,function*(){const n=e.payload;let r=n.path;YA(n)&&(r=EW({fromPath:n.currentPath,toPath:r})),t.dispatch(Sf({path:r}))})});const SW=KC.middleware,qC=gg();qC.startListening({actionCreator:QA,effect:(e,t)=>It(ml,null,function*(){t.dispatch(Sf({path:[]}))})});const AW=qC.middleware,xW=_R({reducer:{app_info:q5,selected_path:e5,connected_to_server:yW,currentlyDraggedNode:XR},middleware:e=>e().concat(bW).concat(SW).concat(AW)});function CW({children:e}){return v(BT,{store:xW,children:e})}function _W({showMessages:e=!0,defaultTree:t,backendDispatch:{sendMsg:n,incomingMsgs:r,mode:i}=ow({messageDispatch:iw(),showMessages:e,defaultTree:t!=null?t:"TEMPLATE_CHOOSER"})}){return v(CW,{children:v(Q2,W(O({},e?{sendMsg:n,incomingMsgs:{subscribe:(l,a)=>(console.log(`backendMsgs.subscribe("${l}", ...)`),r.subscribe(l,a))},mode:i}:{sendMsg:n,incomingMsgs:r,mode:i}),{children:v(mW,{})}))})}function kW({container:e,showMessages:t,backendDispatch:n}){gE(e).render(v(_W,{backendDispatch:n,showMessages:t}))}const TW=document.getElementById("root"),{pathToWebsocket:IW,defaultTree:OW}={pathToWebsocket:void 0,defaultTree:"TEMPLATE_CHOOSER"},rw=!0;It(ml,null,function*(){try{const e=iw(),t=yield m_({messageDispatch:e,onClose:()=>console.log("Websocket closed!!"),pathToWebsocket:IW}),n=t==="NO-WS-CONNECTION"?ow({messageDispatch:e,showMessages:rw,defaultTree:OW}):t;kW({container:TW,backendDispatch:n,showMessages:rw})}catch(e){}})});export default PW(); + `;l.type="text/css",l.id="joyride-beacon-animation",r.nonce!==void 0&&l.setAttribute("nonce",r.nonce),l.appendChild(document.createTextNode(a)),o.appendChild(l)}return i}return Nr(n,[{key:"componentDidMount",value:function(){var i=this,o=this.props.shouldFocus;setTimeout(function(){Ge.domElement(i.beacon)&&o&&i.beacon.focus()},0)}},{key:"componentWillUnmount",value:function(){var i=document.getElementById("joyride-beacon-animation");i&&i.parentNode.removeChild(i)}},{key:"render",value:function(){var i=this.props,o=i.beaconComponent,l=i.locale,a=i.onClickOrHover,s=i.styles,u={"aria-label":l.open,onClick:a,onMouseEnter:a,ref:this.setBeaconRef,title:l.open},c;if(o){var f=o;c=k.createElement(f,u)}else c=k.createElement("button",Ht({key:"JoyrideBeacon",className:"react-joyride__beacon",style:s.beacon,type:"button"},u),k.createElement("span",{style:s.beaconInner}),k.createElement("span",{style:s.beaconOuter}));return c}}]),n}(k.Component);function Mj(e){var t=e.styles;return k.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight",style:t})}var Bj=["mixBlendMode","zIndex"],Uj=function(e){io(n,e);var t=oo(n);function n(){var r;Pr(this,n);for(var i=arguments.length,o=new Array(i),l=0;l=p&&m<=p+c,y=E>=f&&E<=f+h,w=y&&g;w!==s&&r.updateState({mouseOverSpotlight:w})}),ne(je(r),"handleScroll",function(){var a=r.props.target,s=ai(a);if(r.scrollParent!==document){var u=r.state.isScrolling;u||r.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(function(){r.updateState({isScrolling:!1,showSpotlight:!0})},50)}else nl(s,"sticky")&&r.updateState({})}),ne(je(r),"handleResize",function(){clearTimeout(r.resizeTimeout),r.resizeTimeout=setTimeout(function(){r._isMounted&&r.forceUpdate()},100)}),r}return Nr(n,[{key:"componentDidMount",value:function(){var i=this.props;i.debug,i.disableScrolling;var o=i.disableScrollParentFix,l=i.target,a=ai(l);this.scrollParent=Nf(a,o,!0),this._isMounted=!0,window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(i){var o=this,l=this.props,a=l.lifecycle,s=l.spotlightClicks,u=ja(i,this.props),c=u.changed;c("lifecycle",ue.TOOLTIP)&&(this.scrollParent.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(function(){var f=o.state.isScrolling;f||o.updateState({showSpotlight:!0})},100)),(c("spotlightClicks")||c("disableOverlay")||c("lifecycle"))&&(s&&a===ue.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):a!==ue.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),this.scrollParent.removeEventListener("scroll",this.handleScroll)}},{key:"spotlightStyles",get:function(){var i=this.state.showSpotlight,o=this.props,l=o.disableScrollParentFix,a=o.spotlightClicks,s=o.spotlightPadding,u=o.styles,c=o.target,f=ai(c),d=HC(f),p=nl(f),h=Tj(f,s,l);return K(K({},X0()?u.spotlightLegacy:u.spotlight),{},{height:Math.round(d.height+s*2),left:Math.round(d.left-s),opacity:i?1:0,pointerEvents:a?"none":"auto",position:p?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round(d.width+s*2)})}},{key:"updateState",value:function(i){this._isMounted&&this.setState(i)}},{key:"render",value:function(){var i=this.state,o=i.mouseOverSpotlight,l=i.showSpotlight,a=this.props,s=a.disableOverlay,u=a.disableOverlayClose,c=a.lifecycle,f=a.onClickOverlay,d=a.placement,p=a.styles;if(s||c!==ue.TOOLTIP)return null;var h=p.overlay;X0()&&(h=d==="center"?p.overlayLegacyCenter:p.overlayLegacy);var m=K({cursor:u?"default":"pointer",height:xj(),pointerEvents:o?"none":"auto"},h),E=d!=="center"&&l&&k.createElement(Mj,{styles:this.spotlightStyles});if($C()==="safari"){m.mixBlendMode,m.zIndex;var g=pc(m,Bj);E=k.createElement("div",{style:K({},g)},E),delete m.backgroundColor}return k.createElement("div",{className:"react-joyride__overlay",style:m,onClick:f},E)}}]),n}(k.Component),zj=["styles"],jj=["color","height","width"];function Wj(e){var t=e.styles,n=pc(e,zj),r=t.color,i=t.height,o=t.width,l=pc(t,jj);return k.createElement("button",Ht({style:l,type:"button"},n),k.createElement("svg",{width:typeof o=="number"?"".concat(o,"px"):o,height:typeof i=="number"?"".concat(i,"px"):i,viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},k.createElement("g",null,k.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var Yj=function(e){io(n,e);var t=oo(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Nr(n,[{key:"render",value:function(){var i=this.props,o=i.backProps,l=i.closeProps,a=i.continuous,s=i.index,u=i.isLastStep,c=i.primaryProps,f=i.size,d=i.skipProps,p=i.step,h=i.tooltipProps,m=p.content,E=p.hideBackButton,g=p.hideCloseButton,y=p.hideFooter,w=p.showProgress,S=p.showSkipButton,_=p.title,b=p.styles,A=p.locale,T=A.back,N=A.close,R=A.last,I=A.next,F=A.skip,L={primary:N};return a&&(L.primary=u?R:I,w&&(L.primary=k.createElement("span",null,L.primary," (",s+1,"/",f,")"))),S&&!u&&(L.skip=k.createElement("button",Ht({style:b.buttonSkip,type:"button","aria-live":"off"},d),F)),!E&&s>0&&(L.back=k.createElement("button",Ht({style:b.buttonBack,type:"button"},o),T)),L.close=!g&&k.createElement(Wj,Ht({styles:b.buttonClose},l)),k.createElement("div",Ht({key:"JoyrideTooltip",className:"react-joyride__tooltip",style:b.tooltip},h),k.createElement("div",{style:b.tooltipContainer},_&&k.createElement("h4",{style:b.tooltipTitle,"aria-label":_},_),k.createElement("div",{style:b.tooltipContent},m)),!y&&k.createElement("div",{style:b.tooltipFooter},k.createElement("div",{style:b.tooltipFooterSpacer},L.skip),L.back,k.createElement("button",Ht({style:b.buttonNext,type:"button"},c),L.primary)),L.close)}}]),n}(k.Component),Vj=["beaconComponent","tooltipComponent"],$j=function(e){io(n,e);var t=oo(n);function n(){var r;Pr(this,n);for(var i=arguments.length,o=new Array(i),l=0;l0||l===fe.PREV),b=y("action")||y("index")||y("lifecycle")||y("status"),A=w("lifecycle",[ue.TOOLTIP,ue.INIT],ue.INIT),T=y("action",[fe.NEXT,fe.PREV,fe.SKIP,fe.CLOSE]);if(T&&(A||u)&&a(K(K({},S),{},{index:i.index,lifecycle:ue.COMPLETE,step:i.step,type:xt.STEP_AFTER})),m.placement==="center"&&h===de.RUNNING&&y("index")&&l!==fe.START&&d===ue.INIT&&E({lifecycle:ue.READY}),b){var N=ai(m.target),R=!!N,I=R&&kj(N);I?(w("status",de.READY,de.RUNNING)||w("lifecycle",ue.INIT,ue.READY))&&a(K(K({},S),{},{step:m,type:xt.STEP_BEFORE})):(console.warn(R?"Target not visible":"Target not mounted",m),a(K(K({},S),{},{type:xt.TARGET_NOT_FOUND,step:m})),u||E({index:f+([fe.PREV].indexOf(l)!==-1?-1:1)}))}w("lifecycle",ue.INIT,ue.READY)&&E({lifecycle:q0(m)||_?ue.TOOLTIP:ue.BEACON}),y("index")&&Ki({title:"step:".concat(d),data:[{key:"props",value:this.props}],debug:c}),y("lifecycle",ue.BEACON)&&a(K(K({},S),{},{step:m,type:xt.BEACON})),y("lifecycle",ue.TOOLTIP)&&(a(K(K({},S),{},{step:m,type:xt.TOOLTIP})),this.scope=new Lj(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus()),w("lifecycle",[ue.TOOLTIP,ue.INIT],ue.INIT)&&(this.scope.removeScope(),delete this.beaconPopper,delete this.tooltipPopper)}},{key:"componentWillUnmount",value:function(){this.scope.removeScope()}},{key:"open",get:function(){var i=this.props,o=i.step,l=i.lifecycle;return!!(q0(o)||l===ue.TOOLTIP)}},{key:"render",value:function(){var i=this.props,o=i.continuous,l=i.debug,a=i.helpers,s=i.index,u=i.lifecycle,c=i.nonce,f=i.shouldScroll,d=i.size,p=i.step,h=ai(p.target);return!GC(p)||!Ge.domElement(h)?null:k.createElement("div",{key:"JoyrideStep-".concat(s),className:"react-joyride__step"},k.createElement(Hj,{id:"react-joyride-portal"},k.createElement(Uj,Ht({},p,{debug:l,lifecycle:u,onClickOverlay:this.handleClickOverlay}))),k.createElement(Yg,Ht({component:k.createElement($j,{continuous:o,helpers:a,index:s,isLastStep:s+1===d,setTooltipRef:this.setTooltipRef,size:d,step:p}),debug:l,getPopper:this.setPopper,id:"react-joyride-step-".concat(s),isPositioned:p.isFixed||nl(h),open:this.open,placement:p.placement,target:p.target},p.floaterProps),k.createElement(Fj,{beaconComponent:p.beaconComponent,locale:p.locale,nonce:c,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:f,styles:p.styles})))}}]),n}(k.Component),JC=function(e){io(n,e);var t=oo(n);function n(r){var i;return Pr(this,n),i=t.call(this,r),ne(je(i),"initStore",function(){var o=i.props,l=o.debug,a=o.getHelpers,s=o.run,u=o.stepIndex;i.store=new Aj(K(K({},i.props),{},{controlled:s&&Ge.number(u)})),i.helpers=i.store.getHelpers();var c=i.store.addListener;return Ki({title:"init",data:[{key:"props",value:i.props},{key:"state",value:i.state}],debug:l}),c(i.syncState),a(i.helpers),i.store.getState()}),ne(je(i),"callback",function(o){var l=i.props.callback;Ge.function(l)&&l(o)}),ne(je(i),"handleKeyboard",function(o){var l=i.state,a=l.index,s=l.lifecycle,u=i.props.steps,c=u[a],f=window.Event?o.which:o.keyCode;s===ue.TOOLTIP&&f===27&&c&&!c.disableCloseOnEsc&&i.store.close()}),ne(je(i),"syncState",function(o){i.setState(o)}),ne(je(i),"setPopper",function(o,l){l==="wrapper"?i.beaconPopper=o:i.tooltipPopper=o}),ne(je(i),"shouldScroll",function(o,l,a,s,u,c,f){return!o&&(l!==0||a||s===ue.TOOLTIP)&&u.placement!=="center"&&(!u.isFixed||!nl(c))&&f.lifecycle!==s&&[ue.BEACON,ue.TOOLTIP].indexOf(s)!==-1}),i.state=i.initStore(),i}return Nr(n,[{key:"componentDidMount",value:function(){if($r){var i=this.props,o=i.disableCloseOnEsc,l=i.debug,a=i.run,s=i.steps,u=this.store.start;tw(s,l)&&a&&u(),o||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}}},{key:"componentDidUpdate",value:function(i,o){if($r){var l=this.state,a=l.action,s=l.controlled,u=l.index,c=l.lifecycle,f=l.status,d=this.props,p=d.debug,h=d.run,m=d.stepIndex,E=d.steps,g=i.steps,y=i.stepIndex,w=this.store,S=w.reset,_=w.setSteps,b=w.start,A=w.stop,T=w.update,N=ja(i,this.props),R=N.changed,I=ja(o,this.state),F=I.changed,L=I.changedFrom,j=Ml(E[u],this.props),J=!Vh(g,E),ee=Ge.number(m)&&R("stepIndex"),te=ai(j==null?void 0:j.target);if(J&&(tw(E,p)?_(E):console.warn("Steps are not valid",E)),R("run")&&(h?b(m):A()),ee){var D=y=0?b:0,s===de.RUNNING&&Oj(b,_,m)}}}},{key:"render",value:function(){if(!$r)return null;var i=this.state,o=i.index,l=i.status,a=this.props,s=a.continuous,u=a.debug,c=a.nonce,f=a.scrollToFirstStep,d=a.steps,p=Ml(d[o],this.props),h;return l===de.RUNNING&&p&&(h=k.createElement(Gj,Ht({},this.state,{callback:this.callback,continuous:s,debug:u,setPopper:this.setPopper,helpers:this.helpers,nonce:c,shouldScroll:!p.disableScrolling&&(o!==0||f),step:p,update:this.store.update}))),k.createElement("div",{className:"react-joyride"},h)}}]),n}(k.Component);ne(JC,"defaultProps",{continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:function(){},hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]});const Jj=U("div",{children:[v("p",{children:"You can see how the changes impact your app with the app preview."}),v("p",{children:"Click in the center of the preview to expand it to full screen to get a better view of your app."}),v("p",{children:'Any log messages from the app will be placed into the "App Logs" drawer.'})]}),Qj=U("div",{children:[v("p",{children:"The app view shows a skeleton view of the current state of your app's UI."}),v("p",{children:"You can click on elements to select them or drag them around to move them."}),v("p",{children:"Cards can be resized by dragging resize handles on the sides."}),v("p",{children:"Rows and Columns can be resized by dragging between tracts and added by hovering over the left and top respectively to reveal the tract controls widget."}),v("p",{children:v("a",{href:"https://rstudio.github.io/shinyuieditor/articles/how-to.html#show-size-widget",children:"More info"})})]}),Kj=U("div",{children:["Drag elements from the elements palette into the app pane on the right to add them to your app. ",v("br",{})," In the app view, the areas available for the element to be dropped in will pulse with an"," ",v("span",{className:"can-accept-drop",style:{padding:"2px"},children:"orange outline."})]}),qj=U("div",{children:[v("p",{children:"After selecting an element in your app, you can adjust the settings for that element in the properties pane."}),v("p",{children:"Changes made will be automatically applied to your element both in the app view and your code so there's no need to save or submit these changes."})]}),Xj=[{target:".app-view",content:Qj,disableBeacon:!0},{target:".elements-panel",content:Kj,placement:"right-start",disableBeacon:!0},{target:".properties-panel",content:qj,placement:"left-start"},{target:".app-preview",content:Jj,placement:"top-start"},{target:".undo-redo-buttons",content:"Mess something up? You can use the change history to undo or redo your changes",placement:"bottom"}];function Zj(){const[e,t]=O.useState(0),[n,r]=O.useState(!1),i=O.useCallback(l=>{const{action:a,index:s,type:u}=l;(u===xt.STEP_AFTER||u===xt.TARGET_NOT_FOUND)&&(a===fe.NEXT?t(s+1):a===fe.PREV?t(s-1):a===fe.CLOSE&&r(!1)),u===xt.TOUR_END&&(a===fe.NEXT&&(r(!1),t(0)),a===fe.SKIP&&r(!1))},[]),o=O.useCallback(()=>{r(!0)},[]);return U(Ne,{children:[U(rt,{onClick:o,title:"Take a guided tour of app",variant:"transparent",children:[v(tL,{id:"tour",size:"24px"}),"Tour App"]}),v(JC,{callback:i,steps:Xj,stepIndex:e,run:n,continuous:!0,showProgress:!0,showSkipButton:!0,disableScrolling:!0,locale:{next:"Next",back:"Back",close:"Close",last:"Let's go!",open:"Open the dialog",skip:"Skip tour"},styles:tW})]})}const nw="#e07189",eW="#f6d5dc",tW={options:{arrowColor:"var(--rstudio-white, white)",backgroundColor:"var(--rstudio-white, white)",primaryColor:"var(--rstudio-blue, steelblue)",textColor:"var(--rstudio-grey, black)"},beaconInner:{backgroundColor:nw},beaconOuter:{backgroundColor:eW,border:`2px solid ${nw}`}},nW=e=>v("svg",W(P({viewBox:"0 0 168 114",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Shiny Logo"},e),{children:v("path",{opacity:.9,d:"M17.524 62.626c-.898-.027-.3 0 0 0Zm-.027 0c-.871-.027-.49 0-.19 0h.462-.272c.272.027.19 0 0 0Zm.244 0c9.497.218 19.43-1.986 22.313-13.279 1.878-7.293-2.802-12.599-6.938-17.932-.028-.027-.055-.054-.055-.109-.163-.68-4.653-4.816-5.904-6.367 0-.027-.028-.027-.055-.055-.599-.435-1.224-2.64-1.524-3.864a3.323 3.323 0 0 1-.027-1.55c1.089-5.552 1.687-9.606 9.061-8.409 5.306.871 2.558 8.653 5.415 9.415h.055c1.714.164 5.06-3.945 5.55-5.333 1.905-5.388-9.088-8.68-12.435-8.463-6.72.408-11.129 4.055-13.823 10.068-4.952 11.075 4.3 18.45 9.905 26.041 4.245 5.742 4.054 10.857-1.143 15.782-5.714 5.415-12.354-2.04-13.116-7.292-.68-4.816-.625-8.163-4.653-2.04-3.728 5.686.11 13.088 7.374 13.387ZM167.266 36.34v.055a13.555 13.555 0 0 1-.762 3.428 27.79 27.79 0 0 1-2.693 5.306c-1.334 2.041-2.041 2.857-3.429 4.653-2.612 3.402-4.626 5.932-7.674 9.17-4.244 4.49-8.979 9.633-14.149 13.306-7.374 5.28-16.68 6.722-25.497 7.538-25.796 2.34-63.755 5.823-71.755 33.741-.054.164-.19.245-.354.191-.081-.027-.136-.055-.163-.136-7.837-13.388-24.68-23.211-40.3-22.748-.162.027-.299-.055-.326-.218-.027-.163.055-.3.218-.327 40.218-19.972 81.306-10.394 124.735-18.15 10.857-1.931 19.972-9.06 26.53-17.632 2.504-3.238 5.715-5.986 7.919-9.442.353-.572 2.176-5.116-.653-3.184-4.381 2.966-8.082 6.64-12.844 8.953a5.605 5.605 0 0 1-.707.299c-.082.027-.137.109-.164.19a27.286 27.286 0 0 1-2.857 6.368 18.325 18.325 0 0 1-5.66 5.632c-2.122 1.415-4.598 2.232-7.129 2.422-.354.027-.68.027-1.034.027-2.014 0-3.32-.163-4.871-.952-1.986-1.034-2.612-2.721-2.748-4.762-.082-1.224.68-2.558 1.306-3.565.626-1.006 1.633-2.122 2.34-2.421l.055-.028c3.537-2.612 9.551-2.802 13.632-3.918.109-.027.191-.109.191-.19l2.041-7.456c.054-.163-.055-.3-.191-.354a.301.301 0 0 0-.299.109 40.263 40.263 0 0 1-3.402 4.326c-1.605 1.688-2.857 2.721-3.809 3.102a11.152 11.152 0 0 1-3.374.708c-1.361.082-2.531-.463-3.429-1.605-.898-1.143-1.388-2.83-1.496-5.062a8.521 8.521 0 0 1 0-1.197.312.312 0 0 0-.191-.354.313.313 0 0 0-.354.19c-.435.844-.87 1.633-1.306 2.34-1.279 2.232-2.884 4.273-4.707 6.096-1.796 1.796-3.538 2.748-5.143 2.857-3.021.19-4.653-1.523-4.871-5.115-.218-3.429 1.143-10.477 4.082-20.98.163-.462.217-.952.19-1.415-.054-.952-.598-1.333-1.714-1.252a6.312 6.312 0 0 0-3.51 1.47 12.19 12.19 0 0 0-3.021 3.837c-.898 1.632-1.687 3.32-2.421 5.034a42.75 42.75 0 0 0-1.878 5.823c-.544 2.204-1.007 4.054-1.306 5.496a144.944 144.944 0 0 0-.925 4.708c-.218 1.143-.463 2.557-.517 2.775l-.055.218-7.483.49-.027-.272c-.054-.654.49-2.966 1.578-7.02l-.653 1.142a29.066 29.066 0 0 1-4.68 6.095c-1.796 1.796-3.537 2.749-5.143 2.857h-.326c-2.64 0-4.136-2.068-4.381-6.15-.055-.816-.082-1.632-.055-2.475a.312.312 0 0 0-.19-.354.312.312 0 0 0-.354.19c-4.109 7.538-7.81 11.347-11.238 11.565-3.02.19-4.653-1.605-4.898-5.36-.272-4.164.87-10.26 3.401-18.096.545-1.932.79-3.265.735-3.973-.082-1.088-.571-1.224-.98-1.224h-.108c-.354.027-1.116.245-2.722 1.252a14.477 14.477 0 0 0-3.646 3.4c-1.17 1.525-2.095 3.239-2.775 5.035-.708 1.905-1.28 3.565-1.687 4.952-.408 1.388-.817 3.102-1.225 5.062-.408 1.959-.762 3.646-1.088 4.898a73.777 73.777 0 0 0-.98 4.353l-.054.218-7.184.462c-.163 0-.3-.108-.3-.272v-.108c1.062-3.674 2.559-9.633 4.463-17.688 1.905-8.054 3.647-14.503 5.061-19.129 1.225-4.027 2.667-8 4.354-11.836a32.438 32.438 0 0 1 5.225-8.273c2.04-2.285 4.326-3.51 6.748-3.673 2.558-.163 3.919 1.116 4.109 3.755.109 1.769-.408 4.136-1.524 7.102-2.04 5.252-5.442 11.374-10.15 18.204a.296.296 0 0 0 0 .408c.11.11.3.11.409 0a16.315 16.315 0 0 1 2.612-1.66c1.36-.707 2.857-1.115 4.408-1.251 2.912-.19 4.463 1.143 4.653 3.945a8.216 8.216 0 0 1-.326 3.048c-.273.898-.572 1.96-.926 3.13-.326 1.17-.598 2.149-.816 2.884-.218.761-.49 1.768-.844 3.047-.353 1.28-.625 2.395-.789 3.266-.49 2.204-.68 3.972-.598 5.251.109 1.633.762 1.633.98 1.633h.081c2.748-.163 5.986-4.953 9.66-14.204.027-.055.027-.082.054-.136a64.454 64.454 0 0 1 3.184-8.925c1.524-3.347 3.374-5.116 5.551-5.252l4.354-.218c.163 0 .299.109.299.272a.31.31 0 0 1-.082.218c-.68.653-1.578 2.395-2.666 5.197-1.143 3.02-1.932 5.089-2.45 6.476-.516 1.443-1.115 3.402-1.74 5.85-.627 2.45-.899 4.409-.79 5.878.136 1.932.87 1.932 1.116 1.932h.081c.381-.027 1.089-.299 2.368-1.47a14.924 14.924 0 0 0 2.53-3.02c.653-1.06 1.36-2.394 2.15-4.027.79-1.632 1.47-3.047 2.04-4.245.627-1.279.872-1.714 1.035-1.877l.354-.653c1.333-5.388 1.959-9.17 1.823-11.266a2.31 2.31 0 0 0-.245-1.034c-.082-.108-.082-.299.054-.38a.387.387 0 0 1 .163-.055l3.02-.19c1.77-.11 2.885 0 3.457.38.571.381.925 1.007.952 1.66a9.83 9.83 0 0 1-.19 1.987c-.028.163.081.3.245.326.081.028.19-.027.244-.081 3.402-3.538 6.939-5.442 10.585-5.66 2.912-.19 4.49 1.197 4.654 4.109.054.925 0 1.85-.191 2.775-.19.925-.653 2.721-1.469 5.497-1.715 5.959-2.531 9.959-2.395 11.918.082 1.388.626 1.551 1.034 1.551h.082c.381-.027 1.088-.3 2.34-1.496a17.296 17.296 0 0 0 2.558-3.075 43.208 43.208 0 0 0 2.177-3.973c.789-1.578 1.442-2.993 2.013-4.19.191-.436.354-.762.49-1.035 0-.027.027-.027.027-.054.789-3.32 1.714-6.068 2.776-8.19 1.224-2.504 2.612-4.164 4.081-4.98 1.47-.816 3.483-1.279 6.068-1.442a.58.58 0 0 1 .626.517v.054c.027.3-.136.626-.462 1.034-1.824 1.987-3.592 5.497-5.307 10.45-1.714 4.952-2.448 9.115-2.258 12.435.109 1.523.49 2.313 1.143 2.313h.054c1.606-.11 3.647-2.096 6.014-5.932a50.108 50.108 0 0 0 5.442-11.674c.163-.544.381-1.306.68-2.34.3-1.034.517-1.714.626-2.095.109-.381.327-.925.599-1.606.19-.544.462-1.034.789-1.496.218-.245.544-.572.925-.98.381-.408.816-.707 1.333-.87a19.15 19.15 0 0 1 3.919-.735l3.02-.19c.136-.055.3.026.354.162.054.137-.027.3-.163.354l-.055.055c-1.36 1.06-2.694 3.591-3.945 7.537-1.034 3.347-1.905 6.449-2.585 9.197a295.694 295.694 0 0 1-1.279 5.034c-.164.599-.517 2.068-1.061 4.3a177.514 177.514 0 0 1-1.062 4.19c-.054.136 0 .3.136.354.082.027.191.027.272-.055a43.638 43.638 0 0 0 8.164-6.313c1.387-1.387 11.918-13.088 12.408-5.66l.054.327ZM66.503 2.708c-1.06.054-2.938 1.687-5.768 8.98-1.96 5.033-3.864 10.775-5.687 17.087-.055.164.054.3.19.354.109.027.245 0 .327-.109 4.898-7.483 8.299-13.714 10.095-18.585 1.115-3.32 1.633-5.523 1.578-6.503-.082-1.197-.544-1.197-.68-1.197l-.055-.027ZM137.17 54c.054-.136-.027-.3-.163-.354a.173.173 0 0 0-.163 0c-1.47.3-2.939.544-4.381.898-2.041.49-5.143.98-6.722 2.694-.027.027-.027.054-.054.082-.272.598-.326 1.55-.272 2.748.054.844.871 1.633 1.578 2.204a3.24 3.24 0 0 0 2.313.68c3.211-.244 5.85-3.238 7.864-8.952ZM88.517 18.98c1.742-.082 3.918-.735 4.435-3.32.245-1.17-.462-2.504-.898-2.885-.435-.38-1.034-.544-1.823-.49-.789.055-1.741.545-2.64 1.389-1.196 1.115-1.142 2.72-.761 3.782.354.898.98 1.496 1.687 1.524Z",fill:"#fff"})})),rW="_container_1d7pe_1",iW={container:rW};function oW({goBackward:e,canGoBackward:t,goForward:n,canGoForward:r}){return U("div",{className:Ke(iW.container,"undo-redo-buttons"),children:[v(rt,{variant:["transparent","icon"],disabled:!t,"aria-label":"Undo last change",title:"Undo last change",onClick:e,children:v(oL,{height:"100%"})}),v(rt,{variant:["transparent","icon"],disabled:!r,"aria-label":"Redo last change",title:"Redo last change",onClick:n,children:v(iL,{height:"100%"})})]})}const lW="_shiny_logo_1exlx_1",aW="_app_title_1exlx_10",sW="_divider_1exlx_15",uW="_header_1exlx_21",cW="_OpenSideBySideWindowButton_1exlx_29",fW="_right_1exlx_54",dW="_spacer_1exlx_66",pW="_last_1exlx_70",_i={shiny_logo:lW,app_title:aW,divider:sW,header:uW,OpenSideBySideWindowButton:cW,"react-joyride":"_react-joyride_1exlx_46","undo-redo-buttons":"_undo-redo-buttons_1exlx_50",right:fW,spacer:dW,last:pW};function hW(){const{sendMsg:e,mode:t}=Ja();return t!=="VSCODE"?null:U(Ne,{children:[v(Ir,{text:"Open app code next to editor",onClick:()=>{e({path:"OPEN-COMPANION-EDITOR",payload:"BESIDE"})},className:"OpenSideBySideWindowButton",children:v(FL,{})}),v("div",{className:"divider"})]})}function mW({state:e,history:t}){return U("header",{className:_i.header,children:[v(nW,{className:_i.shiny_logo}),v("h1",{className:_i.app_title,children:"Shiny UI Editor"}),U("div",{className:_i.right,children:[e.mode==="MAIN"?U(Ne,{children:[v(hW,{}),v(Zj,{})]}):null,v("div",{className:_i.divider}),v(oW,P({},t)),v("div",{className:Ke(_i.spacer,_i.last)})]})]})}function gW(){return Qa(t=>t.connected_to_server)?null:v(Wx,{onConfirm:()=>{},onCancel:()=>{},children:v("p",{style:{color:"var(--red, pink)",textAlign:"center"},children:"Lost connection to backend. Check console where editor was launched for details."})})}function yW(){const{state:e,history:t}=m9();return v(pI,{goBackward:t.goBackward,canGoBackward:t.canGoBackward,children:U("div",{className:y9.EditorContainer,style:NE,children:[v(mW,{state:e,history:t}),v(xU,{state:e}),v(gW,{})]})})}const vW=wf({name:"connectedToServer",initialState:!0,reducers:{DISCONNECTED_FROM_SERVER:(e,t)=>!1}}),wW=vW.reducer;function bW({selectedPath:e,deletedPath:t}){if(e===null)return e;if(ul(t,e))return EW(e);if(e.lengthi)return e;const o=[...e],l=i-1;return l<0||(o[n]=l),o}function EW(e){return e.slice(0,e.length-1)}const QC=mg();QC.startListening({actionCreator:JA,effect:(e,t)=>It(ml,null,function*(){const n=e.payload.path,r=t.getState().selected_path;if(r===null)return;const i=bW({selectedPath:r,deletedPath:n});t.dispatch(Sf({path:i}))})});const SW=QC.middleware;function AW({fromPath:e,toPath:t}){const n=Ui(e);if(Ui(t)=t[i])return t;const o=[...t];return o[i]--,o}const KC=mg();KC.startListening({actionCreator:GA,effect:(e,t)=>It(ml,null,function*(){const n=e.payload;let r=n.path;YA(n)&&(r=AW({fromPath:n.currentPath,toPath:r})),t.dispatch(Sf({path:r}))})});const xW=KC.middleware,qC=mg();qC.startListening({actionCreator:QA,effect:(e,t)=>It(ml,null,function*(){t.dispatch(Sf({path:[]}))})});const CW=qC.middleware,_W=_R({reducer:{app_info:q5,selected_path:e5,connected_to_server:wW,currentlyDraggedNode:XR},middleware:e=>e().concat(SW).concat(xW).concat(CW)});function kW({children:e}){return v(BT,{store:_W,children:e})}function TW({showMessages:e=!0,defaultTree:t,backendDispatch:{sendMsg:n,incomingMsgs:r,mode:i}=ow({messageDispatch:iw(),showMessages:e,defaultTree:t!=null?t:"TEMPLATE_CHOOSER"})}){return v(kW,{children:v(Q2,W(P({},e?{sendMsg:n,incomingMsgs:{subscribe:(l,a)=>(console.log(`backendMsgs.subscribe("${l}", ...)`),r.subscribe(l,a))},mode:i}:{sendMsg:n,incomingMsgs:r,mode:i}),{children:v(yW,{})}))})}function IW({container:e,showMessages:t,backendDispatch:n}){gE(e).render(v(TW,{backendDispatch:n,showMessages:t}))}const OW=document.getElementById("root"),{pathToWebsocket:PW,defaultTree:NW}={pathToWebsocket:void 0,defaultTree:"TEMPLATE_CHOOSER"},rw=!0;It(ml,null,function*(){try{const e=iw(),t=yield m_({messageDispatch:e,onClose:()=>console.log("Websocket closed!!"),pathToWebsocket:PW}),n=t==="NO-WS-CONNECTION"?ow({messageDispatch:e,showMessages:rw,defaultTree:NW}):t;IW({container:OW,backendDispatch:n,showMessages:rw})}catch(e){}})});export default RW(); diff --git a/inst/editor/build/assets/index-7e81a697.js b/inst/editor/build/assets/index-7e81a697.js deleted file mode 100644 index 85f12a785..000000000 --- a/inst/editor/build/assets/index-7e81a697.js +++ /dev/null @@ -1,305 +0,0 @@ -var px=Object.defineProperty,hx=Object.defineProperties;var mx=Object.getOwnPropertyDescriptors;var Is=Object.getOwnPropertySymbols;var Fg=Object.prototype.hasOwnProperty,Bg=Object.prototype.propertyIsEnumerable;var Ug=Math.pow,zf=(e,t,n)=>t in e?px(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))Fg.call(t,n)&&zf(e,n,t[n]);if(Is)for(var n of Is(t))Bg.call(t,n)&&zf(e,n,t[n]);return e},$=(e,t)=>hx(e,mx(t));var ke=(e,t)=>{var n={};for(var r in e)Fg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Is)for(var r of Is(e))t.indexOf(r)<0&&Bg.call(e,r)&&(n[r]=e[r]);return n};var gx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zg=(e,t,n)=>(zf(e,typeof t!="symbol"?t+"":t,n),n);var so=(e,t,n)=>new Promise((r,i)=>{var o=s=>{try{l(n.next(s))}catch(u){i(u)}},a=s=>{try{l(n.throw(s))}catch(u){i(u)}},l=s=>s.done?r(s.value):Promise.resolve(s.value).then(o,a);l((n=n.apply(e,t)).next())});var vj=gx(Ss=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const W0=vx;function vx(){const e={};return{subscribe:(t,n)=>(e[t]===void 0&&(e[t]=new Set),e[t].add(n),{unsubscribe:()=>{e[t].delete(n)}}),dispatch:(t,n)=>{var r;(r=e[t])==null||r.forEach(i=>i(n))}}}function yx(e){return so(this,null,function*(){return new Promise(t=>{fetch("/testing-tree").then(n=>n.json()).then(n=>{t(n)}).catch(n=>{console.error("/testing-tree error",n),t(e)})})})}function Y0({messageDispatch:e,showMessages:t,defaultTree:n}){const r=t?console.log:(...o)=>{};return{sendMsg:o=>{switch(r("Static sendMsg()",o),o.path){case"READY-FOR-STATE":{yx(n).then(a=>{a==="TEMPLATE_CHOOSER"?e.dispatch("TEMPLATE_CHOOSER","USER-CHOICE"):e.dispatch("APP-INFO",{ui_tree:a,app_type:"SINGLE-FILE",app:{code:wx,libraries:["shiny"]}})});return}case"UPDATED-APP":{o.payload.info&&e.dispatch("APP-INFO",o.payload.info);return}case"APP-PREVIEW-REQUEST":return}},incomingMsgs:e,mode:"STATIC"}}const wx=` - - -ui <- - -server <- function(input, output) { - -} - -shinyApp(ui, server) -`;function bx({onClose:e,messageDispatch:t,pathToWebsocket:n=window.location.host+window.location.pathname}){let r=!1;return new Promise(i=>{try{if(!document.location.host)throw new Error("Not on a served site!");const o=new WebSocket(Ex(n)),a={sendMsg:l=>{Sx(o,l)},incomingMsgs:t,mode:"HTTPUV"};o.onerror=l=>{i("NO-WS-CONNECTION")},o.onopen=l=>{Ax(o,s=>{const{path:u,payload:c}=s;t.dispatch(u,c)}),i(a),r=!0},o.onclose=l=>{r?e():i("NO-WS-CONNECTION")}}catch(o){i("NO-WS-CONNECTION")}})}function Ex(e){return(window.location.protocol==="https:"?"wss:":"ws:")+"//"+e}function Sx(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});e.send(n)}function Ax(e,t){e.addEventListener("message",n=>{t(Cx(n))})}function Cx(e){return JSON.parse(e.data)}var xx=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Fh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function V0(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Al={},kx={get exports(){return Al},set exports(e){Al=e}},Ac={},q={},_x={get exports(){return q},set exports(e){q=e}},he={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xl=Symbol.for("react.element"),Ox=Symbol.for("react.portal"),Tx=Symbol.for("react.fragment"),Ix=Symbol.for("react.strict_mode"),Px=Symbol.for("react.profiler"),Nx=Symbol.for("react.provider"),Rx=Symbol.for("react.context"),Dx=Symbol.for("react.forward_ref"),Lx=Symbol.for("react.suspense"),Mx=Symbol.for("react.memo"),Fx=Symbol.for("react.lazy"),jg=Symbol.iterator;function Bx(e){return e===null||typeof e!="object"?null:(e=jg&&e[jg]||e["@@iterator"],typeof e=="function"?e:null)}var $0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H0=Object.assign,G0={};function ua(e,t,n){this.props=e,this.context=t,this.refs=G0,this.updater=n||$0}ua.prototype.isReactComponent={};ua.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ua.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function J0(){}J0.prototype=ua.prototype;function Bh(e,t,n){this.props=e,this.context=t,this.refs=G0,this.updater=n||$0}var Uh=Bh.prototype=new J0;Uh.constructor=Bh;H0(Uh,ua.prototype);Uh.isPureReactComponent=!0;var Wg=Array.isArray,Q0=Object.prototype.hasOwnProperty,zh={current:null},K0={key:!0,ref:!0,__self:!0,__source:!0};function q0(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)Q0.call(t,r)&&!K0.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,C=B[x];if(0>>1;xi(Ze,G))mei(Ve,Ze)?(B[x]=Ve,B[me]=G,x=me):(B[x]=Ze,B[Qe]=G,x=Qe);else if(mei(Ve,G))B[x]=Ve,B[me]=G,x=me;else break e}}return V}function i(B,V){var G=B.sortIndex-V.sortIndex;return G!==0?G:B.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,f=null,d=3,p=!1,h=!1,m=!1,E=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(B){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=B)r(u),V.sortIndex=V.expirationTime,t(s,V);else break;V=n(u)}}function S(B){if(m=!1,w(B),!h)if(n(s)!==null)h=!0,ne(_);else{var V=n(u);V!==null&&fe(S,V.startTime-B)}}function _(B,V){h=!1,m&&(m=!1,g(O),O=-1),p=!0;var G=d;try{for(w(V),f=n(s);f!==null&&(!(f.expirationTime>V)||B&&!T());){var x=f.callback;if(typeof x=="function"){f.callback=null,d=f.priorityLevel;var C=x(f.expirationTime<=V);V=e.unstable_now(),typeof C=="function"?f.callback=C:f===n(s)&&r(s),w(V)}else r(s);f=n(s)}if(f!==null)var it=!0;else{var Qe=n(u);Qe!==null&&fe(S,Qe.startTime-V),it=!1}return it}finally{f=null,d=G,p=!1}}var b=!1,A=null,O=-1,I=5,P=-1;function T(){return!(e.unstable_now()-PB||125x?(B.sortIndex=G,t(u,B),n(s)===null&&B===n(u)&&(m?(g(O),O=-1):m=!0,fe(S,G-x))):(B.sortIndex=C,t(s,B),h||p||(h=!0,ne(_))),B},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(B){var V=d;return function(){var G=d;d=V;try{return B.apply(this,arguments)}finally{d=G}}}})(Z0);(function(e){e.exports=Z0})(Kx);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ew=q,Zt=Zd;function z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}function Tt(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ht[e]=new Tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ht[t]=new Tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ht[e]=new Tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ht[e]=new Tt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ht[e]=new Tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ht[e]=new Tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ht[e]=new Tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ht[e]=new Tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ht[e]=new Tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wh=/[\-:]([a-z])/g;function Yh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wh,Yh);ht[t]=new Tt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wh,Yh);ht[t]=new Tt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wh,Yh);ht[t]=new Tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ht[e]=new Tt(e,1,!1,e.toLowerCase(),null,!1,!1)});ht.xlinkHref=new Tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ht[e]=new Tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vh(e,t,n,r){var i=ht.hasOwnProperty(t)?ht[t]:null;(i!==null?i.type!==0:r||!(2l||i[a]!==o[l]){var s=` -`+i[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{Yf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ha(e):""}function t2(e){switch(e.tag){case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 2:case 15:return e=Vf(e.type,!1),e;case 11:return e=Vf(e.type.render,!1),e;case 1:return e=Vf(e.type,!0),e;default:return""}}function ip(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yo:return"Fragment";case vo:return"Portal";case tp:return"Profiler";case $h:return"StrictMode";case np:return"Suspense";case rp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rw:return(e.displayName||"Context")+".Consumer";case nw:return(e._context.displayName||"Context")+".Provider";case Hh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gh:return t=e.displayName||null,t!==null?t:ip(e.type)||"Memo";case zr:t=e._payload,e=e._init;try{return ip(e(t))}catch(n){}}return null}function n2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ip(t);case 8:return t===$h?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ow(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function r2(e){var t=ow(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rs(e){e._valueTracker||(e._valueTracker=r2(e))}function aw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ow(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _u(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function op(e,t){var n=t.checked;return Ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Gg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lw(e,t){t=t.checked,t!=null&&Vh(e,"checked",t,!1)}function ap(e,t){lw(e,t);var n=fi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?lp(e,t.type,n):t.hasOwnProperty("defaultValue")&&lp(e,t.type,fi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function lp(e,t,n){(t!=="number"||_u(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ga=Array.isArray;function Io(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ds.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function xl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i2=["Webkit","ms","Moz","O"];Object.keys(rl).forEach(function(e){i2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rl[t]=rl[e]})});function fw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rl.hasOwnProperty(e)&&rl[e]?(""+t).trim():t+"px"}function dw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var o2=Ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function cp(e,t){if(t){if(o2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function fp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var dp=null;function Jh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pp=null,Po=null,No=null;function qg(e){if(e=ts(e)){if(typeof pp!="function")throw Error(z(280));var t=e.stateNode;t&&(t=Oc(t),pp(e.stateNode,e.type,t))}}function pw(e){Po?No?No.push(e):No=[e]:Po=e}function hw(){if(Po){var e=Po,t=No;if(No=Po=null,qg(e),t)for(e=0;e>>=0,e===0?32:31-(g2(e)/v2|0)|0}var Ls=64,Ms=4194304;function Ja(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=Ja(l):(o&=a,o!==0&&(r=Ja(o)))}else a=n&~i,a!==0?r=Ja(a):o!==0&&(r=Ja(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Zl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Fn(t),e[t]=n}function E2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ol),av=String.fromCharCode(32),lv=!1;function Dw(e,t){switch(e){case"keyup":return Q2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wo=!1;function q2(e,t){switch(e){case"compositionend":return Lw(t);case"keypress":return t.which!==32?null:(lv=!0,av);case"textInput":return e=t.data,e===av&&lv?null:e;default:return null}}function X2(e,t){if(wo)return e==="compositionend"||!nm&&Dw(e,t)?(e=Nw(),su=Zh=Kr=null,wo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fv(n)}}function Uw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zw(){for(var e=window,t=_u();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=_u(e.document)}return t}function rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function lk(e){var t=zw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uw(n.ownerDocument.documentElement,n)){if(r!==null&&rm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dv(n,o);var a=dv(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,bo=null,wp=null,ll=null,bp=!1;function pv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bp||bo==null||bo!==_u(r)||(r=bo,"selectionStart"in r&&rm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ll&&Pl(ll,r)||(ll=r,r=Du(wp,"onSelect"),0Ao||(e.current=kp[Ao],kp[Ao]=null,Ao--)}function Oe(e,t){Ao++,kp[Ao]=e.current,e.current=t}var di={},At=yi(di),Ft=yi(!1),$i=di;function Yo(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Bt(e){return e=e.childContextTypes,e!=null}function Mu(){Pe(Ft),Pe(At)}function bv(e,t,n){if(At.current!==di)throw Error(z(168));Oe(At,t),Oe(Ft,n)}function Qw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(z(108,n2(e)||"Unknown",i));return Ye({},n,r)}function Fu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,$i=At.current,Oe(At,e),Oe(Ft,Ft.current),!0}function Ev(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=Qw(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,Pe(Ft),Pe(At),Oe(At,e)):Pe(Ft),Oe(Ft,n)}var mr=null,Tc=!1,id=!1;function Kw(e){mr===null?mr=[e]:mr.push(e)}function wk(e){Tc=!0,Kw(e)}function wi(){if(!id&&mr!==null){id=!0;var e=0,t=ye;try{var n=mr;for(ye=1;e>=a,i-=a,wr=1<<32-Fn(t)+i|n<O?(I=A,A=null):I=A.sibling;var P=d(g,A,w[O],S);if(P===null){A===null&&(A=I);break}e&&A&&P.alternate===null&&t(g,A),y=o(P,y,O),b===null?_=P:b.sibling=P,b=P,A=I}if(O===w.length)return n(g,A),Me&&Ii(g,O),_;if(A===null){for(;OO?(I=A,A=null):I=A.sibling;var T=d(g,A,P.value,S);if(T===null){A===null&&(A=I);break}e&&A&&T.alternate===null&&t(g,A),y=o(T,y,O),b===null?_=T:b.sibling=T,b=T,A=I}if(P.done)return n(g,A),Me&&Ii(g,O),_;if(A===null){for(;!P.done;O++,P=w.next())P=f(g,P.value,S),P!==null&&(y=o(P,y,O),b===null?_=P:b.sibling=P,b=P);return Me&&Ii(g,O),_}for(A=r(g,A);!P.done;O++,P=w.next())P=p(A,g,O,P.value,S),P!==null&&(e&&P.alternate!==null&&A.delete(P.key===null?O:P.key),y=o(P,y,O),b===null?_=P:b.sibling=P,b=P);return e&&A.forEach(function(F){return t(g,F)}),Me&&Ii(g,O),_}function E(g,y,w,S){if(typeof w=="object"&&w!==null&&w.type===yo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ns:e:{for(var _=w.key,b=y;b!==null;){if(b.key===_){if(_=w.type,_===yo){if(b.tag===7){n(g,b.sibling),y=i(b,w.props.children),y.return=g,g=y;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===zr&&Ov(_)===b.type){n(g,b.sibling),y=i(b,w.props),y.ref=Pa(g,b,w),y.return=g,g=y;break e}n(g,b);break}else t(g,b);b=b.sibling}w.type===yo?(y=Ui(w.props.children,g.mode,S,w.key),y.return=g,g=y):(S=gu(w.type,w.key,w.props,null,g.mode,S),S.ref=Pa(g,y,w),S.return=g,g=S)}return a(g);case vo:e:{for(b=w.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(g,y.sibling),y=i(y,w.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=dd(w,g.mode,S),y.return=g,g=y}return a(g);case zr:return b=w._init,E(g,y,b(w._payload),S)}if(Ga(w))return h(g,y,w,S);if(ka(w))return m(g,y,w,S);Ys(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(g,y.sibling),y=i(y,w),y.return=g,g=y):(n(g,y),y=fd(w,g.mode,S),y.return=g,g=y),a(g)):n(g,y)}return E}var $o=ib(!0),ob=ib(!1),ns={},er=yi(ns),Ll=yi(ns),Ml=yi(ns);function Fi(e){if(e===ns)throw Error(z(174));return e}function dm(e,t){switch(Oe(Ml,t),Oe(Ll,e),Oe(er,ns),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:up(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=up(t,e)}Pe(er),Oe(er,t)}function Ho(){Pe(er),Pe(Ll),Pe(Ml)}function ab(e){Fi(Ml.current);var t=Fi(er.current),n=up(t,e.type);t!==n&&(Oe(Ll,e),Oe(er,n))}function pm(e){Ll.current===e&&(Pe(er),Pe(Ll))}var Ue=yi(0);function Yu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var od=[];function hm(){for(var e=0;en?n:4,e(!0);var r=ad.transition;ad.transition={};try{e(!1),t()}finally{ye=n,ad.transition=r}}function Sb(){return vn().memoizedState}function Ak(e,t,n){var r=oi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ab(e))Cb(t,n);else if(n=eb(e,t,n,r),n!==null){var i=_t();Bn(n,e,r,i),xb(n,t,r)}}function Ck(e,t,n){var r=oi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ab(e))Cb(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(i.hasEagerState=!0,i.eagerState=l,Un(l,a)){var s=t.interleaved;s===null?(i.next=i,cm(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch(u){}finally{}n=eb(e,t,i,r),n!==null&&(i=_t(),Bn(n,e,r,i),xb(n,t,r))}}function Ab(e){var t=e.alternate;return e===je||t!==null&&t===je}function Cb(e,t){sl=Vu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kh(e,n)}}var $u={readContext:gn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},xk={readContext:gn,useCallback:function(e,t){return $n().memoizedState=[e,t===void 0?null:t],e},useContext:gn,useEffect:Iv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,du(4194308,4,vb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return du(4194308,4,e,t)},useInsertionEffect:function(e,t){return du(4,2,e,t)},useMemo:function(e,t){var n=$n();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$n();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ak.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=$n();return e={current:e},t.memoizedState=e},useState:Tv,useDebugValue:wm,useDeferredValue:function(e){return $n().memoizedState=e},useTransition:function(){var e=Tv(!1),t=e[0];return e=Sk.bind(null,e[1]),$n().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=$n();if(Me){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),st===null)throw Error(z(349));Gi&30||ub(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Iv(fb.bind(null,r,o,e),[e]),r.flags|=2048,Ul(9,cb.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$n(),t=st.identifierPrefix;if(Me){var n=br,r=wr;n=(r&~(1<<32-Fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Jn]=t,e[Dl]=r,Db(e,t,!1,!1),t.stateNode=e;e:{switch(a=fp(n,r),n){case"dialog":Te("cancel",e),Te("close",e),i=r;break;case"iframe":case"object":case"embed":Te("load",e),i=r;break;case"video":case"audio":for(i=0;iJo&&(t.flags|=128,r=!0,Na(o,!1),t.lanes=4194304)}else{if(!r)if(e=Yu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Na(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Me)return vt(t),null}else 2*qe()-o.renderingStartTime>Jo&&n!==1073741824&&(t.flags|=128,r=!0,Na(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=qe(),t.sibling=null,n=Ue.current,Oe(Ue,r?n&1|2:n&1),t):(vt(t),null);case 22:case 23:return xm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ht&1073741824&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function Rk(e,t){switch(om(t),t.tag){case 1:return Bt(t.type)&&Mu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ho(),Pe(Ft),Pe(At),hm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pm(t),null;case 13:if(Pe(Ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));Vo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Ue),null;case 4:return Ho(),null;case 10:return um(t.type._context),null;case 22:case 23:return xm(),null;case 24:return null;default:return null}}var $s=!1,Et=!1,Dk=typeof WeakSet=="function"?WeakSet:Set,Q=null;function _o(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){He(e,t,r)}else n.current=null}function Bp(e,t,n){try{n()}catch(r){He(e,t,r)}}var Uv=!1;function Lk(e,t){if(Ep=Nu,e=zw(),rm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(S){n=null;break e}var a=0,l=-1,s=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(l=a+i),f!==o||r!==0&&f.nodeType!==3||(s=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=a),d===o&&++c===r&&(s=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sp={focusedElem:e,selectionRange:n},Nu=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,E=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Pn(t.type,m),E);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(S){He(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=Uv,Uv=!1,h}function ul(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Bp(t,n,o)}i=i.next}while(i!==r)}}function Nc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Up(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fb(e){var t=e.alternate;t!==null&&(e.alternate=null,Fb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[Dl],delete t[xp],delete t[vk],delete t[yk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bb(e){return e.tag===5||e.tag===3||e.tag===4}function zv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lu));else if(r!==4&&(e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function jp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jp(e,t,n),e=e.sibling;e!==null;)jp(e,t,n),e=e.sibling}var dt=null,Nn=!1;function Br(e,t,n){for(n=n.child;n!==null;)Ub(e,t,n),n=n.sibling}function Ub(e,t,n){if(Zn&&typeof Zn.onCommitFiberUnmount=="function")try{Zn.onCommitFiberUnmount(Cc,n)}catch(l){}switch(n.tag){case 5:Et||_o(n,t);case 6:var r=dt,i=Nn;dt=null,Br(e,t,n),dt=r,Nn=i,dt!==null&&(Nn?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(Nn?(e=dt,n=n.stateNode,e.nodeType===8?rd(e.parentNode,n):e.nodeType===1&&rd(e,n),Tl(e)):rd(dt,n.stateNode));break;case 4:r=dt,i=Nn,dt=n.stateNode.containerInfo,Nn=!0,Br(e,t,n),dt=r,Nn=i;break;case 0:case 11:case 14:case 15:if(!Et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Bp(n,t,a),i=i.next}while(i!==r)}Br(e,t,n);break;case 1:if(!Et&&(_o(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){He(n,t,l)}Br(e,t,n);break;case 21:Br(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,Br(e,t,n),Et=r):Br(e,t,n);break;default:Br(e,t,n)}}function jv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dk),t.forEach(function(r){var i=Vk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function On(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fk(r/1960))-r,10e?16:e,qr===null)var r=!1;else{if(e=qr,qr=null,Ju=0,ve&6)throw Error(z(331));var i=ve;for(ve|=4,Q=e.current;Q!==null;){var o=Q,a=o.child;if(Q.flags&16){var l=o.deletions;if(l!==null){for(var s=0;sqe()-Am?Bi(e,0):Sm|=n),Ut(e,t)}function Gb(e,t){t===0&&(e.mode&1?(t=Ms,Ms<<=1,!(Ms&130023424)&&(Ms=4194304)):t=1);var n=_t();e=kr(e,t),e!==null&&(Zl(e,t,n),Ut(e,n))}function Yk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gb(e,n)}function Vk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),Gb(e,n)}var Jb;Jb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Lt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Lt=!1,Pk(e,t,n);Lt=!!(e.flags&131072)}else Lt=!1,Me&&t.flags&1048576&&qw(t,Uu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pu(e,t),e=t.pendingProps;var i=Yo(t,At.current);Do(t,n),i=gm(null,t,r,e,i,n);var o=vm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bt(r)?(o=!0,Fu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,fm(t),i.updater=Ic,t.stateNode=i,i._reactInternals=t,Pp(t,r,e,n),t=Dp(null,t,r,!0,o,n)):(t.tag=0,Me&&o&&im(t),xt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pu(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Hk(r),e=Pn(r,e),i){case 0:t=Rp(null,t,r,e,n);break e;case 1:t=Mv(null,t,r,e,n);break e;case 11:t=Dv(null,t,r,e,n);break e;case 14:t=Lv(null,t,r,Pn(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),Rp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),Mv(e,t,r,i,n);case 3:e:{if(Pb(t),e===null)throw Error(z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,tb(e,t),Wu(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Go(Error(z(423)),t),t=Fv(e,t,r,n,i);break e}else if(r!==i){i=Go(Error(z(424)),t),t=Fv(e,t,r,n,i);break e}else for(Qt=ni(t.stateNode.containerInfo.firstChild),qt=t,Me=!0,Ln=null,n=ob(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vo(),r===i){t=_r(e,t,n);break e}xt(e,t,r,n)}t=t.child}return t;case 5:return ab(t),e===null&&Op(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Ap(r,i)?a=null:o!==null&&Ap(r,o)&&(t.flags|=32),Ib(e,t),xt(e,t,a,n),t.child;case 6:return e===null&&Op(t),null;case 13:return Nb(e,t,n);case 4:return dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$o(t,null,r,n):xt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),Dv(e,t,r,i,n);case 7:return xt(e,t,t.pendingProps,n),t.child;case 8:return xt(e,t,t.pendingProps.children,n),t.child;case 12:return xt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Oe(zu,r._currentValue),r._currentValue=a,o!==null)if(Un(o.value,a)){if(o.children===i.children&&!Ft.current){t=_r(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Er(-1,n&-n),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Tp(o.return,n,t),l.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(z(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Tp(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}xt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Do(t,n),i=gn(i),r=r(i),t.flags|=1,xt(e,t,r,n),t.child;case 14:return r=t.type,i=Pn(r,t.pendingProps),i=Pn(r.type,i),Lv(e,t,r,i,n);case 15:return Ob(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Pn(r,i),pu(e,t),t.tag=1,Bt(r)?(e=!0,Fu(t)):e=!1,Do(t,n),rb(t,r,i),Pp(t,r,i,n),Dp(null,t,r,!0,e,n);case 19:return Rb(e,t,n);case 22:return Tb(e,t,n)}throw Error(z(156,t.tag))};function Qb(e,t){return Ew(e,t)}function $k(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(e,t,n,r){return new $k(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hk(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hh)return 11;if(e===Gh)return 14}return 2}function ai(e,t){var n=e.alternate;return n===null?(n=fn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gu(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_m(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case yo:return Ui(n.children,i,o,t);case $h:a=8,i|=8;break;case tp:return e=fn(12,n,t,i|2),e.elementType=tp,e.lanes=o,e;case np:return e=fn(13,n,t,i),e.elementType=np,e.lanes=o,e;case rp:return e=fn(19,n,t,i),e.elementType=rp,e.lanes=o,e;case iw:return Dc(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nw:a=10;break e;case rw:a=9;break e;case Hh:a=11;break e;case Gh:a=14;break e;case zr:a=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=fn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ui(e,t,n,r){return e=fn(7,e,r,t),e.lanes=n,e}function Dc(e,t,n,r){return e=fn(22,e,r,t),e.elementType=iw,e.lanes=n,e.stateNode={isHidden:!1},e}function fd(e,t,n){return e=fn(6,e,null,t),e.lanes=n,e}function dd(e,t,n){return t=fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hf(0),this.expirationTimes=Hf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hf(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Om(e,t,n,r,i,o,a,l,s){return e=new Gk(e,t,n,l,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=fn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fm(o),e}function Jk(e,t,n){var r=3pd("Sending message to backend",e),incomingMsgs:{subscribe:(e,t)=>(pd(`Request for subscription to ${e}:`,t),{unsubscribe:()=>pd(`Request for removing subscription to ${e}:`,t)})},mode:"HTTPUV"},eE=k.createContext(Zk);function e_({children:e,sendMsg:t,incomingMsgs:n,mode:r}){return v(eE.Provider,{value:{sendMsg:t,incomingMsgs:n,mode:r},children:e})}function rs(){return k.useContext(eE)}var tE=t_;function t_(e,t,n){var r=null,i=null,o=function(){r&&(clearTimeout(r),i=null,r=null)},a=function(){var s=i;o(),s&&s()},l=function(){if(!t)return e.apply(this,arguments);var s=this,u=arguments,c=n&&!r;if(o(),i=function(){e.apply(s,u)},r=setTimeout(function(){if(r=null,!c){var f=i;return i=null,f()}},t),c)return i()};return l.cancel=o,l.flush=a,l}var Hp={},n_={get exports(){return Hp},set exports(e){Hp=e}},nE={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Qo=q;function r_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var i_=typeof Object.is=="function"?Object.is:r_,o_=Qo.useState,a_=Qo.useEffect,l_=Qo.useLayoutEffect,s_=Qo.useDebugValue;function u_(e,t){var n=t(),r=o_({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return l_(function(){i.value=n,i.getSnapshot=t,hd(i)&&o({inst:i})},[e,n,t]),a_(function(){return hd(i)&&o({inst:i}),e(function(){hd(i)&&o({inst:i})})},[e]),s_(n),n}function hd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i_(e,n)}catch(r){return!0}}function c_(e,t){return t()}var f_=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?c_:u_;nE.useSyncExternalStore=Qo.useSyncExternalStore!==void 0?Qo.useSyncExternalStore:f_;(function(e){e.exports=nE})(n_);var Gp={},d_={get exports(){return Gp},set exports(e){Gp=e}},rE={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Uc=q,p_=Hp;function h_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var m_=typeof Object.is=="function"?Object.is:h_,g_=p_.useSyncExternalStore,v_=Uc.useRef,y_=Uc.useEffect,w_=Uc.useMemo,b_=Uc.useDebugValue;rE.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=v_(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=w_(function(){function s(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var h=a.value;if(i(h,p))return f=h}return f=p}if(h=f,m_(c,p))return h;var m=r(p);return i!==void 0&&i(h,m)?h:(c=p,f=m)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return s(t())},d===null?void 0:function(){return s(d())}]},[t,n,r,i]);var l=g_(e,o[0],o[1]);return y_(function(){a.hasValue=!0,a.value=l},[l]),b_(l),l};(function(e){e.exports=rE})(d_);function E_(e){e()}let iE=E_;const S_=e=>iE=e,A_=()=>iE,pi=q.createContext(null);function oE(){return q.useContext(pi)}const C_=()=>{throw new Error("uSES not initialized!")};let aE=C_;const x_=e=>{aE=e},k_=(e,t)=>e===t;function __(e=pi){const t=e===pi?oE:()=>q.useContext(e);return function(r,i=k_){const{store:o,subscription:a,getServerState:l}=t(),s=aE(a.addNestedSub,o.getState,l||o.getState,r,i);return q.useDebugValue(s),s}}const is=__();var $r={},O_={get exports(){return $r},set exports(e){$r=e}},we={};/** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ut=typeof Symbol=="function"&&Symbol.for,Nm=ut?Symbol.for("react.element"):60103,Rm=ut?Symbol.for("react.portal"):60106,zc=ut?Symbol.for("react.fragment"):60107,jc=ut?Symbol.for("react.strict_mode"):60108,Wc=ut?Symbol.for("react.profiler"):60114,Yc=ut?Symbol.for("react.provider"):60109,Vc=ut?Symbol.for("react.context"):60110,Dm=ut?Symbol.for("react.async_mode"):60111,$c=ut?Symbol.for("react.concurrent_mode"):60111,Hc=ut?Symbol.for("react.forward_ref"):60112,Gc=ut?Symbol.for("react.suspense"):60113,T_=ut?Symbol.for("react.suspense_list"):60120,Jc=ut?Symbol.for("react.memo"):60115,Qc=ut?Symbol.for("react.lazy"):60116,I_=ut?Symbol.for("react.block"):60121,P_=ut?Symbol.for("react.fundamental"):60117,N_=ut?Symbol.for("react.responder"):60118,R_=ut?Symbol.for("react.scope"):60119;function on(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Nm:switch(e=e.type,e){case Dm:case $c:case zc:case Wc:case jc:case Gc:return e;default:switch(e=e&&e.$$typeof,e){case Vc:case Hc:case Qc:case Jc:case Yc:return e;default:return t}}case Rm:return t}}}function lE(e){return on(e)===$c}we.AsyncMode=Dm;we.ConcurrentMode=$c;we.ContextConsumer=Vc;we.ContextProvider=Yc;we.Element=Nm;we.ForwardRef=Hc;we.Fragment=zc;we.Lazy=Qc;we.Memo=Jc;we.Portal=Rm;we.Profiler=Wc;we.StrictMode=jc;we.Suspense=Gc;we.isAsyncMode=function(e){return lE(e)||on(e)===Dm};we.isConcurrentMode=lE;we.isContextConsumer=function(e){return on(e)===Vc};we.isContextProvider=function(e){return on(e)===Yc};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nm};we.isForwardRef=function(e){return on(e)===Hc};we.isFragment=function(e){return on(e)===zc};we.isLazy=function(e){return on(e)===Qc};we.isMemo=function(e){return on(e)===Jc};we.isPortal=function(e){return on(e)===Rm};we.isProfiler=function(e){return on(e)===Wc};we.isStrictMode=function(e){return on(e)===jc};we.isSuspense=function(e){return on(e)===Gc};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zc||e===$c||e===Wc||e===jc||e===Gc||e===T_||typeof e=="object"&&e!==null&&(e.$$typeof===Qc||e.$$typeof===Jc||e.$$typeof===Yc||e.$$typeof===Vc||e.$$typeof===Hc||e.$$typeof===P_||e.$$typeof===N_||e.$$typeof===R_||e.$$typeof===I_)};we.typeOf=on;(function(e){e.exports=we})(O_);var sE=$r,D_={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},L_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uE={};uE[sE.ForwardRef]=D_;uE[sE.Memo]=L_;var Kv={},M_={get exports(){return Kv},set exports(e){Kv=e}},be={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Lm=Symbol.for("react.element"),Mm=Symbol.for("react.portal"),Kc=Symbol.for("react.fragment"),qc=Symbol.for("react.strict_mode"),Xc=Symbol.for("react.profiler"),Zc=Symbol.for("react.provider"),ef=Symbol.for("react.context"),F_=Symbol.for("react.server_context"),tf=Symbol.for("react.forward_ref"),nf=Symbol.for("react.suspense"),rf=Symbol.for("react.suspense_list"),of=Symbol.for("react.memo"),af=Symbol.for("react.lazy"),B_=Symbol.for("react.offscreen"),cE;cE=Symbol.for("react.module.reference");function En(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lm:switch(e=e.type,e){case Kc:case Xc:case qc:case nf:case rf:return e;default:switch(e=e&&e.$$typeof,e){case F_:case ef:case tf:case af:case of:case Zc:return e;default:return t}}case Mm:return t}}}be.ContextConsumer=ef;be.ContextProvider=Zc;be.Element=Lm;be.ForwardRef=tf;be.Fragment=Kc;be.Lazy=af;be.Memo=of;be.Portal=Mm;be.Profiler=Xc;be.StrictMode=qc;be.Suspense=nf;be.SuspenseList=rf;be.isAsyncMode=function(){return!1};be.isConcurrentMode=function(){return!1};be.isContextConsumer=function(e){return En(e)===ef};be.isContextProvider=function(e){return En(e)===Zc};be.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lm};be.isForwardRef=function(e){return En(e)===tf};be.isFragment=function(e){return En(e)===Kc};be.isLazy=function(e){return En(e)===af};be.isMemo=function(e){return En(e)===of};be.isPortal=function(e){return En(e)===Mm};be.isProfiler=function(e){return En(e)===Xc};be.isStrictMode=function(e){return En(e)===qc};be.isSuspense=function(e){return En(e)===nf};be.isSuspenseList=function(e){return En(e)===rf};be.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Kc||e===Xc||e===qc||e===nf||e===rf||e===B_||typeof e=="object"&&e!==null&&(e.$$typeof===af||e.$$typeof===of||e.$$typeof===Zc||e.$$typeof===ef||e.$$typeof===tf||e.$$typeof===cE||e.getModuleId!==void 0)};be.typeOf=En;(function(e){e.exports=be})(M_);function U_(){const e=A_();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const qv={notify(){},get:()=>[]};function z_(e,t){let n,r=qv;function i(f){return s(),r.subscribe(f)}function o(){r.notify()}function a(){c.onStateChange&&c.onStateChange()}function l(){return Boolean(n)}function s(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=U_())}function u(){n&&(n(),n=void 0,r.clear(),r=qv)}const c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:l,trySubscribe:s,tryUnsubscribe:u,getListeners:()=>r};return c}const j_=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",W_=j_?q.useLayoutEffect:q.useEffect;function Y_({store:e,context:t,children:n,serverState:r}){const i=q.useMemo(()=>{const l=z_(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0}},[e,r]),o=q.useMemo(()=>e.getState(),[e]);W_(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,o]);const a=t||pi;return k.createElement(a.Provider,{value:i},n)}function fE(e=pi){const t=e===pi?oE:()=>q.useContext(e);return function(){const{store:r}=t();return r}}const dE=fE();function V_(e=pi){const t=e===pi?dE:fE(e);return function(){return t().dispatch}}const Nr=V_();x_(Gp.useSyncExternalStoreWithSelector);S_(ci.unstable_batchedUpdates);const ir={ui:"",libraries:""},$_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEO0lEQVR4nO3dsYqcVRiH8WeNrkXMDRgLixRWRjSiXoMWG0iUXIGNsii4wRsQTApD0EIvQBCJ2RD0GqIoRjthC4vsHaRxRcbi7MDk28kMgv+c92SfH2zxfbPFmZcnZ06+LWZjNpsh/d+e6L0APZ4MSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqWIJ3svYJ2db/aW3d4Etg5/3gCePby3Mfm96RcFjfj6feAe8CtwE7gFHEx+jyvvnJne6qp8WEucB64AtSaZ8wzwwuHPJWAPuAx813NR64z0UXgC+JQ20OMS1TJngBu0WZzovJaHGmnH+gTY6b2IQuazuNx1FQ8xyo51gaNRHQDXaWesUxw9n3B4b/FnxNdP0d7jdY6erXZosylnhLA2gc8m9/aB14Bt4A7tgPu4uk97j9u097w/ef0abUaljBDWReC5hesD4C3gbpfV9HUXeBP4a+HeaeDtLqtZYYSwtibXX3I8o5r7Dfhqcm+rwzpWGiGsVyfXX3dZRS3TGZzrsooVRvhf4fOT63LniQ7usPywX8YIO9bUkafOqmfEsDQAw1LECGesdX+oPa5Kz8UdSxGGpQjDUsQIZ6xSZ4dCSs/FHUsRhqUIw1LECGes0s9rOio9F3csRRiWIgxLESOcsUqdHQopPRd3LEUYliIMSxEjnLFKP6/pqPRc3LEUYViKMCxFjHDGKnV2KKT0XNyxFGFYijAsRYxwxir9vKaj0nNxx1KEYSnCsBQxwhmr1NmhkNJzccdShGEpwrAUMcIZq/Tzmo5Kz8UdSxGGpQjDUsQIZ6xSZ4dCSs/FHUsRhqWIEcPyK08GMEJYf9Ce2cx/Xu67nBJe58GZ/Nl1NUuMENbvk+tLXVZRy3QGP3dZxQojhLU7uX4XONthHVW8SJvBot0O61hphLC+Be4tXD8NfA+81GU1fZ0FfqDNYG6fNqNSRgjrAPhwcu808CPt+5DPAScf8ZoepZO093gN+In23hd9wINf5VvCCA9Iof2LvAp8tHBvk/YF3NsL96YPDdf9oXa016euUnC3gjF2rLmPgc97L6KQL2gzKWmksP4B3gcuAHud19LTHnAReI82k5JG+ShcdAO4TRvueeAV2rnjqZ6LCvqbdkD/BbhJ++gr//XFG7PZuo9x6b8b6aNQAzEsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliL+BXaHdHGUC5uqAAAAAElFTkSuQmCC";function xe(){return function(o){var a=o,{name:t,library:n,category:r}=a,i=ke(a,["name","library","category"]);return R({uiName:n?`${n}::${t}`:t,name:t,library:n,category:r!=null?r:"Uncategorized"},i)}}function Xe(...e){return e.filter(t=>t).join(" ")}const H_="_button_1y00r_1",G_="_regular_1y00r_26",J_="_icon_1y00r_34",Q_="_transparent_1y00r_42",md={button:H_,regular:G_,delete:"_delete_1y00r_30",icon:J_,transparent:Q_},mt=i=>{var o=i,{children:e,variant:t="regular",className:n}=o,r=ke(o,["children","variant","className"]);const a=t?Array.isArray(t)?t.map(l=>md[l]).join(" "):md[t]:"";return v("button",$(R({className:Xe(md.button,a,n)},r),{children:e}))};function K_({text:e,position:t="down",size:n,children:r}){return v("span",{"aria-label":e,"data-balloon-pos":t,"data-balloon-length":n,children:r})}function Rr(a){var l=a,{text:e,position:t="down",size:n,children:r,variant:i="icon"}=l,o=ke(l,["text","position","size","children","variant"]);return v(mt,$(R({"aria-label":e,"data-balloon-pos":t,"data-balloon-length":n,variant:i},o),{children:r}))}const pE=({children:e,el:t="div"})=>{const[n]=q.useState(document.createElement(t));return q.useEffect(()=>(document.body.appendChild(n),()=>{document.body.removeChild(n)}),[n]),ci.createPortal(e,n)},hE=236,q_=174,X_=31,mE={"--elements-palette-width":`${q_}px`,"--header-height":`${X_}px`,"--properties-panel-width":`${hE}px`},Z_="_container_1w66f_1",eO="_full_screen_mode_1w66f_13",tO="_full_screen_button_container_1w66f_25",nO="_card_holder_1w66f_69",rO="_card_contents_holder_1w66f_76",vu={container:Z_,full_screen_mode:eO,full_screen_button_container:tO,card_holder:nO,card_contents_holder:rO},gE=k.forwardRef((o,i)=>{var a=o,{children:e,style:t,card_args:{full_screen:n=!1}}=a,r=ke(a,["children","style","card_args"]);const[l,s]=k.useState(!1),u=()=>s(f=>!f),c=M("div",{style:mE,className:Xe("card",vu.container,l?vu.full_screen_mode:null),children:[n?v(iO,{isFullScreen:l,onClick:u}):null,e]});return l?v(pE,{children:c}):v("div",$(R({ref:i,style:t,className:vu.card_holder},r),{children:c}))});function iO({isFullScreen:e,onClick:t}){return v("div",{className:vu.full_screen_button_container,"data-is-full-screen":e,children:v(Rr,{text:e?"Reset full screen":"Expand to full screen",position:"left",onClick:n=>{n.preventDefault(),t()},variant:e?"regular":"icon",children:e?"Close":v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",role:"img",children:v("path",{"fill-rule":"evenodd",d:"M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"})})})})}function Xv(...e){let t=0;for(const n of e)n&&(t+=1);return t}function Mn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Fm(e)?2:Bm(e)?3:0}function Mo(e,t){return da(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oO(e,t){return da(e)===2?e.get(t):e[t]}function vE(e,t,n){var r=da(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function yE(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Fm(e){return fO&&e instanceof Map}function Bm(e){return dO&&e instanceof Set}function Ni(e){return e.o||e.t}function Um(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=bE(e);delete t[De];for(var n=Fo(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=aO),Object.freeze(e),t&&Ki(e,function(n,r){return zm(r,!0)},!0)),e}function aO(){Mn(2)}function jm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tr(e){var t=qp[e];return t||Mn(18,e),t}function lO(e,t){qp[e]||(qp[e]=t)}function Jp(){return jl}function gd(e,t){t&&(tr("Patches"),e.u=[],e.s=[],e.v=t)}function qu(e){Qp(e),e.p.forEach(sO),e.p=null}function Qp(e){e===jl&&(jl=e.l)}function Zv(e){return jl={p:[],l:jl,h:e,m:!0,_:0}}function sO(e){var t=e[De];t.i===0||t.i===1?t.j():t.O=!0}function vd(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||tr("ES5").S(t,e,r),r?(n[De].P&&(qu(t),Mn(4)),Or(e)&&(e=Xu(t,e),t.l||Zu(t,e)),t.u&&tr("Patches").M(n[De].t,e,t.u,t.s)):e=Xu(t,n,[]),qu(t),t.u&&t.v(t.u,t.s),e!==wE?e:void 0}function Xu(e,t,n){if(jm(t))return t;var r=t[De];if(!r)return Ki(t,function(l,s){return ey(e,r,t,l,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Zu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=Um(r.k):r.o,o=i,a=!1;r.i===3&&(o=new Set(i),i.clear(),a=!0),Ki(o,function(l,s){return ey(e,r,i,l,s,n,a)}),Zu(e,i,!1),n&&e.u&&tr("Patches").N(r,n,e.u,e.s)}return r.o}function ey(e,t,n,r,i,o,a){if(hi(i)){var l=Xu(e,i,o&&t&&t.i!==3&&!Mo(t.R,r)?o.concat(r):void 0);if(vE(n,r,l),!hi(l))return;e.m=!1}else a&&n.add(i);if(Or(i)&&!jm(i)){if(!e.h.D&&e._<1)return;Xu(e,i),t&&t.A.l||Zu(e,i)}}function Zu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&zm(t,n)}function yd(e,t){var n=e[De];return(n?Ni(n):e)[t]}function ty(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Hr(e){e.P||(e.P=!0,e.l&&Hr(e.l))}function wd(e){e.o||(e.o=Um(e.t))}function Kp(e,t,n){var r=Fm(t)?tr("MapSet").F(t,n):Bm(t)?tr("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),l={i:a?1:0,A:o?o.A:Jp(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=l,u=Wl;a&&(s=[l],u=Ka);var c=Proxy.revocable(s,u),f=c.revoke,d=c.proxy;return l.k=d,l.j=f,d}(t,n):tr("ES5").J(t,n);return(n?n.A:Jp()).p.push(r),r}function uO(e){return hi(e)||Mn(22,e),function t(n){if(!Or(n))return n;var r,i=n[De],o=da(n);if(i){if(!i.P&&(i.i<4||!tr("ES5").K(i)))return i.t;i.I=!0,r=ny(n,o),i.I=!1}else r=ny(n,o);return Ki(r,function(a,l){i&&oO(i.t,a)===l||vE(r,a,t(l))}),o===3?new Set(r):r}(e)}function ny(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Um(e)}function cO(){function e(o,a){var l=i[o];return l?l.enumerable=a:i[o]=l={configurable:!0,enumerable:a,get:function(){var s=this[De];return Wl.get(s,o)},set:function(s){var u=this[De];Wl.set(u,o,s)}},l}function t(o){for(var a=o.length-1;a>=0;a--){var l=o[a][De];if(!l.P)switch(l.i){case 5:r(l)&&Hr(l);break;case 4:n(l)&&Hr(l)}}}function n(o){for(var a=o.t,l=o.k,s=Fo(l),u=s.length-1;u>=0;u--){var c=s[u];if(c!==De){var f=a[c];if(f===void 0&&!Mo(a,c))return!0;var d=l[c],p=d&&d[De];if(p?p.t!==f:!yE(d,f))return!0}}var h=!!a[De];return s.length!==Fo(a).length+(h?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var s=0;s1?g-1:0),w=1;w1?c-1:0),d=1;d=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=tr("Patches").$;return hi(n)?a(n,r):this.produce(n,function(l){return a(l,r)})},e}(),en=new hO,bi=en.produce;en.produceWithPatches.bind(en);en.setAutoFreeze.bind(en);en.setUseProxies.bind(en);en.applyPatches.bind(en);en.createDraft.bind(en);en.finishDraft.bind(en);function Yl(e){return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function mO(e,t){if(Yl(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yl(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gO(e){var t=mO(e,"string");return Yl(t)==="symbol"?t:String(t)}function vO(e,t,n){return t=gO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ly(e){for(var t=1;t0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)for(var w=p.getState(),S=Array.from(n.values()),_=0,b=S;_t.payload.node_info,UNSET_DRAGGED:e=>null}}),{SET_DRAGGED:iT,UNSET_DRAGGED:oT}=DE.actions;function LE(){return is(e=>e.currentlyDraggedNode)}function aT(){const e=Nr();return t=>e(iT({node_info:t}))}function ME(){const e=Nr();return()=>e(oT())}const lT=DE.reducer;function FE(e){const t=k.useRef(!1),n=aT(),r=ME(),i=k.useCallback(a=>{t.current!==!1&&(a.stopPropagation(),r(),t.current=!1,document.body.removeEventListener("dragover",gy),document.body.removeEventListener("drop",i))},[r]);return{onDragStart:k.useCallback(a=>{a.stopPropagation(),t.current=!0,document.body.addEventListener("dragover",gy),document.body.addEventListener("drop",i),n(e)},[i,e,n]),onDragEnd:i,draggable:!0}}function gy(e){e.preventDefault()}function or(e,t){return[...e,t]}function uf(e){return e.join("-")}function pa(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n!n.includes(o)),i=Object.keys(t).filter(o=>!n.includes(o));if(!pa(r,i))return!1;for(let o of r)if(e[o]!==t[o])return!1;return!0}const BE=lf({name:"selectedPath",initialState:[],reducers:{SET_SELECTION:(e,t)=>t.payload.path,STEP_BACK_SELECTION:e=>e===null||e.length===0?null:(e.pop(),e)}}),{SET_SELECTION:cf,STEP_BACK_SELECTION:wj}=BE.actions;function ss(){return is(e=>e.selected_path)}function UE(){const e=Nr();return k.useCallback(n=>{e(cf({path:n}))},[e])}const uT=BE.reducer;function cT(e){const t=ss(),n=UE(),r=k.useCallback(o=>{o.stopPropagation(),n(e)},[e,n]),i=Boolean(t&&pa(t,e));return{onClick:r,isSelected:i}}function zE({node:e,path:t,canDrag:n}){const r=FE({node:e,currentPath:t}),{onClick:i,isSelected:o}=cT(t);return R({onClick:i,"data-sue-path":uf(t),"data-is-selected-node":o,"aria-label":e.uiName},n?r:{})}const Ei=({path:e,node:t,canDrag:n=!0})=>{var a;const i=ro(t.uiName).UiComponent,o=zE({path:e,node:t,canDrag:n});return v(i,{wrapperProps:o,uiArguments:t.uiArguments,uiChildren:io(t)?(a=t.uiChildren)!=null?a:[]:[],path:e})};function ji(e){return e.length}function jE(e,t,n){return n===0?!0:pa(e.slice(0,n),t.slice(0,n))}function fT(e,t){const n=ji(e),r=ji(t);return n>=r?!1:jE(e,t,n)}function WE(e,t){const n=Math.min(e.length,t.length)-1;return n<=0?!0:jE(e,t,n)}function dT({fromPath:e,toPath:t}){if(e==null)return!0;if(fT(e,t))return!1;if(WE(e,t)){const n=e.length,r=e[n-1],i=t[n-1];if(r===i||r===i-1)return!1}return!0}function pT({child:e,wrapper:t}){if(typeof t=="function"){const n=t(e);if(n===null)return e;t=n}return $(R({},t),{uiChildren:[e]})}function YE(e){return typeof e=="object"&&e!==null}const hT={symbol:"s",character:"c",boolean:"b",number:"n",unknown:"u",expression:"e"};class Qn extends Error{constructor({message:t,cause:n}){super(),this.name="AST_PARSING_ERROR",this.message=t,this.cause=n}}function Xt(e,t){return e.type===hT[t]}const mT=new Set(["c","n","b"]);function gT(e){return mT.has(e.type)}function ur(e){return e.type==="e"&&Array.isArray(e.val)}function vT(e,t){if(!ur(e))return!1;const{val:n}=e;return n[0].val==="<-"||n[0].val==="="?t?n[1].val===t:!0:!1}function VE(e){return e.val[1]}function yT(e){return e.val[2]}function rc(e){let t=[];return e.forEach(n=>{if(vT(n)){const r=VE(n);wT(r)?t.push({name:r.val[2].val,is_output:!0,node:n}):r.type==="s"&&t.push({name:r.val,is_output:!1,node:n})}if(ur(n)){const r=rc(n.val);t.push(...r)}}),t}function wT(e){if(!ur(e))return!1;const{val:t}=e;return t.length===3&&t[1].val==="output"&&typeof t[2].val=="string"}function $E(e){const t=e.filter(({is_output:r})=>r),n=new Set;return t.forEach(({name:r})=>{n.add(r)}),n}function bT(e){return!Boolean(e.pos)||!(VE(e).val==="ui")?!1:ur(yT(e))}function HE(e){const t=e.find(({name:r,is_output:i})=>r==="ui"&&!i);if(!t)throw new Qn({message:"No ui assignment node was found in provided ast"});const{node:n}=t;if(!bT(n))throw new Qn({message:"No position info attached to the ui assignment node",cause:n});return n}function ET(e,t){const n=" ".repeat(t);return e.replaceAll(/\n/g,` -${n}`)}function Ko({node:e,explanation:t}){return{uiName:"unknownUiFunction",uiArguments:{text:ur(e)?KE(e.val):Gm(e),explanation:t}}}function ST(e){return e[0].val==="c"}function AT(e){const t=e[0].val;return t==="c"||t==="list"}function CT(e){return ur(e)&&ST(e.val)}function xT(e){return ur(e)&&e.val[0].val==="list"}function kT(e){try{return GE(e)}catch(t){if(!(t instanceof Qn))throw t;return Ko({node:e,explanation:t.message})}}function GE(e){if(!ur(e))throw new Qn({message:"Tried to flatten a leaf/primative node"});const[t,...n]=e.val;if(t.val!=="c")throw new Qn({message:"Tried to flatten non array as array"});return n.map(r=>JE(r.val)?r.val:GE(r))}function _T(e){if(!ur(e))throw new Qn({message:"Tried to flatten a leaf/primative node"});try{const[t,...n]=e.val;if(t.val!=="list")throw new Qn({message:"Tried to flatten non array as array",cause:e});let r={};return n.forEach(({name:i,val:o})=>{if(typeof i!="string")throw new Qn({message:"All elements in list must have a name",cause:e});if(!JE(o))throw new Qn({message:"Nested lists are not supported",cause:e});r[i]=o}),r}catch(t){if(!(t instanceof Qn))throw t;return Ko({node:e,explanation:t.message})}}function JE(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function OT(e){return Xt(e[0],"symbol")&&e[0].val==="function"}function TT(e){if(!Xt(e,"expression")||e.val.length!==2)return!1;const[t,n]=e.val;return Xt(t,"symbol")&&t.val==="("?Xt(n,"expression")&&OT(n.val):!1}function IT([,e,t]){return`function(${e.val.map(r=>{var a;const i=(a=r.name)!=null?a:"name",o=r.val?` = ${r.val}`:"";return`${i}${o}`}).join(", ")}) {...}`}const QE=2,PT=" ".repeat(QE),Hm=60,mi=` -${PT}`;function KE(e){const[t,...n]=e;let r;if(TT(t))r=`(${IT(t.val[1].val)})`;else if(Xt(t,"symbol"))r=t.val;else return"Unknown Ui Code";const i=n.map(s=>`${s.name?`${s.name} = `:""}${Gm(s)}`),o=qE({fn_name:r,fn_args_list:i,max_line_length_for_multi_args:AT(e)?Hm:0}),a=`,${o?mi:" "}`,l=i.join(a);return`${r}(${o?mi:""}${l}${o?` -`:""})`}function qE({fn_name:e,fn_args_list:t,max_line_length_for_multi_args:n}){if(t.some(a=>a.includes(` -`)))return!0;if(n===0)return t.length>1;const i=t.reduce((a,l)=>a+l.length+2,0),o=e.length+2;return i+o>n}function Gm({val:e,type:t}){switch(t){case"b":return e?"TRUE":"FALSE";case"c":return`"${e}"`;case"m":return"";case"n":return String(e);case"s":return e;case"e":return $l(KE(e));case"u":return"<...>"}}function $l(e){return ET(e,QE)}const XE={default:null,bold:"strong",italic:"em"},NT={strong:"bold",em:"italic"},ZE={default:"span",small:"small",headline:"h1",subtitle:"h2"},eS={h1:"headline",h2:"subtitle",small:"small"};function RT(e){return!!(Xt(e,"character")||ic(e)||tS(e))}function vy(e){return{contents:e.val[1].val,decoration:NT[e.val[0].val]}}function ic(e){if(!Xt(e,"expression"))return!1;const t=e.val[0];if(!(Xt(t,"symbol")&&Object.values(XE).includes(t.val)))return!1;const r=e.val[1];return Xt(r,"character")}function tS(e){if(!Xt(e,"expression"))return!1;const t=e.val[0];if(!(Xt(t,"symbol")&&t.val in eS))return!1;const r=e.val[1];return Xt(r,"character")||ic(r)}function yy(e){const t={uiName:"textNode",uiArguments:{contents:"TO_REPLACE"}};if(typeof e=="string")return t.uiArguments.contents=e,t;if(tS(e)){t.uiArguments.size=eS[e.val[0].val];const n=e.val[1];if(ic(n)){const{decoration:r,contents:i}=vy(n);t.uiArguments.decoration=r,t.uiArguments.contents=i}else t.uiArguments.contents=n.val}else if(ic(e)){const{decoration:n,contents:r}=vy(e);t.uiArguments.decoration=n,t.uiArguments.contents=r}else t.uiArguments.contents=e.val;return t}function Jm(e){const[t,...n]=e.val;if(typeof t.val!="string")return Ko({node:e});let r={},i=[];n.forEach(a=>{a.name?r[a.name]=DT(a):i.push(LT(a))});const o=Y8.get(t.val);return o===void 0?Ko({node:e}):{uiName:o,uiArguments:r,uiChildren:i.length>0?i:void 0}}function DT(e){return gT(e)?e.val:CT(e)?kT(e):xT(e)?_T(e):Ko({node:e})}function LT(e,t){return Xt(e,"symbol")?Ko({node:e,explanation:"Unknown symbol"}):RT(e)?yy(e):ur(e)?Jm(e):yy(Gm(e))}function nS(e){return e.app_type==="SINGLE-FILE"?MT(e):FT(e)}function MT({app:{ast:e}}){const t=rc(e),n=HE(t);return{app_type:"SINGLE-FILE",app:{ui_tree:Jm(n.val[2]),ui_pos:n.pos,ui_assignment_operator:n.val[0].val,known_outputs:$E(t)}}}function FT({ui:e,server:t}){const n=rc(e.ast),r=HE(n),i=rc(t.ast);return{app_type:"MULTI-FILE",ui:{ui_tree:Jm(r.val[2]),ui_pos:r.pos,ui_assignment_operator:r.val[0].val},server:{known_outputs:$E(i)}}}function BT(e){if("ui_tree"in e)return R({mode:"MAIN"},e);try{const t=e.app_type==="SINGLE-FILE"?UT(e):jT(e);return R({mode:"MAIN"},t)}catch(t){const n=t instanceof Error?t.message:null;return n===null&&console.error("Unknown error type seen",t),{mode:"ERROR",msg:n!=null?n:"Unknown error",context:"Parsing app information from backend"}}}function UT(e){const t=nS(e),{app:{ui_pos:n,ui_assignment_operator:r,ui_tree:i,known_outputs:o}}=t,l=e.app.script.split(` -`);let s=["shiny"],u=[],c;return l.forEach((f,d)=>{var h,m;const p=rS({line:f,line_number:d,ui_pos:n});if(p==="Other"){u.push(f);return}if(p==="Library"){const E=(m=(h=Qm.exec(f))==null?void 0:h.groups)==null?void 0:m.library;E&&E!=="shiny"&&s.push(E)}if(p!==c)if(c=p,p==="UI")u.push(`ui ${r} ${ir.ui}`);else if(p==="Library")u.push(ir.libraries);else throw new Error("Unknown line type")}),{app_type:"SINGLE-FILE",ui_tree:i,known_outputs:o,app:{code:u.join(` -`),libraries:s}}}function zT({ui_pos:e,ui_assignment_operator:t},n){const r=n.split(` -`);let i=["shiny"],o=[],a;return r.forEach((l,s)=>{var c,f;const u=rS({line:l,line_number:s,ui_pos:e});if(u==="Other"){o.push(l);return}if(u==="Library"){const d=(f=(c=Qm.exec(l))==null?void 0:c.groups)==null?void 0:f.library;d&&d!=="shiny"&&i.push(d)}if(u!==a)if(a=u,u==="UI")o.push(`ui ${t} ${ir.ui}`);else if(u==="Library")o.push(ir.libraries);else throw new Error("Unknown line type")}),{code:o.join(` -`),libraries:i}}function jT(e){const{ui:t,server:{known_outputs:n}}=nS(e);return{app_type:"MULTI-FILE",ui_tree:t.ui_tree,known_outputs:n,ui:zT(t,e.ui.script),server:{code:e.server.script}}}function WT(e,[t,n,r,i]){return e>=t-1&&e<=r-1}function rS({line:e,line_number:t,ui_pos:n}){return WT(t,n)?"UI":Qm.test(e)?"Library":"Other"}const Qm=new RegExp("^\\s*library\\((?\\w+)\\)"),oc=(e,t)=>Array.from({length:e},(n,r)=>r),ac=(e,t)=>{const n=Math.abs(t-e)+1,r=ee+o*r)};function wy(e){let t=1/0,n=-1/0;for(let o of e)on&&(n=o);const r=n-t,i=Array.isArray(e)?e.length:e.size;return{minVal:t,maxVal:n,span:r,isSequence:r===i-1}}function Hl(e,t){return[...new Array(t)].fill(e)}function YT(e,t){return e.filter(n=>!t.includes(n))}function th(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function qo(e,t,n){if(t<0)throw new Error("Can't add item at a negative index");const r=[...e];return t>r.length-1&&(r.length=t),r.splice(t,0,n),r}function VT(e,t,n){if(n<0)throw new Error("Can't add item at a negative index");if(t<0||t>e.length)throw new Error("Requested to move an element that is not in array");let r=[...e];const i=r[t];return r[t]=void 0,r=qo(r,n,i),r.filter(o=>typeof o!="undefined")}function $T(e,t=", ",n=" and "){const r=e.length;if(r===1)return e[0];const i=e[r-1];return[...e].splice(0,r-1).join(t)+n+i}function HT(e){return[...new Set(e)]}function dl(e){return Array.isArray(e)?e:[e]}function Si(e,t){let n=e,r;for(r of t){if(!io(n))throw new Error("Somehow trying to enter a leaf node");n=GT(n,r)}return n}function GT(e,t){var r;const n=(r=e.uiChildren)==null?void 0:r[t];if(!n)throw new Error(`Requested path does not exist. Attempt: parent: ${JSON.stringify(e,null,2)}, child_index: ${t}`);return n}function iS(e){return e.slice(0,e.length-1)}function JT(e){return e[e.length-1]}function QT(e,{path:t,node:n}){const r=iS(t),i=t[t.length-1],o=Si(e,r);if(!io(o))throw new Error("Can't add a child to a non-container node. Check the path");Array.isArray(o.uiChildren)||(o.uiChildren=[]),o.uiChildren=qo(o.uiChildren,i,n)}function oS(e,t){return KT(e,t)&&e.at(-1)!==t.at(-1)}function KT(e,t){const n=e.length,r=t.length;if(n!==r)return!1;const i=n-1;return pa(e.slice(0,i),t.slice(0,i))}function qT(e){if(!e.uiChildren)throw new Error("Somehow trying to enter a leaf node")}function aS(e,{path:t}){const{parentNode:n,indexToNode:r}=XT(e,t);if(!io(n))throw new Error("Somehow trying to enter a leaf node");qT(n),n.uiChildren.splice(r,1)}function XT(e,t){const n=[...t],r=n.pop();if(typeof r=="undefined")throw new Error("Path to node must have at least one element");const i=n.length===0?e:Si(e,n);if(!io(i))throw new Error("Somehow trying to enter a leaf node");return{parentNode:i,indexToNode:r}}function ZT(e,{path:t,currentPath:n,node:r}){const i=iS(t),o=t[t.length-1],a=Si(e,i);if(!io(a))throw new Error("Can't add a child to a non-container node. Check the path");Array.isArray(a.uiChildren)||(a.uiChildren=[]);const l=[...i,o];if(oS(n,l)){const s=n[n.length-1];a.uiChildren=VT(a.uiChildren,s,o);return}aS(e,{path:n}),a.uiChildren=qo(a.uiChildren,o,r)}function lS(e){return"currentPath"in e&&e.currentPath!==void 0}function eI(e,t){const{path:n,node:r}=t;if(lS(t)){ZT(e,{path:n,currentPath:t.currentPath,node:r});return}QT(e,{path:n,node:r})}function tI(e,{path:t,node:n}){const r=Si(e,t);Object.assign(r,n)}function sS(e){let t=null;return()=>{var n;if(t!==null)return t;t=new Set;for(const r of ra)if("stateUpdateSubscribers"in r){const i=(n=r.stateUpdateSubscribers)==null?void 0:n[e];i&&t.add(i)}return t}}const nI=sS("DELETE_NODE"),rI=sS("UPDATE_NODE"),uS=lf({name:"state",initialState:{mode:"LOADING"},reducers:{SET_FULL_STATE:(e,t)=>t.payload.state,SET_APP_INFO:(e,t)=>BT(t.payload),SET_ERROR:(e,{payload:t})=>R({mode:"ERROR"},t),SHOW_TEMPLATE_CHOOSER:(e,{payload:t})=>({mode:"TEMPLATE_CHOOSER",options:t}),SET_LOADING:e=>({mode:"LOADING"}),UPDATE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to update a node when in template chooser mode");for(const n of rI())n(e.ui_tree,t.payload);tI(e.ui_tree,t.payload)},PLACE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to move a node when in template chooser mode");eI(e.ui_tree,t.payload)},DELETE_NODE:(e,t)=>{if(e.mode!=="MAIN")throw new Error("Tried to delete a node when in template chooser mode");for(const n of nI())n(e.ui_tree,{path:t.payload.path});aS(e.ui_tree,t.payload)}}}),{UPDATE_NODE:cS,PLACE_NODE:fS,DELETE_NODE:dS,SET_APP_INFO:iI,SET_ERROR:oI,SET_FULL_STATE:pS,SHOW_TEMPLATE_CHOOSER:aI,SET_LOADING:bj}=uS.actions;function hS(){return is(e=>e.app_info)}const lI=uS.reducer;function Km(){const e=Nr();return k.useCallback(o=>{var a=o,{wrappingNode:n,node:r}=a,i=ke(a,["wrappingNode","node"]);n&&(r=pT({child:r,wrapper:n})),e(fS(R({node:r},i)))},[e])}function qm({getCanAcceptDrop:e,onDrop:t,onDragOver:n,canAcceptDropClass:r="can-accept-drop",hoveringOverClass:i="hovering-over"}){const o=k.useRef(null),a=LE(),l=ME(),{addCanAcceptDropHighlight:s,addHoveredOverHighlight:u,removeHoveredOverHighlight:c,removeAllHighlights:f}=sI({watcherRef:o,canAcceptDropClass:r,hoveringOverClass:i}),d=a?e(a):!1,p=k.useCallback(E=>{E.preventDefault(),E.stopPropagation(),u(),n==null||n()},[u,n]),h=k.useCallback(E=>{E.preventDefault(),c()},[c]),m=k.useCallback(E=>{if(E.stopPropagation(),c(),!a){console.error("No dragged node in context but a drop was detected...");return}d?t(a):console.error("Incompatable drag pairing"),l()},[d,a,t,c,l]);return k.useEffect(()=>{const E=o.current;if(E)return d&&(s(),E.addEventListener("dragenter",p),E.addEventListener("dragleave",h),E.addEventListener("dragover",p),E.addEventListener("drop",m)),()=>{f(),E.removeEventListener("dragenter",p),E.removeEventListener("dragleave",h),E.removeEventListener("dragover",p),E.removeEventListener("drop",m)}},[s,d,h,p,m,f,o]),o}function sI({watcherRef:e,canAcceptDropClass:t,hoveringOverClass:n}){const r=k.useCallback(()=>{e.current&&setTimeout(()=>{var l,s;(l=e.current)==null||l.classList.add(t),(s=e.current)==null||s.classList.add("can-accept-drop")},1)},[t,e]),i=k.useCallback(()=>{e.current&&e.current.classList.add(n)},[n,e]),o=k.useCallback(()=>{e.current&&e.current.classList.remove(n)},[n,e]),a=k.useCallback(()=>{e.current&&(e.current.classList.remove(n),e.current.classList.remove(t),e.current.classList.remove("can-accept-drop"))},[t,n,e]);return{addCanAcceptDropHighlight:r,addHoveredOverHighlight:i,removeHoveredOverHighlight:o,removeAllHighlights:a}}function Wi(s){var u=s,{index:e,parentNodeType:t,parentPath:n,dropHandlerArgs:r,className:i="",wrappingNode:o,dropFilters:a}=u,l=ke(u,["index","parentNodeType","parentPath","dropHandlerArgs","className","wrappingNode","dropFilters"]);const c=Km(),f=qm(R({onDrop:p=>{c($(R({},p),{path:or(n,e),wrappingNode:o}))},getCanAcceptDrop:p=>{var g;const{node:h,currentPath:m}=p;if(!dT({fromPath:m,toPath:[...n,e]}))return!1;const E=ro(h.uiName);return"allowedParents"in E&&!((g=E.allowedParents)!=null&&g.includes(t))?!1:a?"accepted"in a?h.uiName in a.accepted:!(h.uiName in a.rejected):!0}},r)),d=typeof i=="string"?i:i(e);return v("div",$(R({ref:f,className:d},l),{"data-index":e}))}const uI="_card_body_fill_bahaw_1",cI="_card_children_container_bahaw_17",fI="_empty_msg_bahaw_34",dI="_drop_watcher_bahaw_42",pI="_missing_card_element_bahaw_66",hI="_card_footer_bahaw_91",mI="_card_header_bahaw_97",un={card_body_fill:uI,card_children_container:cI,empty_msg:fI,drop_watcher:dI,missing_card_element:pI,card_footer:hI,card_header:mI};function mS({children:e}){return v("div",{className:un.card_children_container,children:e})}function gS(i){var o=i,{className:e,children:t,args:n={}}=o,r=ke(o,["className","children","args"]);const a={gap:n==null?void 0:n.gap};return v("div",$(R({className:Xe(e,"card-body",un.card_body_fill)},r),{children:v("div",{className:un.card_children_container,style:a,children:t})}))}function vS(r){var i=r,{className:e,children:t}=i,n=ke(i,["className","children"]);return v("div",$(R({className:Xe(e,"card-footer",un.card_footer)},n),{children:v(mS,{children:t})}))}function yS(r){var i=r,{className:e,children:t}=i,n=ke(i,["className","children"]);return v("div",$(R({className:Xe(e,"card-header",un.card_header)},n),{children:v(mS,{children:t})}))}const gI=new Set(["bslib::card_body_fill","bslib::card_header","bslib::card_footer"]),vI={uiName:"bslib::card_header",uiArguments:{}},yI={uiName:"bslib::card_body_fill",uiArguments:{}},wI={uiName:"bslib::card_footer",uiArguments:{}};function wS(e=[],t){let n=null,r=null,i=null,o=0;e.forEach(s=>{const{uiName:u}=s;if(!gI.has(u)){console.warn("Unknown child of a grid card seen. Ignoring",s);return}const c=v(Ei,{node:s,path:or(t,o),canDrag:!1});o++,u==="bslib::card_header"?n=c:u==="bslib::card_body_fill"?r=c:u==="bslib::card_footer"&&(i=c)});const a=Boolean(n),l=Boolean(r);return M(We,{children:[n!=null?n:v(yS,{className:un.missing_card_element,children:v(Wi,{className:un.drop_watcher,index:0,parentPath:t,wrappingNode:vI,parentNodeType:"bslib::card_header"})}),r!=null?r:v(gS,{className:un.missing_card_element,children:v(Wi,{className:un.drop_watcher,index:Xv(a),parentPath:t,wrappingNode:yI,parentNodeType:"bslib::card_body_fill"})}),i!=null?i:v(vS,{className:un.missing_card_element,children:v(Wi,{className:un.drop_watcher,index:Xv(a,l),parentPath:t,wrappingNode:wI,parentNodeType:"bslib::card_footer"})})]})}const bI=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(gE,$(R({},r),{card_args:e,children:wS(t,n)})),bS={full_screen:{inputType:"boolean",defaultValue:!0,label:"Allow fullscreen mode?",optional:!0}},EI=xe()({library:"bslib",name:"card",title:"Card",takesChildren:!0,UiComponent:bI,settingsInfo:bS,iconSrc:$_,category:"Containers",description:"Bootstrap card with smart fill behavior",default_node:{uiArguments:{full_screen:!0},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Header"}}]}]}});function SI(e){return e.uiName==="bslib::card"}function Xm({parentUiName:e,uiChildren:t=[],path:n,dropPanelClass:r=un.drop_watcher,showOnEmpty:i}){return M(We,{children:[v(Wi,{className:r,index:0,parentPath:n,parentNodeType:e,children:t.length===0?i:null}),t.map((o,a)=>M(k.Fragment,{children:[v(Ei,{path:or(n,a),node:o}),v(Wi,{className:r,index:a+1,parentPath:n,parentNodeType:e})]},n.join(".")+a))]})}const AI=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(gS,$(R({},r),{args:e,children:v(Xm,{uiChildren:t,path:n,parentUiName:"bslib::card_body_fill"})})),CI=xe()({library:"bslib",name:"card_body_fill",title:"Card Body",takesChildren:!0,UiComponent:AI,settingsInfo:{gap:{label:"Gap between items",inputType:"cssMeasure",optional:!0,defaultValue:"10px",units:["px","rem"]},max_height:{label:"Max allowed height",inputType:"cssMeasure",optional:!0,defaultValue:e=>{var t;return e&&(t=e.uiArguments.min_height)!=null?t:"500px"},units:["px","%"]},min_height:{label:"Min allowed height",inputType:"cssMeasure",optional:!0,defaultValue:e=>{var t;return e&&(t=e.uiArguments.max_height)!=null?t:"100px"},units:["px","%"]}},category:"Cards",description:"body holder for bslib cards"}),xI=({uiArguments:e,uiChildren:t=[],path:n,wrapperProps:r})=>v(vS,$(R({},r),{children:v(Xm,{uiChildren:t,path:n,parentUiName:"bslib::card_footer"})})),kI=xe()({library:"bslib",name:"card_footer",title:"Card Footer",takesChildren:!0,UiComponent:xI,settingsInfo:{},category:"Cards",description:"Header for bslib cards"}),_I=e=>{const{uiChildren:t,path:n,wrapperProps:r}=e;return v(yS,$(R({},r),{children:v(Xm,{uiChildren:t,path:n,parentUiName:"bslib::card_header"})}))},OI=xe()({library:"bslib",name:"card_header",title:"Card Header",takesChildren:!0,UiComponent:_I,settingsInfo:{},category:"Cards",description:"Header for bslib cards"}),TI="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEA0lEQVR4nO3du24cZRyG8ceIQ0FKuINtEBEHK1IqXwEIylUiKmwp0KO5iK3ScZATGoQ1JQi4ATehiAMSEc223EGIFFMsxcyCZaEVG++7M//V82vGa49X32c9+400I8/sLRYLpE17YegBaDcZliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliJeHHoA62ra+eVv7QO3gAPgTeDatse0YU+Ax8ApcAKcXfzhbDoZYkxrq75iHQMPgc+Am9SPCro53KSb00PguEpMF5VbsS74DvgAOAe+oPt0/zabTp78n1/uV77lk9b3AuP7573XCaNp59eA63Sr8CfAYdPOXwc+3PgIg6qGdUwX1R/A+7Pp5Jdhh7M5/QfjAfCgaedfAz/QzfUecDjk2NZR8VD4Lt0f+Jwdi+qyfm7vAc+Aj+nmXkLFsG732y93Oaql2XTyK/BV//L2qn3HpGJYB/3220FHsV3LuR6s3GtEKoa132/PVu61Wx71Ww+FQS8BzKaT86EHsi2z6eRZ/+XLgw5kDRXDUgGGpQjDUkTVE6T/dc1wtCqNdVPKhsW/l0zG9l7bfO/R8lCoiMor1iYuHG/lIvSG368EVyxFGJYiDEsRhqUIw1KEYSnCsBRhWIqofILUSzoj5oqliMorlpd0RswVSxGGpQjDUoRhKcKwFGFYijAsRRiWIiqfIPWSzoi5Yimi8orlJZ0RKxvWVW/4us3/Tt7EzWmr/Te1h0JFGJYiDEsRFcP6C6Bp52XubndV/b3foXtqRQkVw1ree3R/5V675Xq/fTzoKNZQMazTfntr0FFs13Kupyv3GpGKYZ302ztNO3970JFsQdPO3wLu9C9PVu07JhXDOgPuA68APzbt/J1hh5PTf3B+opvrfQrdgrzqCdJD4DW6Z8z83LTzz4FvgN9n08mfg47sipp2/irwBvAR8CndLbi/p9BzdAD2FotSVwoun4E+ptgf/Dncm00nR8t5V3nEXMVD4UVHwA3gLt2z/Z4OOprNeEo3l7vAjdl0cjTscJ5PuRVLNVRfsTRShqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYi/gbCBJi6eIkmgAAAAABJRU5ErkJggg==",ff=({type:e,name:t,className:n})=>M("code",{className:n,children:[M("span",{style:{opacity:.55},children:[e,"$"]}),v("span",{children:t})]}),II=4,PI=25,NI=oc(PI).map(e=>v("div",{className:"faux-row",children:oc(II).map(t=>v("div",{className:"faux-cell",children:"i"},t))},e)),RI=({uiArguments:e,path:t,wrapperProps:n})=>v("div",$(R({className:"dtDTOutput"},n),{children:M("div",{className:"faux-table",style:{"--table-w":e.width,"--table-h":e.height},children:[M("div",{className:"faux-header",children:["Table: ",v(ff,{type:"output",name:e.outputId})]}),v("div",{className:"faux-table-body",children:NI})]})})),DI=xe()({library:"DT",name:"DTOutput",title:"DT Table",takesChildren:!1,UiComponent:RI,settingsInfo:{outputId:{inputType:"string",label:"Output ID",defaultValue:"myTable"},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"auto",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderDT({ - iris -})`}},iconSrc:TI,category:"Outputs",description:"`DataTable` table output"}),Zm=["gridlayout::grid_container","gridlayout::grid_page"],LI=["gridlayout::grid_card","gridlayout::grid_card_text","gridlayout::grid_card_plot"],MI=new Set(LI);function eg(e){return MI.has(e.uiName)}const FI="_hoveringOverSwap_l95oj_1",BI="_availableToSwap_l95oj_2",UI="_pulse_l95oj_1",zI="_emptyGridCard_l95oj_52",jI="_emptyMessage_l95oj_69",by={hoveringOverSwap:FI,availableToSwap:BI,pulse:UI,emptyGridCard:zI,emptyMessage:jI},ES=k.createContext(null);function WI(){return k.useContext(ES)}function tg({path:e,area:t}){const n=LE(),r=WI(),i=k.useCallback(({node:l,currentPath:s})=>s===void 0||!eg(l)?!1:oS(s,e),[e]),o=k.useCallback(l=>{var u;if(!("area"in l.node.uiArguments)){console.error("Invalid grid area swap drop",{dropInfo:l});return}const s=(u=l.node.uiArguments.area)!=null?u:"__BAD_DROP__";r==null||r({type:"SWAP_ITEMS",item_a:t,item_b:s})},[t,r]),a=qm({getCanAcceptDrop:i,onDrop:o,canAcceptDropClass:by.availableToSwap,hoveringOverClass:by.hoveringOverSwap});return k.useEffect(()=>{a.current&&(a.current.dataset.gridArea=t)},[t,a]),k.useEffect(()=>{a.current&&(n!=null&&n.node)&&"area"in n.node.uiArguments&&(a.current.dataset.swapWith=n.node.uiArguments.area)},[n==null?void 0:n.node,a]),a}const YI=e=>{const l=e,{uiArguments:s}=l,u=s,{area:t}=u,n=ke(u,["area"]),{uiChildren:r=[],path:i,wrapperProps:o}=l,a=tg({area:t,path:i});return v(gE,$(R({ref:a,style:{gridArea:t},card_args:n},o),{children:wS(r,i)}))},VI=xe()({library:"gridlayout",name:"grid_card",title:"Grid Card",takesChildren:!0,UiComponent:YI,settingsInfo:R({area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"}},bS),allowedParents:Zm,category:"gridlayout",description:"bslib styled card for grid layouts"}),ng="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAACYElEQVR4nO3cMYoUQQBA0RqRPYBn8E5GhqYbLiZeYDNzs428k1dwU8M2UGFZFmYUf/d013vRTEFDBZ+qomj6tCzLgP/t1dYT4JiERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEXi9dYT+Fd3X78tz4ZOm0xkJffv3m49hb9ixSIhrPNuxhifxxjfxxiPv3/fbDqjHdjtVrii+zHG7ZP/t2OMH2OMj9tMZx+sWOe9f2Hsw+qz2BlhnffmwjGeEBYJYZEQFglhkRAWCWF1pr5YdUHamfpi1YrVmfpiVVidqS9WZwpr6jPP2mY6Y0195lnbTCvW1Geetc0U1tRnnrXNFBYrEhYJYZEQFglhkRAWCWGREBYJYZEQFglhkRAWiZnCerxwbOvnDmGmsB5eGPtyhc8dwkwv+t2NXx9n+/Ne1sMY49MVPncIp2V5/mG8ffBFv+s201bIioRF4khnrH3u6Zfb1VZvxSIhLBLCIrHb6waumxWLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi4SwSAiLhLBICIuEsEgIi8RPaOk2ptnQzzIAAAAASUVORK5CYII=";var SS={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ey=k.createContext&&k.createContext(SS),si=globalThis&&globalThis.__assign||function(){return si=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{if(typeof ResizeObserver=="undefined")return;const r=new ResizeObserver(i=>{if(!e.current)return;const{offsetHeight:o,offsetWidth:a}=e.current;n({width:a,height:o})});return e.current&&r.observe(e.current),()=>r.disconnect()},[e]),t}const xS=k.forwardRef((i,r)=>{var o=i,{className:e="",children:t}=o,n=ke(o,["className","children"]);const a=e+" card";return v("div",$(R({ref:r,className:a},n),{children:t}))});k.forwardRef((r,n)=>{var i=r,{className:e=""}=i,t=ke(i,["className"]);const o=e+" card-header";return v("div",R({ref:n,className:o},t))});const XI="_gridCardPlot_1a94v_1",ZI={gridCardPlot:XI},e4=({uiArguments:{outputId:e,area:t},path:n,wrapperProps:r})=>{const i=tg({area:t,path:n});return v(xS,$(R({ref:i,style:{gridArea:t},className:Xe(ZI.gridCardPlot,"gridlayout-gridCardPlot")},r),{children:v(CS,{outputId:e!=null?e:t})}))},t4=xe()({library:"gridlayout",name:"grid_card_plot",title:"Grid Plot Card",takesChildren:!1,UiComponent:e4,settingsInfo:{area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"},outputId:{label:"Output ID",inputType:"string",defaultValue:function(e){return e&&"area"in e.uiArguments?e.uiArguments.area:"MyPlot"},optional:!0}},serverBindings:{outputs:{outputIdKey:e=>e.outputId?"outputId":"area",renderScaffold:`renderPlot({ - #Plot code goes here - $0plot(rnorm(100)) -})`}},allowedParents:Zm,iconSrc:ng,category:"gridlayout",description:"A wrapper for `shiny::plotOutput()` that uses `gridlayout`-friendly sizing defaults. \n For when you want to have a grid area filled entirely with a single plot."}),kS="data:image/png;base64,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",n4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAABq0lEQVRYhe2YsU7DMBCGvyDUDToxsuUREN27gUACBpZuvAMFXgBBH4KtCwMggWDrDuIRujIxAVuXMMRIbuU09vlKiMgnRYniO/uv4zv7mmRZRh1YDjHuX4+Lmsp+beJ6OThMvcde8rasmEaoNo1QbSRCL8mj3L7KmLUfhA4qEXoKDAV+PwyBk1AnidAMOAJGAt+R8Q3eZaRrdAIcAC8BPq/GZyIZMCaYPoAdoHC7shgD28ZHRGzUvwNb5h5jU4pGehoDu8Cno+3LtPnM+ly08ugzsM/0+psAe6YtGs2Eb0d0TGZwEnTM82AIrFvPamgLBbhYQJ/12esTVyky5yT/a8ye/os+/V8opKbKl9p8+qIZdRZjVeJco0Vor92mCvXkGOhrd6qd8HvkpQrAG4q7k+aMdoEr8kBMzHNXq3MtoRvADdCy3rXMu02NATSEpsAj0Ha0tYEHYxNFrNA14MncY2xKiRG6AtzjN1upsV2VDiYV2gLugE6ATwe4ZXodeyMRGhPRdmYIQiL0nDxfSumZPoKQJPwzc9mI/nEO4V/v9QuhEapNbYQGnfCr5BtYaFWUrHRSSwAAAABJRU5ErkJggg==",r4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAiElEQVRYhe3YwQmAIBhA4YxGaaZGaYhGaaZ2sauCB8MX9cP7bnaIxx9imHLOUwTz1wG9DKWFCV1aD/fzKpdPdlsaqikc21qtw0zUUJqhNENphtLChDaP0BcMH8NhJmoozVCaoTRDaYbSDKUZSuv5HyWuaYbfEX6if7iGrr5CmIkm7/BhhtIMpd2GuAxXhhY/aAAAAABJRU5ErkJggg==",i4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAhUlEQVRYhe3ZwQmAMBAAwZxYijVZikVYijXZS/zmoRDJQjjY+ZlHWE6RiFFrLRksswN6GUozlLa+LR7XPf1VcO5btNe5J1pKiY/1adJPtPXnef26E8N7pJmooTRDaYbSDKUZSjOUZiit5zxKGP5iSDNRQ2mG0gylGUpLExr+bIAZSksT+gD98QxXbjF/TQAAAABJRU5ErkJggg==",rh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAgklEQVRYhe3Y0QmAIBRA0Wc0SjM1SkM0SjO1i00gGl2MB/f+2sfhQSqWWmtkaPkbMJpQOqF0aaBr74PjuqftX+e+ldZamokKpRNKJ5ROKF0aaPcIjYjmsTazNBMVSieUbuSvb/XlQv16J0kzUaF0QumE0gmlSwMtPo3DCaUTSpcG+gDcmgtUpwOm6gAAAABJRU5ErkJggg==",_S="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAjElEQVRYhe3ZwQmAMBBEUVcsxZosxSIsxZrsJZ4UIQYUh5WB/456+awhCRillM5B/3fAU4SqDa0X87odizeSWk7LNFbPbCZqE9r89Dcy97FqudlMlFA1QtUIVSNUzSb0zRGafou6spkooWqEqmVenD/tGjYTJVSNUDVC1QhVswnl4qwW/GwQI1TNJnQHKA8MWeSBgoAAAAAASUVORK5CYII=",OS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAkklEQVRYhe3ZwQmAMAyF4UQcxZkcxSEcxZncJV70UmlVfEYevO/ay0+KNKBHhDHo/g64S6Fofe1gWtbMjkOYmc3j4OUBzURpQqtXb/s1JDlddYlmogpFUyiaQtEUikYT2npCL5+1TDQTVSiaQtFaX/0Tb5dsLc7pFIqmUDSFoikUDfWEfr5k00zU9bMBTKFoNKEbp/QMWe71dFoAAAAASUVORK5CYII=",o4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABA0lEQVRYhe2ZwQ6CMBBEH8Yv9uDNsMabB38ZLxBRkdDtxlmSzqUktDAvs2yb0A3DwJ51UBuoVQNQqwGotXuAY8nk8+3hfc+8Vxtw3brwfjmt3lckYEAf9TBVCRlBEP8G6HiVjxEAoSqhMAhlCYVAFHUh3rtJrWwc+9n15u40Sb0PGJVJlCYwqXOuW5KNoysJdQKTDGcSWQDACZEJABwQ2QDgG2JVGQGgoF1nBCjqRtkAPs3bz5mjMgEUm4c8AC7z4N+JvWeipR3cbR70CVSZh/IEvGegpcSqzYMugRDzoAEIMw/+j9ireSlVmwddCYWYBw1AmHmArv3gEKsBqNUA1No9wBNu3jnWLc/KGQAAAABJRU5ErkJggg==",a4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAADT0lEQVRYhe2ZP2gUURDGf1ELSy/YpUrELt1BLHIpxAtCOO0SBP80woWAiGyxuWZB2eayxYIiSAJpTBPuQARtJNedacTrgk3IWYlWuVR2EouZl907Lwnue8cRyMDj7e3OMvO9mTfzvb2Rw8NDzrJcGLYDtnIOYNhy5gFcyvqiH8anqZSAMjADdIAmUAF+HvdCFHj/7UdmAKdICfiQ+n0FGAfmgJvAjitDg0ihaRLnK8AocA2oA1eBdZfGBhGBeZ1XosBb0esOsOCH8VdgConQRxfGBhGBgs71Ps/MvRlXxgYB4EDnXJ9nEzrvuTI2CABNnat+GB+B8MM4j1SlP8BnV8Zc74ExIK/XeWDPD+M6Eg2zN14D31wZdAlgDHiHbNIOsAK0kbSpqs5L4JlDm84ATCLlcQpoAbNR4HXMQz+M20ANiYqzCgRu9kB65f9xHiAKvDoSlQLSI0oO7AJuIrAOXAcaUeDNnqDXRspoFQHxXe83gQawkcW4bQSmgdvq3AKAH8a5dPVJizY209zGdTwC3gIPszhgC8A0pHoUeB11fIuk3gPgh/EEkkJEgVdBqIUZi6pWzOKALQCz0ibn8zo6fXSLfhgXAaLAa5uBpA9k7M62e8CsdFvnvqmTur/lh3GDboBm5ZtkEFsAvRHo/W3ENLdd+qfKJrCUxQFbAE3gFpIeLZJuW6SbzBmnQ+AX3ZFqcsIh5zSx3QMmf5eBfRJHq8dUojlkk9dSI7PzYA9gm6Q5HZCQtBawmtKrIGl1D3hqabNLXHTibeAuUhILQCcKPNMTlkGqDkm5fAJcdmAXcEunH+jc0nkRKKdKZx1JuetIyjkRVwBKCNMEWANQPpSjO5VMF76Poyi4ADAJvNfriq40fhiXEQATek0UeA0cR8EWgGGiF4E1c4jXtEmvfNpZp1GwBfCGhIkuwhHvqenz50hlOi4KZUv7VgBGgTvoJxMQJorU+RzSXV+ge4LuKJh71l8nbAAc0YbUAaaG8KNPwGO9t0FPFFyKDZXYQxwr6AcrEM6zizj/O6W7hvSIVT+M50m4USYClxZbLrREchYG+II4/6NHz5y2AhK6sQm8srRvDWAHuEGyoq0TdDcQgjejevuWtgEYOf+PbMhyDmDY8hfkuOfRCqd6WwAAAABJRU5ErkJggg==",l4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAoCAYAAAC4h3lxAAAACXBIWXMAAAsTAAALEwEAmpwYAAABDElEQVRYhe2ZsQ7CMAxEr4gvZmBDXMXGwC+XgVQqERDbCbEr5ZaoalXdq+0kTqdlWbBnHbwN1GoAeGsAeGv3AMdfN8+3h+ZdVwDcXE8GP7hfTqrnW0UgN99NLQDczAP1AFvzM4xpU6MagNw8vz75R1kBQpgHCrPQF0nNW3eJqjTURiDMl1+liYDUvLWQTRGTRiDcl18lAQhrHigDhDYPlAGYxpDmAXkNhG2cSwBzGolXOoWTJIVCQ0hSiAgMIa0BIiiEZiVmGvOpNVfXgtfuhYhgkbDsRpnGUiS6NDfWfoAIEomajowIAFHbExPvEN1X7BanEsTnGuiiVudChBPENH5wOGsAeGsAeGv3AE8yEDlUwXXxqQAAAABJRU5ErkJggg==",s4="_icon_1467k_1",u4={icon:s4},c4={undo:l4,redo:o4,tour:a4,alignTop:i4,alignBottom:r4,alignCenter:n4,alignSpread:rh,alignTextCenter:rh,alignTextLeft:_S,alignTextRight:OS};function f4({id:e,alt:t=e,size:n}){return v("img",{src:c4[e],alt:t,className:u4.icon,style:n?{height:n}:{}})}function d4(e){return It({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 90c44.3 0 86 17.3 117.4 48.6C404.7 170 422 211.7 422 256s-17.3 86-48.6 117.4C342 404.7 300.3 422 256 422s-86-17.3-117.4-48.6C107.3 342 90 300.3 90 256s17.3-86 48.6-117.4C170 107.3 211.7 90 256 90m0-42C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"}},{tag:"path",attr:{d:"M277 360h-42V235h42v125zm0-166h-42v-42h42v42z"}}]})(e)}const p4=e=>v("svg",$(R({width:"1em",height:"1em",viewBox:"0 0 15 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:v("path",{d:"M7.38 7.477 14.432.691H.328L7.38 7.477Z",fill:"#75A8DB"})})),h4=e=>v("svg",$(R({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 49 40",width:"1em",height:"1em"},e),{children:v("path",{stroke:"currentColor",strokeWidth:2,d:"M27.42 8.115h2.074l10.592 11.414v1.052L28.705 32.04H27.4v-5.954H13.328l.105-11.975 13.988-.058V8.115Z"})})),df=e=>M("svg",$(R({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 20",width:"1em",height:"1em"},e),{children:[v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M0 4h16"}),v("path",{stroke:"currentColor",strokeLinejoin:"round",d:"M5.5 6.5 6 16m2-9.5V16m2.5-9.5L10 16"}),v("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1.5,d:"M5.5 4.5v-2l1.5-1h2l1.5 1v2m-8 0 .5 12 1.5 2h7l1.5-2 .5-12"})]})),m4=e=>v("svg",$(R({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 44 40",width:"1em",height:"1em"},e),{children:v("path",{stroke:"currentColor",strokeWidth:2,d:"M17.08 8.115h-2.074L4.414 19.529v1.052L15.795 32.04H17.1v-5.954h14.072l-.105-11.975-13.988-.058V8.115Z"})})),g4=e=>v("svg",$(R({width:"1em",height:"1em",viewBox:"0 0 15 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:v("path",{d:"m7.38.477 7.052 6.786H.328L7.38.477Z",fill:"#75A8DB"})})),v4="_textPanel_7ayjk_1",y4="_text_holder_7ayjk_12",Sy={textPanel:v4,text_holder:y4},w4=({uiArguments:{content:e,area:t,alignment:n},path:r,wrapperProps:i})=>{const o=tg({area:t,path:r});return v(xS,$(R({ref:o,className:Xe(Sy.textPanel,"gridlayout-textPanel"),style:{gridArea:t,justifyItems:n}},i),{children:v("div",{className:Sy.text_holder,children:v("h1",{children:e})})}))},b4=xe()({library:"gridlayout",name:"grid_card_text",title:"Grid Text Card",takesChildren:!1,UiComponent:w4,settingsInfo:{content:{label:"Panel text",inputType:"string",defaultValue:"Text for card"},alignment:{label:"Text alignment",inputType:"radio",defaultValue:"start",choices:{start:{icon:_S,label:"left"},center:{icon:rh,label:"center"},end:{icon:OS,label:"right"}}},area:{label:"Name of grid area",inputType:"string",defaultValue:"default-area"},is_title:{label:"Use text as website title",inputType:"boolean",defaultValue:!1,optional:!0}},allowedParents:Zm,iconSrc:kS,category:"gridlayout",description:"A grid card that contains just text that is vertically centered within the panel. Useful for app titles or displaying text-based statistics."}),TS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEVklEQVR4nO3cwYpcRRiG4XeMjouYGzAuXGThyohG1GvQxQQSJVfgRhkUnOANCCYLh6ALvQBBQkxE9BqiKEZ3wixcZO4gm4xIu6geaE+PDMp8VZU67wNncc5ppqqrP7r++Q/0xmKxQDppj7WegMZksBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBRhsBTxeK2Bdr7aO+ryJrC1PF4Dnl5e25i8bvqTON5fv/8AuA/8AtwGvgEOJq/j2lvnppciqgXrCBeBa0Cddzq+p4DnlscVYA+4CnzdYjIttsJTwMeUN2yocs4Btyhrfar24C2+sT4CdhqMO1eHa3215qC1v7EusR6qA+AGpcY6w3r9wPLa6uH99ftnKGt4g/Xaaoey9tXUDNYm8Mnk2j7wCrAN3KUUoPp/HlDWcJuypvuT+7uUz6CKmsG6DDyzcn4AvAHcqziHubgHvA48XLl2Fniz1gRqBmtrcv45hirpV+CLybWtWoPXDNbLk/MvT/BvLyaHiukaX6g1cM3/Cp+dnFfb72fsLkcX+3EtH+msdYU1Dp8VKqLlI52T1OTrXv+uZrCOe5CqjCbr7laoCIOliFFqLLfZztQMlh92G7PrY2lgBksRo9RYbrOdsY81PvtYGofBUsQoNZbbbGfsY43PPpbGYbAUMUqN5TbbGftY47OPpXEYLEWMUmO5zXbGPtb47GNpHAZLEaPUWG6znbGPNT77WBqHwVLEKDVWD7+z3sv9LkoM+1jjs4+lcRgsRYxSYx33dT/3+9XZxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIUWqsnrbZnubSjH2s8dnH0jgMliJGqbF62mZ7mksz9rHGZx9L4zBYihilxuppm+1pLs3YxxqffSyNw2ApYpQaq6dttqe5NGMfa3z2sTQOg6WIlsHabDi2wmoG63dKYXt4vHiCf3tjcrTU01xe5Z9r/ketgWsG67fJ+ZWKY8/VdI1/qjVwzWDdmZy/DZyvOP7cPE9Z41V3ag1eM1g3gfsr508C3wEvVJzDXJwHvqes8aF9ymdQRc1gHQDvT66dBX4AdoELwOmK8xnNacoa7gI/UtZ21XvAw1qTqd15vwlcBz5YubYJbC+PQz3/Yt6jcH/qOhW/raBNu+FD4NMG487VZ5Q1r6pFsP4C3gUuAXsNxp+LPeAy8A5lzatq+RD6FvAt5c1fBF6i1AVPNJzTo+xPSoH+M3CbsvUdtJrMxmJx3PYs/Xc+K1SEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVKEwVLE32A0lLomuWLgAAAAAElFTkSuQmCC";var pf=qa;function qa(e){let t=e;var n={}.toString.call(e).slice(8,-1);if(n=="Set")return new Set([...e].map(i=>qa(i)));if(n=="Map")return new Map([...e].map(i=>[qa(i[0]),qa(i[1])]));if(n=="Date")return new Date(e.getTime());if(n=="RegExp")return RegExp(e.source,E4(e));if(n=="Array"||n=="Object"){t=Array.isArray(e)?[]:{};for(var r in e)t[r]=qa(e[r])}return t}function E4(e){if(typeof e.source.flags=="string")return e.source.flags;var t=[];return e.global&&t.push("g"),e.ignoreCase&&t.push("i"),e.multiline&&t.push("m"),e.sticky&&t.push("y"),e.unicode&&t.push("u"),t.join("")}function ha(e){const t=e.length,n=e[0].length;for(let r of e)if(r.length!==n)throw new Error("Inconsistant number of columns in matrix");return{numRows:t,numCols:n}}function S4(e,{index:t,arr:n,dir:r}){const i=pf(e);switch(r){case"rows":return qo(i,t,n);case"cols":return i.map((o,a)=>qo(o,t,n[a]))}}function A4(e,{index:t,dir:n}){const r=pf(e);switch(n){case"rows":return th(r,t);case"cols":return r.map((i,o)=>th(i,t))}}const zn=".";function rg(e){const t=new Map;return C4(e).forEach(({itemRows:n,itemCols:r},i)=>{if(i===zn)return;const o=wy(n),a=wy(r);t.set(i,{colStart:a.minVal,rowStart:o.minVal,colSpan:a.span+1,rowSpan:o.span+1,isValid:o.isSequence&&a.isSequence})}),t}function C4(e){var i;const t=new Map,{numRows:n,numCols:r}=ha(e);for(let o=0;o{if("area"in n.uiArguments&&n.uiArguments.area!==void 0){const r=n.uiArguments.area;t.push(r)}}),t}function k4(e,r){var i=r,{name:t}=i,n=ke(i,["name"]);const{rowStart:o,colStart:a}=n,l="rowEnd"in n?n.rowEnd:o+n.rowSpan-1,s="colEnd"in n?n.colEnd:a+n.colSpan-1,u=pf(e.areas);for(let c=0;c=o-1&&c=a-1&&d{const o=r==="rows"?"cols":"rows",a=_4(i);if(t>a[r].length)throw new Error(`Can't add a tract after index ${t}. Not enought tracts.`);if(t<0)throw new Error("Cant add a tract at a negative index");const l=rg(i.areas);let s=Hl(zn,a[o].length);l.forEach((u,c)=>{const{itemStart:f,itemEnd:d}=ih(u,r);if(f<=t&&d>t){const h=ih(u,o);for(let m=h.itemStart-1;m{for(let i of n)O4(r,i)})}function T4(e,t){return PS(e,t)}function NS(e,t,n=!1){const{dir:r,index:i}=t,o=t.index-1;if(!n){const s=RS(e.areas,t);if(s.length!==0)throw new Error(`Can't remove ${r==="rows"?"row":"col"} ${i} as items ${$T(s)} are entirely contained within it.`)}const a={areas:A4(e.areas,{index:o,dir:r})},l=r==="rows"?"row_sizes":"col_sizes";return I4(e[l])&&(a[l]=th(e[l],o)),R(R({},e),a)}function RS(e,t){const n=rg(e);return P4(n,t)}function I4(e){return Array.isArray(e)&&e.length>1}function P4(e,{index:t,dir:n}){let r=[];return e.forEach((i,o)=>{const a=ih(i,n);if(!a)return;const{itemStart:l,itemEnd:s}=a;l===t&&l===s&&r.push(o)}),r}function N4(e,t,n){return bi(e,({areas:r})=>{const{numRows:i,numCols:o}=ha(r);for(let a=0;a{const o=n==="rows"?"row_sizes":"col_sizes";i[o][t-1]=r})}function D4(e,{item_a:t,item_b:n}){return t===n?e:bi(e,r=>{const{n_rows:i,n_cols:o}=L4(r.areas);let a=!1,l=!1;for(let s=0;s{f!==zn&&a.add(f)});const c=u.length;if(i===-1&&(i=c),i!==c)throw new Error("Invalid layout definition. Not consistant number of columns in every row")}if(!n)n=Hl("1fr",i);else if(n.length!==i)throw new Error("Column sizes vector doesn't match layout definition.");if(!t)t=Hl("1fr",o);else if(t.length!==o)throw new Error("Row sizes vector doesn't match layout definition.");return{uniqueAreas:[...a],areas:l,col_sizes:n,row_sizes:t,gap_size:r!=null?r:"12px"}}function F4(e){const t=[];for(let n of e)t.push(n.trim().split(/\s+/));return t}function DS(n){var r=n,{areas:e}=r,t=ke(r,["areas"]);return R({layout:U4(e)},t)}function B4(n){var r=n,{layout:e}=r,t=ke(r,["layout"]);return R({areas:F4(e)},t)}function U4(e){const{numCols:t}=ha(e),n=[],r=Hl(-1,t);for(let i of e)for(let o=0;oo+a.padEnd(r[l]," ")+(l1,c=r>1,f=[];return(ky({colRange:s,rowIndex:e-1,layoutAreas:i})||u)&&f.push("up"),(ky({colRange:s,rowIndex:o+1,layoutAreas:i})||u)&&f.push("down"),(_y({rowRange:l,colIndex:n-1,layoutAreas:i})||c)&&f.push("left"),(_y({rowRange:l,colIndex:a+1,layoutAreas:i})||c)&&f.push("right"),f}function ky({colRange:e,rowIndex:t,layoutAreas:n}){return t<1||t>n.length?!1:e.every(r=>n[t-1][r-1]===zn)}function _y({rowRange:e,colIndex:t,layoutAreas:n}){return t<1||t>n[0].length?!1:e.every(r=>n[r-1][t-1]===zn)}const Q4="_marker_mumaw_1",K4="_dragger_mumaw_32",q4="_move_mumaw_52",Oy={marker:Q4,dragger:K4,move:q4};function BS(e,t,n){const r=t=r&&e<=i}function Gl({rowStart:e,rowSpan:t,colStart:n,colSpan:r}){return{rowStart:e,rowEnd:e+t-1,colStart:n,colEnd:n+r-1}}function X4(e,t){return typeof e=="undefined"&&typeof t=="undefined"?!0:typeof e=="undefined"||typeof t=="undefined"?!1:("colSpan"in e&&(e=Gl(e)),"colSpan"in t&&(t=Gl(t)),e.colStart===t.colStart&&e.colEnd===t.colEnd&&e.rowStart===t.rowStart&&e.rowEnd===t.rowEnd)}function Z4({row:e,col:t}){return`row${e}-col${t}`}function eP({dragDirection:e,gridLocation:t,layoutAreas:n}){const{rowStart:r,rowEnd:i,colStart:o,colEnd:a}=Gl(t),l=n.length,s=n[0].length;let u,c,f;switch(e){case"up":if(r===1)return{shrinkExtent:i,growExtent:1};u=r-1,c=1,f=i;break;case"left":if(o===1)return{shrinkExtent:a,growExtent:1};u=o-1,c=1,f=a;break;case"down":if(i===l)return{shrinkExtent:r,growExtent:l};u=i+1,c=l,f=r;break;case"right":if(a===s)return{shrinkExtent:o,growExtent:s};u=a+1,c=s,f=o;break}const d=e==="up"||e==="down",p=e==="left"||e==="up",[h,m]=d?[o,a]:[r,i],E=(w,S)=>{const[_,b]=d?[w,S]:[S,w];return n[_-1][b-1]!==zn},g=ac(h,m),y=ac(u,c);for(let w of y)for(let S of g)if(E(w,S))return{shrinkExtent:f,growExtent:w+(p?1:-1)};return{shrinkExtent:f,growExtent:c}}function tP({dir:e,gridContainerStyles:t,gridContainerBoundingRect:n}){const r=oh(t.getPropertyValue("gap")),o=oh(t.getPropertyValue("padding"))+r/2,a=n[e==="rows"?"y":"x"],l=nP(t,e),s=l.length,u=[];for(let c=0;cBS(o,s,u));if(a===void 0)return;const l=iP[n];return i[l]=a.index,i}const iP={right:"colEnd",left:"colStart",up:"rowStart",down:"rowEnd"};function oP({overlayRef:e,gridLocation:t,layoutAreas:n,onDragEnd:r}){const i=Gl(t),o=k.useRef(null),a=k.useCallback(u=>{const c=e.current,f=o.current;if(!c||!f)throw new Error("For some reason we are observing dragging when we shouldn't");const d=rP({mousePos:u,dragState:f});d&&Iy(c,d)},[e]),l=k.useCallback(()=>{const u=e.current,c=o.current;if(!u||!c)return;const f=c.gridItemExtent;X4(f,i)||r(f),u.classList.remove("dragging"),document.removeEventListener("mousemove",a),Ty("on")},[i,a,r,e]);return k.useCallback(u=>{const c=e.current;if(!c)return;const f=c.parentElement;if(!f)return;const d=getComputedStyle(c.parentElement),p=f.getBoundingClientRect(),h=u==="down"||u==="up"?"rows":"cols",{shrinkExtent:m,growExtent:E}=eP({dragDirection:u,gridLocation:t,layoutAreas:n});o.current={dragHandle:u,gridItemExtent:Gl(t),tractExtents:tP({dir:h,gridContainerStyles:d,gridContainerBoundingRect:p}).filter(({index:g})=>BS(g,m,E))},Iy(e.current,o.current.gridItemExtent),c.classList.add("dragging"),document.addEventListener("mousemove",a),document.addEventListener("mouseup",l,{once:!0}),Ty("off")},[l,t,n,a,e])}function Ty(e){var n;const t=(n=document.querySelector("body"))==null?void 0:n.classList;e==="off"?t==null||t.add("disable-text-selection"):t==null||t.remove("disable-text-selection")}function Iy(e,{rowStart:t,rowEnd:n,colStart:r,colEnd:i}){e.style.setProperty("--drag-grid-row-start",String(t)),e.style.setProperty("--drag-grid-row-end",String(n+1)),e.style.setProperty("--drag-grid-column-start",String(r)),e.style.setProperty("--drag-grid-column-end",String(i+1))}function aP({area:e,gridLocation:t,areas:n,onNewPos:r}){if(typeof t=="undefined")throw new Error(`Item in ${e} is not in the location map`);const i=k.useRef(null),o=oP({overlayRef:i,gridLocation:t,layoutAreas:n,onDragEnd:r}),a=k.useMemo(()=>J4({gridLocation:t,layoutAreas:n}),[t,n]),l=k.useMemo(()=>{let s=[];for(let u of a)s.push(v("div",{className:Xe(Oy.dragger,u),title:`resize ${e} ${u}`,onMouseDown:c=>{Py(c),o(u)},children:lP[u]},u));return s},[e,a,o]);return k.useEffect(()=>{var s;(s=i.current)==null||s.style.setProperty("--grid-area",e)},[e]),v("div",{ref:i,onClick:Py,className:Oy.marker+" grid-area-overlay",children:l})}function Py(e){e.preventDefault(),e.stopPropagation()}const lP={up:v(xy,{}),down:v(xy,{}),left:v(Cy,{}),right:v(Cy,{})},sP="_ResizableGrid_i4cq9_1",uP={ResizableGrid:sP,"size-detection-cell":"_size-detection-cell_i4cq9_1"},cP=/(^[\d|.]+)\s*(px|%|rem|fr)|(^auto$)/;function fP(e){return cP.test(e)}const dP=/(px|%|rem|fr|auto)/g,pP=/^[\d|.]*/g;function lc(e){var i,o;const t=((i=e.match(dP))==null?void 0:i[0])||"px",n=(o=e.match(pP))==null?void 0:o[0],r=n?Number(n):null;if(t==="auto"){if(r!==null)throw new Error("Cant have a count value with auto units.");return{count:null,unit:"auto"}}if(r===null)throw new Error("You must have a count for non-auto units.");if(t==="fr"&&r<0)throw new Error(`Can't have a negative count with ${t} units.`);return{count:r,unit:t}}function Da(e){return e.unit==="auto"?"auto":`${e.count}${e.unit}`}const Ny=["http","https","mailto","tel"];function hP(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++ii||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */var US=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};function pl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ry(e.position):"start"in e||"end"in e?Ry(e):"line"in e||"column"in e?ah(e):""}function ah(e){return Dy(e&&e.line)+":"+Dy(e&&e.column)}function Ry(e){return ah(e&&e.start)+"-"+ah(e&&e.end)}function Dy(e){return e&&typeof e=="number"?e:1}class Sn extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const a=r.indexOf(":");a===-1?i[1]=r:(i[0]=r.slice(0,a),i[1]=r.slice(a+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=pl(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}Sn.prototype.file="";Sn.prototype.name="";Sn.prototype.reason="";Sn.prototype.message="";Sn.prototype.stack="";Sn.prototype.fatal=null;Sn.prototype.column=null;Sn.prototype.line=null;Sn.prototype.source=null;Sn.prototype.ruleId=null;Sn.prototype.position=null;const Hn={basename:mP,dirname:gP,extname:vP,join:yP,sep:"/"};function mP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');us(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),l>-1&&(e.charCodeAt(i)===t.charCodeAt(l--)?l<0&&(r=i):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function gP(e){if(us(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function vP(e){us(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const l=e.charCodeAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function yP(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bP(e,t){let n="",r=0,i=-1,o=0,a=-1,l,s;for(;++a<=e.length;){if(a2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else l===46&&o>-1?o++:o=-1}return n}function us(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const EP={cwd:SP};function SP(){return"/"}function lh(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function AP(e){if(typeof e=="string")e=new URL(e);else if(!lh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return CP(e)}function CP(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++na.length;let s;l&&a.push(i);try{s=e.apply(this,a)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(s instanceof Promise?s.then(o,i):s instanceof Error?i(s):o(s))}function i(a,...l){n||(n=!0,t(a,...l))}function o(a){i(null,a)}}const OP=YS().freeze(),WS={}.hasOwnProperty;function YS(){const e=kP(),t=[];let n={},r,i=-1;return o.data=a,o.Parser=void 0,o.Compiler=void 0,o.freeze=l,o.attachers=t,o.use=s,o.parse=u,o.stringify=c,o.run=f,o.runSync=d,o.process=p,o.processSync=h,o;function o(){const m=YS();let E=-1;for(;++E{if(b||!A||!O)_(b);else{const I=o.stringify(A,O);I==null||(PP(I)?O.value=I:O.result=I),_(b,O)}});function _(b,A){b||!A?w(b):y?y(A):E(null,A)}}}function h(m){let E;o.freeze(),kd("processSync",o.Parser),_d("processSync",o.Compiler);const g=La(m);return o.process(g,y),Hy("processSync","process",E),g;function y(w){E=!0,My(w)}}}function Vy(e,t){return typeof e=="function"&&e.prototype&&(TP(e.prototype)||t in e.prototype)}function TP(e){let t;for(t in e)if(WS.call(e,t))return!0;return!1}function kd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function _d(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Od(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $y(e){if(!sh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Hy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function La(e){return IP(e)?e:new zS(e)}function IP(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function PP(e){return typeof e=="string"||US(e)}function NP(e,t){const n=(t||{}).includeImageAlt;return VS(e,typeof n=="boolean"?n:!0)}function VS(e,t){return RP(e)&&("value"in e&&e.value||t&&"alt"in e&&e.alt||"children"in e&&Gy(e.children,t))||Array.isArray(e)&&Gy(e,t)||""}function Gy(e,t){const n=[];let r=-1;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),[].splice.apply(e,a);else for(n&&[].splice.apply(e,[t,n]);o0?(ar(e,e.length,0,t),e):t}const Jy={}.hasOwnProperty;function DP(e){const t={};let n=-1;for(;++na))return;const A=t.events.length;let O=A,I,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(I){P=t.events[O][1].end;break}I=!0}for(g(r),b=A;bw;){const _=n[S];t.containerState=_[1],_[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function HP(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qy(e){if(e===null||hn(e)||zP(e))return 1;if(jP(e))return 2}function ag(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Xy(f,-s),Xy(d,s),a={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},l={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},l.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},l.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=cn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=cn(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=cn(u,ag(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=cn(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=cn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,ar(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n=4?a(u):n(u)}function a(u){return u===null?s(u):re(u)?e.attempt(iN,a,s)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||re(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),l)}function s(u){return e.exit("codeIndented"),t(u)}}function aN(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ce(e,o,"linePrefix",4+1)(a)}function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):re(a)?i(a):n(a)}}const lN={name:"codeText",tokenize:cN,resolve:sN,previous:uN};function sN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function QS(e,t,n,r,i,o,a,l,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===41||ch(g)?n(g):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(l),d(g)):g===null||g===60||re(g)?n(g):(e.consume(g),g===92?h:p)}function h(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function m(g){return g===40?++c>u?n(g):(e.consume(g),m):g===41?c--?(e.consume(g),m):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(g)):g===null||hn(g)?c?n(g):(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(g)):ch(g)?n(g):(e.consume(g),g===92?E:m)}function E(g){return g===40||g===41||g===92?(e.consume(g),m):m(g)}}function KS(e,t,n,r,i,o){const a=this;let l=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return p===null||p===91||p===93&&!s||p===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs||l>999?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||re(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s=s||!nt(p),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function qS(e,t,n,r,i,o){let a;return l;function l(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),a=d===40?41:d,s}function s(d){return d===a?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===a?(e.exit(o),s(a)):d===null?n(d):re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ce(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===a||d===null||re(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===a||d===92?(e.consume(d),c):c(d)}}function hl(e,t){let n;return r;function r(i){return re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nt(i)?Ce(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function zo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vN={name:"definition",tokenize:wN},yN={tokenize:bN,partial:!0};function wN(e,t,n){const r=this;let i;return o;function o(s){return e.enter("definition"),KS.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(s)}function a(s){return i=zo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),s===58?(e.enter("definitionMarker"),e.consume(s),e.exit("definitionMarker"),hl(e,QS(e,e.attempt(yN,Ce(e,l,"whitespace"),Ce(e,l,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(s)}function l(s){return s===null||re(s)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(s)):n(s)}}function bN(e,t,n){return r;function r(a){return hn(a)?hl(e,i)(a):n(a)}function i(a){return a===34||a===39||a===40?qS(e,Ce(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a):n(a)}function o(a){return a===null||re(a)?t(a):n(a)}}const EN={name:"hardBreakEscape",tokenize:SN};function SN(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(o),i}function i(o){return re(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}const AN={name:"headingAtx",tokenize:xN,resolve:CN};function CN(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ar(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function xN(e,t,n){const r=this;let i=0;return o;function o(c){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&i++<6?(e.consume(c),a):c===null||hn(c)?(e.exit("atxHeadingSequence"),r.interrupt?t(c):l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||re(c)?(e.exit("atxHeading"),t(c)):nt(c)?Ce(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||hn(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const kN=["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","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],t1=["pre","script","style","textarea"],_N={name:"htmlFlow",tokenize:IN,resolveTo:TN,concrete:!0},ON={tokenize:PN,partial:!0};function TN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function IN(e,t,n){const r=this;let i,o,a,l,s;return u;function u(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),h):C===63?(e.consume(C),i=3,r.interrupt?t:V):Kn(C)?(e.consume(C),a=String.fromCharCode(C),o=!0,m):n(C)}function f(C){return C===45?(e.consume(C),i=2,d):C===91?(e.consume(C),i=5,a="CDATA[",l=0,p):Kn(C)?(e.consume(C),i=4,r.interrupt?t:V):n(C)}function d(C){return C===45?(e.consume(C),r.interrupt?t:V):n(C)}function p(C){return C===a.charCodeAt(l++)?(e.consume(C),l===a.length?r.interrupt?t:T:p):n(C)}function h(C){return Kn(C)?(e.consume(C),a=String.fromCharCode(C),m):n(C)}function m(C){return C===null||C===47||C===62||hn(C)?C!==47&&o&&t1.includes(a.toLowerCase())?(i=1,r.interrupt?t(C):T(C)):kN.includes(a.toLowerCase())?(i=6,C===47?(e.consume(C),E):r.interrupt?t(C):T(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):o?y(C):g(C)):C===45||Kt(C)?(e.consume(C),a+=String.fromCharCode(C),m):n(C)}function E(C){return C===62?(e.consume(C),r.interrupt?t:T):n(C)}function g(C){return nt(C)?(e.consume(C),g):I(C)}function y(C){return C===47?(e.consume(C),I):C===58||C===95||Kn(C)?(e.consume(C),w):nt(C)?(e.consume(C),y):I(C)}function w(C){return C===45||C===46||C===58||C===95||Kt(C)?(e.consume(C),w):S(C)}function S(C){return C===61?(e.consume(C),_):nt(C)?(e.consume(C),S):y(C)}function _(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,b):nt(C)?(e.consume(C),_):(s=null,A(C))}function b(C){return C===null||re(C)?n(C):C===s?(e.consume(C),O):(e.consume(C),b)}function A(C){return C===null||C===34||C===39||C===60||C===61||C===62||C===96||hn(C)?S(C):(e.consume(C),A)}function O(C){return C===47||C===62||nt(C)?y(C):n(C)}function I(C){return C===62?(e.consume(C),P):n(C)}function P(C){return nt(C)?(e.consume(C),P):C===null||re(C)?T(C):n(C)}function T(C){return C===45&&i===2?(e.consume(C),oe):C===60&&i===1?(e.consume(C),ne):C===62&&i===4?(e.consume(C),G):C===63&&i===3?(e.consume(C),V):C===93&&i===5?(e.consume(C),B):re(C)&&(i===6||i===7)?e.check(ON,G,F)(C):C===null||re(C)?F(C):(e.consume(C),T)}function F(C){return e.exit("htmlFlowData"),U(C)}function U(C){return C===null?x(C):re(C)?e.attempt({tokenize:X,partial:!0},U,x)(C):(e.enter("htmlFlowData"),T(C))}function X(C,it,Qe){return Ze;function Ze(Ve){return C.enter("lineEnding"),C.consume(Ve),C.exit("lineEnding"),me}function me(Ve){return r.parser.lazy[r.now().line]?Qe(Ve):it(Ve)}}function oe(C){return C===45?(e.consume(C),V):T(C)}function ne(C){return C===47?(e.consume(C),a="",fe):T(C)}function fe(C){return C===62&&t1.includes(a.toLowerCase())?(e.consume(C),G):Kn(C)&&a.length<8?(e.consume(C),a+=String.fromCharCode(C),fe):T(C)}function B(C){return C===93?(e.consume(C),V):T(C)}function V(C){return C===62?(e.consume(C),G):C===45&&i===2?(e.consume(C),V):T(C)}function G(C){return C===null||re(C)?(e.exit("htmlFlowData"),x(C)):(e.consume(C),G)}function x(C){return e.exit("htmlFlow"),t(C)}}function PN(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(hf,t,n)}}const NN={name:"htmlText",tokenize:RN};function RN(e,t,n){const r=this;let i,o,a,l;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),u}function u(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),A):x===63?(e.consume(x),_):Kn(x)?(e.consume(x),P):n(x)}function c(x){return x===45?(e.consume(x),f):x===91?(e.consume(x),o="CDATA[",a=0,E):Kn(x)?(e.consume(x),S):n(x)}function f(x){return x===45?(e.consume(x),d):n(x)}function d(x){return x===null||x===62?n(x):x===45?(e.consume(x),p):h(x)}function p(x){return x===null||x===62?n(x):h(x)}function h(x){return x===null?n(x):x===45?(e.consume(x),m):re(x)?(l=h,B(x)):(e.consume(x),h)}function m(x){return x===45?(e.consume(x),G):h(x)}function E(x){return x===o.charCodeAt(a++)?(e.consume(x),a===o.length?g:E):n(x)}function g(x){return x===null?n(x):x===93?(e.consume(x),y):re(x)?(l=g,B(x)):(e.consume(x),g)}function y(x){return x===93?(e.consume(x),w):g(x)}function w(x){return x===62?G(x):x===93?(e.consume(x),w):g(x)}function S(x){return x===null||x===62?G(x):re(x)?(l=S,B(x)):(e.consume(x),S)}function _(x){return x===null?n(x):x===63?(e.consume(x),b):re(x)?(l=_,B(x)):(e.consume(x),_)}function b(x){return x===62?G(x):_(x)}function A(x){return Kn(x)?(e.consume(x),O):n(x)}function O(x){return x===45||Kt(x)?(e.consume(x),O):I(x)}function I(x){return re(x)?(l=I,B(x)):nt(x)?(e.consume(x),I):G(x)}function P(x){return x===45||Kt(x)?(e.consume(x),P):x===47||x===62||hn(x)?T(x):n(x)}function T(x){return x===47?(e.consume(x),G):x===58||x===95||Kn(x)?(e.consume(x),F):re(x)?(l=T,B(x)):nt(x)?(e.consume(x),T):G(x)}function F(x){return x===45||x===46||x===58||x===95||Kt(x)?(e.consume(x),F):U(x)}function U(x){return x===61?(e.consume(x),X):re(x)?(l=U,B(x)):nt(x)?(e.consume(x),U):T(x)}function X(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,oe):re(x)?(l=X,B(x)):nt(x)?(e.consume(x),X):(e.consume(x),i=void 0,fe)}function oe(x){return x===i?(e.consume(x),ne):x===null?n(x):re(x)?(l=oe,B(x)):(e.consume(x),oe)}function ne(x){return x===62||x===47||hn(x)?T(x):n(x)}function fe(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===62||hn(x)?T(x):(e.consume(x),fe)}function B(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ce(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function V(x){return e.enter("htmlTextData"),l(x)}function G(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}}const sg={name:"labelEnd",tokenize:UN,resolveTo:BN,resolveAll:FN},DN={tokenize:zN},LN={tokenize:jN},MN={tokenize:WN};function FN(e){let t=-1,n;for(;++t-1&&(a[0]=a[0].slice(r)),o>0&&a.push(e[i].slice(0,o))),a}function d3(e,t){let n=-1;const r=[];let i;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const k3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _3(e){return e.replace(k3,O3)}function O3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return eA(n.slice(o?2:1),o?16:10)}return lg(n)||e}const tA={}.hasOwnProperty,T3=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),I3(n)(x3(A3(n).document().write(C3()(e,t,!0))))};function I3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Yn),autolinkProtocol:T,autolinkEmail:T,atxHeading:l(Ea),blockQuote:l(xi),characterEscape:T,characterReference:T,codeFenced:l(As),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:l(As,s),codeText:l(Cs,s),codeTextData:T,data:T,codeFlowValue:T,definition:l(Mf),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:l(Ff),hardBreakEscape:l(Sa),hardBreakTrailing:l(Sa),htmlFlow:l(xs,s),htmlFlowData:T,htmlText:l(xs,s),htmlTextData:T,image:l(Bf),label:s,link:l(Yn),listItem:l(ks),listItemValue:h,listOrdered:l(ki,p),listUnordered:l(ki),paragraph:l(_s),reference:Ze,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:l(Ea),strong:l(Aa),thematicBreak:l(Ts)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:kn,autolinkProtocol:xn,blockQuote:c(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Ve,characterReferenceMarkerNumeric:Ve,characterReferenceValue:ct,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:E,codeFlowValue:F,codeIndented:c(w),codeText:c(fe),codeTextData:F,data:F,definition:c(),definitionDestinationString:b,definitionLabelString:S,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(X),hardBreakTrailing:c(X),htmlFlow:c(oe),htmlFlowData:F,htmlText:c(ne),htmlTextData:F,image:c(V),label:x,labelText:G,lineEnding:U,link:c(B),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:me,resourceDestinationString:C,resourceTitleString:it,resource:Qe,setextHeading:c(P),setextHeadingLineSequence:I,setextHeadingText:O,strong:c(),thematicBreak:c()}};nA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let W={type:"root",children:[]};const te={stack:[W],tokenStack:[],config:t,enter:u,exit:f,buffer:s,resume:d,setData:o,getData:a},Se=[];let Ae=-1;for(;++Ae0){const _n=te.tokenStack[te.tokenStack.length-1];(_n[1]||i1).call(te,void 0,_n[0])}for(W.position={start:Ur(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:Ur(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae{const r=this.data("settings");return T3(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function R3(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function D3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` -`}]}function L3(e,t){const n=t.value?t.value+` -`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function M3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function F3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ma(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(a=String.fromCharCode(o,l),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function rA(e,t){const n=String(t.identifier).toUpperCase(),r=ma(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const a=e.footnoteCounts[n],l={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const s={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,s),e.applyData(t,s)}function B3(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},rA(e,{type:"footnoteReference",identifier:i,position:t.position})}function U3(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function z3(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function iA(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function j3(e,t){const n=e.definition(t.identifier);if(!n)return iA(e,t);const r={src:ma(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function W3(e,t){const n={src:ma(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Y3(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function V3(e,t){const n=e.definition(t.identifier);if(!n)return iA(e,t);const r={href:ma(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function $3(e,t){const n={href:ma(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function H3(e,t,n){const r=e.all(t),i=n?G3(n):oA(t),o={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l1:t}function J3(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i-1?r.offset:null}}}function Z3(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=ug(t.children[1]),s=cg(t.children[t.children.length-1]);l.line&&s.line&&(a.position={start:l,end:s}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function e5(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(l1(t.slice(i),i>0,!1)),o.join("")}function l1(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===o1||o===a1;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===o1||o===a1;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function r5(e,t){const n={type:"text",value:n5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const o5={blockquote:R3,break:D3,code:L3,delete:M3,emphasis:F3,footnoteReference:rA,footnote:B3,heading:U3,html:z3,imageReference:j3,image:W3,inlineCode:Y3,linkReference:V3,link:$3,listItem:H3,list:J3,paragraph:Q3,root:K3,strong:q3,table:Z3,tableCell:t5,tableRow:e5,text:r5,thematicBreak:i5,toml:Js,yaml:Js,definition:Js,footnoteDefinition:Js};function Js(){return null}const lA=function(e){if(e==null)return u5;if(typeof e=="string")return s5(e);if(typeof e=="object")return Array.isArray(e)?a5(e):l5(e);if(typeof e=="function")return mf(e);throw new Error("Expected function, string, or object as test")};function a5(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let d=[],p,h,m;if((!t||i(l,s,u[u.length-1]||null))&&(d=p5(n(l,u)),d[0]===s1))return d;if(l.children&&d[0]!==f5)for(h=(r?l.children.length:-1)+o,m=u.concat(l);h>-1&&h{const i=c1(r.identifier);i&&!u1.call(t,i)&&(t[i]=r)}),n;function n(r){const i=c1(r);return i&&u1.call(t,i)?t[i]:null}}function c1(e){return String(e||"").toUpperCase()}const sc={}.hasOwnProperty;function g5(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,a.handlers=R(R({},o5),n.handlers),a.definition=m5(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=v5,a.applyData=y5,a.one=l,a.all=s,a.wrap=b5,a.augment=o,sA(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();sc.call(i,c)||(i[c]=u)}),a;function o(u,c){if(u&&"data"in u&&u.data){const f=u.data;f.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=f.hName),c.type==="element"&&f.hProperties&&(c.properties=R(R({},c.properties),f.hProperties)),"children"in c&&c.children&&f.hChildren&&(c.children=f.hChildren)}if(u){const f="type"in u?u:{position:u};h5(f)||(c.position={start:ug(f),end:cg(f)})}return c}function a(u,c,f,d){return Array.isArray(f)&&(d=f,f={}),o(u,{type:"element",tagName:c,properties:f||{},children:d||[]})}function l(u,c){return uA(a,u,c)}function s(u){return fg(a,u)}}function v5(e,t){e.position&&(t.position=X3(e))}function y5(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&o&&(n.properties=R(R({},n.properties),o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uA(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return sc.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?$(R({},t),{children:fg(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):w5(e,t)}function fg(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i0&&n.push({type:"text",value:` -`}),n}function E5(e){const t=[];let n=-1;for(;++n1?"-"+l:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};l>1&&f.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(l)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(f)}const u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const f=u.children[u.children.length-1];f&&f.type==="text"?f.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...s)}else i.push(...s);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:e.wrap(i,!0)};e.patch(r,c),t.push(c)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:$(R({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:` -`}]}}function cA(e,t){const n=g5(e,t),r=n.one(e,null),i=E5(n);return i&&r.children.push({type:"text",value:` -`},i),Array.isArray(r)?{type:"root",children:r}:r}const S5=function(e,t){return e&&"run"in e?C5(e,t):x5(e||t)},A5=S5;function C5(e,t){return(n,r,i)=>{e.run(cA(n,t),r,o=>{i(o)})}}function x5(e){return t=>cA(t,e)}var N={},k5={get exports(){return N},set exports(e){N=e}},_5="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",O5=_5,T5=O5;function fA(){}function dA(){}dA.resetWarningCache=fA;var I5=function(){function e(r,i,o,a,l,s){if(s!==T5){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:dA,resetWarningCache:fA};return n.PropTypes=n,n};k5.exports=I5();class cs{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}cs.prototype.property={};cs.prototype.normal={};cs.prototype.space=null;function pA(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&L5.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(d1,U5);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!d1.test(o)){let a=o.replace(M5,B5);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=dg}return new i(r,t)}function B5(e){return"-"+e.toLowerCase()}function U5(e){return e.charAt(1).toUpperCase()}const p1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},z5=pA([gA,mA,wA,bA,R5],"html"),j5=pA([gA,mA,wA,bA,D5],"svg"),EA=function(e){if(e==null)return $5;if(typeof e=="string")return V5(e);if(typeof e=="object")return Array.isArray(e)?W5(e):Y5(e);if(typeof e=="function")return gf(e);throw new Error("Expected function, string, or object as test")};function W5(e){const t=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let d=[],p,h,m;if((!t||i(l,s,u[u.length-1]||null))&&(d=Q5(n(l,u)),d[0]===h1))return d;if(l.children&&d[0]!==G5)for(h=(r?l.children.length:-1)+o,m=u.concat(l);h>-1&&h{K5(t,"element",(n,r,i)=>{const o=i;let a;if(e.allowedElements?a=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(a=e.disallowedElements.includes(n.tagName)),!a&&e.allowElement&&typeof r=="number"&&(a=!e.allowElement(n,r,o)),a&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}var hh={},X5={get exports(){return hh},set exports(e){hh=e}},Ee={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pg=Symbol.for("react.element"),hg=Symbol.for("react.portal"),vf=Symbol.for("react.fragment"),yf=Symbol.for("react.strict_mode"),wf=Symbol.for("react.profiler"),bf=Symbol.for("react.provider"),Ef=Symbol.for("react.context"),Z5=Symbol.for("react.server_context"),Sf=Symbol.for("react.forward_ref"),Af=Symbol.for("react.suspense"),Cf=Symbol.for("react.suspense_list"),xf=Symbol.for("react.memo"),kf=Symbol.for("react.lazy"),eR=Symbol.for("react.offscreen"),SA;SA=Symbol.for("react.module.reference");function Cn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pg:switch(e=e.type,e){case vf:case wf:case yf:case Af:case Cf:return e;default:switch(e=e&&e.$$typeof,e){case Z5:case Ef:case Sf:case kf:case xf:case bf:return e;default:return t}}case hg:return t}}}Ee.ContextConsumer=Ef;Ee.ContextProvider=bf;Ee.Element=pg;Ee.ForwardRef=Sf;Ee.Fragment=vf;Ee.Lazy=kf;Ee.Memo=xf;Ee.Portal=hg;Ee.Profiler=wf;Ee.StrictMode=yf;Ee.Suspense=Af;Ee.SuspenseList=Cf;Ee.isAsyncMode=function(){return!1};Ee.isConcurrentMode=function(){return!1};Ee.isContextConsumer=function(e){return Cn(e)===Ef};Ee.isContextProvider=function(e){return Cn(e)===bf};Ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pg};Ee.isForwardRef=function(e){return Cn(e)===Sf};Ee.isFragment=function(e){return Cn(e)===vf};Ee.isLazy=function(e){return Cn(e)===kf};Ee.isMemo=function(e){return Cn(e)===xf};Ee.isPortal=function(e){return Cn(e)===hg};Ee.isProfiler=function(e){return Cn(e)===wf};Ee.isStrictMode=function(e){return Cn(e)===yf};Ee.isSuspense=function(e){return Cn(e)===Af};Ee.isSuspenseList=function(e){return Cn(e)===Cf};Ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vf||e===wf||e===yf||e===Af||e===Cf||e===eR||typeof e=="object"&&e!==null&&(e.$$typeof===kf||e.$$typeof===xf||e.$$typeof===bf||e.$$typeof===Ef||e.$$typeof===Sf||e.$$typeof===SA||e.getModuleId!==void 0)};Ee.typeOf=Cn;(function(e){e.exports=Ee})(X5);const tR=Fh(hh);function nR(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function rR(e){return e.join(" ").trim()}function iR(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var uc={},oR={get exports(){return uc},set exports(e){uc=e}},m1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,aR=/\n/g,lR=/^\s*/,sR=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,uR=/^:\s*/,cR=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,fR=/^[;\s]*/,dR=/^\s+|\s+$/g,pR=` -`,g1="/",v1="*",Di="",hR="comment",mR="declaration",gR=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(h){var m=h.match(aR);m&&(n+=m.length);var E=h.lastIndexOf(pR);r=~E?h.length-E:r+h.length}function o(){var h={line:n,column:r};return function(m){return m.position=new a(h),u(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function l(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function s(h){var m=h.exec(e);if(m){var E=m[0];return i(E),e=e.slice(E.length),m}}function u(){s(lR)}function c(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=o();if(!(g1!=e.charAt(0)||v1!=e.charAt(1))){for(var m=2;Di!=e.charAt(m)&&(v1!=e.charAt(m)||g1!=e.charAt(m+1));)++m;if(m+=2,Di===e.charAt(m-1))return l("End of comment missing");var E=e.slice(2,m-2);return r+=2,i(E),e=e.slice(m),r+=2,h({type:hR,comment:E})}}function d(){var h=o(),m=s(sR);if(m){if(f(),!s(uR))return l("property missing ':'");var E=s(cR),g=h({type:mR,property:y1(m[0].replace(m1,Di)),value:E?y1(E[0].replace(m1,Di)):Di});return s(fR),g}}function p(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),p()};function y1(e){return e?e.replace(dR,Di):Di}var vR=gR;function AA(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=vR(e),o=typeof t=="function",a,l,s=0,u=i.length;s0?k.createElement(p,s,f):k.createElement(p,s)}function ER(e){let t=-1;for(;++t for more info)`),delete Qs[o]}const t=OP().use(N3).use(e.remarkPlugins||[]).use(A5,$(R({},e.remarkRehypeOptions),{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(q5,e),n=new zS;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=k.createElement(k.Fragment,{},CA({options:e,schema:z5,listDepth:0},r));return e.className&&(i=k.createElement("div",{className:e.className},i)),i}xA.propTypes={children:N.string,className:N.string,allowElement:N.func,allowedElements:N.arrayOf(N.string),disallowedElements:N.arrayOf(N.string),unwrapDisallowed:N.bool,remarkPlugins:N.arrayOf(N.oneOfType([N.object,N.func,N.arrayOf(N.oneOfType([N.bool,N.string,N.object,N.func,N.arrayOf(N.any)]))])),rehypePlugins:N.arrayOf(N.oneOfType([N.object,N.func,N.arrayOf(N.oneOfType([N.bool,N.string,N.object,N.func,N.arrayOf(N.any)]))])),sourcePos:N.bool,rawSourcePos:N.bool,skipHtml:N.bool,includeElementIndex:N.bool,transformLinkUri:N.oneOfType([N.func,N.bool]),linkTarget:N.oneOfType([N.func,N.string]),transformImageUri:N.func,components:N.object};var b1=function(t){return t.reduce(function(n,r){var i=r[0],o=r[1];return n[i]=o,n},{})},E1=typeof window!="undefined"&&window.document&&window.document.createElement?q.useLayoutEffect:q.useEffect,zt="top",yn="bottom",wn="right",jt="left",mg="auto",fs=[zt,yn,wn,jt],Xo="start",Jl="end",_R="clippingParents",kA="viewport",Ma="popper",OR="reference",S1=fs.reduce(function(e,t){return e.concat([t+"-"+Xo,t+"-"+Jl])},[]),_A=[].concat(fs,[mg]).reduce(function(e,t){return e.concat([t,t+"-"+Xo,t+"-"+Jl])},[]),TR="beforeRead",IR="read",PR="afterRead",NR="beforeMain",RR="main",DR="afterMain",LR="beforeWrite",MR="write",FR="afterWrite",BR=[TR,IR,PR,NR,RR,DR,LR,MR,FR];function lr(e){return e?(e.nodeName||"").toLowerCase():null}function tn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qi(e){var t=tn(e).Element;return e instanceof t||e instanceof Element}function mn(e){var t=tn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function gg(e){if(typeof ShadowRoot=="undefined")return!1;var t=tn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function UR(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!mn(o)||!lr(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var l=i[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function zR(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=a.reduce(function(s,u){return s[u]="",s},{});!mn(i)||!lr(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(s){i.removeAttribute(s)}))})}}const jR={name:"applyStyles",enabled:!0,phase:"write",fn:UR,effect:zR,requires:["computeStyles"]};function nr(e){return e.split("-")[0]}var Yi=Math.max,cc=Math.min,Zo=Math.round;function gh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function OA(){return!/^((?!chrome|android).)*safari/i.test(gh())}function ea(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&mn(e)&&(i=e.offsetWidth>0&&Zo(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Zo(r.height)/e.offsetHeight||1);var a=qi(e)?tn(e):window,l=a.visualViewport,s=!OA()&&n,u=(r.left+(s&&l?l.offsetLeft:0))/i,c=(r.top+(s&&l?l.offsetTop:0))/o,f=r.width/i,d=r.height/o;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function vg(e){var t=ea(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function TA(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&gg(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Tr(e){return tn(e).getComputedStyle(e)}function WR(e){return["table","td","th"].indexOf(lr(e))>=0}function Ci(e){return((qi(e)?e.ownerDocument:e.document)||window.document).documentElement}function _f(e){return lr(e)==="html"?e:e.assignedSlot||e.parentNode||(gg(e)?e.host:null)||Ci(e)}function A1(e){return!mn(e)||Tr(e).position==="fixed"?null:e.offsetParent}function YR(e){var t=/firefox/i.test(gh()),n=/Trident/i.test(gh());if(n&&mn(e)){var r=Tr(e);if(r.position==="fixed")return null}var i=_f(e);for(gg(i)&&(i=i.host);mn(i)&&["html","body"].indexOf(lr(i))<0;){var o=Tr(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function ds(e){for(var t=tn(e),n=A1(e);n&&WR(n)&&Tr(n).position==="static";)n=A1(n);return n&&(lr(n)==="html"||lr(n)==="body"&&Tr(n).position==="static")?t:n||YR(e)||t}function yg(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ml(e,t,n){return Yi(e,cc(t,n))}function VR(e,t,n){var r=ml(e,t,n);return r>n?n:r}function IA(){return{top:0,right:0,bottom:0,left:0}}function PA(e){return Object.assign({},IA(),e)}function NA(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var $R=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,PA(typeof t!="number"?t:NA(t,fs))};function HR(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=nr(n.placement),s=yg(l),u=[jt,wn].indexOf(l)>=0,c=u?"height":"width";if(!(!o||!a)){var f=$R(i.padding,n),d=vg(o),p=s==="y"?zt:jt,h=s==="y"?yn:wn,m=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],E=a[s]-n.rects.reference[s],g=ds(o),y=g?s==="y"?g.clientHeight||0:g.clientWidth||0:0,w=m/2-E/2,S=f[p],_=y-d[c]-f[h],b=y/2-d[c]/2+w,A=ml(S,b,_),O=s;n.modifiersData[r]=(t={},t[O]=A,t.centerOffset=A-b,t)}}function GR(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||TA(t.elements.popper,i)&&(t.elements.arrow=i))}const JR={name:"arrow",enabled:!0,phase:"main",fn:HR,effect:GR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ta(e){return e.split("-")[1]}var QR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function KR(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Zo(n*i)/i||0,y:Zo(r*i)/i||0}}function C1(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=a.x,p=d===void 0?0:d,h=a.y,m=h===void 0?0:h,E=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=E.x,m=E.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),w=jt,S=zt,_=window;if(u){var b=ds(n),A="clientHeight",O="clientWidth";if(b===tn(n)&&(b=Ci(n),Tr(b).position!=="static"&&l==="absolute"&&(A="scrollHeight",O="scrollWidth")),b=b,i===zt||(i===jt||i===wn)&&o===Jl){S=yn;var I=f&&b===_&&_.visualViewport?_.visualViewport.height:b[A];m-=I-r.height,m*=s?1:-1}if(i===jt||(i===zt||i===yn)&&o===Jl){w=wn;var P=f&&b===_&&_.visualViewport?_.visualViewport.width:b[O];p-=P-r.width,p*=s?1:-1}}var T=Object.assign({position:l},u&&QR),F=c===!0?KR({x:p,y:m},tn(n)):{x:p,y:m};if(p=F.x,m=F.y,s){var U;return Object.assign({},T,(U={},U[S]=y?"0":"",U[w]=g?"0":"",U.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",U))}return Object.assign({},T,(t={},t[S]=y?m+"px":"",t[w]=g?p+"px":"",t.transform="",t))}function qR(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,l=n.roundOffsets,s=l===void 0?!0:l,u={placement:nr(t.placement),variation:ta(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,C1(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,C1(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const XR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qR,data:{}};var Ks={passive:!0};function ZR(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,l=a===void 0?!0:a,s=tn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,Ks)}),l&&s.addEventListener("resize",n.update,Ks),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Ks)}),l&&s.removeEventListener("resize",n.update,Ks)}}const eD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ZR,data:{}};var tD={left:"right",right:"left",bottom:"top",top:"bottom"};function bu(e){return e.replace(/left|right|bottom|top/g,function(t){return tD[t]})}var nD={start:"end",end:"start"};function x1(e){return e.replace(/start|end/g,function(t){return nD[t]})}function wg(e){var t=tn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function bg(e){return ea(Ci(e)).left+wg(e).scrollLeft}function rD(e,t){var n=tn(e),r=Ci(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;var u=OA();(u||!u&&t==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:l+bg(e),y:s}}function iD(e){var t,n=Ci(e),r=wg(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Yi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Yi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+bg(e),s=-r.scrollTop;return Tr(i||n).direction==="rtl"&&(l+=Yi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:l,y:s}}function Eg(e){var t=Tr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function RA(e){return["html","body","#document"].indexOf(lr(e))>=0?e.ownerDocument.body:mn(e)&&Eg(e)?e:RA(_f(e))}function gl(e,t){var n;t===void 0&&(t=[]);var r=RA(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=tn(r),a=i?[o].concat(o.visualViewport||[],Eg(r)?r:[]):r,l=t.concat(a);return i?l:l.concat(gl(_f(a)))}function vh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function oD(e,t){var n=ea(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function k1(e,t,n){return t===kA?vh(rD(e,n)):qi(t)?oD(t,n):vh(iD(Ci(e)))}function aD(e){var t=gl(_f(e)),n=["absolute","fixed"].indexOf(Tr(e).position)>=0,r=n&&mn(e)?ds(e):e;return qi(r)?t.filter(function(i){return qi(i)&&TA(i,r)&&lr(i)!=="body"}):[]}function lD(e,t,n,r){var i=t==="clippingParents"?aD(e):[].concat(t),o=[].concat(i,[n]),a=o[0],l=o.reduce(function(s,u){var c=k1(e,u,r);return s.top=Yi(c.top,s.top),s.right=cc(c.right,s.right),s.bottom=cc(c.bottom,s.bottom),s.left=Yi(c.left,s.left),s},k1(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function DA(e){var t=e.reference,n=e.element,r=e.placement,i=r?nr(r):null,o=r?ta(r):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,s;switch(i){case zt:s={x:a,y:t.y-n.height};break;case yn:s={x:a,y:t.y+t.height};break;case wn:s={x:t.x+t.width,y:l};break;case jt:s={x:t.x-n.width,y:l};break;default:s={x:t.x,y:t.y}}var u=i?yg(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Xo:s[u]=s[u]-(t[c]/2-n[c]/2);break;case Jl:s[u]=s[u]+(t[c]/2-n[c]/2);break}}return s}function Ql(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,l=n.boundary,s=l===void 0?_R:l,u=n.rootBoundary,c=u===void 0?kA:u,f=n.elementContext,d=f===void 0?Ma:f,p=n.altBoundary,h=p===void 0?!1:p,m=n.padding,E=m===void 0?0:m,g=PA(typeof E!="number"?E:NA(E,fs)),y=d===Ma?OR:Ma,w=e.rects.popper,S=e.elements[h?y:d],_=lD(qi(S)?S:S.contextElement||Ci(e.elements.popper),s,c,a),b=ea(e.elements.reference),A=DA({reference:b,element:w,strategy:"absolute",placement:i}),O=vh(Object.assign({},w,A)),I=d===Ma?O:b,P={top:_.top-I.top+g.top,bottom:I.bottom-_.bottom+g.bottom,left:_.left-I.left+g.left,right:I.right-_.right+g.right},T=e.modifiersData.offset;if(d===Ma&&T){var F=T[i];Object.keys(P).forEach(function(U){var X=[wn,yn].indexOf(U)>=0?1:-1,oe=[zt,yn].indexOf(U)>=0?"y":"x";P[U]+=F[oe]*X})}return P}function sD(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,u=s===void 0?_A:s,c=ta(r),f=c?l?S1:S1.filter(function(h){return ta(h)===c}):fs,d=f.filter(function(h){return u.indexOf(h)>=0});d.length===0&&(d=f);var p=d.reduce(function(h,m){return h[m]=Ql(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[nr(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function uD(e){if(nr(e)===mg)return[];var t=bu(e);return[x1(e),t,x1(t)]}function cD(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,l=a===void 0?!0:a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,E=t.options.placement,g=nr(E),y=g===E,w=s||(y||!h?[bu(E)]:uD(E)),S=[E].concat(w).reduce(function(Qe,Ze){return Qe.concat(nr(Ze)===mg?sD(t,{placement:Ze,boundary:c,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):Ze)},[]),_=t.rects.reference,b=t.rects.popper,A=new Map,O=!0,I=S[0],P=0;P=0,oe=X?"width":"height",ne=Ql(t,{placement:T,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),fe=X?U?wn:jt:U?yn:zt;_[oe]>b[oe]&&(fe=bu(fe));var B=bu(fe),V=[];if(o&&V.push(ne[F]<=0),l&&V.push(ne[fe]<=0,ne[B]<=0),V.every(function(Qe){return Qe})){I=T,O=!1;break}A.set(T,V)}if(O)for(var G=h?3:1,x=function(Ze){var me=S.find(function(Ve){var ct=A.get(Ve);if(ct)return ct.slice(0,Ze).every(function(xn){return xn})});if(me)return I=me,"break"},C=G;C>0;C--){var it=x(C);if(it==="break")break}t.placement!==I&&(t.modifiersData[r]._skip=!0,t.placement=I,t.reset=!0)}}const fD={name:"flip",enabled:!0,phase:"main",fn:cD,requiresIfExists:["offset"],data:{_skip:!1}};function _1(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function O1(e){return[zt,wn,yn,jt].some(function(t){return e[t]>=0})}function dD(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ql(t,{elementContext:"reference"}),l=Ql(t,{altBoundary:!0}),s=_1(a,r),u=_1(l,i,o),c=O1(s),f=O1(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const pD={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dD};function hD(e,t,n){var r=nr(e),i=[jt,zt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*i,[jt,wn].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}function mD(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=_A.reduce(function(c,f){return c[f]=hD(f,t.rects,o),c},{}),l=a[t.placement],s=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const gD={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mD};function vD(e){var t=e.state,n=e.name;t.modifiersData[n]=DA({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const yD={name:"popperOffsets",enabled:!0,phase:"read",fn:vD,data:{}};function wD(e){return e==="x"?"y":"x"}function bD(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,l=a===void 0?!1:a,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,p=d===void 0?!0:d,h=n.tetherOffset,m=h===void 0?0:h,E=Ql(t,{boundary:s,rootBoundary:u,padding:f,altBoundary:c}),g=nr(t.placement),y=ta(t.placement),w=!y,S=yg(g),_=wD(S),b=t.modifiersData.popperOffsets,A=t.rects.reference,O=t.rects.popper,I=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,P=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(b){if(o){var U,X=S==="y"?zt:jt,oe=S==="y"?yn:wn,ne=S==="y"?"height":"width",fe=b[S],B=fe+E[X],V=fe-E[oe],G=p?-O[ne]/2:0,x=y===Xo?A[ne]:O[ne],C=y===Xo?-O[ne]:-A[ne],it=t.elements.arrow,Qe=p&&it?vg(it):{width:0,height:0},Ze=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:IA(),me=Ze[X],Ve=Ze[oe],ct=ml(0,A[ne],Qe[ne]),xn=w?A[ne]/2-G-ct-me-P.mainAxis:x-ct-me-P.mainAxis,kn=w?-A[ne]/2+G+ct+Ve+P.mainAxis:C+ct+Ve+P.mainAxis,xi=t.elements.arrow&&ds(t.elements.arrow),As=xi?S==="y"?xi.clientTop||0:xi.clientLeft||0:0,Cs=(U=T==null?void 0:T[S])!=null?U:0,Mf=fe+xn-Cs-As,Ff=fe+kn-Cs,Ea=ml(p?cc(B,Mf):B,fe,p?Yi(V,Ff):V);b[S]=Ea,F[S]=Ea-fe}if(l){var Sa,xs=S==="x"?zt:jt,Bf=S==="x"?yn:wn,Yn=b[_],ki=_==="y"?"height":"width",ks=Yn+E[xs],_s=Yn-E[Bf],Aa=[zt,jt].indexOf(g)!==-1,Os=(Sa=T==null?void 0:T[_])!=null?Sa:0,Ts=Aa?ks:Yn-A[ki]-O[ki]-Os+P.altAxis,L=Aa?Yn+A[ki]+O[ki]-Os-P.altAxis:_s,W=p&&Aa?VR(Ts,Yn,L):ml(p?Ts:ks,Yn,p?L:_s);b[_]=W,F[_]=W-Yn}t.modifiersData[r]=F}}const ED={name:"preventOverflow",enabled:!0,phase:"main",fn:bD,requiresIfExists:["offset"]};function SD(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function AD(e){return e===tn(e)||!mn(e)?wg(e):SD(e)}function CD(e){var t=e.getBoundingClientRect(),n=Zo(t.width)/e.offsetWidth||1,r=Zo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xD(e,t,n){n===void 0&&(n=!1);var r=mn(t),i=mn(t)&&CD(t),o=Ci(t),a=ea(e,i,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&((lr(t)!=="body"||Eg(o))&&(l=AD(t)),mn(t)?(s=ea(t,!0),s.x+=t.clientLeft,s.y+=t.clientTop):o&&(s.x=bg(o))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function kD(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var s=t.get(l);s&&i(s)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function _D(e){var t=kD(e);return BR.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function OD(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function TD(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var T1={placement:"bottom",modifiers:[],strategy:"absolute"};function I1(){for(var e=arguments.length,t=new Array(e),n=0;n{const[l,s]=k.useState(null),[u,c]=k.useState(null),[f,d]=k.useState(null),{styles:p,attributes:h,update:m}=UD(l,u,{placement:e,modifiers:[{name:"arrow",options:{element:f}},{name:"offset",options:{offset:[0,10]}}],strategy:"fixed"}),E=k.useMemo(()=>$(R({},p.popper),{backgroundColor:i}),[i,p.popper]),g=k.useMemo(()=>{let w;function S(){w=setTimeout(()=>{m==null||m(),u==null||u.setAttribute("data-show","")},o)}function _(){clearTimeout(w),u==null||u.removeAttribute("data-show")}return{[t==="hover"?"onMouseEnter":"onClick"]:()=>S(),onMouseLeave:()=>_(),onPointerDown:()=>_()}},[o,u,t,m]),y=typeof n!="string"?n:r?v(xA,{className:qs.popoverMarkdown,children:n}):v("div",{className:qs.textContent,children:n});return M(We,{children:[k.cloneElement(a,$(R({},g),{ref:s})),M("div",$(R({ref:c,className:qs.popover,style:E},h.popper),{children:[y,v("div",{ref:d,className:qs.popperArrow,style:p.arrow})]}))]})},LA=l=>{var s=l,{children:e,placement:t="right",showOn:n="hover",popoverContent:r,bgColor:i,openDelayMs:o=0}=s,a=ke(s,["children","placement","showOn","popoverContent","bgColor","openDelayMs"]);return v(Sg,{placement:t,showOn:n,popoverContent:r,bgColor:i,openDelayMs:o,triggerEl:v("button",$(R({},a),{children:e}))})},VD="_infoIcon_15ri6_1",$D="_container_15ri6_10",HD="_header_15ri6_15",GD="_info_15ri6_1",JD="_unit_15ri6_27",QD="_description_15ri6_31",mo={infoIcon:VD,container:$D,header:HD,info:GD,unit:JD,description:QD},KD=({units:e})=>v(LA,{className:mo.infoIcon,popoverContent:v(qD,{units:e}),openDelayMs:500,placement:"auto",children:v(d4,{})});function qD({units:e}){return M("div",{className:mo.container,children:[v("div",{className:mo.header,children:"CSS size options"}),v("div",{className:mo.info,children:e.map(t=>M(k.Fragment,{children:[v("div",{className:mo.unit,children:t}),v("div",{className:mo.description,children:XD[t]})]},t))})]})}const XD={"%":"Relative to percentage of container size",auto:"Let the content decide size",fr:"Relative unit. E.g. 2fr is twice the size of 1fr",px:"Screen pixels",rem:"Pixel size of app font. Typically 16 pixels."},ZD="_wrapper_3jy8f_1",e6="_unitSelector_3jy8f_9",MA={wrapper:ZD,unitSelector:e6};function FA({unit:e,availableUnits:t,onChange:n}){return M(We,{children:[v("select",{className:MA.unitSelector,"aria-label":"value-unit",name:"value-unit",value:e,onChange:r=>n(r.target.value),children:t.map(r=>v("option",{value:r,children:r},r))}),v(KD,{units:t})]})}function Ir(e){return e+"-label"}function t6({id:e,label:t,value:n,onChange:r}){return v(Of,{id:e,"aria-label":t,"aria-labelledby":Ir(e),value:n,onChange:r})}function Of(l){var s=l,{value:e,onChange:t,min:n=0,max:r,step:i,disabled:o}=s,a=ke(s,["value","onChange","min","max","step","disabled"]);const{displayedVal:u,handleChange:c,handleBlur:f,incrementUp:d,incrementDown:p}=n6({min:n,max:r,step:i,value:e,onChange:t});return M("div",{className:"NumberInput SUE-Input","aria-disabled":o,onBlur:f,children:[v("input",$(R({},a),{className:"input-field",type:"number",placeholder:"0",value:u,min:n,max:r,step:i,disabled:o,onChange:c})),M("div",{className:"incrementer-buttons",children:[v("button",{className:"up-button","aria-label":"Increment number up",onClick:d,type:"button",children:v(g4,{})}),v("button",{className:"down-button","aria-label":"Increment number down",onClick:p,type:"button",children:v(p4,{})})]})]})}function n6({min:e=-1/0,max:t=1/0,step:n=1,value:r,onChange:i}){const o=k.useCallback(p=>h=>{if(h.preventDefault(),typeof r!="number"||typeof n!="number")return;const m=r+(p==="up"?1:-1)*n;typeof e=="number"&&e>m||typeof t=="number"&&to("up"),[o]),l=k.useMemo(()=>o("down"),[o]),[s,u]=k.useState(r);k.useEffect(()=>u(r),[r]);const c=k.useCallback(p=>{const h=p.target.value;u(m=>Number(m)===Number(h)?m:h),i(Number(h))},[i]),f=k.useCallback(()=>{u(p=>Number(p).toString())},[]);return{incrementUp:a,incrementDown:l,handleChange:c,displayedVal:s===0||s===null?"":s,handleBlur:f}}function P1(e,t){const n=Math.abs(t-e)+1,r=ee+o*r)}function r6({areas:e,row_sizes:t,col_sizes:n,gap_size:r}){return{gridTemplateAreas:e.map(i=>`"${i.join(" ")}"`).join(` - `),gridTemplateRows:t.join(" "),gridTemplateColumns:n.join(" "),"--grid-gap":r}}function N1(e){return e.split(" ")}function i6(e){const t=e.match(/"([.\w\s]+)"/g);if(!t)throw new Error("Can't parse area definition");return t.map(n=>n.replaceAll('"',"").split(" "))}function o6(e){const t=N1(e.style.gridTemplateRows),n=N1(e.style.gridTemplateColumns),r=i6(e.style.gridTemplateAreas),i=e.style.getPropertyValue("--grid-gap");return{row_sizes:t,col_sizes:n,areas:r,gap_size:i}}function BA({container:e,dir:t}){return getComputedStyle(e).getPropertyValue(t==="rows"?"grid-template-rows":"grid-template-columns").split(" ").map(n=>Number(n.replaceAll("px","")))}const yh=e=>Number(e.toFixed(4)),fc=40,a6=.15,UA=e=>t=>Math.round(t/e)*e,l6=5,Tf=UA(l6),s6=.01,zA=UA(s6);function u6(e,{pixelToFrRatio:t,beforeInfo:n,afterInfo:r}){const i=zA(e*t),o=n.count+i,a=r.count-i;return(i<0?o/a:a/o)=o.length?null:o[u];if(c==="auto"||f==="auto"){const h=getComputedStyle(r).getPropertyValue(t==="rows"?"grid-template-rows":"grid-template-columns").split(" ");c==="auto"&&(c=h[s],o[s]=c),f==="auto"&&(f=h[u],o[u]=f),r.style[i]=h.join(" ")}const d=p6(c,f);if(d.type==="unsupported")throw new Error("Unsupported drag type");r.classList.add("been-dragged");const p=$(R({dir:t,mouseStart:WA(e,t),originalSizes:o,currentSizes:[...o],beforeIndex:s,afterIndex:u},d),{pixelToFrRatio:1});return d.type==="both-relative"&&(p.pixelToFrRatio=h6({container:r,index:n,dir:t,frCounts:{before:d.beforeInfo.count,after:d.afterInfo.count}})),p}function g6({mousePosition:e,drag:t,container:n}){const i=WA(e,t.dir)-t.mouseStart,o=[...t.originalSizes];let a;switch(t.type){case"before-pixel":a=f6(i,t);break;case"after-pixel":a=d6(i,t);break;case"both-pixel":a=c6(i,t);break;case"both-relative":a=u6(i,t);break}a!=="no-change"&&(a.beforeSize&&(o[t.beforeIndex]=a.beforeSize),a.afterSize&&(o[t.afterIndex]=a.afterSize),t.currentSizes=o,t.dir==="cols"?n.style.gridTemplateColumns=o.join(" "):n.style.gridTemplateRows=o.join(" "))}function v6(e){return e.match(/[0-9|.]+px/)!==null}function jA(e){return e.match(/[0-9|.]+fr/)!==null}function wh(e){if(jA(e))return{type:"fr",count:Number(e.replace("fr","")),value:e};if(v6(e))return{type:"pixel",count:Number(e.replace("px","")),value:e};throw new Error("Unknown tract sizing unit: "+e)}function WA(e,t){return t==="rows"?e.clientY:e.clientX}function y6(e){return e.some(t=>jA(t))}function w6(e){return e.some(t=>t==="auto")}const b6="_tractInfoDisplay_cvtwo_1",E6="_sizeWidget_cvtwo_61",S6="_cssSizeInput_cvtwo_80",A6="_hoverListener_cvtwo_94",C6="_buttons_cvtwo_114",x6="_tractAddButton_cvtwo_127",k6="_deleteButton_cvtwo_128",Gr={tractInfoDisplay:b6,sizeWidget:E6,cssSizeInput:S6,hoverListener:A6,buttons:C6,tractAddButton:x6,deleteButton:k6},_6=["fr","px"];function O6({dir:e,index:t,size:n,deletionConflicts:r,addTract:i,deleteTract:o,changeUnit:a,changeCount:l}){const{unit:s,count:u}=lc(n);return M("div",{className:Gr.tractInfoDisplay,"data-drag-dir":e,style:{"--tract-index":t+1},children:[v("div",{className:Gr.hoverListener}),M("div",{className:Gr.sizeWidget,onClick:P6,children:[M("div",{className:Gr.buttons,children:[v(R1,{dir:e,onClick:()=>i("before")}),v(T6,{dir:e,onClick:o,deletionConflicts:r}),v(R1,{dir:e,onClick:()=>i("after")})]}),M("div",{className:Gr.cssSizeInput,children:[v(Of,{name:"value-count","aria-label":"value-count",value:u,onChange:l,min:0}),v(FA,{unit:s,availableUnits:_6,onChange:c=>a(c)})]})]})]})}function T6({dir:e,onClick:t,deletionConflicts:n}){const r=e==="rows"?"right":"down",i=n.length===0,o=i?"Delete tract":`Can't delete because the items ${n.join(",")} are entirely contained in tract`;return v(Rr,{className:Gr.deleteButton,onClick:YA(i?t:void 0),"data-enabled":i,text:o,size:"medium",position:r,children:v(df,{})})}function R1({dir:e,onClick:t}){const n=e==="rows"?"right":"down",r=e==="rows"?"Add row":"Add column";return v(Rr,{className:Gr.tractAddButton,onClick:YA(t),position:n,text:r,children:v(og,{})})}function YA(e){return function(t){t.currentTarget.blur(),e==null||e()}}function I6(e,t){let n=0,r=0;for(let i=0;iRS(r,{dir:c,index:f+1}),[r]),a=c=>f=>{const{unit:d}=lc(t[c]);i({type:"RESIZE",index:c,dir:e,size:`${f}${d}`})},l=c=>f=>{const d=n(),{count:p}=lc(t[c]);let h=1;f==="px"&&(h=Tf(d[c]));const m=I6(d,t);f==="fr"&&m!=="NO_FR_UNITS"&&(h=yh(zA(p?p*m:1))),i({type:"RESIZE",index:c,dir:e,size:`${h}${f}`})},s=c=>f=>i({type:"ADD",dir:e,index:f==="before"?c:c+1}),u=c=>()=>{i({type:"DELETE",dir:e,index:c+1})};return v(We,{children:t.map((c,f)=>v(O6,{index:f,dir:e,addTract:s(f),deleteTract:u(f),changeUnit:l(f),changeCount:a(f),size:c,deletionConflicts:o({dir:e,index:f})},e+f))})}function P6(e){e.stopPropagation()}function L1(e,t){e.querySelectorAll(`.${Gr.tractInfoDisplay}`).forEach(n=>{n.style.display=t==="hide"?"none":"block"})}const N6="_columnSizer_9b32k_1",R6="_rowSizer_9b32k_2",M1={columnSizer:N6,rowSizer:R6};function F1({dir:e,index:t,onStartDrag:n}){return v("div",{className:e==="rows"?M1.rowSizer:M1.columnSizer,title:`resize ${e==="rows"?"rows":"columns"} ${t-1} and ${t}`,onMouseDown:r=>n({e:r,dir:e,index:t}),style:{[e==="rows"?"gridRow":"gridColumn"]:t}})}function D6(e,t="Ref is not yet initialized"){if(e.current===null)throw new Error(t);return e.current}function L6({containerRef:e,onDragEnd:t}){return k.useCallback(({e:r,dir:i,index:o})=>{const a=D6(e,"How are you dragging on an element without a container?");r.preventDefault();const l=m6({mousePosition:r,dir:i,index:o,container:a}),{beforeIndex:s,afterIndex:u}=l,c=B1(a,{dir:i,index:s,size:l.currentSizes[s]}),f=B1(a,{dir:i,index:u,size:l.currentSizes[u]});M6(a,l.dir,{move:d=>{g6({mousePosition:d,drag:l,container:a}),c.update(l.currentSizes[s]),f.update(l.currentSizes[u])},end:()=>{c.remove(),f.remove(),t&&t(o6(a))}})},[e,t])}function B1(e,{dir:t,index:n,size:r}){const i=document.createElement("div"),o=t==="rows"?{gridRow:String(n+1),gridColumn:"1",flexDirection:"row"}:{gridColumn:String(n+1),gridRow:"1",flexDirection:"column"};Object.assign(i.style,o,{zIndex:"1",display:"flex",alignItems:"center"});const a=document.createElement("div");return Object.assign(a.style,{padding:"3px 7px",borderRadius:"var(--corner-radius)",backgroundColor:"var(--light-grey, pink)"}),a.innerHTML=r,i.appendChild(a),e.appendChild(i),L1(e,"hide"),{remove:()=>{i.remove(),L1(e,"show")},update:l=>{a.innerHTML=l}}}function M6(e,t,n){const r=document.createElement("div");Object.assign(r.style,{position:"fixed",inset:"0px",zIndex:"3",cursor:t==="rows"?"ns-resize":"ew-resize"}),e.appendChild(r);const i=()=>{o(),n.end()};r.addEventListener("mousemove",n.move),r.addEventListener("mouseup",i),r.addEventListener("mouseleave",i);function o(){r.removeEventListener("mousemove",n.move),r.removeEventListener("mouseup",i),r.removeEventListener("mouseleave",i),r.remove()}}function F6({areas:e,col_sizes:t,row_sizes:n,gap_size:r}){return{areas:e,gap_size:r,col_sizes:dl(t),row_sizes:dl(n)}}const B6="1fr";function U6(i){var o=i,{className:e,children:t,onNewLayout:n}=o,r=ke(o,["className","children","onNewLayout"]);r=F6(r);let{row_sizes:a,col_sizes:l}=r;const s=q.useRef(null),u=r6(r),c=l.length<2?[]:P1(2,l.length),f=a.length<2?[]:P1(2,a.length),d=L6({containerRef:s,onDragEnd:n}),p=[uP.ResizableGrid];e&&p.push(e);const h=q.useCallback(g=>{switch(g.type){case"ADD":return IS(r,{afterIndex:g.index,dir:g.dir,size:B6});case"RESIZE":return z6(r,g);case"DELETE":return NS(r,g)}},[r]),m=q.useCallback(g=>n(h(g)),[h,n]),E=q.useCallback(g=>{const y=s.current;return y?BA({container:y,dir:g}):[]},[]);return M("div",{className:Xe(...p),ref:s,style:u,children:[c.map(g=>v(F1,{dir:"cols",index:g,onStartDrag:d},"cols"+g)),f.map(g=>v(F1,{dir:"rows",index:g,onStartDrag:d},"rows"+g)),t,v(D1,{dir:"cols",sizes:l,getActualSizes:()=>E("cols"),areas:r.areas,onUpdate:m}),v(D1,{dir:"rows",sizes:a,getActualSizes:()=>E("rows"),areas:r.areas,onUpdate:m})]})}function z6(e,{dir:t,index:n,size:r}){return bi(e,i=>{i[t==="rows"?"row_sizes":"col_sizes"][n]=r})}function j6({gridRow:e,gridColumn:t,onDroppedNode:n}){const r=qm({getCanAcceptDrop:i=>!0,onDrop:i=>{n($(R({},i),{pos:{rowStart:e,rowEnd:e,colStart:t,colEnd:t}}))}});return v("div",{className:"grid-cell",ref:r,"data-cell-pos":e+"-"+t,style:{gridRow:e,gridColumn:t,margin:"2px"}})}var dc=Symbol("@ts-pattern/matcher"),U1="@ts-pattern/anonymous-select-key",z1=function(e){return Boolean(e&&typeof e=="object")},Rd=function(e){return e&&!!e[dc]},W6=function e(t,n,r){if(z1(t)){if(Rd(t)){var i=t[dc]().match(n),o=i.matched,a=i.selections;return o&&a&&Object.keys(a).forEach(function(s){return r(s,a[s])}),o}if(!z1(n))return!1;if(Array.isArray(t))return!!Array.isArray(n)&&t.length===n.length&&t.every(function(s,u){return e(s,n[u],r)});if(t instanceof Map)return n instanceof Map&&Array.from(t.keys()).every(function(s){return e(t.get(s),n.get(s),r)});if(t instanceof Set){if(!(n instanceof Set))return!1;if(t.size===0)return n.size===0;if(t.size===1){var l=Array.from(t.values())[0];return Rd(l)?Array.from(n.values()).every(function(s){return e(l,s,r)}):n.has(l)}return Array.from(t.values()).every(function(s){return n.has(s)})}return Object.keys(t).every(function(s){var u,c=t[s];return(s in n||Rd(u=c)&&u[dc]().matcherType==="optional")&&e(c,n[s],r)})}return Object.is(n,t)};function no(e){var t;return(t={})[dc]=function(){return{match:function(n){return{matched:Boolean(e(n))}}}},t}no(function(e){return!0});no(function(e){return typeof e=="string"});no(function(e){return typeof e=="number"});no(function(e){return typeof e=="boolean"});no(function(e){return typeof e=="bigint"});no(function(e){return typeof e=="symbol"});no(function(e){return e==null});var Y6=function(e){return new V6(e,[])},V6=function(){function e(n,r){this.value=void 0,this.cases=void 0,this.value=n,this.cases=r}var t=e.prototype;return t.with=function(){var n=[].slice.call(arguments),r=n[n.length-1],i=[n[0]],o=[];return n.length===3&&typeof n[1]=="function"?(i.push(n[0]),o.push(n[1])):n.length>2&&i.push.apply(i,n.slice(1,n.length-1)),new e(this.value,this.cases.concat([{match:function(a){var l={},s=Boolean(i.some(function(u){return W6(u,a,function(c,f){l[c]=f})})&&o.every(function(u){return u(a)}));return{matched:s,value:s&&Object.keys(l).length?U1 in l?l[U1]:l:a}},handler:r}]))},t.when=function(n,r){return new e(this.value,this.cases.concat([{match:function(i){return{matched:Boolean(n(i)),value:i}},handler:r}]))},t.otherwise=function(n){return new e(this.value,this.cases.concat([{match:function(r){return{matched:!0,value:r}},handler:n}])).run()},t.exhaustive=function(){return this.run()},t.run=function(){for(var n=this.value,r=void 0,i=0;ir(a.target.checked);return M(We,{children:[v("input",{className:Xe("SUE-Input",j1.checkboxInput),id:i,"aria-labelledby":Ir(e),"aria-label":t,type:"checkbox",checked:n,onChange:o}),v("label",{className:j1.checkboxLabel,htmlFor:i,"data-value":n?"TRUE":"FALSE",children:"Toggle"})]})}const J6={fr:1,px:10,rem:1,"%":100};function Q6({id:e,label:t,value:n,onChange:r,units:i=["px","rem","%"]}){const{count:o,unit:a}=lc(n),l=k.useCallback(c=>{if(c===void 0){if(a!=="auto")throw new Error("Undefined count with auto units");r(Da({unit:a,count:null}));return}if(a==="auto"){console.error("How did you change the count of an auto unit?");return}r(Da({unit:a,count:c}))},[r,a]),s=k.useCallback(c=>{if(c==="auto"){r(Da({unit:c,count:null}));return}if(a==="auto"){r(Da({unit:c,count:J6[c]}));return}r(Da({unit:c,count:o}))},[o,r,a]);i.includes(a)||i.push(a);const u=o===null;return M("div",{className:Xe("SUE-Input",MA.wrapper),"aria-label":t,"aria-labelledby":Ir(e),children:[v(Of,{name:"value-count","aria-label":"value-count",value:o,disabled:u,onChange:l,min:0}),v(FA,{unit:a,availableUnits:i,onChange:s})]})}function K6(e){return It({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"}}]})(e)}var bh={},q6={get exports(){return bh},set exports(e){bh=e}};/**! - * Sortable 1.15.0 - * @author RubaXa - * @author owenm - * @license MIT - */function W1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sr(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function eL(e,t){if(e==null)return{};var n=Z6(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tL(e){return nL(e)||rL(e)||iL(e)||oL()}function nL(e){if(Array.isArray(e))return Eh(e)}function rL(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iL(e,t){if(e){if(typeof e=="string")return Eh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eh(e,t)}}function Eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function lL(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Rn(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&pc(e,t):pc(e,t))||r&&e===n)return e;if(e===n)break}while(e=lL(e))}return null}var V1=/\s+/g;function Be(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(V1," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(V1," ")}}function K(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function Vi(e,t){var n="";if(typeof e=="string")n=e;else do{var r=K(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function GA(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:a=i<=o,!a)return r;if(r===rr())break;r=Xr(r,!1)}return!1}function na(e,t,n,r){for(var i=0,o=0,a=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=eL(r,hL);hs.pluginEvent.bind(ee)(t,n,sr({dragEl:Y,parentEl:$e,ghostEl:ae,rootEl:Ne,nextEl:Ri,lastDownEl:Au,cloneEl:Fe,cloneHidden:Jr,dragStarted:Za,putSortable:ft,activeSortable:ee.active,originalEvent:i,oldIndex:To,oldDraggableIndex:wl,newIndex:$t,newDraggableIndex:Wr,hideGhostForTarget:ZA,unhideGhostForTarget:eC,cloneNowHidden:function(){Jr=!0},cloneNowShown:function(){Jr=!1},dispatchSortableEvent:function(l){Ct({sortable:n,name:l,originalEvent:i})}},o))};function Ct(e){Xa(sr({putSortable:ft,cloneEl:Fe,targetEl:Y,rootEl:Ne,oldIndex:To,oldDraggableIndex:wl,newIndex:$t,newDraggableIndex:Wr},e))}var Y,$e,ae,Ne,Ri,Au,Fe,Jr,To,$t,wl,Wr,Xs,ft,go=!1,hc=!1,mc=[],_i,Tn,Fd,Bd,J1,Q1,Za,fo,bl,El=!1,Zs=!1,Cu,yt,Ud=[],Sh=!1,gc=[],If=typeof document!="undefined",eu=VA,K1=ps||Dr?"cssFloat":"float",mL=If&&!$A&&!VA&&"draggable"in document.createElement("div"),KA=function(){if(If){if(Dr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),qA=function(t,n){var r=K(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=na(t,0,n),a=na(t,1,n),l=o&&K(o),s=a&&K(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Le(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Le(a).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var f=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&r[K1]==="none"||a&&r[K1]==="none"&&u+c>i)?"vertical":"horizontal"},gL=function(t,n,r){var i=r?t.left:t.top,o=r?t.right:t.bottom,a=r?t.width:t.height,l=r?n.left:n.top,s=r?n.right:n.bottom,u=r?n.width:n.height;return i===l||o===s||i+a/2===l+u/2},vL=function(t,n){var r;return mc.some(function(i){var o=i[St].options.emptyInsertThreshold;if(!(!o||Ag(i))){var a=Le(i),l=t>=a.left-o&&t<=a.right+o,s=n>=a.top-o&&n<=a.bottom+o;if(l&&s)return r=i}}),r},XA=function(t){function n(o,a){return function(l,s,u,c){var f=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(o==null&&(a||f))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return n(o(l,s,u,c),a)(l,s,u,c);var d=(a?l:s).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var r={},i=t.group;(!i||Su(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},ZA=function(){!KA&&ae&&K(ae,"display","none")},eC=function(){!KA&&ae&&K(ae,"display","")};If&&!$A&&document.addEventListener("click",function(e){if(hc)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),hc=!1,!1},!0);var Oi=function(t){if(Y){t=t.touches?t.touches[0]:t;var n=vL(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[St]._onDragOver(r)}}},yL=function(t){Y&&Y.parentNode[St]._isOutsideThisEl(t.target)};function ee(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=bn({},t),e[St]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return qA(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ee.supportPointer!==!1&&"PointerEvent"in window&&!vl,emptyInsertThreshold:5};hs.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);XA(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:mL,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?pe(e,"pointerdown",this._onTapStart):(pe(e,"mousedown",this._onTapStart),pe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(pe(e,"dragover",this),pe(e,"dragenter",this)),mc.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bn(this,fL())}ee.prototype={constructor:ee,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(fo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Y):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,o=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(kL(r),!Y&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&vl&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Rn(s,i.draggable,r,!1),!(s&&s.animated)&&Au!==s)){if(To=Ge(s),wl=Ge(s,i.draggable),typeof c=="function"){if(c.call(this,t,s,this)){Ct({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:r,fromEl:r}),Pt("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Rn(u,f.trim(),r,!1),f)return Ct({sortable:n,rootEl:f,name:"filter",targetEl:s,fromEl:r,toEl:r}),Pt("filter",n,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Rn(u,i.handle,r,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,n,r){var i=this,o=i.el,a=i.options,l=o.ownerDocument,s;if(r&&!Y&&r.parentNode===o){var u=Le(r);if(Ne=o,Y=r,$e=Y.parentNode,Ri=Y.nextSibling,Au=r,Xs=a.group,ee.dragged=Y,_i={target:Y,clientX:(n||t).clientX,clientY:(n||t).clientY},J1=_i.clientX-u.left,Q1=_i.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Y.style["will-change"]="all",s=function(){if(Pt("delayEnded",i,{evt:t}),ee.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Y1&&i.nativeDraggable&&(Y.draggable=!0),i._triggerDragStart(t,n),Ct({sortable:i,name:"choose",originalEvent:t}),Be(Y,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){GA(Y,c.trim(),zd)}),pe(l,"dragover",Oi),pe(l,"mousemove",Oi),pe(l,"touchmove",Oi),pe(l,"mouseup",i._onDrop),pe(l,"touchend",i._onDrop),pe(l,"touchcancel",i._onDrop),Y1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Y.draggable=!0),Pt("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(ps||Dr))){if(ee.eventCanceled){this._onDrop();return}pe(l,"mouseup",i._disableDelayedDrag),pe(l,"touchend",i._disableDelayedDrag),pe(l,"touchcancel",i._disableDelayedDrag),pe(l,"mousemove",i._delayedDragTouchMoveHandler),pe(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&pe(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Y&&zd(Y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ue(t,"mouseup",this._disableDelayedDrag),ue(t,"touchend",this._disableDelayedDrag),ue(t,"touchcancel",this._disableDelayedDrag),ue(t,"mousemove",this._delayedDragTouchMoveHandler),ue(t,"touchmove",this._delayedDragTouchMoveHandler),ue(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?pe(document,"pointermove",this._onTouchMove):n?pe(document,"touchmove",this._onTouchMove):pe(document,"mousemove",this._onTouchMove):(pe(Y,"dragend",this),pe(Ne,"dragstart",this._onDragStart));try{document.selection?xu(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(t,n){if(go=!1,Ne&&Y){Pt("dragStarted",this,{evt:n}),this.nativeDraggable&&pe(document,"dragover",yL);var r=this.options;!t&&Be(Y,r.dragClass,!1),Be(Y,r.ghostClass,!0),ee.active=this,t&&this._appendGhost(),Ct({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Tn){this._lastX=Tn.clientX,this._lastY=Tn.clientY,ZA();for(var t=document.elementFromPoint(Tn.clientX,Tn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Tn.clientX,Tn.clientY),t!==n);)n=t;if(Y.parentNode[St]._isOutsideThisEl(t),n)do{if(n[St]){var r=void 0;if(r=n[St]._onDragOver({clientX:Tn.clientX,clientY:Tn.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);eC()}},_onTouchMove:function(t){if(_i){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,a=ae&&Vi(ae,!0),l=ae&&a&&a.a,s=ae&&a&&a.d,u=eu&&yt&&H1(yt),c=(o.clientX-_i.clientX+i.x)/(l||1)+(u?u[0]-Ud[0]:0)/(l||1),f=(o.clientY-_i.clientY+i.y)/(s||1)+(u?u[1]-Ud[1]:0)/(s||1);if(!ee.active&&!go){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(Ct({rootEl:$e,name:"add",toEl:$e,fromEl:Ne,originalEvent:t}),Ct({sortable:this,name:"remove",toEl:$e,originalEvent:t}),Ct({rootEl:$e,name:"sort",toEl:$e,fromEl:Ne,originalEvent:t}),Ct({sortable:this,name:"sort",toEl:$e,originalEvent:t})),ft&&ft.save()):$t!==To&&$t>=0&&(Ct({sortable:this,name:"update",toEl:$e,originalEvent:t}),Ct({sortable:this,name:"sort",toEl:$e,originalEvent:t})),ee.active&&(($t==null||$t===-1)&&($t=To,Wr=wl),Ct({sortable:this,name:"end",toEl:$e,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Pt("nulling",this),Ne=Y=$e=ae=Ri=Fe=Au=Jr=_i=Tn=Za=$t=Wr=To=wl=fo=bl=ft=Xs=ee.dragged=ee.ghost=ee.clone=ee.active=null,gc.forEach(function(t){t.checked=!0}),gc.length=Fd=Bd=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Y&&(this._onDragOver(t),wL(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,o=r.length,a=this.options;ir.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function AL(e,t,n,r,i,o,a,l){var s=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a){if(l&&Cuc+u*o/2:sf-Cu)return-bl}else if(s>c+u*(1-i)/2&&sf-u*o/2)?s>c+u/2?1:-1:0}function CL(e){return Ge(Y)1&&(ie.forEach(function(l){o.addAnimationState({target:l,rect:Nt?Le(l):a}),Ld(l),l.fromRect=a,r.removeAnimationState(l)}),Nt=!1,PL(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(n){var r=n.sortable,i=n.isOwner,o=n.insertion,a=n.activeSortable,l=n.parentEl,s=n.putSortable,u=this.options;if(o){if(i&&a._hideClone(),Ba=!1,u.animation&&ie.length>1&&(Nt||!i&&!a.options.sort&&!s)){var c=Le(_e,!1,!0,!0);ie.forEach(function(d){d!==_e&&(G1(d,c),l.appendChild(d))}),Nt=!0}if(!i)if(Nt||ru(),ie.length>1){var f=nu;a._showClone(r),a.options.animation&&!nu&&f&&Vt.forEach(function(d){a.addAnimationState({target:d,rect:Ua}),d.fromRect=Ua,d.thisAnimationDuration=null})}else a._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,i=n.isOwner,o=n.activeSortable;if(ie.forEach(function(l){l.thisAnimationDuration=null}),o.options.animation&&!i&&o.multiDrag.isMultiDrag){Ua=bn({},r);var a=Vi(_e,!0);Ua.top-=a.f,Ua.left-=a.e}},dragOverAnimationComplete:function(){Nt&&(Nt=!1,ru())},drop:function(n){var r=n.originalEvent,i=n.rootEl,o=n.parentEl,a=n.sortable,l=n.dispatchSortableEvent,s=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(r){var f=this.options,d=o.children;if(!po)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Be(_e,f.selectedClass,!~ie.indexOf(_e)),~ie.indexOf(_e))ie.splice(ie.indexOf(_e),1),Fa=null,Xa({sortable:a,rootEl:i,name:"deselect",targetEl:_e,originalEvent:r});else{if(ie.push(_e),Xa({sortable:a,rootEl:i,name:"select",targetEl:_e,originalEvent:r}),r.shiftKey&&Fa&&a.el.contains(Fa)){var p=Ge(Fa),h=Ge(_e);if(~p&&~h&&p!==h){var m,E;for(h>p?(E=p,m=h):(E=h,m=p+1);E1){var g=Le(_e),y=Ge(_e,":not(."+this.options.selectedClass+")");if(!Ba&&f.animation&&(_e.thisAnimationDuration=null),c.captureAnimationState(),!Ba&&(f.animation&&(_e.fromRect=g,ie.forEach(function(S){if(S.thisAnimationDuration=null,S!==_e){var _=Nt?Le(S):g;S.fromRect=_,c.addAnimationState({target:S,rect:_})}})),ru(),ie.forEach(function(S){d[y]?o.insertBefore(S,d[y]):o.appendChild(S),y++}),s===Ge(_e))){var w=!1;ie.forEach(function(S){if(S.sortableIndex!==Ge(S)){w=!0;return}}),w&&l("update")}ie.forEach(function(S){Ld(S)}),c.animateAll()}In=c}(i===o||u&&u.lastPutMode!=="clone")&&Vt.forEach(function(S){S.parentNode&&S.parentNode.removeChild(S)})}},nullingGlobal:function(){this.isMultiDrag=po=!1,Vt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),ue(document,"pointerup",this._deselectMultiDrag),ue(document,"mouseup",this._deselectMultiDrag),ue(document,"touchend",this._deselectMultiDrag),ue(document,"keydown",this._checkKeyDown),ue(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof po!="undefined"&&po)&&In===this.sortable&&!(n&&Rn(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;ie.length;){var r=ie[0];Be(r,this.options.selectedClass,!1),ie.shift(),Xa({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvent:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},bn(e,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[St];!r||!r.options.multiDrag||~ie.indexOf(n)||(In&&In!==r&&(In.multiDrag._deselectMultiDrag(),In=r),Be(n,r.options.selectedClass,!0),ie.push(n))},deselect:function(n){var r=n.parentNode[St],i=ie.indexOf(n);!r||!r.options.multiDrag||!~i||(Be(n,r.options.selectedClass,!1),ie.splice(i,1))}},eventProperties:function(){var n=this,r=[],i=[];return ie.forEach(function(o){r.push({multiDragElement:o,index:o.sortableIndex});var a;Nt&&o!==_e?a=-1:Nt?a=Ge(o,":not(."+n.options.selectedClass+")"):a=Ge(o),i.push({multiDragElement:o,index:a})}),{items:tL(ie),clones:[].concat(Vt),oldIndicies:r,newIndicies:i}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function PL(e,t){ie.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function X1(e,t){Vt.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function ru(){ie.forEach(function(e){e!==_e&&e.parentNode&&e.parentNode.removeChild(e)})}ee.mount(new _L);ee.mount(kg,xg);const NL=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:IL,Sortable:ee,Swap:OL,default:ee},Symbol.toStringTag,{value:"Module"})),RL=V0(NL);var kh={},DL={get exports(){return kh},set exports(e){kh=e}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i$882b6d93070905b3$re_export$Sortable),a(e.exports,"Direction",()=>$882b6d93070905b3$re_export$Direction),a(e.exports,"DOMRect",()=>$882b6d93070905b3$re_export$DOMRect),a(e.exports,"GroupOptions",()=>$882b6d93070905b3$re_export$GroupOptions),a(e.exports,"MoveEvent",()=>$882b6d93070905b3$re_export$MoveEvent),a(e.exports,"Options",()=>$882b6d93070905b3$re_export$Options),a(e.exports,"PullResult",()=>$882b6d93070905b3$re_export$PullResult),a(e.exports,"PutResult",()=>$882b6d93070905b3$re_export$PutResult),a(e.exports,"SortableEvent",()=>$882b6d93070905b3$re_export$SortableEvent),a(e.exports,"SortableOptions",()=>$882b6d93070905b3$re_export$SortableOptions),a(e.exports,"Utils",()=>$882b6d93070905b3$re_export$Utils),a(e.exports,"ReactSortable",()=>S);function s(b){b.parentElement!==null&&b.parentElement.removeChild(b)}function u(b,A,O){const I=b.children[O]||null;b.insertBefore(A,I)}function c(b){b.forEach(A=>s(A.element))}function f(b){b.forEach(A=>{u(A.parentElement,A.element,A.oldIndex)})}function d(b,A){const O=E(b),I={parentElement:b.from};let P=[];switch(O){case"normal":P=[{element:b.item,newIndex:b.newIndex,oldIndex:b.oldIndex,parentElement:b.from}];break;case"swap":const U=R({element:b.item,oldIndex:b.oldIndex,newIndex:b.newIndex},I),X=R({element:b.swapItem,oldIndex:b.newIndex,newIndex:b.oldIndex},I);P=[U,X];break;case"multidrag":P=b.oldIndicies.map((oe,ne)=>R({element:oe.multiDragElement,oldIndex:oe.index,newIndex:b.newIndicies[ne].index},I));break}return g(P,A)}function p(b,A){const O=h(b,A);return m(b,O)}function h(b,A){const O=[...A];return b.concat().reverse().forEach(I=>O.splice(I.oldIndex,1)),O}function m(b,A,O,I){const P=[...A];return b.forEach(T=>{const F=I&&O&&I(T.item,O);P.splice(T.newIndex,0,F||T.item)}),P}function E(b){return b.oldIndicies&&b.oldIndicies.length>0?"multidrag":b.swapItem?"swap":"normal"}function g(b,A){return b.map(I=>$(R({},I),{item:A[I.oldIndex]})).sort((I,P)=>I.oldIndex-P.oldIndex)}function y(b){const kn=b,{list:A,setList:O,children:I,tag:P,style:T,className:F,clone:U,onAdd:X,onChange:oe,onChoose:ne,onClone:fe,onEnd:B,onFilter:V,onRemove:G,onSort:x,onStart:C,onUnchoose:it,onUpdate:Qe,onMove:Ze,onSpill:me,onSelect:Ve,onDeselect:ct}=kn;return ke(kn,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"])}const w={dragging:null};class S extends r.Component{constructor(A){super(A),this.ref=(0,r.createRef)();const O=[...A.list].map(I=>Object.assign(I,{chosen:!1,selected:!1}));A.setList(O,this.sortable,w),o(i)(!A.plugins,` -Plugins prop is no longer supported. -Instead, mount it with "Sortable.mount(new MultiDrag())" -Please read the updated README.md at https://github.com/SortableJS/react-sortablejs. - `)}componentDidMount(){if(this.ref.current===null)return;const A=this.makeOptions();o(t).create(this.ref.current,A)}componentDidUpdate(A){A.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:A,style:O,className:I,id:P}=this.props,T={style:O,className:I,id:P},F=!A||A===null?"div":A;return(0,r.createElement)(F,R({ref:this.ref},T),this.getChildren())}getChildren(){const{children:A,dataIdAttr:O,selectedClass:I="sortable-selected",chosenClass:P="sortable-chosen",dragClass:T="sortable-drag",fallbackClass:F="sortable-falback",ghostClass:U="sortable-ghost",swapClass:X="sortable-swap-highlight",filter:oe="sortable-filter",list:ne}=this.props;if(!A||A==null)return null;const fe=O||"data-id";return r.Children.map(A,(B,V)=>{if(B===void 0)return;const G=ne[V]||{},{className:x}=B.props,C=typeof oe=="string"&&{[oe.replace(".","")]:!!G.filtered},it=o(n)(x,R({[I]:G.selected,[P]:G.chosen},C));return(0,r.cloneElement)(B,{[fe]:B.key,className:it})})}get sortable(){const A=this.ref.current;if(A===null)return null;const O=Object.keys(A).find(I=>I.includes("Sortable"));return O?A[O]:null}makeOptions(){const A=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],O=["onChange","onClone","onFilter","onSort"],I=y(this.props);A.forEach(T=>I[T]=this.prepareOnHandlerPropAndDOM(T)),O.forEach(T=>I[T]=this.prepareOnHandlerProp(T));const P=(T,F)=>{const{onMove:U}=this.props,X=T.willInsertAfter||-1;if(!U)return X;const oe=U(T,F,this.sortable,w);return typeof oe=="undefined"?!1:oe};return $(R({},I),{onMove:P})}prepareOnHandlerPropAndDOM(A){return O=>{this.callOnHandlerProp(O,A),this[A](O)}}prepareOnHandlerProp(A){return O=>{this.callOnHandlerProp(O,A)}}callOnHandlerProp(A,O){const I=this.props[O];I&&I(A,this.sortable,w)}onAdd(A){const{list:O,setList:I,clone:P}=this.props,T=[...w.dragging.props.list],F=d(A,T);c(F);const U=m(F,O,A,P).map(X=>Object.assign(X,{selected:!1}));I(U,this.sortable,w)}onRemove(A){const{list:O,setList:I}=this.props,P=E(A),T=d(A,O);f(T);let F=[...O];if(A.pullMode!=="clone")F=h(T,F);else{let U=T;switch(P){case"multidrag":U=T.map((X,oe)=>$(R({},X),{element:A.clones[oe]}));break;case"normal":U=T.map(X=>$(R({},X),{element:A.clone}));break;case"swap":default:o(i)(!0,`mode "${P}" cannot clone. Please remove "props.clone" from when using the "${P}" plugin`)}c(U),T.forEach(X=>{const oe=X.oldIndex,ne=this.props.clone(X.item,A);F.splice(oe,1,ne)})}F=F.map(U=>Object.assign(U,{selected:!1})),I(F,this.sortable,w)}onUpdate(A){const{list:O,setList:I}=this.props,P=d(A,O);c(P),f(P);const T=p(P,O);return I(T,this.sortable,w)}onStart(){w.dragging=this}onEnd(){w.dragging=null}onChoose(A){const{list:O,setList:I}=this.props,P=O.map((T,F)=>{let U=T;return F===A.oldIndex&&(U=Object.assign(T,{chosen:!0})),U});I(P,this.sortable,w)}onUnchoose(A){const{list:O,setList:I}=this.props,P=O.map((T,F)=>{let U=T;return F===A.oldIndex&&(U=Object.assign(U,{chosen:!1})),U});I(P,this.sortable,w)}onSpill(A){const{removeOnSpill:O,revertOnSpill:I}=this.props;O&&!I&&s(A.item)}onSelect(A){const{list:O,setList:I}=this.props,P=O.map(T=>Object.assign(T,{selected:!1}));A.newIndicies.forEach(T=>{const F=T.index;if(F===-1){console.log(`"${A.type}" had indice of "${T.index}", which is probably -1 and doesn't usually happen here.`),console.log(A);return}P[F].selected=!0}),I(P,this.sortable,w)}onDeselect(A){const{list:O,setList:I}=this.props,P=O.map(T=>Object.assign(T,{selected:!1}));A.newIndicies.forEach(T=>{const F=T.index;F!==-1&&(P[F].selected=!0)}),I(P,this.sortable,w)}}zg(S,"defaultProps",{clone:A=>A});var _={};l(e.exports,_)})(q6);const UL="_container_xt7ji_1",zL="_list_xt7ji_6",jL="_item_xt7ji_15",WL="_keyField_xt7ji_29",YL="_valueField_xt7ji_34",VL="_header_xt7ji_39",$L="_dragHandle_xt7ji_45",HL="_deleteButton_xt7ji_55",GL="_addItemButton_xt7ji_65",JL="_separator_xt7ji_72",Wt={container:UL,list:zL,item:jL,keyField:WL,valueField:YL,header:VL,dragHandle:$L,deleteButton:HL,addItemButton:GL,separator:JL};function QL(e){return!(typeof e!="object"||Object.values(e).find(n=>typeof n!="string"))}function KL({id:e,label:t,value:n,onChange:r,newItemValue:i={key:"myKey",value:"myValue"}}){const{state:o,setState:a,addItem:l,deleteItem:s}=qL({value:n,onChange:r,newItemValue:i});return M("div",{className:Wt.list,"aria-labelledby":Ir(e),"aria-label":t,children:[M("div",{className:Wt.item+" "+Wt.header,"aria-label":"Columns field labels",children:[v("span",{className:Wt.keyField,children:"Key"}),v("span",{className:Wt.valueField,children:"Value"})]}),v(bh.ReactSortable,{list:o,setList:a,handle:`.${Wt.dragHandle}`,children:o.map((u,c)=>M("div",{className:Wt.item,children:[v("div",{className:Wt.dragHandle,title:"Reorder list",children:v(K6,{})}),v("input",{title:"Key Field",className:Wt.keyField,type:"text",value:u.key,onChange:f=>{const d=[...o];d[c]=$(R({},u),{key:f.target.value}),a(d)}}),v("span",{className:Wt.separator,children:":"}),v("input",{title:"Value Field",className:Wt.valueField,type:"text",value:u.value,onChange:f=>{const d=[...o];d[c]=$(R({},u),{value:f.target.value}),a(d)}}),v(mt,{className:Wt.deleteButton,onClick:()=>s(u.id),variant:["icon","transparent"],title:`Delete ${u.value}`,children:v(df,{})})]},u.id))}),v(mt,{className:Wt.addItemButton,onClick:()=>l(),variant:["icon","transparent"],title:"Add new item","aria-label":"Add new item to list",children:v(og,{})})]})}function qL({value:e,onChange:t,newItemValue:n}){const[r,i]=k.useState(e!==void 0?Object.keys(e).map((l,s)=>({id:s,key:l,value:e[l]})):[]);k.useEffect(()=>{const l=XL(r);sT(l,e!=null?e:{})||t(l)},[t,r,e]);const o=k.useCallback(l=>{i(s=>s.filter(({id:u})=>u!==l))},[]),a=k.useCallback(()=>{i(l=>[...l,R({id:-1},n)].map((s,u)=>$(R({},s),{id:u})))},[n]);return{state:r,setState:i,deleteItem:o,addItem:a}}function XL(e){return e.reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}const ZL="__DEFAULT-DROPDOWN-CHOICE__";function eM({id:e,label:t,choices:n,onChange:r,value:i}){k.useEffect(()=>{i===ZL&&r(n[0]),n.length>0&&!n.includes(i)&&r(n[0])},[r,n,i]);const o=l=>{const s=l.target.selectedIndex;r(n[s])},a=HT(n);return a.length===0?v("select",{title:`${t} selector`,"aria-labelledby":Ir(e),"aria-label":t,className:"OptionsDropdown SUE-Input",placeholder:"No available options"}):v("select",{title:`${t} selector`,"aria-labelledby":Ir(e),className:"OptionsDropdown SUE-Input",onChange:o,value:i,children:a.map(l=>v("option",{value:l,children:l},l))})}const tM="_radioContainer_ow37t_1",nM="_option_ow37t_15",rM="_radioInput_ow37t_22",iM="_radioLabel_ow37t_26",oM="_icon_ow37t_41",aM="_text_only_label_ow37t_87",ho={radioContainer:tM,option:nM,radioInput:rM,radioLabel:iM,icon:oM,text_only_label:aM},lM="__DEFAULT-RADIO-CHOICE__";function sM({id:e,label:t,choices:n,value:r,onChange:i,optionsPerColumn:o}){const a=Object.keys(n);q.useEffect(()=>{r===lM&&i(a[0])},[a,r,i]);const l=q.useMemo(()=>({gridTemplateColumns:o?`repeat(${o}, 1fr)`:void 0}),[o]);return v("fieldset",{className:ho.radioContainer,"aria-labelledby":Ir(e),"aria-label":t,style:l,children:a.map(s=>{var h;const u=e+s,c=n[s],f="icon"in c?c.icon:null,d=f===null,p=(h=c.label)!=null?h:s;return M("div",{className:ho.option,children:[v("input",{className:ho.radioInput,name:e,id:u,type:"radio",value:s,onChange:()=>i(s),checked:s===r}),v("label",{className:ho.radioLabel,htmlFor:u,"data-name":d?null:p,children:d?v("span",{className:ho.text_only_label,children:p}):typeof f=="string"?v("img",{src:f,alt:p,className:ho.icon}):f})]},s)})})}function uM({id:e,label:t,value:n,onChange:r,longform:i}){const o={className:"SUE-Input","aria-label":t,"aria-labelledby":Ir(e),id:e,value:n,onChange:a=>{const l=a.target.value;r(l)}};return i?v("textarea",R({},o)):v("input",$(R({},o),{type:"text"}))}function cM(e){return Y6(e).with({inputType:"string"},t=>v(uM,R({},t))).with({inputType:"number"},t=>v(t6,R({},t))).with({inputType:"cssMeasure"},t=>v(Q6,R({},t))).with({inputType:"boolean"},t=>v(G6,R({},t))).with({inputType:"list"},t=>v(KL,R({},t))).with({inputType:"dropdown"},t=>v(eM,R({},t))).with({inputType:"radio"},t=>v(sM,R({},t))).otherwise(({inputType:t})=>M("div",{children:["I don't know how to render the input of type ",t," yet! Sorry."]}))}function fM(e,t){if(e===void 0)return!0;if(t==="number")return typeof e=="number";if(t==="string")return typeof e=="string";if(t==="cssMeasure")return fP(e);if(t==="boolean")return typeof e=="boolean";if(t==="list")return QL(e);if(t==="dropdown"||t==="radio")return typeof e=="string";if(t==="string-array")return Array.isArray(e)&&typeof e[0]=="string";if(t==="omitted")return!0;throw new Error("Unimplemented argument type check",t)}function nC(n){var r=n,{onUpdate:e}=r,t=ke(r,["onUpdate"]);var d;const i=t.value===void 0,o=t.optional,a=Ir(t.name),l=(d=t.label)!=null?d:t.name,s=()=>e({type:"UPDATE",value:t.defaultValue}),u=p=>e({type:"UPDATE",value:p}),c=()=>e({type:"REMOVE"});let f;return t.value===void 0?t.optional?f=v(hM,{labelledBy:a}):f=v(pM,{name:t.name,onReset:s}):fM(t.value,t.inputType)?f=v(cM,R({label:l,id:t.name,onChange:u},t)):f=v(dM,{name:t.name,onReset:s}),M("div",{className:"SUE-SettingsInput",children:[M("div",{className:"info","data-unset":i,children:[o?v("input",{type:"checkbox",checked:!i,title:`Use ${t.name} argument`,"aria-label":`Use ${t.name} argument`,onChange:i?s:c}):null,v("label",{id:a,children:l})]}),f]})}function dM({name:e,onReset:t}){return M("div",{className:"mismatched-argument-types",children:["Argument for ",e," of unsupported type.",v(mt,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:t,children:"Reset"})]})}function pM({name:e,onReset:t}){return M("div",{className:"missing-required-argument-message",children:['Required argument "',e,'" not provided.',v(mt,{style:{padding:"0.25rem 0.5rem",marginInline:"0.25rem"},onClick:t,children:"Reset"})]})}function hM({labelledBy:e}){return v("input",{className:"unset-argument SUE-Input","aria-labelledby":e,placeholder:"Default",disabled:!0})}const mM="_EditorSkeleton_18fvc_1",gM="_app_view_18fvc_14",vM="_elements_panel_18fvc_28",yM="_properties_panel_18fvc_33",wM="_app_preview_18fvc_38",bM="_panel_18fvc_63",EM="_panel_title_18fvc_74",dr={EditorSkeleton:mM,app_view:gM,elements_panel:vM,properties_panel:yM,app_preview:wM,panel:bM,panel_title:EM};function va({children:e,className:t=""}){return v("h3",{className:Xe(t,dr.panel_title),children:e})}const SM="_portalHolder_18ua3_1",AM="_portalModal_18ua3_11",CM="_title_18ua3_21",xM="_body_18ua3_25",kM="_portalForm_18ua3_30",_M="_portalFormInputs_18ua3_35",OM="_portalFormFooter_18ua3_42",TM="_validationMsg_18ua3_48",IM="_infoText_18ua3_53",vr={portalHolder:SM,portalModal:AM,title:CM,body:xM,portalForm:kM,portalFormInputs:_M,portalFormFooter:OM,validationMsg:TM,infoText:IM};function rC({children:e,title:t,label:n,onConfirm:r,onCancel:i}){return v(pE,{children:v("div",{className:vr.portalHolder,onClick:()=>i(),onKeyDown:o=>{o.key==="Escape"&&i()},children:M("div",{className:vr.portalModal,onClick:o=>o.stopPropagation(),"aria-label":n!=null?n:"popup modal",children:[t?v(va,{className:vr.title,children:t}):null,v("div",{className:vr.body,children:e})]})})})}function PM({onCancel:e,onDone:t,existingAreaNames:n}){const r=`area${n.length}`,[i,o]=k.useState(r),[a,l]=k.useState(null),s=k.useCallback(c=>{c&&c.preventDefault();const f=NM({name:i,existingAreaNames:n});if(f){l(f);return}t(i)},[n,i,t]),u=k.useCallback(c=>{c.type!=="REMOVE"&&(l(null),o(c.value))},[]);return M(rC,{title:"Name new grid area",label:"New grid area naming modal",onConfirm:()=>t(i),onCancel:e,children:[v("form",{className:vr.portalForm,onSubmit:s,children:M("div",{className:vr.portalFormInputs,children:[v("span",{className:vr.infoText,children:"Name for grid area needs to be unique, start with a letter, and contain only letters and numbers."}),v(nC,{label:"Name of new grid area",name:"New-Item-Name",inputType:"string",onUpdate:u,value:i,defaultValue:r}),a?v("div",{className:vr.validationMsg,children:a}):null]})}),M("div",{className:vr.portalFormFooter,children:[v(mt,{variant:"delete",onClick:e,children:"Cancel"}),v(mt,{onClick:()=>s(),children:"Done"})]})]})}function NM({name:e,existingAreaNames:t}){return e===""?"A name is needed for the grid area":t.includes(e)?`You already have an item with the name "${e}", all names - need to be unique.`:e.match(/^[^a-zA-Z]/g)?"Valid item names need to start with a character.":e.match(/\s/g)?"Spaces not allowed in grid area names":e.match(/[^\w]/g)?"Only letters and numbers allowed in area names":null}function RM(e){const t=Nr();return k.useCallback(r=>{t(cS({path:e,node:{uiArguments:r}}))},[t,e])}function DM({layout:e,row_sizes:t,col_sizes:n,gap_size:r}){return e=dl(e),t=dl(t),n=dl(n),{layout:e,row_sizes:t,col_sizes:n,gap_size:r}}const LM="_container_1hvsg_1",MM={container:LM},iC=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{const i=DM(e),o=Km(),w=M4(i),{uniqueAreas:a}=w,l=ke(w,["uniqueAreas"]),{areas:s}=l,u=RM(n),c=k.useMemo(()=>rg(s),[s]),[f,d]=k.useState(null),p=S=>{const{node:_,currentPath:b,pos:A}=S,O=b!==void 0,I=eg(_);if(O&&I&&"area"in _.uiArguments&&_.uiArguments.area){const P=_.uiArguments.area;h({type:"MOVE_ITEM",name:P,pos:A});return}d(S)},h=S=>{u(ig(i,S))},m=k.useCallback(S=>{u(DS(S))},[u]),E=a.map(S=>v(aP,{area:S,areas:s,gridLocation:c.get(S),onNewPos:_=>h({type:"MOVE_ITEM",name:S,pos:_})},S)),g={"--gap":i.gap_size,"--row-gutter":"150px","--col-gutter":"100px","--pad":"8px"},y=(S,{node:_,currentPath:b,pos:A})=>{var O;o({path:or(n,(O=t==null?void 0:t.length)!=null?O:0),node:$4(_,S),currentPath:b}),h({type:"ADD_ITEM",name:S,pos:A}),d(null)};return M(ES.Provider,{value:h,children:[v("div",$(R({style:g,className:MM.container},r),{draggable:!1,onDragStart:()=>{},children:M(U6,$(R({},l),{onNewLayout:m,children:[V4(s).map(({row:S,col:_})=>v(j6,{gridRow:S,gridColumn:_,onDroppedNode:p},Z4({row:S,col:_}))),t==null?void 0:t.map((S,_)=>v(Ei,{path:[...n,_],node:S},n.join(".")+_)),E]}))})),f?v(PM,{info:f,onCancel:()=>d(null),onDone:S=>y(S,f),existingAreaNames:a}):null]})},FM=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>v(iC,{uiArguments:e,uiChildren:t,path:n,wrapperProps:r}),BM=xe()({library:"gridlayout",name:"grid_container",title:"Grid Container",takesChildren:!0,UiComponent:FM,settingsInfo:{gap_size:{label:"Width",inputType:"cssMeasure",defaultValue:"10px",units:["px","rem"]},layout:{inputType:"omitted",defaultValue:[". .",". ."]},row_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},col_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]}},iconSrc:TS,category:"Tabs",stateUpdateSubscribers:{UPDATE_NODE:LS,DELETE_NODE:MS},description:"A general container for arranging items using `gridlayout`"}),UM=e=>v(iC,R({},e)),zM=xe()({library:"gridlayout",name:"grid_page",title:"Grid Page",takesChildren:!0,UiComponent:UM,settingsInfo:{gap_size:{label:"Width",inputType:"cssMeasure",defaultValue:"10px",units:["px","rem"]},layout:{inputType:"omitted",defaultValue:[". .",". ."]},row_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},col_sizes:{inputType:"omitted",defaultValue:["1fr","1fr"]},theme:{inputType:"omitted",optional:!0}},stateUpdateSubscribers:{UPDATE_NODE:LS,DELETE_NODE:MS},category:"gridlayout"}),jM=11,WM=VM(oc(jM).map(e=>Math.random())).map(e=>`${Math.round(e*100)}%`);function YM({title:e=v("span",{children:"My Plot"})}){return v("div",{className:"PlotPlaceholder",children:M("div",{className:"plot",children:[v("div",{className:"title",children:e}),v("div",{className:"plot-body",children:WM.map((t,n)=>v("div",{className:"bar",style:{"--value":t}},`${n}-${t}`))})]})})}function VM(e){let i=-1/0,o=1/0;for(let s of e)i=Math.max(i,s),o=Math.min(o,s);const a=i-o;return e.map(s=>((s-o)/a+.1)*.85)}const $M=({uiArguments:{outputId:e,width:t="100%",height:n="400px"},wrapperProps:r})=>v("div",$(R({className:"plotlyPlotlyOutput",style:{height:n,width:t}},r),{children:v(YM,{title:M("span",{className:"title-bar",children:[v(ff,{type:"output",name:e}),v("span",{className:"plotly-name",children:"Plotly"})]})})})),HM=xe()({library:"plotly",name:"plotlyOutput",title:"Plotly Plot",takesChildren:!1,UiComponent:$M,settingsInfo:{outputId:{inputType:"string",label:"Output ID for plot",defaultValue:"plot"},width:{label:"Width",inputType:"cssMeasure",defaultValue:"100%",optional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"400px",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderPlotly({ - plot_ly(z = ~volcano, type = "surface") -})`}},iconSrc:ng,category:"Plotting",description:"Output for interactive `plotly` plots."}),GM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAADKUlEQVR4nO3cMY5VVQDG8Q8QaFyACiWFvVqwiyERjHuQAoohbsAEKLTARRiCYtgGxsR6So0LgAYIeRR3bmKGZ0Hi5zl3+P2S17xM8eXkP/e9meKc2e12gf/a2dEDOJ2ERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUCIsKYVEhLCqERYWwqBAWFcKiQlhUfDB6wD8d/nS07+0LSQ6OX1eTfHL83vvmeZI/k/ye5JckvyZ5efKH7n115X+etd9UYe1xLcm9JHOc1lgfJvn0+PV1kqMkd5L8PHLUv5n1o/BckrtZDk1U+11J8ijLOZ0bvOUtsz6xvktyOHrERqzndGfoihNmfGJ9GVG9q8Ms5zaN2cK6kOT70SM26odM9EfNbGFdT3J59IiNupTkxugRq9nCOhg9YOMORg9YzRbWF6MHbNznowesZgvro9EDNu7j0QNWs4V1cfSAjfPlndNNWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIi4rZwno2esDGvXX7zCizhfX36AEbN835zRbWH6MHbNzT0QNWs4X1ePSAjXs8esBqtrAeZrm1jnf3V5bzm8JsYb1Mcnv0iI26leTF6BGr2cJKlt+6+6NHbMz9TPS0SuYMK0m+TfJg9IiN+DHLeU1l1rBeJ7mZ5Za6vVcpk6Ms94l9k+W8pjLrHaSrR0meZDnAa0k+y3LB2PmRowZ5leUL+m9ZruN+mIn+IXrSmd1uN3oDp9CsH4VsnLCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIiwphUSEsKoRFhbCoEBYVwqJCWFQIi4o3LCE7MROKhbQAAAAASUVORK5CYII=",JM="_container_tyghz_1",QM={container:JM},KM=({uiArguments:e,wrapperProps:t})=>{const{label:n="My Action Button",width:r}=e;return v("div",$(R({className:QM.container},t),{children:v(mt,{style:r?{width:r}:void 0,children:n})}))},qM=xe()({title:"Action Button",library:"shiny",name:"actionButton",takesChildren:!1,UiComponent:KM,iconSrc:GM,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myButton"},label:{inputType:"string",label:"Label",defaultValue:"My Button"},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},category:"Inputs",description:"Creates an action button whose value is initially zero, and increments by one each time it is pressed."}),XM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAEtklEQVR4nO3cP2zcVADH8V8QA2QrEh2RqCxRiY2OYQplpFvikY0qS0YndK9UvMFSyASjCRMIiUopU7tRtiJUWWEHiW6VYDkGP+sOp07Of37yXd73I0XxucmLh6/8bPfubcxmMwFje2XqA8DlRFiwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsHh16gOYSlaUbf90JXz18Tx8nZGnSc8h11O0YTVcl7Qn6QNJ7w4c66mkh5LuS/p94Fhri6lQui3pN0n7Gh6Vwhj7YczbI4y3lmI/Y30s6cvGvtbpbAmL0+hGGPsfSV/3HG9txRzWm6qmq9pjSft5mvw6ZNCsKN+T9IWkrbDrvqQfJf01ZNx1E/NUuCfp9bD9RNL20KgkKYyxLemXsOu18LeiEnNY7y9sf5qnyb9jDRzGutPyt6IQ81S4tbD9eMhAWVEeSDoILz/M0+RJY8yts791ucV8xtqsN/I0edF3kKwov5J0L7yso2qOuXnmFy+5mMMaLJypPgkvd+uoQFi9ZUV5TfMz1WGeJidTHs+qIaz+vg3fj/M0+WzSI1lBhNVDmAJvqHqQejjx4awkwuooTIH1HeBhnianUx7PqiKs7g5U/bfNSZ4mR1MfzKoirA6yoryh+V0gU+A5CKub+i7wiEcL54v5yXurcHF+T9Ud327Yd1PSzfAj3AVegDNWQ1aUVzQ/M+1kRVk/VtgJ34+4YL8YYTXkafJc0u7Crp3GE3Yu2JdAWC+Rp8mx/n9xXp/BTri2Wg5htQhP048bu5uv0SLmsP6uN7KifKPlZw41f5vyaZfnVuFardb3rc5rK+a7wkeSboXtjyR90/yBcJHeFt1Fbi1sP+o5xtqK+Yz1w8L23awo3xpr4DDW3YVd34819rrYmM1mUx/DJMIHVk8lvR12/akqhp8l9X3j36aqzybekXQ17PtD0jU+sBqXPUk/he2rkj43/Y3oxDwVStIDVWeYZ4axn4WxHxjGXnmxn7Gkaup7R9WT9W1Vn6jp+x71F6ou1B9K+m6Uo1tThDV3LJ5TjSb2qRAmhAULwoIFYcGCi/ezLCv6xYawKqzoNzKmQlb0s4j9jMWKfiYxh8WKfkYxT4Ws6GcUc1is6GcU81TIin5GMZ+xWNHPKOawBmNFv3aE1RMr+p2PsPpjRb9zEFYPrOh3McLqiBX9lkNY3bGi3xIIqwNW9FseYXXDin5LivnJeytW9BuOM1YDK/qNg7AaWNFvHIT1EqzoNxxhtWBFv2FiDosV/YxivitkRT+jmM9YrOhnxIp+rOhnEfNUKLGin03MU6HEin42sZ+xJFb0s4j2GgtesU+FMCEsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiwICxaEBQvCggVhwYKwYEFYsCAsWBAWLAgLFoQFC8KCBWHBgrBgQViwICxYEBYsCAsWhAULwoIFYcGCsGBBWLAgLFgQFiz+AwEFRrQUQeonAAAAAElFTkSuQmCC",ZM="_container_162lp_1",eF="_checkbox_162lp_14",Vd={container:ZM,checkbox:eF},tF=({uiArguments:e,wrapperProps:t})=>{const n=e.choices;return M("div",$(R({className:Vd.container,style:{width:e.width}},t),{children:[v("label",{children:e.label}),v("div",{children:Object.keys(n).map((r,i)=>v("div",{className:Vd.radio,children:M("label",{className:Vd.checkbox,children:[v("input",{type:"checkbox",name:n[r],value:n[r],defaultChecked:i===0}),v("span",{children:r})]})},r))})]}))},nF=xe()({library:"shiny",name:"checkboxGroupInput",title:"Checkbox Group",takesChildren:!1,UiComponent:tF,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myCheckboxGroup"},label:{inputType:"string",label:"label",defaultValue:"Checkbox Group"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:XM,category:"Inputs",description:"Create a group of checkboxes that can be used to toggle multiple choices independently. The server will receive the input as a character vector of the selected values."}),rF="data:image/png;base64,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",iF="_container_1x0tz_1",oF="_label_1x0tz_10",Z1={container:iF,label:oF},aF=({uiArguments:e,wrapperProps:t})=>{var a;const n=(a=e.width)!=null?a:"auto",r=R({},e),[i,o]=q.useState(r.value);return q.useEffect(()=>{o(r.value)},[r.value]),v("div",$(R({className:Z1.container+" shiny::checkbox",style:{width:n}},t),{children:M("label",{htmlFor:r.inputId,children:[v("input",{id:r.inputId,type:"checkbox",checked:i,onChange:l=>o(l.target.checked)}),v("span",{className:Z1.label,children:r.label})]})}))},lF=xe()({library:"shiny",name:"checkboxInput",title:"Checkbox Input",takesChildren:!1,UiComponent:aF,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myCheckboxInput"},label:{inputType:"string",label:"label",defaultValue:"Checkbox Input"},value:{inputType:"boolean",label:"Starting value",defaultValue:!1},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:rF,category:"Inputs",description:"Create a checkbox that can be used to specify logical values."}),sF=["shiny::tabPanel"];function oC(e){return sF.includes(e.uiName)}function _g(e){return oC(e)?e.uiArguments.title:null}function aC({uiChildren:e}){let t=[];return e==null||e.forEach(n=>{const r=_g(n);r&&t.push(r)}),t}function lC({uiChildren:e}){var n;const t=e==null?void 0:e[0];return t&&(n=_g(t))!=null?n:"First Tab"}const uF="_container_10z2l_1",cF={container:uF};function sC(r){var i=r,{title:e,children:t}=i,n=ke(i,["title","children"]);return v("div",$(R({className:cF.container,"data-tab-id":e,"aria-label":`tab panel ${e}`},n),{children:t}))}function Og(e){return YE(e)&&"uiName"in e&&typeof e.uiName=="string"&&mC.has(e.uiName)}function fF(e,t){return!e||!t?!1:pa(e,t)}const dF="_container_qbb7e_1",pF="_header_qbb7e_13",hF="_tabContents_qbb7e_21",mF="_pageTitle_qbb7e_26",gF="_tabHolder_qbb7e_39",vF="_tab_qbb7e_21",yF="_newTabDropDetector_qbb7e_99",wF="_addTabButton_qbb7e_104",bF="_tabDropDetector_qbb7e_112",gr={container:dF,header:pF,tabContents:hF,pageTitle:mF,tabHolder:gF,tab:vF,newTabDropDetector:yF,addTabButton:wF,tabDropDetector:bF},EF={uiName:"unknownUiFunction",uiArguments:{text:"Dummy ui node for app previews"}};function SF(e){const t=is(r=>r.app_info);return k.useMemo(()=>Og(t)?Si(t,e):EF,[e,t])}const AF=({name:e,isActive:t,index:n,parentPath:r})=>{const i=or(r,n),o=ss(),a=SF(i),l=zE({node:a,path:i,canDrag:!0}),s=fF(i,o);return v("div",$(R({className:gr.tab,"data-active-tab":t,"data-selected-tab":s},l),{style:{order:n},"aria-label":t?`Active tab ${e}`:`Select ${e} tab`,children:e}))};function CF({uiChildren:e,parentPath:t}){return v(We,{children:e.map((n,r)=>{const i=or(t,r);return v(Ei,{path:i,node:n},uf(i))})})}const xF="_container_fe3r8_1",kF="_emptyTabPanelDropDetector_fe3r8_8",e0={container:xF,emptyTabPanelDropDetector:kF},uC=["shiny::navbarPage","shiny::tabPanel","gridlayout::grid_card","gridlayout::grid_card_plot","gridlayout::grid_card_text"],_F={rejected:uC},OF=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{const i=t&&t.length>0;return v("div",$(R({className:e0.container},r),{children:i?v(CF,{uiChildren:t,parentPath:n}):v(Wi,{className:e0.emptyTabPanelDropDetector,index:0,parentPath:n,dropFilters:_F,parentNodeType:"shiny::tabPanel"})}))},TF={rejected:uC.filter(e=>e!=="shiny::tabPanel")},IF=({uiName:e})=>e!=="shiny::tabPanel"?{uiName:"shiny::tabPanel",uiArguments:{title:"Tab Panel"}}:null;function t0({index:e,parentPath:t,children:n,baseWidth:r}){return v(Wi,{className:gr.tabDropDetector,"aria-label":"tab drop detector",parentPath:t,parentNodeType:"shiny::tabPanel",index:e,dropFilters:TF,wrappingNode:IF,style:{"--baseWidth":r,order:e-1},children:n})}function PF(e,t=0){const[n,r]=k.useState(t);return k.useEffect(()=>{e<=n&&r(e-1)},[n,e]),{activeTab:n,setActiveTab:o=>{r(o)}}}function cC(o){var a=o,{path:e,title:t,children:n,className:r=""}=a,i=ke(a,["path","title","children","className"]);const l=RF(n),s=l.length,u=ss(),{activeTab:c,setActiveTab:f}=PF(l.length),d=Km();return k.useEffect(()=>{const p=or(e,c);if(!u)return;ji(u)>=ji(p)&&f(u[ji(p)-1])},[c,e,u,f]),M("div",$(R({className:Xe(r,gr.container)},i),{children:[M("div",{className:gr.header,children:[v("h1",{className:gr.pageTitle,children:t}),M("div",{className:gr.tabHolder,"aria-label":"tabs container",children:[l.map((p,h)=>v(AF,{name:p,parentPath:e,isActive:h===c,index:h},p+h)),oc(s).map(p=>v(t0,{parentPath:e,index:p,baseWidth:"10px"},p)),v(t0,{parentPath:e,index:s,baseWidth:"25px",children:v(MF,{className:gr.addTabButton,label:"Add new tab",onClick:p=>{p.stopPropagation(),d({path:or(e,s),node:NF})}})})]})]}),v("div",{className:gr.tabContents,children:DF(n,c)})]}))}const NF={uiName:"shiny::tabPanel",uiArguments:{title:"Empty Tab"},uiChildren:[]};function RF(e){let t=[];return k.Children.forEach(e,n=>{if(!k.isValidElement(n))return null;const r=n.props.title;typeof r=="string"&&t.push(r)}),t}function DF(e,t){return k.Children.map(e,(n,r)=>k.isValidElement(n)&&typeof n.props.title=="string"?v("div",{className:gr.tabContents,"data-active-tab":r===t,children:n}):n)}const LF={display:"block"};function MF({label:e,onClick:t,className:n}){return v(LA,{className:n,placement:"bottom","aria-label":e,popoverContent:e,onClick:t,openDelayMs:0,children:v(og,{style:LF})})}const FF="_noTabsMessage_130qz_1",fC={noTabsMessage:FF},BF=({uiArguments:{title:e},uiChildren:t,path:n,wrapperProps:r})=>{var a;const o=((a=t==null?void 0:t.length)!=null?a:0)>0;return v(cC,$(R({path:n,title:e,className:fC.container},r),{children:t?t.map((l,s)=>{const u=or(n,s),c=oC(l)?l.uiArguments.title:"unknown tab";return v(sC,{title:c,children:v(Ei,{path:u,node:l})},uf(u))}):v(UF,{hasChildren:o})}))};function UF({hasChildren:e}){return e?null:v("div",{className:fC.noTabsMessage,children:v("span",{children:"Empty page. Drag elements or Tab Panel on to add content"})})}const zF=xe()({library:"shiny",name:"navbarPage",title:"Navbar Page",takesChildren:!0,UiComponent:BF,settingsInfo:{title:{inputType:"string",label:"Page title",defaultValue:"navbar-page"},collapsible:{label:"Collapse navigation on mobile",inputType:"boolean",defaultValue:!1},id:{inputType:"string",label:"Id for tabset",defaultValue:"tabset-default-id",optional:!0},selected:{inputType:"dropdown",optional:!0,label:"Selected tab on load",defaultValue:e=>e?lC(e):"First Tab",choices:e=>e?aC(e):["First Tab"]},theme:{inputType:"omitted",optional:!0}},category:"layouts",description:"Layout an app with tab-based navigation"}),jF="data:image/png;base64,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";function dC({label:e,children:t}){return M("div",{className:"LabeledInputCategory",children:[v("div",{className:"divider-line",children:v("label",{children:e})}),v("section",{className:"grouped-inputs",children:t}),v("div",{className:"divider-line"})]})}const WF="_container_yicbr_1",YF={container:WF},VF=({uiArguments:e,wrapperProps:t})=>{var a;const n=R({},e),r=(a=n.width)!=null?a:"200px",[i,o]=q.useState(n.value);return q.useEffect(()=>{o(n.value)},[n.value]),M("div",$(R({className:Xe(YF.container,"shiny::numericInput"),style:{width:r}},t),{children:[v("span",{children:n.label}),v(Of,{type:"number",value:i,onChange:o,min:n.min,max:n.max,step:n.step})]}))},$F=xe()({library:"shiny",name:"numericInput",title:"Numeric Input",takesChildren:!1,UiComponent:VF,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myNumericInput"},label:{inputType:"string",label:"label",defaultValue:"Numeric Input"},min:{label:"Min",inputType:"number",defaultValue:0,optional:!0},max:{label:"Max",inputType:"number",defaultValue:10,optional:!0},value:{label:"Start value",inputType:"number",defaultValue:5},step:{inputType:"number",label:"Step size",defaultValue:1,optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},settingsFormRender:({inputs:e})=>M(We,{children:[e.inputId,e.label,M(dC,{label:"Values",children:[e.min,e.max,e.value,e.step]}),e.width]}),serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:jF,category:"Inputs",description:"An input control for entry of numeric values"}),HF=({uiArguments:{outputId:e,width:t,height:n="400px"},wrapperProps:r})=>v("div",$(R({className:nh.container,style:{height:n,width:t}},r),{children:v(CS,{outputId:e})})),GF=xe()({library:"shiny",name:"plotOutput",title:"Plot Output",takesChildren:!1,UiComponent:HF,settingsInfo:{outputId:{inputType:"string",label:"Output ID for plot",defaultValue:"plot"},width:{label:"Width",inputType:"cssMeasure",defaultValue:"100%",optional:!0},height:{label:"Height",inputType:"cssMeasure",defaultValue:"400px",optional:!0}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderPlot({ - #Plot code goes here - $0plot(rnorm(100)) -})`}},iconSrc:ng,category:"Outputs",description:"Render a `renderPlot()` within an application page."}),JF="data:image/png;base64,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",QF="_container_sgn7c_1",n0={container:QF},KF=({uiArguments:e,wrapperProps:t})=>{const n=e.choices,r=Object.keys(n),i=Object.values(n),[o,a]=k.useState(i[0]);return k.useEffect(()=>{i.includes(o)||a(i[0])},[o,i]),M("div",$(R({className:n0.container,style:{width:e.width}},t),{children:[v("label",{children:e.label}),v("div",{children:i.map((l,s)=>v("div",{className:n0.radio,children:M("label",{children:[v("input",{type:"radio",name:e.inputId,value:l,onChange:u=>a(u.target.value),checked:l===o}),v("span",{children:r[s]})]})},l))})]}))},qF=xe()({library:"shiny",name:"radioButtons",title:"Radio Buttons",takesChildren:!1,UiComponent:KF,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myRadioButtons"},label:{inputType:"string",label:"label",defaultValue:"Radio Buttons"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:JF,category:"Inputs",description:"Create a set of radio buttons used to select an item from a list."}),XF="data:image/png;base64,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",ZF="_container_1e5dd_1",e8={container:ZF},t8=({uiArguments:e,wrapperProps:t})=>{const n=e.choices,r=e.inputId;return M("div",$(R({className:e8.container},t),{children:[v("label",{htmlFor:r,children:e.label}),v("select",{id:r,children:Object.keys(n).map((i,o)=>v("option",{value:n[i],children:i},i))})]}))},n8=xe()({library:"shiny",name:"selectInput",title:"Select Input",takesChildren:!1,UiComponent:t8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"mySelectInput"},label:{inputType:"string",label:"label",defaultValue:"Select Input"},choices:{label:"Choices",inputType:"list",defaultValue:{"choice a":"a","choice b":"b"}}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:XF,category:"Inputs",description:"Create a select list that can be used to choose a single or multiple items from a list of values."}),r8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAES0lEQVR4nO3aP4gcZRyH8eckosWRQ4uAhaYJmCqNJmIpaGWiVl5voykV3QSSwuIscioqCNHu2rWSqIUIsdMiRkEbi2v8A4FYJUfAf7AW72xy6no32Zvvju/u84FhE5J597e5h93Mu7M0Go2QunZH3wNoPhmWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSliX98DJA2Gm7v9lbuAx4BngEeBg8AKcA34AfgS+BD4HPhtt8XWVw9NPeu8meuwdrAPeA54Fbhvwp+vAEea43ngKnAOeBf4fTYj1m0RPwofBC4D7zM5qkkOAG8Cl4DDobnmyqKFdRT4gvJONI0jzfmPdDbRnFqksA4DnwH37nGde4BP8Z1rR4sS1p3AkPJ/py6sAB8062qCpdFo1PcMrbS4wtvJy8DrHY2y3SvAG4F1/6W2K84a37FOABeBLWDU8khERbNu2xmmPbaAi4Ph5vHQa4ioLaw14AJl72m551lmZZnyej8aDDfX+h6mrZrCOg6caX59CtgPLLU4NsJzbbScY9pjP3C6ea4zg+HmifDr6URNYb3UPJ4G1ikfEW08lBnnpofD629RNmdPNb9/Mfx8nagprPEP8PxtnvdA14P8w/3h9cfeax7TIXeiprCm1dUWQ1/rj40v35dm9Hx7UlNYXzWPL9zmede7HmTG64+dbB4vzej59qSmsN5qHs9R9o/aXhX+lBnnpp/D6y8DA8rrhlv/Dv9rtW2QrnHrynARvba+euhs30O0UdM7FsBZ4GnK/VE3ep5lVm5QXu9TtUQFdd6PdaE52rqbctPegcAsv1CuOn8NrP03tX2lU81H4TS2fb+Y+q5wsH3d2n74SbV9FE7rHeDbjtf8Dni74zXnxqKE9QewSrmXvQvXgGebdTXBooQF8D3wOOX+9b24CjzRrKf/sEhhQdlkPQp8PeX53wDHqGSTsk+LFhbAj5R71k8CV1qec4Wy43+McoWpXdS43dCFPylf6m5Qbsd5knIXxEHKbSrXKQFdBj4BPmYGWwrzZK63G9SfRfwo1AwYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNSxF+9/aKLFqf7gQAAAABJRU5ErkJggg==",i8="_container_1f2js_1",o8="_sliderWrapper_1f2js_11",a8="_sliderInput_1f2js_16",$d={container:i8,sliderWrapper:o8,sliderInput:a8},l8=({uiArguments:e,wrapperProps:t})=>{const n=R({},e),{width:r="200px"}=n,[i,o]=q.useState(n.value);return M("div",$(R({className:Xe($d.container,"shiny::sliderInput"),style:{width:r}},t),{children:[v("div",{children:n.label}),v("div",{className:$d.sliderWrapper,children:v("input",{type:"range",min:n.min,max:n.max,value:i,onChange:a=>o(Number(a.target.value)),className:"slider "+$d.sliderInput,"aria-label":"slider input","data-min":n.min,"data-max":n.max,draggable:!0,onDragStartCapture:a=>{a.stopPropagation(),a.preventDefault()}})}),M("div",{children:[v(ff,{type:"input",name:n.inputId})," = ",i]})]}))},s8=xe()({library:"shiny",name:"sliderInput",title:"Slider Input",takesChildren:!1,UiComponent:l8,settingsInfo:{inputId:{label:"Input ID",inputType:"string",defaultValue:"inputId"},label:{label:"Label text",inputType:"string",defaultValue:"Slider Input"},min:{label:"Min",inputType:"number",defaultValue:0},max:{label:"Max",inputType:"number",defaultValue:10},value:{label:"Start",inputType:"number",defaultValue:5},step:{inputType:"number",label:"Step size",defaultValue:1,optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0,useDefaultIfOptional:!0}},settingsFormRender:({inputs:e})=>M(We,{children:[e.inputId,e.label,M(dC,{label:"Values",children:[e.min,e.max,e.value,e.step]}),e.width]}),serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:r8,category:"Inputs",description:"Constructs a slider widget to select a number from a range. _(Dates and date-times not currently supported.)_"}),u8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAADSklEQVR4nO3cv0vUYQDH8c/pmWfpmV1G0uAPjAqiyYqWoK1oDKq5PdqE9qaG/ozAKWjpL4jWoKayrcWtIgqiuAYd9LQo8u3zfO39ghvux/C54y3PV9Br9fv9SLttqPQA7U+GJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlRLv0gF9ZXlkdfGg6yf0k15PMJhnd6007+JrkXZInSR4l+bD5yYe3FgtMqkO1YQ1YSvIsydHSQwaMJTm7cbuT5FqSV0UXVaIJR2EvydPUF9WgE1nfOVl6SA2aENa9JDOlR/yhuSR3S4+oQROOwhs7PTjb6+TS4mTmp8cy0RlOe7iFD/n+o5+PX7/n7dqXPH/zMWufvu30sttJHuBjKteEsLZdAV85M5Vr53p7PqQ93EpvfCS98ckszXfz+MVaXr//PPiy//eKfZMmHIUHNt+ZO9rJ1QJRDWoPtXLzwrF0x7b9bNbw22pxTQhri/ML3fCH3p/pjAzl4kK39IwqNS6s2V6n9IQtTh4/WHpClRoX1pHxkdITtpieqGtPLRoXVnuoloNw3ehI4z7CPeGn8o9qC70WhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCVHFP6zu8M0y+0Lp91Xy226qCCtJv/SAXVbL+yn2B/kehUIYlhCGJUQt11i/uxaYunzqcPf0zKGFjfuf9mLQ39i4SP6xvLL6svCUarT6/VquM7WfeBQKYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQhiWEIYlhGEJYVhCGJYQhiWEYQlhWEIYlhCGJYRhCWFYQvwEAzs9K42yqRkAAAAASUVORK5CYII=",c8=xe()({library:"shiny",name:"tabPanel",title:"Tab Panel",takesChildren:!0,UiComponent:OF,settingsInfo:{title:{label:"Title of panel",inputType:"string",defaultValue:"My Shiny App"}},iconSrc:u8,category:"Tabs",description:"Panel containing content for tab-based interfaces like navbar pages"}),pC="data:image/png;base64,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",f8=({uiArguments:e,uiChildren:t,path:n,wrapperProps:r})=>{var o;const i=(o=t==null?void 0:t.length)!=null?o:0;return v(cC,$(R({path:n},r),{children:i>0?t==null?void 0:t.map((a,l)=>{var c;const s=or(n,l),u=(c=_g(a))!=null?c:"unknown tab";return v(sC,{title:u,children:v(Ei,{path:s,node:a})},uf(s))}):v("div",{style:{padding:"5px"},children:v("span",{children:"Empty tabset. Drag elements or Tab Panel on to add content"})})}))},d8=xe()({library:"shiny",name:"tabsetPanel",title:"Tabset Panel",takesChildren:!0,UiComponent:f8,settingsInfo:{id:{inputType:"string",label:"Id for tabset",defaultValue:"tabset-default-id",optional:!0},selected:{inputType:"dropdown",optional:!0,label:"Selected tab on load",defaultValue:e=>e?lC(e):"First Tab",choices:e=>e?aC(e):["First Tab"]}},iconSrc:pC,category:"Tabs",description:"A container filled with tabs"}),p8="data:image/png;base64,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",h8="_container_yicbr_1",m8={container:h8},g8=r=>{var i=r,{uiArguments:o}=i,a=o,{width:e="200px"}=a,t=ke(a,["width"]),{wrapperProps:n}=i;const l="auto",s=R({},t),[u,c]=q.useState(s.value);return q.useEffect(()=>{c(s.value)},[s.value]),M("div",$(R({className:Xe(m8.container,"shiny::textInput"),style:{height:l,width:e}},n),{children:[v("label",{htmlFor:s.inputId,children:s.label}),v("input",{id:s.inputId,type:"text",value:u,onChange:f=>c(f.target.value),placeholder:s.placeholder})]}))},v8=xe()({library:"shiny",name:"textInput",title:"Text Input",takesChildren:!1,UiComponent:g8,settingsInfo:{inputId:{inputType:"string",label:"inputId",defaultValue:"myTextInput"},label:{inputType:"string",label:"label",defaultValue:"Text Input"},value:{inputType:"string",label:"Starting text",defaultValue:""},placeholder:{inputType:"string",label:"Empty input placeholder",defaultValue:"placeholder text",optional:!0},width:{inputType:"cssMeasure",label:"Width",defaultValue:"100%",units:["%","px","rem"],optional:!0}},serverBindings:{inputs:{inputIdKey:"inputId"}},iconSrc:p8,category:"Inputs",description:"Create an input control for entry of unstructured text values."}),y8="data:image/png;base64,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",w8="_container_1i6yi_1",b8={container:w8},E8=({uiArguments:e,wrapperProps:t})=>M("div",$(R({className:b8.container},t),{children:["Dynamic text from ",M("code",{children:["output$",e.outputId]})]})),S8=xe()({library:"shiny",name:"textOutput",title:"Text Output",takesChildren:!1,UiComponent:E8,settingsInfo:{outputId:{label:"Output ID",inputType:"string",defaultValue:"textOutput"}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderText({ - "Hello, World" -})`}},iconSrc:y8,category:"Outputs",description:` - Render a reactive output variable as text within an application page. - Usually paired with \`renderText()\`. - `}),A8="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABYlAAAWJQFJUiTwAAAFGElEQVR4nO3cW4iUZRzH8e9o2ZGkpKOUFylBURCUnQuLki4qtBPd1E0lkVERGh1vogIvKugiwou6S8sIKoQwKwmjugnEICLIIMospL3oIFHTxTNLtuge9P3NM/PO9wPLLLPv7P5398v7vjP7vNvpdrtITZtVewC1k2EpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDqk9QFNWr/9m/N0LgXuAi4D5wJG1ZprCHmAn8BmwFngfYM2tC2vO1Ji27bEeBrYCtwOLGNyoAA4DFgC3AJuANXXHaVabwroCeJbyPf0A3A2cStkrdwbsbRZwEnAb8HVv/lXA1c3+SOppU1j3UX5p3wLnUg4v3wN/1xxqP7rAT8A6YDHwVe/+FdUmalibwrqkd/sksKvmIDM0BjzRe//imoM0qU1hndi73VR1igOzpXc7r+oUDWrNs0LKYRDKIaa2DnA9cB0llh3AeuDT/Wz/c+92TnyyPmlTWINiHvAWcNmE+x8AXgbuZTDP+xrVpkPhIOhQ9kwToxq3Aniqf+PUY1jNuha4aoptHgJO6cMsVRlWs5ZOY5s5wJXpQWozrGYd1/B2Q8uwmvXdNLfbkRxiEBhWs9YB/0yxzS5gcx9mqcqwmrUdeH6Sj3eBlcBv/RmnHsNq3irgceCPCff/CNwMvNH3iSrwBdLmdYGngZeAJZQT9R3Ax8Cf9cbqL8PK2Q28WXuIWgyrOJnyqvj5wF/AB5RlNxMPZ5omw4LlwCvAMXvddwPlJHsZ8GWNoYbdqJ+8Pwhs4P9RjVtEOS+6vK8TtcSohtUBnuu9dSbZ7ljgPeDGfgzVJqMY1hzgNcreajoOp6xYWBmbqIVG7RxrLmWt1JIZPm428CJlVcJjlJcUJjMLuImy0uF3Ssifz/BrDrVRCms+sBE45yA+xyOUuO6iPHvcl+MpLzPsvSbrfsrlXY8y9Z98WmFUDoVnAp9wcFGNuwN4Bzh6Hx9bQDnhn7jQr0O55nEDcEQDMwy8UQjrUsov+7QGP+dS4EP+u4ADSrxbgTMmedwy4CPKNYWt1vawllOu2kmsfzqPEtJC4AJKvPOn8bjFlIsqzgrMNDDaHNZK4HXKs7qU0ylxbWZm8S7oPe6axFCDoI1hdYBnKM/iZvfh650AHHUAj5sLvAvc2ew4g6GNzwpfpfxTkGFwKOVvkotqD9K0Nu6xhiWqva2uPUDT2hjWMGvNa1xtCmus9gAN+LX2AE1pU1jbag/QgO21B2hKm8J6u/YADdhYe4CmtCmstUz/ur5B9Avle2iFNoU1RvmTyc7agxyAMcpqiN21B2lKm8IC+AI4m3KVzDYGe836Hsr/H32BMvOWSbceMp1ud6qlRdLMtW2PpQFhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUoRhKcKwFGFYijAsRRiWIgxLEYalCMNShGEpwrAUYViKMCxFGJYiDEsRhqUIw1KEYSnCsBRhWIowLEUYliIMSxGGpQjDUsS/YEGHz1NNdrMAAAAASUVORK5CYII=",C8="_container_1xnzo_1",x8={container:C8},k8=({uiArguments:e,wrapperProps:t})=>{const{outputId:n="shiny-ui-output"}=e;return v("div",$(R({className:x8.container},t),{children:M("div",{style:{gridArea:"1/1",placeSelf:"center"},children:["This is a a dynamic UI Output ",n,"!"]})}))},_8=xe()({library:"shiny",name:"uiOutput",title:"Dynamic UI Output",takesChildren:!1,UiComponent:k8,settingsInfo:{outputId:{label:"Output ID",inputType:"string",defaultValue:"dynamicUiOutput"}},serverBindings:{outputs:{outputIdKey:"outputId",renderScaffold:`renderUI({ - h1("Hello, World") -})`}},iconSrc:A8,category:"Outputs",description:` - Render a reactive output variable as HTML within an application page. - The text will be included within an HTML \`div\` tag, and is presumed to - contain HTML content which should not be escaped. - `}),O8="_wrapper_bjscz_1",T8={wrapper:O8},I8=({uiArguments:{contents:e,decoration:t,size:n="default"},wrapperProps:r})=>{const i=ZE[n];return v(i,$(R({className:T8.wrapper},r),{"data-decoration":t,children:e}))};function P8(e){return"contents"in e.uiArguments&&e.uiName==="textNode"}const N8=xe()({name:"textNode",title:"Static Text",category:"Utilities",description:"Add static text to your ui for things like descriptions and headers.",takesChildren:!1,UiComponent:I8,settingsInfo:{contents:{label:"Text contents",inputType:"string",defaultValue:"Lorem Ipsum",longform:!0},decoration:{label:"Decoration",optional:!0,inputType:"radio",defaultValue:"default",choices:{default:{label:"Normal"},italic:{label:"Italic"},bold:{label:"Bold"}},optionsPerColumn:2},size:{label:"Font size",inputType:"radio",optional:!0,defaultValue:"default",choices:{default:{label:"Normal"},small:{label:"Small"},headline:{label:"Headline"},subtitle:{label:"Subtitle"}},optionsPerColumn:2}},iconSrc:kS});function R8(e){return It({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attr:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"}}]})(e)}function D8(e){return It({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M881.7 187.4l-45.1-45.1a8.03 8.03 0 0 0-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L447.9 585a7.9 7.9 0 0 0-8.9-8.9z"}}]})(e)}const L8="_categoryDivider_bdwku_1",M8={categoryDivider:L8};function F8({children:e}){return v("div",{className:M8.categoryDivider,children:e})}function B8(e){return e.replaceAll(/\(/g,`( - `).replaceAll(/\)/g,` -)`).replaceAll(/\(\s+\)/g,"()").replaceAll(/,/g,`, - `).replaceAll(/(\s+)$/g,"")}const U8=20,z8=({uiArguments:e,wrapperProps:t})=>{const n=e.text.slice(0,U8).replaceAll(/\s$/g,"")+"...";return v("div",$(R({className:"unknown-ui-function-display"},t),{children:M("div",{children:["unknown ui output: ",v("code",{children:n})]})}))};function hC(e){return"text"in e.uiArguments&&e.uiName==="unknownUiFunction"}const j8=xe()({name:"unknownUiFunction",title:"Unknown UI Function",takesChildren:!1,UiComponent:z8,settingsInfo:{text:{inputType:"omitted",defaultValue:"Unknown Ui Function"},explanation:{inputType:"omitted",optional:!0}},settingsFormRender:({settings:e})=>M("div",{className:"unknown-ui-function-settings",children:[v("div",{className:"SUE-SettingsInput",children:M("span",{className:"info-msg",children:[v(R8,{}),"Unknown function call. Can't modify with visual editor."]})}),v(F8,{children:v("span",{children:"Code"})}),v("div",{className:"SUE-SettingsInput",children:v("pre",{className:"code-holder",children:B8(e.text)})})]})}),ra=[qM,$F,s8,v8,lF,nF,n8,qF,GF,S8,_8,zF,c8,d8,zM,VI,b4,t4,BM,DI,EI,CI,OI,kI,HM,N8,j8],r0=new Map(ra.map(e=>[e.uiName,e])),W8=new Set(ra.filter(e=>e.takesChildren).map(e=>e.uiName));function ro(e){if(!r0.has(e))throw new Error(`Failed to find node info for requested node: ${e}`);return r0.get(e)}const mC=new Set(ra.map(({uiName:e})=>e)),Y8=new Map([...ra.map(({name:e,uiName:t})=>[e,t]),...ra.map(({uiName:e})=>[e,e])]);function io(e){return"uiChildren"in e||W8.has(e.uiName)}function V8(e){let t=e.uiArguments.size;const{contents:n,decoration:r}=e.uiArguments,i=`"${n}"`,o=r?XE[r]:"",a=o?`${o}(${i})`:i;return t?`${ZE[t]}(${a})`:a}function gC(e,t){const{ui_code:n,removed_namespaces:r}=vC(e,t);return{ui_code:n,library_calls:Array.from(r)}}function vC(e,t){var u,c;const{uiName:n,uiArguments:r}=e,i=new Set;if(hC(e))return{ui_code:yC(e),removed_namespaces:i};if(P8(e))return{ui_code:V8(e),removed_namespaces:i};let o=n;if(t.remove_namespace){const f=(u=o.match(/\w+(?=::)/))==null?void 0:u[0];f&&i.add(f),o=o.replace(/\w+::/,"")}const a=Object.entries(r).map(([f,d])=>$l(`${f} = ${Q8(d)}`));io(e)&&((c=e.uiChildren)==null||c.forEach(f=>{const d=vC(f,t);d.removed_namespaces.forEach(p=>i.add(p)),a.push($l(d.ui_code))}));const l=qE({fn_name:n,fn_args_list:a,max_line_length_for_multi_args:Hm}),s=`,${l?mi:" "}`;return{removed_namespaces:i,ui_code:`${o}(${l?mi:""}${a.join(s)}${l?` -`:""})`}}function yC({uiArguments:e}){return e.text}function $8(e){return!(typeof e!="object"||Object.values(e).find(n=>typeof n!="string"))}function H8(e){const t=Object.keys(e).map(o=>`"${o}" = "${e[o]}"`),r=t.reduce((o,a)=>o+a.length,0)+6>Hm,i=r?`,${mi}`:", ";return`list(${r?mi:""}${t.join(i)}${r?` -`:""})`}function G8(e){const t=e.map(J8);return`c(${mi}${t.join(`,${mi}`)} -)`}function J8(e){switch(typeof e){case"string":return`"${e}"`;default:return String(e)}}function Q8(e){return Array.isArray(e)?G8(e):$8(e)?H8(e):typeof e=="boolean"?e?"TRUE":"FALSE":Og(e)&&hC(e)?yC(e):JSON.stringify(e)}function i0({ui_tree:e,libraries:t,code:n}){const{ui_code:r,library_calls:i}=gC(e,{remove_namespace:!0}),o=[...t];return i.forEach(a=>{t.includes(a)||o.push(a)}),n.replace(ir.ui,r).replace(ir.libraries,wC(o))}function wC(e){return e.map(t=>`library(${t})`).join(` -`)}function Tg(e,{include_info:t}){const{app_type:n,ui_tree:r}=e;switch(n){case"SINGLE-FILE":return R({app_type:n,app:i0(R({ui_tree:r},e.app))},t&&{info:e});case"MULTI-FILE":return R({app_type:n,ui:i0(R({ui_tree:r},e.ui)),server:e.server.code},t&&{info:e})}}function bC(e){const t=Nr();return q.useCallback(()=>{e!==null&&t(dS({path:e}))},[t,e])}class K8{constructor({comparisonFn:t}){this.stack=[],this.stepsBack=0,this.lastRequested=null,this.isSameFn=t}isEntryFromHistory(t){return this.lastRequested?this.isSameFn(t,this.lastRequested):!1}lastEntry(){return this.stack[this.stack.length-1]}isDuplicateOfLastEntry(t){return this.isSameFn(t,this.lastEntry())}startNewHistoryBranch(){this.stack=this.stack.slice(0,-this.stepsBack),this.stepsBack=0}addEntry(t){this.isEntryFromHistory(t)||this.isDuplicateOfLastEntry(t)||(this.stepsBack>0&&this.startNewHistoryBranch(),this.stack=[...this.stack,t])}canGoBackwards(){return this.stack.length===1?!1:this.stack.length-this.stepsBack>1}canGoForwards(){return this.stepsBack>0}getEntryFromHistory(t){this.stepsBack-=t;const n=this.stack.length,r=n-this.stepsBack-1;if(r<0)throw new Error("Requested history entry too far backwards.");if(r>n)throw new Error(`Not enough entries in history to go ${t} steps forward`);return this.lastRequested=this.stack[r],this.lastRequested}goBackwards(){if(!this.canGoBackwards())throw new Error("Can't go backwards. At first entry in history");return this.getEntryFromHistory(-1)}goForwards(){if(!this.canGoForwards())throw new Error("Can't go forwards. At latest entry in history");return this.getEntryFromHistory(1)}}function q8(e){const t=Nr(),[n,r]=k.useState(!1),[i,o]=k.useState(!1),a=k.useRef(new K8({comparisonFn:X8}));k.useEffect(()=>{if(!e||e.mode==="LOADING")return;const c=a.current;c.addEntry(e),o(c.canGoBackwards()),r(c.canGoForwards())},[e]);const l=k.useCallback(c=>{t(pS({state:c}))},[t]),s=k.useCallback(()=>{try{l(a.current.goBackwards())}catch(c){}},[l]),u=k.useCallback(()=>{try{l(a.current.goForwards())}catch(c){}},[l]);return{goBackward:s,goForward:u,canGoBackward:i,canGoForward:n}}function X8(e,t){return typeof t=="undefined"?!1:t.mode==="LOADING"&&e.mode==="LOADING"?!0:t.mode==="TEMPLATE_CHOOSER"&&e.mode==="TEMPLATE_CHOOSER"?JSON.stringify(t.options)===JSON.stringify(e.options):e.mode==="MAIN"&&t.mode==="MAIN"?t.ui_tree===e.ui_tree:!1}function EC(){return/mac/i.test(window.navigator.platform)}function Z8(e){const t=q.useCallback(n=>{!(n.target instanceof Element)||n.target.tagName!=="BODY"||(e.filter(r=>e7(n,r)).forEach(({onPress:r})=>r()),n.defaultPrevented||n.stopPropagation())},[e]);q.useEffect(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}),[t])}function e7(e,t){return e.key===t.key&&t.withCmdCtrl===(EC()?e.metaKey:e.ctrlKey)&&t.withShift===e.shiftKey}function t7(){const{sendMsg:e,incomingMsgs:t}=rs(),n=hS(),r=ss(),i=Nr(),o=q8(n),a=bC(r);Z8([{key:"z",withCmdCtrl:!0,withShift:!1,onPress:o.goBackward},{key:"z",withCmdCtrl:!0,withShift:!0,onPress:o.goForward},{key:"Backspace",onPress:a,withCmdCtrl:!1,withShift:!1}]),q.useEffect(()=>{const s=t.subscribe("APP-INFO",f=>{i(iI(f))}),u=t.subscribe("TEMPLATE_CHOOSER",f=>{i(aI({outputChoices:f}))}),c=t.subscribe("BACKEND-ERROR",f=>i(oI(f)));return e({path:"READY-FOR-STATE"}),()=>{s.unsubscribe(),u.unsubscribe(),c.unsubscribe()}},[t,i,e]);const l=q.useMemo(()=>tE(e,500,!0),[e]);return q.useEffect(()=>{if(!(n.mode==="LOADING"||n.mode==="ERROR")){if(n.mode==="TEMPLATE_CHOOSER"){e({path:"ENTERED-TEMPLATE-SELECTOR"});return}l({path:"UPDATED-APP",payload:Tg(n,{include_info:!1})})}},[n,l,e]),{state:n,history:o}}const n7="_EditorContainer_15ask_1",r7="_message_for_user_15ask_10",i7="_message_container_15ask_16",o7="_error_msg_15ask_35",a7="_shiny_logo_15ask_40",l7="_app_title_15ask_49",s7="_divider_15ask_54",u7="_header_15ask_60",c7="_OpenSideBySideWindowButton_15ask_68",f7="_right_15ask_93",d7="_spacer_15ask_105",p7="_last_15ask_109",Dn={EditorContainer:n7,message_for_user:r7,message_container:i7,error_msg:o7,shiny_logo:a7,app_title:l7,divider:s7,header:u7,OpenSideBySideWindowButton:c7,"react-joyride":"_react-joyride_15ask_85","undo-redo-buttons":"_undo-redo-buttons_15ask_89",right:f7,spacer:d7,last:p7};function SC(e){return It({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z"}}]})(e)}const h7="_appViewerHolder_zkojo_1",m7="_title_zkojo_55",g7="_appContainer_zkojo_89",v7="_previewFrame_zkojo_109",y7="_expandButton_zkojo_134",w7="_reloadButtonContainer_zkojo_135",b7="_reloadButton_zkojo_135",E7="_spin_zkojo_174",S7="_restartButton_zkojo_211",A7="_loadingMessage_zkojo_238",C7="_error_zkojo_249",Gt={appViewerHolder:h7,title:m7,appContainer:g7,previewFrame:v7,expandButton:y7,reloadButtonContainer:w7,reloadButton:b7,spin:E7,restartButton:S7,loadingMessage:A7,error:C7};function x7(e){return It({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"}}]})(e)}function k7(e){return It({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z"}}]})(e)}function _7(e){return It({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"circle",attr:{cx:"8",cy:"8",r:"8"}}]})(e)}function O7(e){return It({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",stroke:"#000",strokeWidth:"2",d:"M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M5,5 L19,19"}}]})(e)}const T7="_logs_xjp5l_2",I7="_logsContents_xjp5l_25",P7="_expandTab_xjp5l_29",N7="_clearLogsButton_xjp5l_69",R7="_logLine_xjp5l_75",D7="_noLogsMsg_xjp5l_81",L7="_expandedLogs_xjp5l_93",M7="_expandLogsButton_xjp5l_101",F7="_unseenLogsNotification_xjp5l_108",B7="_slidein_xjp5l_1",Ti={logs:T7,logsContents:I7,expandTab:P7,clearLogsButton:N7,logLine:R7,noLogsMsg:D7,expandedLogs:L7,expandLogsButton:M7,unseenLogsNotification:F7,slidein:B7};function U7({appLogs:e,clearLogs:t}){const{logsExpanded:n,toggleLogExpansion:r,unseenLogs:i}=z7(e),o=e.length===0;return M("div",{className:Ti.logs,"data-expanded":n,children:[M("button",{className:Ti.expandTab,title:n?"hide logs":"show logs",onClick:r,children:[v(_7,{className:Ti.unseenLogsNotification,"data-show":i}),"App Logs",n?v(x7,{}):v(k7,{})]}),M("div",{className:Ti.logsContents,children:[o?v("p",{className:Ti.noLogsMsg,children:"No recent logs"}):e.map((a,l)=>v("p",{className:Ti.logLine,children:a},l)),o?null:v(mt,{variant:"icon",title:"clear logs",className:Ti.clearLogsButton,onClick:t,children:v(O7,{})})]})]})}function z7(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),[o,a]=k.useState(null),[l,s]=k.useState(new Date),u=k.useCallback(()=>{if(t){n(!1),a(new Date);return}n(!0),i(!1)},[t]);return k.useEffect(()=>{s(new Date)},[e]),k.useEffect(()=>{if(t||e.length===0){i(!1);return}if(o===null||o{if(!o.current||typeof t=="undefined")return;const a=o.current;function l(s){s.target===a&&(t==null||t())}a.addEventListener("click",l);try{a.showModal()}catch(s){}return()=>{a.removeEventListener("click",l)}},[t]),v("dialog",$(R({},n),{ref:o,onClose:t,children:e}))}const W7="_show_btn_83j0t_1",Y7="_modal_83j0t_5",V7="_title_83j0t_18",$7="_description_83j0t_22",H7="_code_holder_83j0t_26",G7="_footer_83j0t_43",Gn={show_btn:W7,modal:Y7,title:V7,description:$7,code_holder:H7,footer:G7};function J7({info:e}){const t=Tg(e,{include_info:!1});return t.app_type==="SINGLE-FILE"?M(We,{children:[v("h2",{className:Gn.title,children:"App script"}),M("p",{className:Gn.description,children:["The following code defines the currently being edited app. Copy and paste it to an ",v("code",{children:"app.R"})," file to use."]}),M("div",{className:Gn.code_holder,children:[v("label",{children:"app.R"}),v("pre",{children:t.app})]})]}):M(We,{children:[v("h2",{className:Gn.title,children:"App scripts"}),M("p",{className:Gn.description,children:["The following code defines the currently being edited app. Copy and paste the ui and server scripts into ",v("code",{children:"ui.R"})," and"," ",v("code",{children:"server.R"})," files to use."]}),M("div",{className:Gn.code_holder,children:[v("label",{children:"ui.R"}),v("pre",{children:t.ui})]}),M("div",{className:Gn.code_holder,children:[v("label",{children:"server.R"}),v("pre",{children:t.server})]})]})}function Q7(){const[e,t]=k.useState(!1),r=dE().getState().app_info;return r.mode!=="MAIN"?null:M(We,{children:[v(va,{className:Gt.title,children:"Code"}),v(Rr,{className:Gn.show_btn,text:"See current application code",position:"left",onClick:()=>t(i=>!i),variant:"regular",children:"Get app script"}),e?v(j7,{className:Gn.modal,title:"App Script",onClose:()=>t(!1),children:M("form",{method:"dialog",children:[v(J7,{info:r}),v("div",{className:Gn.footer,children:v(mt,{type:"submit",children:"Okay"})})]})}):null]})}function K7(){const{sendMsg:e,incomingMsgs:t}=rs(),[n,r]=k.useState("HIDDEN"),[i,o]=k.useState([]),[a,l]=k.useState(null);k.useEffect(()=>{const p=t.subscribe("APP-PREVIEW-STATUS",E=>{l(null),r(E)}),h=t.subscribe("APP-PREVIEW-LOGS",E=>{o(q7(E))}),m=t.subscribe("APP-PREVIEW-CRASH",E=>{l(E)});return e({path:"APP-PREVIEW-REQUEST"}),u(()=>()=>e({path:"APP-PREVIEW-RESTART"})),f(()=>()=>e({path:"APP-PREVIEW-STOP"})),()=>{p.unsubscribe(),h.unsubscribe(),m.unsubscribe()}},[t,e]);const[s,u]=k.useState(()=>()=>console.warn("No app running to reset")),[c,f]=k.useState(()=>()=>console.warn("No app running to stop")),d=k.useCallback(()=>{o([])},[]);return{appLogs:i,clearLogs:d,restartApp:s,stopApp:c,appLoc:n,errors:a}}function q7(e){return Array.isArray(e)?e:[e]}function X7(){const e=Z7();return e9(e.width)}function Z7(){const[e,t]=k.useState(o0()),n=k.useMemo(()=>tE(()=>{t(o0())},500),[]);return k.useEffect(()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)),[n]),e}function e9(e){const t=hE-AC*2,n=e-CC*2;return t/n}function o0(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}const AC=16,CC=55;function t9(){const e=k.useRef(null),[t,n]=k.useState(!1),r=k.useCallback(()=>{n(d=>!d)},[]),{appLoc:i,errors:o,appLogs:a,clearLogs:l,restartApp:s}=K7(),u=X7(),c=k.useCallback(d=>{i9(d.currentTarget),!(!e.current||typeof i=="string")&&(d.metaKey?s():e.current.src=i.url)},[i,s]);if(i==="HIDDEN")return v(Q7,{});const f=({isExpandedMode:d})=>v("div",{className:Gt.reloadButtonContainer,children:v(Rr,{text:`Reload app session (hold ${o9()} to restart app server also)`,className:Gt.reloadButton,onClick:c,position:d?"right":"up-right",children:v(SC,{})})});return M(We,{children:[M(va,{className:Gt.title,children:[v(f,{isExpandedMode:!1}),"App Preview"]}),v("div",{className:Gt.appViewerHolder,"data-expanded":t,style:{"--app-scale-amnt":u,"--preview-inset-horizontal":`${AC}px`,"--expanded-inset-horizontal":`${CC}px`},children:o!==null?v(n9,{onClick:s}):M(We,{children:[v(f,{isExpandedMode:!0}),M("div",{className:Gt.appContainer,children:[i==="LOADING"?v(r9,{}):v("iframe",{className:Gt.previewFrame,src:i.url,title:"Application Preview",ref:e}),v(mt,{variant:"icon",className:Gt.expandButton,title:t?"Shrink app preview":"Expand app preview",onClick:r,children:t?v(D8,{}):v(G4,{})})]}),v(U7,{appLogs:a,clearLogs:l})]})})]})}function n9({onClick:e}){return M("div",{className:Gt.appContainer,children:[M("p",{children:["App preview crashed.",v("br",{})," Try and restart?"]}),M(mt,{className:Gt.restartButton,title:"Restart app preview",onClick:e,children:["Restart app preview ",v(SC,{})]})]})}function r9(){return v("div",{className:Gt.loadingMessage,children:v("h2",{children:"Loading app preview..."})})}function i9(e){const t=e.querySelector("svg");t==null||t.classList.add(Gt.spin),e.addEventListener("animationend",()=>t==null?void 0:t.classList.remove(Gt.spin),!1)}function o9(){return EC()?"⌘":"Alt"}function xC({main:e,properties:t,preview:n,left:r}){return v(We,{children:M("div",{className:dr.EditorSkeleton,children:[v("div",{className:Xe(dr.elements_panel,dr.panel),children:r}),v("div",{className:dr.app_view,children:e}),v("div",{className:Xe(dr.properties_panel,dr.panel),children:t}),v("div",{className:Xe(dr.app_preview,dr.panel),children:n})]})})}const a9={uiName:"gridlayout::grid_page",uiArguments:{row_sizes:["70px","1fr","1fr"],col_sizes:["250px","1fr"],gap_size:"1rem",layout:["header header","sidebar linePlots","dists dists"]},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"sidebar"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"numChicks",label:"Number of Chicks",min:1,max:15,value:5,width:"100%",step:1}},{uiName:"shiny::radioButtons",uiArguments:{inputId:"distFacet",label:"Facet Distribution By",choices:{"Diet Type":"Diet","Measure Time":"Time"}}}]}]},{uiName:"gridlayout::grid_card_text",uiArguments:{area:"header",content:"Chick Weights",alignment:"center",is_title:!1}},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"dists"}},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"linePlots"}}]},l9={title:"Chick Weights Grid",description:"Plots investigating the ChickWeights built-in dataset",uiTree:a9,otherCode:{serverLibraries:["ggplot2"],serverFunctionBody:` -output$linePlots <- renderPlot({ - obs_to_include <- as.integer(ChickWeight$Chick) <= input$numChicks - chicks <- ChickWeight[obs_to_include, ] - - ggplot( - chicks, - aes( - x = Time, - y = weight, - group = Chick - ) - ) + - geom_line(alpha = 0.5) + - ggtitle("Chick weights over time") -}) - -output$dists <- renderPlot({ - ggplot( - ChickWeight, - aes(x = weight) - ) + - facet_wrap(input$distFacet) + - geom_density(fill = "#fa551b", color = "#ee6331") + - ggtitle("Distribution of weights by diet") -})`}},s9={uiName:"shiny::navbarPage",uiArguments:{title:"Chick Weights",selected:"Line Plots",collapsible:!0,theme:{uiName:"unknownUiFunction",uiArguments:{text:"bslib::bs_theme()"}}},uiChildren:[{uiName:"shiny::tabPanel",uiArguments:{title:"Line Plots"},uiChildren:[{uiName:"gridlayout::grid_container",uiArguments:{row_sizes:["1fr"],col_sizes:["250px","1fr"],gap_size:"10px",layout:["num_chicks linePlots"]},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"num_chicks"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"numChicks",label:"Number of chicks",min:1,max:15,value:5,step:1,width:"100%"}}]}]},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"linePlots"}}]}]},{uiName:"shiny::tabPanel",uiArguments:{title:"Distributions"},uiChildren:[{uiName:"gridlayout::grid_container",uiArguments:{row_sizes:["165px","1fr"],col_sizes:["1fr"],gap_size:"10px",layout:["facetOption","dists"]},uiChildren:[{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"dists"}},{uiName:"gridlayout::grid_card",uiArguments:{area:"facetOption"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Distribution Plot Options"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::radioButtons",uiArguments:{inputId:"distFacet",label:"Facet distribution by",choices:{"Diet Option":"Diet","Measure Time":"Time"}}}]}]}]}]}]},u9={title:"Chick Weights navbar",description:"Plots investigating the ChickWeights built-in dataset in a `navbarPage()` view",uiTree:s9,otherCode:{serverLibraries:["ggplot2"],serverFunctionBody:` -output$linePlots <- renderPlot({ - obs_to_include <- as.integer(ChickWeight$Chick) <= input$numChicks - chicks <- ChickWeight[obs_to_include, ] - - ggplot( - chicks, - aes( - x = Time, - y = weight, - group = Chick - ) - ) + - geom_line(alpha = 0.5) + - ggtitle("Chick weights over time") -}) - -output$dists <- renderPlot({ - ggplot( - ChickWeight, - aes(x = weight) - ) + - facet_wrap(input$distFacet) + - geom_density(fill = "#fa551b", color = "#ee6331") + - ggtitle("Distribution of weights by diet") -}) -`}},c9={uiName:"gridlayout::grid_page",uiArguments:{layout:["header header header","sidebar bluePlot bluePlot","table table plotly","table table plotly"],row_sizes:["100px","1fr","1fr","1fr"],col_sizes:["250px","0.59fr","1.41fr"],gap_size:"1rem"},uiChildren:[{uiName:"gridlayout::grid_card",uiArguments:{area:"sidebar"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Settings"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"shiny::sliderInput",uiArguments:{inputId:"bins",label:"Number of Bins",min:12,max:100,value:30,width:"100%"}},{uiName:"shiny::numericInput",uiArguments:{inputId:"numRows",label:"Number of table rows",value:10,min:1,step:1,width:"100%"}}]}]},{uiName:"gridlayout::grid_card_text",uiArguments:{area:"header",content:"Geysers!",alignment:"start",is_title:!1}},{uiName:"gridlayout::grid_card",uiArguments:{area:"table"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Table"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"DT::DTOutput",uiArguments:{outputId:"myTable",width:"100%"}}]}]},{uiName:"gridlayout::grid_card_plot",uiArguments:{area:"bluePlot"}},{uiName:"gridlayout::grid_card",uiArguments:{area:"plotly"},uiChildren:[{uiName:"bslib::card_header",uiArguments:{},uiChildren:[{uiName:"textNode",uiArguments:{contents:"Interactive Plot"}}]},{uiName:"bslib::card_body_fill",uiArguments:{},uiChildren:[{uiName:"plotly::plotlyOutput",uiArguments:{outputId:"distPlot",width:"100%",height:"100%"}}]}]}]},f9={title:"Grid Geyser",description:"The classic geyser app in a gridlayout grid page",uiTree:c9,otherCode:{serverLibraries:["plotly"],serverFunctionBody:` -output$distPlot <- renderPlotly({ - # generate bins based on input$bins from ui.R - plot_ly(x = ~ faithful[, 2], type = "histogram") -}) - -output$bluePlot <- renderPlot({ - # generate bins based on input$bins from ui.R - x <- faithful[, 2] - bins <- seq(min(x), max(x), length.out = input$bins + 1) - - # draw the histogram with the specified number of bins - hist(x, breaks = bins, col = "steelblue", border = "white") -}) - -output$myTable <- renderDT({ - head(faithful, input$numRows) -})`}},kC=[f9,u9,l9];function d9(e){const t=e.outputType==="SINGLE-FILE"?p9(e):h9(e);return Tg(t,{include_info:!0})}function p9({uiTree:e,otherCode:{uiExtra:t="",serverExtra:n="",serverFunctionBody:r="",serverLibraries:i=[]}}){const o=`${ir.libraries} - -${t} -ui <- ${ir.ui} - -${n} -server <- function(input, output) { - ${$l(r)} -} - -shinyApp(ui, server) - -`;return{app_type:"SINGLE-FILE",ui_tree:e,app:{code:o,libraries:["shiny",...i]}}}function h9({uiTree:e,otherCode:{uiExtra:t="",serverExtra:n="",serverFunctionBody:r="",serverLibraries:i=[]}}){const o=`${ir.libraries} - -${t} -ui <- ${ir.ui} -`,a=`${wC(i)} - -${n} -server <- function(input, output) { - ${$l(r)} -} -`;return{app_type:"MULTI-FILE",ui_tree:e,ui:{code:o,libraries:["shiny",...i]},server:{code:a}}}const Hd=1260,a0=800;function m9({uiTree:e,width_px:t}){const n=a0*(t/Hd),r=t/Hd;return v("div",{className:"AppTemplatePreview",style:{width:`${t}px`,height:`${n}px`,"--full-w":`${Hd}px`,"--full-h":`${a0}px`,"--shrink-ratio":r},children:v("div",{className:"template-container",children:v(Ei,{path:[],node:e})})})}function _C(e){return e.uiName==="gridlayout::grid_page"?"grid":"navbarPage"}const g9={grid:TS,navbarPage:pC},OC=5,v9={"--card-pad":`${OC}px`};function y9({info:{title:e,uiTree:t,description:n},onSelect:r,width_px:i,selected:o}){const a=_C(t),l=g9[a],s=i-2*OC;return v(Sg,{placement:"bottom",popoverContent:n,openDelayMs:400,triggerEl:M("article",{className:"AppTemplateCard","aria-label":"App template preview card",onClick:r,style:v9,"data-selected":o,children:[v("div",{className:"preview-container",children:v(m9,{uiTree:t,width_px:s})}),M("footer",{children:[v("span",{children:e}),v("img",{src:l,alt:`${a} layout icon`,title:`${a} layout app`,className:"layout-icon"})]})]})})}function w9(){const{sendMsg:e}=rs();return k.useCallback(n=>{e({path:"UPDATED-APP",payload:d9(n)})},[e])}const TC=["grid","navbarPage"];function b9(e){return kC.filter(({uiTree:t})=>{const n=_C(t);return!!e.layoutTypes.includes(n)})}function E9({outputChoices:e}){const t=w9(),[n,r]=k.useState({layoutTypes:TC}),[i,o]=k.useState(null),[a,l]=k.useState(e==="USER-CHOICE"?"SINGLE-FILE":e),s=f=>{o(d=>d===f?null:f)},u=k.useMemo(()=>b9(n),[n]);return k.useEffect(()=>{i&&!u.map(f=>f.title).includes(i)&&o(null)},[i,u]),{filterState:n,setFilterState:r,shownTemplates:u,selectedTemplate:i,setSelectedTemplate:s,selectedOutput:a,setSelectedOutput:l,finishSelection:()=>{const f=u.find(({title:p})=>p===i);if(!f)return;const d=gC(f.uiTree,{remove_namespace:!0});t($(R(R({},f),d),{outputType:a}))}}}const S9=["SINGLE-FILE","MULTI-FILE"],A9={"SINGLE-FILE":"Single file mode","MULTI-FILE":"Multi file mode"};function C9({selectedOutput:e,setSelectedOutput:t}){return M("form",{className:"App_TypeForm",children:[v("legend",{children:"Generate app in:"}),S9.map(n=>{const r=A9[n];return M("div",{className:"labeled-form-option",children:[v("input",{type:"radio",id:`${n}-choice`,name:r,value:n,checked:n===e,onChange:i=>t(n)}),v("label",{htmlFor:`${n}-choice`,children:r})]},n)})]})}const x9={grid:"Grid",navbarPage:"Tabs"};function k9({filterState:e,setFilterState:t}){const{layoutTypes:n}=e;return v("form",{className:"TemplateFiltersForm",onSubmit:r=>{r.preventDefault()},children:M("fieldset",{"aria-label":"App layout type filters",children:[v("legend",{children:"Show templates based on selected layouts:"}),v("div",{className:"layout-options",children:TC.map(r=>{const i=x9[r],o=n.includes(r);return M("div",{className:"labeled-form-option",children:[v("input",{type:"checkbox",id:`${r}-choice`,name:i,value:r,checked:o,onChange:()=>{t($(R({},e),{layoutTypes:o?n.filter(a=>a!==r):[...n,r]}))}}),v("label",{htmlFor:`${r}-choice`,children:i})]},r)})})]})})}const IC=294,_9={"--card-w":`${IC}px`};function O9({selectedTemplate:e,setSelectedTemplate:t,templates:n=kC}){return n.length===0?v("div",{className:"TemplatePreviewGrid empty-results",children:"No app templates fit current filters. Try broadening your search."}):v("div",{className:"TemplatePreviewGrid",style:_9,children:n.map(r=>v(y9,{info:r,selected:r.title===e,onSelect:()=>{t(r.title)},width_px:IC},r.title))})}function T9(e){const{filterState:t,setFilterState:n,shownTemplates:r,selectedTemplate:i,setSelectedTemplate:o,finishSelection:a,selectedOutput:l,setSelectedOutput:s}=E9(e),u=i!==null,c=u?"Next":"Select a template";return v(xC,{main:v(O9,{templates:r,selectedTemplate:i,setSelectedTemplate:o}),left:M(We,{children:[v(va,{children:"Choose App Template"}),M("div",{className:"TemplateChooserSidebar",children:[v("section",{className:"instructions",children:"Hover over a template to see a description and what elements are used. Select the desired template and click next to edit."}),v(k9,{filterState:t,setFilterState:n}),e.outputChoices==="USER-CHOICE"?v(C9,{selectedOutput:l,setSelectedOutput:s}):null,v(mt,{disabled:!u,onClick:a,"aria-label":u?"Start editor with selected template":"Need to select a template to proceed","data-balloon-pos":"right",children:c})]})]})})}const I9="_elementsPalette_qmlez_1",P9="_OptionContainer_qmlez_18",N9="_OptionItem_qmlez_24",R9="_OptionIcon_qmlez_33",D9="_OptionLabel_qmlez_41",nl={elementsPalette:I9,OptionContainer:P9,OptionItem:N9,OptionIcon:R9,OptionLabel:D9};function L9(e,t){const n={};for(const r in e)n[r]=M9(e[r],t);return n}function M9(e,t){const n=R({},e);for(const r in n){const i=n[r];typeof i=="function"&&(n[r]=i(t))}return n}function F9(e){const t={};for(const n in e){const r=e[n],i="optional"in r,o="useDefaultIfOptional"in r;if(i&&!o)continue;const a=r.defaultValue;t[n]=typeof a=="function"?a():a}return t}function B9({uiName:e}){const{iconSrc:t,title:n,settingsInfo:r,description:i=n,default_node:o}=ro(e),a=o?R({uiName:e},o):{uiName:e,uiArguments:F9(r)},l=FE({node:a});return t===void 0?null:v(Sg,{popoverContent:i,contentIsMd:!0,openDelayMs:500,triggerEl:v("div",{className:nl.OptionContainer,children:M("div",$(R({className:nl.OptionItem,"data-ui-name":e},l),{children:[v("img",{src:t,alt:n,className:nl.OptionIcon}),v("label",{className:nl.OptionLabel,children:n})]}))})})}const U9={Utilities:1,Inputs:1,Outputs:1,layouts:1,gridlayout:1,Tabs:1,Containers:1,Cards:1,Plotting:1,Uncategorized:1},l0=Object.keys(U9);function s0(e){const t=ro(e);return"category"in t&&t.category?t.category:"uncategorized"}function z9(e,t){const n=l0.indexOf(s0(e)),r=l0.indexOf(s0(t));return nr?1:0}function j9({availableUiNodes:e=mC}){const t=[...e].sort(z9);return M(We,{children:[v(va,{children:"Elements"}),v("div",{className:nl.elementsPalette,children:t.map(n=>v(B9,{uiName:n},n))})]})}const W9="_deleteButton_1en02_1",Y9={deleteButton:W9};function V9({path:e,justIcon:t=!1,label:n="Delete Node"}){const r=bC(e);return M(mt,{className:Y9.deleteButton,onClick:i=>{i.stopPropagation(),r()},"aria-label":n,title:n,variant:t?"icon":"delete",type:"button",children:[v(df,{}),t?null:"Delete Element"]})}function $9({settings:e,settingsInfo:t,onSettingsChange:n}){const r=YT(Object.keys(e),Object.keys(t));return r.length===0?null:M("section",{className:"unknown-arguments-list",children:[v("div",{className:"divider-line",children:v("label",{children:v(K_,{text:"Arguments present in UI code but not known about or editable by the shinyuieditor",position:"left",size:"fit",children:"Unknown arguments"})})}),v("ul",{className:"unknown-form-fields","aria-label":"Unknown arguments list",children:r.map(i=>M("li",{className:"unknown-argument","aria-label":"Unknown argument",style:{cursor:"default"},children:[v("code",{"aria-label":G9(e[i]),"data-balloon-pos":"left",style:{cursor:"inherit"},children:i}),v(Rr,{text:`Remove ${i} argument`,onClick:()=>n(i,{type:"REMOVE"}),type:"button",position:"left",children:v(df,{})})]},i))})]})}function H9(e){return Og(e)?e.uiName==="unknownUiFunction":!1}const u0=50;function G9(e){let t=JSON.stringify(H9(e)?e.uiArguments.text:e);return t.length>u0+4&&(t=t.substring(0,u0),t+="..."),"Value: "+t}function J9(e){const{settings:t,settingsInfo:n,onSettingsChange:r,renderInputs:i=({inputs:a})=>v(We,{children:Object.values(a)})}=e,o={inputs:K9({settings:t,settingsInfo:n,onSettingsChange:r}),settings:t};return M("form",{className:"FormBuilder",onSubmit:Q9,children:[i(o),v($9,R({},e))]})}const Q9=e=>{e.preventDefault()};function K9({settings:e,settingsInfo:t,onSettingsChange:n}){const r={};for(const i in t){const o=t[i];if(!YE(o)||!("inputType"in o)||!("defaultValue"in o)||o.inputType==="omitted")continue;const a=e[i],l=$(R({},o),{name:i,value:a,onUpdate:s=>n(i,s)});r[i]=v(nC,R({},l),i)}return r}function q9({node:e}){var i;const{sendMsg:t,mode:n}=rs();if(n!=="VSCODE"||!e)return null;const r=(i=ro(e.uiName).serverBindings)!=null?i:{};return M("div",{children:[v(X9,{serverOutputInfo:r==null?void 0:r.outputs,node:e,sendMsg:t}),v(Z9,{serverInputInfo:r==null?void 0:r.inputs,node:e,sendMsg:t})]})}function X9({serverOutputInfo:e,node:{uiArguments:t},sendMsg:n}){const r=hS();if(!(r.mode==="MAIN"&&"known_outputs"in r)||typeof e=="undefined")return null;const i=r.known_outputs,{outputIdKey:o,renderScaffold:a}=e,l=typeof o=="string"?o:o(t),s=t[l];if(typeof s!="string")return null;const u=i.has(s);return v(Rr,{text:u?"Show output declaration in app script":"Create output binding in app server",position:"left",variant:"regular",onClick:()=>{n(u?{path:"FIND-SERVER-USES",payload:{type:"Output",outputId:s}}:{path:"INSERT-SNIPPET",payload:{snippet:` -output\\$${s} <- ${a}`,where_in_server:"end"}})},children:u?"Show in server":"Generate server code"})}function Z9({serverInputInfo:e,node:{uiArguments:t},sendMsg:n}){if(typeof e=="undefined")return null;const{inputIdKey:r}=e,i=typeof r=="string"?r:r(t),o=t[i];return typeof o!="string"?null:v(Rr,{text:`Find uses of bound input (input$${o}) in app script`,position:"left",variant:"regular",onClick:()=>{n({path:"FIND-SERVER-USES",payload:{type:"Input",inputId:o}})},children:"Find in server"})}function eB(e,t){const n=e.length;let r=[];for(let i=0;i<=n;i++){const o=Si(t,e.slice(0,i));if(o===void 0)break;r.push(ro(o.uiName).title)}return r}const tB="_container_1fh41_1",nB="_node_1fh41_12",c0={container:tB,node:nB};function rB({tree:e,path:t,onSelect:n}){const r=eB(t,e),i=t.length;return v("div",{className:c0.container,"aria-label":"Path to selected node",children:r.map((o,a)=>{const l=a===i,s=iB(o);return v("div",{className:c0.node,"aria-label":l?"current selection":"ancestor of selection",onClick:l?void 0:()=>n(t.slice(0,a)),children:s},o+a)})})}function iB(e){return e.replace(/[a-z]+::/,"")}const oB="_settingsPanel_a44hx_1",aB="_currentElementAbout_a44hx_10",lB="_settingsForm_a44hx_17",sB="_settingsInputs_a44hx_24",uB="_buttonsHolder_a44hx_28",cB="_validationErrorMsg_a44hx_45",Gd={settingsPanel:oB,currentElementAbout:aB,settingsForm:lB,settingsInputs:sB,buttonsHolder:uB,validationErrorMsg:cB};var fB=dB;function dB(e,t){var n={};typeof t=="string"&&(t=[].slice.call(arguments,1));for(var r in e)(!e.hasOwnProperty||e.hasOwnProperty(r))&&t.indexOf(r)===-1&&(n[r]=e[r]);return n}function pB(e){const t=Nr(),n=ss(),r=UE(),[i,o]=q.useState(n!==null?f0(e,n):null),a=q.useRef(!1),l=q.useCallback(c=>{n&&a.current&&t(cS({path:n,node:c}))},[t,n]);return q.useEffect(()=>{if(a.current=!1,n===null){o(null);return}o(f0(e,n))},[e,n]),q.useEffect(()=>{i&&l(i)},[i,l]),{currentNode:i,updateArgumentsByName:(c,f)=>{o(d=>$(R({},d),{uiArguments:$(R({},d==null?void 0:d.uiArguments),{[c]:f})})),a.current=!0},deleteArgumentByName:c=>{o(f=>{var d;return f===null?f:$(R({},f),{uiArguments:fB((d=f.uiArguments)!=null?d:{},c)})}),a.current=!0},selectedPath:n,setNodeSelection:r}}function f0(...e){try{return Si(...e)}catch(t){return console.warn("Failed to get node. Args:",e),null}}function hB({tree:e}){const{currentNode:t,updateArgumentsByName:n,deleteArgumentByName:r,selectedPath:i,setNodeSelection:o}=pB(e);if(i===null)return v("div",{children:"Select an element to edit properties"});if(t===null)return M("div",{children:["Error finding requested node at path ",i.join(".")]});const a=i.length===0,{uiName:l,uiArguments:s}=t,u=ro(l),c=L9(u.settingsInfo,t);return M(We,{children:[v(va,{children:"Properties"}),M("div",{className:Gd.settingsPanel,children:[v("div",{className:Gd.currentElementAbout,children:v(rB,{tree:e,path:i,onSelect:o})}),v(J9,{settings:s,settingsInfo:c,renderInputs:"settingsFormRender"in u?u.settingsFormRender:void 0,onSettingsChange:(f,d)=>{switch(d.type){case"UPDATE":n(f,d.value);return;case"REMOVE":r(f);return}}}),v(q9,{node:t}),v("div",{className:Gd.buttonsHolder,children:a?null:v(V9,{path:i})})]})]})}function PC({children:e}){return v("div",{className:Dn.message_for_user,children:v("div",{className:Dn.message_container,children:e})})}function mB({msg:e}){const t=e.split(` -`);return v(We,{children:t.map(n=>v("p",{className:Dn.error_msg,children:n}))})}function gB({state:e}){switch(e.mode){case"MAIN":return v(vB,{state:e});case"LOADING":return v(wB,{});case"ERROR":return v(yB,{state:e});case"TEMPLATE_CHOOSER":return v(T9,R({},e.options))}}function vB({state:e}){return v(xC,{main:v(Ei,{node:e.ui_tree,path:[],canDrag:!1}),left:v(j9,{}),properties:v(hB,{tree:e.ui_tree}),preview:v(t9,{})})}function yB({state:e}){return M(PC,{children:[M("h2",{children:["Error ",e.context?`while ${e.context}`:""]}),v(mB,{msg:e.msg})]})}function wB(){return v(PC,{children:v("h2",{children:"Loading initial state from server"})})}function NC(e){return function(t){return typeof t===e}}var bB=NC("function"),EB=function(e){return e===null},d0=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},p0=function(e){return!SB(e)&&!EB(e)&&(bB(e)||typeof e=="object")},SB=NC("undefined"),_h=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function AB(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=n;r--!==0;)if(!Mt(e[r],t[r]))return!1;return!0}function CB(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e.buffer),r=new DataView(t.buffer),i=e.byteLength;i--;)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function xB(e,t){var n,r,i,o;if(e.size!==t.size)return!1;try{for(var a=_h(e.entries()),l=a.next();!l.done;l=a.next()){var s=l.value;if(!t.has(s[0]))return!1}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}try{for(var u=_h(e.entries()),c=u.next();!c.done;c=u.next()){var s=c.value;if(!Mt(s[1],t.get(s[0])))return!1}}catch(f){i={error:f}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return!0}function kB(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=_h(e.entries()),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a[0]))return!1}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Mt(e,t){if(e===t)return!0;if(e&&p0(e)&&t&&p0(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return AB(e,t);if(e instanceof Map&&t instanceof Map)return xB(e,t);if(e instanceof Set&&t instanceof Set)return kB(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return CB(e,t);if(d0(e)&&d0(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=n.length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(var i=n.length;i--!==0;){var o=n[i];if(!(o==="_owner"&&e.$$typeof)&&!Mt(e[o],t[o]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var _B=["innerHTML","ownerDocument","style","attributes","nodeValue"],OB=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],TB=["bigint","boolean","null","number","string","symbol","undefined"];function Pf(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(IB(t))return t}function jn(e){return function(t){return Pf(t)===e}}function IB(e){return OB.includes(e)}function ya(e){return function(t){return typeof t===e}}function PB(e){return TB.includes(e)}function D(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(D.array(e))return"Array";if(D.plainFunction(e))return"Function";var t=Pf(e);return t||"Object"}D.array=Array.isArray;D.arrayOf=function(e,t){return!D.array(e)&&!D.function(t)?!1:e.every(function(n){return t(n)})};D.asyncGeneratorFunction=function(e){return Pf(e)==="AsyncGeneratorFunction"};D.asyncFunction=jn("AsyncFunction");D.bigint=ya("bigint");D.boolean=function(e){return e===!0||e===!1};D.date=jn("Date");D.defined=function(e){return!D.undefined(e)};D.domElement=function(e){return D.object(e)&&!D.plainObject(e)&&e.nodeType===1&&D.string(e.nodeName)&&_B.every(function(t){return t in e})};D.empty=function(e){return D.string(e)&&e.length===0||D.array(e)&&e.length===0||D.object(e)&&!D.map(e)&&!D.set(e)&&Object.keys(e).length===0||D.set(e)&&e.size===0||D.map(e)&&e.size===0};D.error=jn("Error");D.function=ya("function");D.generator=function(e){return D.iterable(e)&&D.function(e.next)&&D.function(e.throw)};D.generatorFunction=jn("GeneratorFunction");D.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};D.iterable=function(e){return!D.nullOrUndefined(e)&&D.function(e[Symbol.iterator])};D.map=jn("Map");D.nan=function(e){return Number.isNaN(e)};D.null=function(e){return e===null};D.nullOrUndefined=function(e){return D.null(e)||D.undefined(e)};D.number=function(e){return ya("number")(e)&&!D.nan(e)};D.numericString=function(e){return D.string(e)&&e.length>0&&!Number.isNaN(Number(e))};D.object=function(e){return!D.nullOrUndefined(e)&&(D.function(e)||typeof e=="object")};D.oneOf=function(e,t){return D.array(e)?e.indexOf(t)>-1:!1};D.plainFunction=jn("Function");D.plainObject=function(e){if(Pf(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};D.primitive=function(e){return D.null(e)||PB(typeof e)};D.promise=jn("Promise");D.propertyOf=function(e,t,n){if(!D.object(e)||!t)return!1;var r=e[t];return D.function(n)?n(r):D.defined(r)};D.regexp=jn("RegExp");D.set=jn("Set");D.string=ya("string");D.symbol=ya("symbol");D.undefined=ya("undefined");D.weakMap=jn("WeakMap");D.weakSet=jn("WeakSet");function NB(){for(var e=[],t=0;ts);return D.undefined(r)||(u=u&&s===r),D.undefined(o)||(u=u&&l===o),u}function m0(e,t,n){var r=n.key,i=n.type,o=n.value,a=Xn(e,r),l=Xn(t,r),s=i==="added"?a:l,u=i==="added"?l:a;if(!D.nullOrUndefined(o)){if(D.defined(s)){if(D.array(s)||D.plainObject(s))return RB(s,u,o)}else return Mt(u,o);return!1}return[a,l].every(D.array)?!u.every(Ig(s)):[a,l].every(D.plainObject)?DB(Object.keys(s),Object.keys(u)):![a,l].every(function(c){return D.primitive(c)&&D.defined(c)})&&(i==="added"?!D.defined(a)&&D.defined(l):D.defined(a)&&!D.defined(l))}function g0(e,t,n){var r=n===void 0?{}:n,i=r.key,o=Xn(e,i),a=Xn(t,i);if(!RC(o,a))throw new TypeError("Inputs have different types");if(!NB(o,a))throw new TypeError("Inputs don't have length");return[o,a].every(D.plainObject)&&(o=Object.keys(o),a=Object.keys(a)),[o,a]}function v0(e){return function(t){var n=t[0],r=t[1];return D.array(e)?Mt(e,r)||e.some(function(i){return Mt(i,r)||D.array(r)&&Ig(r)(i)}):D.plainObject(e)&&e[n]?!!e[n]&&Mt(e[n],r):Mt(e,r)}}function DB(e,t){return t.some(function(n){return!e.includes(n)})}function y0(e){return function(t){return D.array(e)?e.some(function(n){return Mt(n,t)||D.array(t)&&Ig(t)(n)}):Mt(e,t)}}function za(e,t){return D.array(e)?e.some(function(n){return Mt(n,t)}):Mt(e,t)}function Ig(e){return function(t){return e.some(function(n){return Mt(n,t)})}}function RC(){for(var e=[],t=0;tNf(t)===e}function BB(e){return MB.includes(e)}function wa(e){return t=>typeof t===e}function UB(e){return FB.includes(e)}function J(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(J.array(e))return"Array";if(J.plainFunction(e))return"Function";const t=Nf(e);return t||"Object"}J.array=Array.isArray;J.arrayOf=(e,t)=>!J.array(e)&&!J.function(t)?!1:e.every(n=>t(n));J.asyncGeneratorFunction=e=>Nf(e)==="AsyncGeneratorFunction";J.asyncFunction=Wn("AsyncFunction");J.bigint=wa("bigint");J.boolean=e=>e===!0||e===!1;J.date=Wn("Date");J.defined=e=>!J.undefined(e);J.domElement=e=>J.object(e)&&!J.plainObject(e)&&e.nodeType===1&&J.string(e.nodeName)&&LB.every(t=>t in e);J.empty=e=>J.string(e)&&e.length===0||J.array(e)&&e.length===0||J.object(e)&&!J.map(e)&&!J.set(e)&&Object.keys(e).length===0||J.set(e)&&e.size===0||J.map(e)&&e.size===0;J.error=Wn("Error");J.function=wa("function");J.generator=e=>J.iterable(e)&&J.function(e.next)&&J.function(e.throw);J.generatorFunction=Wn("GeneratorFunction");J.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;J.iterable=e=>!J.nullOrUndefined(e)&&J.function(e[Symbol.iterator]);J.map=Wn("Map");J.nan=e=>Number.isNaN(e);J.null=e=>e===null;J.nullOrUndefined=e=>J.null(e)||J.undefined(e);J.number=e=>wa("number")(e)&&!J.nan(e);J.numericString=e=>J.string(e)&&e.length>0&&!Number.isNaN(Number(e));J.object=e=>!J.nullOrUndefined(e)&&(J.function(e)||typeof e=="object");J.oneOf=(e,t)=>J.array(e)?e.indexOf(t)>-1:!1;J.plainFunction=Wn("Function");J.plainObject=e=>{if(Nf(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};J.primitive=e=>J.null(e)||UB(typeof e);J.promise=Wn("Promise");J.propertyOf=(e,t,n)=>{if(!J.object(e)||!t)return!1;const r=e[t];return J.function(n)?n(r):J.defined(r)};J.regexp=Wn("RegExp");J.set=Wn("Set");J.string=wa("string");J.symbol=wa("symbol");J.undefined=wa("undefined");J.weakMap=Wn("WeakMap");J.weakSet=Wn("WeakSet");var Je=J,Oh={},zB={get exports(){return Oh},set exports(e){Oh=e}};/*! - Copyright (c) 2015 Jed Watson. - Based on code that is Copyright 2013-2015, Facebook, Inc. - All rights reserved. -*/(function(e){(function(){var t=!!(typeof window!="undefined"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(zB);const DC=Oh;var jB=new Error("Element already at target scroll position"),WB=new Error("Scroll cancelled"),YB=Math.min,w0=Date.now,VB={left:b0("scrollLeft"),top:b0("scrollTop")};function b0(e){return function(n,r,i,o){i=i||{},typeof i=="function"&&(o=i,i={}),typeof o!="function"&&(o=HB);var a=w0(),l=n[e],s=i.ease||$B,u=isNaN(i.duration)?350:+i.duration,c=!1;return l===r?o(jB,n[e]):requestAnimationFrame(d),f;function f(){c=!0}function d(p){if(c)return o(WB,n[e]);var h=w0(),m=YB(1,(h-a)/u),E=s(m);n[e]=E*(r-l)+l,m<1?requestAnimationFrame(d):requestAnimationFrame(function(){o(null,n[e])})}}}function $B(e){return .5*(1-Math.cos(Math.PI*e))}function HB(){}var Th={},GB={get exports(){return Th},set exports(e){Th=e}};(function(e){(function(t,n){e.exports?e.exports=n():t.Scrollparent=n()})(xx,function(){var t=/(auto|scroll)/,n=function(l,s){return l.parentNode===null?s:n(l.parentNode,s.concat([l]))},r=function(l,s){return getComputedStyle(l,null).getPropertyValue(s)},i=function(l){return r(l,"overflow")+r(l,"overflow-y")+r(l,"overflow-x")},o=function(l){return t.test(i(l))},a=function(l){if(l instanceof HTMLElement||l instanceof SVGElement){for(var s=n(l.parentNode,[]),u=0;u=0)return 1;return 0}();function mU(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function gU(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},hU))}}var vU=ms&&window.Promise,yU=vU?mU:gU;function BC(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function oo(e,t){if(e.nodeType!==1)return[];var n=e.ownerDocument.defaultView,r=n.getComputedStyle(e,null);return t?r[t]:r}function Pg(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function gs(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=oo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:gs(Pg(e))}function UC(e){return e&&e.referenceNode?e.referenceNode:e}var A0=ms&&!!(window.MSInputMethodContext&&document.documentMode),C0=ms&&/MSIE 10/.test(navigator.userAgent);function ba(e){return e===11?A0:e===10?C0:A0||C0}function oa(e){if(!e)return document.documentElement;for(var t=ba(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return!r||r==="BODY"||r==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(n.nodeName)!==-1&&oo(n,"position")==="static"?oa(n):n}function wU(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||oa(e.firstElementChild)===e}function Ih(e){return e.parentNode!==null?Ih(e.parentNode):e}function yc(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return wU(a)?a:oa(a);var l=Ih(e);return l.host?yc(l.host,t):yc(e,Ih(t).host)}function aa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",n=t==="top"?"scrollTop":"scrollLeft",r=e.nodeName;if(r==="BODY"||r==="HTML"){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function bU(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=aa(t,"top"),i=aa(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function x0(e,t){var n=t==="x"?"Left":"Top",r=n==="Left"?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function k0(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],ba(10)?parseInt(n["offset"+e])+parseInt(r["margin"+(e==="Height"?"Top":"Left")])+parseInt(r["margin"+(e==="Height"?"Bottom":"Right")]):0)}function zC(e){var t=e.body,n=e.documentElement,r=ba(10)&&getComputedStyle(n);return{height:k0("Height",t,n,r),width:k0("Width",t,n,r)}}var EU=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},SU=function(){function e(t,n){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=ba(10),i=t.nodeName==="HTML",o=Ph(e),a=Ph(t),l=gs(e),s=oo(t),u=parseFloat(s.borderTopWidth),c=parseFloat(s.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=gi({top:o.top-a.top-u,left:o.left-a.left-c,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var d=parseFloat(s.marginTop),p=parseFloat(s.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(r&&!n?t.contains(l):t===l&&l.nodeName!=="BODY")&&(f=bU(f,t)),f}function AU(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.ownerDocument.documentElement,r=Ng(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:aa(n),l=t?0:aa(n,"left"),s={top:a-r.top+r.marginTop,left:l-r.left+r.marginLeft,width:i,height:o};return gi(s)}function jC(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(oo(e,"position")==="fixed")return!0;var n=Pg(e);return n?jC(n):!1}function WC(e){if(!e||!e.parentElement||ba())return document.documentElement;for(var t=e.parentElement;t&&oo(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function Rg(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o={top:0,left:0},a=i?WC(e):yc(e,UC(t));if(r==="viewport")o=AU(a,i);else{var l=void 0;r==="scrollParent"?(l=gs(Pg(t)),l.nodeName==="BODY"&&(l=e.ownerDocument.documentElement)):r==="window"?l=e.ownerDocument.documentElement:l=r;var s=Ng(l,a,i);if(l.nodeName==="HTML"&&!jC(a)){var u=zC(e.ownerDocument),c=u.height,f=u.width;o.top+=s.top-s.marginTop,o.bottom=c+s.top,o.left+=s.left-s.marginLeft,o.right=f+s.left}else o=s}n=n||0;var d=typeof n=="number";return o.left+=d?n:n.left||0,o.top+=d?n:n.top||0,o.right-=d?n:n.right||0,o.bottom-=d?n:n.bottom||0,o}function CU(e){var t=e.width,n=e.height;return t*n}function YC(e,t,n,r,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var a=Rg(n,r,o,i),l={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},s=Object.keys(l).map(function(d){return dn({key:d},l[d],{area:CU(l[d])})}).sort(function(d,p){return p.area-d.area}),u=s.filter(function(d){var p=d.width,h=d.height;return p>=n.clientWidth&&h>=n.clientHeight}),c=u.length>0?u[0].key:s[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function VC(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=r?WC(t):yc(t,UC(n));return Ng(n,i,r)}function $C(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),r=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),i=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),o={width:e.offsetWidth+i,height:e.offsetHeight+r};return o}function wc(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(n){return t[n]})}function HC(e,t,n){n=n.split("-")[0];var r=$C(e),i={width:r.width,height:r.height},o=["right","left"].indexOf(n)!==-1,a=o?"top":"left",l=o?"left":"top",s=o?"height":"width",u=o?"width":"height";return i[a]=t[a]+t[s]/2-r[s]/2,n===l?i[l]=t[l]-r[u]:i[l]=t[wc(l)],i}function vs(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function xU(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===n});var r=vs(e,function(i){return i[t]===n});return e.indexOf(r)}function GC(e,t,n){var r=n===void 0?e:e.slice(0,xU(e,"name",n));return r.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=i.function||i.fn;i.enabled&&BC(o)&&(t.offsets.popper=gi(t.offsets.popper),t.offsets.reference=gi(t.offsets.reference),t=o(t,i))}),t}function kU(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=VC(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=YC(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=HC(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=GC(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function JC(e,t){return e.some(function(n){var r=n.name,i=n.enabled;return i&&r===t})}function Dg(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;ra[p]&&(e.offsets.popper[f]+=l[f]+h-a[p]),e.offsets.popper=gi(e.offsets.popper);var m=l[f]+l[u]/2-h/2,E=oo(e.instance.popper),g=parseFloat(E["margin"+c]),y=parseFloat(E["border"+c+"Width"]),w=m-e.offsets.popper[f]-g-y;return w=Math.max(Math.min(a[u]-h,w),0),e.arrowElement=r,e.offsets.arrow=(n={},la(n,f,Math.round(w)),la(n,d,""),n),e}function UU(e){return e==="end"?"start":e==="start"?"end":e}var XC=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Jd=XC.slice(3);function _0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Jd.indexOf(e),r=Jd.slice(n+1).concat(Jd.slice(0,n));return t?r.reverse():r}var Qd={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function zU(e,t){if(JC(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var n=Rg(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=wc(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Qd.FLIP:a=[r,i];break;case Qd.CLOCKWISE:a=_0(r);break;case Qd.COUNTERCLOCKWISE:a=_0(r,!0);break;default:a=t.behavior}return a.forEach(function(l,s){if(r!==l||a.length===s+1)return e;r=e.placement.split("-")[0],i=wc(r);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=r==="left"&&f(u.right)>f(c.left)||r==="right"&&f(u.left)f(c.top)||r==="bottom"&&f(u.top)f(n.right),m=f(u.top)f(n.bottom),g=r==="left"&&p||r==="right"&&h||r==="top"&&m||r==="bottom"&&E,y=["top","bottom"].indexOf(r)!==-1,w=!!t.flipVariations&&(y&&o==="start"&&p||y&&o==="end"&&h||!y&&o==="start"&&m||!y&&o==="end"&&E),S=!!t.flipVariationsByContent&&(y&&o==="start"&&h||y&&o==="end"&&p||!y&&o==="start"&&E||!y&&o==="end"&&m),_=w||S;(d||g||_)&&(e.flipped=!0,(d||g)&&(r=a[s+1]),_&&(o=UU(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=dn({},e.offsets.popper,HC(e.instance.popper,e.offsets.reference,e.placement)),e=GC(e.instance.modifiers,e,"flip"))}),e}function jU(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=["top","bottom"].indexOf(i)!==-1,l=a?"right":"bottom",s=a?"left":"top",u=a?"width":"height";return n[l]o(r[l])&&(e.offsets.popper[s]=o(r[l])),e}function WU(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(a.indexOf("%")===0){var l=void 0;switch(a){case"%p":l=n;break;case"%":case"%r":default:l=r}var s=gi(l);return s[t]/100*o}else if(a==="vh"||a==="vw"){var u=void 0;return a==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*o}else return o}function YU(e,t,n,r){var i=[0,0],o=["right","left"].indexOf(r)!==-1,a=e.split(/(\+|\-)/).map(function(c){return c.trim()}),l=a.indexOf(vs(a,function(c){return c.search(/,|\s/)!==-1}));a[l]&&a[l].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,u=l!==-1?[a.slice(0,l).concat([a[l].split(s)[0]]),[a[l].split(s)[1]].concat(a.slice(l+1))]:[a];return u=u.map(function(c,f){var d=(f===1?!o:o)?"height":"width",p=!1;return c.reduce(function(h,m){return h[h.length-1]===""&&["+","-"].indexOf(m)!==-1?(h[h.length-1]=m,p=!0,h):p?(h[h.length-1]+=m,p=!1,h):h.concat(m)},[]).map(function(h){return WU(h,d,t,n)})}),u.forEach(function(c,f){c.forEach(function(d,p){Lg(d)&&(i[f]+=d*(c[p-1]==="-"?-1:1))})}),i}function VU(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,l=r.split("-")[0],s=void 0;return Lg(+n)?s=[+n,0]:s=YU(n,o,a,l),l==="left"?(o.top+=s[0],o.left-=s[1]):l==="right"?(o.top+=s[0],o.left+=s[1]):l==="top"?(o.left+=s[0],o.top-=s[1]):l==="bottom"&&(o.left+=s[0],o.top+=s[1]),e.popper=o,e}function $U(e,t){var n=t.boundariesElement||oa(e.instance.popper);e.instance.reference===n&&(n=oa(n));var r=Dg("transform"),i=e.instance.popper.style,o=i.top,a=i.left,l=i[r];i.top="",i.left="",i[r]="";var s=Rg(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=l,t.boundaries=s;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]s[p]&&!t.escapeWithReference&&(m=Math.min(c[h],s[p]-(p==="right"?c.width:c.height))),la({},h,m)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=dn({},c,f[p](d))}),e.offsets.popper=c,e}function HU(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,l=["bottom","top"].indexOf(n)!==-1,s=l?"left":"top",u=l?"width":"height",c={start:la({},s,o[s]),end:la({},s,o[s]+o[u]-a[u])};e.offsets.popper=dn({},a,c[r])}return e}function GU(e){if(!qC(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=vs(e.instance.modifiers,function(r){return r.name==="preventOverflow"}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};EU(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=yU(this.update.bind(this)),this.options=dn({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(dn({},e.Defaults.modifiers,i.modifiers)).forEach(function(a){r.options.modifiers[a]=dn({},e.Defaults.modifiers[a]||{},i.modifiers?i.modifiers[a]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(a){return dn({name:a},r.options.modifiers[a])}).sort(function(a,l){return a.order-l.order}),this.modifiers.forEach(function(a){a.enabled&&BC(a.onLoad)&&a.onLoad(r.reference,r.popper,r.options,a,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return SU(e,[{key:"update",value:function(){return kU.call(this)}},{key:"destroy",value:function(){return _U.call(this)}},{key:"enableEventListeners",value:function(){return TU.call(this)}},{key:"disableEventListeners",value:function(){return PU.call(this)}}]),e}();Rf.Utils=(typeof window!="undefined"?window:global).PopperUtils;Rf.placements=XC;Rf.Defaults=KU;const O0=Rf;function T0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ZC(e,t){if(e==null)return{};var n=XU(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZU(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pr(e)}function Es(e){var t=qU();return function(){var r=bc(e),i;if(t){var o=bc(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return ZU(this,i)}}var ez={flip:{padding:20},preventOverflow:{padding:10}},ge={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},yr=DC.canUseDOM,ja=zi.createPortal!==void 0;function Kd(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function iu(e){var t=e.title,n=e.data,r=e.warn,i=r===void 0?!1:r,o=e.debug,a=o===void 0?!1:o,l=i?console.warn||console.error:console.log;a&&t&&n&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(s){D.plainObject(s)&&s.key?l.apply(console,[s.key,s.value]):l.apply(console,[s])}):l.apply(console,[n]),console.groupEnd())}function tz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,n,r)}function nz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,n,r)}function rz(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i;i=function(a){n(a),nz(e,t,i)},tz(e,t,i,r)}function P0(){}var ex=function(e){bs(n,e);var t=Es(n);function n(){return ys(this,n),t.apply(this,arguments)}return ws(n,[{key:"componentDidMount",value:function(){yr&&(this.node||this.appendNode(),ja||this.renderPortal())}},{key:"componentDidUpdate",value:function(){yr&&(ja||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!yr||!this.node||(ja||zi.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var i=this.props,o=i.id,a=i.zIndex;this.node||(this.node=document.createElement("div"),o&&(this.node.id=o),a&&(this.node.style.zIndex=a),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!yr)return null;var i=this.props,o=i.children,a=i.setRef;if(this.node||this.appendNode(),ja)return zi.createPortal(o,this.node);var l=zi.unstable_renderSubtreeIntoContainer(this,o.length>1?k.createElement("div",null,o):o[0],this.node);return a(l),null}},{key:"renderReact16",value:function(){var i=this.props,o=i.hasChildren,a=i.placement,l=i.target;return o?this.renderPortal():l||a==="center"?this.renderPortal():null}},{key:"render",value:function(){return ja?this.renderReact16():null}}]),n}(k.Component);bt(ex,"propTypes",{children:N.oneOfType([N.element,N.array]),hasChildren:N.bool,id:N.oneOfType([N.string,N.number]),placement:N.string,setRef:N.func.isRequired,target:N.oneOfType([N.object,N.string]),zIndex:N.number});var tx=function(e){bs(n,e);var t=Es(n);function n(){return ys(this,n),t.apply(this,arguments)}return ws(n,[{key:"parentStyle",get:function(){var i=this.props,o=i.placement,a=i.styles,l=a.arrow.length,s={pointerEvents:"none",position:"absolute",width:"100%"};return o.startsWith("top")?(s.bottom=0,s.left=0,s.right=0,s.height=l):o.startsWith("bottom")?(s.left=0,s.right=0,s.top=0,s.height=l):o.startsWith("left")?(s.right=0,s.top=0,s.bottom=0):o.startsWith("right")&&(s.left=0,s.top=0),s}},{key:"render",value:function(){var i=this.props,o=i.placement,a=i.setArrowRef,l=i.styles,s=l.arrow,u=s.color,c=s.display,f=s.length,d=s.margin,p=s.position,h=s.spread,m={display:c,position:p},E,g=h,y=f;return o.startsWith("top")?(E="0,0 ".concat(g/2,",").concat(y," ").concat(g,",0"),m.bottom=0,m.marginLeft=d,m.marginRight=d):o.startsWith("bottom")?(E="".concat(g,",").concat(y," ").concat(g/2,",0 0,").concat(y),m.top=0,m.marginLeft=d,m.marginRight=d):o.startsWith("left")?(y=h,g=f,E="0,0 ".concat(g,",").concat(y/2," 0,").concat(y),m.right=0,m.marginTop=d,m.marginBottom=d):o.startsWith("right")&&(y=h,g=f,E="".concat(g,",").concat(y," ").concat(g,",0 0,").concat(y/2),m.left=0,m.marginTop=d,m.marginBottom=d),k.createElement("div",{className:"__floater__arrow",style:this.parentStyle},k.createElement("span",{ref:a,style:m},k.createElement("svg",{width:g,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},k.createElement("polygon",{points:E,fill:u}))))}}]),n}(k.Component);bt(tx,"propTypes",{placement:N.string.isRequired,setArrowRef:N.func.isRequired,styles:N.object.isRequired});var iz=["color","height","width"],nx=function(t){var n=t.handleClick,r=t.styles,i=r.color,o=r.height,a=r.width,l=ZC(r,iz);return k.createElement("button",{"aria-label":"close",onClick:n,style:l,type:"button"},k.createElement("svg",{width:"".concat(a,"px"),height:"".concat(o,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},k.createElement("g",null,k.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:i}))))};nx.propTypes={handleClick:N.func.isRequired,styles:N.object.isRequired};var rx=function(t){var n=t.content,r=t.footer,i=t.handleClick,o=t.open,a=t.positionWrapper,l=t.showCloseButton,s=t.title,u=t.styles,c={content:k.isValidElement(n)?n:k.createElement("div",{className:"__floater__content",style:u.content},n)};return s&&(c.title=k.isValidElement(s)?s:k.createElement("div",{className:"__floater__title",style:u.title},s)),r&&(c.footer=k.isValidElement(r)?r:k.createElement("div",{className:"__floater__footer",style:u.footer},r)),(l||a)&&!D.boolean(o)&&(c.close=k.createElement(nx,{styles:u.close,handleClick:i})),k.createElement("div",{className:"__floater__container",style:u.container},c.close,c.title,c.content,c.footer)};rx.propTypes={content:N.node.isRequired,footer:N.node,handleClick:N.func.isRequired,open:N.bool,positionWrapper:N.bool.isRequired,showCloseButton:N.bool.isRequired,styles:N.object.isRequired,title:N.node};var ix=function(e){bs(n,e);var t=Es(n);function n(){return ys(this,n),t.apply(this,arguments)}return ws(n,[{key:"style",get:function(){var i=this.props,o=i.disableAnimation,a=i.component,l=i.placement,s=i.hideArrow,u=i.status,c=i.styles,f=c.arrow.length,d=c.floater,p=c.floaterCentered,h=c.floaterClosing,m=c.floaterOpening,E=c.floaterWithAnimation,g=c.floaterWithComponent,y={};return s||(l.startsWith("top")?y.padding="0 0 ".concat(f,"px"):l.startsWith("bottom")?y.padding="".concat(f,"px 0 0"):l.startsWith("left")?y.padding="0 ".concat(f,"px 0 0"):l.startsWith("right")&&(y.padding="0 0 0 ".concat(f,"px"))),[ge.OPENING,ge.OPEN].indexOf(u)!==-1&&(y=Re(Re({},y),m)),u===ge.CLOSING&&(y=Re(Re({},y),h)),u===ge.OPEN&&!o&&(y=Re(Re({},y),E)),l==="center"&&(y=Re(Re({},y),p)),a&&(y=Re(Re({},y),g)),Re(Re({},d),y)}},{key:"render",value:function(){var i=this.props,o=i.component,a=i.handleClick,l=i.hideArrow,s=i.setFloaterRef,u=i.status,c={},f=["__floater"];return o?k.isValidElement(o)?c.content=k.cloneElement(o,{closeFn:a}):c.content=o({closeFn:a}):c.content=k.createElement(rx,this.props),u===ge.OPEN&&f.push("__floater__open"),l||(c.arrow=k.createElement(tx,this.props)),k.createElement("div",{ref:s,className:f.join(" "),style:this.style},k.createElement("div",{className:"__floater__body"},c.content,c.arrow))}}]),n}(k.Component);bt(ix,"propTypes",{component:N.oneOfType([N.func,N.element]),content:N.node,disableAnimation:N.bool.isRequired,footer:N.node,handleClick:N.func.isRequired,hideArrow:N.bool.isRequired,open:N.bool,placement:N.string.isRequired,positionWrapper:N.bool.isRequired,setArrowRef:N.func.isRequired,setFloaterRef:N.func.isRequired,showCloseButton:N.bool,status:N.string.isRequired,styles:N.object.isRequired,title:N.node});var ox=function(e){bs(n,e);var t=Es(n);function n(){return ys(this,n),t.apply(this,arguments)}return ws(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.handleClick,l=i.handleMouseEnter,s=i.handleMouseLeave,u=i.setChildRef,c=i.setWrapperRef,f=i.style,d=i.styles,p;if(o)if(k.Children.count(o)===1)if(!k.isValidElement(o))p=k.createElement("span",null,o);else{var h=D.function(o.type)?"innerRef":"ref";p=k.cloneElement(k.Children.only(o),bt({},h,u))}else p=o;return p?k.createElement("span",{ref:c,style:Re(Re({},d),f),onClick:a,onMouseEnter:l,onMouseLeave:s},p):null}}]),n}(k.Component);bt(ox,"propTypes",{children:N.node,handleClick:N.func.isRequired,handleMouseEnter:N.func.isRequired,handleMouseLeave:N.func.isRequired,setChildRef:N.func.isRequired,setWrapperRef:N.func.isRequired,style:N.object,styles:N.object.isRequired});var oz={zIndex:100};function az(e){var t=qn(oz,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var lz=["arrow","flip","offset"],sz=["position","top","right","bottom","left"],Mg=function(e){bs(n,e);var t=Es(n);function n(r){var i;return ys(this,n),i=t.call(this,r),bt(pr(i),"setArrowRef",function(o){i.arrowRef=o}),bt(pr(i),"setChildRef",function(o){i.childRef=o}),bt(pr(i),"setFloaterRef",function(o){i.floaterRef=o}),bt(pr(i),"setWrapperRef",function(o){i.wrapperRef=o}),bt(pr(i),"handleTransitionEnd",function(){var o=i.state.status,a=i.props.callback;i.wrapperPopper&&i.wrapperPopper.instance.update(),i.setState({status:o===ge.OPENING?ge.OPEN:ge.IDLE},function(){var l=i.state.status;a(l===ge.OPEN?"open":"close",i.props)})}),bt(pr(i),"handleClick",function(){var o=i.props,a=o.event,l=o.open;if(!D.boolean(l)){var s=i.state,u=s.positionWrapper,c=s.status;(i.event==="click"||i.event==="hover"&&u)&&(iu({title:"click",data:[{event:a,status:c===ge.OPEN?"closing":"opening"}],debug:i.debug}),i.toggle())}}),bt(pr(i),"handleMouseEnter",function(){var o=i.props,a=o.event,l=o.open;if(!(D.boolean(l)||Kd())){var s=i.state.status;i.event==="hover"&&s===ge.IDLE&&(iu({title:"mouseEnter",data:[{key:"originalEvent",value:a}],debug:i.debug}),clearTimeout(i.eventDelayTimeout),i.toggle())}}),bt(pr(i),"handleMouseLeave",function(){var o=i.props,a=o.event,l=o.eventDelay,s=o.open;if(!(D.boolean(s)||Kd())){var u=i.state,c=u.status,f=u.positionWrapper;i.event==="hover"&&(iu({title:"mouseLeave",data:[{key:"originalEvent",value:a}],debug:i.debug}),l?[ge.OPENING,ge.OPEN].indexOf(c)!==-1&&!f&&!i.eventDelayTimeout&&(i.eventDelayTimeout=setTimeout(function(){delete i.eventDelayTimeout,i.toggle()},l*1e3)):i.toggle(ge.IDLE))}}),i.state={currentPlacement:r.placement,needsUpdate:!1,positionWrapper:r.wrapperOptions.position&&!!r.target,status:ge.INIT,statusWrapper:ge.INIT},i._isMounted=!1,i.hasMounted=!1,yr&&window.addEventListener("load",function(){i.popper&&i.popper.instance.update(),i.wrapperPopper&&i.wrapperPopper.instance.update()}),i}return ws(n,[{key:"componentDidMount",value:function(){if(yr){var i=this.state.positionWrapper,o=this.props,a=o.children,l=o.open,s=o.target;this._isMounted=!0,iu({title:"init",data:{hasChildren:!!a,hasTarget:!!s,isControlled:D.boolean(l),positionWrapper:i,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!a&&s&&D.boolean(l)}}},{key:"componentDidUpdate",value:function(i,o){if(yr){var a=this.props,l=a.autoOpen,s=a.open,u=a.target,c=a.wrapperOptions,f=Kl(o,this.state),d=f.changedFrom,p=f.changed;if(i.open!==s){var h;D.boolean(s)&&(h=s?ge.OPENING:ge.CLOSING),this.toggle(h)}(i.wrapperOptions.position!==c.position||i.target!==u)&&this.changeWrapperPosition(this.props),p("status",ge.IDLE)&&s?this.toggle(ge.OPEN):d("status",ge.INIT,ge.IDLE)&&l&&this.toggle(ge.OPEN),this.popper&&p("status",ge.OPENING)&&this.popper.instance.update(),this.floaterRef&&(p("status",ge.OPENING)||p("status",ge.CLOSING))&&rz(this.floaterRef,"transitionend",this.handleTransitionEnd),p("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){yr&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,a=this.state.positionWrapper,l=this.props,s=l.disableFlip,u=l.getPopper,c=l.hideArrow,f=l.offset,d=l.placement,p=l.wrapperOptions,h=d==="top"||d==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(d==="center")this.setState({status:ge.IDLE});else if(o&&this.floaterRef){var m=this.options,E=m.arrow,g=m.flip,y=m.offset,w=ZC(m,lz);new O0(o,this.floaterRef,{placement:d,modifiers:Re({arrow:Re({enabled:!c,element:this.arrowRef},E),flip:Re({enabled:!s,behavior:h},g),offset:Re({offset:"0, ".concat(f,"px")},y)},w),onCreate:function(b){var A;if(i.popper=b,!((A=i.floaterRef)!==null&&A!==void 0&&A.isConnected)){i.setState({needsUpdate:!0});return}u(b,"floater"),i._isMounted&&i.setState({currentPlacement:b.placement,status:ge.IDLE}),d!==b.placement&&setTimeout(function(){b.instance.update()},1)},onUpdate:function(b){i.popper=b;var A=i.state.currentPlacement;i._isMounted&&b.placement!==A&&i.setState({currentPlacement:b.placement})}})}if(a){var S=D.undefined(p.offset)?0:p.offset;new O0(this.target,this.wrapperRef,{placement:p.placement||d,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(S,"px")},flip:{enabled:!1}},onCreate:function(b){i.wrapperPopper=b,i._isMounted&&i.setState({statusWrapper:ge.IDLE}),u(b,"wrapper"),d!==b.placement&&setTimeout(function(){b.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var i=this;this.floaterRefInterval=setInterval(function(){var o;(o=i.floaterRef)!==null&&o!==void 0&&o.isConnected&&(clearInterval(i.floaterRefInterval),i.setState({needsUpdate:!1}),i.initPopper())},50)}},{key:"changeWrapperPosition",value:function(i){var o=i.target,a=i.wrapperOptions;this.setState({positionWrapper:a.position&&!!o})}},{key:"toggle",value:function(i){var o=this.state.status,a=o===ge.OPEN?ge.CLOSING:ge.OPENING;D.undefined(i)||(a=i),this.setState({status:a})}},{key:"debug",get:function(){var i=this.props.debug;return i||!!global.ReactFloaterDebug}},{key:"event",get:function(){var i=this.props,o=i.disableHoverToClick,a=i.event;return a==="hover"&&Kd()&&!o?"click":a}},{key:"options",get:function(){var i=this.props.options;return qn(ez,i||{})}},{key:"styles",get:function(){var i=this,o=this.state,a=o.status,l=o.positionWrapper,s=o.statusWrapper,u=this.props.styles,c=qn(az(u),u);if(l){var f;[ge.IDLE].indexOf(a)===-1||[ge.IDLE].indexOf(s)===-1?f=c.wrapperPosition:f=this.wrapperPopper.styles,c.wrapper=Re(Re({},c.wrapper),f)}if(this.target){var d=window.getComputedStyle(this.target);this.wrapperStyles?c.wrapper=Re(Re({},c.wrapper),this.wrapperStyles):["relative","static"].indexOf(d.position)===-1&&(this.wrapperStyles={},l||(sz.forEach(function(p){i.wrapperStyles[p]=d[p]}),c.wrapper=Re(Re({},c.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return c}},{key:"target",get:function(){if(!yr)return null;var i=this.props.target;return i?D.domElement(i)?i:document.querySelector(i):this.childRef||this.wrapperRef}},{key:"render",value:function(){var i=this.state,o=i.currentPlacement,a=i.positionWrapper,l=i.status,s=this.props,u=s.children,c=s.component,f=s.content,d=s.disableAnimation,p=s.footer,h=s.hideArrow,m=s.id,E=s.open,g=s.showCloseButton,y=s.style,w=s.target,S=s.title,_=k.createElement(ox,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:y,styles:this.styles.wrapper},u),b={};return a?b.wrapperInPortal=_:b.wrapperAsChildren=_,k.createElement("span",null,k.createElement(ex,{hasChildren:!!u,id:m,placement:o,setRef:this.setFloaterRef,target:w,zIndex:this.styles.options.zIndex},k.createElement(ix,{component:c,content:f,disableAnimation:d,footer:p,handleClick:this.handleClick,hideArrow:h||o==="center",open:E,placement:o,positionWrapper:a,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:g,status:l,styles:this.styles,title:S}),b.wrapperInPortal),b.wrapperAsChildren)}}]),n}(k.Component);bt(Mg,"propTypes",{autoOpen:N.bool,callback:N.func,children:N.node,component:S0(N.oneOfType([N.func,N.element]),function(e){return!e.content}),content:S0(N.node,function(e){return!e.component}),debug:N.bool,disableAnimation:N.bool,disableFlip:N.bool,disableHoverToClick:N.bool,event:N.oneOf(["hover","click"]),eventDelay:N.number,footer:N.node,getPopper:N.func,hideArrow:N.bool,id:N.oneOfType([N.string,N.number]),offset:N.number,open:N.bool,options:N.object,placement:N.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:N.bool,style:N.object,styles:N.object,target:N.oneOfType([N.object,N.string]),title:N.node,wrapperOptions:N.shape({offset:N.number,placement:N.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:N.bool})});bt(Mg,"defaultProps",{autoOpen:!1,callback:P0,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:P0,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});function N0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Sc(e,t){if(e==null)return{};var n=cz(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fz(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ze(e)}function lo(e){var t=uz();return function(){var r=Ec(e),i;if(t){var o=Ec(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return fz(this,i)}}var ce={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},kt={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},se={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},de={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"},Qr=DC.canUseDOM,Wa=ci.createPortal!==void 0;function ax(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:navigator.userAgent,t=e;return typeof window=="undefined"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":Boolean(window.opera)||e.indexOf(" OPR/")>=0?t="opera":typeof window.InstallTrigger!="undefined"?t="firefox":window.chrome?t="chrome":/(Version\/([0-9._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function qd(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function Ya(e){var t=[],n=function r(i){if(typeof i=="string"||typeof i=="number")t.push(i);else if(Array.isArray(i))i.forEach(function(a){return r(a)});else if(i&&i.props){var o=i.props.children;Array.isArray(o)?o.forEach(function(a){return r(a)}):r(o)}};return n(e),t.join(" ").trim()}function D0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function dz(e,t){return!Je.plainObject(e)||!Je.array(t)?!1:Object.keys(e).every(function(n){return t.indexOf(n)!==-1})}function pz(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=e.replace(t,function(i,o,a,l){return o+o+a+a+l+l}),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:[]}function L0(e){return e.disableBeacon||e.placement==="center"}function Lh(e,t){var n,r=q.isValidElement(e)||q.isValidElement(t),i=Je.undefined(e)||Je.undefined(t);if(qd(e)!==qd(t)||r||i)return!1;if(Je.domElement(e))return e.isSameNode(t);if(Je.number(e))return e===t;if(Je.function(e))return e.toString()===t.toString();for(var o in e)if(D0(e,o)){if(typeof e[o]=="undefined"||typeof t[o]=="undefined")return!1;if(n=qd(e[o]),["object","array"].indexOf(n)!==-1&&Lh(e[o],t[o])||n==="function"&&Lh(e[o],t[o]))continue;if(e[o]!==t[o])return!1}for(var a in t)if(D0(t,a)&&typeof e[a]=="undefined")return!1;return!0}function M0(){return["chrome","safari","firefox","opera"].indexOf(ax())===-1}function Xi(e){var t=e.title,n=e.data,r=e.warn,i=r===void 0?!1:r,o=e.debug,a=o===void 0?!1:o,l=i?console.warn||console.error:console.log;a&&(t&&n?(console.groupCollapsed("%creact-joyride: ".concat(t),"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(n)?n.forEach(function(s){Je.plainObject(s)&&s.key?l.apply(console,[s.key,s.value]):l.apply(console,[s])}):l.apply(console,[n]),console.groupEnd()):console.error("Missing title or data props"))}var hz={action:"",controlled:!1,index:0,lifecycle:se.INIT,size:0,status:de.IDLE},F0=["action","index","lifecycle","status"];function mz(e){var t=new Map,n=new Map,r=function(){function i(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=a.continuous,s=l===void 0?!1:l,u=a.stepIndex,c=a.steps,f=c===void 0?[]:c;Lr(this,i),Z(this,"listener",void 0),Z(this,"setSteps",function(d){var p=o.getState(),h=p.size,m=p.status,E={size:d.length,status:m};n.set("steps",d),m===de.WAITING&&!h&&d.length&&(E.status=de.RUNNING),o.setState(E)}),Z(this,"addListener",function(d){o.listener=d}),Z(this,"update",function(d){if(!dz(d,F0))throw new Error("State is not valid. Valid keys: ".concat(F0.join(", ")));o.setState(H({},o.getNextState(H(H(H({},o.getState()),d),{},{action:d.action||ce.UPDATE}),!0)))}),Z(this,"start",function(d){var p=o.getState(),h=p.index,m=p.size;o.setState(H(H({},o.getNextState({action:ce.START,index:Je.number(d)?d:h},!0)),{},{status:m?de.RUNNING:de.WAITING}))}),Z(this,"stop",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=o.getState(),h=p.index,m=p.status;[de.FINISHED,de.SKIPPED].indexOf(m)===-1&&o.setState(H(H({},o.getNextState({action:ce.STOP,index:h+(d?1:0)})),{},{status:de.PAUSED}))}),Z(this,"close",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(H({},o.getNextState({action:ce.CLOSE,index:p+1})))}),Z(this,"go",function(d){var p=o.getState(),h=p.controlled,m=p.status;if(!(h||m!==de.RUNNING)){var E=o.getSteps()[d];o.setState(H(H({},o.getNextState({action:ce.GO,index:d})),{},{status:E?m:de.FINISHED}))}}),Z(this,"info",function(){return o.getState()}),Z(this,"next",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(o.getNextState({action:ce.NEXT,index:p+1}))}),Z(this,"open",function(){var d=o.getState(),p=d.status;p===de.RUNNING&&o.setState(H({},o.getNextState({action:ce.UPDATE,lifecycle:se.TOOLTIP})))}),Z(this,"prev",function(){var d=o.getState(),p=d.index,h=d.status;h===de.RUNNING&&o.setState(H({},o.getNextState({action:ce.PREV,index:p-1})))}),Z(this,"reset",function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,p=o.getState(),h=p.controlled;h||o.setState(H(H({},o.getNextState({action:ce.RESET,index:0})),{},{status:d?de.RUNNING:de.READY}))}),Z(this,"skip",function(){var d=o.getState(),p=d.status;p===de.RUNNING&&o.setState({action:ce.SKIP,lifecycle:se.INIT,status:de.SKIPPED})}),this.setState({action:ce.INIT,controlled:Je.number(u),continuous:s,index:Je.number(u)?u:0,lifecycle:se.INIT,status:f.length?de.READY:de.IDLE},!0),this.setSteps(f)}return Mr(i,[{key:"setState",value:function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.getState(),u=H(H({},s),a),c=u.action,f=u.index,d=u.lifecycle,p=u.size,h=u.status;t.set("action",c),t.set("index",f),t.set("lifecycle",d),t.set("size",p),t.set("status",h),l&&(t.set("controlled",a.controlled),t.set("continuous",a.continuous)),this.listener&&this.hasUpdatedState(s)&&this.listener(this.getState())}},{key:"getState",value:function(){return t.size?{action:t.get("action")||"",controlled:t.get("controlled")||!1,index:parseInt(t.get("index"),10),lifecycle:t.get("lifecycle")||"",size:t.get("size")||0,status:t.get("status")||""}:H({},hz)}},{key:"getNextState",value:function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.getState(),u=s.action,c=s.controlled,f=s.index,d=s.size,p=s.status,h=Je.number(a.index)?a.index:f,m=c&&!l?f:Math.min(Math.max(h,0),d);return{action:a.action||u,controlled:c,index:m,lifecycle:a.lifecycle||se.INIT,size:a.size||d,status:m===d?de.FINISHED:a.status||p}}},{key:"hasUpdatedState",value:function(a){var l=JSON.stringify(a),s=JSON.stringify(this.getState());return l!==s}},{key:"getSteps",value:function(){var a=n.get("steps");return Array.isArray(a)?a:[]}},{key:"getHelpers",value:function(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}}]),i}();return new r(e)}function lx(e){return e?e.getBoundingClientRect():{}}function gz(){var e=document,t=e.body,n=e.documentElement;return!t||!n?0:Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function ui(e){return typeof e=="string"?document.querySelector(e):e}function vz(e){return!e||e.nodeType!==1?{}:getComputedStyle(e)}function Df(e,t,n){var r=LC(e);if(r.isSameNode(Sl()))return n?document:Sl();var i=r.scrollHeight>r.offsetHeight;return!i&&!t?(r.style.overflow="initial",Sl()):r}function Lf(e,t){if(!e)return!1;var n=Df(e,t);return!n.isSameNode(Sl())}function yz(e){return e.offsetParent!==document.body}function sa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"fixed";if(!e||!(e instanceof HTMLElement))return!1;var n=e.nodeName;return n==="BODY"||n==="HTML"?!1:vz(e).position===t?!0:sa(e.parentNode,t)}function wz(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if(t instanceof HTMLElement){var n=getComputedStyle(t),r=n.display,i=n.visibility;if(r==="none"||i==="hidden")return!1}t=t.parentNode}return!0}function bz(e,t,n){var r=lx(e),i=Df(e,n),o=Lf(e,n),a=0;i instanceof HTMLElement&&(a=i.scrollTop);var l=r.top+(!o&&!sa(e)?a:0);return Math.floor(l-t)}function Mh(e){return e instanceof HTMLElement?e.offsetParent instanceof HTMLElement?Mh(e.offsetParent)+e.offsetTop:e.offsetTop:0}function Ez(e,t,n){if(!e)return 0;var r=LC(e),i=Mh(e);return Lf(e,n)&&!yz(e)&&(i-=Mh(r)),Math.floor(i-t)}function Sl(){return document.scrollingElement||document.createElement("body")}function Sz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sl(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300;return new Promise(function(r,i){var o=t.scrollTop,a=e>o?e-o:o-e;VB.top(t,e,{duration:a<100?50:n},function(l){return l&&l.message!=="Element already at target scroll position"?i(l):r()})})}function Az(e){function t(r,i,o,a,l,s){var u=a||"<>",c=s||o;if(i[o]==null)return r?new Error("Required ".concat(l," `").concat(c,"` was not specified in `").concat(u,"`.")):null;for(var f=arguments.length,d=new Array(f>6?f-6:0),p=6;p0&&arguments[0]!==void 0?arguments[0]:{},t=qn(Cz,e.options||{}),n=290;window.innerWidth>480&&(n=380),t.width&&(window.innerWidth1&&arguments[1]!==void 0?arguments[1]:!1;return Je.plainObject(e)?e.target?!0:(Xi({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(Xi({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function U0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Je.array(e)?e.every(function(n){return sx(n,t)}):(Xi({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var _z=Mr(function e(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Lr(this,e),Z(this,"element",void 0),Z(this,"options",void 0),Z(this,"canBeTabbed",function(i){var o=i.tabIndex;(o===null||o<0)&&(o=void 0);var a=isNaN(o);return!a&&n.canHaveFocus(i)}),Z(this,"canHaveFocus",function(i){var o=/input|select|textarea|button|object/,a=i.nodeName.toLowerCase(),l=o.test(a)&&!i.getAttribute("disabled")||a==="a"&&!!i.getAttribute("href");return l&&n.isVisible(i)}),Z(this,"findValidTabElements",function(){return[].slice.call(n.element.querySelectorAll("*"),0).filter(n.canBeTabbed)}),Z(this,"handleKeyDown",function(i){var o=n.options.keyCode,a=o===void 0?9:o;i.keyCode===a&&n.interceptTab(i)}),Z(this,"interceptTab",function(i){var o=n.findValidTabElements();if(o.length){i.preventDefault();var a=i.shiftKey,l=o.indexOf(document.activeElement);l===-1||!a&&l+1===o.length?l=0:a&&l===0?l=o.length-1:l+=a?-1:1,o[l].focus()}}),Z(this,"isHidden",function(i){var o=i.offsetWidth<=0&&i.offsetHeight<=0,a=window.getComputedStyle(i);return o&&!i.innerHTML?!0:o&&a.getPropertyValue("overflow")!=="visible"||a.getPropertyValue("display")==="none"}),Z(this,"isVisible",function(i){for(var o=i;o;)if(o instanceof HTMLElement){if(o===document.body)break;if(n.isHidden(o))return!1;o=o.parentNode}return!0}),Z(this,"removeScope",function(){window.removeEventListener("keydown",n.handleKeyDown)}),Z(this,"checkFocus",function(i){document.activeElement!==i&&(i.focus(),window.requestAnimationFrame(function(){return n.checkFocus(i)}))}),Z(this,"setFocus",function(){var i=n.options.selector;if(i){var o=n.element.querySelector(i);o&&window.requestAnimationFrame(function(){return n.checkFocus(o)})}}),!(t instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=t,this.options=r,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}),Oz=function(e){ao(n,e);var t=lo(n);function n(r){var i;if(Lr(this,n),i=t.call(this,r),Z(ze(i),"setBeaconRef",function(s){i.beacon=s}),!r.beaconComponent){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style"),l=` - @keyframes joyride-beacon-inner { - 20% { - opacity: 0.9; - } - - 90% { - opacity: 0.7; - } - } - - @keyframes joyride-beacon-outer { - 0% { - transform: scale(1); - } - - 45% { - opacity: 0.7; - transform: scale(0.75); - } - - 100% { - opacity: 0.9; - transform: scale(1); - } - } - `;a.type="text/css",a.id="joyride-beacon-animation",r.nonce!==void 0&&a.setAttribute("nonce",r.nonce),a.appendChild(document.createTextNode(l)),o.appendChild(a)}return i}return Mr(n,[{key:"componentDidMount",value:function(){var i=this,o=this.props.shouldFocus;setTimeout(function(){Je.domElement(i.beacon)&&o&&i.beacon.focus()},0)}},{key:"componentWillUnmount",value:function(){var i=document.getElementById("joyride-beacon-animation");i&&i.parentNode.removeChild(i)}},{key:"render",value:function(){var i=this.props,o=i.beaconComponent,a=i.locale,l=i.onClickOrHover,s=i.styles,u={"aria-label":a.open,onClick:l,onMouseEnter:l,ref:this.setBeaconRef,title:a.open},c;if(o){var f=o;c=k.createElement(f,u)}else c=k.createElement("button",Jt({key:"JoyrideBeacon",className:"react-joyride__beacon",style:s.beacon,type:"button"},u),k.createElement("span",{style:s.beaconInner}),k.createElement("span",{style:s.beaconOuter}));return c}}]),n}(k.Component);function Tz(e){var t=e.styles;return k.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight",style:t})}var Iz=["mixBlendMode","zIndex"],Pz=function(e){ao(n,e);var t=lo(n);function n(){var r;Lr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a=p&&m<=p+c,y=E>=f&&E<=f+h,w=y&&g;w!==s&&r.updateState({mouseOverSpotlight:w})}),Z(ze(r),"handleScroll",function(){var l=r.props.target,s=ui(l);if(r.scrollParent!==document){var u=r.state.isScrolling;u||r.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(function(){r.updateState({isScrolling:!1,showSpotlight:!0})},50)}else sa(s,"sticky")&&r.updateState({})}),Z(ze(r),"handleResize",function(){clearTimeout(r.resizeTimeout),r.resizeTimeout=setTimeout(function(){r._isMounted&&r.forceUpdate()},100)}),r}return Mr(n,[{key:"componentDidMount",value:function(){var i=this.props;i.debug,i.disableScrolling;var o=i.disableScrollParentFix,a=i.target,l=ui(a);this.scrollParent=Df(l,o,!0),this._isMounted=!0,window.addEventListener("resize",this.handleResize)}},{key:"componentDidUpdate",value:function(i){var o=this,a=this.props,l=a.lifecycle,s=a.spotlightClicks,u=Kl(i,this.props),c=u.changed;c("lifecycle",se.TOOLTIP)&&(this.scrollParent.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(function(){var f=o.state.isScrolling;f||o.updateState({showSpotlight:!0})},100)),(c("spotlightClicks")||c("disableOverlay")||c("lifecycle"))&&(s&&l===se.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):l!==se.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),this.scrollParent.removeEventListener("scroll",this.handleScroll)}},{key:"spotlightStyles",get:function(){var i=this.state.showSpotlight,o=this.props,a=o.disableScrollParentFix,l=o.spotlightClicks,s=o.spotlightPadding,u=o.styles,c=o.target,f=ui(c),d=lx(f),p=sa(f),h=bz(f,s,a);return H(H({},M0()?u.spotlightLegacy:u.spotlight),{},{height:Math.round(d.height+s*2),left:Math.round(d.left-s),opacity:i?1:0,pointerEvents:l?"none":"auto",position:p?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round(d.width+s*2)})}},{key:"updateState",value:function(i){this._isMounted&&this.setState(i)}},{key:"render",value:function(){var i=this.state,o=i.mouseOverSpotlight,a=i.showSpotlight,l=this.props,s=l.disableOverlay,u=l.disableOverlayClose,c=l.lifecycle,f=l.onClickOverlay,d=l.placement,p=l.styles;if(s||c!==se.TOOLTIP)return null;var h=p.overlay;M0()&&(h=d==="center"?p.overlayLegacyCenter:p.overlayLegacy);var m=H({cursor:u?"default":"pointer",height:gz(),pointerEvents:o?"none":"auto"},h),E=d!=="center"&&a&&k.createElement(Tz,{styles:this.spotlightStyles});if(ax()==="safari"){m.mixBlendMode,m.zIndex;var g=Sc(m,Iz);E=k.createElement("div",{style:H({},g)},E),delete m.backgroundColor}return k.createElement("div",{className:"react-joyride__overlay",style:m,onClick:f},E)}}]),n}(k.Component),Nz=["styles"],Rz=["color","height","width"];function Dz(e){var t=e.styles,n=Sc(e,Nz),r=t.color,i=t.height,o=t.width,a=Sc(t,Rz);return k.createElement("button",Jt({style:a,type:"button"},n),k.createElement("svg",{width:typeof o=="number"?"".concat(o,"px"):o,height:typeof i=="number"?"".concat(i,"px"):i,viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},k.createElement("g",null,k.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var Lz=function(e){ao(n,e);var t=lo(n);function n(){return Lr(this,n),t.apply(this,arguments)}return Mr(n,[{key:"render",value:function(){var i=this.props,o=i.backProps,a=i.closeProps,l=i.continuous,s=i.index,u=i.isLastStep,c=i.primaryProps,f=i.size,d=i.skipProps,p=i.step,h=i.tooltipProps,m=p.content,E=p.hideBackButton,g=p.hideCloseButton,y=p.hideFooter,w=p.showProgress,S=p.showSkipButton,_=p.title,b=p.styles,A=p.locale,O=A.back,I=A.close,P=A.last,T=A.next,F=A.skip,U={primary:I};return l&&(U.primary=u?P:T,w&&(U.primary=k.createElement("span",null,U.primary," (",s+1,"/",f,")"))),S&&!u&&(U.skip=k.createElement("button",Jt({style:b.buttonSkip,type:"button","aria-live":"off"},d),F)),!E&&s>0&&(U.back=k.createElement("button",Jt({style:b.buttonBack,type:"button"},o),O)),U.close=!g&&k.createElement(Dz,Jt({styles:b.buttonClose},a)),k.createElement("div",Jt({key:"JoyrideTooltip",className:"react-joyride__tooltip",style:b.tooltip},h),k.createElement("div",{style:b.tooltipContainer},_&&k.createElement("h4",{style:b.tooltipTitle,"aria-label":_},_),k.createElement("div",{style:b.tooltipContent},m)),!y&&k.createElement("div",{style:b.tooltipFooter},k.createElement("div",{style:b.tooltipFooterSpacer},U.skip),U.back,k.createElement("button",Jt({style:b.buttonNext,type:"button"},c),U.primary)),U.close)}}]),n}(k.Component),Mz=["beaconComponent","tooltipComponent"],Fz=function(e){ao(n,e);var t=lo(n);function n(){var r;Lr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a0||a===ce.PREV),b=y("action")||y("index")||y("lifecycle")||y("status"),A=w("lifecycle",[se.TOOLTIP,se.INIT],se.INIT),O=y("action",[ce.NEXT,ce.PREV,ce.SKIP,ce.CLOSE]);if(O&&(A||u)&&l(H(H({},S),{},{index:i.index,lifecycle:se.COMPLETE,step:i.step,type:kt.STEP_AFTER})),m.placement==="center"&&h===de.RUNNING&&y("index")&&a!==ce.START&&d===se.INIT&&E({lifecycle:se.READY}),b){var I=ui(m.target),P=!!I,T=P&&wz(I);T?(w("status",de.READY,de.RUNNING)||w("lifecycle",se.INIT,se.READY))&&l(H(H({},S),{},{step:m,type:kt.STEP_BEFORE})):(console.warn(P?"Target not visible":"Target not mounted",m),l(H(H({},S),{},{type:kt.TARGET_NOT_FOUND,step:m})),u||E({index:f+([ce.PREV].indexOf(a)!==-1?-1:1)}))}w("lifecycle",se.INIT,se.READY)&&E({lifecycle:L0(m)||_?se.TOOLTIP:se.BEACON}),y("index")&&Xi({title:"step:".concat(d),data:[{key:"props",value:this.props}],debug:c}),y("lifecycle",se.BEACON)&&l(H(H({},S),{},{step:m,type:kt.BEACON})),y("lifecycle",se.TOOLTIP)&&(l(H(H({},S),{},{step:m,type:kt.TOOLTIP})),this.scope=new _z(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus()),w("lifecycle",[se.TOOLTIP,se.INIT],se.INIT)&&(this.scope.removeScope(),delete this.beaconPopper,delete this.tooltipPopper)}},{key:"componentWillUnmount",value:function(){this.scope.removeScope()}},{key:"open",get:function(){var i=this.props,o=i.step,a=i.lifecycle;return!!(L0(o)||a===se.TOOLTIP)}},{key:"render",value:function(){var i=this.props,o=i.continuous,a=i.debug,l=i.helpers,s=i.index,u=i.lifecycle,c=i.nonce,f=i.shouldScroll,d=i.size,p=i.step,h=ui(p.target);return!sx(p)||!Je.domElement(h)?null:k.createElement("div",{key:"JoyrideStep-".concat(s),className:"react-joyride__step"},k.createElement(Bz,{id:"react-joyride-portal"},k.createElement(Pz,Jt({},p,{debug:a,lifecycle:u,onClickOverlay:this.handleClickOverlay}))),k.createElement(Mg,Jt({component:k.createElement(Fz,{continuous:o,helpers:l,index:s,isLastStep:s+1===d,setTooltipRef:this.setTooltipRef,size:d,step:p}),debug:a,getPopper:this.setPopper,id:"react-joyride-step-".concat(s),isPositioned:p.isFixed||sa(h),open:this.open,placement:p.placement,target:p.target},p.floaterProps),k.createElement(Oz,{beaconComponent:p.beaconComponent,locale:p.locale,nonce:c,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:f,styles:p.styles})))}}]),n}(k.Component),ux=function(e){ao(n,e);var t=lo(n);function n(r){var i;return Lr(this,n),i=t.call(this,r),Z(ze(i),"initStore",function(){var o=i.props,a=o.debug,l=o.getHelpers,s=o.run,u=o.stepIndex;i.store=new mz(H(H({},i.props),{},{controlled:s&&Je.number(u)})),i.helpers=i.store.getHelpers();var c=i.store.addListener;return Xi({title:"init",data:[{key:"props",value:i.props},{key:"state",value:i.state}],debug:a}),c(i.syncState),l(i.helpers),i.store.getState()}),Z(ze(i),"callback",function(o){var a=i.props.callback;Je.function(a)&&a(o)}),Z(ze(i),"handleKeyboard",function(o){var a=i.state,l=a.index,s=a.lifecycle,u=i.props.steps,c=u[l],f=window.Event?o.which:o.keyCode;s===se.TOOLTIP&&f===27&&c&&!c.disableCloseOnEsc&&i.store.close()}),Z(ze(i),"syncState",function(o){i.setState(o)}),Z(ze(i),"setPopper",function(o,a){a==="wrapper"?i.beaconPopper=o:i.tooltipPopper=o}),Z(ze(i),"shouldScroll",function(o,a,l,s,u,c,f){return!o&&(a!==0||l||s===se.TOOLTIP)&&u.placement!=="center"&&(!u.isFixed||!sa(c))&&f.lifecycle!==s&&[se.BEACON,se.TOOLTIP].indexOf(s)!==-1}),i.state=i.initStore(),i}return Mr(n,[{key:"componentDidMount",value:function(){if(Qr){var i=this.props,o=i.disableCloseOnEsc,a=i.debug,l=i.run,s=i.steps,u=this.store.start;U0(s,a)&&l&&u(),o||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}}},{key:"componentDidUpdate",value:function(i,o){if(Qr){var a=this.state,l=a.action,s=a.controlled,u=a.index,c=a.lifecycle,f=a.status,d=this.props,p=d.debug,h=d.run,m=d.stepIndex,E=d.steps,g=i.steps,y=i.stepIndex,w=this.store,S=w.reset,_=w.setSteps,b=w.start,A=w.stop,O=w.update,I=Kl(i,this.props),P=I.changed,T=Kl(o,this.state),F=T.changed,U=T.changedFrom,X=$a(E[u],this.props),oe=!Lh(g,E),ne=Je.number(m)&&P("stepIndex"),fe=ui(X==null?void 0:X.target);if(oe&&(U0(E,p)?_(E):console.warn("Steps are not valid",E)),P("run")&&(h?b(m):A()),ne){var B=y=0?b:0,s===de.RUNNING&&Sz(b,_,m)}}}},{key:"render",value:function(){if(!Qr)return null;var i=this.state,o=i.index,a=i.status,l=this.props,s=l.continuous,u=l.debug,c=l.nonce,f=l.scrollToFirstStep,d=l.steps,p=$a(d[o],this.props),h;return a===de.RUNNING&&p&&(h=k.createElement(Uz,Jt({},this.state,{callback:this.callback,continuous:s,debug:u,setPopper:this.setPopper,helpers:this.helpers,nonce:c,shouldScroll:!p.disableScrolling&&(o!==0||f),step:p,update:this.store.update}))),k.createElement("div",{className:"react-joyride"},h)}}]),n}(k.Component);Z(ux,"defaultProps",{continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:function(){},hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]});const zz=M("div",{children:[v("p",{children:"You can see how the changes impact your app with the app preview."}),v("p",{children:"Click in the center of the preview to expand it to full screen to get a better view of your app."}),v("p",{children:'Any log messages from the app will be placed into the "App Logs" drawer.'})]}),jz=M("div",{children:[v("p",{children:"The app view shows a skeleton view of the current state of your app's UI."}),v("p",{children:"You can click on elements to select them or drag them around to move them."}),v("p",{children:"Cards can be resized by dragging resize handles on the sides."}),v("p",{children:"Rows and Columns can be resized by dragging between tracts and added by hovering over the left and top respectively to reveal the tract controls widget."}),v("p",{children:v("a",{href:"https://rstudio.github.io/shinyuieditor/articles/how-to.html#show-size-widget",children:"More info"})})]}),Wz=M("div",{children:["Drag elements from the elements palette into the app pane on the right to add them to your app. ",v("br",{})," In the app view, the areas available for the element to be dropped in will pulse with an"," ",v("span",{className:"can-accept-drop",style:{padding:"2px"},children:"orange outline."})]}),Yz=M("div",{children:[v("p",{children:"After selecting an element in your app, you can adjust the settings for that element in the properties pane."}),v("p",{children:"Changes made will be automatically applied to your element both in the app view and your code so there's no need to save or submit these changes."})]}),Vz=[{target:".app-view",content:jz,disableBeacon:!0},{target:".elements-panel",content:Wz,placement:"right-start",disableBeacon:!0},{target:".properties-panel",content:Yz,placement:"left-start"},{target:".app-preview",content:zz,placement:"top-start"},{target:".undo-redo-buttons",content:"Mess something up? You can use the change history to undo or redo your changes",placement:"bottom"}];function $z(){const[e,t]=q.useState(0),[n,r]=q.useState(!1),i=q.useCallback(a=>{const{action:l,index:s,type:u}=a;(u===kt.STEP_AFTER||u===kt.TARGET_NOT_FOUND)&&(l===ce.NEXT?t(s+1):l===ce.PREV?t(s-1):l===ce.CLOSE&&r(!1)),u===kt.TOUR_END&&(l===ce.NEXT&&(r(!1),t(0)),l===ce.SKIP&&r(!1))},[]),o=q.useCallback(()=>{r(!0)},[]);return M(We,{children:[M(mt,{onClick:o,title:"Take a guided tour of app",variant:"transparent",children:[v(f4,{id:"tour",size:"24px"}),"Tour App"]}),v(ux,{callback:i,steps:Vz,stepIndex:e,run:n,continuous:!0,showProgress:!0,showSkipButton:!0,disableScrolling:!0,locale:{next:"Next",back:"Back",close:"Close",last:"Let's go!",open:"Open the dialog",skip:"Skip tour"},styles:Gz})]})}const z0="#e07189",Hz="#f6d5dc",Gz={options:{arrowColor:"var(--rstudio-white, white)",backgroundColor:"var(--rstudio-white, white)",primaryColor:"var(--rstudio-blue, steelblue)",textColor:"var(--rstudio-grey, black)"},beaconInner:{backgroundColor:z0},beaconOuter:{backgroundColor:Hz,border:`2px solid ${z0}`}},Jz=e=>v("svg",$(R({viewBox:"0 0 168 114",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Shiny Logo"},e),{children:v("path",{opacity:.9,d:"M17.524 62.626c-.898-.027-.3 0 0 0Zm-.027 0c-.871-.027-.49 0-.19 0h.462-.272c.272.027.19 0 0 0Zm.244 0c9.497.218 19.43-1.986 22.313-13.279 1.878-7.293-2.802-12.599-6.938-17.932-.028-.027-.055-.054-.055-.109-.163-.68-4.653-4.816-5.904-6.367 0-.027-.028-.027-.055-.055-.599-.435-1.224-2.64-1.524-3.864a3.323 3.323 0 0 1-.027-1.55c1.089-5.552 1.687-9.606 9.061-8.409 5.306.871 2.558 8.653 5.415 9.415h.055c1.714.164 5.06-3.945 5.55-5.333 1.905-5.388-9.088-8.68-12.435-8.463-6.72.408-11.129 4.055-13.823 10.068-4.952 11.075 4.3 18.45 9.905 26.041 4.245 5.742 4.054 10.857-1.143 15.782-5.714 5.415-12.354-2.04-13.116-7.292-.68-4.816-.625-8.163-4.653-2.04-3.728 5.686.11 13.088 7.374 13.387ZM167.266 36.34v.055a13.555 13.555 0 0 1-.762 3.428 27.79 27.79 0 0 1-2.693 5.306c-1.334 2.041-2.041 2.857-3.429 4.653-2.612 3.402-4.626 5.932-7.674 9.17-4.244 4.49-8.979 9.633-14.149 13.306-7.374 5.28-16.68 6.722-25.497 7.538-25.796 2.34-63.755 5.823-71.755 33.741-.054.164-.19.245-.354.191-.081-.027-.136-.055-.163-.136-7.837-13.388-24.68-23.211-40.3-22.748-.162.027-.299-.055-.326-.218-.027-.163.055-.3.218-.327 40.218-19.972 81.306-10.394 124.735-18.15 10.857-1.931 19.972-9.06 26.53-17.632 2.504-3.238 5.715-5.986 7.919-9.442.353-.572 2.176-5.116-.653-3.184-4.381 2.966-8.082 6.64-12.844 8.953a5.605 5.605 0 0 1-.707.299c-.082.027-.137.109-.164.19a27.286 27.286 0 0 1-2.857 6.368 18.325 18.325 0 0 1-5.66 5.632c-2.122 1.415-4.598 2.232-7.129 2.422-.354.027-.68.027-1.034.027-2.014 0-3.32-.163-4.871-.952-1.986-1.034-2.612-2.721-2.748-4.762-.082-1.224.68-2.558 1.306-3.565.626-1.006 1.633-2.122 2.34-2.421l.055-.028c3.537-2.612 9.551-2.802 13.632-3.918.109-.027.191-.109.191-.19l2.041-7.456c.054-.163-.055-.3-.191-.354a.301.301 0 0 0-.299.109 40.263 40.263 0 0 1-3.402 4.326c-1.605 1.688-2.857 2.721-3.809 3.102a11.152 11.152 0 0 1-3.374.708c-1.361.082-2.531-.463-3.429-1.605-.898-1.143-1.388-2.83-1.496-5.062a8.521 8.521 0 0 1 0-1.197.312.312 0 0 0-.191-.354.313.313 0 0 0-.354.19c-.435.844-.87 1.633-1.306 2.34-1.279 2.232-2.884 4.273-4.707 6.096-1.796 1.796-3.538 2.748-5.143 2.857-3.021.19-4.653-1.523-4.871-5.115-.218-3.429 1.143-10.477 4.082-20.98.163-.462.217-.952.19-1.415-.054-.952-.598-1.333-1.714-1.252a6.312 6.312 0 0 0-3.51 1.47 12.19 12.19 0 0 0-3.021 3.837c-.898 1.632-1.687 3.32-2.421 5.034a42.75 42.75 0 0 0-1.878 5.823c-.544 2.204-1.007 4.054-1.306 5.496a144.944 144.944 0 0 0-.925 4.708c-.218 1.143-.463 2.557-.517 2.775l-.055.218-7.483.49-.027-.272c-.054-.654.49-2.966 1.578-7.02l-.653 1.142a29.066 29.066 0 0 1-4.68 6.095c-1.796 1.796-3.537 2.749-5.143 2.857h-.326c-2.64 0-4.136-2.068-4.381-6.15-.055-.816-.082-1.632-.055-2.475a.312.312 0 0 0-.19-.354.312.312 0 0 0-.354.19c-4.109 7.538-7.81 11.347-11.238 11.565-3.02.19-4.653-1.605-4.898-5.36-.272-4.164.87-10.26 3.401-18.096.545-1.932.79-3.265.735-3.973-.082-1.088-.571-1.224-.98-1.224h-.108c-.354.027-1.116.245-2.722 1.252a14.477 14.477 0 0 0-3.646 3.4c-1.17 1.525-2.095 3.239-2.775 5.035-.708 1.905-1.28 3.565-1.687 4.952-.408 1.388-.817 3.102-1.225 5.062-.408 1.959-.762 3.646-1.088 4.898a73.777 73.777 0 0 0-.98 4.353l-.054.218-7.184.462c-.163 0-.3-.108-.3-.272v-.108c1.062-3.674 2.559-9.633 4.463-17.688 1.905-8.054 3.647-14.503 5.061-19.129 1.225-4.027 2.667-8 4.354-11.836a32.438 32.438 0 0 1 5.225-8.273c2.04-2.285 4.326-3.51 6.748-3.673 2.558-.163 3.919 1.116 4.109 3.755.109 1.769-.408 4.136-1.524 7.102-2.04 5.252-5.442 11.374-10.15 18.204a.296.296 0 0 0 0 .408c.11.11.3.11.409 0a16.315 16.315 0 0 1 2.612-1.66c1.36-.707 2.857-1.115 4.408-1.251 2.912-.19 4.463 1.143 4.653 3.945a8.216 8.216 0 0 1-.326 3.048c-.273.898-.572 1.96-.926 3.13-.326 1.17-.598 2.149-.816 2.884-.218.761-.49 1.768-.844 3.047-.353 1.28-.625 2.395-.789 3.266-.49 2.204-.68 3.972-.598 5.251.109 1.633.762 1.633.98 1.633h.081c2.748-.163 5.986-4.953 9.66-14.204.027-.055.027-.082.054-.136a64.454 64.454 0 0 1 3.184-8.925c1.524-3.347 3.374-5.116 5.551-5.252l4.354-.218c.163 0 .299.109.299.272a.31.31 0 0 1-.082.218c-.68.653-1.578 2.395-2.666 5.197-1.143 3.02-1.932 5.089-2.45 6.476-.516 1.443-1.115 3.402-1.74 5.85-.627 2.45-.899 4.409-.79 5.878.136 1.932.87 1.932 1.116 1.932h.081c.381-.027 1.089-.299 2.368-1.47a14.924 14.924 0 0 0 2.53-3.02c.653-1.06 1.36-2.394 2.15-4.027.79-1.632 1.47-3.047 2.04-4.245.627-1.279.872-1.714 1.035-1.877l.354-.653c1.333-5.388 1.959-9.17 1.823-11.266a2.31 2.31 0 0 0-.245-1.034c-.082-.108-.082-.299.054-.38a.387.387 0 0 1 .163-.055l3.02-.19c1.77-.11 2.885 0 3.457.38.571.381.925 1.007.952 1.66a9.83 9.83 0 0 1-.19 1.987c-.028.163.081.3.245.326.081.028.19-.027.244-.081 3.402-3.538 6.939-5.442 10.585-5.66 2.912-.19 4.49 1.197 4.654 4.109.054.925 0 1.85-.191 2.775-.19.925-.653 2.721-1.469 5.497-1.715 5.959-2.531 9.959-2.395 11.918.082 1.388.626 1.551 1.034 1.551h.082c.381-.027 1.088-.3 2.34-1.496a17.296 17.296 0 0 0 2.558-3.075 43.208 43.208 0 0 0 2.177-3.973c.789-1.578 1.442-2.993 2.013-4.19.191-.436.354-.762.49-1.035 0-.027.027-.027.027-.054.789-3.32 1.714-6.068 2.776-8.19 1.224-2.504 2.612-4.164 4.081-4.98 1.47-.816 3.483-1.279 6.068-1.442a.58.58 0 0 1 .626.517v.054c.027.3-.136.626-.462 1.034-1.824 1.987-3.592 5.497-5.307 10.45-1.714 4.952-2.448 9.115-2.258 12.435.109 1.523.49 2.313 1.143 2.313h.054c1.606-.11 3.647-2.096 6.014-5.932a50.108 50.108 0 0 0 5.442-11.674c.163-.544.381-1.306.68-2.34.3-1.034.517-1.714.626-2.095.109-.381.327-.925.599-1.606.19-.544.462-1.034.789-1.496.218-.245.544-.572.925-.98.381-.408.816-.707 1.333-.87a19.15 19.15 0 0 1 3.919-.735l3.02-.19c.136-.055.3.026.354.162.054.137-.027.3-.163.354l-.055.055c-1.36 1.06-2.694 3.591-3.945 7.537-1.034 3.347-1.905 6.449-2.585 9.197a295.694 295.694 0 0 1-1.279 5.034c-.164.599-.517 2.068-1.061 4.3a177.514 177.514 0 0 1-1.062 4.19c-.054.136 0 .3.136.354.082.027.191.027.272-.055a43.638 43.638 0 0 0 8.164-6.313c1.387-1.387 11.918-13.088 12.408-5.66l.054.327ZM66.503 2.708c-1.06.054-2.938 1.687-5.768 8.98-1.96 5.033-3.864 10.775-5.687 17.087-.055.164.054.3.19.354.109.027.245 0 .327-.109 4.898-7.483 8.299-13.714 10.095-18.585 1.115-3.32 1.633-5.523 1.578-6.503-.082-1.197-.544-1.197-.68-1.197l-.055-.027ZM137.17 54c.054-.136-.027-.3-.163-.354a.173.173 0 0 0-.163 0c-1.47.3-2.939.544-4.381.898-2.041.49-5.143.98-6.722 2.694-.027.027-.027.054-.054.082-.272.598-.326 1.55-.272 2.748.054.844.871 1.633 1.578 2.204a3.24 3.24 0 0 0 2.313.68c3.211-.244 5.85-3.238 7.864-8.952ZM88.517 18.98c1.742-.082 3.918-.735 4.435-3.32.245-1.17-.462-2.504-.898-2.885-.435-.38-1.034-.544-1.823-.49-.789.055-1.741.545-2.64 1.389-1.196 1.115-1.142 2.72-.761 3.782.354.898.98 1.496 1.687 1.524Z",fill:"#fff"})})),Qz="_container_1d7pe_1",Kz={container:Qz};function qz({goBackward:e,canGoBackward:t,goForward:n,canGoForward:r}){return M("div",{className:Xe(Kz.container,"undo-redo-buttons"),children:[v(mt,{variant:["transparent","icon"],disabled:!t,"aria-label":"Undo last change",title:"Undo last change",onClick:e,children:v(m4,{height:"100%"})}),v(mt,{variant:["transparent","icon"],disabled:!r,"aria-label":"Redo last change",title:"Redo last change",onClick:n,children:v(h4,{height:"100%"})})]})}function Xz(){const{sendMsg:e,mode:t}=rs();return t!=="VSCODE"?null:M(We,{children:[v(Rr,{text:"Open app code next to editor",onClick:()=>{e({path:"OPEN-COMPANION-EDITOR",payload:"BESIDE"})},className:"OpenSideBySideWindowButton",children:v(H4,{})}),v("div",{className:"divider"})]})}function Zz({state:e,history:t}){return M("header",{className:Dn.header,children:[v(Jz,{className:Dn.shiny_logo}),v("h1",{className:Dn.app_title,children:"Shiny UI Editor"}),M("div",{className:Dn.right,children:[e.mode==="MAIN"?M(We,{children:[v(Xz,{}),v($z,{})]}):null,v("div",{className:Dn.divider}),v(qz,R({},t)),v("div",{className:Xe(Dn.spacer,Dn.last)})]})]})}function ej(){return is(t=>t.connected_to_server)?null:v(rC,{onConfirm:()=>{},onCancel:()=>{},children:v("p",{style:{color:"var(--red, pink)",textAlign:"center"},children:"Lost connection to backend. Check console where editor was launched for details."})})}function tj(){const{state:e,history:t}=t7();return M("div",{className:Dn.EditorContainer,style:mE,children:[v(Zz,{state:e,history:t}),v(gB,{state:e}),v(ej,{})]})}const nj=lf({name:"connectedToServer",initialState:!0,reducers:{DISCONNECTED_FROM_SERVER:(e,t)=>!1}}),rj=nj.reducer;function ij({selectedPath:e,deletedPath:t}){if(e===null)return e;if(pa(t,e))return oj(e);if(e.lengthi)return e;const o=[...e],a=i-1;return a<0||(o[n]=a),o}function oj(e){return e.slice(0,e.length-1)}const cx=$m();cx.startListening({actionCreator:dS,effect:(e,t)=>so(Ss,null,function*(){const n=e.payload.path,r=t.getState().selected_path;if(r===null)return;const i=ij({selectedPath:r,deletedPath:n});t.dispatch(cf({path:i}))})});const aj=cx.middleware;function lj({fromPath:e,toPath:t}){const n=ji(e);if(ji(t)=t[i])return t;const o=[...t];return o[i]--,o}const fx=$m();fx.startListening({actionCreator:fS,effect:(e,t)=>so(Ss,null,function*(){const n=e.payload;let r=n.path;lS(n)&&(r=lj({fromPath:n.currentPath,toPath:r})),t.dispatch(cf({path:r}))})});const sj=fx.middleware,dx=$m();dx.startListening({actionCreator:pS,effect:(e,t)=>so(Ss,null,function*(){t.dispatch(cf({path:[]}))})});const uj=dx.middleware,cj=LO({reducer:{app_info:lI,selected_path:uT,connected_to_server:rj,currentlyDraggedNode:lT},middleware:e=>e().concat(aj).concat(sj).concat(uj)});function fj({children:e}){return v(Y_,{store:cj,children:e})}function dj({showMessages:e=!0,defaultTree:t,backendDispatch:{sendMsg:n,incomingMsgs:r,mode:i}=Y0({messageDispatch:W0(),showMessages:e,defaultTree:t!=null?t:"TEMPLATE_CHOOSER"})}){return v(fj,{children:v(e_,$(R({},e?{sendMsg:n,incomingMsgs:{subscribe:(a,l)=>(console.log(`backendMsgs.subscribe("${a}", ...)`),r.subscribe(a,l))},mode:i}:{sendMsg:n,incomingMsgs:r,mode:i}),{children:v(tj,{})}))})}function pj({container:e,showMessages:t,backendDispatch:n}){Zb(e).render(v(dj,{backendDispatch:n,showMessages:t}))}const hj=document.getElementById("root"),{pathToWebsocket:mj,defaultTree:gj}={pathToWebsocket:void 0,defaultTree:"TEMPLATE_CHOOSER"},j0=!0;so(Ss,null,function*(){try{const e=W0(),t=yield bx({messageDispatch:e,onClose:()=>console.log("Websocket closed!!"),pathToWebsocket:mj}),n=t==="NO-WS-CONNECTION"?Y0({messageDispatch:e,showMessages:j0,defaultTree:gj}):t;pj({container:hj,backendDispatch:n,showMessages:j0})}catch(e){}})});export default vj(); diff --git a/inst/editor/build/index.html b/inst/editor/build/index.html index baa534f02..6fda27f85 100644 --- a/inst/editor/build/index.html +++ b/inst/editor/build/index.html @@ -26,42 +26,8 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Shiny UI Editor -<<<<<<< refs/remotes/origin/main -<<<<<<< refs/remotes/origin/main -<<<<<<< refs/remotes/origin/main -<<<<<<< refs/remotes/origin/main -<<<<<<< refs/remotes/origin/main -<<<<<<< refs/remotes/origin/main -<<<<<<< refs/remotes/origin/main - - -======= - - ->>>>>>> Break up css modules for editor container to separate modules per component -======= - - ->>>>>>> Add new functions for generating prefilled github issue templates -======= - -======= - ->>>>>>> Separate the Node Error View from common core we can use in other parts of app - ->>>>>>> Make url generation safe to overflow -======= - - ->>>>>>> Simplify node template to reflect newer practices -======= - - ->>>>>>> Make Button component ref-forwardable -======= - + ->>>>>>> Replace poperjs pased rich tooltips with newer floatingui based approach diff --git a/inst/editor/vite.config.ts b/inst/editor/vite.config.ts index df72c1ae1..819737850 100644 --- a/inst/editor/vite.config.ts +++ b/inst/editor/vite.config.ts @@ -34,9 +34,6 @@ const setup = ({ mode }) => { globals: true, environment: "jsdom", setupFiles: "src/setupTests.js", - deps: { - inline: true, - }, }, }); };