(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const n of e)if(n.type==="childList")for(const u of n.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(e){const n={};return e.integrity&&(n.integrity=e.integrity),e.referrerpolicy&&(n.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?n.credentials="include":e.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(e){if(e.ep)return;e.ep=!0;const n=s(e);fetch(e.href,n)}})();const a=new Shiny.InputBinding,r=new Shiny.InputBinding;$.extend(a,{find:function(t){return $(t).find(".icon-button")},initialize:function(t){return $(t).data("value")},getValue:function(t){return $(t).data("value")},subscribe:function(t){$(t).on("click",function(o){const s=$(t).data("value");navigator.clipboard.writeText(s).then(function(){console.log("copied: ",s),$("#status-success").addClass("show"),$("#status-success").find("p").text(`Copied '${$(t).data("icon")}'`),setTimeout(function(){$("#status-success").removeClass("show")},3500)},function(){$("#status-failed").addClass("show"),setTimeout(function(){$("#status-failed").removeClass("show")},3500)})})},unsubscribe:function(t){$(t).off(".iconButton")}});$.extend(r,{find:function(t){return $(t).find(".select-input-group")},initialize:function(t){const o=$(t).find(".select-input-option-button").first(),s=o.data("value"),i=o.text();o.addClass("selected"),$(t).find(".select-input-selected").text(i),$(t).data("value",s)},getValue:function(t){return $(t).data("value")},subscribe:function(t,o){const s=$(t).find(".select-input-selected"),i=$(t);$(t).on("click","button.select-input-parent",function(n){i.toggleClass("hidden"),i.hasClass("hidden")||s.text("----")}),$(t).on("click","button.select-input-option-button",function(n){$(t).find(".select-input-option-button").removeClass("selected");const u=$(n.target).data("value"),c=$(n.target).text();$(t).data("value",u),$(n.target).addClass("selected"),s.text(c),i.toggleClass("hidden"),o()}),$(t).on("focus","button.select-input-parent",function(n){i.toggleClass("hidden")});const e=$(t).find("button.select-input-option-button");$(e).on("focus",function(n){i.removeClass("hidden");const u=e.length-1,c=e[u];n.target.nextSibling&&$(c).on("blur",function(l){i.addClass("hidden")})})},unsubscribe:function(t){$(t).off(".selectInputToggle")}});Shiny.inputBindings.register(a);Shiny.inputBindings.register(r);
