@openproject/primer-view-components 0.82.1 → 0.83.0-rc.0d7454d16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/app/assets/javascripts/primer_view_components.js +1 -1
  2. package/app/assets/javascripts/primer_view_components.js.map +1 -1
  3. package/app/assets/styles/primer_view_components.css +1 -1
  4. package/app/assets/styles/primer_view_components.css.map +1 -1
  5. package/app/components/primer/alpha/action_bar_element.js +68 -77
  6. package/app/components/primer/alpha/action_list.js +1 -1
  7. package/app/components/primer/alpha/action_menu/action_menu_element.js +1 -1
  8. package/app/components/primer/alpha/dialog.css +1 -1
  9. package/app/components/primer/alpha/dialog.css.json +2 -1
  10. package/app/components/primer/alpha/segmented_control.js +1 -1
  11. package/app/components/primer/alpha/select_panel_element.js +3 -1
  12. package/app/components/primer/alpha/toggle_switch.js +1 -1
  13. package/app/components/primer/alpha/tool_tip.js +1 -1
  14. package/app/components/primer/alpha/tree_view/tree_view.js +1 -1
  15. package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +1 -1
  16. package/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.js +1 -1
  17. package/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.js +25 -2
  18. package/app/components/primer/alpha/x_banner.js +1 -1
  19. package/app/components/primer/beta/blankslate.css +1 -1
  20. package/app/components/primer/beta/blankslate.css.json +1 -0
  21. package/app/components/primer/beta/details_toggle_element.js +1 -1
  22. package/app/components/primer/beta/nav_list.js +1 -1
  23. package/app/components/primer/beta/nav_list_group_element.js +1 -1
  24. package/app/components/primer/dialog_helper.js +24 -9
  25. package/app/components/primer/scrollable_region.js +1 -1
  26. package/app/lib/primer/forms/primer_multi_input.js +1 -1
  27. package/app/lib/primer/forms/primer_text_area.js +1 -1
  28. package/app/lib/primer/forms/primer_text_field.js +1 -1
  29. package/app/lib/primer/forms/toggle_switch_input.js +1 -1
  30. package/package.json +5 -4
  31. package/static/arguments.json +38 -1
  32. package/static/classes.json +3 -0
  33. package/static/constants.json +17 -0
  34. package/static/info_arch.json +77 -58
  35. package/static/previews.json +13 -0
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var t,e,i,n,s,o,r,a,l=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},c=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const d=new WeakMap;let h=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),i.set(this,new IntersectionObserver((e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,i,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",n).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){h=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,i){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",n).call(this):"loading"===e&&this.isConnected&&"eager"!==i&&"eager"===this.loading&&l(this,t,"m",n).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",n).call(this),"lazy"===this.loading&&l(this,i,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){d.delete(this),l(this,t,"m",n).call(this)}}e=new WeakMap,i=new WeakMap,t=new WeakSet,n=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,i,"f").unobserve(this);try{const i=await l(this,t,"m",s).call(this);if(i instanceof Error)throw i;const n=i,o=document.createElement("template");o.innerHTML=n;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,i=d.get(this);if(i&&i.src===e)return i.data;{let i;return i=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),d.set(this,{src:e,data:i}),i}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t,e){await new Promise((t=>setTimeout(t,0)));for(const i of t)this.dispatchEvent(e?new CustomEvent(i,{detail:{error:e}}):new Event(i))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const i=await this.fetch(this.request()),n=i.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||n&&n.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${n}`);if(200!==i.status)throw new Error(`Failed to load resource: the server responded with a status of ${i.status}`);const s=await i.text();let o=s;if(h){o=(await h).createHTML(s,i)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"],e),e}var e};const u="undefined"!=typeof globalThis?globalThis:window;try{u.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(u.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const m=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=f.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};m.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&f(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=m.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=m.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function f(t,e,i){const n=t.input;if(!n)return;const s=m.get(t);if(!s)return;const o=n.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let d;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let h="";try{d=await async function(t,e,i){try{const n=await fetch(e,i);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),n}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),h=await d.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}d&&d.ok?(a.innerHTML=h,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:i?i.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(i){clearTimeout(e),e=setTimeout((()=>{clearTimeout(e),t(i)}),300)}}function g(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,i,r):s(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}function b(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)}function v(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){k(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const i=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)C(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&k(t)}));i.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const n={get closed(){return e},unsubscribe(){e=!0,E.delete(t),i.disconnect()}};return E.set(t,n),n}function k(t){for(const e of t.querySelectorAll("[data-action]"))C(e);t instanceof Element&&t.hasAttribute("data-action")&&C(t)}function L(t){const e=t.currentTarget;for(const i of T(e))if(t.type===i.type){const n=e.closest(i.tag);w.has(n)&&"function"==typeof n[i.method]&&n[i.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(i.tag)){const e=s.host;"function"==typeof e[i.method]&&e[i.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),i=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,i),method:e.slice(i+1)||"handleEvent"}||"handleEvent"}}function C(t){for(const e of T(t))t.addEventListener(e.type,L)}const S=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),x=(t,e="property")=>{const i=S(t);if(!i.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return i};const M="attr";function I(t,e){O(t,M).add(e)}const D=new WeakSet;function P(t,e){if(D.has(t))return;D.add(t);const i=Object.getPrototypeOf(t),n=i?.constructor?.attrPrefix??"data-";e||(e=O(i,M));for(const i of e){const e=t[i],s=x(`${n}${i}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,i,o),i in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const H=Symbol.for("catalyst");class N{constructor(t){const e=this,i=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,i)};const n=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,n)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,i,n){e.attributeChangedCallback(this,t,i,n,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const i=t.attrPrefix??"data-",n=t=>x(`${i}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...O(t.prototype,M)].map(n).concat(e),set(t){e=t}})}(t),function(t){const e=S(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),P(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),k(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&y(t.shadowRoot)}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,i,n,s){P(t),"data-catalyst"!==e&&s&&s.call(t,e,i,n)}}function O(t,e){if(!Object.prototype.hasOwnProperty.call(t,H)){const e=t[H],i=t[H]=new Map;if(e)for(const[t,n]of e)i.set(t,new Set(n))}const i=t[H];return i.has(e)||i.set(e,new Set),i.get(e)}function F(t,e){O(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase();if(t.shadowRoot)for(const n of t.shadowRoot.querySelectorAll(`[data-target~="${i}.${e}"]`))if(!n.closest(i))return n;for(const n of t.querySelectorAll(`[data-target~="${i}.${e}"]`))if(n.closest(i)===t)return n}(this,e)}})}function q(t,e){O(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase(),n=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)||n.push(s);for(const s of t.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)===t&&n.push(s);return n}(this,e)}})}function V(t){new N(t)}var R;new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const i={once:!0,passive:!0,signal:e.signal},n=()=>e.abort();document.addEventListener("mousedown",n,i),document.addEventListener("touchstart",n,i),document.addEventListener("keydown",n,i),document.addEventListener("pointerdown",n,i)}));class W{constructor(t){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}})),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const i=t.querySelector(".ActionListItem-truncationTooltip");if(!i)continue;const n=e.scrollWidth>e.clientWidth;i.style.display=n?"":"none"}}}let B=class ActionListElement extends HTMLElement{constructor(){super(...arguments),R.set(this,void 0)}connectedCallback(){v(this,R,new W(this),"f")}disconnectedCallback(){b(this,R,"f").unobserve(this)}};R=new WeakMap,B=g([V],B);const $={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},U={start:["end","center"],end:["start","center"],center:["end","start"]};function K(t,e,i={}){const n=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e instanceof Element;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const i=e!==document.body&&e instanceof HTMLElement?e:document.body,n=i.getBoundingClientRect(),s=getComputedStyle(i),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:n.top+o,left:n.left+r,width:n.width-a-r,height:Math.max(n.height-o-l,i===document.body?window.innerHeight:-1/0)}}(n),o=getComputedStyle(n),r=n.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,i,n,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let d=z(i,n,s,o,a,l),h=s,u=o;if(d.top-=e.top,d.left-=e.left,!r){const r=$[s];let m=0;if(r){let t=s;for(;m<r.length&&_(t,d,c,i);){const s=r[m++];t=s,d=z(i,n,s,o,a,l),d.top-=e.top,d.left-=e.left,h=s}}const f=U[o];let p=0;if(f){let t=o;for(;p<f.length&&Y(t,d,c,i);){const s=f[p++];t=s,d=z(i,n,h,s,a,l),d.top-=e.top,d.left-=e.left,u=s}}d.top<c.top&&(d.top=c.top),d.left<c.left&&(d.left=c.left),d.left+i.width>t.width+c.left&&(d.left=t.width+c.left-i.width),r&&m<r.length&&d.top+i.height>t.height+c.top&&(d.top=Math.max(t.height+c.top-i.height,0))}return Object.assign(Object.assign({},d),{anchorSide:h,anchorAlign:u})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,i,n,s,o;const r=null!==(e=t.side)&&void 0!==e?e:j.side,a=null!==(i=t.align)&&void 0!==i?i:j.align;return{side:r,align:a,anchorOffset:null!==(n=t.anchorOffset)&&void 0!==n?n:"inside-center"===r?0:j.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?j.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:j.allowOutOfBounds}}(i))}const j={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function z(t,e,i,n,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===i?l=e.top-s-t.height:"outside-bottom"===i?l=a+s:"outside-left"===i?c=e.left-s-t.width:"outside-right"===i&&(c=r+s),"outside-top"!==i&&"outside-bottom"!==i||(c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==i&&"outside-right"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===i?l=e.top+s:"inside-bottom"===i?l=a-s-t.height:"inside-left"===i?c=e.left+s:"inside-right"===i?c=r-s-t.width:"inside-center"===i&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===i||"inside-bottom"===i?c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==i&&"inside-right"!==i&&"inside-center"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function _(t,e,i,n){return"outside-top"===t||"outside-bottom"===t?e.top<i.top||e.top+n.height>i.height+i.top:e.left<i.left||e.left+n.width>i.width+i.left}function Y(t,e,i,n){return"end"===t?e.left<i.left:"start"===t||"center"===t?e.left+n.width>i.left+i.width||e.left<i.left:void 0}function*Z(t,e={}){var i,n;const s=null!==(i=e.strict)&&void 0!==i&&i,o=null!==(n=e.onlyTabbable)&&void 0!==n&&n?J:X,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function G(t,e=!1){return Z(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function X(t,e=!1){const i=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,n=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(i||n||s||o)return!1;if(e){const e=getComputedStyle(t),i=0===t.offsetWidth||0===t.offsetHeight,n=["hidden","collapse"].includes(e.visibility),s="none"===e.display||!t.offsetParent,o=0===t.getClientRects().length;if(i||n||o||s)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function J(t,e=!1){return X(t,e)&&"-1"!==t.getAttribute("tabindex")}let Q=!1;function tt(){}try{const t=Object.create({},{signal:{get(){Q=!0}}});window.addEventListener("test",tt,t),window.removeEventListener("test",tt,t)}catch(t){}function et(){Q||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,i,n){return"object"==typeof n&&"signal"in n&&n.signal instanceof AbortSignal&&t.call(n.signal,"abort",(()=>{this.removeEventListener(e,i,n)})),t.call(this,e,i,n)}}(),Q=!0)}et();const it=[];let nt,st;function ot(t,e,i){const n=new AbortController,s=null!=i?i:n.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=G(t,!0);null==e||e.focus()};const r=document.createElement("span");r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=G(t);null==e||e.focus()};Array.from(t.children).filter((t=>t.classList.contains("sentinel")&&"SPAN"===t.tagName)).length||(t.prepend(o),t.append(r));const a=function(t,e){const i=new MutationObserver((i=>{for(const n of i)if("childList"===n.type&&n.addedNodes.length){if(Array.from(n.addedNodes).filter((t=>t instanceof HTMLElement&&t.classList.contains("sentinel")&&"SPAN"===t.tagName)).length)return;const i=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==i?void 0:i.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}}));return i.observe(t,{childList:!0}),i}(t,[o,r]);let l;function c(i){if(i instanceof HTMLElement&&document.contains(t)){if(t.contains(i))return void(l=i);if(l&&J(l)&&t.contains(l))return void l.focus();if(e&&t.contains(e))return void e.focus();{const e=G(t);return void(null==e||e.focus())}}}const d=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(nt){const t=nt;nt.container.setAttribute("data-focus-trap","suspended"),nt.controller.abort(),it.push(t)}d.signal.addEventListener("abort",(()=>{nt=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const i=it.findIndex((e=>e.container===t));i>=0&&it.splice(i,1),a.disconnect(),function(){const t=it.pop();t&&ot(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{c(t.target)}),{signal:d.signal,capture:!0}),c(document.activeElement),nt={container:t,controller:d,initialFocus:e,originalSignal:s};const h=it.findIndex((e=>e.container===t));if(h>=0&&it.splice(h,1),!i)return n}function rt(){return void 0===st&&(st=/^mac/i.test(window.navigator.platform)),st}let at=1e4;const lt=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);var ct;et(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(ct||(ct={}));const dt={ArrowLeft:ct.ArrowHorizontal,ArrowDown:ct.ArrowVertical,ArrowUp:ct.ArrowVertical,ArrowRight:ct.ArrowHorizontal,h:ct.HL,j:ct.JK,k:ct.JK,l:ct.HL,a:ct.AD,s:ct.WS,w:ct.WS,d:ct.AD,Tab:ct.Tab,Home:ct.HomeAndEnd,End:ct.HomeAndEnd,PageUp:ct.PageUpDown,PageDown:ct.PageUpDown,Backspace:ct.Backspace},ht={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function ut(t){const e=ht[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const i=rt();if(i&&t.metaKey||!i&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}function mt(t,e){const i=t.key,n=[...i].length,s=function(t){var e,i;if(!(t instanceof HTMLElement))return!1;const n=t.nodeName.toLowerCase(),s=null!==(i=null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())&&void 0!==i?i:"text",o="true"===t.ariaReadOnly||"true"===t.getAttribute("aria-readonly")||null!==t.getAttribute("readonly");return("select"===n||"textarea"===n||"input"===n&&!lt.has(s)||t.isContentEditable)&&!o}(e),o=e instanceof HTMLSelectElement;if(s&&(1===n||"Home"===i||"End"===i))return!0;if(o)return!("ArrowDown"!==i||!rt()||t.metaKey)||!("ArrowDown"!==i||rt()||!t.altKey);if(s&&!o){const t=e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement,n=t&&0===e.selectionStart&&0===e.selectionEnd,s=t&&e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===i&&!n)return!0;if("ArrowRight"===i&&!s)return!0;const o=e instanceof HTMLElement&&e.isContentEditable;if(e instanceof HTMLTextAreaElement||o){if("PageUp"===i||"PageDown"===i)return!0;if("ArrowUp"===i&&!n)return!0;if("ArrowDown"===i&&!s)return!0}}return!1}const ft="data-is-active-descendant",pt="activated-directly",gt="activated-indirectly",bt="data-has-active-descendant";function vt(t,e){var i,n,s,o,r,a;const l=[],c=new WeakMap,d=null!==(i=null==e?void 0:e.bindKeys)&&void 0!==i?i:((null==e?void 0:e.getNextFocusable)?ct.ArrowAll:ct.ArrowVertical)|ct.HomeAndEnd,h=null!==(n=null==e?void 0:e.focusOutBehavior)&&void 0!==n?n:"stop",u=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",m=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged,p=null!==(o=null==e?void 0:e.ignoreHoverEvents)&&void 0!==o&&o;let g;const b=null!==(r=null==e?void 0:e.preventScroll)&&void 0!==r&&r,v="initial"===u&&(null==e?void 0:e.activeDescendantControl);function w(){return l[0]}function y(t,e=!1){const i=g;g=t,m?t&&document.activeElement===m?E(i,t,e):A():(i&&i!==t&&c.has(i)&&i.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function E(e,i,n=!1){i.id||i.setAttribute("id","__primer_id_"+at++),e&&e!==i&&e.removeAttribute(ft),m&&(n||m.getAttribute("aria-activedescendant")!==i.id)&&(m.setAttribute("aria-activedescendant",i.id),t.setAttribute(bt,i.id),i.setAttribute(ft,n?pt:gt),null==f||f(i,e,n))}function A(e=g){"first"===u&&(g=void 0),null==m||m.removeAttribute("aria-activedescendant"),t.removeAttribute(bt),null==e||e.removeAttribute(ft);for(const e of t.querySelectorAll(`[${ft}]`))null==e||e.removeAttribute(ft);null==f||f(void 0,e,!1)}function k(...t){const i=t.filter((t=>{var i,n;return null===(n=null===(i=null==e?void 0:e.focusableElementFilter)||void 0===i?void 0:i.call(e,t))||void 0===n||n}));if(0!==i.length){l.splice(function(t){const e=t[0];if(0===l.length)return 0;let i=0,n=l.length-1;for(;i<=n;){const t=Math.floor((i+n)/2);L(e,l[t])?n=t-1:i=t+1}return i}(i),0,...i);for(const t of i)c.has(t)||c.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");g||v||y(w())}}function L(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function T(...t){for(const e of t){const t=l.indexOf(e);t>=0&&l.splice(t,1);const i=c.get(e);if(void 0!==i&&(null===i?e.removeAttribute("tabindex"):e.setAttribute("tabindex",i),c.delete(e)),e===g){y(w())}}}const C={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};k(...Z(t,C));const S="function"==typeof u?u(document.body):w();v||y(S);new MutationObserver((t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&T(...Z(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&T(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&k(...Z(t,C));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&k(e.target)}})).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const x=new AbortController,M=null!==(a=null==e?void 0:e.abortSignal)&&void 0!==a?a:x.signal;let I;M.addEventListener("abort",(()=>{T(...l)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(I=l.indexOf(t.target))}),{signal:M}),m?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&l.includes(t.target)&&(m.focus({preventScroll:b}),y(t.target))}),{signal:M}),p||t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=l.find((e=>e.contains(t)));e&&y(e)}),{signal:M,capture:!0}),m.addEventListener("focusin",(()=>{g?E(void 0,g):v||y(w())}),{signal:M}),m.addEventListener("focusout",(()=>{A()}),{signal:M})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==I)I>=0&&l[I]!==g&&y(l[I]),I=void 0;else if("previous"===u)y(e.target);else if("closest"===u||"first"===u){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===P?l.length-1:0,e=l[t];return void(null==e||e.focus({preventScroll:b}))}y(e.target)}else if("function"==typeof u)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=u(e.relatedTarget);if((t?l.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:b});console.warn("Element requested is not a known focusable element.")}else y(e.target);P=void 0}),{signal:M});const D=null!=m?m:t;let P;return"closest"===u&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(P=ut(t))}),{signal:M,capture:!0}),D.addEventListener("keydown",(i=>{var n;if(i.key in ht){const s=dt[i.key];if(!i.defaultPrevented&&(s&d)>0&&!mt(i,document.activeElement)){const s=ut(i);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(n=document.activeElement)&&void 0!==n?n:void 0,i)),!o){const e=function(){if(!g)return v?-1:0;const e=l.indexOf(g);return-1!==e?e:g===t?-1:0}();let n=e;"previous"===s?n-=1:"start"===s?n=0:"next"===s?n+=1:n=l.length-1,n<0&&(n="wrap"===h&&"Tab"!==i.key?l.length-1:0),n>=l.length&&(n="wrap"===h&&"Tab"!==i.key?0:l.length-1),e!==n&&(o=l[n])}m?y(o||g,!0):o&&(P=s,o.focus({preventScroll:b})),("Tab"!==i.key||o)&&i.preventDefault()}}}),{signal:M}),x}var wt,yt,Et,At,kt,Lt,Tt;const Ct=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Mt&&t.update()}})),St=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Mt&&t.update()}}));var xt;!function(t){t[t.Item=0]="Item",t[t.Divider=1]="Divider"}(xt||(xt={}));let Mt=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),wt.add(this),yt.set(this,null)}connectedCallback(){St.observe(this),Ct.observe(this),requestAnimationFrame((()=>{this.style.overflow="visible",this.update()}))}disconnectedCallback(){St.unobserve(this),Ct.unobserve(this)}menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}update(){const t=b(this,wt,"a",Et);if(!t)return;const e=t.getBoundingClientRect().top;let i=null;b(this,wt,"m",Tt).call(this,((t,n,s)=>{const o=t.getBoundingClientRect().top;return s===xt.Item&&(o>e?(b(this,wt,"m",kt).call(this,n),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),i===xt.Divider&&b(this,wt,"m",kt).call(this,n-1)):(b(this,wt,"m",At).call(this,n),n===this.items.length-1&&(this.moreMenu.hidden=!0),i===xt.Divider&&b(this,wt,"m",At).call(this,n-1))),i=s,!0})),b(this,yt,"f")&&b(this,yt,"f").abort(),v(this,yt,vt(this,{bindKeys:ct.ArrowHorizontal|ct.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),i=e>-1&&"visible"===this.items[e].style.visibility,n=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return i||n}}),"f")}};yt=new WeakMap,wt=new WeakSet,Et=function(){let t=null;return b(this,wt,"m",Tt).call(this,((e,i,n)=>n!==xt.Item||(t=e,!1))),t},At=function(t){const e=this.items[t],i=b(this,wt,"a",Lt)[t];e&&i&&(e.style.setProperty("visibility","visible"),i.hidden=!0)},kt=function(t){const e=this.items[t],i=b(this,wt,"a",Lt)[t];e&&i&&(e.style.setProperty("visibility","hidden"),i.hidden=!1)},Lt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},Tt=function(t){for(let e=0;e<this.items.length;e++){const i=this.items[e],n=i.classList.contains("ActionBar-divider")?xt.Divider:xt.Item;if(!t(i,e,n))break}},g([q],Mt.prototype,"items",void 0),g([F],Mt.prototype,"itemContainer",void 0),g([F],Mt.prototype,"moreMenu",void 0),Mt=g([V],Mt),window.ActionBarElement=Mt;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const i=[Pt(t,"compositionstart",(t=>$t(this,t))),Pt(t,"compositionend",(t=>$t(this,t))),Pt(t,"click",(e=>Vt(t,e))),Pt(t,"change",(e=>Vt(t,e))),Pt(t,"keydown",(e=>function(t,e,i){if(!(i instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const n=It.get(e);if(!n||n.isComposing)return;const s=i.target instanceof Element&&"SUMMARY"===i.target.tagName;switch(i.key){case"Escape":t.hasAttribute("open")&&(Bt(t),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Ft(t,!0);e&&e.focus(),i.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Ft(t,!1);e&&e.focus(),i.preventDefault()}break;case"n":if(qt&&i.ctrlKey){const e=Ft(t,!0);e&&e.focus(),i.preventDefault()}break;case"p":if(qt&&i.ctrlKey){const e=Ft(t,!1);e&&e.focus(),i.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&Wt(e)&&e.closest("details")===t&&(i.preventDefault(),i.stopPropagation(),e.click())}}}(t,this,e))),Pt(t,"toggle",(()=>Ht(t,this)),{once:!0}),Pt(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const i=e.closest("details");i&&i!==t&&!i.contains(t)&&i.removeAttribute("open")}}(t))),this.preload?Pt(t,"mouseover",(()=>Ht(t,this)),{once:!0}):Dt,...Nt(t)];It.set(this,{subscriptions:i,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=It.get(this);if(t){It.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const It=new WeakMap,Dt={unsubscribe(){}};function Pt(t,e,i,n=!1){return t.addEventListener(e,i,n),{unsubscribe:()=>{t.removeEventListener(e,i,n)}}}function Ht(t,e){const i=e.getAttribute("src");if(!i)return;const n=It.get(e);if(!n)return;if(n.loaded)return;n.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",(()=>Ot(t))),s.setAttribute("src",i))}function Nt(t){let e=!1;return[Pt(t,"mousedown",(()=>e=!0)),Pt(t,"keydown",(()=>e=!1)),Pt(t,"toggle",(()=>{t.hasAttribute("open")&&(Ot(t)||e||function(t){const e=document.activeElement;if(e&&Wt(e)&&t.contains(e))return;const i=Ft(t,!0);i&&i.focus()}(t))}))]}function Ot(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Ft(t,e){const i=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),n=document.activeElement,s=n instanceof HTMLElement?i.indexOf(n):-1,o=e?i[s+1]:i[s-1],r=e?i[0]:i[i.length-1];return o||r}const qt=navigator.userAgent.match(/Macintosh/);function Vt(t,e){const i=e.target;if(i instanceof Element&&i.closest("details")===t)if("click"===e.type){const e=i.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const n=e.querySelector("input");if("LABEL"===e.tagName&&i===n)return;"LABEL"===e.tagName&&n&&!n.checked||Rt(e,t)}else if("change"===e.type){const e=i.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Rt(e,t)}}function Rt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const i=t.closest("details-menu");if(!i)return;i.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const i=e.querySelector("[data-menu-button]");if(!i)return;const n=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(n)i.textContent=n;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(i.innerHTML=e)}}(t,e),function(t,e){for(const i of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=i.querySelector('input[type="radio"], input[type="checkbox"]');let n=(i===t).toString();e instanceof HTMLInputElement&&(n=e.indeterminate?"mixed":e.checked.toString()),i.setAttribute("aria-checked",n)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&Bt(e),i.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function Wt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function Bt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function $t(t,e){const i=It.get(t);i&&(i.isComposing="compositionstart"===e.type)}var Ut,Kt;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const jt=(()=>{const t=new Set;let e=null,i=null;function n(){for(const e of t)e.update()}return s=>{window.addEventListener("resize",n),window.addEventListener("scroll",n),e||(e=new IntersectionObserver((e=>{for(const i of e){const e=i.target;i.isIntersecting?(e.update(),t.add(e)):t.delete(e)}}))),i||(i=new ResizeObserver((()=>{for(const e of t)e.update()}))),i.observe(s.ownerDocument.documentElement),e.observe(s)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),Ut.set(this,null),Kt.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,Ut,"f"))return b(this,Ut,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,Ut,t,"f"),b(this,Ut,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",(()=>this.update())),jt(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,Kt,"f")),v(this,Kt,requestAnimationFrame((()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:i}=K(this,t,this);this.style.top=`${i}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"})),"f"))}}var zt,_t,Yt;function Zt(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){const e=document.getElementById(n);if(e instanceof HTMLDialogElement){e.showModal(),t.preventDefault();let n=i,s=!1;for(;n;)n=n.parentElement?.closest("[popover]:not(:popover-open)"),n&&"auto"===n.popover&&(n.classList.add("dialog-inside-popover-fix"),n.popover="manual",n.showPopover(),s=!0);s&&(e.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",(()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())}),{once:!0}))}}if(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n){const t=document.getElementById(n);t instanceof HTMLDialogElement&&t.open&&t.close()}}Ut=new WeakMap,Kt=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),zt.add(this),_t.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,_t,new AbortController,"f");document.addEventListener("click",Zt,!0),document.addEventListener("click",this,{signal:t}),this.ownerDocument.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-this.ownerDocument.body.clientWidth+"px"),new MutationObserver((t=>{for(const e of t)e.target===this.dialog&&b(this,zt,"m",Yt).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,zt,"m",Yt).call(this)}disconnectedCallback(){b(this,_t,"f")?.abort()}handleEvent(t){const e=t.target,i=this.dialog;if(e!==i||!i?.open)return;if(i.querySelector("form"))return;const n=i.getBoundingClientRect();n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width||i.close()}}_t=new WeakMap,zt=new WeakSet,Yt=function(){this.dialog&&this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),this.dialog.close(),this.dialog.showModal())},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var Gt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:i="",...n}={}){super(t,n),this.oldState=String(e||""),this.newState=String(i||"")}},Xt=new WeakMap;function Jt(t,e,i){Xt.set(t,setTimeout((()=>{Xt.has(t)&&t.dispatchEvent(new Gt("toggle",{cancelable:!1,oldState:e,newState:i}))}),0))}var Qt=globalThis.ShadowRoot||function(){},te=globalThis.HTMLDialogElement||function(){},ee=new WeakMap,ie=new WeakMap,ne=new WeakMap;function se(t){return ne.get(t)||"hidden"}var oe=new WeakMap;function re(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===se(t))&&(!(!e&&"hidden"!==se(t))&&(!(t instanceof te&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function ae(t){return t?Array.from(ie.get(t.ownerDocument)||[]).indexOf(t)+1:0}function le(t){const e=he(t),i=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||de(t))instanceof Qt&&(t=t.host),t instanceof Document)return}}(t);return ae(e)>ae(i)?e:i}function ce(t){const e=ie.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function de(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?de(t.parentNode):t}function he(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===ne.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||de(t))instanceof Qt&&(t=t.host),t instanceof Document)return}}function ue(t){return!(t.hidden||t instanceof Qt)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function me(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let i=e.querySelector("[autofocus]");if(i)return i;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(i=e.querySelector("[autofocus]"),i)return i}}}const n=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=n.currentNode;for(;s;){if(ue(s))return s;s=n.nextNode()}})(t)?.focus()}var fe=new WeakMap;function pe(t){if(!re(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Gt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!re(t,!1))return;let i=!1;if("auto"===t.popover){const i=t.getAttribute("popover");if(ve(function(t){const e=new Map;let i=0;for(const n of ie.get(t.ownerDocument)||[])e.set(n,i),i+=1;e.set(t,i),i+=1;let n=null;return function(t){const i=he(t);if(null===i)return null;const s=e.get(i);(null===n||e.get(n)<s)&&(n=i)}(t.parentElement||de(t)),n}(t)||e,!1,!0),i!==t.getAttribute("popover")||!re(t,!1))return}ce(e)||(i=!0),fe.delete(t);const n=e.activeElement;t.classList.add(":popover-open"),ne.set(t,"showing"),ee.has(e)||ee.set(e,new Set),ee.get(e).add(t),me(t),"auto"===t.popover&&(ie.has(e)||ie.set(e,new Set),ie.get(e).add(t),Ae(oe.get(t),!0)),i&&n&&"auto"===t.popover&&fe.set(t,n),Jt(t,"closed","open")}function ge(t,e=!1,i=!1){if(!re(t,!0))return;const n=t.ownerDocument;if("auto"===t.popover&&(ve(t,e,i),!re(t,!0)))return;if(Ae(oe.get(t),!1),oe.delete(t),i&&(t.dispatchEvent(new Gt("beforetoggle",{oldState:"open",newState:"closed"})),!re(t,!0)))return;ee.get(n)?.delete(t),ie.get(n)?.delete(t),t.classList.remove(":popover-open"),ne.set(t,"hidden"),i&&Jt(t,"open","closed");const s=fe.get(t);s&&(fe.delete(t),e&&s.focus())}function be(t,e=!1,i=!1){let n=ce(t);for(;n;)ge(n,e,i),n=ce(t)}function ve(t,e,i){const n=t.ownerDocument||t;if(t instanceof Document)return be(n,e,i);let s=null,o=!1;for(const e of ie.get(n)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return be(n,e,i);for(;s&&"showing"===se(s)&&ie.get(n)?.size;)ge(s,e,i)}var we=new WeakMap;function ye(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const i=e.ownerDocument;if(!ce(i))return;const n=le(e);if(n&&"pointerdown"===t.type)we.set(i,n);else if("pointerup"===t.type){const t=we.get(i)===n;we.delete(i),t&&ve(n||i,!1,!0)}}var Ee=new WeakMap;function Ae(t,e=!1){if(!t)return;Ee.has(t)||Ee.set(t,t.getAttribute("aria-expanded"));const i=t.popoverTargetElement;if(i instanceof HTMLElement&&"auto"===i.popover)t.setAttribute("aria-expanded",String(e));else{const e=Ee.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var ke=globalThis.ShadowRoot||function(){};function Le(t,e,i){const n=t[e];Object.defineProperty(t,e,{value(t){return n.call(this,i(t))}})}var Te=/(^|[^\\]):popover-open\b/g;function Ce(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var Se,xe,Me,Ie,De=null;function Pe(t){const e=Ce();if(null===De)try{(De=new CSSStyleSheet).replaceSync(e)}catch{De=!1}if(!1===De){const i=document.createElement("style");i.textContent=e,t instanceof Document?t.head.prepend(i):t.prepend(i)}else t.adoptedStyleSheets=[De,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(Te,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Gt,Le(Document.prototype,"querySelector",t),Le(Document.prototype,"querySelectorAll",t),Le(Element.prototype,"querySelector",t),Le(Element.prototype,"querySelectorAll",t),Le(Element.prototype,"matches",t),Le(Element.prototype,"closest",t),Le(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){pe(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){ge(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===ne.get(this)&&void 0===t||!1===t?ge(this,!0,!0):void 0!==t&&!0!==t||pe(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const i=e.call(this,t);return Pe(i),i}}});const i=HTMLElement.prototype.attachInternals;i&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=i.call(this);return t.shadowRoot&&Pe(t.shadowRoot),t}}});const n=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),n.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),n.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=n.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return n.delete(this),null;const e=de(this),i=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof ke)&&i&&e.getElementById(i)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),i=e[0];if(!(i instanceof Element)||i?.shadowRoot)return;const n=de(i);if(!(n instanceof ke||n instanceof Document))return;const s=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const i=se(e);"show"===t.popoverTargetAction&&"showing"===i||"hide"===t.popoverTargetAction&&"hidden"===i||("showing"===i?ge(e,!0,!0):re(e,!1)&&(oe.set(e,t),pe(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,i=t.target;t.defaultPrevented||!i||"Escape"!==e&&"Esc"!==e||ve(i.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",ye),t.addEventListener("pointerup",ye)})(document),Pe(document)}();const He=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),Ne=t=>t.textContent?.trim()[0].toLowerCase(),Oe=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Se.add(this),xe.set(this,null),Me.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,Me,new AbortController,"f");const{signal:t}=b(this,Me,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,Me,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:i}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(He)){b(this,xe,"f")?.abort();const{signal:e}=v(this,xe,new AbortController,"f");for(const i of b(this,Se,"a",Ie)){i.setAttribute("tabindex",i===t.target?"0":"-1");const n=t.target.closest("[popover]");i===t.target&&"auto"===n?.popover&&n.closest("focus-group")===this&&n.addEventListener("toggle",(t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,xe,"f")?.abort(),i.setAttribute("tabindex","-1"),n.id)){const t=this.querySelector(`[popovertarget="${n.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Se,"a",Ie)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const n=Array.from(b(this,Se,"a",Ie));let s=n.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=n.length-1,t.preventDefault();else{if(!this.mnemonics||!Oe.test(o))return;{const e=o.toLowerCase(),r=s>0&&Ne(t.target)===e?s:0;s=n.findIndex(((t,i)=>i>r&&Ne(t)===e)),s<0&&!i&&(s=n.findIndex((t=>Ne(t)===e)))}}i&&s<0&&(s=0),!i&&s>=n.length&&(s=0);const r=n.at(Math.min(s,n.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}xe=new WeakMap,Me=new WeakMap,Se=new WeakSet,Ie=function(){return this.querySelectorAll(He)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let Fe=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver((t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth})),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],Fe.prototype,"hasOverflow",void 0),g([I],Fe.prototype,"labelledBy",void 0),Fe=g([V],Fe),window.ScrollableRegionElement=Fe;const qe=(t,e,i)=>{if(e())i();else{const n=new MutationObserver((()=>{e()&&(i(),n.disconnect())}));n.observe(t,{childList:!0,subtree:!0})}};var Ve,Re,We,Be;function $e(t){document.activeElement!==t&&t?.focus()}const Ue=[];function Ke(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){t.stopPropagation();const e=document.getElementById(n);if(e instanceof ModalDialogElement)return e.openButton=i,e.show(),void t.preventDefault()}if(Ue.length&&(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n)){const t=document.getElementById(n);if(t instanceof ModalDialogElement){const e=Ue.findIndex((t=>t.id===n));Ue.splice(e,1),t.close(i.hasAttribute("data-submit-dialog-id"))}}}function je(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ke(t)}function ze(t){const e=t.target;if(e?.closest("button"))return;const i=Ue[Ue.length-1];if(!i)return;!e.closest(`#${i.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(Ue.pop(),i.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),Ve.add(this),Re.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,Ve,"a",We)?.classList.remove("Overlay--hidden"),b(this,Re,"f").signal.aborted&&v(this,Re,new AbortController,"f"),ot(this,this.querySelector("[autofocus]"),b(this,Re,"f").signal),Ue.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,Ve,"a",We)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,Re,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");$e(t?G(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ke),document.addEventListener("keydown",je),document.addEventListener("mousedown",ze),this.addEventListener("keydown",(t=>b(this,Ve,"m",Be).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var _e,Ye,Ze,Ge,Xe,Je,Qe,ti;Re=new WeakMap,Ve=new WeakSet,We=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},Be=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let ei=class NavListElement extends HTMLElement{constructor(){super(...arguments),_e.add(this),Ye.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Ye,new W(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Ye,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,_e,"m",Ze).call(this,t);return!!e&&(b(this,_e,"m",Je).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,_e,"m",Ge).call(this,t);return!!e&&(b(this,_e,"m",Je).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,_e,"m",Xe).call(this);return!!t&&(b(this,_e,"m",Je).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const i=e.closest("button");i&&(this.itemIsExpanded(i)?this.collapseItem(i):this.expandItem(i),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let i=e.closest("button");if(!i){const t=e.getAttribute("aria-labelledby");if(!t)return;i=document.getElementById(t)}this.itemIsExpanded(i)&&"Escape"===t.key&&this.collapseItem(i),t.stopPropagation()}};var ii,ni,si;Ye=new WeakMap,_e=new WeakSet,Ze=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},Ge=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},Xe=function(){return b(this,_e,"m",Ge).call(this,window.location.pathname)},Je=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,_e,"m",Qe).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const i=b(this,_e,"m",ti).call(this,t);i&&(this.expandItem(i),i.classList.add("ActionListContent--hasActiveSubItem"))},Qe=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,_e,"m",ti).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},ti=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([q],ei.prototype,"items",void 0),g([F],ei.prototype,"topLevelList",void 0),ei=g([V],ei);let oi=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),ii.add(this),si.set(this,new W(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const i=await fetch(t);if(!i.ok)return;e=await i.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const i=b(this,ii,"m",ni).call(this,document,e);i?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const n=t.target.closest("button").getAttribute("data-list-id");document.getElementById(n).append(i),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var ri,ai;si=new WeakMap,ii=new WeakSet,ni=function(t,e){const i=t.createElement("template");return i.innerHTML=e,t.importNode(i.content,!0)},g([F],oi.prototype,"showMoreItem",void 0),g([q],oi.prototype,"focusMarkers",void 0),oi=g([V],oi),window.NavListGroupElement=oi;let li=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),ri.add(this)}connectedCallback(){b(this,ri,"m",ai).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true"),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:e,checked:!1,value:e.querySelector(".Button-label")?.textContent}}))}get current(){return this.querySelector("[aria-current=true]")}};ri=new WeakSet,ai=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([q],li.prototype,"items",void 0),li=g([V],li),window.customElements.get("segmented-control")||(window.SegmentedControlElement=li,window.customElements.define("segmented-control",li));let ci=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const i={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(i.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:i,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const n=e.headers.get("Content-Type");window.Turbo&&this.turbo&&n?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var di,hi,ui,mi,fi,pi,gi,bi,vi,wi,yi,Ei;g([F],ci.prototype,"switch",void 0),g([F],ci.prototype,"loadingSpinner",void 0),g([F],ci.prototype,"errorIcon",void 0),g([I],ci.prototype,"turbo",void 0),ci=g([V],ci),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=ci,window.customElements.define("toggle-switch",ci));const Ai=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),ki="sr-only",Li=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Ti(t){for(const e of Mi)e!==t&&(Ai(e)?e.hidePopover():Mi.delete(e))}function Ci(){Ti()}function Si(t){setTimeout((()=>{for(const e of Mi)Ai(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const xi=new Set,Mi=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),di.add(this),hi.set(this,void 0),ui.set(this,"center"),mi.set(this,"outside-bottom"),fi.set(this,!1),pi.set(this,"mouse"),gi.set(this,!1)}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: var(--overlay-width-small);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,pi,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&Ai(this)?this.hidePopover():t||Ai(this)||this.showPopover()}get hiddenFromView(){return!Ai(this)}connectedCallback(){if(xi.add(this),b(this,di,"m",wi).call(this),b(this,di,"m",yi).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}b(this,di,"m",bi).call(this,!1),v(this,fi,!0,"f"),b(this,di,"m",vi).call(this)}disconnectedCallback(){xi.delete(this),Mi.delete(this),b(this,hi,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Ai(this);"beforetoggle"===t.type&&t.currentTarget!==this&&v(this,gi,"open"===t.newState,"f");const i=("mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")))&&!b(this,gi,"f"),n="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this&&"open"===t.newState,a=n||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!i||Ai(this)?e&&a&&Ai(this)&&this.hidePopover():(v(this,pi,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,di,"m",bi).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,di,"m",vi).call(this):"id"===t||"data-type"===t?b(this,di,"m",wi).call(this):"data-direction"===t&&b(this,di,"m",yi).call(this))}}var Ii,Di;hi=new WeakMap,ui=new WeakMap,mi=new WeakMap,fi=new WeakMap,pi=new WeakMap,gi=new WeakMap,di=new WeakSet,bi=function(t){t?(Mi.add(this),this.classList.remove(ki),Ti(this),b(this,di,"m",Ei).call(this)):(Mi.delete(this),this.classList.remove(...Li),this.classList.add(ki))},vi=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,hi,"f")?.abort(),v(this,hi,new AbortController,"f");const{signal:t}=b(this,hi,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Ci),this.ownerDocument.addEventListener("focusin",Si),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},wi=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},yi=function(){this.classList.remove(...Li);const t=this.direction;"n"===t?(v(this,ui,"center","f"),v(this,mi,"outside-top","f")):"ne"===t?(v(this,ui,"end","f"),v(this,mi,"outside-top","f")):"e"===t?(v(this,ui,"center","f"),v(this,mi,"outside-right","f")):"se"===t?(v(this,ui,"end","f"),v(this,mi,"outside-bottom","f")):"s"===t?(v(this,ui,"center","f"),v(this,mi,"outside-bottom","f")):"sw"===t?(v(this,ui,"start","f"),v(this,mi,"outside-bottom","f")):"w"===t?(v(this,ui,"center","f"),v(this,mi,"outside-left","f")):"nw"===t&&(v(this,ui,"start","f"),v(this,mi,"outside-top","f"))},Ei=function(){if(!this.control)return;if(!b(this,fi,"f")||!Ai(this))return;const t=K(this,this.control,{side:b(this,mi,"f"),align:b(this,ui,"f"),anchorOffset:0}),e=t.anchorSide,i=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let n="s";n="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===i?"n":"start"===i?"ne":"nw":"center"===i?"s":"start"===i?"se":"sw",this.classList.add(`tooltip-${n}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id","for"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let Pi=class XBannerElement extends HTMLElement{constructor(){super(...arguments),Ii.add(this)}dismiss(){if("remove"===b(this,Ii,"a",Di)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};Ii=new WeakSet,Di=function(){return this.getAttribute("data-dismiss-scheme")},g([F],Pi.prototype,"titleText",void 0),Pi=g([V],Pi),window.customElements.get("x-banner")||(window.XBannerElement=Pi,window.customElements.define("x-banner",Pi));class Hi{constructor(t,e,{tabInsertsSuggestions:i,defaultFirstOption:n}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==i||i,this.defaultFirstOption=null!=n&&n,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Oi(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Oi(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const i=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!i)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",Ni),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",Ni)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Fi)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Fi)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Fi),n=i.indexOf(e);if(n===i.length-1&&1===t||0===n&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:i.length-1;if(e&&n>=0){const e=n+t;e>=0&&e<i.length&&(s=e)}const o=i[s];if(o)for(const t of i)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),qi(this.list,o)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function Ni(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function Oi(t,e){const i=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!i&&("true"===i.getAttribute("aria-disabled")||i.click(),!0)}function Fi(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function qi(t,e){(function(t,e){const i=t.scrollTop,n=i+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=i&&o<=n})(t,e)||(t.scrollTop=e.offsetTop)}const Vi=window.testScreenReaderDelay||100;class Ri{constructor(t,e,i,n=!1){var s;if(this.container=t,this.input=e,this.results=i,this.combobox=new Hi(e,i,{defaultFirstOption:n}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=n,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=i.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.popover?this.results.matches(":popover-open")&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let i;return function(...n){clearTimeout(i),i=window.setTimeout((()=>{clearTimeout(i),t(...n)}),e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(s=this.clearButton)||void 0===s||s.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.close()}onKeydown(t){if("Escape"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.close(),e instanceof HTMLAnchorElement)return;const i=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=i,i||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout((()=>{this.feedback&&(this.feedback.textContent=t)}),Vi)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const i=new URL(e,window.location.href),n=new URLSearchParams(i.search.slice(1));n.append("q",t),i.search=n.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(i).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),i=!!e.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,n=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${n} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${n||"No"} results.`),i?this.open():this.close(),this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))})).catch((()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))}))}open(){(this.results.popover?!this.results.matches(":popover-open"):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(":popover-open"):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}}var Wi,Bi,$i,Ui,Ki,ji=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},zi=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},_i=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i};const Yi=globalThis.HTMLElement||null;class Zi extends Event{constructor(t,e){var{relatedTarget:i}=e;super(t,_i(e,["relatedTarget"])),this.relatedTarget=i}}const Gi=new WeakMap;let Xi=null;class AutoCompleteElement extends Yi{constructor(){super(...arguments),Wi.add(this),Bi.set(this,null),$i.set(this,null),Ki.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Xi=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=ji(this,Bi,"f"))||void 0===t?void 0:t.isConnected)return ji(this,Bi,"f");const e=this.getAttribute("for"),i=this.getRootNode();return e&&(i instanceof Document||i instanceof ShadowRoot)?i.getElementById(e):null}set forElement(t){zi(this,Bi,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=ji(this,$i,"f"))||void 0===t?void 0:t.isConnected)?ji(this,$i,"f"):this.querySelector("input")}set inputElement(t){zi(this,$i,t,"f"),ji(this,Wi,"m",Ui).call(this)}connectedCallback(){this.isConnected&&(ji(this,Wi,"m",Ui).call(this),new MutationObserver((()=>{Gi.get(this)||ji(this,Wi,"m",Ui).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=Gi.get(this);t&&(t.destroy(),Gi.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;null===(e=ji(this,Ki,"f"))||void 0===e||e.abort();const{signal:i}=zi(this,Ki,new AbortController,"f"),n=await fetch(t.toString(),{signal:i,headers:{Accept:"text/fragment+html"}});if(!n.ok)throw new Error(await n.text());if(Xi){return(await Xi).createHTML(await n.text(),n)}return await n.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,i){var n,s;if(e===i)return;const o=Gi.get(this);if(o)switch(this.forElement===(null===(n=Gi.get(this))||void 0===n?void 0:n.results)&&this.inputElement===(null===(s=Gi.get(this))||void 0===s?void 0:s.input)||ji(this,Wi,"m",Ui).call(this),t){case"open":null===i?o.close():o.open();break;case"value":null!==i&&(o.input.value=i),this.dispatchEvent(new Zi("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}Bi=new WeakMap,$i=new WeakMap,Ki=new WeakMap,Wi=new WeakSet,Ui=function(){var t;null===(t=Gi.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:i}=this;if(!e||!i)return;const n="true"===this.getAttribute("data-autoselect");Gi.set(this,new Ri(this,i,e,n)),e.setAttribute("role","listbox")};const Ji="undefined"!=typeof globalThis?globalThis:window;try{Ji.AutocompleteElement=Ji.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(Ji.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Qi(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const i=document.createRange();return i.selectNodeContents(t),e.addRange(i),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function tn(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const i=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(i),Qi(i),e.removeChild(i),Promise.resolve()}async function en(t){const e=t.getAttribute("for"),i=t.getAttribute("value");function n(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(i)await tn(i),n();else if(e){const i="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const o=i.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?tn(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?tn(s.href):Qi(s)),n())}}function nn(t){const e=t.currentTarget;e instanceof HTMLElement&&en(e)}function sn(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),en(e))}}function on(t){t.currentTarget.addEventListener("keydown",sn)}function rn(t){t.currentTarget.removeEventListener("keydown",sn)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",nn),this.addEventListener("focus",on),this.addEventListener("blur",rn)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const an="undefined"!=typeof globalThis?globalThis:window;try{an.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(an.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ln(t){t.style.display="inline-block"}function cn(t){t.style.display="none"}const dn=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=dn.get(t),i=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),n="Copied!";e?(clearTimeout(e),dn.delete(t)):(!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(cn(e),ln(i))}(t),i&&(i.textContent===n?i.textContent=`${n} `:i.textContent=n)),dn.set(t,setTimeout((()=>{!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(ln(e),cn(i))}(t),dn.delete(t)}),2e3))}));var hn,un=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},mn=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};const fn="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const i of t)e.push({type:"element",value:i}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},pn=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],gn={minimumIntegerDigits:2};class bn{constructor(t,e={}){hn.set(this,void 0);let i=String(e.style||"short");"long"!==i&&"short"!==i&&"narrow"!==i&&"digital"!==i&&(i="short");let n="digital"===i?"numeric":i;const s=e.hours||n;n="2-digit"===s?"numeric":s;const o=e.minutes||n;n="2-digit"===o?"numeric":o;const r=e.seconds||n;n="2-digit"===r?"numeric":r;const a=e.milliseconds||n;un(this,hn,{locale:t,style:i,years:e.years||"digital"===i?"short":i,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===i?"short":i,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===i?"short":i,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===i?"short":i,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===i?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===i?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===i?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return mn(this,hn,"f")}formatToParts(t){const e=[],i=mn(this,hn,"f"),n=i.style,s=i.locale;for(const[n,o]of pn){const r=t[n];if("auto"===i[`${n}Display`]&&!r)continue;const a=i[n],l="2-digit"===a?gn:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new fn(s,{type:"unit",style:"digital"===n?"short":n}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}hn=new WeakMap;const vn=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,wn=["year","month","week","day","hour","minute","second","millisecond"];class yn{constructor(t=0,e=0,i=0,n=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=i,this.days=n,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new yn(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const i=String(t).trim(),n=i.startsWith("-")?-1:1,s=null===(e=i.match(vn))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*n));return s?new yn(...s):new yn}if("object"==typeof t){const{years:e,months:i,weeks:n,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new yn(e,i,n,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const i=Date.now(),n=Math.abs(En(i,yn.from(t)).getTime()-i),s=Math.abs(En(i,yn.from(e)).getTime()-i);return n>s?-1:n<s?1:0}toLocaleString(t,e){return new bn(t,e).format(this)}}function En(t,e){const i=new Date(t);return e.sign<0?(i.setUTCSeconds(i.getUTCSeconds()+e.seconds),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCFullYear(i.getUTCFullYear()+e.years)):(i.setUTCFullYear(i.getUTCFullYear()+e.years),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCSeconds(i.getUTCSeconds()+e.seconds)),i}function An(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const i=t.sign;let n=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),d=Math.abs(t.milliseconds);d>=900&&(c+=Math.round(d/1e3)),(c||l||a||r||o||s||n)&&(d=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||n)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||n)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||n)&&(a=0);const h=e.getFullYear(),u=e.getMonth(),m=e.getDate();if(r>=27||n+s+r){const t=new Date(e);t.setDate(1),t.setMonth(u+s*i+1),t.setDate(0);const a=Math.max(0,m-t.getDate()),l=new Date(e);l.setFullYear(h+n*i),l.setDate(m-a),l.setMonth(u+s*i),l.setDate(m-a+r*i);const c=l.getFullYear()-e.getFullYear(),d=l.getMonth()-e.getMonth(),f=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+d);f<27?(r>=6?(o+=Math.round(r/7),r=0):r=f,s=n=0):p<=11?(s=p,n=0):(s=0,n=c*i),(s||n)&&(r=0)}return n&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||n)&&(o=0),r&&o&&!s&&!n&&(o+=Math.round(r/7),r=0),new yn(n*i,s*i,o*i,r*i,a*i,l*i,c*i,d*i)}var kn,Ln,Tn,Cn,Sn,xn,Mn,In,Dn,Pn,Hn,Nn,On=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},Fn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const qn=globalThis.HTMLElement||null,Vn=new yn,Rn=new yn(0,0,0,0,0,1);class Wn extends Event{constructor(t,e,i,n){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=i,this.newTitle=n}}function Bn(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const $n=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Bn(t),i=Date.now()+e;i<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=i)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Bn(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends qn{constructor(){super(...arguments),kn.add(this),Ln.set(this,!1),Tn.set(this,!1),Sn.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Nn.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title","aria-hidden"]}get onRelativeTimeUpdated(){return On(this,Nn,"f")}set onRelativeTimeUpdated(t){On(this,Nn,"f")&&this.removeEventListener("relative-time-updated",On(this,Nn,"f")),Fn(this,Nn,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,vn.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return wn.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){$n.unobserve(this)}attributeChangedCallback(t,e,i){e!==i&&("title"===t&&Fn(this,Ln,null!==i&&(this.date&&On(this,kn,"m",xn).call(this,this.date))!==i,"f"),On(this,Tn,"f")||"title"===t&&On(this,Ln,"f")||Fn(this,Tn,(async()=>{await Promise.resolve(),this.update(),Fn(this,Tn,!1,"f")})(),"f"))}update(){const t=On(this,Sn,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let i=e;const n=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!n)return void(On(this,Sn,"f").textContent=t);const s=Date.now();On(this,Ln,"f")||(i=On(this,kn,"m",xn).call(this,n)||"",i&&!this.noTitle&&this.setAttribute("title",i));const o=function(t,e="second",i=Date.now()){const n=t.getTime()-i;if(0===n)return new yn;const s=Math.sign(n),o=Math.abs(n),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),d=Math.floor(c/30),h=Math.floor(d/12),u=wn.indexOf(e)||wn.length;return new yn(u>=0?h*s:0,u>=1?(d-12*h)*s:0,0,u>=3?(c-30*d)*s:0,u>=4?(l-24*c)*s:0,u>=5?(a-60*l)*s:0,u>=6?(r-60*a)*s:0,u>=7?(o-1e3*r)*s:0)}(n,this.precision,s),r=On(this,kn,"m",Mn).call(this,o);let a=t;a="duration"===r?On(this,kn,"m",In).call(this,o):"relative"===r?On(this,kn,"m",Dn).call(this,o):On(this,kn,"m",Pn).call(this,n),a?On(this,kn,"m",Hn).call(this,a):this.shadowRoot===On(this,Sn,"f")&&this.textContent&&On(this,kn,"m",Hn).call(this,this.textContent),a===t&&i===e||this.dispatchEvent(new Wn(t,a,e,i)),"relative"===r||"duration"===r?$n.observe(this):$n.unobserve(this)}}Ln=new WeakMap,Tn=new WeakMap,Sn=new WeakMap,Nn=new WeakMap,kn=new WeakSet,Cn=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(null!=e?e:"").toString()}catch(t){return"default"}},xn=function(t){return new Intl.DateTimeFormat(On(this,kn,"a",Cn),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Mn=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===yn.compare(t,this.threshold))return"relative"}return"datetime"},In=function(t){const e=On(this,kn,"a",Cn),i=this.format,n=this.formatStyle,s=this.tense;let o=Vn;"micro"===i?(t=An(t),o=Rn,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Rn)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:n,[r]:"always"}):t.abs().toLocaleString(e,{style:n})},Dn=function(t){const e=new Intl.RelativeTimeFormat(On(this,kn,"a",Cn),{numeric:"auto",style:this.formatStyle}),i=this.tense;"future"===i&&1!==t.sign&&(t=Vn),"past"===i&&-1!==t.sign&&(t=Vn);const[n,s]=function(t,e){const i=An(t,e);if(i.blank)return[0,"second"];for(const t of wn){if("millisecond"===t)continue;const e=i[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===s&&n<10?e.format(0,"millisecond"===this.precision?"second":this.precision):e.format(n,s)},Pn=function(t){const e=new Intl.DateTimeFormat(On(this,kn,"a",Cn),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()},Hn=function(t){if(this.hasAttribute("aria-hidden")&&"true"===this.getAttribute("aria-hidden")){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.textContent=t,On(this,Sn,"f").replaceChildren(e)}else On(this,Sn,"f").textContent=t};const Un="undefined"!=typeof globalThis?globalThis:window;try{Un.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Un.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Kn(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const i=t.target;if(!(i instanceof HTMLElement))return;if(i.closest(this.tagName)!==this)return;if("tab"!==i.getAttribute("role")&&!i.closest('[role="tablist"]'))return;const n=Kn(this),s=n.indexOf(n.find((t=>t.matches('[aria-selected="true"]')))),[o,r]="vertical"===(null===(e=i.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some((e=>t.code===e))){let t=s+1;t>=n.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=s-1;t<0&&(t=n.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(n.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Kn(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const i=t.target.closest('[role="tab"]');if(!(i instanceof HTMLElement&&i.closest('[role="tablist"]')))return;const n=e.indexOf(i);this.selectTab(n)}));for(const t of Kn(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Kn(this),i=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const n=e[t],s=i[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of i)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),n.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}const jn="undefined"!=typeof globalThis?globalThis:window;try{jn.TabContainerElement=TabContainerElement.define()}catch(t){if(!(jn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let zn=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function _n(t,e=0,{start:i=!1,middle:n=!1,once:s=!1}={}){return function(t,e=0,{start:i=!0,middle:n=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const d=Date.now()-r;r=Date.now(),i?(i=!1,t.apply(this,c),s&&l.cancel()):(n&&d<e||!n)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),n?e-d:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:i,middle:n,once:s})}g([q],zn.prototype,"fields",void 0),zn=g([V],zn),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:zn}),window.customElements.define("primer-multi-input",zn));var Yn,Zn,Gn=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},Xn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};!function(t){t.GET="GET",t.POST="POST"}(Zn||(Zn={}));const Jn=new WeakMap;class Qn extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class ts extends Qn{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class es extends Qn{constructor(){super("complete")}}class is extends Qn{constructor(t){super("success"),this.response=t}}class ns extends ts{constructor(){super("start","Verifying…")}}class ss extends ts{constructor(t){super("error","Validation failed"),this.response=t}}class os extends Qn{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),Yn.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Gn(this,Yn,"f")}set onloadend(t){Gn(this,Yn,"f")&&this.removeEventListener("loadend",Gn(this,Yn,"f")),Xn(this,Yn,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=_n(ls.bind(null,this),300),i={check:e,controller:null};Jn.set(this,i);const n=rs.bind(null,e);t.addEventListener("blur",n),t.addEventListener("input",n),t.addEventListener("triggervalidation",n),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=Jn.get(this);e&&(Jn.delete(this),t.removeEventListener("input",as),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}triggerValidation(){const t=this.input;t&&t.dispatchEvent(new CustomEvent("triggervalidation"))}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return Zn[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}}function rs(t,e){const i=e.currentTarget;if(!(i instanceof HTMLInputElement))return;const n=i.closest("auto-check");n instanceof AutoCheckElement&&("input"===e.type&&n.setAttribute("dirty",""),0!==i.value.length&&("blur"===e.type&&!n.validateOnKeystroke&&n.hasAttribute("dirty")||"input"===e.type&&n.validateOnKeystroke||"triggervalidation"===e.type)&&(as(e),t()))}function as(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const i=e.closest("auto-check");if(!(i instanceof AutoCheckElement))return;const n=i.src,s=i.csrf,o=i.httpMethod,r=Jn.get(i);if(!n||"POST"===o&&!s||!r)return;const a=new ns;e.dispatchEvent(a),i.required&&e.setCustomValidity(a.message)}async function ls(t){const e=t.input;if(!e)return;const i=t.csrfField,n=t.src,s=t.csrf,o=Jn.get(t),r=t.httpMethod;if(!n||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(n,window.location.origin);"POST"===r?(a.append(i,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new os(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const i=await async function(t,e,i){"GET"===i.method&&delete i.body;try{const n=await fetch(e,i);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),n}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(i.ok)t.required&&e.setCustomValidity(""),t.validateOnKeystroke=!1,e.dispatchEvent(new is(i.clone()));else{t.validateOnKeystroke=!0;const n=new ss(i.clone());e.dispatchEvent(n),t.required&&e.setCustomValidity(n.message)}o.controller=null,e.dispatchEvent(new es)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new es))}}Yn=new WeakMap;const cs="undefined"!=typeof globalThis?globalThis:window;try{cs.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(cs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}class ds{constructor(t,e,i){this.inputElement=t,this.characterLimitElement=e,this.characterLimitSrElement=i,this.SCREEN_READER_DELAY=500,this.announceTimeout=null,this.isInitialLoad=!0}initialize(t){this.inputElement.addEventListener("keyup",(()=>this.updateCharacterCount()),t?{signal:t}:void 0),this.inputElement.addEventListener("paste",(()=>setTimeout((()=>this.updateCharacterCount()),50)),t?{signal:t}:void 0),this.updateCharacterCount(),this.isInitialLoad=!1}cleanup(){this.announceTimeout&&clearTimeout(this.announceTimeout)}pluralize(t,e){return 1===t?e:`${e}s`}updateCharacterCount(){if(!this.characterLimitElement)return;const t=this.characterLimitElement.getAttribute("data-max-length");if(!t)return;const e=parseInt(t,10)-this.inputElement.value.length;let i="";if(e>=0){i=`${e} ${this.pluralize(e,"character")} remaining`;const t=this.characterLimitElement.querySelector(".FormControl-caption-text");t&&(t.textContent=i),this.clearError()}else{const t=-e;i=`${t} ${this.pluralize(t,"character")} over`;const n=this.characterLimitElement.querySelector(".FormControl-caption-text");n&&(n.textContent=i),this.setError()}this.isInitialLoad||this.announceToScreenReader(i)}announceToScreenReader(t){this.announceTimeout&&clearTimeout(this.announceTimeout),this.announceTimeout=window.setTimeout((()=>{this.characterLimitSrElement&&(this.characterLimitSrElement.textContent=t)}),this.SCREEN_READER_DELAY)}setError(){this.inputElement.setAttribute("invalid","true"),this.inputElement.setAttribute("aria-invalid","true"),this.characterLimitElement.classList.add("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.removeAttribute("hidden")}clearError(){this.inputElement.removeAttribute("invalid"),this.inputElement.removeAttribute("aria-invalid"),this.characterLimitElement.classList.remove("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.setAttribute("hidden","")}}var hs,us;let ms=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),hs.set(this,void 0),us.set(this,null)}connectedCallback(){b(this,hs,"f")?.abort();const{signal:t}=v(this,hs,new AbortController,"f");this.addEventListener("auto-check-success",(async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()}),{signal:t}),this.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:t}),this.characterLimitElement&&(v(this,us,new ds(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,us,"f").initialize(t))}disconnectedCallback(){b(this,hs,"f")?.abort(),b(this,us,"f")?.cleanup()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const i=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(i)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};var fs;hs=new WeakMap,us=new WeakMap,g([F],ms.prototype,"inputElement",void 0),g([F],ms.prototype,"validationElement",void 0),g([F],ms.prototype,"validationMessageElement",void 0),g([F],ms.prototype,"validationSuccessIcon",void 0),g([F],ms.prototype,"validationErrorIcon",void 0),g([F],ms.prototype,"leadingVisual",void 0),g([F],ms.prototype,"leadingSpinner",void 0),g([F],ms.prototype,"characterLimitElement",void 0),g([F],ms.prototype,"characterLimitSrElement",void 0),ms=g([V],ms);let ps=class PrimerTextAreaElement extends HTMLElement{constructor(){super(...arguments),fs.set(this,null)}connectedCallback(){this.characterLimitElement&&(v(this,fs,new ds(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,fs,"f").initialize())}disconnectedCallback(){b(this,fs,"f")?.cleanup()}};fs=new WeakMap,g([F],ps.prototype,"inputElement",void 0),g([F],ps.prototype,"characterLimitElement",void 0),g([F],ps.prototype,"characterLimitSrElement",void 0),ps=g([V],ps),window.customElements.get("primer-text-area")||(Object.assign(window,{PrimerTextAreaElement:ps}),window.customElements.define("primer-text-area",ps));let gs=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var bs,vs,ws,ys,Es,As,ks,Ls,Ts,Cs,Ss,xs,Ms,Is,Ds,Ps,Hs,Ns,Os,Fs,qs,Vs,Rs,Ws,Bs,$s,Us,Ks,js,zs,_s,Ys,Zs;g([F],gs.prototype,"validationElement",void 0),g([F],gs.prototype,"validationMessageElement",void 0),gs=g([V],gs);class Gs{constructor(){bs.add(this),vs.set(this,void 0),v(this,vs,[],"f")}get current(){return b(this,vs,"f")[b(this,vs,"f").length-1]}push(t,e={trapFocus:!0}){const{trapFocus:i}=e;b(this,vs,"f").push({element:t,abortController:b(this,bs,"m",ws).call(this,t,i)})}pop(t){if(t)for(;b(this,vs,"f").length>0&&this.current?.element!==t;){const t=b(this,vs,"f").pop();t?.abortController?.abort()}const e=b(this,vs,"f").pop();e?.abortController?.abort()}elementIsMenuItem(t){return b(this,bs,"a",ys).includes(t.getAttribute("role")||"")}get isEmpty(){return 0===b(this,vs,"f").length}}vs=new WeakMap,bs=new WeakSet,ws=function(t,e){const i=vt(t,{bindKeys:ct.ArrowVertical|ct.ArrowHorizontal|ct.HomeAndEnd|ct.Backspace,focusOutBehavior:"wrap",focusableElementFilter:e=>this.elementIsMenuItem(e)&&e.closest("anchored-position")===t});if(e){const{signal:e}=i;return ot(t,void 0,e)}return i},ys=function(){return Xs.validItemRoles};let Xs=Zs=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),Es.add(this),As.set(this,void 0),ks.set(this,""),Ls.set(this,""),Ts.set(this,!1),Cs.set(this,void 0),Ss.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get childPopoverElements(){return Array.from(this.overlay.querySelectorAll("anchored-position"))}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const i of t){const t=i.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:i?.getAttribute("data-value"),element:i})}return e}connectedCallback(){const{signal:t}=v(this,As,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("toggle",this,{signal:t,capture:!0}),b(this,Es,"m",Ks).call(this),b(this,Es,"m",js).call(this),b(this,Es,"m",Ms).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,Es,"m",Us).call(this)&&this.overlay?.update()};v(this,Cs,new IntersectionObserver((t=>{for(const i of t){i.target===this.invokerElement&&(i.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}})),"f"),qe(this,(()=>Boolean(this.invokerElement)),(()=>b(this,Cs,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true");new MutationObserver((()=>b(this,Es,"m",xs).call(this))).observe(this,{childList:!0,subtree:!0}),b(this,Es,"m",xs).call(this),v(this,Ss,new Gs,"f")}disconnectedCallback(){b(this,As,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),i=b(this,Es,"m",Hs).call(this,t);if("toggle"===t.type&&t instanceof ToggleEvent)return void b(this,Es,"m",Os).call(this,t);if(e&&"mousedown"===t.type)return void v(this,Ts,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return b(this,Es,"m",Fs).call(this,t),void v(this,Ts,!1,"f");if("focusout"===t.type){if(b(this,Ts,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,Es,"m",Ws).call(this)}))}const n=t.target.closest(Zs.menuItemSelectors.join(",")),s=null!==n;if(s&&i){if(b(this,Es,"m",Is).call(this,t))return;const e=n.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e))return void b(this,Es,"m",qs).call(this,t,i)}b(this,Es,"m",Ds).call(this,t)&&(t.preventDefault(),n.click());const i=b(this,Es,"m",_s).call(this,n);return i?(t.preventDefault(),void i.showPopover()):void b(this,Es,"m",Vs).call(this,n)}"include-fragment-replaced"!==t.type?s&&t instanceof KeyboardEvent&&b(this,Es,"m",Ns).call(this,t,n):b(this,Es,"m",Rs).call(this)}get items(){return Array.from(this.querySelectorAll(Zs.menuItemSelectors.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,Es,"m",Vs).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,Es,"m",Vs).call(this,e)}}};As=new WeakMap,ks=new WeakMap,Ls=new WeakMap,Ts=new WeakMap,Cs=new WeakMap,Ss=new WeakMap,Es=new WeakSet,xs=function(){let t=1;for(const e of this.querySelectorAll("[role=menu]"))e.setAttribute("data-level",t.toString()),t++},Ms=function(){const{signal:t}=b(this,As,"f");for(const e of this.querySelectorAll(Zs.validSelectors.join(",")))e.addEventListener("click",b(this,Es,"m",Is).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Es,"m",Is).bind(this),{signal:t})},Is=function(t){if(!b(this,Es,"m",Hs).call(this,t))return!1;const e=t.target.closest(Zs.menuItemSelectors.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Ds=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Ps=function(t){return t.target instanceof ClipboardCopyElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(" "===t.key||"Enter"===t.key)},Hs=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Es,"m",Ds).call(this,t)||b(this,Es,"m",Ps).call(this,t)},Ns=function(t,e){switch(t.key){case"ArrowRight":{const t=b(this,Es,"m",_s).call(this,e);t?.showPopover();break}case"ArrowLeft":if(e.closest("role[menu]")!==this.list){const t=e.closest("anchored-position");t?.hidePopover()}}},Os=function(t){const e=t.target;if("open"===t.newState){const t=e===this.overlay;b(this,Ss,"f").push(e,{trapFocus:!t}),window.requestAnimationFrame((()=>{const t=e.querySelector(Zs.menuItemSelectors.join(","));t?.focus()}))}else{b(this,Ss,"f").pop(e);const t=b(this,Es,"m",Ys).call(this,e),i=document.querySelector(":popover-open");t&&!i&&t.focus()}},Fs=function(t){t.preventDefault(),t.stopPropagation(),b(this,Es,"m",Us).call(this)?b(this,Es,"m",$s).call(this):b(this,Es,"m",Bs).call(this)},qs=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,Es,"m",Us).call(this)&&b(this,Es,"m",$s).call(this));const t=this.ownerDocument.activeElement,n=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(n||s||o)&&setTimeout((()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()}),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},Vs=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,Es,"m",Us).call(this)&&b(this,Es,"m",$s).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,Es,"m",Ks).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,Es,"m",js).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Rs=function(){b(this,Es,"a",zs)?.focus(),b(this,Es,"m",Ms).call(this),this.setAttribute("data-ready","true")},Ws=function(){b(this,Es,"m",$s).call(this)},Bs=function(){this.popoverElement?.showPopover()},$s=function(){this.popoverElement?.hidePopover();for(const t of this.childPopoverElements)t.hidePopover()},Us=function(){return this.popoverElement?.matches(":popover-open")},Ks=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,ks,b(this,ks,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=this.dynamicLabelPrefix,n.textContent=e.textContent||"",t.replaceChildren(i,n)}else t.textContent=b(this,ks,"f")},js=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,Ls,b(this,Ls,"f")||e[0].name,"f");for(const e of this.selectedItems){const i=document.createElement("input");i.setAttribute("data-list-input","true"),i.type="hidden",i.autocomplete="off",i.name=b(this,Ls,"f"),i.value=(e.value||e.label||"").trim(),t.append(i)}for(const t of e)t.remove()}},zs=function(){return this.querySelector(Zs.menuItemSelectors.join(","))},_s=function(t){const e=t.getAttribute("popovertarget");return e?this.querySelector(`[id="${e}"]`):null},Ys=function(t){const e=t.getAttribute("anchor");return e?this.querySelector(`[id="${e}"]`):null},Xs.validItemRoles=["menuitem","menuitemcheckbox","menuitemradio"],Xs.validSelectors=Zs.validItemRoles.map((t=>`[role="${t}"]`)),Xs.menuItemSelectors=Zs.validSelectors.map((t=>`:not([hidden]) > ${t}`)),g([F],Xs.prototype,"includeFragment",void 0),g([F],Xs.prototype,"overlay",void 0),g([F],Xs.prototype,"list",void 0),Xs=Zs=g([V],Xs),window.customElements.get("action-menu")||(window.ActionMenuElement=Xs,window.customElements.define("action-menu",Xs));const Js="less",Qs="equal",to="greater";var eo,io,no,so,oo,ro=t=>{throw TypeError(t)},ao=(t,e,i)=>e.has(t)||ro("Cannot "+i),lo=(t,e,i)=>(ao(t,e,"read from private field"),i?i.call(t):e.get(t)),co=(t,e,i)=>e.has(t)?ro("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),ho=(t,e,i,n)=>(ao(t,e,"write to private field"),e.set(t,i),i),uo=(t,e,i)=>(ao(t,e,"access private method"),i);class mo{constructor({compareFn:t}){co(this,no),co(this,eo),co(this,io),ho(this,eo,t),ho(this,io,[])}insert(t){lo(this,io).push(t),uo(this,no,oo).call(this)}pop(){const t=lo(this,io)[0];return lo(this,io)[lo(this,io).length-1]&&(lo(this,io)[0]=lo(this,io)[lo(this,io).length-1],lo(this,io).pop()),uo(this,no,so).call(this),t}peek(){return lo(this,io)[0]}delete(t){const e=lo(this,io).indexOf(t);-1!==e&&(ko(lo(this,io),e,lo(this,io).length-1),lo(this,io).pop(),uo(this,no,so).call(this))}clear(){ho(this,io,[])}get size(){return lo(this,io).length}}function fo(t){return 2*t+1}function po(t){return 2*t+2}function go(t){return Math.floor((t-1)/2)}function bo(t,e){return fo(t)<e}function vo(t,e){return po(t)<e}function wo(t){return t>0}function yo(t,e){return t[fo(e)]}function Eo(t,e){return t[po(e)]}function Ao(t,e){return t[go(e)]}function ko(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}eo=new WeakMap,io=new WeakMap,no=new WeakSet,so=function(){let t=0;for(;bo(t,lo(this,io).length);){let e=fo(t);if(vo(t,lo(this,io).length)&&lo(this,eo).call(this,Eo(lo(this,io),t),yo(lo(this,io),t))===Js&&(e=po(t)),lo(this,eo).call(this,lo(this,io)[t],lo(this,io)[e])===Js)break;ko(lo(this,io),t,e),t=e}},oo=function(){let t=lo(this,io).length-1;for(;wo(t)&&lo(this,eo).call(this,lo(this,io)[t],Ao(lo(this,io),t))===Js;)ko(lo(this,io),t,go(t)),t=go(t)};var Lo,To,Co,So,xo=Object.defineProperty,Mo=t=>{throw TypeError(t)},Io=(t,e,i)=>((t,e,i)=>e in t?xo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),Do=(t,e,i)=>e.has(t)||Mo("Cannot "+i),Po=(t,e,i)=>(Do(t,e,"read from private field"),i?i.call(t):e.get(t)),Ho=(t,e,i)=>e.has(t)?Mo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),No=(t,e,i,n)=>(Do(t,e,"write to private field"),e.set(t,i),i);Lo=Symbol.toStringTag;class Oo{constructor(){Io(this,Lo,"Deferred"),Ho(this,To),Ho(this,Co),Ho(this,So),No(this,To,new Promise(((t,e)=>{No(this,Co,t),No(this,So,e)})))}then(t,e){return Promise.prototype.then.apply(Po(this,To),[t,e])}catch(t){return Promise.prototype.catch.apply(Po(this,To),[t])}finally(t){return Promise.prototype.finally.apply(Po(this,To),[t])}resolve(t){Po(this,Co).call(this,t)}reject(t){Po(this,So).call(this,t)}getPromise(){return Po(this,To)}}To=new WeakMap,Co=new WeakMap,So=new WeakMap;var Fo,qo,Vo,Ro,Wo,Bo,$o=t=>{throw TypeError(t)},Uo=(t,e,i)=>e.has(t)||$o("Cannot "+i),Ko=(t,e,i)=>(Uo(t,e,"read from private field"),i?i.call(t):e.get(t)),jo=(t,e,i)=>e.has(t)?$o("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),zo=(t,e,i,n)=>(Uo(t,e,"write to private field"),e.set(t,i),i),_o=(t,e,i)=>(Uo(t,e,"access private method"),i);class LiveRegionElement extends HTMLElement{constructor(){if(super(),jo(this,Ro),jo(this,Fo),jo(this,qo),jo(this,Vo),!this.shadowRoot){const t=function(){if(Yo)return Yo;return Yo=document.createElement("template"),Yo.innerHTML=Zo,Yo}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}zo(this,Fo,!1),zo(this,Vo,null),zo(this,qo,new mo({compareFn:Go}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:i,politeness:n="polite"}=e,s=Date.now(),o=new Oo,r={deferred:o,politeness:n,contents:t,scheduled:void 0!==i?s+i:s};return Ko(this,qo).insert(r),_o(this,Ro,Wo).call(this),{...o.getPromise(),cancel:()=>{Ko(this,qo).delete(r),o.resolve()}}}announceFromElement(t,e){const i=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==i)return this.announce(i,e);return{...Promise.resolve(),cancel:Xo}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==Ko(this,Vo)&&(clearTimeout(Ko(this,Vo)),zo(this,Vo,null)),zo(this,Fo,!1),Ko(this,qo).clear()}}Fo=new WeakMap,qo=new WeakMap,Vo=new WeakMap,Ro=new WeakSet,Wo=function(){if(Ko(this,Fo))return;let t=Ko(this,qo).peek();if(!t)return;null!==Ko(this,Vo)&&(clearTimeout(Ko(this,Vo)),zo(this,Vo,null));const e=Date.now();if(t.scheduled<=e)return t=Ko(this,qo).pop(),t&&_o(this,Ro,Bo).call(this,t),void _o(this,Ro,Wo).call(this);const i=t.scheduled-e;zo(this,Vo,window.setTimeout((()=>{zo(this,Vo,null),_o(this,Ro,Wo).call(this)}),i))},Bo=function(t){zo(this,Fo,!0);const{contents:e,deferred:i,politeness:n}=t,s=this.shadowRoot?.getElementById(n);if(!s)throw zo(this,Fo,!1),new Error(`Unable to find container for message. Expected a container with id="${n}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==Ko(this,Vo)&&clearTimeout(Ko(this,Vo)),i.resolve(),this.delay>0?zo(this,Vo,window.setTimeout((()=>{zo(this,Vo,null),zo(this,Fo,!1),_o(this,Ro,Wo).call(this)}),this.delay)):(zo(this,Vo,null),zo(this,Fo,!1),_o(this,Ro,Wo).call(this))};let Yo=null;const Zo='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function Go(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?Qs:t.scheduled<e.scheduled?Js:to:"assertive"===t.politeness&&"assertive"!==e.politeness?Js:"assertive"!==t.politeness&&"assertive"===e.politeness?to:Qs}function Xo(){}var Jo,Qo,tr,er,ir,nr,sr,or,rr,ar,lr,cr,dr,hr,ur,mr,fr,pr,gr,br,vr,wr,yr,Er,Ar,kr,Lr,Tr,Cr,Sr,xr,Mr,Ir,Dr,Pr,Hr,Nr,Or,Fr,qr;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Vr=['[role="option"]'],Rr=Vr.join(","),Wr=Vr.map((t=>`:not([hidden]) > ${t}`)).join(",");var Br,$r;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Br||(Br={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}($r||($r={}));const Ur=(()=>{const t=new Set;let e=null;function i(){for(const e of t)e.updateAnchorPosition()}return n=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new ResizeObserver((()=>{for(const e of t)e.updateAnchorPosition()}))),e.observe(n.ownerDocument.documentElement),n.addEventListener("dialog:close",(()=>{n.invokerElement?.setAttribute("aria-expanded","false"),t.delete(n)})),n.addEventListener("dialog:open",(()=>{t.add(n)}))}})();let Kr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),Jo.add(this),Qo.set(this,void 0),tr.set(this,void 0),er.set(this,""),ir.set(this,""),nr.set(this,new Map),sr.set(this,null),or.set(this,null),rr.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,nr,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=K(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,tr,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,Jo,"m",Pr).call(this),b(this,Jo,"m",Hr).call(this),b(this,Jo,"m",ar).call(this),Ur(this),qe(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),qe(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})})),v(this,Qo,new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,Jo,"a",Cr)===Br.LOCAL&&b(this,Jo,"m",Er).call(this))}})),"f"),qe(this,(()=>Boolean(this.dialog)),(()=>{b(this,Qo,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,Jo,"a",Cr)===Br.LOCAL&&qe(this,(()=>this.items.length>0),(()=>{b(this,Jo,"m",Er).call(this),b(this,Jo,"m",Hr).call(this)}))}disconnectedCallback(){b(this,tr,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,Jo,"m",yr).call(this,t);if(t.target===this.remoteInput)return void b(this,Jo,"m",vr).call(this,t);const e=this.invokerElement?.contains(t.target),i=this.closeButton?.contains(t.target),n=b(this,Jo,"m",hr).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return void b(this,Jo,"m",Mr).call(this,t);if(i&&n)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Wr)){const e=t.ctrlKey||t.altKey||t.metaKey,i=1===t.key.length&&/[a-z\d]/i.test(t.key);!e&&i&&t.stopPropagation()}if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Wr)?.parentElement;if(null!=s&&n){if(b(this,Jo,"m",cr).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e)&&this.contains(i))return void b(this,Jo,"m",Ir).call(this,t,i)}return b(this,Jo,"m",dr).call(this,t)&&(t.preventDefault(),b(this,Jo,"m",qr).call(this,s)?.click()),void b(this,Jo,"m",Dr).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,Jo,"m",gr).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Wr)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(Rr)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,Jo,"m",qr).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,Jo,"m",qr).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,Jo,"m",qr).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,Jo,"m",qr).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,Jo,"m",Dr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,Jo,"m",Dr).call(this,t)}};Qo=new WeakMap,tr=new WeakMap,er=new WeakMap,ir=new WeakMap,nr=new WeakMap,sr=new WeakMap,or=new WeakMap,rr=new WeakMap,Jo=new WeakSet,ar=function(){const{signal:t}=b(this,tr,"f");for(const e of this.querySelectorAll(Vr.join(",")))e.addEventListener("click",b(this,Jo,"m",cr).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Jo,"m",cr).bind(this),{signal:t})},lr=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const i=b(this,Jo,"m",qr).call(this,e);i&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?i.setAttribute("tabindex","-1"):(i.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,Jo,"m",qr).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,Jo,"a",Nr)&&b(this,Jo,"m",qr).call(this,b(this,Jo,"a",Nr))?.setAttribute("tabindex","0")},cr=function(t){if(!b(this,Jo,"m",hr).call(this,t))return!1;const e=t.target.closest(Wr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},dr=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},hr=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Jo,"m",dr).call(this,t)},ur=function(){for(const t of this.items){const e=b(this,Jo,"m",qr).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");i&&b(this,nr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,Jo,"m",Hr).call(this)},mr=function(t){const e=b(this,Jo,"m",qr).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,nr,"f").set(i,{value:i,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},fr=function(t){const e=b(this,Jo,"m",qr).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,nr,"f").delete(i)},pr=function(){b(this,Jo,"a",Sr)&&(b(this,sr,"f")&&clearTimeout(b(this,sr,"f")),b(this,or,"f")&&clearTimeout(b(this,or,"f")),v(this,or,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,sr,setTimeout((()=>{b(this,Jo,"a",Sr)?.showLeadingSpinner()}),1e3),"f"))},gr=function(t){switch(t.type){case"include-fragment-replaced":b(this,Jo,"m",Er).call(this);break;case"loadstart":b(this,Jo,"m",br).call(this,!1);break;case"loadend":b(this,Jo,"a",Sr)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,Jo,"m",br).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},br=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},vr=function(t){switch(t.type){case"remote-input-success":b(this,Jo,"m",Lr).call(this),b(this,Jo,"m",Er).call(this),b(this,Jo,"m",ur).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,Jo,"m",kr).call(this,$r.BODY):b(this,Jo,"m",kr).call(this,$r.BANNER);break;case"loadstart":if(!b(this,Jo,"m",xr).call(this)){if(b(this,Jo,"m",Lr).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,Jo,"m",pr).call(this)}break;case"loadend":b(this,Jo,"a",Sr)?.hideLeadingSpinner(),b(this,or,"f")&&clearTimeout(b(this,or,"f")),b(this,sr,"f")&&clearTimeout(b(this,sr,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},wr=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},yr=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,Jo,"m",qr).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,Jo,"m",qr).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const i=b(this,Jo,"m",qr).call(this,e);i&&i.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],i=b(this,Jo,"m",qr).call(this,e);i&&i.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,Jo,"m",xr).call(this)||b(this,Jo,"m",pr).call(this),b(this,Jo,"a",Cr)===Br.LOCAL||b(this,Jo,"a",Cr)===Br.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,Jo,"m",Er).call(this)}},Er=function(){if(!this.list)return;let t=!1;if(b(this,Jo,"m",xr).call(this)){const e=this.filterInputTextField?.value??"",i=this.filterFn||b(this,Jo,"m",wr);for(const n of this.items)i(n,e)?(b(this,Jo,"m",Fr).call(this,n),t=!0):b(this,Jo,"m",Or).call(this,n)}else t=this.items.length>0;b(this,Jo,"m",lr).call(this),b(this,Jo,"m",Tr).call(this);for(const t of this.items){const e=b(this,Jo,"m",qr).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");b(this,rr,"f")?i&&!b(this,nr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"false"):i&&!b(this,nr,"f").has(i)&&this.isItemChecked(t)&&b(this,Jo,"m",mr).call(this,t)}v(this,rr,!0,"f"),this.noResults&&(b(this,Jo,"m",Ar).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},Ar=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},kr=function(t){let e=this.fragmentErrorElement;t===$r.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},Lr=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},Tr=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},Cr=function(){if(!this.list)return Br.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Br.LOCAL;case"eventually_local":return Br.EVENTUALLY_LOCAL;default:return Br.REMOTE}},Sr=function(){return this.filterInputTextField?.closest("primer-text-field")},xr=function(){return b(this,Jo,"a",Cr)===Br.LOCAL||b(this,Jo,"a",Cr)===Br.EVENTUALLY_LOCAL},Mr=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},Ir=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,n=this.contains(t);(e||n)&&setTimeout((()=>this.invokerElement?.focus()),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},Dr=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{this.open&&this.hide()})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),i=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:i,value:b(this,Jo,"m",qr).call(this,t)?.getAttribute("data-value")}})))return;const n=b(this,Jo,"m",qr).call(this,t);if("single"===this.selectVariant){if(n?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,Jo,"m",qr).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,nr,"f").clear(),i&&(b(this,Jo,"m",mr).call(this,t),n?.setAttribute(this.ariaSelectionType,"true")),b(this,Jo,"m",Pr).call(this)}}else n?.setAttribute(this.ariaSelectionType,`${i}`),i?b(this,Jo,"m",mr).call(this,t):b(this,Jo,"m",fr).call(this,t);b(this,Jo,"m",Hr).call(this),b(this,Jo,"m",lr).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:i,value:b(this,Jo,"m",qr).call(this,t)?.getAttribute("data-value")}}))},Pr=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,er,b(this,er,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,er,"f");if(e){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=`${this.dynamicLabelPrefix} `,n.textContent=e,t.replaceChildren(i,n),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,er,"f")},Hr=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-select-panel-inputs=true] input")??this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):b(this,rr,"f")&&t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=!!this.querySelector("[data-select-panel-inputs=true]"),e=this.querySelector("[data-select-panel-inputs=true]")??this.querySelector("[data-list-inputs=true]");if(!e)return;const i=e.querySelectorAll("input");i.length>0&&v(this,ir,b(this,ir,"f")||i[0].name,"f");for(const i of this.selectedItems){const n=document.createElement("input");n.setAttribute(""+(t?"data-select-panel-input":"data-list-input"),"true"),n.type="hidden",n.autocomplete="off",n.name=i.inputName||b(this,ir,"f"),n.value=(i.value||i.label||"").trim(),e.append(n)}for(const t of i)t.remove()}},Nr=function(){return this.querySelector(Wr)?.parentElement||null},Or=function(t){t&&t.setAttribute("hidden","hidden")},Fr=function(t){t&&t.removeAttribute("hidden")},qr=function(t){return t.querySelector(".ActionListContent")},g([F],Kr.prototype,"includeFragment",void 0),g([F],Kr.prototype,"dialog",void 0),g([F],Kr.prototype,"filterInputTextField",void 0),g([F],Kr.prototype,"remoteInput",void 0),g([F],Kr.prototype,"list",void 0),g([F],Kr.prototype,"noResults",void 0),g([F],Kr.prototype,"fragmentErrorElement",void 0),g([F],Kr.prototype,"bannerErrorElement",void 0),g([F],Kr.prototype,"bodySpinner",void 0),g([F],Kr.prototype,"liveRegion",void 0),Kr=g([V],Kr),window.customElements.get("select-panel")||(window.SelectPanelElement=Kr,window.customElements.define("select-panel",Kr));let jr=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};function zr(t){vt(t,{bindKeys:ct.ArrowVertical|ct.ArrowHorizontal|ct.HomeAndEnd|ct.Backspace,getNextFocusable:(t,e,i)=>{if(e instanceof HTMLElement){try{if(e.closest("dialog:modal"))return}catch{}return function(t,e){switch(`${function(t){if("treeitem"!==t.getAttribute("role"))throw new Error("Element is not a treeitem");switch(t.getAttribute("aria-expanded")){case"true":return"open";case"false":return"closed";default:return"end"}}(t)} ${e.key}`){case"open ArrowRight":return function(t){const e=t.querySelector("[role=treeitem]");return e instanceof HTMLElement?e:void 0}(t);case"open ArrowLeft":case"closed ArrowRight":case"end ArrowRight":return;case"closed ArrowLeft":case"end ArrowLeft":return Zr(t)}switch(e.key){case"ArrowUp":return _r(t,"previous");case"ArrowDown":return _r(t,"next");case"Backspace":return Zr(t)}}(e,i)??e}},focusInStrategy:()=>{let e=t.querySelector("[aria-current]");e=e?.checkVisibility()?e:null;const i=t.querySelector('[role="treeitem"]');return e instanceof HTMLElement?e:document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&"treeitem"===document.activeElement.getAttribute("role")?document.activeElement:i instanceof HTMLElement?i:void 0}})}function _r(t,e){const i=t.closest("[role=tree]");if(!i)return;const n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,(t=>t instanceof HTMLElement&&"treeitem"===t.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP));let s=n.firstChild();for(;s!==t;)s=n.nextNode();let o="next"===e?n.nextNode():n.previousNode();for(;o instanceof HTMLElement&&Yr(o,i);)o="next"===e?n.nextNode():n.previousNode();return o instanceof HTMLElement?o:void 0}function Yr(t,e){for(const i of e.querySelectorAll("[role=treeitem][aria-expanded=false]"))if(t!==i&&i.closest("li")?.contains(t))return i;return null}function Zr(t){const e=t.closest("[role=group]"),i=e?.closest("[role=treeitem]");return i instanceof HTMLElement?i:void 0}var Gr,Xr,Jr,Qr,ta,ea,ia,na,sa,oa,ra,aa;g([F],jr.prototype,"detailsTarget",void 0),g([F],jr.prototype,"summaryTarget",void 0),jr=g([V],jr),window.DetailsToggleElement=jr;let la=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),Gr.add(this),Xr.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,Xr,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),zr(this),new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.querySelector("[aria-expanded=true]")&&b(this,Gr,"m",Jr).call(this,t)})).observe(this,{childList:!0,subtree:!0});new MutationObserver((t=>{if(!this.formInputContainer)return;t.some((t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue))&&this.updateHiddenFormInputs()})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),this.formInputContainer&&this.updateHiddenFormInputs(),customElements.whenDefined("tree-view-sub-tree-node").then((()=>{b(this,Gr,"m",Jr).call(this,this)}))}rootLeafNodes(){return this.querySelectorAll(":scope > ul > li > .TreeViewItemContainer [role=treeitem]")}rootSubTreeNodes(){return this.querySelectorAll(":scope > ul > tree-view-sub-tree-node")}disconnectedCallback(){b(this,Xr,"f").abort()}handleEvent(t){const e=b(this,Gr,"m",ta).call(this,t);e&&b(this,Gr,"m",ea).call(this,e,t)}handleSingleSelection(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const i=this.getNodePath(e),n=this.infoFromNode(e,"true");this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.checkOnlyAtPath(i),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,detail:[n]})))}getFormInputValueForNode(t){return t.getAttribute("data-value")}getNodePath(t){const e=t.getAttribute("data-path");return e?JSON.parse(e):[]}getNodeType(t){return t.getAttribute("data-node-type")}markCurrentAtPath(t){const e=JSON.stringify(t),i=this.querySelector(`[data-path="${CSS.escape(e)}"`);i&&(this.currentNode?.setAttribute("aria-current","false"),i.setAttribute("aria-current","true"))}get currentNode(){return this.querySelector("[aria-current=true]")}get activeNodes(){return document.querySelectorAll('[aria-checked="true"]')}expandAtPath(t){const e=this.subTreeAtPath(t);e&&e.expand()}collapseAtPath(t){const e=this.subTreeAtPath(t);e&&e.collapse()}toggleAtPath(t){const e=this.subTreeAtPath(t);e&&e.toggle()}checkAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"true")}uncheckAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"false")}checkOnlyAtPath(t){for(const t of this.activeNodes)this.uncheckAtPath(this.getNodePath(t));this.checkAtPath(t)}toggleCheckedAtPath(t){const e=this.nodeAtPath(t);e&&"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.uncheckAtPath(t):this.checkAtPath(t))}checkedValueAtPath(t){const e=this.nodeAtPath(t);return e?this.getNodeCheckedValue(e):"false"}disabledValueAtPath(t){const e=this.nodeAtPath(t);return!!e&&this.getNodeDisabledValue(e)}nodeAtPath(t,e){const i=JSON.stringify(t);return this.querySelector(`${e||""}[data-path="${CSS.escape(i)}"]`)}subTreeAtPath(t){const e=this.nodeAtPath(t,"[data-node-type=sub-tree]");return e?e.closest("tree-view-sub-tree-node"):null}leafAtPath(t){return this.nodeAtPath(t,"[data-node-type=leaf]")}setNodeCheckedValue(t,e){t.setAttribute("aria-checked",e.toString())}getNodeCheckedValue(t){return t.getAttribute("aria-checked")||"false"}getNodeDisabledValue(t){return"true"===t.getAttribute("aria-disabled")}setNodeDisabledValue(t,e){e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")}nodeHasCheckBox(t){return null!==t.querySelector(".TreeViewItemCheckbox")}nodeHasNativeAction(t){return t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement}expandAncestorsForNode(t){const e=t.closest("tree-view-sub-tree-node");if(e)for(const t of e.eachAncestorSubTreeNode())t.expanded||t.expand()}changeSelectStrategy(t){for(const e of this.querySelectorAll("tree-view-sub-tree-node"))e.changeSelectStrategy(t)}infoFromNode(t,e){const i=this.getNodeType(t);if(!i)return null;const n=this.getNodeCheckedValue(t);return{node:t,type:i,path:this.getNodePath(t),checkedValue:e||n,previousCheckedValue:n}}selectVariant(t){return t.getAttribute("data-select-variant")||"none"}updateHiddenFormInputs(){const t=[];for(const e of this.querySelectorAll("[role=treeitem][aria-checked=true]")){const i=this.formInputPrototype.cloneNode();i.removeAttribute("data-target"),i.removeAttribute("form");const n={path:this.getNodePath(e)},s=this.getFormInputValueForNode(e);s&&(n.value=s),i.value=JSON.stringify(n),t.push(i)}this.formInputContainer.replaceChildren(...t)}};var ca,da;Xr=new WeakMap,Gr=new WeakSet,Jr=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},Qr=function(t){return"click"===t.type},ta=function(t){const e=t.target,i=e.closest("[role=treeitem]");return i?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:i:null},ea=function(t,e){b(this,Gr,"m",ia).call(this,e,t)?b(this,Gr,"m",na).call(this,e,t):b(this,Gr,"m",sa).call(this,e,t)?this.handleSingleSelection(e,t):b(this,Gr,"m",Qr).call(this,e)?b(this,Gr,"m",oa).call(this,e,t):"focusin"===e.type?b(this,Gr,"m",ra).call(this,t):e instanceof KeyboardEvent&&b(this,Gr,"m",aa).call(this,e,t)},ia=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},na=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if("leaf"!==this.getNodeType(e))return;const i="false"===this.getNodeCheckedValue(e)?"true":"false",n=this.infoFromNode(e,i);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true"),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]})))},sa=function(t,e){return"click"===t.type&&"single"===this.selectVariant(e)},oa=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const i=this.getNodePath(e);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeActivated",{bubbles:!0,cancelable:!0,detail:this.infoFromNode(e)}))&&(this.nodeHasNativeAction(e)||this.toggleAtPath(i),this.dispatchEvent(new CustomEvent("treeViewNodeActivated",{bubbles:!0,detail:this.infoFromNode(e)})))},ra=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},aa=function(t,e){if(e&&"leaf"===this.getNodeType(e))switch(t.key){case" ":case"Enter":if(this.getNodeDisabledValue(e)){t.preventDefault();break}"multiple"===this.selectVariant(e)?(t.preventDefault(),"true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true")):"single"===this.selectVariant(e)?(t.preventDefault(),this.checkOnlyAtPath(this.getNodePath(e))):e instanceof HTMLAnchorElement&&e.click()}},g([F],la.prototype,"formInputContainer",void 0),g([F],la.prototype,"formInputPrototype",void 0),la=g([V],la),window.customElements.get("tree-view")||(window.TreeViewElement=la,window.customElements.define("tree-view",la));let ha=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),ca.add(this)}connectedCallback(){qe(this,(()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon)),(()=>{this.expanded=this.collapsedIcon.hidden}))}showExpanded(){this.expanded=!0,b(this,ca,"m",da).call(this)}showCollapsed(){this.expanded=!1,b(this,ca,"m",da).call(this)}toggle(){this.expanded=!this.expanded,b(this,ca,"m",da).call(this)}};var ua,ma,fa,pa,ga,ba,va,wa,ya,Ea,Aa,ka;ca=new WeakSet,da=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([F],ha.prototype,"expandedIcon",void 0),g([F],ha.prototype,"collapsedIcon",void 0),ha=g([V],ha),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=ha,window.customElements.define("tree-view-icon-pair",ha));let La=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),ua.add(this),ma.set(this,null),fa.set(this,"success"),pa.set(this,void 0),ga.set(this,!1)}connectedCallback(){qe(this,(()=>Boolean(this.node)&&Boolean(this.subTree)),(()=>{b(this,ua,"m",Aa).call(this)}));const{signal:t}=v(this,pa,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),qe(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("loadstart",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replace",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replaced",(t=>{b(this,ua,"m",va).call(this,t)}),{signal:t})})),qe(this,(()=>Boolean(this.retryButton)),(()=>{this.retryButton.addEventListener("click",(t=>{b(this,ua,"m",wa).call(this,t)}),{signal:t})}));new MutationObserver((()=>{if("mixed_descendants"!==this.selectStrategy)return;let t="unknown";for(const e of this.eachDirectDescendantNode())switch(`${t} ${e.getAttribute("aria-checked")||"false"}`){case"unknown mixed":case"false mixed":case"true mixed":case"false true":case"true false":t="mixed";break;case"unknown false":t="false";break;case"unknown true":t="true"}"unknown"!==t&&this.node?.getAttribute("aria-checked")!==t&&this.node?.setAttribute("aria-checked",t)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]})}get expanded(){return null===b(this,ma,"f")&&v(this,ma,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,ma,"f")}set expanded(t){v(this,ma,t,"f"),b(this,ua,"m",Aa).call(this)}get loadingState(){return b(this,fa,"f")}set loadingState(t){v(this,fa,t,"f"),b(this,ua,"m",Aa).call(this)}get selectStrategy(){return this.node.getAttribute("data-select-strategy")||"descendants"}get selectVariant(){return this.node.getAttribute("data-select-variant")||"none"}get level(){return parseInt(this.node.getAttribute("aria-level")||"0")}disconnectedCallback(){b(this,pa,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,ua,"m",ba).call(this,t):t.target===this.includeFragment?b(this,ua,"m",va).call(this,t):t instanceof KeyboardEvent?b(this,ua,"m",ya).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,ua,"a",ka)&&b(this,ua,"m",Ea).call(this,t)}expand(){const t=this.expanded;this.expanded=!0,!t&&this.treeView&&this.treeView.dispatchEvent(new CustomEvent("treeViewNodeExpanded",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}collapse(){const t=!this.expanded;if(this.expanded=!1,!t&&this.treeView){const t=this.subTree.querySelector("[tabindex='0']");t?.setAttribute("tabindex","-1"),this.node.setAttribute("tabindex","0"),this.treeView.dispatchEvent(new CustomEvent("treeViewNodeCollapsed",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}}toggle(){this.expanded?this.collapse():this.expand()}get nodes(){return this.querySelectorAll(":scope > [role=treeitem]")}*eachDirectDescendantNode(){for(const t of this.subTree.querySelectorAll(":scope > li > .TreeViewItemContainer > [role=treeitem]"))yield t;for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node > li > .TreeViewItemContainer > [role=treeitem]"))yield t}*eachDirectDescendantSubTreeNode(){for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node"))yield t}*eachDescendantNode(){for(const t of this.subTree.querySelectorAll("[role=treeitem]"))yield t}*eachAncestorSubTreeNode(){if(!this.treeView)return;let t=this;for(;t&&this.treeView.contains(t);)yield t,t=t.parentElement?.closest("tree-view-sub-tree-node")}get isEmpty(){return 0===this.nodes.length}get treeView(){return this.closest("tree-view")}toggleChecked(){const t="false"===(this.treeView?.getNodeCheckedValue(this.node)||"false")?"true":"false",e=[],i=this.treeView?.infoFromNode(this.node,t);if(i&&e.push(i),"descendants"===this.selectStrategy||"mixed_descendants"===this.selectStrategy)for(const i of this.eachDescendantNode()){const n=this.treeView?.infoFromNode(i,t);n&&e.push(n)}if(this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))){for(const i of e)i.node.setAttribute("aria-checked",t);this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))}}changeSelectStrategy(t){this.node.setAttribute("data-select-strategy",t)}};ma=new WeakMap,fa=new WeakMap,pa=new WeakMap,ga=new WeakMap,ua=new WeakSet,ba=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},va=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,ga,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,ga,"f")){const t=this.querySelector("[role=group] > :first-child");if(!t)return;const e=t.querySelector("[role=treeitem]");if(!e)return;e.focus()}v(this,ga,!1,"f")}},wa=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},ya=function(t){const e=t.target.closest("[role=treeitem]");if(e&&"sub-tree"===this.treeView?.getNodeType(e))switch(t.key){case"Enter":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}t.stopPropagation(),b(this,ua,"a",ka)?this.toggleChecked():"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):this.treeView?.nodeHasNativeAction(e)||this.toggle();break;case"ArrowRight":t.stopPropagation(),this.expand();break;case"ArrowLeft":t.stopPropagation(),this.collapse();break;case" ":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}b(this,ua,"a",ka)?(t.stopPropagation(),t.preventDefault(),this.toggleChecked()):"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):e instanceof HTMLAnchorElement?e.click():this.treeView?.nodeHasNativeAction(e)||this.toggle()}},Ea=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},Aa=function(){switch(this.expanded?(this.subTree&&(this.subTree.hidden=!1),this.node.setAttribute("aria-expanded","true"),this.treeView?.expandAncestorsForNode(this),this.iconPair&&this.iconPair.showExpanded(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.removeAttribute("hidden"),this.collapsedToggleIcon.setAttribute("hidden","hidden"))):(this.subTree&&(this.subTree.hidden=!0),this.node.setAttribute("aria-expanded","false"),this.iconPair&&this.iconPair.showCollapsed(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.setAttribute("hidden","hidden"),this.collapsedToggleIcon.removeAttribute("hidden"))),this.loadingState){case"loading":this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0),this.loadingIndicator&&(this.loadingIndicator.hidden=!1);break;case"error":this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!1);break;default:this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0)}},ka=function(){return this.querySelector(".TreeViewItemCheckbox")},g([F],La.prototype,"node",void 0),g([F],La.prototype,"subTree",void 0),g([F],La.prototype,"iconPair",void 0),g([F],La.prototype,"toggleButton",void 0),g([F],La.prototype,"expandedToggleIcon",void 0),g([F],La.prototype,"collapsedToggleIcon",void 0),g([F],La.prototype,"includeFragment",void 0),g([F],La.prototype,"loadingIndicator",void 0),g([F],La.prototype,"loadingFailureMessage",void 0),g([F],La.prototype,"retryButton",void 0),La=g([V],La),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=La,window.customElements.define("tree-view-sub-tree-node",La));let Ta=class TreeViewIncludeFragmentElement extends IncludeFragmentElement{request(){const t=super.request(),e=new URL(t.url);return e.searchParams.set("path",this.getAttribute("data-path")||""),new Request(e,{method:t.method,headers:t.headers,credentials:t.credentials})}};Ta=g([V],Ta),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=Ta,window.customElements.define("tree-view-include-fragment",Ta));let Ca=class AvatarFallbackElement extends HTMLElement{constructor(){super(...arguments),this.img=null,this.testImage=null}connectedCallback(){if(this.img=this.querySelector("img")??null,!this.img)return;const t=this.getAttribute("data-unique-id")||"",e=this.getAttribute("data-alt-text")||"",i=this.getAttribute("data-avatar-src")||"";this.applyColor(this.img,t,e),i&&this.testLoadImage(i)}disconnectedCallback(){this.testImage&&(this.testImage.onload=null,this.testImage=null),this.img=null}testLoadImage(t){this.testImage=new Image,this.testImage.onload=()=>{this.img&&(this.img.src=t)},this.testImage.src=t}applyColor(t,e,i){if(!e||!i)return;const n=`${e}${i}`,s=`hsl(${this.valueHash(n)}, 50%, 30%)`;this.updateSvgColor(t,s)}valueHash(t){let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);return e%360}updateSvgColor(t,e){const i=t.src;if(!i.startsWith("data:image/svg+xml;base64,"))return;const n=i.replace("data:image/svg+xml;base64,","");try{const i=atob(n).replace(/fill="hsl\([^"]+\)"/,`fill="${e}"`);t.src=`data:image/svg+xml;base64,${btoa(i)}`}catch{}}};Ca=g([V],Ca);let Sa=class PageHeaderElement extends HTMLElement{menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}};Sa=g([V],Sa),window.customElements.get("page-header")||(window.PageHeaderElement=Sa,window.customElements.define("page-header",Sa));let xa=class ZenModeButtonElement extends HTMLElement{constructor(){super(),this.inZenMode=!1,document.addEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}disconnectedCallback(){document.removeEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}fullscreenChangeEventHandler(){this.changeButtonState(!this.inZenMode),this.dispatchZenModeStatus()}dispatchZenModeStatus(){const t=new CustomEvent("zenModeToggled",{detail:{active:this.inZenMode}});window.dispatchEvent(t)}deactivateZenMode(){document.exitFullscreen&&document.exitFullscreen()}activateZenMode(){document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen()}changeButtonState(t){this.inZenMode=t,this.button.setAttribute("aria-pressed",t.toString())}performAction(){this.inZenMode?this.deactivateZenMode():this.activateZenMode()}};g([F],xa.prototype,"button",void 0),xa=g([V],xa),window.customElements.get("zen-mode-button")||(window.ZenModeButtonElement=xa,window.customElements.define("zen-mode-button",xa));let Ma=class SubHeaderElement extends HTMLElement{connectedCallback(){this.setupFilterInputClearButton()}setupFilterInputClearButton(){this.waitForCondition((()=>Boolean(this.filterInput)),(()=>{this.toggleFilterInputClearButton()}))}toggleFilterInputClearButton(){this.filterInput.value.length>0?this.filterInput.classList.remove("SubHeader-filterInput_hiddenClearButton"):this.filterInput.classList.add("SubHeader-filterInput_hiddenClearButton")}expandFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.add("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.remove("d-none");this.classList.add("SubHeader--expandedSearch"),this.filterInput.focus()}collapseFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.remove("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.add("d-none");this.classList.remove("SubHeader--expandedSearch")}waitForCondition(t,e){if(t())e();else{const i=new MutationObserver((()=>{t()&&(e(),i.disconnect())}));i.observe(this,{childList:!0,subtree:!0})}}};var Ia,Da;g([F],Ma.prototype,"filterInput",void 0),g([q],Ma.prototype,"hiddenItemsOnExpandedFilter",void 0),g([q],Ma.prototype,"shownItemsOnExpandedFilter",void 0),Ma=g([V],Ma),window.customElements.get("sub-header")||(window.SubHeaderElement=Ma,window.customElements.define("sub-header",Ma));let Pa=class DangerDialogFormHelperElement extends HTMLElement{constructor(){super(...arguments),Ia.add(this),this.confirmationLiveMessageChecked="",this.confirmationLiveMessageUnchecked=""}get form(){return this.querySelector("form")}get submitButton(){return this.querySelector("input[type=submit],button[type=submit],button[data-submit-dialog-id]")}connectedCallback(){this.style.display="contents",this.form&&(this.form.style.display="contents"),b(this,Ia,"m",Da).call(this)}toggle(){if(!this.checkbox||!this.submitButton)return;const t=this.checkbox.checked;if(this.submitButton.disabled=!t,this.liveRegion){const e=t?this.confirmationLiveMessageChecked:this.confirmationLiveMessageUnchecked;this.liveRegion.announce(e,{politeness:"assertive"})}}};Ia=new WeakSet,Da=function(){this.toggle()},g([F],Pa.prototype,"checkbox",void 0),g([F],Pa.prototype,"liveRegion",void 0),g([I],Pa.prototype,"confirmationLiveMessageChecked",void 0),g([I],Pa.prototype,"confirmationLiveMessageUnchecked",void 0),Pa=g([V],Pa),window.customElements.get("danger-dialog-form-helper")||(window.DangerDialogFormHelperElement=Pa,window.customElements.define("danger-dialog-form-helper",Pa));class CollapsibleElement extends HTMLElement{constructor(){super(...arguments),this.collapsed=!1}toggleViaKeyboard(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),this.toggle())}toggle(){this.collapsed=!this.collapsed}attributeChangedCallback(t){"data-collapsed"===t&&(this.collapsed?this.hideAll():this.expandAll())}hideAll(){this.arrowDown?.removeAttribute("hidden"),this.arrowUp?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","false");for(const t of this.collapsibleElements)t.hidden=!0;this.classList.add(`${this.baseClass}--collapsed`)}expandAll(){this.arrowUp?.removeAttribute("hidden"),this.arrowDown?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","true");for(const t of this.collapsibleElements)t.hidden=!1;this.classList.remove(`${this.baseClass}--collapsed`)}}g([F],CollapsibleElement.prototype,"arrowDown",void 0),g([F],CollapsibleElement.prototype,"arrowUp",void 0),g([F],CollapsibleElement.prototype,"triggerElement",void 0),g([q],CollapsibleElement.prototype,"collapsibleElements",void 0),g([I],CollapsibleElement.prototype,"collapsed",void 0);let Ha=class CollapsibleHeaderElement extends CollapsibleElement{connectedCallback(){if(!this.closest(".Box"))throw new Error("No surrounding BorderBox found")}get baseClass(){return"CollapsibleHeader"}};Ha=g([V],Ha);let Na=class CollapsibleSectionElement extends CollapsibleElement{get baseClass(){return"CollapsibleSection"}};var Oa,Fa,qa,Va,Ra,Wa,Ba,$a,Ua,Ka,ja,za,_a,Ya,Za,Ga,Xa;Na=g([V],Na);let Ja=class FilterableTreeViewElement extends HTMLElement{constructor(){super(...arguments),Oa.add(this),Fa.set(this,void 0),qa.set(this,void 0),Va.set(this,new Map)}connectedCallback(){const{signal:t}=v(this,qa,new AbortController,"f");this.addEventListener("treeViewNodeChecked",this,{signal:t}),this.addEventListener("itemActivated",this,{signal:t}),this.addEventListener("input",this,{signal:t})}disconnectedCallback(){b(this,qa,"f").abort()}handleEvent(t){t.target===this.filterModeControl?b(this,Oa,"m",$a).call(this,t):t.target===this.filterInput?b(this,Oa,"m",Ua).call(this,t):t.target===this.includeSubItemsCheckBox?b(this,Oa,"m",Ka).call(this,t):(t.target instanceof la||t.target instanceof La)&&b(this,Oa,"m",Ra).call(this,t)}get filterModeControl(){return this.filterModeControlList.closest("segmented-control")}get treeView(){return this.treeViewList.closest("tree-view")}set filterFn(t){v(this,Fa,t,"f")}get filterFn(){return b(this,Fa,"f")?b(this,Fa,"f"):this.defaultFilterFn}defaultFilterFn(t,e,i){const n=[];if(e.length>0){const i=e.toLowerCase(),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let o=s.nextNode();for(;o;){const t=o.textContent?.toLocaleLowerCase()||"";let e=0;for(;e<t.length;){const s=t.indexOf(i,e);if(-1===s)break;const r=new Range;r.setStart(o,s),r.setEnd(o,s+i.length),n.push(r),e=s+i.length}o=s.nextNode()}}if(0===n.length&&e.length>0)return null;switch(i){case"selected":if("false"!==this.treeView?.getNodeCheckedValue(t))return n;break;case"all":return n}return null}get filterMode(){const t=this.filterModeControl?.current;return t?t.getAttribute("data-name"):null}get queryString(){return this.filterInput.value}*eachDescendantDepthFirst(t,e,i){for(const n of t.querySelectorAll(`[role=treeitem][data-node-type='sub-tree'][aria-level='${e}']`)){const t=n.closest("tree-view-sub-tree-node");yield*this.eachDescendantDepthFirst(t,e+1,[...i,t])}const n=t.querySelectorAll(`[role=treeitem][data-node-type='leaf'][aria-level='${e}']`);yield[n,i]}*eachShallowestCheckedSubTree(t){if("true"!==this.treeView?.getNodeCheckedValue(t.node))for(const e of t.eachDirectDescendantSubTreeNode())yield*this.eachShallowestCheckedSubTree(e);else yield t}};Fa=new WeakMap,qa=new WeakMap,Va=new WeakMap,Oa=new WeakSet,Ra=function(t){const e=t;if("treeViewNodeChecked"===t.type)b(this,Oa,"m",Wa).call(this,e)},Wa=function(t){if(!this.treeView)return;if(!this.includeSubItemsCheckBox.checked)return;const e=t.detail[0];if("sub-tree"!==this.treeView.getNodeType(e.node))return;const i=e.node.closest("tree-view-sub-tree-node");"false"===e.checkedValue?b(this,Oa,"m",Ba).call(this,i):b(this,Oa,"m",za).call(this,i)},Ba=function(t){if(!this.treeView)return;if(!b(this,Va,"f").has(t))return;const e=b(this,Va,"f").get(t);for(const[t,i]of e.entries()){let e=t;t instanceof La&&(e=t.node),this.treeView.setNodeCheckedValue(e,i.checked?"true":"false"),this.treeView.setNodeDisabledValue(e,i.disabled)}b(this,Va,"f").delete(t)},$a=function(t){"itemActivated"===t.type&&b(this,Oa,"m",Ya).call(this)},Ua=function(t){"input"===t.type&&b(this,Oa,"m",Ya).call(this)},Ka=function(t){this.treeView&&"input"===t.type&&(b(this,Oa,"m",Ya).call(this),this.includeSubItemsCheckBox.checked?b(this,Oa,"m",ja).call(this):b(this,Oa,"m",_a).call(this))},ja=function(){if(this.treeView)for(const t of this.treeView.rootSubTreeNodes())for(const e of this.eachShallowestCheckedSubTree(t))b(this,Oa,"m",za).call(this,e)},za=function(t){if(!this.treeView)return;const e=new Map;for(const i of t.eachDescendantNode())e.set(i,{checked:"true"===this.treeView.getNodeCheckedValue(i),disabled:this.treeView.getNodeDisabledValue(i)}),this.treeView.setNodeCheckedValue(i,"true"),this.treeView.setNodeDisabledValue(i,!0);b(this,Va,"f").set(t,e)},_a=function(){for(const t of b(this,Va,"f").keys())b(this,Oa,"m",Ba).call(this,t)},Ya=function(){if(!this.treeView)return;b(this,Oa,"m",Xa).call(this);const t=this.queryString,e=this.filterMode||void 0,i=window.crypto.randomUUID(),n=new Map,s=(...n)=>{for(const s of n)s.expand(),s.removeAttribute("hidden"),s.setAttribute("data-generation",i),o(s.node,t,e)?s.node.removeAttribute("aria-disabled"):s.node.setAttribute("aria-disabled","true")},o=(t,e,i)=>(n.has(t)||n.set(t,this.filterFn(t,e,i)),null!==n.get(t));for(const[n,r]of this.eachDescendantDepthFirst(this.treeViewList,1,[])){const a=r[r.length-1];let l=!1;for(const i of n)o(i,t,e)?(i.closest("li")?.removeAttribute("hidden"),l=!0):i.closest("li")?.setAttribute("hidden","hidden");l?s(...r):a&&(o(a.node,t,e)?s(...r):a.getAttribute("data-generation")!==i&&(a.collapse(),a.setAttribute("hidden","hidden")))}const r=Array.from(n.values()).flat().filter((t=>null!==t));0===r.length&&t.length>0?(this.treeViewList.setAttribute("hidden","hidden"),this.noResultsMessage.removeAttribute("hidden")):(this.treeViewList.removeAttribute("hidden"),this.noResultsMessage.setAttribute("hidden","hidden"),b(this,Oa,"m",Za).call(this,r))},Za=function(t){CSS.highlights?CSS.highlights.set("primer-filterable-tree-view-search-results",new Highlight(...t)):b(this,Oa,"m",Ga).call(this,t)},Ga=function(t){const e=t[0].startContainer,i=e.parentNode,n=e.textContent,s=[];let o=0;for(const{startOffset:e,endOffset:i}of t){e>o&&s.push(document.createTextNode(n.slice(o,e)));const t=document.createElement("mark");t.textContent=n.slice(e,i),s.push(t),o=i}o<n.length&&s.push(document.createTextNode(n.slice(o)));for(const t of s.reverse())i.insertBefore(t,e.nextSibling);i.removeChild(e)},Xa=function(){for(const t of this.querySelectorAll("mark"))t.parentElement&&t.parentElement.replaceChildren(t.parentElement.textContent)},g([F],Ja.prototype,"filterInput",void 0),g([F],Ja.prototype,"filterModeControlList",void 0),g([F],Ja.prototype,"treeViewList",void 0),g([F],Ja.prototype,"noResultsMessage",void 0),g([F],Ja.prototype,"includeSubItemsCheckBox",void 0),Ja=g([V],Ja),window.customElements.get("filterable-tree-view")||(window.FilterableTreeViewElement=Ja,window.customElements.define("filterable-tree-view",Ja))}();
1
+ !function(){"use strict";var t,e,i,n,s,o,r,a,l=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},c=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const d=new WeakMap;let h=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),i.set(this,new IntersectionObserver((e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,i,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",n).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){h=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,i){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",n).call(this):"loading"===e&&this.isConnected&&"eager"!==i&&"eager"===this.loading&&l(this,t,"m",n).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",n).call(this),"lazy"===this.loading&&l(this,i,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){d.delete(this),l(this,t,"m",n).call(this)}}e=new WeakMap,i=new WeakMap,t=new WeakSet,n=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,i,"f").unobserve(this);try{const i=await l(this,t,"m",s).call(this);if(i instanceof Error)throw i;const n=i,o=document.createElement("template");o.innerHTML=n;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,i=d.get(this);if(i&&i.src===e)return i.data;{let i;return i=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),d.set(this,{src:e,data:i}),i}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t,e){await new Promise((t=>setTimeout(t,0)));for(const i of t)this.dispatchEvent(e?new CustomEvent(i,{detail:{error:e}}):new Event(i))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const i=await this.fetch(this.request()),n=i.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||n&&n.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${n}`);if(200!==i.status)throw new Error(`Failed to load resource: the server responded with a status of ${i.status}`);const s=await i.text();let o=s;if(h){o=(await h).createHTML(s,i)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"],e),e}var e};const u="undefined"!=typeof globalThis?globalThis:window;try{u.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(u.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const m=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=f.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};m.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&f(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=m.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=m.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function f(t,e,i){const n=t.input;if(!n)return;const s=m.get(t);if(!s)return;const o=n.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let d;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let h="";try{d=await async function(t,e,i){try{const n=await fetch(e,i);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),n}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),h=await d.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}d&&d.ok?(a.innerHTML=h,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:i?i.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(i){clearTimeout(e),e=setTimeout((()=>{clearTimeout(e),t(i)}),300)}}function g(t,e,i,n){var s,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,i,r):s(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r}function b(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)}function v(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){k(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const i=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)C(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&k(t)}));i.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const n={get closed(){return e},unsubscribe(){e=!0,E.delete(t),i.disconnect()}};return E.set(t,n),n}function k(t){for(const e of t.querySelectorAll("[data-action]"))C(e);t instanceof Element&&t.hasAttribute("data-action")&&C(t)}function L(t){const e=t.currentTarget;for(const i of T(e))if(t.type===i.type){const n=e.closest(i.tag);w.has(n)&&"function"==typeof n[i.method]&&n[i.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(i.tag)){const e=s.host;"function"==typeof e[i.method]&&e[i.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),i=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,i),method:e.slice(i+1)||"handleEvent"}||"handleEvent"}}function C(t){for(const e of T(t))t.addEventListener(e.type,L)}const S=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),x=(t,e="property")=>{const i=S(t);if(!i.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return i};const M="attr";function I(t,e){$(t,M).add(e)}const D=new WeakSet;function P(t,e){if(D.has(t))return;D.add(t);const i=Object.getPrototypeOf(t),n=i?.constructor?.attrPrefix??"data-";e||(e=$(i,M));for(const i of e){const e=t[i],s=x(`${n}${i}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,i,o),i in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const H=new Map,N=new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),O=new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const i={once:!0,passive:!0,signal:e.signal},n=()=>e.abort();document.addEventListener("mousedown",n,i),document.addEventListener("touchstart",n,i),document.addEventListener("keydown",n,i),document.addEventListener("pointerdown",n,i)})),F={ready:()=>N,firstInteraction:()=>O,visible:t=>new Promise((e=>{const i=new IntersectionObserver((t=>{for(const n of t)if(n.isIntersecting)return e(),void i.disconnect()}),{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))i.observe(e)}))},q=new WeakMap;function V(t){cancelAnimationFrame(q.get(t)||0),q.set(t,requestAnimationFrame((()=>{for(const e of H.keys()){const i=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||i){const n=i?.getAttribute("data-load-on")||"ready",s=n in F?F[n]:F.ready;for(const t of H.get(e)||[])s(e).then(t);H.delete(e),q.delete(t)}}})))}let R;const W=Symbol.for("catalyst");class B{constructor(t,e){const i=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){i.connectedCallback(this,n)};const s=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){i.disconnectedCallback(this,s)};const o=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,e,n){i.attributeChangedCallback(this,t,e,n,o)};let r=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return i.observedAttributes(this,r)},set(t){r=t}}),function(t){let e=t.observedAttributes||[];const i=t.attrPrefix??"data-",n=t=>x(`${i}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...$(t.prototype,M)].map(n).concat(e),set(t){e=t}})}(t),function(t,e){const i=e||S(t.name).replace(/-element$/,"");try{window.customElements.define(i,t),window[t.name]=customElements.get(i)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t,e)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),P(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),k(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){R||(R=new MutationObserver((t=>{if(H.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&V(t)}))),V(t),R.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,i,n,s){P(t),"data-catalyst"!==e&&s&&s.call(t,e,i,n)}}function $(t,e){if(!Object.prototype.hasOwnProperty.call(t,W)){const e=t[W],i=t[W]=new Map;if(e)for(const[t,n]of e)i.set(t,new Set(n))}const i=t[W];return i.has(e)||i.set(e,new Set),i.get(e)}function U(t,e){$(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase();if(t.shadowRoot)for(const n of t.shadowRoot.querySelectorAll(`[data-target~="${i}.${e}"]`))if(!n.closest(i))return n;for(const n of t.querySelectorAll(`[data-target~="${i}.${e}"]`))if(n.closest(i)===t)return n}(this,e)}})}function K(t,e){$(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const i=t.tagName.toLowerCase(),n=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)||n.push(s);for(const s of t.querySelectorAll(`[data-targets~="${i}.${e}"]`))s.closest(i)===t&&n.push(s);return n}(this,e)}})}function j(t){if("string"==typeof t)return e=>{new B(e,t)};new B(t)}var z;class _{constructor(t){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}})),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const i=t.querySelector(".ActionListItem-truncationTooltip");if(!i)continue;const n=e.scrollWidth>e.clientWidth;i.style.display=n?"":"none"}}}let Y=class ActionListElement extends HTMLElement{constructor(){super(...arguments),z.set(this,void 0)}connectedCallback(){v(this,z,new _(this),"f")}disconnectedCallback(){b(this,z,"f").unobserve(this)}};z=new WeakMap,Y=g([j("action-list")],Y);const Z={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},G={start:["end","center"],end:["start","center"],center:["end","start"]};function X(t,e,i={}){const n=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e instanceof Element;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const i=e!==document.body&&e instanceof HTMLElement?e:document.body,n=i.getBoundingClientRect(),s=getComputedStyle(i),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:n.top+o,left:n.left+r,width:n.width-a-r,height:Math.max(n.height-o-l,i===document.body?window.innerHeight:-1/0)}}(n),o=getComputedStyle(n),r=n.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,i,n,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let d=Q(i,n,s,o,a,l),h=s,u=o;if(d.top-=e.top,d.left-=e.left,!r){const r=Z[s];let m=0;if(r){let t=s;for(;m<r.length&&tt(t,d,c,i);){const s=r[m++];t=s,d=Q(i,n,s,o,a,l),d.top-=e.top,d.left-=e.left,h=s}}const f=G[o];let p=0;if(f){let t=o;for(;p<f.length&&et(t,d,c,i);){const s=f[p++];t=s,d=Q(i,n,h,s,a,l),d.top-=e.top,d.left-=e.left,u=s}}d.top<c.top&&(d.top=c.top),d.left<c.left&&(d.left=c.left),d.left+i.width>t.width+c.left&&(d.left=t.width+c.left-i.width),r&&m<r.length&&d.top+i.height>t.height+c.top&&(d.top=Math.max(t.height+c.top-i.height,0))}return Object.assign(Object.assign({},d),{anchorSide:h,anchorAlign:u})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,i,n,s,o;const r=null!==(e=t.side)&&void 0!==e?e:J.side,a=null!==(i=t.align)&&void 0!==i?i:J.align;return{side:r,align:a,anchorOffset:null!==(n=t.anchorOffset)&&void 0!==n?n:"inside-center"===r?0:J.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?J.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:J.allowOutOfBounds}}(i))}const J={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function Q(t,e,i,n,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===i?l=e.top-s-t.height:"outside-bottom"===i?l=a+s:"outside-left"===i?c=e.left-s-t.width:"outside-right"===i&&(c=r+s),"outside-top"!==i&&"outside-bottom"!==i||(c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==i&&"outside-right"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===i?l=e.top+s:"inside-bottom"===i?l=a-s-t.height:"inside-left"===i?c=e.left+s:"inside-right"===i?c=r-s-t.width:"inside-center"===i&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===i||"inside-bottom"===i?c="start"===n?e.left+o:"center"===n?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==i&&"inside-right"!==i&&"inside-center"!==i||(l="start"===n?e.top+o:"center"===n?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function tt(t,e,i,n){return"outside-top"===t||"outside-bottom"===t?e.top<i.top||e.top+n.height>i.height+i.top:e.left<i.left||e.left+n.width>i.width+i.left}function et(t,e,i,n){return"end"===t?e.left<i.left:"start"===t||"center"===t?e.left+n.width>i.left+i.width||e.left<i.left:void 0}function*it(t,e={}){var i,n;const s=null!==(i=e.strict)&&void 0!==i&&i,o=null!==(n=e.onlyTabbable)&&void 0!==n&&n?ot:st,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function nt(t,e=!1){return it(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function st(t,e=!1){const i=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,n=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(i||n||s||o)return!1;if(e){const e=getComputedStyle(t),i=0===t.offsetWidth||0===t.offsetHeight,n=["hidden","collapse"].includes(e.visibility),s="none"===e.display||!t.offsetParent,o=0===t.getClientRects().length;if(i||n||o||s)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function ot(t,e=!1){return st(t,e)&&"-1"!==t.getAttribute("tabindex")}let rt=!1;function at(){}try{const t=Object.create({},{signal:{get(){rt=!0}}});window.addEventListener("test",at,t),window.removeEventListener("test",at,t)}catch(t){}function lt(){rt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,i,n){return"object"==typeof n&&"signal"in n&&n.signal instanceof AbortSignal&&t.call(n.signal,"abort",(()=>{this.removeEventListener(e,i,n)})),t.call(this,e,i,n)}}(),rt=!0)}lt();const ct=[];let dt,ht;function ut(t,e,i){const n=new AbortController,s=null!=i?i:n.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=nt(t,!0);null==e||e.focus()};const r=document.createElement("span");r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=nt(t);null==e||e.focus()};Array.from(t.children).filter((t=>t.classList.contains("sentinel")&&"SPAN"===t.tagName)).length||(t.prepend(o),t.append(r));const a=function(t,e){const i=new MutationObserver((i=>{for(const n of i)if("childList"===n.type&&n.addedNodes.length){if(Array.from(n.addedNodes).filter((t=>t instanceof HTMLElement&&t.classList.contains("sentinel")&&"SPAN"===t.tagName)).length)return;const i=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==i?void 0:i.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}}));return i.observe(t,{childList:!0}),i}(t,[o,r]);let l;function c(i){if(i instanceof HTMLElement&&document.contains(t)){if(t.contains(i))return void(l=i);if(l&&ot(l)&&t.contains(l))return void l.focus();if(e&&t.contains(e))return void e.focus();{const e=nt(t);return void(null==e||e.focus())}}}const d=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(dt){const t=dt;dt.container.setAttribute("data-focus-trap","suspended"),dt.controller.abort(),ct.push(t)}d.signal.addEventListener("abort",(()=>{dt=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const i=ct.findIndex((e=>e.container===t));i>=0&&ct.splice(i,1),a.disconnect(),function(){const t=ct.pop();t&&ut(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{c(t.target)}),{signal:d.signal,capture:!0}),c(document.activeElement),dt={container:t,controller:d,initialFocus:e,originalSignal:s};const h=ct.findIndex((e=>e.container===t));if(h>=0&&ct.splice(h,1),!i)return n}function mt(){return void 0===ht&&(ht=/^mac/i.test(window.navigator.platform)),ht}let ft=1e4;const pt=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);var gt;lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(gt||(gt={}));const bt={ArrowLeft:gt.ArrowHorizontal,ArrowDown:gt.ArrowVertical,ArrowUp:gt.ArrowVertical,ArrowRight:gt.ArrowHorizontal,h:gt.HL,j:gt.JK,k:gt.JK,l:gt.HL,a:gt.AD,s:gt.WS,w:gt.WS,d:gt.AD,Tab:gt.Tab,Home:gt.HomeAndEnd,End:gt.HomeAndEnd,PageUp:gt.PageUpDown,PageDown:gt.PageUpDown,Backspace:gt.Backspace},vt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function wt(t){const e=vt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const i=mt();if(i&&t.metaKey||!i&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}function yt(t,e){const i=t.key,n=[...i].length,s=function(t){var e,i;if(!(t instanceof HTMLElement))return!1;const n=t.nodeName.toLowerCase(),s=null!==(i=null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())&&void 0!==i?i:"text",o="true"===t.ariaReadOnly||"true"===t.getAttribute("aria-readonly")||null!==t.getAttribute("readonly");return("select"===n||"textarea"===n||"input"===n&&!pt.has(s)||t.isContentEditable)&&!o}(e),o=e instanceof HTMLSelectElement;if(s&&(1===n||"Home"===i||"End"===i))return!0;if(o)return!("ArrowDown"!==i||!mt()||t.metaKey)||!("ArrowDown"!==i||mt()||!t.altKey);if(s&&!o){const t=e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement,n=t&&0===e.selectionStart&&0===e.selectionEnd,s=t&&e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===i&&!n)return!0;if("ArrowRight"===i&&!s)return!0;const o=e instanceof HTMLElement&&e.isContentEditable;if(e instanceof HTMLTextAreaElement||o){if("PageUp"===i||"PageDown"===i)return!0;if("ArrowUp"===i&&!n)return!0;if("ArrowDown"===i&&!s)return!0}}return!1}const Et="data-is-active-descendant",At="activated-directly",kt="activated-indirectly",Lt="data-has-active-descendant";function Tt(t,e){var i,n,s,o,r,a;const l=[],c=new WeakMap,d=null!==(i=null==e?void 0:e.bindKeys)&&void 0!==i?i:((null==e?void 0:e.getNextFocusable)?gt.ArrowAll:gt.ArrowVertical)|gt.HomeAndEnd,h=null!==(n=null==e?void 0:e.focusOutBehavior)&&void 0!==n?n:"stop",u=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",m=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged,p=null!==(o=null==e?void 0:e.ignoreHoverEvents)&&void 0!==o&&o;let g;const b=null!==(r=null==e?void 0:e.preventScroll)&&void 0!==r&&r,v="initial"===u&&(null==e?void 0:e.activeDescendantControl);function w(){return l[0]}function y(t,e=!1){const i=g;g=t,m?t&&document.activeElement===m?E(i,t,e):A():(i&&i!==t&&c.has(i)&&i.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function E(e,i,n=!1){i.id||i.setAttribute("id","__primer_id_"+ft++),e&&e!==i&&e.removeAttribute(Et),m&&(n||m.getAttribute("aria-activedescendant")!==i.id)&&(m.setAttribute("aria-activedescendant",i.id),t.setAttribute(Lt,i.id),i.setAttribute(Et,n?At:kt),null==f||f(i,e,n))}function A(e=g){"first"===u&&(g=void 0),null==m||m.removeAttribute("aria-activedescendant"),t.removeAttribute(Lt),null==e||e.removeAttribute(Et);for(const e of t.querySelectorAll(`[${Et}]`))null==e||e.removeAttribute(Et);null==f||f(void 0,e,!1)}function k(...t){const i=t.filter((t=>{var i,n;return null===(n=null===(i=null==e?void 0:e.focusableElementFilter)||void 0===i?void 0:i.call(e,t))||void 0===n||n}));if(0!==i.length){l.splice(function(t){const e=t[0];if(0===l.length)return 0;let i=0,n=l.length-1;for(;i<=n;){const t=Math.floor((i+n)/2);L(e,l[t])?n=t-1:i=t+1}return i}(i),0,...i);for(const t of i)c.has(t)||c.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");g||v||y(w())}}function L(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function T(...t){for(const e of t){const t=l.indexOf(e);t>=0&&l.splice(t,1);const i=c.get(e);if(void 0!==i&&(null===i?e.removeAttribute("tabindex"):e.setAttribute("tabindex",i),c.delete(e)),e===g){y(w())}}}const C={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};k(...it(t,C));const S="function"==typeof u?u(document.body):w();v||y(S);new MutationObserver((t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&T(...it(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&T(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&k(...it(t,C));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&k(e.target)}})).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const x=new AbortController,M=null!==(a=null==e?void 0:e.abortSignal)&&void 0!==a?a:x.signal;let I;M.addEventListener("abort",(()=>{T(...l)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(I=l.indexOf(t.target))}),{signal:M}),m?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&l.includes(t.target)&&(m.focus({preventScroll:b}),y(t.target))}),{signal:M}),p||t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=l.find((e=>e.contains(t)));e&&y(e)}),{signal:M,capture:!0}),m.addEventListener("focusin",(()=>{g?E(void 0,g):v||y(w())}),{signal:M}),m.addEventListener("focusout",(()=>{A()}),{signal:M})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==I)I>=0&&l[I]!==g&&y(l[I]),I=void 0;else if("previous"===u)y(e.target);else if("closest"===u||"first"===u){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===P?l.length-1:0,e=l[t];return void(null==e||e.focus({preventScroll:b}))}y(e.target)}else if("function"==typeof u)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=u(e.relatedTarget);if((t?l.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:b});console.warn("Element requested is not a known focusable element.")}else y(e.target);P=void 0}),{signal:M});const D=null!=m?m:t;let P;return"closest"===u&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(P=wt(t))}),{signal:M,capture:!0}),D.addEventListener("keydown",(i=>{var n;if(i.key in vt){const s=bt[i.key];if(!i.defaultPrevented&&(s&d)>0&&!yt(i,document.activeElement)){const s=wt(i);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(n=document.activeElement)&&void 0!==n?n:void 0,i)),!o){const e=function(){if(!g)return v?-1:0;const e=l.indexOf(g);return-1!==e?e:g===t?-1:0}();let n=e;"previous"===s?n-=1:"start"===s?n=0:"next"===s?n+=1:n=l.length-1,n<0&&(n="wrap"===h&&"Tab"!==i.key?l.length-1:0),n>=l.length&&(n="wrap"===h&&"Tab"!==i.key?0:l.length-1),e!==n&&(o=l[n])}m?y(o||g,!0):o&&(P=s,o.focus({preventScroll:b})),("Tab"!==i.key||o)&&i.preventDefault()}}}),{signal:M}),x}var Ct,St,xt,Mt,It,Dt,Pt,Ht;const Nt=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Ft&&t.update()}})),Ot=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Ft&&t.update()}}));let Ft=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Ct.add(this),St.set(this,null),xt.set(this,!1)}connectedCallback(){Ot.observe(this),Nt.observe(this),this.style.overflow="visible",this.update()}disconnectedCallback(){Ot.unobserve(this),Nt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}update(){b(this,xt,"f")||(v(this,xt,!0,"f"),requestAnimationFrame((()=>{v(this,xt,!1,"f"),b(this,Ct,"m",Mt).call(this)})))}};St=new WeakMap,xt=new WeakMap,Ct=new WeakSet,Mt=function(){const t=b(this,Ct,"a",It);if(!t)return;const e=t.getBoundingClientRect().top,i=b(this,Ct,"a",Ht),n=Array.from(this.items,(t=>({top:t.getBoundingClientRect().top,isDivider:t.classList.contains("ActionBar-divider")})));let s=!1;for(let t=0;t<n.length;t++){const o=n[t];o.isDivider?s=!0:(o.top>e?(b(this,Ct,"m",Pt).call(this,t,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),s&&b(this,Ct,"m",Pt).call(this,t-1,i)):(b(this,Ct,"m",Dt).call(this,t,i),t===this.items.length-1&&(this.moreMenu.hidden=!0),s&&b(this,Ct,"m",Dt).call(this,t-1,i)),s=!1)}b(this,St,"f")&&b(this,St,"f").abort(),v(this,St,Tt(this,{bindKeys:gt.ArrowHorizontal|gt.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),i=e>-1&&"visible"===this.items[e].style.visibility,n=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return i||n}}),"f")},It=function(){return this.items.find((t=>!t.classList.contains("ActionBar-divider")))??null},Dt=function(t,e){const i=this.items[t],n=e[t];i&&n&&(i.style.setProperty("visibility","visible"),n.hidden=!0)},Pt=function(t,e){const i=this.items[t],n=e[t];i&&n&&(i.style.setProperty("visibility","hidden"),n.hidden=!1)},Ht=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},g([K],Ft.prototype,"items",void 0),g([U],Ft.prototype,"itemContainer",void 0),g([U],Ft.prototype,"moreMenu",void 0),Ft=g([j("action-bar")],Ft),window.ActionBarElement=Ft;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const i=[Rt(t,"compositionstart",(t=>Zt(this,t))),Rt(t,"compositionend",(t=>Zt(this,t))),Rt(t,"click",(e=>jt(t,e))),Rt(t,"change",(e=>jt(t,e))),Rt(t,"keydown",(e=>function(t,e,i){if(!(i instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const n=qt.get(e);if(!n||n.isComposing)return;const s=i.target instanceof Element&&"SUMMARY"===i.target.tagName;switch(i.key){case"Escape":t.hasAttribute("open")&&(Yt(t),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Ut(t,!0);e&&e.focus(),i.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Ut(t,!1);e&&e.focus(),i.preventDefault()}break;case"n":if(Kt&&i.ctrlKey){const e=Ut(t,!0);e&&e.focus(),i.preventDefault()}break;case"p":if(Kt&&i.ctrlKey){const e=Ut(t,!1);e&&e.focus(),i.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&_t(e)&&e.closest("details")===t&&(i.preventDefault(),i.stopPropagation(),e.click())}}}(t,this,e))),Rt(t,"toggle",(()=>Wt(t,this)),{once:!0}),Rt(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const i=e.closest("details");i&&i!==t&&!i.contains(t)&&i.removeAttribute("open")}}(t))),this.preload?Rt(t,"mouseover",(()=>Wt(t,this)),{once:!0}):Vt,...Bt(t)];qt.set(this,{subscriptions:i,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=qt.get(this);if(t){qt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const qt=new WeakMap,Vt={unsubscribe(){}};function Rt(t,e,i,n=!1){return t.addEventListener(e,i,n),{unsubscribe:()=>{t.removeEventListener(e,i,n)}}}function Wt(t,e){const i=e.getAttribute("src");if(!i)return;const n=qt.get(e);if(!n)return;if(n.loaded)return;n.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",(()=>$t(t))),s.setAttribute("src",i))}function Bt(t){let e=!1;return[Rt(t,"mousedown",(()=>e=!0)),Rt(t,"keydown",(()=>e=!1)),Rt(t,"toggle",(()=>{t.hasAttribute("open")&&($t(t)||e||function(t){const e=document.activeElement;if(e&&_t(e)&&t.contains(e))return;const i=Ut(t,!0);i&&i.focus()}(t))}))]}function $t(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Ut(t,e){const i=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),n=document.activeElement,s=n instanceof HTMLElement?i.indexOf(n):-1,o=e?i[s+1]:i[s-1],r=e?i[0]:i[i.length-1];return o||r}const Kt=navigator.userAgent.match(/Macintosh/);function jt(t,e){const i=e.target;if(i instanceof Element&&i.closest("details")===t)if("click"===e.type){const e=i.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const n=e.querySelector("input");if("LABEL"===e.tagName&&i===n)return;"LABEL"===e.tagName&&n&&!n.checked||zt(e,t)}else if("change"===e.type){const e=i.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&zt(e,t)}}function zt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const i=t.closest("details-menu");if(!i)return;i.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const i=e.querySelector("[data-menu-button]");if(!i)return;const n=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(n)i.textContent=n;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(i.innerHTML=e)}}(t,e),function(t,e){for(const i of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=i.querySelector('input[type="radio"], input[type="checkbox"]');let n=(i===t).toString();e instanceof HTMLInputElement&&(n=e.indeterminate?"mixed":e.checked.toString()),i.setAttribute("aria-checked",n)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&Yt(e),i.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function _t(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function Yt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function Zt(t,e){const i=qt.get(t);i&&(i.isComposing="compositionstart"===e.type)}var Gt,Xt;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const Jt=(()=>{const t=new Set;let e=null,i=null;function n(){for(const e of t)e.update()}return s=>{window.addEventListener("resize",n),window.addEventListener("scroll",n),e||(e=new IntersectionObserver((e=>{for(const i of e){const e=i.target;i.isIntersecting?(e.update(),t.add(e)):t.delete(e)}}))),i||(i=new ResizeObserver((()=>{for(const e of t)e.update()}))),i.observe(s.ownerDocument.documentElement),e.observe(s)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),Gt.set(this,null),Xt.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,Gt,"f"))return b(this,Gt,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,Gt,t,"f"),b(this,Gt,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",(()=>this.update())),Jt(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,Xt,"f")),v(this,Xt,requestAnimationFrame((()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:i}=X(this,t,this);this.style.top=`${i}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"})),"f"))}}var Qt,te,ee;function ie(t){t.body.style.getPropertyValue("--dialog-scrollgutter")||t.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-t.body.clientWidth+"px")}function ne(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){const e=document.getElementById(n);if(e instanceof HTMLDialogElement){ie(e.ownerDocument),e.showModal(),t.preventDefault();let n=i,s=!1;for(;n;)n=n.parentElement?.closest("[popover]"),n&&"auto"===n.popover&&(n.classList.add("dialog-inside-popover-fix"),n.popover="manual",n.showPopover(),s=!0);s&&(e.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",(()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())}),{once:!0}))}}if(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n){const t=document.getElementById(n);t instanceof HTMLDialogElement&&t.open&&t.close()}}Gt=new WeakMap,Xt=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),Qt.add(this),te.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,te,new AbortController,"f");document.addEventListener("click",ne,!0),document.addEventListener("click",this,{signal:t}),new MutationObserver((t=>{for(const e of t)e.target===this.dialog&&b(this,Qt,"m",ee).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Qt,"m",ee).call(this)}disconnectedCallback(){b(this,te,"f")?.abort()}handleEvent(t){const e=t.target,i=this.dialog;if(e!==i||!i?.open)return;if(i.querySelector("form"))return;const n=i.getBoundingClientRect();n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width||i.close()}}te=new WeakMap,Qt=new WeakSet,ee=function(){this.dialog&&this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),this.dialog.close(),ie(this.dialog.ownerDocument),this.dialog.showModal())},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var se=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:i="",...n}={}){super(t,n),this.oldState=String(e||""),this.newState=String(i||"")}},oe=new WeakMap;function re(t,e,i){oe.set(t,setTimeout((()=>{oe.has(t)&&t.dispatchEvent(new se("toggle",{cancelable:!1,oldState:e,newState:i}))}),0))}var ae=globalThis.ShadowRoot||function(){},le=globalThis.HTMLDialogElement||function(){},ce=new WeakMap,de=new WeakMap,he=new WeakMap;function ue(t){return he.get(t)||"hidden"}var me=new WeakMap;function fe(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===ue(t))&&(!(!e&&"hidden"!==ue(t))&&(!(t instanceof le&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function pe(t){return t?Array.from(de.get(t.ownerDocument)||[]).indexOf(t)+1:0}function ge(t){const e=we(t),i=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||ve(t))instanceof ae&&(t=t.host),t instanceof Document)return}}(t);return pe(e)>pe(i)?e:i}function be(t){const e=de.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function ve(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?ve(t.parentNode):t}function we(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===he.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||ve(t))instanceof ae&&(t=t.host),t instanceof Document)return}}function ye(t){return!(t.hidden||t instanceof ae)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function Ee(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let i=e.querySelector("[autofocus]");if(i)return i;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(i=e.querySelector("[autofocus]"),i)return i}}}const n=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=n.currentNode;for(;s;){if(ye(s))return s;s=n.nextNode()}})(t)?.focus()}var Ae=new WeakMap;function ke(t){if(!fe(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new se("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!fe(t,!1))return;let i=!1;if("auto"===t.popover){const i=t.getAttribute("popover");if(Ce(function(t){const e=new Map;let i=0;for(const n of de.get(t.ownerDocument)||[])e.set(n,i),i+=1;e.set(t,i),i+=1;let n=null;return function(t){const i=we(t);if(null===i)return null;const s=e.get(i);(null===n||e.get(n)<s)&&(n=i)}(t.parentElement||ve(t)),n}(t)||e,!1,!0),i!==t.getAttribute("popover")||!fe(t,!1))return}be(e)||(i=!0),Ae.delete(t);const n=e.activeElement;t.classList.add(":popover-open"),he.set(t,"showing"),ce.has(e)||ce.set(e,new Set),ce.get(e).add(t),Ee(t),"auto"===t.popover&&(de.has(e)||de.set(e,new Set),de.get(e).add(t),Ie(me.get(t),!0)),i&&n&&"auto"===t.popover&&Ae.set(t,n),re(t,"closed","open")}function Le(t,e=!1,i=!1){if(!fe(t,!0))return;const n=t.ownerDocument;if("auto"===t.popover&&(Ce(t,e,i),!fe(t,!0)))return;if(Ie(me.get(t),!1),me.delete(t),i&&(t.dispatchEvent(new se("beforetoggle",{oldState:"open",newState:"closed"})),!fe(t,!0)))return;ce.get(n)?.delete(t),de.get(n)?.delete(t),t.classList.remove(":popover-open"),he.set(t,"hidden"),i&&re(t,"open","closed");const s=Ae.get(t);s&&(Ae.delete(t),e&&s.focus())}function Te(t,e=!1,i=!1){let n=be(t);for(;n;)Le(n,e,i),n=be(t)}function Ce(t,e,i){const n=t.ownerDocument||t;if(t instanceof Document)return Te(n,e,i);let s=null,o=!1;for(const e of de.get(n)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return Te(n,e,i);for(;s&&"showing"===ue(s)&&de.get(n)?.size;)Le(s,e,i)}var Se=new WeakMap;function xe(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const i=e.ownerDocument;if(!be(i))return;const n=ge(e);if(n&&"pointerdown"===t.type)Se.set(i,n);else if("pointerup"===t.type){const t=Se.get(i)===n;Se.delete(i),t&&Ce(n||i,!1,!0)}}var Me=new WeakMap;function Ie(t,e=!1){if(!t)return;Me.has(t)||Me.set(t,t.getAttribute("aria-expanded"));const i=t.popoverTargetElement;if(i instanceof HTMLElement&&"auto"===i.popover)t.setAttribute("aria-expanded",String(e));else{const e=Me.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var De=globalThis.ShadowRoot||function(){};function Pe(t,e,i){const n=t[e];Object.defineProperty(t,e,{value(t){return n.call(this,i(t))}})}var He=/(^|[^\\]):popover-open\b/g;function Ne(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var Oe,Fe,qe,Ve,Re=null;function We(t){const e=Ne();if(null===Re)try{(Re=new CSSStyleSheet).replaceSync(e)}catch{Re=!1}if(!1===Re){const i=document.createElement("style");i.textContent=e,t instanceof Document?t.head.prepend(i):t.prepend(i)}else t.adoptedStyleSheets=[Re,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(He,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||se,Pe(Document.prototype,"querySelector",t),Pe(Document.prototype,"querySelectorAll",t),Pe(Element.prototype,"querySelector",t),Pe(Element.prototype,"querySelectorAll",t),Pe(Element.prototype,"matches",t),Pe(Element.prototype,"closest",t),Pe(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){ke(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Le(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===he.get(this)&&void 0===t||!1===t?Le(this,!0,!0):void 0!==t&&!0!==t||ke(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const i=e.call(this,t);return We(i),i}}});const i=HTMLElement.prototype.attachInternals;i&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=i.call(this);return t.shadowRoot&&We(t.shadowRoot),t}}});const n=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),n.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),n.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=n.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return n.delete(this),null;const e=ve(this),i=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof De)&&i&&e.getElementById(i)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),i=e[0];if(!(i instanceof Element)||i?.shadowRoot)return;const n=ve(i);if(!(n instanceof De||n instanceof Document))return;const s=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const i=ue(e);"show"===t.popoverTargetAction&&"showing"===i||"hide"===t.popoverTargetAction&&"hidden"===i||("showing"===i?Le(e,!0,!0):fe(e,!1)&&(me.set(e,t),ke(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,i=t.target;t.defaultPrevented||!i||"Escape"!==e&&"Esc"!==e||Ce(i.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",xe),t.addEventListener("pointerup",xe)})(document),We(document)}();const Be=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),$e=t=>t.textContent?.trim()[0].toLowerCase(),Ue=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Oe.add(this),Fe.set(this,null),qe.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,qe,new AbortController,"f");const{signal:t}=b(this,qe,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,qe,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:i}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(Be)){b(this,Fe,"f")?.abort();const{signal:e}=v(this,Fe,new AbortController,"f");for(const i of b(this,Oe,"a",Ve)){i.setAttribute("tabindex",i===t.target?"0":"-1");const n=t.target.closest("[popover]");i===t.target&&"auto"===n?.popover&&n.closest("focus-group")===this&&n.addEventListener("toggle",(t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,Fe,"f")?.abort(),i.setAttribute("tabindex","-1"),n.id)){const t=this.querySelector(`[popovertarget="${n.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Oe,"a",Ve)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const n=Array.from(b(this,Oe,"a",Ve));let s=n.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=n.length-1,t.preventDefault();else{if(!this.mnemonics||!Ue.test(o))return;{const e=o.toLowerCase(),r=s>0&&$e(t.target)===e?s:0;s=n.findIndex(((t,i)=>i>r&&$e(t)===e)),s<0&&!i&&(s=n.findIndex((t=>$e(t)===e)))}}i&&s<0&&(s=0),!i&&s>=n.length&&(s=0);const r=n.at(Math.min(s,n.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}Fe=new WeakMap,qe=new WeakMap,Oe=new WeakSet,Ve=function(){return this.querySelectorAll(Be)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let Ke=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver((t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth})),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],Ke.prototype,"hasOverflow",void 0),g([I],Ke.prototype,"labelledBy",void 0),Ke=g([j("scrollable-region")],Ke),window.ScrollableRegionElement=Ke;const je=(t,e,i)=>{if(e())i();else{const n=new MutationObserver((()=>{e()&&(i(),n.disconnect())}));n.observe(t,{childList:!0,subtree:!0})}};var ze,_e,Ye,Ze;function Ge(t){document.activeElement!==t&&t?.focus()}const Xe=[];function Je(t){const e=t.target,i=e?.closest("button");if(!i||i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled"))return;let n=i?.getAttribute("data-show-dialog-id");if(n){t.stopPropagation();const e=document.getElementById(n);if(e instanceof ModalDialogElement)return e.openButton=i,e.show(),void t.preventDefault()}if(Xe.length&&(n=i.getAttribute("data-close-dialog-id")||i.getAttribute("data-submit-dialog-id"),n)){const t=document.getElementById(n);if(t instanceof ModalDialogElement){const e=Xe.findIndex((t=>t.id===n));Xe.splice(e,1),t.close(i.hasAttribute("data-submit-dialog-id"))}}}function Qe(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Je(t)}function ti(t){const e=t.target;if(e?.closest("button"))return;const i=Xe[Xe.length-1];if(!i)return;!e.closest(`#${i.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(Xe.pop(),i.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),ze.add(this),_e.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,ze,"a",Ye)?.classList.remove("Overlay--hidden"),b(this,_e,"f").signal.aborted&&v(this,_e,new AbortController,"f"),ut(this,this.querySelector("[autofocus]"),b(this,_e,"f").signal),Xe.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,ze,"a",Ye)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,_e,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");Ge(t?nt(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Je),document.addEventListener("keydown",Qe),document.addEventListener("mousedown",ti),this.addEventListener("keydown",(t=>b(this,ze,"m",Ze).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var ei,ii,ni,si,oi,ri,ai,li;_e=new WeakMap,ze=new WeakSet,Ye=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},Ze=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let ci=class NavListElement extends HTMLElement{constructor(){super(...arguments),ei.add(this),ii.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,ii,new _(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,ii,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,ei,"m",ni).call(this,t);return!!e&&(b(this,ei,"m",ri).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,ei,"m",si).call(this,t);return!!e&&(b(this,ei,"m",ri).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,ei,"m",oi).call(this);return!!t&&(b(this,ei,"m",ri).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const i=e.closest("button");i&&(this.itemIsExpanded(i)?this.collapseItem(i):this.expandItem(i),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let i=e.closest("button");if(!i){const t=e.getAttribute("aria-labelledby");if(!t)return;i=document.getElementById(t)}this.itemIsExpanded(i)&&"Escape"===t.key&&this.collapseItem(i),t.stopPropagation()}};var di,hi,ui;ii=new WeakMap,ei=new WeakSet,ni=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},si=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},oi=function(){return b(this,ei,"m",si).call(this,window.location.pathname)},ri=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,ei,"m",ai).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const i=b(this,ei,"m",li).call(this,t);i&&(this.expandItem(i),i.classList.add("ActionListContent--hasActiveSubItem"))},ai=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,ei,"m",li).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},li=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([K],ci.prototype,"items",void 0),g([U],ci.prototype,"topLevelList",void 0),ci=g([j("nav-list")],ci);let mi=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),di.add(this),ui.set(this,new _(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const i=await fetch(t);if(!i.ok)return;e=await i.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const i=b(this,di,"m",hi).call(this,document,e);i?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const n=t.target.closest("button").getAttribute("data-list-id");document.getElementById(n).append(i),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var fi,pi;ui=new WeakMap,di=new WeakSet,hi=function(t,e){const i=t.createElement("template");return i.innerHTML=e,t.importNode(i.content,!0)},g([U],mi.prototype,"showMoreItem",void 0),g([K],mi.prototype,"focusMarkers",void 0),mi=g([j("nav-list-group")],mi),window.NavListGroupElement=mi;let gi=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),fi.add(this)}connectedCallback(){b(this,fi,"m",pi).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true"),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:e,checked:!1,value:e.querySelector(".Button-label")?.textContent}}))}get current(){return this.querySelector("[aria-current=true]")}};fi=new WeakSet,pi=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([K],gi.prototype,"items",void 0),gi=g([j("segmented-control")],gi),window.customElements.get("segmented-control")||(window.SegmentedControlElement=gi,window.customElements.define("segmented-control",gi));let bi=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const i={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(i.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:i,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const n=e.headers.get("Content-Type");window.Turbo&&this.turbo&&n?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var vi,wi,yi,Ei,Ai,ki,Li,Ti,Ci,Si,xi,Mi;g([U],bi.prototype,"switch",void 0),g([U],bi.prototype,"loadingSpinner",void 0),g([U],bi.prototype,"errorIcon",void 0),g([I],bi.prototype,"turbo",void 0),bi=g([j("toggle-switch")],bi),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=bi,window.customElements.define("toggle-switch",bi));const Ii=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),Di="sr-only",Pi=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Hi(t){for(const e of qi)e!==t&&(Ii(e)?e.hidePopover():qi.delete(e))}function Ni(){Hi()}function Oi(t){setTimeout((()=>{for(const e of qi)Ii(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const Fi=new Set,qi=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),vi.add(this),wi.set(this,void 0),yi.set(this,"center"),Ei.set(this,"outside-bottom"),Ai.set(this,!1),ki.set(this,"mouse"),Li.set(this,!1)}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: min(var(--overlay-width-small), 100vw);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,ki,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&Ii(this)?this.hidePopover():t||Ii(this)||this.showPopover()}get hiddenFromView(){return!Ii(this)}connectedCallback(){if(Fi.add(this),b(this,vi,"m",Si).call(this),b(this,vi,"m",xi).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}b(this,vi,"m",Ti).call(this,!1),v(this,Ai,!0,"f"),b(this,vi,"m",Ci).call(this)}disconnectedCallback(){Fi.delete(this),qi.delete(this),b(this,wi,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Ii(this);"beforetoggle"===t.type&&t.currentTarget!==this&&v(this,Li,"open"===t.newState,"f");const i=("mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")))&&!b(this,Li,"f"),n="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this&&"open"===t.newState,a=n||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!i||Ii(this)?e&&a&&Ii(this)&&this.hidePopover():(v(this,ki,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,vi,"m",Ti).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,vi,"m",Ci).call(this):"id"===t||"data-type"===t?b(this,vi,"m",Si).call(this):"data-direction"===t&&b(this,vi,"m",xi).call(this))}}var Vi,Ri;wi=new WeakMap,yi=new WeakMap,Ei=new WeakMap,Ai=new WeakMap,ki=new WeakMap,Li=new WeakMap,vi=new WeakSet,Ti=function(t){t?(qi.add(this),this.classList.remove(Di),Hi(this),b(this,vi,"m",Mi).call(this)):(qi.delete(this),this.classList.remove(...Pi),this.classList.add(Di))},Ci=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,wi,"f")?.abort(),v(this,wi,new AbortController,"f");const{signal:t}=b(this,wi,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Ni),this.ownerDocument.addEventListener("focusin",Oi),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},Si=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},xi=function(){this.classList.remove(...Pi);const t=this.direction;"n"===t?(v(this,yi,"center","f"),v(this,Ei,"outside-top","f")):"ne"===t?(v(this,yi,"end","f"),v(this,Ei,"outside-top","f")):"e"===t?(v(this,yi,"center","f"),v(this,Ei,"outside-right","f")):"se"===t?(v(this,yi,"end","f"),v(this,Ei,"outside-bottom","f")):"s"===t?(v(this,yi,"center","f"),v(this,Ei,"outside-bottom","f")):"sw"===t?(v(this,yi,"start","f"),v(this,Ei,"outside-bottom","f")):"w"===t?(v(this,yi,"center","f"),v(this,Ei,"outside-left","f")):"nw"===t&&(v(this,yi,"start","f"),v(this,Ei,"outside-top","f"))},Mi=function(){if(!this.control)return;if(!b(this,Ai,"f")||!Ii(this))return;const t=X(this,this.control,{side:b(this,Ei,"f"),align:b(this,yi,"f"),anchorOffset:0}),e=t.anchorSide,i=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let n="s";n="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===i?"n":"start"===i?"ne":"nw":"center"===i?"s":"start"===i?"se":"sw",this.classList.add(`tooltip-${n}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id","for"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let Wi=class XBannerElement extends HTMLElement{constructor(){super(...arguments),Vi.add(this)}dismiss(){if("remove"===b(this,Vi,"a",Ri)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};Vi=new WeakSet,Ri=function(){return this.getAttribute("data-dismiss-scheme")},g([U],Wi.prototype,"titleText",void 0),Wi=g([j("x-banner")],Wi),window.customElements.get("x-banner")||(window.XBannerElement=Wi,window.customElements.define("x-banner",Wi));class Bi{constructor(t,e,{tabInsertsSuggestions:i,defaultFirstOption:n}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==i||i,this.defaultFirstOption=null!=n&&n,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Ui(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Ui(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const i=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!i)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",$i),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",$i)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Ki)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Ki)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Ki),n=i.indexOf(e);if(n===i.length-1&&1===t||0===n&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:i.length-1;if(e&&n>=0){const e=n+t;e>=0&&e<i.length&&(s=e)}const o=i[s];if(o)for(const t of i)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),ji(this.list,o)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function $i(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function Ui(t,e){const i=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!i&&("true"===i.getAttribute("aria-disabled")||i.click(),!0)}function Ki(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function ji(t,e){(function(t,e){const i=t.scrollTop,n=i+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=i&&o<=n})(t,e)||(t.scrollTop=e.offsetTop)}const zi=window.testScreenReaderDelay||100;class _i{constructor(t,e,i,n=!1){var s;if(this.container=t,this.input=e,this.results=i,this.combobox=new Bi(e,i,{defaultFirstOption:n}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=n,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=i.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.popover?this.results.matches(":popover-open")&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let i;return function(...n){clearTimeout(i),i=window.setTimeout((()=>{clearTimeout(i),t(...n)}),e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(s=this.clearButton)||void 0===s||s.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.close()}onKeydown(t){if("Escape"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.close(),e instanceof HTMLAnchorElement)return;const i=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=i,i||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout((()=>{this.feedback&&(this.feedback.textContent=t)}),zi)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const i=new URL(e,window.location.href),n=new URLSearchParams(i.search.slice(1));n.append("q",t),i.search=n.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(i).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),i=!!e.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,n=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${n} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${n||"No"} results.`),i?this.open():this.close(),this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))})).catch((()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))}))}open(){(this.results.popover?!this.results.matches(":popover-open"):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(":popover-open"):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}}var Yi,Zi,Gi,Xi,Ji,Qi=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},tn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},en=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i};const nn=globalThis.HTMLElement||null;class sn extends Event{constructor(t,e){var{relatedTarget:i}=e;super(t,en(e,["relatedTarget"])),this.relatedTarget=i}}const on=new WeakMap;let rn=null;class AutoCompleteElement extends nn{constructor(){super(...arguments),Yi.add(this),Zi.set(this,null),Gi.set(this,null),Ji.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){rn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Qi(this,Zi,"f"))||void 0===t?void 0:t.isConnected)return Qi(this,Zi,"f");const e=this.getAttribute("for"),i=this.getRootNode();return e&&(i instanceof Document||i instanceof ShadowRoot)?i.getElementById(e):null}set forElement(t){tn(this,Zi,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Qi(this,Gi,"f"))||void 0===t?void 0:t.isConnected)?Qi(this,Gi,"f"):this.querySelector("input")}set inputElement(t){tn(this,Gi,t,"f"),Qi(this,Yi,"m",Xi).call(this)}connectedCallback(){this.isConnected&&(Qi(this,Yi,"m",Xi).call(this),new MutationObserver((()=>{on.get(this)||Qi(this,Yi,"m",Xi).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=on.get(this);t&&(t.destroy(),on.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;null===(e=Qi(this,Ji,"f"))||void 0===e||e.abort();const{signal:i}=tn(this,Ji,new AbortController,"f"),n=await fetch(t.toString(),{signal:i,headers:{Accept:"text/fragment+html"}});if(!n.ok)throw new Error(await n.text());if(rn){return(await rn).createHTML(await n.text(),n)}return await n.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,i){var n,s;if(e===i)return;const o=on.get(this);if(o)switch(this.forElement===(null===(n=on.get(this))||void 0===n?void 0:n.results)&&this.inputElement===(null===(s=on.get(this))||void 0===s?void 0:s.input)||Qi(this,Yi,"m",Xi).call(this),t){case"open":null===i?o.close():o.open();break;case"value":null!==i&&(o.input.value=i),this.dispatchEvent(new sn("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}Zi=new WeakMap,Gi=new WeakMap,Ji=new WeakMap,Yi=new WeakSet,Xi=function(){var t;null===(t=on.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:i}=this;if(!e||!i)return;const n="true"===this.getAttribute("data-autoselect");on.set(this,new _i(this,i,e,n)),e.setAttribute("role","listbox")};const an="undefined"!=typeof globalThis?globalThis:window;try{an.AutocompleteElement=an.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(an.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ln(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const i=document.createRange();return i.selectNodeContents(t),e.addRange(i),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function cn(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const i=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(i),ln(i),e.removeChild(i),Promise.resolve()}async function dn(t){const e=t.getAttribute("for"),i=t.getAttribute("value");function n(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(i)await cn(i),n();else if(e){const i="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const o=i.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?cn(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?cn(s.href):ln(s)),n())}}function hn(t){const e=t.currentTarget;e instanceof HTMLElement&&dn(e)}function un(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),dn(e))}}function mn(t){t.currentTarget.addEventListener("keydown",un)}function fn(t){t.currentTarget.removeEventListener("keydown",un)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",hn),this.addEventListener("focus",mn),this.addEventListener("blur",fn)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const pn="undefined"!=typeof globalThis?globalThis:window;try{pn.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(pn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function gn(t){t.style.display="inline-block"}function bn(t){t.style.display="none"}const vn=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=vn.get(t),i=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),n="Copied!";e?(clearTimeout(e),vn.delete(t)):(!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(bn(e),gn(i))}(t),i&&(i.textContent===n?i.textContent=`${n} `:i.textContent=n)),vn.set(t,setTimeout((()=>{!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(gn(e),bn(i))}(t),vn.delete(t)}),2e3))}));var wn,yn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i},En=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};const An="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const i of t)e.push({type:"element",value:i}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},kn=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],Ln={minimumIntegerDigits:2};class Tn{constructor(t,e={}){wn.set(this,void 0);let i=String(e.style||"short");"long"!==i&&"short"!==i&&"narrow"!==i&&"digital"!==i&&(i="short");let n="digital"===i?"numeric":i;const s=e.hours||n;n="2-digit"===s?"numeric":s;const o=e.minutes||n;n="2-digit"===o?"numeric":o;const r=e.seconds||n;n="2-digit"===r?"numeric":r;const a=e.milliseconds||n;yn(this,wn,{locale:t,style:i,years:e.years||"digital"===i?"short":i,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===i?"short":i,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===i?"short":i,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===i?"short":i,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===i?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===i?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===i?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return En(this,wn,"f")}formatToParts(t){const e=[],i=En(this,wn,"f"),n=i.style,s=i.locale;for(const[n,o]of kn){const r=t[n];if("auto"===i[`${n}Display`]&&!r)continue;const a=i[n],l="2-digit"===a?Ln:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new An(s,{type:"unit",style:"digital"===n?"short":n}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}wn=new WeakMap;const Cn=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,Sn=["year","month","week","day","hour","minute","second","millisecond"];class xn{constructor(t=0,e=0,i=0,n=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=i,this.days=n,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new xn(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const i=String(t).trim(),n=i.startsWith("-")?-1:1,s=null===(e=i.match(Cn))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*n));return s?new xn(...s):new xn}if("object"==typeof t){const{years:e,months:i,weeks:n,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new xn(e,i,n,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const i=Date.now(),n=Math.abs(Mn(i,xn.from(t)).getTime()-i),s=Math.abs(Mn(i,xn.from(e)).getTime()-i);return n>s?-1:n<s?1:0}toLocaleString(t,e){return new Tn(t,e).format(this)}}function Mn(t,e){const i=new Date(t);return e.sign<0?(i.setUTCSeconds(i.getUTCSeconds()+e.seconds),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCFullYear(i.getUTCFullYear()+e.years)):(i.setUTCFullYear(i.getUTCFullYear()+e.years),i.setUTCMonth(i.getUTCMonth()+e.months),i.setUTCDate(i.getUTCDate()+7*e.weeks+e.days),i.setUTCHours(i.getUTCHours()+e.hours),i.setUTCMinutes(i.getUTCMinutes()+e.minutes),i.setUTCSeconds(i.getUTCSeconds()+e.seconds)),i}function In(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const i=t.sign;let n=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),d=Math.abs(t.milliseconds);d>=900&&(c+=Math.round(d/1e3)),(c||l||a||r||o||s||n)&&(d=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||n)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||n)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||n)&&(a=0);const h=e.getFullYear(),u=e.getMonth(),m=e.getDate();if(r>=27||n+s+r){const t=new Date(e);t.setDate(1),t.setMonth(u+s*i+1),t.setDate(0);const a=Math.max(0,m-t.getDate()),l=new Date(e);l.setFullYear(h+n*i),l.setDate(m-a),l.setMonth(u+s*i),l.setDate(m-a+r*i);const c=l.getFullYear()-e.getFullYear(),d=l.getMonth()-e.getMonth(),f=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+d);f<27?(r>=6?(o+=Math.round(r/7),r=0):r=f,s=n=0):p<=11?(s=p,n=0):(s=0,n=c*i),(s||n)&&(r=0)}return n&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||n)&&(o=0),r&&o&&!s&&!n&&(o+=Math.round(r/7),r=0),new xn(n*i,s*i,o*i,r*i,a*i,l*i,c*i,d*i)}var Dn,Pn,Hn,Nn,On,Fn,qn,Vn,Rn,Wn,Bn,$n,Un=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},Kn=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};const jn=globalThis.HTMLElement||null,zn=new xn,_n=new xn(0,0,0,0,0,1);class Yn extends Event{constructor(t,e,i,n){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=i,this.newTitle=n}}function Zn(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Gn=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Zn(t),i=Date.now()+e;i<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=i)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Zn(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends jn{constructor(){super(...arguments),Dn.add(this),Pn.set(this,!1),Hn.set(this,!1),On.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),$n.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title","aria-hidden"]}get onRelativeTimeUpdated(){return Un(this,$n,"f")}set onRelativeTimeUpdated(t){Un(this,$n,"f")&&this.removeEventListener("relative-time-updated",Un(this,$n,"f")),Kn(this,$n,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,Cn.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return Sn.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Gn.unobserve(this)}attributeChangedCallback(t,e,i){e!==i&&("title"===t&&Kn(this,Pn,null!==i&&(this.date&&Un(this,Dn,"m",Fn).call(this,this.date))!==i,"f"),Un(this,Hn,"f")||"title"===t&&Un(this,Pn,"f")||Kn(this,Hn,(async()=>{await Promise.resolve(),this.update(),Kn(this,Hn,!1,"f")})(),"f"))}update(){const t=Un(this,On,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let i=e;const n=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!n)return void(Un(this,On,"f").textContent=t);const s=Date.now();Un(this,Pn,"f")||(i=Un(this,Dn,"m",Fn).call(this,n)||"",i&&!this.noTitle&&this.setAttribute("title",i));const o=function(t,e="second",i=Date.now()){const n=t.getTime()-i;if(0===n)return new xn;const s=Math.sign(n),o=Math.abs(n),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),d=Math.floor(c/30),h=Math.floor(d/12),u=Sn.indexOf(e)||Sn.length;return new xn(u>=0?h*s:0,u>=1?(d-12*h)*s:0,0,u>=3?(c-30*d)*s:0,u>=4?(l-24*c)*s:0,u>=5?(a-60*l)*s:0,u>=6?(r-60*a)*s:0,u>=7?(o-1e3*r)*s:0)}(n,this.precision,s),r=Un(this,Dn,"m",qn).call(this,o);let a=t;a="duration"===r?Un(this,Dn,"m",Vn).call(this,o):"relative"===r?Un(this,Dn,"m",Rn).call(this,o):Un(this,Dn,"m",Wn).call(this,n),a?Un(this,Dn,"m",Bn).call(this,a):this.shadowRoot===Un(this,On,"f")&&this.textContent&&Un(this,Dn,"m",Bn).call(this,this.textContent),a===t&&i===e||this.dispatchEvent(new Yn(t,a,e,i)),"relative"===r||"duration"===r?Gn.observe(this):Gn.unobserve(this)}}Pn=new WeakMap,Hn=new WeakMap,On=new WeakMap,$n=new WeakMap,Dn=new WeakSet,Nn=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(null!=e?e:"").toString()}catch(t){return"default"}},Fn=function(t){return new Intl.DateTimeFormat(Un(this,Dn,"a",Nn),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},qn=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===xn.compare(t,this.threshold))return"relative"}return"datetime"},Vn=function(t){const e=Un(this,Dn,"a",Nn),i=this.format,n=this.formatStyle,s=this.tense;let o=zn;"micro"===i?(t=In(t),o=_n,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=_n)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:n,[r]:"always"}):t.abs().toLocaleString(e,{style:n})},Rn=function(t){const e=new Intl.RelativeTimeFormat(Un(this,Dn,"a",Nn),{numeric:"auto",style:this.formatStyle}),i=this.tense;"future"===i&&1!==t.sign&&(t=zn),"past"===i&&-1!==t.sign&&(t=zn);const[n,s]=function(t,e){const i=In(t,e);if(i.blank)return[0,"second"];for(const t of Sn){if("millisecond"===t)continue;const e=i[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===s&&n<10?e.format(0,"millisecond"===this.precision?"second":this.precision):e.format(n,s)},Wn=function(t){const e=new Intl.DateTimeFormat(Un(this,Dn,"a",Nn),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()},Bn=function(t){if(this.hasAttribute("aria-hidden")&&"true"===this.getAttribute("aria-hidden")){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.textContent=t,Un(this,On,"f").replaceChildren(e)}else Un(this,On,"f").textContent=t};const Xn="undefined"!=typeof globalThis?globalThis:window;try{Xn.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Xn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Jn(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const i=t.target;if(!(i instanceof HTMLElement))return;if(i.closest(this.tagName)!==this)return;if("tab"!==i.getAttribute("role")&&!i.closest('[role="tablist"]'))return;const n=Jn(this),s=n.indexOf(n.find((t=>t.matches('[aria-selected="true"]')))),[o,r]="vertical"===(null===(e=i.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some((e=>t.code===e))){let t=s+1;t>=n.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=s-1;t<0&&(t=n.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(n.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Jn(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const i=t.target.closest('[role="tab"]');if(!(i instanceof HTMLElement&&i.closest('[role="tablist"]')))return;const n=e.indexOf(i);this.selectTab(n)}));for(const t of Jn(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Jn(this),i=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const n=e[t],s=i[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of i)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");n.setAttribute("aria-selected","true"),n.setAttribute("tabindex","0"),n.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}const Qn="undefined"!=typeof globalThis?globalThis:window;try{Qn.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Qn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let ts=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function es(t,e=0,{start:i=!1,middle:n=!1,once:s=!1}={}){return function(t,e=0,{start:i=!0,middle:n=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const d=Date.now()-r;r=Date.now(),i?(i=!1,t.apply(this,c),s&&l.cancel()):(n&&d<e||!n)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),n?e-d:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:i,middle:n,once:s})}g([K],ts.prototype,"fields",void 0),ts=g([j("primer-multi-input")],ts),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:ts}),window.customElements.define("primer-multi-input",ts));var is,ns,ss=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)},os=function(t,e,i,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,i):s?s.value=i:e.set(t,i),i};!function(t){t.GET="GET",t.POST="POST"}(ns||(ns={}));const rs=new WeakMap;class as extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class ls extends as{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class cs extends as{constructor(){super("complete")}}class ds extends as{constructor(t){super("success"),this.response=t}}class hs extends ls{constructor(){super("start","Verifying…")}}class us extends ls{constructor(t){super("error","Validation failed"),this.response=t}}class ms extends as{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),is.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return ss(this,is,"f")}set onloadend(t){ss(this,is,"f")&&this.removeEventListener("loadend",ss(this,is,"f")),os(this,is,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=es(gs.bind(null,this),300),i={check:e,controller:null};rs.set(this,i);const n=fs.bind(null,e);t.addEventListener("blur",n),t.addEventListener("input",n),t.addEventListener("triggervalidation",n),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=rs.get(this);e&&(rs.delete(this),t.removeEventListener("input",ps),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}triggerValidation(){const t=this.input;t&&t.dispatchEvent(new CustomEvent("triggervalidation"))}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return ns[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}}function fs(t,e){const i=e.currentTarget;if(!(i instanceof HTMLInputElement))return;const n=i.closest("auto-check");n instanceof AutoCheckElement&&("input"===e.type&&n.setAttribute("dirty",""),0!==i.value.length&&("blur"===e.type&&!n.validateOnKeystroke&&n.hasAttribute("dirty")||"input"===e.type&&n.validateOnKeystroke||"triggervalidation"===e.type)&&(ps(e),t()))}function ps(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const i=e.closest("auto-check");if(!(i instanceof AutoCheckElement))return;const n=i.src,s=i.csrf,o=i.httpMethod,r=rs.get(i);if(!n||"POST"===o&&!s||!r)return;const a=new hs;e.dispatchEvent(a),i.required&&e.setCustomValidity(a.message)}async function gs(t){const e=t.input;if(!e)return;const i=t.csrfField,n=t.src,s=t.csrf,o=rs.get(t),r=t.httpMethod;if(!n||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(n,window.location.origin);"POST"===r?(a.append(i,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new ms(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const i=await async function(t,e,i){"GET"===i.method&&delete i.body;try{const n=await fetch(e,i);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),n}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(i.ok)t.required&&e.setCustomValidity(""),t.validateOnKeystroke=!1,e.dispatchEvent(new ds(i.clone()));else{t.validateOnKeystroke=!0;const n=new us(i.clone());e.dispatchEvent(n),t.required&&e.setCustomValidity(n.message)}o.controller=null,e.dispatchEvent(new cs)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new cs))}}is=new WeakMap;const bs="undefined"!=typeof globalThis?globalThis:window;try{bs.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(bs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}class vs{constructor(t,e,i){this.inputElement=t,this.characterLimitElement=e,this.characterLimitSrElement=i,this.SCREEN_READER_DELAY=500,this.announceTimeout=null,this.isInitialLoad=!0}initialize(t){this.inputElement.addEventListener("keyup",(()=>this.updateCharacterCount()),t?{signal:t}:void 0),this.inputElement.addEventListener("paste",(()=>setTimeout((()=>this.updateCharacterCount()),50)),t?{signal:t}:void 0),this.updateCharacterCount(),this.isInitialLoad=!1}cleanup(){this.announceTimeout&&clearTimeout(this.announceTimeout)}pluralize(t,e){return 1===t?e:`${e}s`}updateCharacterCount(){if(!this.characterLimitElement)return;const t=this.characterLimitElement.getAttribute("data-max-length");if(!t)return;const e=parseInt(t,10)-this.inputElement.value.length;let i="";if(e>=0){i=`${e} ${this.pluralize(e,"character")} remaining`;const t=this.characterLimitElement.querySelector(".FormControl-caption-text");t&&(t.textContent=i),this.clearError()}else{const t=-e;i=`${t} ${this.pluralize(t,"character")} over`;const n=this.characterLimitElement.querySelector(".FormControl-caption-text");n&&(n.textContent=i),this.setError()}this.isInitialLoad||this.announceToScreenReader(i)}announceToScreenReader(t){this.announceTimeout&&clearTimeout(this.announceTimeout),this.announceTimeout=window.setTimeout((()=>{this.characterLimitSrElement&&(this.characterLimitSrElement.textContent=t)}),this.SCREEN_READER_DELAY)}setError(){this.inputElement.setAttribute("invalid","true"),this.inputElement.setAttribute("aria-invalid","true"),this.characterLimitElement.classList.add("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.removeAttribute("hidden")}clearError(){this.inputElement.removeAttribute("invalid"),this.inputElement.removeAttribute("aria-invalid"),this.characterLimitElement.classList.remove("fgColor-danger");const t=this.characterLimitElement.querySelector(".FormControl-caption-icon");t&&t.setAttribute("hidden","")}}var ws,ys;let Es=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),ws.set(this,void 0),ys.set(this,null)}connectedCallback(){b(this,ws,"f")?.abort();const{signal:t}=v(this,ws,new AbortController,"f");this.addEventListener("auto-check-success",(async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()}),{signal:t}),this.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:t}),this.characterLimitElement&&(v(this,ys,new vs(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,ys,"f").initialize(t))}disconnectedCallback(){b(this,ws,"f")?.abort(),b(this,ys,"f")?.cleanup()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const i=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(i)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};var As;ws=new WeakMap,ys=new WeakMap,g([U],Es.prototype,"inputElement",void 0),g([U],Es.prototype,"validationElement",void 0),g([U],Es.prototype,"validationMessageElement",void 0),g([U],Es.prototype,"validationSuccessIcon",void 0),g([U],Es.prototype,"validationErrorIcon",void 0),g([U],Es.prototype,"leadingVisual",void 0),g([U],Es.prototype,"leadingSpinner",void 0),g([U],Es.prototype,"characterLimitElement",void 0),g([U],Es.prototype,"characterLimitSrElement",void 0),Es=g([j("primer-text-field")],Es);let ks=class PrimerTextAreaElement extends HTMLElement{constructor(){super(...arguments),As.set(this,null)}connectedCallback(){this.characterLimitElement&&(v(this,As,new vs(this.inputElement,this.characterLimitElement,this.characterLimitSrElement),"f"),b(this,As,"f").initialize())}disconnectedCallback(){b(this,As,"f")?.cleanup()}};As=new WeakMap,g([U],ks.prototype,"inputElement",void 0),g([U],ks.prototype,"characterLimitElement",void 0),g([U],ks.prototype,"characterLimitSrElement",void 0),ks=g([j("primer-text-area")],ks),window.customElements.get("primer-text-area")||(Object.assign(window,{PrimerTextAreaElement:ks}),window.customElements.define("primer-text-area",ks));let Ls=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var Ts,Cs,Ss,xs,Ms,Is,Ds,Ps,Hs,Ns,Os,Fs,qs,Vs,Rs,Ws,Bs,$s,Us,Ks,js,zs,_s,Ys,Zs,Gs,Xs,Js,Qs,to,eo,io,no;g([U],Ls.prototype,"validationElement",void 0),g([U],Ls.prototype,"validationMessageElement",void 0),Ls=g([j("toggle-switch-input")],Ls);class so{constructor(){Ts.add(this),Cs.set(this,void 0),v(this,Cs,[],"f")}get current(){return b(this,Cs,"f")[b(this,Cs,"f").length-1]}push(t,e={trapFocus:!0}){const{trapFocus:i}=e;b(this,Cs,"f").push({element:t,abortController:b(this,Ts,"m",Ss).call(this,t,i)})}pop(t){if(t)for(;b(this,Cs,"f").length>0&&this.current?.element!==t;){const t=b(this,Cs,"f").pop();t?.abortController?.abort()}const e=b(this,Cs,"f").pop();e?.abortController?.abort()}elementIsMenuItem(t){return b(this,Ts,"a",xs).includes(t.getAttribute("role")||"")}get isEmpty(){return 0===b(this,Cs,"f").length}}Cs=new WeakMap,Ts=new WeakSet,Ss=function(t,e){const i=Tt(t,{bindKeys:gt.ArrowVertical|gt.ArrowHorizontal|gt.HomeAndEnd|gt.Backspace,focusOutBehavior:"wrap",focusableElementFilter:e=>this.elementIsMenuItem(e)&&e.closest("anchored-position")===t});if(e){const{signal:e}=i;return ut(t,void 0,e)}return i},xs=function(){return oo.validItemRoles};let oo=no=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),Ms.add(this),Is.set(this,void 0),Ds.set(this,""),Ps.set(this,""),Hs.set(this,!1),Ns.set(this,void 0),Os.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get childPopoverElements(){return Array.from(this.overlay.querySelectorAll("anchored-position"))}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const i of t){const t=i.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:i?.getAttribute("data-value"),element:i})}return e}connectedCallback(){const{signal:t}=v(this,Is,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("toggle",this,{signal:t,capture:!0}),b(this,Ms,"m",Js).call(this),b(this,Ms,"m",Qs).call(this),b(this,Ms,"m",qs).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,Ms,"m",Xs).call(this)&&this.overlay?.update()};v(this,Ns,new IntersectionObserver((t=>{for(const i of t){i.target===this.invokerElement&&(i.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}})),"f"),je(this,(()=>Boolean(this.invokerElement)),(()=>b(this,Ns,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true");new MutationObserver((()=>b(this,Ms,"m",Fs).call(this))).observe(this,{childList:!0,subtree:!0}),b(this,Ms,"m",Fs).call(this),v(this,Os,new so,"f")}disconnectedCallback(){b(this,Is,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),i=b(this,Ms,"m",Bs).call(this,t);if("toggle"===t.type&&t instanceof ToggleEvent)return void b(this,Ms,"m",Us).call(this,t);if(e&&"mousedown"===t.type)return void v(this,Hs,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return b(this,Ms,"m",Ks).call(this,t),void v(this,Hs,!1,"f");if("focusout"===t.type){if(b(this,Hs,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,Ms,"m",Ys).call(this)}))}const n=t.target.closest(no.menuItemSelectors.join(",")),s=null!==n;if(s&&i){if(b(this,Ms,"m",Vs).call(this,t))return;const e=n.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e))return void b(this,Ms,"m",js).call(this,t,i)}b(this,Ms,"m",Rs).call(this,t)&&(t.preventDefault(),n.click());const i=b(this,Ms,"m",eo).call(this,n);return i?(t.preventDefault(),void i.showPopover()):void b(this,Ms,"m",zs).call(this,n)}"include-fragment-replaced"!==t.type?s&&t instanceof KeyboardEvent&&b(this,Ms,"m",$s).call(this,t,n):b(this,Ms,"m",_s).call(this)}get items(){return Array.from(this.querySelectorAll(no.menuItemSelectors.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,Ms,"m",zs).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,Ms,"m",zs).call(this,e)}}};Is=new WeakMap,Ds=new WeakMap,Ps=new WeakMap,Hs=new WeakMap,Ns=new WeakMap,Os=new WeakMap,Ms=new WeakSet,Fs=function(){let t=1;for(const e of this.querySelectorAll("[role=menu]"))e.setAttribute("data-level",t.toString()),t++},qs=function(){const{signal:t}=b(this,Is,"f");for(const e of this.querySelectorAll(no.validSelectors.join(",")))e.addEventListener("click",b(this,Ms,"m",Vs).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Ms,"m",Vs).bind(this),{signal:t})},Vs=function(t){if(!b(this,Ms,"m",Bs).call(this,t))return!1;const e=t.target.closest(no.menuItemSelectors.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Rs=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Ws=function(t){return t.target instanceof ClipboardCopyElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(" "===t.key||"Enter"===t.key)},Bs=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Ms,"m",Rs).call(this,t)||b(this,Ms,"m",Ws).call(this,t)},$s=function(t,e){switch(t.key){case"ArrowRight":{const t=b(this,Ms,"m",eo).call(this,e);t?.showPopover();break}case"ArrowLeft":if(e.closest("role[menu]")!==this.list){const t=e.closest("anchored-position");t?.hidePopover()}}},Us=function(t){const e=t.target;if("open"===t.newState){const t=e===this.overlay;b(this,Os,"f").push(e,{trapFocus:!t}),window.requestAnimationFrame((()=>{const t=e.querySelector(no.menuItemSelectors.join(","));t?.focus()}))}else{b(this,Os,"f").pop(e);const t=b(this,Ms,"m",io).call(this,e),i=document.querySelector(":popover-open");t&&!i&&t.focus()}},Ks=function(t){t.preventDefault(),t.stopPropagation(),b(this,Ms,"m",Xs).call(this)?b(this,Ms,"m",Gs).call(this):b(this,Ms,"m",Zs).call(this)},js=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,Ms,"m",Xs).call(this)&&b(this,Ms,"m",Gs).call(this));const t=this.ownerDocument.activeElement,n=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(n||s||o)&&setTimeout((()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()}),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},zs=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,Ms,"m",Xs).call(this)&&b(this,Ms,"m",Gs).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,Ms,"m",Js).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,Ms,"m",Qs).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},_s=function(){b(this,Ms,"a",to)?.focus(),b(this,Ms,"m",qs).call(this),this.setAttribute("data-ready","true")},Ys=function(){b(this,Ms,"m",Gs).call(this)},Zs=function(){this.popoverElement?.showPopover()},Gs=function(){this.popoverElement?.hidePopover();for(const t of this.childPopoverElements)t.hidePopover()},Xs=function(){return this.popoverElement?.matches(":popover-open")},Js=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Ds,b(this,Ds,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=this.dynamicLabelPrefix,n.textContent=e.textContent||"",t.replaceChildren(i,n)}else t.textContent=b(this,Ds,"f")},Qs=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,Ps,b(this,Ps,"f")||e[0].name,"f");for(const e of this.selectedItems){const i=document.createElement("input");i.setAttribute("data-list-input","true"),i.type="hidden",i.autocomplete="off",i.name=b(this,Ps,"f"),i.value=(e.value||e.label||"").trim(),t.append(i)}for(const t of e)t.remove()}},to=function(){return this.querySelector(no.menuItemSelectors.join(","))},eo=function(t){const e=t.getAttribute("popovertarget");return e?this.querySelector(`[id="${e}"]`):null},io=function(t){const e=t.getAttribute("anchor");return e?this.querySelector(`[id="${e}"]`):null},oo.validItemRoles=["menuitem","menuitemcheckbox","menuitemradio"],oo.validSelectors=no.validItemRoles.map((t=>`[role="${t}"]`)),oo.menuItemSelectors=no.validSelectors.map((t=>`:not([hidden]) > ${t}`)),g([U],oo.prototype,"includeFragment",void 0),g([U],oo.prototype,"overlay",void 0),g([U],oo.prototype,"list",void 0),oo=no=g([j("action-menu")],oo),window.customElements.get("action-menu")||(window.ActionMenuElement=oo,window.customElements.define("action-menu",oo));const ro="less",ao="equal",lo="greater";var co,ho,uo,mo,fo,po=t=>{throw TypeError(t)},go=(t,e,i)=>e.has(t)||po("Cannot "+i),bo=(t,e,i)=>(go(t,e,"read from private field"),i?i.call(t):e.get(t)),vo=(t,e,i)=>e.has(t)?po("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),wo=(t,e,i,n)=>(go(t,e,"write to private field"),e.set(t,i),i),yo=(t,e,i)=>(go(t,e,"access private method"),i);class Eo{constructor({compareFn:t}){vo(this,uo),vo(this,co),vo(this,ho),wo(this,co,t),wo(this,ho,[])}insert(t){bo(this,ho).push(t),yo(this,uo,fo).call(this)}pop(){const t=bo(this,ho)[0];return bo(this,ho)[bo(this,ho).length-1]&&(bo(this,ho)[0]=bo(this,ho)[bo(this,ho).length-1],bo(this,ho).pop()),yo(this,uo,mo).call(this),t}peek(){return bo(this,ho)[0]}delete(t){const e=bo(this,ho).indexOf(t);-1!==e&&(Do(bo(this,ho),e,bo(this,ho).length-1),bo(this,ho).pop(),yo(this,uo,mo).call(this))}clear(){wo(this,ho,[])}get size(){return bo(this,ho).length}}function Ao(t){return 2*t+1}function ko(t){return 2*t+2}function Lo(t){return Math.floor((t-1)/2)}function To(t,e){return Ao(t)<e}function Co(t,e){return ko(t)<e}function So(t){return t>0}function xo(t,e){return t[Ao(e)]}function Mo(t,e){return t[ko(e)]}function Io(t,e){return t[Lo(e)]}function Do(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}co=new WeakMap,ho=new WeakMap,uo=new WeakSet,mo=function(){let t=0;for(;To(t,bo(this,ho).length);){let e=Ao(t);if(Co(t,bo(this,ho).length)&&bo(this,co).call(this,Mo(bo(this,ho),t),xo(bo(this,ho),t))===ro&&(e=ko(t)),bo(this,co).call(this,bo(this,ho)[t],bo(this,ho)[e])===ro)break;Do(bo(this,ho),t,e),t=e}},fo=function(){let t=bo(this,ho).length-1;for(;So(t)&&bo(this,co).call(this,bo(this,ho)[t],Io(bo(this,ho),t))===ro;)Do(bo(this,ho),t,Lo(t)),t=Lo(t)};var Po,Ho,No,Oo,Fo=Object.defineProperty,qo=t=>{throw TypeError(t)},Vo=(t,e,i)=>((t,e,i)=>e in t?Fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),Ro=(t,e,i)=>e.has(t)||qo("Cannot "+i),Wo=(t,e,i)=>(Ro(t,e,"read from private field"),i?i.call(t):e.get(t)),Bo=(t,e,i)=>e.has(t)?qo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),$o=(t,e,i,n)=>(Ro(t,e,"write to private field"),e.set(t,i),i);Po=Symbol.toStringTag;class Uo{constructor(){Vo(this,Po,"Deferred"),Bo(this,Ho),Bo(this,No),Bo(this,Oo),$o(this,Ho,new Promise(((t,e)=>{$o(this,No,t),$o(this,Oo,e)})))}then(t,e){return Promise.prototype.then.apply(Wo(this,Ho),[t,e])}catch(t){return Promise.prototype.catch.apply(Wo(this,Ho),[t])}finally(t){return Promise.prototype.finally.apply(Wo(this,Ho),[t])}resolve(t){Wo(this,No).call(this,t)}reject(t){Wo(this,Oo).call(this,t)}getPromise(){return Wo(this,Ho)}}Ho=new WeakMap,No=new WeakMap,Oo=new WeakMap;var Ko,jo,zo,_o,Yo,Zo,Go=t=>{throw TypeError(t)},Xo=(t,e,i)=>e.has(t)||Go("Cannot "+i),Jo=(t,e,i)=>(Xo(t,e,"read from private field"),i?i.call(t):e.get(t)),Qo=(t,e,i)=>e.has(t)?Go("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),tr=(t,e,i,n)=>(Xo(t,e,"write to private field"),e.set(t,i),i),er=(t,e,i)=>(Xo(t,e,"access private method"),i);class LiveRegionElement extends HTMLElement{constructor(){if(super(),Qo(this,_o),Qo(this,Ko),Qo(this,jo),Qo(this,zo),!this.shadowRoot){const t=function(){if(ir)return ir;return ir=document.createElement("template"),ir.innerHTML=nr,ir}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}tr(this,Ko,!1),tr(this,zo,null),tr(this,jo,new Eo({compareFn:sr}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:i,politeness:n="polite"}=e,s=Date.now(),o=new Uo,r={deferred:o,politeness:n,contents:t,scheduled:void 0!==i?s+i:s};return Jo(this,jo).insert(r),er(this,_o,Yo).call(this),{...o.getPromise(),cancel:()=>{Jo(this,jo).delete(r),o.resolve()}}}announceFromElement(t,e){const i=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==i)return this.announce(i,e);return{...Promise.resolve(),cancel:or}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==Jo(this,zo)&&(clearTimeout(Jo(this,zo)),tr(this,zo,null)),tr(this,Ko,!1),Jo(this,jo).clear()}}Ko=new WeakMap,jo=new WeakMap,zo=new WeakMap,_o=new WeakSet,Yo=function(){if(Jo(this,Ko))return;let t=Jo(this,jo).peek();if(!t)return;null!==Jo(this,zo)&&(clearTimeout(Jo(this,zo)),tr(this,zo,null));const e=Date.now();if(t.scheduled<=e)return t=Jo(this,jo).pop(),t&&er(this,_o,Zo).call(this,t),void er(this,_o,Yo).call(this);const i=t.scheduled-e;tr(this,zo,window.setTimeout((()=>{tr(this,zo,null),er(this,_o,Yo).call(this)}),i))},Zo=function(t){tr(this,Ko,!0);const{contents:e,deferred:i,politeness:n}=t,s=this.shadowRoot?.getElementById(n);if(!s)throw tr(this,Ko,!1),new Error(`Unable to find container for message. Expected a container with id="${n}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==Jo(this,zo)&&clearTimeout(Jo(this,zo)),i.resolve(),this.delay>0?tr(this,zo,window.setTimeout((()=>{tr(this,zo,null),tr(this,Ko,!1),er(this,_o,Yo).call(this)}),this.delay)):(tr(this,zo,null),tr(this,Ko,!1),er(this,_o,Yo).call(this))};let ir=null;const nr='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function sr(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?ao:t.scheduled<e.scheduled?ro:lo:"assertive"===t.politeness&&"assertive"!==e.politeness?ro:"assertive"!==t.politeness&&"assertive"===e.politeness?lo:ao}function or(){}var rr,ar,lr,cr,dr,hr,ur,mr,fr,pr,gr,br,vr,wr,yr,Er,Ar,kr,Lr,Tr,Cr,Sr,xr,Mr,Ir,Dr,Pr,Hr,Nr,Or,Fr,qr,Vr,Rr,Wr,Br,$r,Ur,Kr,jr;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const zr=['[role="option"]'],_r=zr.join(","),Yr=zr.map((t=>`:not([hidden]) > ${t}`)).join(",");var Zr,Gr;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Zr||(Zr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Gr||(Gr={}));const Xr=(()=>{const t=new Set;let e=null;function i(){for(const e of t)e.updateAnchorPosition()}return n=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new ResizeObserver((()=>{for(const e of t)e.updateAnchorPosition()}))),e.observe(n.ownerDocument.documentElement),n.addEventListener("dialog:close",(()=>{n.invokerElement?.setAttribute("aria-expanded","false"),t.delete(n)})),n.addEventListener("dialog:open",(()=>{t.add(n)}))}})();let Jr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),rr.add(this),ar.set(this,void 0),lr.set(this,void 0),cr.set(this,""),dr.set(this,""),hr.set(this,new Map),ur.set(this,null),mr.set(this,null),fr.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,hr,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=X(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,lr,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,rr,"m",Wr).call(this),b(this,rr,"m",Br).call(this),b(this,rr,"m",pr).call(this),Xr(this),je(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),je(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})})),v(this,ar,new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,rr,"a",Nr)===Zr.LOCAL&&b(this,rr,"m",Mr).call(this))}})),"f"),je(this,(()=>Boolean(this.dialog)),(()=>{b(this,ar,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,rr,"a",Nr)===Zr.LOCAL&&je(this,(()=>this.items.length>0),(()=>{b(this,rr,"m",Mr).call(this),b(this,rr,"m",Br).call(this)}))}disconnectedCallback(){b(this,lr,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,rr,"m",xr).call(this,t);if(t.target===this.remoteInput)return void b(this,rr,"m",Cr).call(this,t);const e=this.invokerElement?.contains(t.target),i=this.closeButton?.contains(t.target),n=b(this,rr,"m",wr).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return void b(this,rr,"m",qr).call(this,t);if(i&&n)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Yr)){const e=t.ctrlKey||t.altKey||t.metaKey,i=1===t.key.length&&/[a-z\d]/i.test(t.key);!e&&i&&t.stopPropagation()}if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Yr)?.parentElement;if(null!=s&&n){if(b(this,rr,"m",br).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const i=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(i&&this.contains(e)&&this.contains(i))return void b(this,rr,"m",Vr).call(this,t,i)}return b(this,rr,"m",vr).call(this,t)&&(t.preventDefault(),b(this,rr,"m",jr).call(this,s)?.click()),void b(this,rr,"m",Rr).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,rr,"m",Lr).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Yr)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(_r)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,rr,"m",jr).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,rr,"m",jr).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,rr,"m",jr).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,rr,"m",jr).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,rr,"m",Rr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,rr,"m",Rr).call(this,t)}};ar=new WeakMap,lr=new WeakMap,cr=new WeakMap,dr=new WeakMap,hr=new WeakMap,ur=new WeakMap,mr=new WeakMap,fr=new WeakMap,rr=new WeakSet,pr=function(){const{signal:t}=b(this,lr,"f");for(const e of this.querySelectorAll(zr.join(",")))e.addEventListener("click",b(this,rr,"m",br).bind(this),{signal:t}),e.addEventListener("keydown",b(this,rr,"m",br).bind(this),{signal:t})},gr=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const i=b(this,rr,"m",jr).call(this,e);i&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?i.setAttribute("tabindex","-1"):(i.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,rr,"m",jr).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,rr,"a",$r)&&b(this,rr,"m",jr).call(this,b(this,rr,"a",$r))?.setAttribute("tabindex","0")},br=function(t){if(!b(this,rr,"m",wr).call(this,t))return!1;const e=t.target.closest(Yr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},vr=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},wr=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,rr,"m",vr).call(this,t)},yr=function(){for(const t of this.items){const e=b(this,rr,"m",jr).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");i&&b(this,hr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,rr,"m",Br).call(this)},Er=function(t){const e=b(this,rr,"m",jr).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,hr,"f").set(i,{value:i,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},Ar=function(t){const e=b(this,rr,"m",jr).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,hr,"f").delete(i)},kr=function(){b(this,rr,"a",Or)&&(b(this,ur,"f")&&clearTimeout(b(this,ur,"f")),b(this,mr,"f")&&clearTimeout(b(this,mr,"f")),v(this,mr,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,ur,setTimeout((()=>{b(this,rr,"a",Or)?.showLeadingSpinner()}),1e3),"f"))},Lr=function(t){switch(t.type){case"include-fragment-replaced":b(this,rr,"m",Mr).call(this);break;case"loadstart":b(this,rr,"m",Tr).call(this,!1);break;case"loadend":b(this,rr,"a",Or)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,rr,"m",Tr).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},Tr=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},Cr=function(t){switch(t.type){case"remote-input-success":b(this,rr,"m",Pr).call(this),b(this,rr,"m",Mr).call(this),b(this,rr,"m",yr).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,rr,"m",Dr).call(this,Gr.BODY):b(this,rr,"m",Dr).call(this,Gr.BANNER);break;case"loadstart":if(!b(this,rr,"m",Fr).call(this)){if(b(this,rr,"m",Pr).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,rr,"m",kr).call(this)}break;case"loadend":b(this,rr,"a",Or)?.hideLeadingSpinner(),b(this,mr,"f")&&clearTimeout(b(this,mr,"f")),b(this,ur,"f")&&clearTimeout(b(this,ur,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},Sr=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},xr=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,rr,"m",jr).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,rr,"m",jr).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const i=b(this,rr,"m",jr).call(this,e);i&&i.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],i=b(this,rr,"m",jr).call(this,e);i&&i.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,rr,"m",Fr).call(this)||b(this,rr,"m",kr).call(this),b(this,rr,"a",Nr)===Zr.LOCAL||b(this,rr,"a",Nr)===Zr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,rr,"m",Mr).call(this)}},Mr=function(){if(!this.list)return;let t=!1;if(b(this,rr,"m",Fr).call(this)){const e=this.filterInputTextField?.value??"",i=this.filterFn||b(this,rr,"m",Sr);for(const n of this.items)i(n,e)?(b(this,rr,"m",Kr).call(this,n),t=!0):b(this,rr,"m",Ur).call(this,n)}else t=this.items.length>0;b(this,rr,"m",gr).call(this),b(this,rr,"m",Hr).call(this);for(const t of this.items){const e=b(this,rr,"m",jr).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");b(this,fr,"f")?i&&!b(this,hr,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"false"):i&&!b(this,hr,"f").has(i)&&this.isItemChecked(t)&&b(this,rr,"m",Er).call(this,t)}v(this,fr,!0,"f"),this.noResults&&(b(this,rr,"m",Ir).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},Ir=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},Dr=function(t){let e=this.fragmentErrorElement;t===Gr.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},Pr=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},Hr=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},Nr=function(){if(!this.list)return Zr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Zr.LOCAL;case"eventually_local":return Zr.EVENTUALLY_LOCAL;default:return Zr.REMOTE}},Or=function(){return this.filterInputTextField?.closest("primer-text-field")},Fr=function(){return b(this,rr,"a",Nr)===Zr.LOCAL||b(this,rr,"a",Nr)===Zr.EVENTUALLY_LOCAL},qr=function(t){this.invokerElement?.dispatchEvent(new CustomEvent("invokerClicked",{bubbles:!0})),t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},Vr=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const i=new AbortController,{signal:n}=i,s=()=>{i.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,n=this.contains(t);(e||n)&&setTimeout((()=>this.invokerElement?.focus()),0)};e.addEventListener("close",s,{signal:n}),e.addEventListener("cancel",s,{signal:n})},Rr=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{this.open&&this.hide()})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),i=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:i,value:b(this,rr,"m",jr).call(this,t)?.getAttribute("data-value")}})))return;const n=b(this,rr,"m",jr).call(this,t);if("single"===this.selectVariant){if(n?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,rr,"m",jr).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,hr,"f").clear(),i&&(b(this,rr,"m",Er).call(this,t),n?.setAttribute(this.ariaSelectionType,"true")),b(this,rr,"m",Wr).call(this)}}else n?.setAttribute(this.ariaSelectionType,`${i}`),i?b(this,rr,"m",Er).call(this,t):b(this,rr,"m",Ar).call(this,t);b(this,rr,"m",Br).call(this),b(this,rr,"m",gr).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:i,value:b(this,rr,"m",jr).call(this,t)?.getAttribute("data-value")}}))},Wr=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,cr,b(this,cr,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,cr,"f");if(e){const i=document.createElement("span");i.classList.add("color-fg-muted");const n=document.createElement("span");i.textContent=`${this.dynamicLabelPrefix} `,n.textContent=e,t.replaceChildren(i,n),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,cr,"f")},Br=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-select-panel-inputs=true] input")??this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):b(this,fr,"f")&&t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=!!this.querySelector("[data-select-panel-inputs=true]"),e=this.querySelector("[data-select-panel-inputs=true]")??this.querySelector("[data-list-inputs=true]");if(!e)return;const i=e.querySelectorAll("input");i.length>0&&v(this,dr,b(this,dr,"f")||i[0].name,"f");for(const i of this.selectedItems){const n=document.createElement("input");n.setAttribute(""+(t?"data-select-panel-input":"data-list-input"),"true"),n.type="hidden",n.autocomplete="off",n.name=i.inputName||b(this,dr,"f"),n.value=(i.value||i.label||"").trim(),e.append(n)}for(const t of i)t.remove()}},$r=function(){return this.querySelector(Yr)?.parentElement||null},Ur=function(t){t&&t.setAttribute("hidden","hidden")},Kr=function(t){t&&t.removeAttribute("hidden")},jr=function(t){return t.querySelector(".ActionListContent")},g([U],Jr.prototype,"includeFragment",void 0),g([U],Jr.prototype,"dialog",void 0),g([U],Jr.prototype,"filterInputTextField",void 0),g([U],Jr.prototype,"remoteInput",void 0),g([U],Jr.prototype,"list",void 0),g([U],Jr.prototype,"noResults",void 0),g([U],Jr.prototype,"fragmentErrorElement",void 0),g([U],Jr.prototype,"bannerErrorElement",void 0),g([U],Jr.prototype,"bodySpinner",void 0),g([U],Jr.prototype,"liveRegion",void 0),Jr=g([j("select-panel")],Jr),window.customElements.get("select-panel")||(window.SelectPanelElement=Jr,window.customElements.define("select-panel",Jr));let Qr=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};function ta(t){Tt(t,{bindKeys:gt.ArrowVertical|gt.ArrowHorizontal|gt.HomeAndEnd|gt.Backspace,getNextFocusable:(t,e,i)=>{if(e instanceof HTMLElement){try{if(e.closest("dialog:modal"))return}catch{}return function(t,e){switch(`${function(t){if("treeitem"!==t.getAttribute("role"))throw new Error("Element is not a treeitem");switch(t.getAttribute("aria-expanded")){case"true":return"open";case"false":return"closed";default:return"end"}}(t)} ${e.key}`){case"open ArrowRight":return function(t){const e=t.querySelector("[role=treeitem]");return e instanceof HTMLElement?e:void 0}(t);case"open ArrowLeft":case"closed ArrowRight":case"end ArrowRight":return;case"closed ArrowLeft":case"end ArrowLeft":return na(t)}switch(e.key){case"ArrowUp":return ea(t,"previous");case"ArrowDown":return ea(t,"next");case"Backspace":return na(t)}}(e,i)??e}},focusInStrategy:()=>{let e=t.querySelector("[aria-current]");e=e?.checkVisibility()?e:null;const i=t.querySelector('[role="treeitem"]');return e instanceof HTMLElement?e:document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&"treeitem"===document.activeElement.getAttribute("role")?document.activeElement:i instanceof HTMLElement?i:void 0}})}function ea(t,e){const i=t.closest("[role=tree]");if(!i)return;const n=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,(t=>t instanceof HTMLElement&&"treeitem"===t.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP));let s=n.firstChild();for(;s!==t;)s=n.nextNode();let o="next"===e?n.nextNode():n.previousNode();for(;o instanceof HTMLElement&&ia(o,i);)o="next"===e?n.nextNode():n.previousNode();return o instanceof HTMLElement?o:void 0}function ia(t,e){for(const i of e.querySelectorAll("[role=treeitem][aria-expanded=false]"))if(t!==i&&i.closest("li")?.contains(t))return i;return null}function na(t){const e=t.closest("[role=group]"),i=e?.closest("[role=treeitem]");return i instanceof HTMLElement?i:void 0}var sa,oa,ra,aa,la,ca,da,ha,ua,ma,fa,pa;g([U],Qr.prototype,"detailsTarget",void 0),g([U],Qr.prototype,"summaryTarget",void 0),Qr=g([j("details-toggle")],Qr),window.DetailsToggleElement=Qr;let ga=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),sa.add(this),oa.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,oa,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),ta(this),new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.querySelector("[aria-expanded=true]")&&b(this,sa,"m",ra).call(this,t)})).observe(this,{childList:!0,subtree:!0});new MutationObserver((t=>{if(!this.formInputContainer)return;t.some((t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue))&&this.updateHiddenFormInputs()})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),this.formInputContainer&&this.updateHiddenFormInputs(),customElements.whenDefined("tree-view-sub-tree-node").then((()=>{b(this,sa,"m",ra).call(this,this)}))}rootLeafNodes(){return this.querySelectorAll(":scope > ul > li > .TreeViewItemContainer [role=treeitem]")}rootSubTreeNodes(){return this.querySelectorAll(":scope > ul > tree-view-sub-tree-node")}disconnectedCallback(){b(this,oa,"f").abort()}handleEvent(t){const e=b(this,sa,"m",la).call(this,t);e&&b(this,sa,"m",ca).call(this,e,t)}handleSingleSelection(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const i=this.getNodePath(e),n=this.infoFromNode(e,"true");this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.checkOnlyAtPath(i),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,detail:[n]})))}getFormInputValueForNode(t){return t.getAttribute("data-value")}getNodePath(t){const e=t.getAttribute("data-path");return e?JSON.parse(e):[]}getNodeType(t){return t.getAttribute("data-node-type")}markCurrentAtPath(t){const e=JSON.stringify(t),i=this.querySelector(`[data-path="${CSS.escape(e)}"`);i&&(this.currentNode?.setAttribute("aria-current","false"),i.setAttribute("aria-current","true"))}get currentNode(){return this.querySelector("[aria-current=true]")}get activeNodes(){return document.querySelectorAll('[aria-checked="true"]')}expandAtPath(t){const e=this.subTreeAtPath(t);e&&e.expand()}collapseAtPath(t){const e=this.subTreeAtPath(t);e&&e.collapse()}toggleAtPath(t){const e=this.subTreeAtPath(t);e&&e.toggle()}checkAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"true")}uncheckAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"false")}checkOnlyAtPath(t){for(const t of this.activeNodes)this.uncheckAtPath(this.getNodePath(t));this.checkAtPath(t)}toggleCheckedAtPath(t){const e=this.nodeAtPath(t);e&&"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.uncheckAtPath(t):this.checkAtPath(t))}checkedValueAtPath(t){const e=this.nodeAtPath(t);return e?this.getNodeCheckedValue(e):"false"}disabledValueAtPath(t){const e=this.nodeAtPath(t);return!!e&&this.getNodeDisabledValue(e)}nodeAtPath(t,e){const i=JSON.stringify(t);return this.querySelector(`${e||""}[data-path="${CSS.escape(i)}"]`)}subTreeAtPath(t){const e=this.nodeAtPath(t,"[data-node-type=sub-tree]");return e?e.closest("tree-view-sub-tree-node"):null}leafAtPath(t){return this.nodeAtPath(t,"[data-node-type=leaf]")}setNodeCheckedValue(t,e){t.setAttribute("aria-checked",e.toString())}getNodeCheckedValue(t){return t.getAttribute("aria-checked")||"false"}getNodeDisabledValue(t){return"true"===t.getAttribute("aria-disabled")}setNodeDisabledValue(t,e){e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")}nodeHasCheckBox(t){return null!==t.querySelector(".TreeViewItemCheckbox")}nodeHasNativeAction(t){return t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement}expandAncestorsForNode(t){const e=t.closest("tree-view-sub-tree-node");if(e)for(const t of e.eachAncestorSubTreeNode())t.expanded||t.expand()}changeSelectStrategy(t){for(const e of this.querySelectorAll("tree-view-sub-tree-node"))e.changeSelectStrategy(t)}infoFromNode(t,e){const i=this.getNodeType(t);if(!i)return null;const n=this.getNodeCheckedValue(t);return{node:t,type:i,path:this.getNodePath(t),checkedValue:e||n,previousCheckedValue:n}}selectVariant(t){return t.getAttribute("data-select-variant")||"none"}updateHiddenFormInputs(){const t=[];for(const e of this.querySelectorAll("[role=treeitem][aria-checked=true]")){const i=this.formInputPrototype.cloneNode();i.removeAttribute("data-target"),i.removeAttribute("form");const n={path:this.getNodePath(e)},s=this.getFormInputValueForNode(e);s&&(n.value=s),i.value=JSON.stringify(n),t.push(i)}this.formInputContainer.replaceChildren(...t)}};var ba,va;oa=new WeakMap,sa=new WeakSet,ra=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},aa=function(t){return"click"===t.type},la=function(t){const e=t.target,i=e.closest("[role=treeitem]");return i?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:i:null},ca=function(t,e){b(this,sa,"m",da).call(this,e,t)?b(this,sa,"m",ha).call(this,e,t):b(this,sa,"m",ua).call(this,e,t)?this.handleSingleSelection(e,t):b(this,sa,"m",aa).call(this,e)?b(this,sa,"m",ma).call(this,e,t):"focusin"===e.type?b(this,sa,"m",fa).call(this,t):e instanceof KeyboardEvent&&b(this,sa,"m",pa).call(this,e,t)},da=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},ha=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if("leaf"!==this.getNodeType(e))return;const i="false"===this.getNodeCheckedValue(e)?"true":"false",n=this.infoFromNode(e,i);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true"),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]})))},ua=function(t,e){return"click"===t.type&&"single"===this.selectVariant(e)},ma=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const i=this.getNodePath(e);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeActivated",{bubbles:!0,cancelable:!0,detail:this.infoFromNode(e)}))&&(this.nodeHasNativeAction(e)||this.toggleAtPath(i),this.dispatchEvent(new CustomEvent("treeViewNodeActivated",{bubbles:!0,detail:this.infoFromNode(e)})))},fa=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},pa=function(t,e){if(e&&"leaf"===this.getNodeType(e))switch(t.key){case" ":case"Enter":if(this.getNodeDisabledValue(e)){t.preventDefault();break}"multiple"===this.selectVariant(e)?(t.preventDefault(),"true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true")):"single"===this.selectVariant(e)?(t.preventDefault(),this.checkOnlyAtPath(this.getNodePath(e))):e instanceof HTMLAnchorElement&&e.click()}},g([U],ga.prototype,"formInputContainer",void 0),g([U],ga.prototype,"formInputPrototype",void 0),ga=g([j("tree-view")],ga),window.customElements.get("tree-view")||(window.TreeViewElement=ga,window.customElements.define("tree-view",ga));let wa=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),ba.add(this)}connectedCallback(){je(this,(()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon)),(()=>{this.expanded=this.collapsedIcon.hidden}))}showExpanded(){this.expanded=!0,b(this,ba,"m",va).call(this)}showCollapsed(){this.expanded=!1,b(this,ba,"m",va).call(this)}toggle(){this.expanded=!this.expanded,b(this,ba,"m",va).call(this)}};var ya,Ea,Aa,ka,La,Ta,Ca,Sa,xa,Ma,Ia,Da,Pa;ba=new WeakSet,va=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([U],wa.prototype,"expandedIcon",void 0),g([U],wa.prototype,"collapsedIcon",void 0),wa=g([j("tree-view-icon-pair")],wa),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=wa,window.customElements.define("tree-view-icon-pair",wa));let Ha=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),ya.add(this),Ea.set(this,null),Aa.set(this,"success"),ka.set(this,void 0),La.set(this,!1)}connectedCallback(){je(this,(()=>Boolean(this.node)&&Boolean(this.subTree)),(()=>{b(this,ya,"m",Ia).call(this)}));const{signal:t}=v(this,ka,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),je(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("loadstart",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replace",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replaced",(t=>{b(this,ya,"m",Ca).call(this,t)}),{signal:t})})),je(this,(()=>Boolean(this.retryButton)),(()=>{this.retryButton.addEventListener("click",(t=>{b(this,ya,"m",Sa).call(this,t)}),{signal:t})}));new MutationObserver((()=>{if("mixed_descendants"!==this.selectStrategy)return;let t="unknown";for(const e of this.eachDirectDescendantNode())switch(`${t} ${e.getAttribute("aria-checked")||"false"}`){case"unknown mixed":case"false mixed":case"true mixed":case"false true":case"true false":t="mixed";break;case"unknown false":t="false";break;case"unknown true":t="true"}"unknown"!==t&&this.node?.getAttribute("aria-checked")!==t&&this.node?.setAttribute("aria-checked",t)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]})}get expanded(){return null===b(this,Ea,"f")&&v(this,Ea,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,Ea,"f")}set expanded(t){v(this,Ea,t,"f"),b(this,ya,"m",Ia).call(this)}get loadingState(){return b(this,Aa,"f")}set loadingState(t){v(this,Aa,t,"f"),b(this,ya,"m",Ia).call(this)}get selectStrategy(){return this.node.getAttribute("data-select-strategy")||"descendants"}get selectVariant(){return this.node.getAttribute("data-select-variant")||"none"}get level(){return parseInt(this.node.getAttribute("aria-level")||"0")}disconnectedCallback(){b(this,ka,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,ya,"m",Ta).call(this,t):t.target===this.includeFragment?b(this,ya,"m",Ca).call(this,t):t instanceof KeyboardEvent?b(this,ya,"m",xa).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,ya,"a",Pa)&&b(this,ya,"m",Ma).call(this,t)}expand(){const t=this.expanded;this.expanded=!0,!t&&this.treeView&&this.treeView.dispatchEvent(new CustomEvent("treeViewNodeExpanded",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}collapse(){const t=!this.expanded;if(this.expanded=!1,!t&&this.treeView){const t=this.subTree.querySelector("[tabindex='0']");t?.setAttribute("tabindex","-1"),b(this,ya,"m",Da).call(this)&&"0"===this.subTree.getAttribute("tabindex")&&this.subTree.setAttribute("tabindex","-1"),this.node.setAttribute("tabindex","0"),this.treeView.dispatchEvent(new CustomEvent("treeViewNodeCollapsed",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}}toggle(){this.expanded?this.collapse():this.expand()}get nodes(){return this.querySelectorAll(":scope > [role=treeitem]")}*eachDirectDescendantNode(){for(const t of this.subTree.querySelectorAll(":scope > li > .TreeViewItemContainer > [role=treeitem]"))yield t;for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node > li > .TreeViewItemContainer > [role=treeitem]"))yield t}*eachDirectDescendantSubTreeNode(){for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node"))yield t}*eachDescendantNode(){for(const t of this.subTree.querySelectorAll("[role=treeitem]"))yield t}*eachAncestorSubTreeNode(){if(!this.treeView)return;let t=this;for(;t&&this.treeView.contains(t);)yield t,t=t.parentElement?.closest("tree-view-sub-tree-node")}get isEmpty(){return 0===this.nodes.length}get treeView(){return this.closest("tree-view")}toggleChecked(){const t="false"===(this.treeView?.getNodeCheckedValue(this.node)||"false")?"true":"false",e=[],i=this.treeView?.infoFromNode(this.node,t);if(i&&e.push(i),"descendants"===this.selectStrategy||"mixed_descendants"===this.selectStrategy)for(const i of this.eachDescendantNode()){const n=this.treeView?.infoFromNode(i,t);n&&e.push(n)}if(this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))){for(const i of e)i.node.setAttribute("aria-checked",t);this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))}}changeSelectStrategy(t){this.node.setAttribute("data-select-strategy",t)}};Ea=new WeakMap,Aa=new WeakMap,ka=new WeakMap,La=new WeakMap,ya=new WeakSet,Ta=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},Ca=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,La,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),!b(this,La,"f")&&document.activeElement===this.subTree&&b(this,ya,"m",Da).call(this)&&v(this,La,!0,"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,La,"f")){const t=this.querySelector("[role=group] > :first-child");if(!t)return;const e=t.querySelector("[role=treeitem]");if(!e)return;e.focus()}v(this,La,!1,"f")}},Sa=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},xa=function(t){const e=t.target.closest("[role=treeitem]");if(e&&"sub-tree"===this.treeView?.getNodeType(e))switch(t.key){case"Enter":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}t.stopPropagation(),b(this,ya,"a",Pa)?this.toggleChecked():"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):this.treeView?.nodeHasNativeAction(e)||this.toggle();break;case"ArrowRight":t.stopPropagation(),this.expand();break;case"ArrowLeft":t.stopPropagation(),this.collapse();break;case" ":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}b(this,ya,"a",Pa)?(t.stopPropagation(),t.preventDefault(),this.toggleChecked()):"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):e instanceof HTMLAnchorElement?e.click():this.treeView?.nodeHasNativeAction(e)||this.toggle()}},Ma=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},Ia=function(){switch(this.expanded?(this.subTree&&(this.subTree.hidden=!1),b(this,ya,"m",Da).call(this)&&(this.subTree.setAttribute("role","treeitem"),this.subTree.hasAttribute("tabindex")||this.subTree.setAttribute("tabindex","-1")),this.node.setAttribute("aria-expanded","true"),this.treeView?.expandAncestorsForNode(this),this.iconPair&&this.iconPair.showExpanded(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.removeAttribute("hidden"),this.collapsedToggleIcon.setAttribute("hidden","hidden"))):(this.subTree&&(this.subTree.hidden=!0),b(this,ya,"m",Da).call(this)&&(this.subTree.removeAttribute("role"),this.subTree.removeAttribute("tabindex")),this.node.setAttribute("aria-expanded","false"),this.iconPair&&this.iconPair.showCollapsed(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.setAttribute("hidden","hidden"),this.collapsedToggleIcon.removeAttribute("hidden"))),this.loadingState){case"loading":this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0),this.loadingIndicator&&(this.loadingIndicator.hidden=!1);break;case"error":this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!1);break;default:this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0)}},Da=function(){return this.subTree?.getAttribute("data-target")?.includes("tree-view-sub-tree-node.includeFragment")??!1},Pa=function(){return this.querySelector(".TreeViewItemCheckbox")},g([U],Ha.prototype,"node",void 0),g([U],Ha.prototype,"subTree",void 0),g([U],Ha.prototype,"iconPair",void 0),g([U],Ha.prototype,"toggleButton",void 0),g([U],Ha.prototype,"expandedToggleIcon",void 0),g([U],Ha.prototype,"collapsedToggleIcon",void 0),g([U],Ha.prototype,"includeFragment",void 0),g([U],Ha.prototype,"loadingIndicator",void 0),g([U],Ha.prototype,"loadingFailureMessage",void 0),g([U],Ha.prototype,"retryButton",void 0),Ha=g([j("tree-view-sub-tree-node")],Ha),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=Ha,window.customElements.define("tree-view-sub-tree-node",Ha));let Na=class TreeViewIncludeFragmentElement extends IncludeFragmentElement{request(){const t=super.request(),e=new URL(t.url);return e.searchParams.set("path",this.getAttribute("data-path")||""),new Request(e,{method:t.method,headers:t.headers,credentials:t.credentials})}};Na=g([j("tree-view-include-fragment")],Na),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=Na,window.customElements.define("tree-view-include-fragment",Na));let Oa=class AvatarFallbackElement extends HTMLElement{constructor(){super(...arguments),this.img=null,this.testImage=null}connectedCallback(){if(this.img=this.querySelector("img")??null,!this.img)return;const t=this.getAttribute("data-unique-id")||"",e=this.getAttribute("data-alt-text")||"",i=this.getAttribute("data-avatar-src")||"";this.applyColor(this.img,t,e),i&&this.testLoadImage(i)}disconnectedCallback(){this.testImage&&(this.testImage.onload=null,this.testImage=null),this.img=null}testLoadImage(t){this.testImage=new Image,this.testImage.onload=()=>{this.img&&(this.img.src=t)},this.testImage.src=t}applyColor(t,e,i){if(!e||!i)return;const n=`${e}${i}`,s=`hsl(${this.valueHash(n)}, 50%, 30%)`;this.updateSvgColor(t,s)}valueHash(t){let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);return e%360}updateSvgColor(t,e){const i=t.src;if(!i.startsWith("data:image/svg+xml;base64,"))return;const n=i.replace("data:image/svg+xml;base64,","");try{const i=atob(n).replace(/fill="hsl\([^"]+\)"/,`fill="${e}"`);t.src=`data:image/svg+xml;base64,${btoa(i)}`}catch{}}};Oa=g([j],Oa);let Fa=class PageHeaderElement extends HTMLElement{menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}};Fa=g([j],Fa),window.customElements.get("page-header")||(window.PageHeaderElement=Fa,window.customElements.define("page-header",Fa));let qa=class ZenModeButtonElement extends HTMLElement{constructor(){super(),this.inZenMode=!1,document.addEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}disconnectedCallback(){document.removeEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}fullscreenChangeEventHandler(){this.changeButtonState(!this.inZenMode),this.dispatchZenModeStatus()}dispatchZenModeStatus(){const t=new CustomEvent("zenModeToggled",{detail:{active:this.inZenMode}});window.dispatchEvent(t)}deactivateZenMode(){document.exitFullscreen&&document.exitFullscreen()}activateZenMode(){document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen()}changeButtonState(t){this.inZenMode=t,this.button.setAttribute("aria-pressed",t.toString())}performAction(){this.inZenMode?this.deactivateZenMode():this.activateZenMode()}};g([U],qa.prototype,"button",void 0),qa=g([j],qa),window.customElements.get("zen-mode-button")||(window.ZenModeButtonElement=qa,window.customElements.define("zen-mode-button",qa));let Va=class SubHeaderElement extends HTMLElement{connectedCallback(){this.setupFilterInputClearButton()}setupFilterInputClearButton(){this.waitForCondition((()=>Boolean(this.filterInput)),(()=>{this.toggleFilterInputClearButton()}))}toggleFilterInputClearButton(){this.filterInput.value.length>0?this.filterInput.classList.remove("SubHeader-filterInput_hiddenClearButton"):this.filterInput.classList.add("SubHeader-filterInput_hiddenClearButton")}expandFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.add("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.remove("d-none");this.classList.add("SubHeader--expandedSearch"),this.filterInput.focus()}collapseFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.remove("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.add("d-none");this.classList.remove("SubHeader--expandedSearch")}waitForCondition(t,e){if(t())e();else{const i=new MutationObserver((()=>{t()&&(e(),i.disconnect())}));i.observe(this,{childList:!0,subtree:!0})}}};var Ra,Wa;g([U],Va.prototype,"filterInput",void 0),g([K],Va.prototype,"hiddenItemsOnExpandedFilter",void 0),g([K],Va.prototype,"shownItemsOnExpandedFilter",void 0),Va=g([j],Va),window.customElements.get("sub-header")||(window.SubHeaderElement=Va,window.customElements.define("sub-header",Va));let Ba=class DangerDialogFormHelperElement extends HTMLElement{constructor(){super(...arguments),Ra.add(this),this.confirmationLiveMessageChecked="",this.confirmationLiveMessageUnchecked=""}get form(){return this.querySelector("form")}get submitButton(){return this.querySelector("input[type=submit],button[type=submit],button[data-submit-dialog-id]")}connectedCallback(){this.style.display="contents",this.form&&(this.form.style.display="contents"),b(this,Ra,"m",Wa).call(this)}toggle(){if(!this.checkbox||!this.submitButton)return;const t=this.checkbox.checked;if(this.submitButton.disabled=!t,this.liveRegion){const e=t?this.confirmationLiveMessageChecked:this.confirmationLiveMessageUnchecked;this.liveRegion.announce(e,{politeness:"assertive"})}}};Ra=new WeakSet,Wa=function(){this.toggle()},g([U],Ba.prototype,"checkbox",void 0),g([U],Ba.prototype,"liveRegion",void 0),g([I],Ba.prototype,"confirmationLiveMessageChecked",void 0),g([I],Ba.prototype,"confirmationLiveMessageUnchecked",void 0),Ba=g([j],Ba),window.customElements.get("danger-dialog-form-helper")||(window.DangerDialogFormHelperElement=Ba,window.customElements.define("danger-dialog-form-helper",Ba));class CollapsibleElement extends HTMLElement{constructor(){super(...arguments),this.collapsed=!1}toggleViaKeyboard(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),this.toggle())}toggle(){this.collapsed=!this.collapsed}attributeChangedCallback(t){"data-collapsed"===t&&(this.collapsed?this.hideAll():this.expandAll())}hideAll(){this.arrowDown?.removeAttribute("hidden"),this.arrowUp?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","false");for(const t of this.collapsibleElements)t.hidden=!0;this.classList.add(`${this.baseClass}--collapsed`)}expandAll(){this.arrowUp?.removeAttribute("hidden"),this.arrowDown?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","true");for(const t of this.collapsibleElements)t.hidden=!1;this.classList.remove(`${this.baseClass}--collapsed`)}}g([U],CollapsibleElement.prototype,"arrowDown",void 0),g([U],CollapsibleElement.prototype,"arrowUp",void 0),g([U],CollapsibleElement.prototype,"triggerElement",void 0),g([K],CollapsibleElement.prototype,"collapsibleElements",void 0),g([I],CollapsibleElement.prototype,"collapsed",void 0);let $a=class CollapsibleHeaderElement extends CollapsibleElement{connectedCallback(){if(!this.closest(".Box"))throw new Error("No surrounding BorderBox found")}get baseClass(){return"CollapsibleHeader"}};$a=g([j],$a);let Ua=class CollapsibleSectionElement extends CollapsibleElement{get baseClass(){return"CollapsibleSection"}};var Ka,ja,za,_a,Ya,Za,Ga,Xa,Ja,Qa,tl,el,il,nl,sl,ol,rl;Ua=g([j],Ua);let al=class FilterableTreeViewElement extends HTMLElement{constructor(){super(...arguments),Ka.add(this),ja.set(this,void 0),za.set(this,void 0),_a.set(this,new Map)}connectedCallback(){const{signal:t}=v(this,za,new AbortController,"f");this.addEventListener("treeViewNodeChecked",this,{signal:t}),this.addEventListener("itemActivated",this,{signal:t}),this.addEventListener("input",this,{signal:t})}disconnectedCallback(){b(this,za,"f").abort()}handleEvent(t){t.target===this.filterModeControl?b(this,Ka,"m",Xa).call(this,t):t.target===this.filterInput?b(this,Ka,"m",Ja).call(this,t):t.target===this.includeSubItemsCheckBox?b(this,Ka,"m",Qa).call(this,t):(t.target instanceof ga||t.target instanceof Ha)&&b(this,Ka,"m",Ya).call(this,t)}get filterModeControl(){return this.filterModeControlList.closest("segmented-control")}get treeView(){return this.treeViewList.closest("tree-view")}set filterFn(t){v(this,ja,t,"f")}get filterFn(){return b(this,ja,"f")?b(this,ja,"f"):this.defaultFilterFn}defaultFilterFn(t,e,i){const n=[];if(e.length>0){const i=e.toLowerCase(),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let o=s.nextNode();for(;o;){const t=o.textContent?.toLocaleLowerCase()||"";let e=0;for(;e<t.length;){const s=t.indexOf(i,e);if(-1===s)break;const r=new Range;r.setStart(o,s),r.setEnd(o,s+i.length),n.push(r),e=s+i.length}o=s.nextNode()}}if(0===n.length&&e.length>0)return null;switch(i){case"selected":if("false"!==this.treeView?.getNodeCheckedValue(t))return n;break;case"all":return n}return null}get filterMode(){const t=this.filterModeControl?.current;return t?t.getAttribute("data-name"):null}get queryString(){return this.filterInput.value}*eachDescendantDepthFirst(t,e,i){for(const n of t.querySelectorAll(`[role=treeitem][data-node-type='sub-tree'][aria-level='${e}']`)){const t=n.closest("tree-view-sub-tree-node");yield*this.eachDescendantDepthFirst(t,e+1,[...i,t])}const n=t.querySelectorAll(`[role=treeitem][data-node-type='leaf'][aria-level='${e}']`);yield[n,i]}*eachShallowestCheckedSubTree(t){if("true"!==this.treeView?.getNodeCheckedValue(t.node))for(const e of t.eachDirectDescendantSubTreeNode())yield*this.eachShallowestCheckedSubTree(e);else yield t}};ja=new WeakMap,za=new WeakMap,_a=new WeakMap,Ka=new WeakSet,Ya=function(t){const e=t;if("treeViewNodeChecked"===t.type)b(this,Ka,"m",Za).call(this,e)},Za=function(t){if(!this.treeView)return;if(!this.includeSubItemsCheckBox.checked)return;const e=t.detail[0];if("sub-tree"!==this.treeView.getNodeType(e.node))return;const i=e.node.closest("tree-view-sub-tree-node");"false"===e.checkedValue?b(this,Ka,"m",Ga).call(this,i):b(this,Ka,"m",el).call(this,i)},Ga=function(t){if(!this.treeView)return;if(!b(this,_a,"f").has(t))return;const e=b(this,_a,"f").get(t);for(const[t,i]of e.entries()){let e=t;t instanceof Ha&&(e=t.node),this.treeView.setNodeCheckedValue(e,i.checked?"true":"false"),this.treeView.setNodeDisabledValue(e,i.disabled)}b(this,_a,"f").delete(t)},Xa=function(t){"itemActivated"===t.type&&b(this,Ka,"m",nl).call(this)},Ja=function(t){"input"===t.type&&b(this,Ka,"m",nl).call(this)},Qa=function(t){this.treeView&&"input"===t.type&&(b(this,Ka,"m",nl).call(this),this.includeSubItemsCheckBox.checked?b(this,Ka,"m",tl).call(this):b(this,Ka,"m",il).call(this))},tl=function(){if(this.treeView)for(const t of this.treeView.rootSubTreeNodes())for(const e of this.eachShallowestCheckedSubTree(t))b(this,Ka,"m",el).call(this,e)},el=function(t){if(!this.treeView)return;const e=new Map;for(const i of t.eachDescendantNode())e.set(i,{checked:"true"===this.treeView.getNodeCheckedValue(i),disabled:this.treeView.getNodeDisabledValue(i)}),this.treeView.setNodeCheckedValue(i,"true"),this.treeView.setNodeDisabledValue(i,!0);b(this,_a,"f").set(t,e)},il=function(){for(const t of b(this,_a,"f").keys())b(this,Ka,"m",Ga).call(this,t)},nl=function(){if(!this.treeView)return;b(this,Ka,"m",rl).call(this);const t=this.queryString,e=this.filterMode||void 0,i=window.crypto.randomUUID(),n=new Map,s=(...n)=>{for(const s of n)s.expand(),s.removeAttribute("hidden"),s.setAttribute("data-generation",i),o(s.node,t,e)?s.node.removeAttribute("aria-disabled"):s.node.setAttribute("aria-disabled","true")},o=(t,e,i)=>(n.has(t)||n.set(t,this.filterFn(t,e,i)),null!==n.get(t));for(const[n,r]of this.eachDescendantDepthFirst(this.treeViewList,1,[])){const a=r[r.length-1];let l=!1;for(const i of n)o(i,t,e)?(i.closest("li")?.removeAttribute("hidden"),l=!0):i.closest("li")?.setAttribute("hidden","hidden");l?s(...r):a&&(o(a.node,t,e)?s(...r):a.getAttribute("data-generation")!==i&&(a.collapse(),a.setAttribute("hidden","hidden")))}const r=Array.from(n.values()).flat().filter((t=>null!==t));0===r.length&&t.length>0?(this.treeViewList.setAttribute("hidden","hidden"),this.noResultsMessage.removeAttribute("hidden")):(this.treeViewList.removeAttribute("hidden"),this.noResultsMessage.setAttribute("hidden","hidden"),b(this,Ka,"m",sl).call(this,r))},sl=function(t){CSS.highlights?CSS.highlights.set("primer-filterable-tree-view-search-results",new Highlight(...t)):b(this,Ka,"m",ol).call(this,t)},ol=function(t){const e=t[0].startContainer,i=e.parentNode,n=e.textContent,s=[];let o=0;for(const{startOffset:e,endOffset:i}of t){e>o&&s.push(document.createTextNode(n.slice(o,e)));const t=document.createElement("mark");t.textContent=n.slice(e,i),s.push(t),o=i}o<n.length&&s.push(document.createTextNode(n.slice(o)));for(const t of s.reverse())i.insertBefore(t,e.nextSibling);i.removeChild(e)},rl=function(){for(const t of this.querySelectorAll("mark"))t.parentElement&&t.parentElement.replaceChildren(t.parentElement.textContent)},g([U],al.prototype,"filterInput",void 0),g([U],al.prototype,"filterModeControlList",void 0),g([U],al.prototype,"treeViewList",void 0),g([U],al.prototype,"noResultsMessage",void 0),g([U],al.prototype,"includeSubItemsCheckBox",void 0),al=g([j],al),window.customElements.get("filterable-tree-view")||(window.FilterableTreeViewElement=al,window.customElements.define("filterable-tree-view",al))}();
2
2
  //# sourceMappingURL=primer_view_components.js.map