openproject-primer_view_components 0.74.1 → 0.75.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/select_panel_element.js +9 -0
- data/app/components/primer/alpha/select_panel_element.ts +12 -0
- data/app/components/primer/alpha/toggle_switch.html.erb +2 -2
- data/app/components/primer/alpha/toggle_switch.rb +16 -0
- data/app/components/primer/alpha/tooltip.rb +1 -2
- data/app/components/primer/beta/avatar_stack.css +1 -1
- data/app/components/primer/beta/avatar_stack.css.map +1 -1
- data/app/components/primer/beta/avatar_stack.html.erb +3 -0
- data/app/components/primer/beta/avatar_stack.pcss +0 -1
- data/app/components/primer/beta/avatar_stack.rb +19 -5
- data/app/components/primer/beta/progress_bar.css +1 -1
- data/app/components/primer/beta/progress_bar.css.json +2 -1
- data/app/components/primer/beta/progress_bar.css.map +1 -1
- data/app/components/primer/beta/progress_bar.pcss +11 -0
- data/app/components/primer/beta/state.css +1 -1
- data/app/components/primer/beta/state.css.map +1 -1
- data/app/components/primer/beta/state.pcss +3 -2
- data/lib/primer/view_components/linters/flash_migration_counter.rb +2 -2
- data/lib/primer/view_components/version.rb +2 -2
- data/previews/primer/alpha/toggle_switch_preview.rb +4 -0
- data/previews/primer/beta/avatar_stack_preview.rb +3 -3
- data/static/arguments.json +12 -0
- data/static/info_arch.json +13 -1
- metadata +2 -2
@@ -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());if(200!==i.status)throw new Error(`Failed to load resource: the server responded with a status of ${i.status}`);const 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}`);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 f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.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=f.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 m(t,e,i){const n=t.input;if(!n)return;const s=f.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)S(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]"))S(e);t instanceof Element&&t.hasAttribute("data-action")&&S(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 S(t){for(const e of T(t))t.addEventListener(e.type,L)}const C=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=C(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 N=Symbol.for("catalyst");class H{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=C(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,N)){const e=t[N],i=t[N]=new Map;if(e)for(const[t,n]of e)i.set(t,new Set(n))}const i=t[N];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 V(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 q(t){new H(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([q],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 f=0;if(r){let t=s;for(;f<r.length&&_(t,d,c,i);){const s=r[f++];t=s,d=z(i,n,s,o,a,l),d.top-=e.top,d.left-=e.left,h=s}}const m=U[o];let p=0;if(m){let t=o;for(;p<m.length&&Y(t,d,c,i);){const s=m[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&&f<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;var lt;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"}(lt||(lt={}));const ct={ArrowLeft:lt.ArrowHorizontal,ArrowDown:lt.ArrowVertical,ArrowUp:lt.ArrowVertical,ArrowRight:lt.ArrowHorizontal,h:lt.HL,j:lt.JK,k:lt.JK,l:lt.HL,a:lt.AD,s:lt.WS,w:lt.WS,d:lt.AD,Tab:lt.Tab,Home:lt.HomeAndEnd,End:lt.HomeAndEnd,PageUp:lt.PageUpDown,PageDown:lt.PageUpDown,Backspace:lt.Backspace},dt={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 ht(t){const e=dt[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}const ut="data-is-active-descendant",ft="activated-directly",mt="activated-indirectly",pt="data-has-active-descendant";function gt(t,e){var i,n,s,o,r;const a=[],l=new WeakMap,c=null!==(i=null==e?void 0:e.bindKeys)&&void 0!==i?i:((null==e?void 0:e.getNextFocusable)?lt.ArrowAll:lt.ArrowVertical)|lt.HomeAndEnd,d=null!==(n=null==e?void 0:e.focusOutBehavior)&&void 0!==n?n:"stop",h=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",u=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(o=null==e?void 0:e.preventScroll)&&void 0!==o&&o;function g(){return a[0]}function b(t,e=!1){const i=m;m=t,u?t&&document.activeElement===u?v(i,t,e):w():(i&&i!==t&&l.has(i)&&i.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,i,n=!1){i.id||i.setAttribute("id","__primer_id_"+at++),e&&e!==i&&e.removeAttribute(ut),u&&(n||u.getAttribute("aria-activedescendant")!==i.id)&&(u.setAttribute("aria-activedescendant",i.id),t.setAttribute(pt,i.id),i.setAttribute(ut,n?ft:mt),null==f||f(i,e,n))}function w(e=m){"first"===h&&(m=void 0),null==u||u.removeAttribute("aria-activedescendant"),t.removeAttribute(pt),null==e||e.removeAttribute(ut);for(const e of t.querySelectorAll(`[${ut}]`))null==e||e.removeAttribute(ut);null==f||f(void 0,e,!1)}function y(...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){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let i=0,n=a.length-1;for(;i<=n;){const t=Math.floor((i+n)/2);E(e,a[t])?n=t-1:i=t+1}return i}(i),0,...i);for(const t of i)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const i=l.get(e);if(void 0!==i&&(null===i?e.removeAttribute("tabindex"):e.setAttribute("tabindex",i),l.delete(e)),e===m){b(g())}}}const k={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};y(...Z(t,k));b("function"==typeof h?h(document.body):g());new MutationObserver((t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&A(...Z(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&A(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&y(...Z(t,k));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&y(e.target)}})).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const L=new AbortController,T=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:L.signal;let S;T.addEventListener("abort",(()=>{A(...a)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(S=a.indexOf(t.target))}),{signal:T}),u?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(u.focus({preventScroll:p}),b(t.target))}),{signal:T}),t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=a.find((e=>e.contains(t)));e&&b(e)}),{signal:T,capture:!0}),u.addEventListener("focusin",(()=>{m?v(void 0,m):b(g())}),{signal:T}),u.addEventListener("focusout",(()=>{w()}),{signal:T})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==S)S>=0&&a[S]!==m&&b(a[S]),S=void 0;else if("previous"===h)b(e.target);else if("closest"===h||"first"===h){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===x?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof h)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=h(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);x=void 0}),{signal:T});const C=null!=u?u:t;let x;return"closest"===h&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(x=ht(t))}),{signal:T,capture:!0}),C.addEventListener("keydown",(i=>{var n;if(i.key in dt){const s=ct[i.key];if(!i.defaultPrevented&&(s&c)>0&&!function(t,e){const i=t.key,n=[...i].length,s=e instanceof HTMLInputElement&&"text"===e.type||e instanceof HTMLTextAreaElement;if(s&&(1===n||"Home"===i||"End"===i))return!0;if(e instanceof HTMLSelectElement){if(1===n)return!0;if("ArrowDown"===i&&rt()&&!t.metaKey)return!0;if("ArrowDown"===i&&!rt()&&t.altKey)return!0}if(e instanceof HTMLTextAreaElement&&("PageUp"===i||"PageDown"===i))return!0;if(s){const t=e,n=0===t.selectionStart&&0===t.selectionEnd,s=t.selectionStart===t.value.length&&t.selectionEnd===t.value.length;if("ArrowLeft"===i&&!n)return!0;if("ArrowRight"===i&&!s)return!0;if(t instanceof HTMLTextAreaElement){if("ArrowUp"===i&&!n)return!0;if("ArrowDown"===i&&!s)return!0}}return!1}(i,document.activeElement)){const s=ht(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(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let n=e;"previous"===s?n-=1:"start"===s?n=0:"next"===s?n+=1:n=a.length-1,n<0&&(n="wrap"===d&&"Tab"!==i.key?a.length-1:0),n>=a.length&&(n="wrap"===d&&"Tab"!==i.key?0:a.length-1),e!==n&&(o=a[n])}u?b(o||m,!0):o&&(x=s,o.focus({preventScroll:p})),("Tab"!==i.key||o)&&i.preventDefault()}}}),{signal:T}),L}var bt,vt,wt,yt,Et,At,kt;const Lt=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Ct&&t.update()}})),Tt=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Ct&&t.update()}}));var St;!function(t){t[t.Item=0]="Item",t[t.Divider=1]="Divider"}(St||(St={}));let Ct=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),bt.add(this),vt.set(this,null)}connectedCallback(){Tt.observe(this),Lt.observe(this),requestAnimationFrame((()=>{this.style.overflow="visible",this.update()}))}disconnectedCallback(){Tt.unobserve(this),Lt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}update(){const t=b(this,bt,"a",wt);if(!t)return;const e=t.getBoundingClientRect().top;let i=null;b(this,bt,"m",kt).call(this,((t,n,s)=>{const o=t.getBoundingClientRect().top;return s===St.Item&&(o>e?(b(this,bt,"m",Et).call(this,n),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),i===St.Divider&&b(this,bt,"m",Et).call(this,n-1)):(b(this,bt,"m",yt).call(this,n),n===this.items.length-1&&(this.moreMenu.hidden=!0),i===St.Divider&&b(this,bt,"m",yt).call(this,n-1))),i=s,!0})),b(this,vt,"f")&&b(this,vt,"f").abort(),v(this,vt,gt(this,{bindKeys:lt.ArrowHorizontal|lt.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")}};vt=new WeakMap,bt=new WeakSet,wt=function(){let t=null;return b(this,bt,"m",kt).call(this,((e,i,n)=>n!==St.Item||(t=e,!1))),t},yt=function(t){const e=this.items[t],i=b(this,bt,"a",At)[t];e&&i&&(e.style.setProperty("visibility","visible"),i.hidden=!0)},Et=function(t){const e=this.items[t],i=b(this,bt,"a",At)[t];e&&i&&(e.style.setProperty("visibility","hidden"),i.hidden=!1)},At=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},kt=function(t){for(let e=0;e<this.items.length;e++){const i=this.items[e],n=i.classList.contains("ActionBar-divider")?St.Divider:St.Item;if(!t(i,e,n))break}},g([V],Ct.prototype,"items",void 0),g([F],Ct.prototype,"itemContainer",void 0),g([F],Ct.prototype,"moreMenu",void 0),Ct=g([q],Ct),window.ActionBarElement=Ct;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=[It(t,"compositionstart",(t=>Wt(this,t))),It(t,"compositionend",(t=>Wt(this,t))),It(t,"click",(e=>Ft(t,e))),It(t,"change",(e=>Ft(t,e))),It(t,"keydown",(e=>function(t,e,i){if(!(i instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const n=xt.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")&&(Rt(t),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Ht(t,!0);e&&e.focus(),i.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Ht(t,!1);e&&e.focus(),i.preventDefault()}break;case"n":if(Ot&&i.ctrlKey){const e=Ht(t,!0);e&&e.focus(),i.preventDefault()}break;case"p":if(Ot&&i.ctrlKey){const e=Ht(t,!1);e&&e.focus(),i.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&qt(e)&&e.closest("details")===t&&(i.preventDefault(),i.stopPropagation(),e.click())}}}(t,this,e))),It(t,"toggle",(()=>Dt(t,this)),{once:!0}),It(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?It(t,"mouseover",(()=>Dt(t,this)),{once:!0}):Mt,...Pt(t)];xt.set(this,{subscriptions:i,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=xt.get(this);if(t){xt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const xt=new WeakMap,Mt={unsubscribe(){}};function It(t,e,i,n=!1){return t.addEventListener(e,i,n),{unsubscribe:()=>{t.removeEventListener(e,i,n)}}}function Dt(t,e){const i=e.getAttribute("src");if(!i)return;const n=xt.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",(()=>Nt(t))),s.setAttribute("src",i))}function Pt(t){let e=!1;return[It(t,"mousedown",(()=>e=!0)),It(t,"keydown",(()=>e=!1)),It(t,"toggle",(()=>{t.hasAttribute("open")&&(Nt(t)||e||function(t){const e=document.activeElement;if(e&&qt(e)&&t.contains(e))return;const i=Ht(t,!0);i&&i.focus()}(t))}))]}function Nt(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Ht(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 Ot=navigator.userAgent.match(/Macintosh/);function Ft(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||Vt(e,t)}else if("change"===e.type){const e=i.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Vt(e,t)}}function Vt(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")&&Rt(e),i.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function qt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function Rt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function Wt(t,e){const i=xt.get(t);i&&(i.isComposing="compositionstart"===e.type)}var Bt,$t;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const Ut=(()=>{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),Bt.set(this,null),$t.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,Bt,"f"))return b(this,Bt,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,Bt,t,"f"),b(this,Bt,"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())),Ut(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,$t,"f")),v(this,$t,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 Kt,jt,zt;function _t(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()}}Bt=new WeakMap,$t=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),Kt.add(this),jt.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,jt,new AbortController,"f");document.addEventListener("click",_t,!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,Kt,"m",zt).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Kt,"m",zt).call(this)}disconnectedCallback(){b(this,jt,"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()}}jt=new WeakMap,Kt=new WeakSet,zt=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 Yt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:i="",...n}={}){super(t,n),this.oldState=String(e||""),this.newState=String(i||"")}},Zt=new WeakMap;function Gt(t,e,i){Zt.set(t,setTimeout((()=>{Zt.has(t)&&t.dispatchEvent(new Yt("toggle",{cancelable:!1,oldState:e,newState:i}))}),0))}var Xt=globalThis.ShadowRoot||function(){},Jt=globalThis.HTMLDialogElement||function(){},Qt=new WeakMap,te=new WeakMap,ee=new WeakMap;function ie(t){return ee.get(t)||"hidden"}var ne=new WeakMap;function se(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===ie(t))&&(!(!e&&"hidden"!==ie(t))&&(!(t instanceof Jt&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function oe(t){return t?Array.from(te.get(t.ownerDocument)||[]).indexOf(t)+1:0}function re(t){const e=ce(t),i=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||le(t))instanceof Xt&&(t=t.host),t instanceof Document)return}}(t);return oe(e)>oe(i)?e:i}function ae(t){const e=te.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function le(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?le(t.parentNode):t}function ce(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===ee.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||le(t))instanceof Xt&&(t=t.host),t instanceof Document)return}}function de(t){return!(t.hidden||t instanceof Xt)&&((!(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 he(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(de(s))return s;s=n.nextNode()}})(t)?.focus()}var ue=new WeakMap;function fe(t){if(!se(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Yt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!se(t,!1))return;let i=!1;if("auto"===t.popover){const i=t.getAttribute("popover");if(ge(function(t){const e=new Map;let i=0;for(const n of te.get(t.ownerDocument)||[])e.set(n,i),i+=1;e.set(t,i),i+=1;let n=null;return function(t){const i=ce(t);if(null===i)return null;const s=e.get(i);(null===n||e.get(n)<s)&&(n=i)}(t.parentElement||le(t)),n}(t)||e,!1,!0),i!==t.getAttribute("popover")||!se(t,!1))return}ae(e)||(i=!0),ue.delete(t);const n=e.activeElement;t.classList.add(":popover-open"),ee.set(t,"showing"),Qt.has(e)||Qt.set(e,new Set),Qt.get(e).add(t),he(t),"auto"===t.popover&&(te.has(e)||te.set(e,new Set),te.get(e).add(t),ye(ne.get(t),!0)),i&&n&&"auto"===t.popover&&ue.set(t,n),Gt(t,"closed","open")}function me(t,e=!1,i=!1){if(!se(t,!0))return;const n=t.ownerDocument;if("auto"===t.popover&&(ge(t,e,i),!se(t,!0)))return;if(ye(ne.get(t),!1),ne.delete(t),i&&(t.dispatchEvent(new Yt("beforetoggle",{oldState:"open",newState:"closed"})),!se(t,!0)))return;Qt.get(n)?.delete(t),te.get(n)?.delete(t),t.classList.remove(":popover-open"),ee.set(t,"hidden"),i&&Gt(t,"open","closed");const s=ue.get(t);s&&(ue.delete(t),e&&s.focus())}function pe(t,e=!1,i=!1){let n=ae(t);for(;n;)me(n,e,i),n=ae(t)}function ge(t,e,i){const n=t.ownerDocument||t;if(t instanceof Document)return pe(n,e,i);let s=null,o=!1;for(const e of te.get(n)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return pe(n,e,i);for(;s&&"showing"===ie(s)&&te.get(n)?.size;)me(s,e,i)}var be=new WeakMap;function ve(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const i=e.ownerDocument;if(!ae(i))return;const n=re(e);if(n&&"pointerdown"===t.type)be.set(i,n);else if("pointerup"===t.type){const t=be.get(i)===n;be.delete(i),t&&ge(n||i,!1,!0)}}var we=new WeakMap;function ye(t,e=!1){if(!t)return;we.has(t)||we.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=we.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var Ee=globalThis.ShadowRoot||function(){};function Ae(t,e,i){const n=t[e];Object.defineProperty(t,e,{value(t){return n.call(this,i(t))}})}var ke=/(^|[^\\]):popover-open\b/g;function Le(){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 Te,Se,Ce,xe,Me=null;function Ie(t){const e=Le();if(null===Me)try{(Me=new CSSStyleSheet).replaceSync(e)}catch{Me=!1}if(!1===Me){const i=document.createElement("style");i.textContent=e,t instanceof Document?t.head.prepend(i):t.prepend(i)}else t.adoptedStyleSheets=[Me,...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(ke,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Yt,Ae(Document.prototype,"querySelector",t),Ae(Document.prototype,"querySelectorAll",t),Ae(Element.prototype,"querySelector",t),Ae(Element.prototype,"querySelectorAll",t),Ae(Element.prototype,"matches",t),Ae(Element.prototype,"closest",t),Ae(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(){fe(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){me(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===ee.get(this)&&void 0===t||!1===t?me(this,!0,!0):void 0!==t&&!0!==t||fe(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 Ie(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&&Ie(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=le(this),i=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof Ee)&&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=le(i);if(!(n instanceof Ee||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=ie(e);"show"===t.popoverTargetAction&&"showing"===i||"hide"===t.popoverTargetAction&&"hidden"===i||("showing"===i?me(e,!0,!0):se(e,!1)&&(ne.set(e,t),fe(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,i=t.target;t.defaultPrevented||!i||"Escape"!==e&&"Esc"!==e||ge(i.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",ve),t.addEventListener("pointerup",ve)})(document),Ie(document)}();const De=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),Pe=t=>t.textContent?.trim()[0].toLowerCase(),Ne=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Te.add(this),Se.set(this,null),Ce.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,Ce,new AbortController,"f");const{signal:t}=b(this,Ce,"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,Ce,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:i}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(De)){b(this,Se,"f")?.abort();const{signal:e}=v(this,Se,new AbortController,"f");for(const i of b(this,Te,"a",xe)){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,Se,"f")?.abort(),i.setAttribute("tabindex","-1"),n.id)){const t=this.querySelector(`[popovertarget="${n.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Te,"a",xe)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const n=Array.from(b(this,Te,"a",xe));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||!Ne.test(o))return;{const e=o.toLowerCase(),r=s>0&&Pe(t.target)===e?s:0;s=n.findIndex(((t,i)=>i>r&&Pe(t)===e)),s<0&&!i&&(s=n.findIndex((t=>Pe(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()}}}Se=new WeakMap,Ce=new WeakMap,Te=new WeakSet,xe=function(){return this.querySelectorAll(De)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let He=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],He.prototype,"hasOverflow",void 0),g([I],He.prototype,"labelledBy",void 0),He=g([q],He),window.ScrollableRegionElement=He;const Oe=(t,e,i)=>{if(e())i();else{const n=new MutationObserver((()=>{e()&&(i(),n.disconnect())}));n.observe(t,{childList:!0,subtree:!0})}};var Fe,Ve,qe,Re;function We(t){document.activeElement!==t&&t?.focus()}const Be=[];function $e(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(Be.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=Be.findIndex((t=>t.id===n));Be.splice(e,1),t.close(i.hasAttribute("data-submit-dialog-id"))}}}function Ue(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||$e(t)}function Ke(t){const e=t.target;if(e?.closest("button"))return;const i=Be[Be.length-1];if(!i)return;!e.closest(`#${i.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(Be.pop(),i.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),Fe.add(this),Ve.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,Fe,"a",qe)?.classList.remove("Overlay--hidden"),b(this,Ve,"f").signal.aborted&&v(this,Ve,new AbortController,"f"),ot(this,this.querySelector("[autofocus]"),b(this,Ve,"f").signal),Be.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,Fe,"a",qe)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,Ve,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");We(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",$e),document.addEventListener("keydown",Ue),document.addEventListener("mousedown",Ke),this.addEventListener("keydown",(t=>b(this,Fe,"m",Re).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 je,ze,_e,Ye,Ze,Ge,Xe,Je;Ve=new WeakMap,Fe=new WeakSet,qe=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},Re=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 Qe=class NavListElement extends HTMLElement{constructor(){super(...arguments),je.add(this),ze.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,ze,new W(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,ze,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,je,"m",_e).call(this,t);return!!e&&(b(this,je,"m",Ge).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,je,"m",Ye).call(this,t);return!!e&&(b(this,je,"m",Ge).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,je,"m",Ze).call(this);return!!t&&(b(this,je,"m",Ge).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 ti,ei,ii;ze=new WeakMap,je=new WeakSet,_e=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},Ye=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},Ze=function(){return b(this,je,"m",Ye).call(this,window.location.pathname)},Ge=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,je,"m",Xe).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const i=b(this,je,"m",Je).call(this,t);i&&(this.expandItem(i),i.classList.add("ActionListContent--hasActiveSubItem"))},Xe=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,je,"m",Je).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},Je=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([V],Qe.prototype,"items",void 0),g([F],Qe.prototype,"topLevelList",void 0),Qe=g([q],Qe);let ni=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),ti.add(this),ii.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,ti,"m",ei).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 si,oi;ii=new WeakMap,ti=new WeakSet,ei=function(t,e){const i=t.createElement("template");return i.innerHTML=e,t.importNode(i.content,!0)},g([F],ni.prototype,"showMoreItem",void 0),g([V],ni.prototype,"focusMarkers",void 0),ni=g([q],ni),window.NavListGroupElement=ni;let ri=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),si.add(this)}connectedCallback(){b(this,si,"m",oi).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]")}};si=new WeakSet,oi=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([V],ri.prototype,"items",void 0),ri=g([q],ri),window.customElements.get("segmented-control")||(window.SegmentedControlElement=ri,window.customElements.define("segmented-control",ri));let ai=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 li,ci,di,hi,ui,fi,mi,pi,gi,bi,vi;g([F],ai.prototype,"switch",void 0),g([F],ai.prototype,"loadingSpinner",void 0),g([F],ai.prototype,"errorIcon",void 0),g([I],ai.prototype,"turbo",void 0),ai=g([q],ai),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=ai,window.customElements.define("toggle-switch",ai));const wi=(()=>{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)})(),yi="sr-only",Ei=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Ai(t){for(const e of Si)e!==t&&(wi(e)?e.hidePopover():Si.delete(e))}function ki(){Ai()}function Li(t){setTimeout((()=>{for(const e of Si)wi(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const Ti=new Set,Si=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),li.add(this),ci.set(this,void 0),di.set(this,"center"),hi.set(this,"outside-bottom"),ui.set(this,!1),fi.set(this,"mouse")}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,fi,"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&&wi(this)?this.hidePopover():t||wi(this)||this.showPopover()}get hiddenFromView(){return!wi(this)}connectedCallback(){if(Ti.add(this),b(this,li,"m",gi).call(this),b(this,li,"m",bi).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,li,"m",mi).call(this,!1),v(this,ui,!0,"f"),b(this,li,"m",pi).call(this)}disconnectedCallback(){Ti.delete(this),Si.delete(this),b(this,ci,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=wi(this),i="mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")),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,a=n||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!i||wi(this)?e&&a&&wi(this)&&this.hidePopover():(v(this,fi,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,li,"m",mi).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,li,"m",pi).call(this):"id"===t||"data-type"===t?b(this,li,"m",gi).call(this):"data-direction"===t&&b(this,li,"m",bi).call(this))}}var Ci,xi;ci=new WeakMap,di=new WeakMap,hi=new WeakMap,ui=new WeakMap,fi=new WeakMap,li=new WeakSet,mi=function(t){t?(Si.add(this),this.classList.remove(yi),Ai(this),b(this,li,"m",vi).call(this)):(Si.delete(this),this.classList.remove(...Ei),this.classList.add(yi))},pi=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,ci,"f")?.abort(),v(this,ci,new AbortController,"f");const{signal:t}=b(this,ci,"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",ki),this.ownerDocument.addEventListener("focusin",Li),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},gi=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)}},bi=function(){this.classList.remove(...Ei);const t=this.direction;"n"===t?(v(this,di,"center","f"),v(this,hi,"outside-top","f")):"ne"===t?(v(this,di,"end","f"),v(this,hi,"outside-top","f")):"e"===t?(v(this,di,"center","f"),v(this,hi,"outside-right","f")):"se"===t?(v(this,di,"end","f"),v(this,hi,"outside-bottom","f")):"s"===t?(v(this,di,"center","f"),v(this,hi,"outside-bottom","f")):"sw"===t?(v(this,di,"start","f"),v(this,hi,"outside-bottom","f")):"w"===t?(v(this,di,"center","f"),v(this,hi,"outside-left","f")):"nw"===t&&(v(this,di,"start","f"),v(this,hi,"outside-top","f"))},vi=function(){if(!this.control)return;if(!b(this,ui,"f")||!wi(this))return;const t=K(this,this.control,{side:b(this,hi,"f"),align:b(this,di,"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 Mi=class XBannerElement extends HTMLElement{constructor(){super(...arguments),Ci.add(this)}dismiss(){if("remove"===b(this,Ci,"a",xi)){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")}};Ci=new WeakSet,xi=function(){return this.getAttribute("data-dismiss-scheme")},g([F],Mi.prototype,"titleText",void 0),Mi=g([q],Mi),window.customElements.get("x-banner")||(window.XBannerElement=Mi,window.customElements.define("x-banner",Mi));class Ii{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":Pi(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Pi(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",Di),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",Di)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Ni)[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(Ni)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Ni),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"),Hi(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 Di(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 Pi(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 Ni(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Hi(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 Oi=window.testScreenReaderDelay||100;class Fi{constructor(t,e,i,n=!1){var s;if(this.container=t,this.input=e,this.results=i,this.combobox=new Ii(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)}),Oi)}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 Vi,qi,Ri,Wi,Bi,$i=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)},Ui=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},Ki=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 ji=globalThis.HTMLElement||null;class zi extends Event{constructor(t,e){var{relatedTarget:i}=e;super(t,Ki(e,["relatedTarget"])),this.relatedTarget=i}}const _i=new WeakMap;let Yi=null;class AutoCompleteElement extends ji{constructor(){super(...arguments),Vi.add(this),qi.set(this,null),Ri.set(this,null),Bi.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Yi=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=$i(this,qi,"f"))||void 0===t?void 0:t.isConnected)return $i(this,qi,"f");const e=this.getAttribute("for"),i=this.getRootNode();return e&&(i instanceof Document||i instanceof ShadowRoot)?i.getElementById(e):null}set forElement(t){Ui(this,qi,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=$i(this,Ri,"f"))||void 0===t?void 0:t.isConnected)?$i(this,Ri,"f"):this.querySelector("input")}set inputElement(t){Ui(this,Ri,t,"f"),$i(this,Vi,"m",Wi).call(this)}connectedCallback(){this.isConnected&&($i(this,Vi,"m",Wi).call(this),new MutationObserver((()=>{_i.get(this)||$i(this,Vi,"m",Wi).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=_i.get(this);t&&(t.destroy(),_i.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=$i(this,Bi,"f"))||void 0===e||e.abort();const{signal:i}=Ui(this,Bi,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(Yi){return(await Yi).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=_i.get(this);if(o)switch(this.forElement===(null===(n=_i.get(this))||void 0===n?void 0:n.results)&&this.inputElement===(null===(s=_i.get(this))||void 0===s?void 0:s.input)||$i(this,Vi,"m",Wi).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}))}}}qi=new WeakMap,Ri=new WeakMap,Bi=new WeakMap,Vi=new WeakSet,Wi=function(){var t;null===(t=_i.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:i}=this;if(!e||!i)return;const n="true"===this.getAttribute("data-autoselect");_i.set(this,new Fi(this,i,e,n)),e.setAttribute("role","listbox")};const Zi="undefined"!=typeof globalThis?globalThis:window;try{Zi.AutocompleteElement=Zi.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(Zi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Gi(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 Xi(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),Gi(i),e.removeChild(i),Promise.resolve()}async function Ji(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 Xi(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?Xi(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?Xi(s.href):Gi(s)),n())}}function Qi(t){const e=t.currentTarget;e instanceof HTMLElement&&Ji(e)}function tn(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),Ji(e))}}function en(t){t.currentTarget.addEventListener("keydown",tn)}function nn(t){t.currentTarget.removeEventListener("keydown",tn)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",Qi),this.addEventListener("focus",en),this.addEventListener("blur",nn)}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 sn="undefined"!=typeof globalThis?globalThis:window;try{sn.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(sn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function on(t){t.style.display="inline-block"}function rn(t){t.style.display="none"}const an=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=an.get(t),i=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),n="Copied!";e?(clearTimeout(e),an.delete(t)):(!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(rn(e),on(i))}(t),i&&(i.textContent===n?i.textContent=`${n} `:i.textContent=n)),an.set(t,setTimeout((()=>{!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(on(e),rn(i))}(t),an.delete(t)}),2e3))}));var ln,cn=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},dn=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 hn="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)}},un=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],fn={minimumIntegerDigits:2};class mn{constructor(t,e={}){ln.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;cn(this,ln,{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 dn(this,ln,"f")}formatToParts(t){const e=[],i=dn(this,ln,"f"),n=i.style,s=i.locale;for(const[n,o]of un){const r=t[n];if("auto"===i[`${n}Display`]&&!r)continue;const a=i[n],l="2-digit"===a?fn:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new hn(s,{type:"unit",style:"digital"===n?"short":n}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}ln=new WeakMap;const pn=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,gn=["year","month","week","day","hour","minute","second","millisecond"];class bn{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 bn(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(pn))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*n));return s?new bn(...s):new bn}if("object"==typeof t){const{years:e,months:i,weeks:n,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new bn(e,i,n,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const i=Date.now(),n=Math.abs(vn(i,bn.from(t)).getTime()-i),s=Math.abs(vn(i,bn.from(e)).getTime()-i);return n>s?-1:n<s?1:0}toLocaleString(t,e){return new mn(t,e).format(this)}}function vn(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 wn(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(),f=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,f-t.getDate()),l=new Date(e);l.setFullYear(h+n*i),l.setDate(f-a),l.setMonth(u+s*i),l.setDate(f-a+r*i);const c=l.getFullYear()-e.getFullYear(),d=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+d);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,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 bn(n*i,s*i,o*i,r*i,a*i,l*i,c*i,d*i)}var yn,En,An,kn,Ln,Tn,Sn,Cn,xn,Mn,In,Dn,Pn=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)},Nn=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 Hn=globalThis.HTMLElement||null,On=new bn,Fn=new bn(0,0,0,0,0,1);class Vn 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 qn(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 Rn=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=qn(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,qn(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Hn{constructor(){super(...arguments),yn.add(this),En.set(this,!1),An.set(this,!1),Ln.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Dn.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 Pn(this,Dn,"f")}set onRelativeTimeUpdated(t){Pn(this,Dn,"f")&&this.removeEventListener("relative-time-updated",Pn(this,Dn,"f")),Nn(this,Dn,"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,pn.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 gn.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(){Rn.unobserve(this)}attributeChangedCallback(t,e,i){e!==i&&("title"===t&&Nn(this,En,null!==i&&(this.date&&Pn(this,yn,"m",Tn).call(this,this.date))!==i,"f"),Pn(this,An,"f")||"title"===t&&Pn(this,En,"f")||Nn(this,An,(async()=>{await Promise.resolve(),this.update(),Nn(this,An,!1,"f")})(),"f"))}update(){const t=Pn(this,Ln,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let i=e;const n=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!n)return void(Pn(this,Ln,"f").textContent=t);const s=Date.now();Pn(this,En,"f")||(i=Pn(this,yn,"m",Tn).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 bn;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=gn.indexOf(e)||gn.length;return new bn(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=Pn(this,yn,"m",Sn).call(this,o);let a=t;a="duration"===r?Pn(this,yn,"m",Cn).call(this,o):"relative"===r?Pn(this,yn,"m",xn).call(this,o):Pn(this,yn,"m",Mn).call(this,n),a?Pn(this,yn,"m",In).call(this,a):this.shadowRoot===Pn(this,Ln,"f")&&this.textContent&&Pn(this,yn,"m",In).call(this,this.textContent),a===t&&i===e||this.dispatchEvent(new Vn(t,a,e,i)),"relative"===r||"duration"===r?Rn.observe(this):Rn.unobserve(this)}}En=new WeakMap,An=new WeakMap,Ln=new WeakMap,Dn=new WeakMap,yn=new WeakSet,kn=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"}},Tn=function(t){return new Intl.DateTimeFormat(Pn(this,yn,"a",kn),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Sn=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===bn.compare(t,this.threshold))return"relative"}return"datetime"},Cn=function(t){const e=Pn(this,yn,"a",kn),i=this.format,n=this.formatStyle,s=this.tense;let o=On;"micro"===i?(t=wn(t),o=Fn,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Fn)):("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})},xn=function(t){const e=new Intl.RelativeTimeFormat(Pn(this,yn,"a",kn),{numeric:"auto",style:this.formatStyle}),i=this.tense;"future"===i&&1!==t.sign&&(t=On),"past"===i&&-1!==t.sign&&(t=On);const[n,s]=function(t,e){const i=wn(t,e);if(i.blank)return[0,"second"];for(const t of gn){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)},Mn=function(t){const e=new Intl.DateTimeFormat(Pn(this,yn,"a",kn),{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()},In=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,Pn(this,Ln,"f").replaceChildren(e)}else Pn(this,Ln,"f").textContent=t};const Wn="undefined"!=typeof globalThis?globalThis:window;try{Wn.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Wn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Bn(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=Bn(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=Bn(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 Bn(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=Bn(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 $n="undefined"!=typeof globalThis?globalThis:window;try{$n.TabContainerElement=TabContainerElement.define()}catch(t){if(!($n.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let Un=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 Kn(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([V],Un.prototype,"fields",void 0),Un=g([q],Un),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:Un}),window.customElements.define("primer-multi-input",Un));var jn,zn,_n=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)},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};!function(t){t.GET="GET",t.POST="POST"}(zn||(zn={}));const Zn=new WeakMap;class Gn extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class Xn extends Gn{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class Jn extends Gn{constructor(){super("complete")}}class Qn extends Gn{constructor(t){super("success"),this.response=t}}class ts extends Xn{constructor(){super("start","Verifying…")}}class es extends Xn{constructor(t){super("error","Validation failed"),this.response=t}}class is extends Gn{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),jn.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return _n(this,jn,"f")}set onloadend(t){_n(this,jn,"f")&&this.removeEventListener("loadend",_n(this,jn,"f")),Yn(this,jn,"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=Kn(os.bind(null,this),300),i={check:e,controller:null};Zn.set(this,i);const n=ns.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=Zn.get(this);e&&(Zn.delete(this),t.removeEventListener("input",ss),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 ns(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)&&(ss(e),t()))}function ss(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=Zn.get(i);if(!n||"POST"===o&&!s||!r)return;const a=new ts;e.dispatchEvent(a),i.required&&e.setCustomValidity(a.message)}async function os(t){const e=t.input;if(!e)return;const i=t.csrfField,n=t.src,s=t.csrf,o=Zn.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 is(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 Qn(i.clone()));else{t.validateOnKeystroke=!0;const n=new es(i.clone());e.dispatchEvent(n),t.required&&e.setCustomValidity(n.message)}o.controller=null,e.dispatchEvent(new Jn)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new Jn))}}jn=new WeakMap;const rs="undefined"!=typeof globalThis?globalThis:window;try{rs.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(rs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var as;let ls=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),as.set(this,void 0)}connectedCallback(){b(this,as,"f")?.abort();const{signal:t}=v(this,as,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})}disconnectedCallback(){b(this,as,"f")?.abort()}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")}};as=new WeakMap,g([F],ls.prototype,"inputElement",void 0),g([F],ls.prototype,"validationElement",void 0),g([F],ls.prototype,"validationMessageElement",void 0),g([F],ls.prototype,"validationSuccessIcon",void 0),g([F],ls.prototype,"validationErrorIcon",void 0),g([F],ls.prototype,"leadingVisual",void 0),g([F],ls.prototype,"leadingSpinner",void 0),ls=g([q],ls);let cs=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 ds,hs,us,fs,ms,ps,gs,bs,vs,ws,ys,Es,As,ks,Ls,Ts,Ss,Cs,xs,Ms,Is,Ds,Ps,Ns,Hs,Os,Fs,Vs,qs,Rs,Ws,Bs,$s;g([F],cs.prototype,"validationElement",void 0),g([F],cs.prototype,"validationMessageElement",void 0),cs=g([q],cs);class Us{constructor(){ds.add(this),hs.set(this,void 0),v(this,hs,[],"f")}get current(){return b(this,hs,"f")[b(this,hs,"f").length-1]}push(t,e={trapFocus:!0}){const{trapFocus:i}=e;b(this,hs,"f").push({element:t,abortController:b(this,ds,"m",us).call(this,t,i)})}pop(t){if(t)for(;b(this,hs,"f").length>0&&this.current?.element!==t;){const t=b(this,hs,"f").pop();t?.abortController?.abort()}const e=b(this,hs,"f").pop();e?.abortController?.abort()}elementIsMenuItem(t){return b(this,ds,"a",fs).includes(t.getAttribute("role")||"")}get isEmpty(){return 0===b(this,hs,"f").length}}hs=new WeakMap,ds=new WeakSet,us=function(t,e){const i=gt(t,{bindKeys:lt.ArrowVertical|lt.ArrowHorizontal|lt.HomeAndEnd|lt.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},fs=function(){return Ks.validItemRoles};let Ks=$s=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),ms.add(this),ps.set(this,void 0),gs.set(this,""),bs.set(this,""),vs.set(this,!1),ws.set(this,void 0),ys.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,ps,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",Vs).call(this),b(this,ms,"m",qs).call(this),b(this,ms,"m",As).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,ms,"m",Fs).call(this)&&this.overlay?.update()};v(this,ws,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"),Oe(this,(()=>Boolean(this.invokerElement)),(()=>b(this,ws,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true");new MutationObserver((()=>b(this,ms,"m",Es).call(this))).observe(this,{childList:!0,subtree:!0}),b(this,ms,"m",Es).call(this),v(this,ys,new Us,"f")}disconnectedCallback(){b(this,ps,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),i=b(this,ms,"m",Ss).call(this,t);if("toggle"===t.type&&t instanceof ToggleEvent)return void b(this,ms,"m",xs).call(this,t);if(e&&"mousedown"===t.type)return void v(this,vs,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return b(this,ms,"m",Ms).call(this,t),void v(this,vs,!1,"f");if("focusout"===t.type){if(b(this,vs,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,ms,"m",Ns).call(this)}))}const n=t.target.closest($s.menuItemSelectors.join(",")),s=null!==n;if(s&&i){if(b(this,ms,"m",ks).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",Is).call(this,t,i)}b(this,ms,"m",Ls).call(this,t)&&(t.preventDefault(),n.click());const i=b(this,ms,"m",Ws).call(this,n);return i?(t.preventDefault(),void i.showPopover()):void b(this,ms,"m",Ds).call(this,n)}"include-fragment-replaced"!==t.type?s&&t instanceof KeyboardEvent&&b(this,ms,"m",Cs).call(this,t,n):b(this,ms,"m",Ps).call(this)}get items(){return Array.from(this.querySelectorAll($s.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",Ds).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",Ds).call(this,e)}}};ps=new WeakMap,gs=new WeakMap,bs=new WeakMap,vs=new WeakMap,ws=new WeakMap,ys=new WeakMap,ms=new WeakSet,Es=function(){let t=1;for(const e of this.querySelectorAll("[role=menu]"))e.setAttribute("data-level",t.toString()),t++},As=function(){const{signal:t}=b(this,ps,"f");for(const e of this.querySelectorAll($s.validSelectors.join(",")))e.addEventListener("click",b(this,ms,"m",ks).bind(this),{signal:t}),e.addEventListener("keydown",b(this,ms,"m",ks).bind(this),{signal:t})},ks=function(t){if(!b(this,ms,"m",Ss).call(this,t))return!1;const e=t.target.closest($s.menuItemSelectors.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Ls=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Ts=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)},Ss=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,ms,"m",Ls).call(this,t)||b(this,ms,"m",Ts).call(this,t)},Cs=function(t,e){switch(t.key){case"ArrowRight":{const t=b(this,ms,"m",Ws).call(this,e);t?.showPopover();break}case"ArrowLeft":if(e.closest("role[menu]")!==this.list){const t=e.closest("anchored-position");t?.hidePopover()}}},xs=function(t){const e=t.target;if("open"===t.newState){const t=e===this.overlay;b(this,ys,"f").push(e,{trapFocus:!t}),window.requestAnimationFrame((()=>{const t=e.querySelector($s.menuItemSelectors.join(","));t?.focus()}))}else{b(this,ys,"f").pop(e);const t=b(this,ms,"m",Bs).call(this,e),i=document.querySelector(":popover-open");t&&!i&&t.focus()}},Ms=function(t){t.preventDefault(),t.stopPropagation(),b(this,ms,"m",Fs).call(this)?b(this,ms,"m",Os).call(this):b(this,ms,"m",Hs).call(this)},Is=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",Fs).call(this)&&b(this,ms,"m",Os).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})},Ds=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,ms,"m",Fs).call(this)&&b(this,ms,"m",Os).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",Vs).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)}}))},Ps=function(){b(this,ms,"a",Rs)?.focus(),b(this,ms,"m",As).call(this),this.setAttribute("data-ready","true")},Ns=function(){b(this,ms,"m",Os).call(this)},Hs=function(){this.popoverElement?.showPopover()},Os=function(){this.popoverElement?.hidePopover();for(const t of this.childPopoverElements)t.hidePopover()},Fs=function(){return this.popoverElement?.matches(":popover-open")},Vs=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,gs,b(this,gs,"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,gs,"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,bs,b(this,bs,"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,bs,"f"),i.value=(e.value||e.label||"").trim(),t.append(i)}for(const t of e)t.remove()}},Rs=function(){return this.querySelector($s.menuItemSelectors.join(","))},Ws=function(t){const e=t.getAttribute("popovertarget");return e?this.querySelector(`[id="${e}"]`):null},Bs=function(t){const e=t.getAttribute("anchor");return e?this.querySelector(`[id="${e}"]`):null},Ks.validItemRoles=["menuitem","menuitemcheckbox","menuitemradio"],Ks.validSelectors=$s.validItemRoles.map((t=>`[role="${t}"]`)),Ks.menuItemSelectors=$s.validSelectors.map((t=>`:not([hidden]) > ${t}`)),g([F],Ks.prototype,"includeFragment",void 0),g([F],Ks.prototype,"overlay",void 0),g([F],Ks.prototype,"list",void 0),Ks=$s=g([q],Ks),window.customElements.get("action-menu")||(window.ActionMenuElement=Ks,window.customElements.define("action-menu",Ks));const js="less",zs="equal",_s="greater";var Ys,Zs,Gs,Xs,Js,Qs=t=>{throw TypeError(t)},to=(t,e,i)=>e.has(t)||Qs("Cannot "+i),eo=(t,e,i)=>(to(t,e,"read from private field"),i?i.call(t):e.get(t)),io=(t,e,i)=>e.has(t)?Qs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),no=(t,e,i,n)=>(to(t,e,"write to private field"),e.set(t,i),i),so=(t,e,i)=>(to(t,e,"access private method"),i);class oo{constructor({compareFn:t}){io(this,Gs),io(this,Ys),io(this,Zs),no(this,Ys,t),no(this,Zs,[])}insert(t){eo(this,Zs).push(t),so(this,Gs,Js).call(this)}pop(){const t=eo(this,Zs)[0];return eo(this,Zs)[eo(this,Zs).length-1]&&(eo(this,Zs)[0]=eo(this,Zs)[eo(this,Zs).length-1],eo(this,Zs).pop()),so(this,Gs,Xs).call(this),t}peek(){return eo(this,Zs)[0]}delete(t){const e=eo(this,Zs).indexOf(t);-1!==e&&(go(eo(this,Zs),e,eo(this,Zs).length-1),eo(this,Zs).pop(),so(this,Gs,Xs).call(this))}clear(){no(this,Zs,[])}get size(){return eo(this,Zs).length}}function ro(t){return 2*t+1}function ao(t){return 2*t+2}function lo(t){return Math.floor((t-1)/2)}function co(t,e){return ro(t)<e}function ho(t,e){return ao(t)<e}function uo(t){return t>0}function fo(t,e){return t[ro(e)]}function mo(t,e){return t[ao(e)]}function po(t,e){return t[lo(e)]}function go(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}Ys=new WeakMap,Zs=new WeakMap,Gs=new WeakSet,Xs=function(){let t=0;for(;co(t,eo(this,Zs).length);){let e=ro(t);if(ho(t,eo(this,Zs).length)&&eo(this,Ys).call(this,mo(eo(this,Zs),t),fo(eo(this,Zs),t))===js&&(e=ao(t)),eo(this,Ys).call(this,eo(this,Zs)[t],eo(this,Zs)[e])===js)break;go(eo(this,Zs),t,e),t=e}},Js=function(){let t=eo(this,Zs).length-1;for(;uo(t)&&eo(this,Ys).call(this,eo(this,Zs)[t],po(eo(this,Zs),t))===js;)go(eo(this,Zs),t,lo(t)),t=lo(t)};var bo,vo,wo,yo,Eo=Object.defineProperty,Ao=t=>{throw TypeError(t)},ko=(t,e,i)=>((t,e,i)=>e in t?Eo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),Lo=(t,e,i)=>e.has(t)||Ao("Cannot "+i),To=(t,e,i)=>(Lo(t,e,"read from private field"),i?i.call(t):e.get(t)),So=(t,e,i)=>e.has(t)?Ao("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Co=(t,e,i,n)=>(Lo(t,e,"write to private field"),e.set(t,i),i);bo=Symbol.toStringTag;class xo{constructor(){ko(this,bo,"Deferred"),So(this,vo),So(this,wo),So(this,yo),Co(this,vo,new Promise(((t,e)=>{Co(this,wo,t),Co(this,yo,e)})))}then(t,e){return Promise.prototype.then.apply(To(this,vo),[t,e])}catch(t){return Promise.prototype.catch.apply(To(this,vo),[t])}finally(t){return Promise.prototype.finally.apply(To(this,vo),[t])}resolve(t){To(this,wo).call(this,t)}reject(t){To(this,yo).call(this,t)}getPromise(){return To(this,vo)}}vo=new WeakMap,wo=new WeakMap,yo=new WeakMap;var Mo,Io,Do,Po,No,Ho,Oo=t=>{throw TypeError(t)},Fo=(t,e,i)=>e.has(t)||Oo("Cannot "+i),Vo=(t,e,i)=>(Fo(t,e,"read from private field"),i?i.call(t):e.get(t)),qo=(t,e,i)=>e.has(t)?Oo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Ro=(t,e,i,n)=>(Fo(t,e,"write to private field"),e.set(t,i),i),Wo=(t,e,i)=>(Fo(t,e,"access private method"),i);class LiveRegionElement extends HTMLElement{constructor(){if(super(),qo(this,Po),qo(this,Mo),qo(this,Io),qo(this,Do),!this.shadowRoot){const t=function(){if(Bo)return Bo;return Bo=document.createElement("template"),Bo.innerHTML=$o,Bo}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}Ro(this,Mo,!1),Ro(this,Do,null),Ro(this,Io,new oo({compareFn:Uo}))}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 xo,r={deferred:o,politeness:n,contents:t,scheduled:void 0!==i?s+i:s};return Vo(this,Io).insert(r),Wo(this,Po,No).call(this),{...o.getPromise(),cancel:()=>{Vo(this,Io).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:Ko}}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!==Vo(this,Do)&&(clearTimeout(Vo(this,Do)),Ro(this,Do,null)),Ro(this,Mo,!1),Vo(this,Io).clear()}}Mo=new WeakMap,Io=new WeakMap,Do=new WeakMap,Po=new WeakSet,No=function(){if(Vo(this,Mo))return;let t=Vo(this,Io).peek();if(!t)return;null!==Vo(this,Do)&&(clearTimeout(Vo(this,Do)),Ro(this,Do,null));const e=Date.now();if(t.scheduled<=e)return t=Vo(this,Io).pop(),t&&Wo(this,Po,Ho).call(this,t),void Wo(this,Po,No).call(this);const i=t.scheduled-e;Ro(this,Do,window.setTimeout((()=>{Ro(this,Do,null),Wo(this,Po,No).call(this)}),i))},Ho=function(t){Ro(this,Mo,!0);const{contents:e,deferred:i,politeness:n}=t,s=this.shadowRoot?.getElementById(n);if(!s)throw Ro(this,Mo,!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!==Vo(this,Do)&&clearTimeout(Vo(this,Do)),i.resolve(),this.delay>0?Ro(this,Do,window.setTimeout((()=>{Ro(this,Do,null),Ro(this,Mo,!1),Wo(this,Po,No).call(this)}),this.delay)):(Ro(this,Do,null),Ro(this,Mo,!1),Wo(this,Po,No).call(this))};let Bo=null;const $o='\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 Uo(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?zs:t.scheduled<e.scheduled?js:_s:"assertive"===t.politeness&&"assertive"!==e.politeness?js:"assertive"!==t.politeness&&"assertive"===e.politeness?_s:zs}function Ko(){}var jo,zo,_o,Yo,Zo,Go,Xo,Jo,Qo,tr,er,ir,nr,sr,or,rr,ar,lr,cr,dr,hr,ur,fr,mr,pr,gr,br,vr,wr,yr,Er,Ar,kr,Lr,Tr,Sr,Cr,xr,Mr,Ir;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Dr=['[role="option"]'],Pr=Dr.join(","),Nr=Dr.map((t=>`:not([hidden]) > ${t}`)).join(",");var Hr,Or;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Hr||(Hr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Or||(Or={}));const Fr=(()=>{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 Vr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),jo.add(this),zo.set(this,void 0),_o.set(this,void 0),Yo.set(this,""),Zo.set(this,""),Go.set(this,new Map),Xo.set(this,null),Jo.set(this,null),Qo.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"multiple"===this.selectVariant?"aria-checked":"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,Go,"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,_o,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",Tr).call(this),b(this,jo,"m",Sr).call(this),b(this,jo,"m",tr).call(this),Fr(this),Oe(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),Oe(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,zo,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",wr)===Hr.LOCAL&&b(this,jo,"m",mr).call(this))}})),"f"),Oe(this,(()=>Boolean(this.dialog)),(()=>{b(this,zo,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,jo,"a",wr)===Hr.LOCAL&&Oe(this,(()=>this.items.length>0),(()=>{b(this,jo,"m",mr).call(this),b(this,jo,"m",Sr).call(this)}))}disconnectedCallback(){b(this,_o,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,jo,"m",fr).call(this,t);if(t.target===this.remoteInput)return void b(this,jo,"m",hr).call(this,t);const e=this.invokerElement?.contains(t.target),i=this.closeButton?.contains(t.target),n=b(this,jo,"m",sr).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",Ar).call(this,t);if(i&&n)return;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(Nr)?.parentElement;if(null!=s&&n){if(b(this,jo,"m",ir).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",kr).call(this,t,i)}return b(this,jo,"m",nr).call(this,t)&&(t.preventDefault(),b(this,jo,"m",Ir).call(this,s)?.click()),void b(this,jo,"m",Lr).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",cr).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(Nr)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(Pr)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,jo,"m",Ir).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",Ir).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,jo,"m",Ir).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,jo,"m",Ir).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,jo,"m",Lr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,jo,"m",Lr).call(this,t)}};zo=new WeakMap,_o=new WeakMap,Yo=new WeakMap,Zo=new WeakMap,Go=new WeakMap,Xo=new WeakMap,Jo=new WeakMap,Qo=new WeakMap,jo=new WeakSet,tr=function(){const{signal:t}=b(this,_o,"f");for(const e of this.querySelectorAll(Dr.join(",")))e.addEventListener("click",b(this,jo,"m",ir).bind(this),{signal:t}),e.addEventListener("keydown",b(this,jo,"m",ir).bind(this),{signal:t})},er=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const i=b(this,jo,"m",Ir).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",Ir).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,jo,"a",Cr)&&b(this,jo,"m",Ir).call(this,b(this,jo,"a",Cr))?.setAttribute("tabindex","0")},ir=function(t){if(!b(this,jo,"m",sr).call(this,t))return!1;const e=t.target.closest(Nr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},nr=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},sr=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,jo,"m",nr).call(this,t)},or=function(){for(const t of this.items){const e=b(this,jo,"m",Ir).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");i&&b(this,Go,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,jo,"m",Sr).call(this)},rr=function(t){const e=b(this,jo,"m",Ir).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,Go,"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,jo,"m",Ir).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,Go,"f").delete(i)},lr=function(){b(this,jo,"a",yr)&&(b(this,Xo,"f")&&clearTimeout(b(this,Xo,"f")),b(this,Jo,"f")&&clearTimeout(b(this,Jo,"f")),v(this,Jo,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,Xo,setTimeout((()=>{b(this,jo,"a",yr)?.showLeadingSpinner()}),1e3),"f"))},cr=function(t){switch(t.type){case"include-fragment-replaced":b(this,jo,"m",mr).call(this);break;case"loadstart":b(this,jo,"m",dr).call(this,!1);break;case"loadend":b(this,jo,"a",yr)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,jo,"m",dr).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},dr=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)},hr=function(t){switch(t.type){case"remote-input-success":b(this,jo,"m",br).call(this),b(this,jo,"m",mr).call(this),b(this,jo,"m",or).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,jo,"m",gr).call(this,Or.BODY):b(this,jo,"m",gr).call(this,Or.BANNER);break;case"loadstart":if(!b(this,jo,"m",Er).call(this)){if(b(this,jo,"m",br).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,jo,"m",lr).call(this)}break;case"loadend":b(this,jo,"a",yr)?.hideLeadingSpinner(),b(this,Jo,"f")&&clearTimeout(b(this,Jo,"f")),b(this,Xo,"f")&&clearTimeout(b(this,Xo,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},ur=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},fr=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",Ir).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,jo,"m",Ir).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",Ir).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",Ir).call(this,e);i&&i.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,jo,"m",Er).call(this)||b(this,jo,"m",lr).call(this),b(this,jo,"a",wr)===Hr.LOCAL||b(this,jo,"a",wr)===Hr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,jo,"m",mr).call(this)}},mr=function(){if(!this.list)return;let t=!1;if(b(this,jo,"m",Er).call(this)){const e=this.filterInputTextField?.value??"",i=this.filterFn||b(this,jo,"m",ur);for(const n of this.items)i(n,e)?(b(this,jo,"m",Mr).call(this,n),t=!0):b(this,jo,"m",xr).call(this,n)}else t=this.items.length>0;b(this,jo,"m",er).call(this),b(this,jo,"m",vr).call(this);for(const t of this.items){const e=b(this,jo,"m",Ir).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");b(this,Qo,"f")?i&&!b(this,Go,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"false"):i&&!b(this,Go,"f").has(i)&&this.isItemChecked(t)&&b(this,jo,"m",rr).call(this,t)}v(this,Qo,!0,"f"),this.noResults&&(b(this,jo,"m",pr).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")))},pr=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},gr=function(t){let e=this.fragmentErrorElement;t===Or.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"})},br=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},vr=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)}}},wr=function(){if(!this.list)return Hr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Hr.LOCAL;case"eventually_local":return Hr.EVENTUALLY_LOCAL;default:return Hr.REMOTE}},yr=function(){return this.filterInputTextField?.closest("primer-text-field")},Er=function(){return b(this,jo,"a",wr)===Hr.LOCAL||b(this,jo,"a",wr)===Hr.EVENTUALLY_LOCAL},Ar=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},kr=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})},Lr=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",Ir).call(this,t)?.getAttribute("data-value")}})))return;const n=b(this,jo,"m",Ir).call(this,t);if("single"===this.selectVariant){if(n?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,jo,"m",Ir).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,Go,"f").clear(),i&&(b(this,jo,"m",rr).call(this,t),n?.setAttribute(this.ariaSelectionType,"true")),b(this,jo,"m",Tr).call(this)}}else n?.setAttribute(this.ariaSelectionType,`${i}`),i?b(this,jo,"m",rr).call(this,t):b(this,jo,"m",ar).call(this,t);b(this,jo,"m",Sr).call(this),b(this,jo,"m",er).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:i,value:b(this,jo,"m",Ir).call(this,t)?.getAttribute("data-value")}}))},Tr=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Yo,b(this,Yo,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,Yo,"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,Yo,"f")},Sr=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,Qo,"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,Zo,b(this,Zo,"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,Zo,"f"),n.value=(i.value||i.label||"").trim(),e.append(n)}for(const t of i)t.remove()}},Cr=function(){return this.querySelector(Nr)?.parentElement||null},xr=function(t){t&&t.setAttribute("hidden","hidden")},Mr=function(t){t&&t.removeAttribute("hidden")},Ir=function(t){return t.querySelector(".ActionListContent")},g([F],Vr.prototype,"includeFragment",void 0),g([F],Vr.prototype,"dialog",void 0),g([F],Vr.prototype,"filterInputTextField",void 0),g([F],Vr.prototype,"remoteInput",void 0),g([F],Vr.prototype,"list",void 0),g([F],Vr.prototype,"noResults",void 0),g([F],Vr.prototype,"fragmentErrorElement",void 0),g([F],Vr.prototype,"bannerErrorElement",void 0),g([F],Vr.prototype,"bodySpinner",void 0),g([F],Vr.prototype,"liveRegion",void 0),Vr=g([q],Vr),window.customElements.get("select-panel")||(window.SelectPanelElement=Vr,window.customElements.define("select-panel",Vr));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 Rr(t){gt(t,{bindKeys:lt.ArrowVertical|lt.ArrowHorizontal|lt.HomeAndEnd|lt.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 $r(t)}switch(e.key){case"ArrowUp":return Wr(t,"previous");case"ArrowDown":return Wr(t,"next");case"Backspace":return $r(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 Wr(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&&Br(o,i);)o="next"===e?n.nextNode():n.previousNode();return o instanceof HTMLElement?o:void 0}function Br(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 $r(t){const e=t.closest("[role=group]"),i=e?.closest("[role=treeitem]");return i instanceof HTMLElement?i:void 0}var Ur,Kr,jr,zr,_r,Yr,Zr,Gr,Xr,Jr,Qr,ta;g([F],qr.prototype,"detailsTarget",void 0),g([F],qr.prototype,"summaryTarget",void 0),qr=g([q],qr),window.DetailsToggleElement=qr;let ea=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),Ur.add(this),Kr.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,Kr,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),Rr(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,Ur,"m",jr).call(this,t)})).observe(this,{childList:!0,subtree:!0});new MutationObserver((t=>{if(!this.formInputContainer)return;if(!t.some((t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue)))return;const e=[];for(const t 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(t)},s=this.getFormInputValueForNode(t);s&&(n.value=s),i.value=JSON.stringify(n),e.push(i)}this.formInputContainer.replaceChildren(...e)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),customElements.whenDefined("tree-view-sub-tree-node").then((()=>{b(this,Ur,"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,Kr,"f").abort()}handleEvent(t){const e=b(this,Ur,"m",_r).call(this,t);e&&b(this,Ur,"m",Yr).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");if(!this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]})))return;!this.getNodeCheckedValue(e)||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"}};var ia,na;Kr=new WeakMap,Ur=new WeakSet,jr=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},zr=function(t){return"click"===t.type},_r=function(t){const e=t.target,i=e.closest("[role=treeitem]");return i?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:i:null},Yr=function(t,e){b(this,Ur,"m",Zr).call(this,e,t)?b(this,Ur,"m",Gr).call(this,e,t):b(this,Ur,"m",Xr).call(this,e,t)?this.handleSingleSelection(e,t):b(this,Ur,"m",zr).call(this,e)?b(this,Ur,"m",Jr).call(this,e,t):"focusin"===e.type?b(this,Ur,"m",Qr).call(this,t):e instanceof KeyboardEvent&&b(this,Ur,"m",ta).call(this,e,t)},Zr=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},Gr=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]})))},Xr=function(t,e){return"click"===t.type&&"single"===this.selectVariant(e)},Jr=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)})))},Qr=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},ta=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],ea.prototype,"formInputContainer",void 0),g([F],ea.prototype,"formInputPrototype",void 0),ea=g([q],ea),window.customElements.get("tree-view")||(window.TreeViewElement=ea,window.customElements.define("tree-view",ea));let sa=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),ia.add(this)}connectedCallback(){Oe(this,(()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon)),(()=>{this.expanded=this.collapsedIcon.hidden}))}showExpanded(){this.expanded=!0,b(this,ia,"m",na).call(this)}showCollapsed(){this.expanded=!1,b(this,ia,"m",na).call(this)}toggle(){this.expanded=!this.expanded,b(this,ia,"m",na).call(this)}};var oa,ra,aa,la,ca,da,ha,ua,fa,ma,pa,ga;ia=new WeakSet,na=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([F],sa.prototype,"expandedIcon",void 0),g([F],sa.prototype,"collapsedIcon",void 0),sa=g([q],sa),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=sa,window.customElements.define("tree-view-icon-pair",sa));let ba=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),oa.add(this),ra.set(this,null),aa.set(this,"success"),la.set(this,void 0),ca.set(this,!1)}connectedCallback(){Oe(this,(()=>Boolean(this.node)&&Boolean(this.subTree)),(()=>{b(this,oa,"m",pa).call(this)}));const{signal:t}=v(this,la,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),Oe(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,oa,"m",ha).call(this,t)}),{signal:t})})),Oe(this,(()=>Boolean(this.retryButton)),(()=>{this.retryButton.addEventListener("click",(t=>{b(this,oa,"m",ua).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,ra,"f")&&v(this,ra,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,ra,"f")}set expanded(t){v(this,ra,t,"f"),b(this,oa,"m",pa).call(this)}get loadingState(){return b(this,aa,"f")}set loadingState(t){v(this,aa,t,"f"),b(this,oa,"m",pa).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,la,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,oa,"m",da).call(this,t):t.target===this.includeFragment?b(this,oa,"m",ha).call(this,t):t instanceof KeyboardEvent?b(this,oa,"m",fa).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,oa,"a",ga)&&b(this,oa,"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"),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)}};ra=new WeakMap,aa=new WeakMap,la=new WeakMap,ca=new WeakMap,oa=new WeakSet,da=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},ha=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,ca,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,ca,"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,ca,!1,"f")}},ua=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},fa=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,oa,"a",ga)?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,oa,"a",ga)?(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())},pa=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)}},ga=function(){return this.querySelector(".TreeViewItemCheckbox")},g([F],ba.prototype,"node",void 0),g([F],ba.prototype,"subTree",void 0),g([F],ba.prototype,"iconPair",void 0),g([F],ba.prototype,"toggleButton",void 0),g([F],ba.prototype,"expandedToggleIcon",void 0),g([F],ba.prototype,"collapsedToggleIcon",void 0),g([F],ba.prototype,"includeFragment",void 0),g([F],ba.prototype,"loadingIndicator",void 0),g([F],ba.prototype,"loadingFailureMessage",void 0),g([F],ba.prototype,"retryButton",void 0),ba=g([q],ba),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=ba,window.customElements.define("tree-view-sub-tree-node",ba));let va=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})}};va=g([q],va),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=va,window.customElements.define("tree-view-include-fragment",va));let wa=class PageHeaderElement extends HTMLElement{menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}};wa=g([q],wa),window.customElements.get("page-header")||(window.PageHeaderElement=wa,window.customElements.define("page-header",wa));let ya=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],ya.prototype,"button",void 0),ya=g([q],ya),window.customElements.get("zen-mode-button")||(window.ZenModeButtonElement=ya,window.customElements.define("zen-mode-button",ya));let Ea=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 Aa,ka;g([F],Ea.prototype,"filterInput",void 0),g([V],Ea.prototype,"hiddenItemsOnExpandedFilter",void 0),g([V],Ea.prototype,"shownItemsOnExpandedFilter",void 0),Ea=g([q],Ea),window.customElements.get("sub-header")||(window.SubHeaderElement=Ea,window.customElements.define("sub-header",Ea));let La=class DangerDialogFormHelperElement extends HTMLElement{constructor(){super(...arguments),Aa.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,Aa,"m",ka).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"})}}};Aa=new WeakSet,ka=function(){this.toggle()},g([F],La.prototype,"checkbox",void 0),g([F],La.prototype,"liveRegion",void 0),g([I],La.prototype,"confirmationLiveMessageChecked",void 0),g([I],La.prototype,"confirmationLiveMessageUnchecked",void 0),La=g([q],La),window.customElements.get("danger-dialog-form-helper")||(window.DangerDialogFormHelperElement=La,window.customElements.define("danger-dialog-form-helper",La));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([V],CollapsibleElement.prototype,"collapsibleElements",void 0),g([I],CollapsibleElement.prototype,"collapsed",void 0);let Ta=class CollapsibleHeaderElement extends CollapsibleElement{connectedCallback(){if(!this.closest(".Box"))throw new Error("No surrounding BorderBox found")}get baseClass(){return"CollapsibleHeader"}};Ta=g([q],Ta);let Sa=class CollapsibleSectionElement extends CollapsibleElement{get baseClass(){return"CollapsibleSection"}};var Ca,xa,Ma,Ia,Da,Pa,Na,Ha,Oa,Fa,Va,qa,Ra,Wa,Ba,$a,Ua;Sa=g([q],Sa);let Ka=class FilterableTreeViewElement extends HTMLElement{constructor(){super(...arguments),Ca.add(this),xa.set(this,void 0),Ma.set(this,void 0),Ia.set(this,new Map)}connectedCallback(){const{signal:t}=v(this,Ma,new AbortController,"f");this.addEventListener("treeViewNodeChecked",this,{signal:t}),this.addEventListener("itemActivated",this,{signal:t}),this.addEventListener("input",this,{signal:t})}disconnectedCallback(){b(this,Ma,"f").abort()}handleEvent(t){t.target===this.filterModeControl?b(this,Ca,"m",Ha).call(this,t):t.target===this.filterInput?b(this,Ca,"m",Oa).call(this,t):t.target===this.includeSubItemsCheckBox?b(this,Ca,"m",Fa).call(this,t):(t.target instanceof ea||t.target instanceof ba)&&b(this,Ca,"m",Da).call(this,t)}get filterModeControl(){return this.filterModeControlList.closest("segmented-control")}get treeView(){return this.treeViewList.closest("tree-view")}set filterFn(t){v(this,xa,t,"f")}get filterFn(){return b(this,xa,"f")?b(this,xa,"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}};xa=new WeakMap,Ma=new WeakMap,Ia=new WeakMap,Ca=new WeakSet,Da=function(t){const e=t;if("treeViewNodeChecked"===t.type)b(this,Ca,"m",Pa).call(this,e)},Pa=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,Ca,"m",Na).call(this,i):b(this,Ca,"m",qa).call(this,i)},Na=function(t){if(!this.treeView)return;if(!b(this,Ia,"f").has(t))return;const e=b(this,Ia,"f").get(t);for(const[t,i]of e.entries()){let e=t;t instanceof ba&&(e=t.node),this.treeView.setNodeCheckedValue(e,i.checked?"true":"false"),this.treeView.setNodeDisabledValue(e,i.disabled)}b(this,Ia,"f").delete(t)},Ha=function(t){"itemActivated"===t.type&&b(this,Ca,"m",Wa).call(this)},Oa=function(t){"input"===t.type&&b(this,Ca,"m",Wa).call(this)},Fa=function(t){this.treeView&&"input"===t.type&&(b(this,Ca,"m",Wa).call(this),this.includeSubItemsCheckBox.checked?b(this,Ca,"m",Va).call(this):b(this,Ca,"m",Ra).call(this))},Va=function(){if(this.treeView)for(const t of this.treeView.rootSubTreeNodes())for(const e of this.eachShallowestCheckedSubTree(t))b(this,Ca,"m",qa).call(this,e)},qa=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,Ia,"f").set(t,e)},Ra=function(){for(const t of b(this,Ia,"f").keys())b(this,Ca,"m",Na).call(this,t)},Wa=function(){if(!this.treeView)return;b(this,Ca,"m",Ua).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,Ca,"m",Ba).call(this,r))},Ba=function(t){CSS.highlights?CSS.highlights.set("primer-filterable-tree-view-search-results",new Highlight(...t)):b(this,Ca,"m",$a).call(this,t)},$a=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)},Ua=function(){for(const t of this.querySelectorAll("mark"))t.parentElement&&t.parentElement.replaceChildren(t.parentElement.textContent)},g([F],Ka.prototype,"filterInput",void 0),g([F],Ka.prototype,"filterModeControlList",void 0),g([F],Ka.prototype,"treeViewList",void 0),g([F],Ka.prototype,"noResultsMessage",void 0),g([F],Ka.prototype,"includeSubItemsCheckBox",void 0),Ka=g([q],Ka),window.customElements.get("filterable-tree-view")||(window.FilterableTreeViewElement=Ka,window.customElements.define("filterable-tree-view",Ka))}();
|
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 f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.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=f.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 m(t,e,i){const n=t.input;if(!n)return;const s=f.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 N=Symbol.for("catalyst");class H{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,N)){const e=t[N],i=t[N]=new Map;if(e)for(const[t,n]of e)i.set(t,new Set(n))}const i=t[N];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 V(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 q(t){new H(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([q],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 f=0;if(r){let t=s;for(;f<r.length&&_(t,d,c,i);){const s=r[f++];t=s,d=z(i,n,s,o,a,l),d.top-=e.top,d.left-=e.left,h=s}}const m=U[o];let p=0;if(m){let t=o;for(;p<m.length&&Y(t,d,c,i);){const s=m[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&&f<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 ft(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);if(s&&(1===n||"Home"===i||"End"===i))return!0;if(e instanceof HTMLSelectElement){if("ArrowDown"===i&&rt()&&!t.metaKey)return!0;if("ArrowDown"===i&&!rt()&&t.altKey)return!0}if(s){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 mt="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;const a=[],l=new WeakMap,c=null!==(i=null==e?void 0:e.bindKeys)&&void 0!==i?i:((null==e?void 0:e.getNextFocusable)?ct.ArrowAll:ct.ArrowVertical)|ct.HomeAndEnd,d=null!==(n=null==e?void 0:e.focusOutBehavior)&&void 0!==n?n:"stop",h=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",u=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(o=null==e?void 0:e.preventScroll)&&void 0!==o&&o;function g(){return a[0]}function b(t,e=!1){const i=m;m=t,u?t&&document.activeElement===u?v(i,t,e):w():(i&&i!==t&&l.has(i)&&i.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,i,n=!1){i.id||i.setAttribute("id","__primer_id_"+at++),e&&e!==i&&e.removeAttribute(mt),u&&(n||u.getAttribute("aria-activedescendant")!==i.id)&&(u.setAttribute("aria-activedescendant",i.id),t.setAttribute(bt,i.id),i.setAttribute(mt,n?pt:gt),null==f||f(i,e,n))}function w(e=m){"first"===h&&(m=void 0),null==u||u.removeAttribute("aria-activedescendant"),t.removeAttribute(bt),null==e||e.removeAttribute(mt);for(const e of t.querySelectorAll(`[${mt}]`))null==e||e.removeAttribute(mt);null==f||f(void 0,e,!1)}function y(...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){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let i=0,n=a.length-1;for(;i<=n;){const t=Math.floor((i+n)/2);E(e,a[t])?n=t-1:i=t+1}return i}(i),0,...i);for(const t of i)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const i=l.get(e);if(void 0!==i&&(null===i?e.removeAttribute("tabindex"):e.setAttribute("tabindex",i),l.delete(e)),e===m){b(g())}}}const k={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};y(...Z(t,k));b("function"==typeof h?h(document.body):g());new MutationObserver((t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&A(...Z(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&A(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&y(...Z(t,k));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&y(e.target)}})).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const L=new AbortController,T=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:L.signal;let C;T.addEventListener("abort",(()=>{A(...a)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(C=a.indexOf(t.target))}),{signal:T}),u?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(u.focus({preventScroll:p}),b(t.target))}),{signal:T}),t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=a.find((e=>e.contains(t)));e&&b(e)}),{signal:T,capture:!0}),u.addEventListener("focusin",(()=>{m?v(void 0,m):b(g())}),{signal:T}),u.addEventListener("focusout",(()=>{w()}),{signal:T})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==C)C>=0&&a[C]!==m&&b(a[C]),C=void 0;else if("previous"===h)b(e.target);else if("closest"===h||"first"===h){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===x?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof h)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=h(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);x=void 0}),{signal:T});const S=null!=u?u:t;let x;return"closest"===h&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(x=ut(t))}),{signal:T,capture:!0}),S.addEventListener("keydown",(i=>{var n;if(i.key in ht){const s=dt[i.key];if(!i.defaultPrevented&&(s&c)>0&&!ft(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(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let n=e;"previous"===s?n-=1:"start"===s?n=0:"next"===s?n+=1:n=a.length-1,n<0&&(n="wrap"===d&&"Tab"!==i.key?a.length-1:0),n>=a.length&&(n="wrap"===d&&"Tab"!==i.key?0:a.length-1),e!==n&&(o=a[n])}u?b(o||m,!0):o&&(x=s,o.focus({preventScroll:p})),("Tab"!==i.key||o)&&i.preventDefault()}}}),{signal:T}),L}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([V],Mt.prototype,"items",void 0),g([F],Mt.prototype,"itemContainer",void 0),g([F],Mt.prototype,"moreMenu",void 0),Mt=g([q],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=>qt(t,e))),Pt(t,"change",(e=>qt(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(Vt&&i.ctrlKey){const e=Ft(t,!0);e&&e.focus(),i.preventDefault()}break;case"p":if(Vt&&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",(()=>Nt(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",(()=>Nt(t,this)),{once:!0}):Dt,...Ht(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 Nt(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 Ht(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 Vt=navigator.userAgent.match(/Macintosh/);function qt(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 fe(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 me=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),me.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),fe(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&&me.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=me.get(t);s&&(me.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 Ne=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),He=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(Ne)){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&&He(t.target)===e?s:0;s=n.findIndex(((t,i)=>i>r&&He(t)===e)),s<0&&!i&&(s=n.findIndex((t=>He(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(Ne)},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([q],Fe),window.ScrollableRegionElement=Fe;const Ve=(t,e,i)=>{if(e())i();else{const n=new MutationObserver((()=>{e()&&(i(),n.disconnect())}));n.observe(t,{childList:!0,subtree:!0})}};var qe,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),qe.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,qe,"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,qe,"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,qe,"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,qe=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([V],ei.prototype,"items",void 0),g([F],ei.prototype,"topLevelList",void 0),ei=g([q],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([V],oi.prototype,"focusMarkers",void 0),oi=g([q],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([V],li.prototype,"items",void 0),li=g([q],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,fi,mi,pi,gi,bi,vi,wi,yi;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([q],ci),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=ci,window.customElements.define("toggle-switch",ci));const Ei=(()=>{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)})(),Ai="sr-only",ki=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Li(t){for(const e of xi)e!==t&&(Ei(e)?e.hidePopover():xi.delete(e))}function Ti(){Li()}function Ci(t){setTimeout((()=>{for(const e of xi)Ei(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const Si=new Set,xi=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),di.add(this),hi.set(this,void 0),ui.set(this,"center"),fi.set(this,"outside-bottom"),mi.set(this,!1),pi.set(this,"mouse")}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&&Ei(this)?this.hidePopover():t||Ei(this)||this.showPopover()}get hiddenFromView(){return!Ei(this)}connectedCallback(){if(Si.add(this),b(this,di,"m",vi).call(this),b(this,di,"m",wi).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",gi).call(this,!1),v(this,mi,!0,"f"),b(this,di,"m",bi).call(this)}disconnectedCallback(){Si.delete(this),xi.delete(this),b(this,hi,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Ei(this),i="mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")),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,a=n||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!i||Ei(this)?e&&a&&Ei(this)&&this.hidePopover():(v(this,pi,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,di,"m",gi).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,di,"m",bi).call(this):"id"===t||"data-type"===t?b(this,di,"m",vi).call(this):"data-direction"===t&&b(this,di,"m",wi).call(this))}}var Mi,Ii;hi=new WeakMap,ui=new WeakMap,fi=new WeakMap,mi=new WeakMap,pi=new WeakMap,di=new WeakSet,gi=function(t){t?(xi.add(this),this.classList.remove(Ai),Li(this),b(this,di,"m",yi).call(this)):(xi.delete(this),this.classList.remove(...ki),this.classList.add(Ai))},bi=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",Ti),this.ownerDocument.addEventListener("focusin",Ci),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},vi=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)}},wi=function(){this.classList.remove(...ki);const t=this.direction;"n"===t?(v(this,ui,"center","f"),v(this,fi,"outside-top","f")):"ne"===t?(v(this,ui,"end","f"),v(this,fi,"outside-top","f")):"e"===t?(v(this,ui,"center","f"),v(this,fi,"outside-right","f")):"se"===t?(v(this,ui,"end","f"),v(this,fi,"outside-bottom","f")):"s"===t?(v(this,ui,"center","f"),v(this,fi,"outside-bottom","f")):"sw"===t?(v(this,ui,"start","f"),v(this,fi,"outside-bottom","f")):"w"===t?(v(this,ui,"center","f"),v(this,fi,"outside-left","f")):"nw"===t&&(v(this,ui,"start","f"),v(this,fi,"outside-top","f"))},yi=function(){if(!this.control)return;if(!b(this,mi,"f")||!Ei(this))return;const t=K(this,this.control,{side:b(this,fi,"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 Di=class XBannerElement extends HTMLElement{constructor(){super(...arguments),Mi.add(this)}dismiss(){if("remove"===b(this,Mi,"a",Ii)){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")}};Mi=new WeakSet,Ii=function(){return this.getAttribute("data-dismiss-scheme")},g([F],Di.prototype,"titleText",void 0),Di=g([q],Di),window.customElements.get("x-banner")||(window.XBannerElement=Di,window.customElements.define("x-banner",Di));class Pi{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":Hi(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Hi(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(Oi)[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(Oi)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Oi),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"),Fi(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 Hi(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 Oi(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Fi(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 qi{constructor(t,e,i,n=!1){var s;if(this.container=t,this.input=e,this.results=i,this.combobox=new Pi(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 Ri,Wi,Bi,$i,Ui,Ki=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)},ji=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},zi=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 _i=globalThis.HTMLElement||null;class Yi extends Event{constructor(t,e){var{relatedTarget:i}=e;super(t,zi(e,["relatedTarget"])),this.relatedTarget=i}}const Zi=new WeakMap;let Gi=null;class AutoCompleteElement extends _i{constructor(){super(...arguments),Ri.add(this),Wi.set(this,null),Bi.set(this,null),Ui.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Gi=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Ki(this,Wi,"f"))||void 0===t?void 0:t.isConnected)return Ki(this,Wi,"f");const e=this.getAttribute("for"),i=this.getRootNode();return e&&(i instanceof Document||i instanceof ShadowRoot)?i.getElementById(e):null}set forElement(t){ji(this,Wi,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Ki(this,Bi,"f"))||void 0===t?void 0:t.isConnected)?Ki(this,Bi,"f"):this.querySelector("input")}set inputElement(t){ji(this,Bi,t,"f"),Ki(this,Ri,"m",$i).call(this)}connectedCallback(){this.isConnected&&(Ki(this,Ri,"m",$i).call(this),new MutationObserver((()=>{Zi.get(this)||Ki(this,Ri,"m",$i).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=Zi.get(this);t&&(t.destroy(),Zi.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=Ki(this,Ui,"f"))||void 0===e||e.abort();const{signal:i}=ji(this,Ui,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(Gi){return(await Gi).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=Zi.get(this);if(o)switch(this.forElement===(null===(n=Zi.get(this))||void 0===n?void 0:n.results)&&this.inputElement===(null===(s=Zi.get(this))||void 0===s?void 0:s.input)||Ki(this,Ri,"m",$i).call(this),t){case"open":null===i?o.close():o.open();break;case"value":null!==i&&(o.input.value=i),this.dispatchEvent(new Yi("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}Wi=new WeakMap,Bi=new WeakMap,Ui=new WeakMap,Ri=new WeakSet,$i=function(){var t;null===(t=Zi.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:i}=this;if(!e||!i)return;const n="true"===this.getAttribute("data-autoselect");Zi.set(this,new qi(this,i,e,n)),e.setAttribute("role","listbox")};const Xi="undefined"!=typeof globalThis?globalThis:window;try{Xi.AutocompleteElement=Xi.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(Xi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Ji(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 Qi(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),Ji(i),e.removeChild(i),Promise.resolve()}async function tn(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 Qi(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?Qi(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?Qi(s.href):Ji(s)),n())}}function en(t){const e=t.currentTarget;e instanceof HTMLElement&&tn(e)}function nn(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),tn(e))}}function sn(t){t.currentTarget.addEventListener("keydown",nn)}function on(t){t.currentTarget.removeEventListener("keydown",nn)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",en),this.addEventListener("focus",sn),this.addEventListener("blur",on)}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 rn="undefined"!=typeof globalThis?globalThis:window;try{rn.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(rn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function an(t){t.style.display="inline-block"}function ln(t){t.style.display="none"}const cn=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=cn.get(t),i=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),n="Copied!";e?(clearTimeout(e),cn.delete(t)):(!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(ln(e),an(i))}(t),i&&(i.textContent===n?i.textContent=`${n} `:i.textContent=n)),cn.set(t,setTimeout((()=>{!function(t){const[e,i]=t.querySelectorAll(".octicon");e&&i&&(an(e),ln(i))}(t),cn.delete(t)}),2e3))}));var dn,hn=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},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)};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)}},mn=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],pn={minimumIntegerDigits:2};class gn{constructor(t,e={}){dn.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;hn(this,dn,{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 un(this,dn,"f")}formatToParts(t){const e=[],i=un(this,dn,"f"),n=i.style,s=i.locale;for(const[n,o]of mn){const r=t[n];if("auto"===i[`${n}Display`]&&!r)continue;const a=i[n],l="2-digit"===a?pn:"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("")}}dn=new WeakMap;const bn=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,vn=["year","month","week","day","hour","minute","second","millisecond"];class wn{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 wn(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(bn))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*n));return s?new wn(...s):new wn}if("object"==typeof t){const{years:e,months:i,weeks:n,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new wn(e,i,n,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const i=Date.now(),n=Math.abs(yn(i,wn.from(t)).getTime()-i),s=Math.abs(yn(i,wn.from(e)).getTime()-i);return n>s?-1:n<s?1:0}toLocaleString(t,e){return new gn(t,e).format(this)}}function yn(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 En(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(),f=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,f-t.getDate()),l=new Date(e);l.setFullYear(h+n*i),l.setDate(f-a),l.setMonth(u+s*i),l.setDate(f-a+r*i);const c=l.getFullYear()-e.getFullYear(),d=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+d);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,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 wn(n*i,s*i,o*i,r*i,a*i,l*i,c*i,d*i)}var An,kn,Ln,Tn,Cn,Sn,xn,Mn,In,Dn,Pn,Nn,Hn=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)},On=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 Fn=globalThis.HTMLElement||null,Vn=new wn,qn=new wn(0,0,0,0,0,1);class Rn 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 Wn(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 Bn=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=Wn(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,Wn(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Fn{constructor(){super(...arguments),An.add(this),kn.set(this,!1),Ln.set(this,!1),Cn.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 Hn(this,Nn,"f")}set onRelativeTimeUpdated(t){Hn(this,Nn,"f")&&this.removeEventListener("relative-time-updated",Hn(this,Nn,"f")),On(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,bn.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 vn.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(){Bn.unobserve(this)}attributeChangedCallback(t,e,i){e!==i&&("title"===t&&On(this,kn,null!==i&&(this.date&&Hn(this,An,"m",Sn).call(this,this.date))!==i,"f"),Hn(this,Ln,"f")||"title"===t&&Hn(this,kn,"f")||On(this,Ln,(async()=>{await Promise.resolve(),this.update(),On(this,Ln,!1,"f")})(),"f"))}update(){const t=Hn(this,Cn,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let i=e;const n=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!n)return void(Hn(this,Cn,"f").textContent=t);const s=Date.now();Hn(this,kn,"f")||(i=Hn(this,An,"m",Sn).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 wn;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=vn.indexOf(e)||vn.length;return new wn(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=Hn(this,An,"m",xn).call(this,o);let a=t;a="duration"===r?Hn(this,An,"m",Mn).call(this,o):"relative"===r?Hn(this,An,"m",In).call(this,o):Hn(this,An,"m",Dn).call(this,n),a?Hn(this,An,"m",Pn).call(this,a):this.shadowRoot===Hn(this,Cn,"f")&&this.textContent&&Hn(this,An,"m",Pn).call(this,this.textContent),a===t&&i===e||this.dispatchEvent(new Rn(t,a,e,i)),"relative"===r||"duration"===r?Bn.observe(this):Bn.unobserve(this)}}kn=new WeakMap,Ln=new WeakMap,Cn=new WeakMap,Nn=new WeakMap,An=new WeakSet,Tn=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"}},Sn=function(t){return new Intl.DateTimeFormat(Hn(this,An,"a",Tn),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},xn=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===wn.compare(t,this.threshold))return"relative"}return"datetime"},Mn=function(t){const e=Hn(this,An,"a",Tn),i=this.format,n=this.formatStyle,s=this.tense;let o=Vn;"micro"===i?(t=En(t),o=qn,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=qn)):("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})},In=function(t){const e=new Intl.RelativeTimeFormat(Hn(this,An,"a",Tn),{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=En(t,e);if(i.blank)return[0,"second"];for(const t of vn){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)},Dn=function(t){const e=new Intl.DateTimeFormat(Hn(this,An,"a",Tn),{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()},Pn=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,Hn(this,Cn,"f").replaceChildren(e)}else Hn(this,Cn,"f").textContent=t};const $n="undefined"!=typeof globalThis?globalThis:window;try{$n.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!($n.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Un(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=Un(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=Un(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 Un(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=Un(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 Kn="undefined"!=typeof globalThis?globalThis:window;try{Kn.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Kn.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let jn=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 zn(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([V],jn.prototype,"fields",void 0),jn=g([q],jn),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:jn}),window.customElements.define("primer-multi-input",jn));var _n,Yn,Zn=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)},Gn=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"}(Yn||(Yn={}));const Xn=new WeakMap;class Jn extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class Qn extends Jn{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class ts extends Jn{constructor(){super("complete")}}class es extends Jn{constructor(t){super("success"),this.response=t}}class is extends Qn{constructor(){super("start","Verifying…")}}class ns extends Qn{constructor(t){super("error","Validation failed"),this.response=t}}class ss extends Jn{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),_n.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Zn(this,_n,"f")}set onloadend(t){Zn(this,_n,"f")&&this.removeEventListener("loadend",Zn(this,_n,"f")),Gn(this,_n,"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=zn(as.bind(null,this),300),i={check:e,controller:null};Xn.set(this,i);const n=os.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=Xn.get(this);e&&(Xn.delete(this),t.removeEventListener("input",rs),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 Yn[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 os(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)&&(rs(e),t()))}function rs(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=Xn.get(i);if(!n||"POST"===o&&!s||!r)return;const a=new is;e.dispatchEvent(a),i.required&&e.setCustomValidity(a.message)}async function as(t){const e=t.input;if(!e)return;const i=t.csrfField,n=t.src,s=t.csrf,o=Xn.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 ss(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 es(i.clone()));else{t.validateOnKeystroke=!0;const n=new ns(i.clone());e.dispatchEvent(n),t.required&&e.setCustomValidity(n.message)}o.controller=null,e.dispatchEvent(new ts)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new ts))}}_n=new WeakMap;const ls="undefined"!=typeof globalThis?globalThis:window;try{ls.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(ls.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var cs;let ds=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),cs.set(this,void 0)}connectedCallback(){b(this,cs,"f")?.abort();const{signal:t}=v(this,cs,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})}disconnectedCallback(){b(this,cs,"f")?.abort()}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")}};cs=new WeakMap,g([F],ds.prototype,"inputElement",void 0),g([F],ds.prototype,"validationElement",void 0),g([F],ds.prototype,"validationMessageElement",void 0),g([F],ds.prototype,"validationSuccessIcon",void 0),g([F],ds.prototype,"validationErrorIcon",void 0),g([F],ds.prototype,"leadingVisual",void 0),g([F],ds.prototype,"leadingSpinner",void 0),ds=g([q],ds);let hs=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 us,fs,ms,ps,gs,bs,vs,ws,ys,Es,As,ks,Ls,Ts,Cs,Ss,xs,Ms,Is,Ds,Ps,Ns,Hs,Os,Fs,Vs,qs,Rs,Ws,Bs,$s,Us,Ks;g([F],hs.prototype,"validationElement",void 0),g([F],hs.prototype,"validationMessageElement",void 0),hs=g([q],hs);class js{constructor(){us.add(this),fs.set(this,void 0),v(this,fs,[],"f")}get current(){return b(this,fs,"f")[b(this,fs,"f").length-1]}push(t,e={trapFocus:!0}){const{trapFocus:i}=e;b(this,fs,"f").push({element:t,abortController:b(this,us,"m",ms).call(this,t,i)})}pop(t){if(t)for(;b(this,fs,"f").length>0&&this.current?.element!==t;){const t=b(this,fs,"f").pop();t?.abortController?.abort()}const e=b(this,fs,"f").pop();e?.abortController?.abort()}elementIsMenuItem(t){return b(this,us,"a",ps).includes(t.getAttribute("role")||"")}get isEmpty(){return 0===b(this,fs,"f").length}}fs=new WeakMap,us=new WeakSet,ms=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},ps=function(){return zs.validItemRoles};let zs=Ks=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),gs.add(this),bs.set(this,void 0),vs.set(this,""),ws.set(this,""),ys.set(this,!1),Es.set(this,void 0),As.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,bs,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,gs,"m",Rs).call(this),b(this,gs,"m",Ws).call(this),b(this,gs,"m",Ls).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,gs,"m",qs).call(this)&&this.overlay?.update()};v(this,Es,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"),Ve(this,(()=>Boolean(this.invokerElement)),(()=>b(this,Es,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true");new MutationObserver((()=>b(this,gs,"m",ks).call(this))).observe(this,{childList:!0,subtree:!0}),b(this,gs,"m",ks).call(this),v(this,As,new js,"f")}disconnectedCallback(){b(this,bs,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),i=b(this,gs,"m",xs).call(this,t);if("toggle"===t.type&&t instanceof ToggleEvent)return void b(this,gs,"m",Is).call(this,t);if(e&&"mousedown"===t.type)return void v(this,ys,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return b(this,gs,"m",Ds).call(this,t),void v(this,ys,!1,"f");if("focusout"===t.type){if(b(this,ys,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,gs,"m",Os).call(this)}))}const n=t.target.closest(Ks.menuItemSelectors.join(",")),s=null!==n;if(s&&i){if(b(this,gs,"m",Ts).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,gs,"m",Ps).call(this,t,i)}b(this,gs,"m",Cs).call(this,t)&&(t.preventDefault(),n.click());const i=b(this,gs,"m",$s).call(this,n);return i?(t.preventDefault(),void i.showPopover()):void b(this,gs,"m",Ns).call(this,n)}"include-fragment-replaced"!==t.type?s&&t instanceof KeyboardEvent&&b(this,gs,"m",Ms).call(this,t,n):b(this,gs,"m",Hs).call(this)}get items(){return Array.from(this.querySelectorAll(Ks.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,gs,"m",Ns).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,gs,"m",Ns).call(this,e)}}};bs=new WeakMap,vs=new WeakMap,ws=new WeakMap,ys=new WeakMap,Es=new WeakMap,As=new WeakMap,gs=new WeakSet,ks=function(){let t=1;for(const e of this.querySelectorAll("[role=menu]"))e.setAttribute("data-level",t.toString()),t++},Ls=function(){const{signal:t}=b(this,bs,"f");for(const e of this.querySelectorAll(Ks.validSelectors.join(",")))e.addEventListener("click",b(this,gs,"m",Ts).bind(this),{signal:t}),e.addEventListener("keydown",b(this,gs,"m",Ts).bind(this),{signal:t})},Ts=function(t){if(!b(this,gs,"m",xs).call(this,t))return!1;const e=t.target.closest(Ks.menuItemSelectors.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Cs=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Ss=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)},xs=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,gs,"m",Cs).call(this,t)||b(this,gs,"m",Ss).call(this,t)},Ms=function(t,e){switch(t.key){case"ArrowRight":{const t=b(this,gs,"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()}}},Is=function(t){const e=t.target;if("open"===t.newState){const t=e===this.overlay;b(this,As,"f").push(e,{trapFocus:!t}),window.requestAnimationFrame((()=>{const t=e.querySelector(Ks.menuItemSelectors.join(","));t?.focus()}))}else{b(this,As,"f").pop(e);const t=b(this,gs,"m",Us).call(this,e),i=document.querySelector(":popover-open");t&&!i&&t.focus()}},Ds=function(t){t.preventDefault(),t.stopPropagation(),b(this,gs,"m",qs).call(this)?b(this,gs,"m",Vs).call(this):b(this,gs,"m",Fs).call(this)},Ps=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,gs,"m",qs).call(this)&&b(this,gs,"m",Vs).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})},Ns=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,gs,"m",qs).call(this)&&b(this,gs,"m",Vs).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,gs,"m",Rs).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,gs,"m",Ws).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Hs=function(){b(this,gs,"a",Bs)?.focus(),b(this,gs,"m",Ls).call(this),this.setAttribute("data-ready","true")},Os=function(){b(this,gs,"m",Vs).call(this)},Fs=function(){this.popoverElement?.showPopover()},Vs=function(){this.popoverElement?.hidePopover();for(const t of this.childPopoverElements)t.hidePopover()},qs=function(){return this.popoverElement?.matches(":popover-open")},Rs=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,vs,b(this,vs,"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,vs,"f")},Ws=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,ws,b(this,ws,"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,ws,"f"),i.value=(e.value||e.label||"").trim(),t.append(i)}for(const t of e)t.remove()}},Bs=function(){return this.querySelector(Ks.menuItemSelectors.join(","))},$s=function(t){const e=t.getAttribute("popovertarget");return e?this.querySelector(`[id="${e}"]`):null},Us=function(t){const e=t.getAttribute("anchor");return e?this.querySelector(`[id="${e}"]`):null},zs.validItemRoles=["menuitem","menuitemcheckbox","menuitemradio"],zs.validSelectors=Ks.validItemRoles.map((t=>`[role="${t}"]`)),zs.menuItemSelectors=Ks.validSelectors.map((t=>`:not([hidden]) > ${t}`)),g([F],zs.prototype,"includeFragment",void 0),g([F],zs.prototype,"overlay",void 0),g([F],zs.prototype,"list",void 0),zs=Ks=g([q],zs),window.customElements.get("action-menu")||(window.ActionMenuElement=zs,window.customElements.define("action-menu",zs));const _s="less",Ys="equal",Zs="greater";var Gs,Xs,Js,Qs,to,eo=t=>{throw TypeError(t)},io=(t,e,i)=>e.has(t)||eo("Cannot "+i),no=(t,e,i)=>(io(t,e,"read from private field"),i?i.call(t):e.get(t)),so=(t,e,i)=>e.has(t)?eo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),oo=(t,e,i,n)=>(io(t,e,"write to private field"),e.set(t,i),i),ro=(t,e,i)=>(io(t,e,"access private method"),i);class ao{constructor({compareFn:t}){so(this,Js),so(this,Gs),so(this,Xs),oo(this,Gs,t),oo(this,Xs,[])}insert(t){no(this,Xs).push(t),ro(this,Js,to).call(this)}pop(){const t=no(this,Xs)[0];return no(this,Xs)[no(this,Xs).length-1]&&(no(this,Xs)[0]=no(this,Xs)[no(this,Xs).length-1],no(this,Xs).pop()),ro(this,Js,Qs).call(this),t}peek(){return no(this,Xs)[0]}delete(t){const e=no(this,Xs).indexOf(t);-1!==e&&(vo(no(this,Xs),e,no(this,Xs).length-1),no(this,Xs).pop(),ro(this,Js,Qs).call(this))}clear(){oo(this,Xs,[])}get size(){return no(this,Xs).length}}function lo(t){return 2*t+1}function co(t){return 2*t+2}function ho(t){return Math.floor((t-1)/2)}function uo(t,e){return lo(t)<e}function fo(t,e){return co(t)<e}function mo(t){return t>0}function po(t,e){return t[lo(e)]}function go(t,e){return t[co(e)]}function bo(t,e){return t[ho(e)]}function vo(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}Gs=new WeakMap,Xs=new WeakMap,Js=new WeakSet,Qs=function(){let t=0;for(;uo(t,no(this,Xs).length);){let e=lo(t);if(fo(t,no(this,Xs).length)&&no(this,Gs).call(this,go(no(this,Xs),t),po(no(this,Xs),t))===_s&&(e=co(t)),no(this,Gs).call(this,no(this,Xs)[t],no(this,Xs)[e])===_s)break;vo(no(this,Xs),t,e),t=e}},to=function(){let t=no(this,Xs).length-1;for(;mo(t)&&no(this,Gs).call(this,no(this,Xs)[t],bo(no(this,Xs),t))===_s;)vo(no(this,Xs),t,ho(t)),t=ho(t)};var wo,yo,Eo,Ao,ko=Object.defineProperty,Lo=t=>{throw TypeError(t)},To=(t,e,i)=>((t,e,i)=>e in t?ko(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i)(t,"symbol"!=typeof e?e+"":e,i),Co=(t,e,i)=>e.has(t)||Lo("Cannot "+i),So=(t,e,i)=>(Co(t,e,"read from private field"),i?i.call(t):e.get(t)),xo=(t,e,i)=>e.has(t)?Lo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Mo=(t,e,i,n)=>(Co(t,e,"write to private field"),e.set(t,i),i);wo=Symbol.toStringTag;class Io{constructor(){To(this,wo,"Deferred"),xo(this,yo),xo(this,Eo),xo(this,Ao),Mo(this,yo,new Promise(((t,e)=>{Mo(this,Eo,t),Mo(this,Ao,e)})))}then(t,e){return Promise.prototype.then.apply(So(this,yo),[t,e])}catch(t){return Promise.prototype.catch.apply(So(this,yo),[t])}finally(t){return Promise.prototype.finally.apply(So(this,yo),[t])}resolve(t){So(this,Eo).call(this,t)}reject(t){So(this,Ao).call(this,t)}getPromise(){return So(this,yo)}}yo=new WeakMap,Eo=new WeakMap,Ao=new WeakMap;var Do,Po,No,Ho,Oo,Fo,Vo=t=>{throw TypeError(t)},qo=(t,e,i)=>e.has(t)||Vo("Cannot "+i),Ro=(t,e,i)=>(qo(t,e,"read from private field"),i?i.call(t):e.get(t)),Wo=(t,e,i)=>e.has(t)?Vo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Bo=(t,e,i,n)=>(qo(t,e,"write to private field"),e.set(t,i),i),$o=(t,e,i)=>(qo(t,e,"access private method"),i);class LiveRegionElement extends HTMLElement{constructor(){if(super(),Wo(this,Ho),Wo(this,Do),Wo(this,Po),Wo(this,No),!this.shadowRoot){const t=function(){if(Uo)return Uo;return Uo=document.createElement("template"),Uo.innerHTML=Ko,Uo}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}Bo(this,Do,!1),Bo(this,No,null),Bo(this,Po,new ao({compareFn:jo}))}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 Io,r={deferred:o,politeness:n,contents:t,scheduled:void 0!==i?s+i:s};return Ro(this,Po).insert(r),$o(this,Ho,Oo).call(this),{...o.getPromise(),cancel:()=>{Ro(this,Po).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:zo}}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!==Ro(this,No)&&(clearTimeout(Ro(this,No)),Bo(this,No,null)),Bo(this,Do,!1),Ro(this,Po).clear()}}Do=new WeakMap,Po=new WeakMap,No=new WeakMap,Ho=new WeakSet,Oo=function(){if(Ro(this,Do))return;let t=Ro(this,Po).peek();if(!t)return;null!==Ro(this,No)&&(clearTimeout(Ro(this,No)),Bo(this,No,null));const e=Date.now();if(t.scheduled<=e)return t=Ro(this,Po).pop(),t&&$o(this,Ho,Fo).call(this,t),void $o(this,Ho,Oo).call(this);const i=t.scheduled-e;Bo(this,No,window.setTimeout((()=>{Bo(this,No,null),$o(this,Ho,Oo).call(this)}),i))},Fo=function(t){Bo(this,Do,!0);const{contents:e,deferred:i,politeness:n}=t,s=this.shadowRoot?.getElementById(n);if(!s)throw Bo(this,Do,!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!==Ro(this,No)&&clearTimeout(Ro(this,No)),i.resolve(),this.delay>0?Bo(this,No,window.setTimeout((()=>{Bo(this,No,null),Bo(this,Do,!1),$o(this,Ho,Oo).call(this)}),this.delay)):(Bo(this,No,null),Bo(this,Do,!1),$o(this,Ho,Oo).call(this))};let Uo=null;const Ko='\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 jo(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?Ys:t.scheduled<e.scheduled?_s:Zs:"assertive"===t.politeness&&"assertive"!==e.politeness?_s:"assertive"!==t.politeness&&"assertive"===e.politeness?Zs:Ys}function zo(){}var _o,Yo,Zo,Go,Xo,Jo,Qo,tr,er,ir,nr,sr,or,rr,ar,lr,cr,dr,hr,ur,fr,mr,pr,gr,br,vr,wr,yr,Er,Ar,kr,Lr,Tr,Cr,Sr,xr,Mr,Ir,Dr,Pr;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Nr=['[role="option"]'],Hr=Nr.join(","),Or=Nr.map((t=>`:not([hidden]) > ${t}`)).join(",");var Fr,Vr;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Fr||(Fr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Vr||(Vr={}));const qr=(()=>{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 Rr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),_o.add(this),Yo.set(this,void 0),Zo.set(this,void 0),Go.set(this,""),Xo.set(this,""),Jo.set(this,new Map),Qo.set(this,null),tr.set(this,null),er.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"multiple"===this.selectVariant?"aria-checked":"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,Jo,"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,Zo,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,_o,"m",Sr).call(this),b(this,_o,"m",xr).call(this),b(this,_o,"m",ir).call(this),qr(this),Ve(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),Ve(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,Yo,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,_o,"a",Er)===Fr.LOCAL&&b(this,_o,"m",gr).call(this))}})),"f"),Ve(this,(()=>Boolean(this.dialog)),(()=>{b(this,Yo,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,_o,"a",Er)===Fr.LOCAL&&Ve(this,(()=>this.items.length>0),(()=>{b(this,_o,"m",gr).call(this),b(this,_o,"m",xr).call(this)}))}disconnectedCallback(){b(this,Zo,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,_o,"m",pr).call(this,t);if(t.target===this.remoteInput)return void b(this,_o,"m",fr).call(this,t);const e=this.invokerElement?.contains(t.target),i=this.closeButton?.contains(t.target),n=b(this,_o,"m",rr).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,_o,"m",Lr).call(this,t);if(i&&n)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Or)){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(Or)?.parentElement;if(null!=s&&n){if(b(this,_o,"m",sr).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,_o,"m",Tr).call(this,t,i)}return b(this,_o,"m",or).call(this,t)&&(t.preventDefault(),b(this,_o,"m",Pr).call(this,s)?.click()),void b(this,_o,"m",Cr).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,_o,"m",hr).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(Or)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(Hr)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,_o,"m",Pr).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,_o,"m",Pr).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,_o,"m",Pr).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,_o,"m",Pr).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,_o,"m",Cr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,_o,"m",Cr).call(this,t)}};Yo=new WeakMap,Zo=new WeakMap,Go=new WeakMap,Xo=new WeakMap,Jo=new WeakMap,Qo=new WeakMap,tr=new WeakMap,er=new WeakMap,_o=new WeakSet,ir=function(){const{signal:t}=b(this,Zo,"f");for(const e of this.querySelectorAll(Nr.join(",")))e.addEventListener("click",b(this,_o,"m",sr).bind(this),{signal:t}),e.addEventListener("keydown",b(this,_o,"m",sr).bind(this),{signal:t})},nr=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const i=b(this,_o,"m",Pr).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,_o,"m",Pr).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,_o,"a",Mr)&&b(this,_o,"m",Pr).call(this,b(this,_o,"a",Mr))?.setAttribute("tabindex","0")},sr=function(t){if(!b(this,_o,"m",rr).call(this,t))return!1;const e=t.target.closest(Or);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},or=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},rr=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,_o,"m",or).call(this,t)},ar=function(){for(const t of this.items){const e=b(this,_o,"m",Pr).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");i&&b(this,Jo,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,_o,"m",xr).call(this)},lr=function(t){const e=b(this,_o,"m",Pr).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,Jo,"f").set(i,{value:i,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},cr=function(t){const e=b(this,_o,"m",Pr).call(this,t);if(!e)return;const i=e.getAttribute("data-value");i&&b(this,Jo,"f").delete(i)},dr=function(){b(this,_o,"a",Ar)&&(b(this,Qo,"f")&&clearTimeout(b(this,Qo,"f")),b(this,tr,"f")&&clearTimeout(b(this,tr,"f")),v(this,tr,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,Qo,setTimeout((()=>{b(this,_o,"a",Ar)?.showLeadingSpinner()}),1e3),"f"))},hr=function(t){switch(t.type){case"include-fragment-replaced":b(this,_o,"m",gr).call(this);break;case"loadstart":b(this,_o,"m",ur).call(this,!1);break;case"loadend":b(this,_o,"a",Ar)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,_o,"m",ur).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},ur=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)},fr=function(t){switch(t.type){case"remote-input-success":b(this,_o,"m",wr).call(this),b(this,_o,"m",gr).call(this),b(this,_o,"m",ar).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,_o,"m",vr).call(this,Vr.BODY):b(this,_o,"m",vr).call(this,Vr.BANNER);break;case"loadstart":if(!b(this,_o,"m",kr).call(this)){if(b(this,_o,"m",wr).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,_o,"m",dr).call(this)}break;case"loadend":b(this,_o,"a",Ar)?.hideLeadingSpinner(),b(this,tr,"f")&&clearTimeout(b(this,tr,"f")),b(this,Qo,"f")&&clearTimeout(b(this,Qo,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},mr=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},pr=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,_o,"m",Pr).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,_o,"m",Pr).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,_o,"m",Pr).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,_o,"m",Pr).call(this,e);i&&i.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,_o,"m",kr).call(this)||b(this,_o,"m",dr).call(this),b(this,_o,"a",Er)===Fr.LOCAL||b(this,_o,"a",Er)===Fr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,_o,"m",gr).call(this)}},gr=function(){if(!this.list)return;let t=!1;if(b(this,_o,"m",kr).call(this)){const e=this.filterInputTextField?.value??"",i=this.filterFn||b(this,_o,"m",mr);for(const n of this.items)i(n,e)?(b(this,_o,"m",Dr).call(this,n),t=!0):b(this,_o,"m",Ir).call(this,n)}else t=this.items.length>0;b(this,_o,"m",nr).call(this),b(this,_o,"m",yr).call(this);for(const t of this.items){const e=b(this,_o,"m",Pr).call(this,t);if(!e)continue;const i=e.getAttribute("data-value");b(this,er,"f")?i&&!b(this,Jo,"f").has(i)&&e.setAttribute(this.ariaSelectionType,"false"):i&&!b(this,Jo,"f").has(i)&&this.isItemChecked(t)&&b(this,_o,"m",lr).call(this,t)}v(this,er,!0,"f"),this.noResults&&(b(this,_o,"m",br).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")))},br=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},vr=function(t){let e=this.fragmentErrorElement;t===Vr.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"})},wr=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},yr=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)}}},Er=function(){if(!this.list)return Fr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Fr.LOCAL;case"eventually_local":return Fr.EVENTUALLY_LOCAL;default:return Fr.REMOTE}},Ar=function(){return this.filterInputTextField?.closest("primer-text-field")},kr=function(){return b(this,_o,"a",Er)===Fr.LOCAL||b(this,_o,"a",Er)===Fr.EVENTUALLY_LOCAL},Lr=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},Tr=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})},Cr=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,_o,"m",Pr).call(this,t)?.getAttribute("data-value")}})))return;const n=b(this,_o,"m",Pr).call(this,t);if("single"===this.selectVariant){if(n?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,_o,"m",Pr).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,Jo,"f").clear(),i&&(b(this,_o,"m",lr).call(this,t),n?.setAttribute(this.ariaSelectionType,"true")),b(this,_o,"m",Sr).call(this)}}else n?.setAttribute(this.ariaSelectionType,`${i}`),i?b(this,_o,"m",lr).call(this,t):b(this,_o,"m",cr).call(this,t);b(this,_o,"m",xr).call(this),b(this,_o,"m",nr).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:i,value:b(this,_o,"m",Pr).call(this,t)?.getAttribute("data-value")}}))},Sr=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Go,b(this,Go,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,Go,"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,Go,"f")},xr=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,er,"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,Xo,b(this,Xo,"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,Xo,"f"),n.value=(i.value||i.label||"").trim(),e.append(n)}for(const t of i)t.remove()}},Mr=function(){return this.querySelector(Or)?.parentElement||null},Ir=function(t){t&&t.setAttribute("hidden","hidden")},Dr=function(t){t&&t.removeAttribute("hidden")},Pr=function(t){return t.querySelector(".ActionListContent")},g([F],Rr.prototype,"includeFragment",void 0),g([F],Rr.prototype,"dialog",void 0),g([F],Rr.prototype,"filterInputTextField",void 0),g([F],Rr.prototype,"remoteInput",void 0),g([F],Rr.prototype,"list",void 0),g([F],Rr.prototype,"noResults",void 0),g([F],Rr.prototype,"fragmentErrorElement",void 0),g([F],Rr.prototype,"bannerErrorElement",void 0),g([F],Rr.prototype,"bodySpinner",void 0),g([F],Rr.prototype,"liveRegion",void 0),Rr=g([q],Rr),window.customElements.get("select-panel")||(window.SelectPanelElement=Rr,window.customElements.define("select-panel",Rr));let Wr=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 Br(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 Kr(t)}switch(e.key){case"ArrowUp":return $r(t,"previous");case"ArrowDown":return $r(t,"next");case"Backspace":return Kr(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&&Ur(o,i);)o="next"===e?n.nextNode():n.previousNode();return o instanceof HTMLElement?o:void 0}function Ur(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 Kr(t){const e=t.closest("[role=group]"),i=e?.closest("[role=treeitem]");return i instanceof HTMLElement?i:void 0}var jr,zr,_r,Yr,Zr,Gr,Xr,Jr,Qr,ta,ea,ia;g([F],Wr.prototype,"detailsTarget",void 0),g([F],Wr.prototype,"summaryTarget",void 0),Wr=g([q],Wr),window.DetailsToggleElement=Wr;let na=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),jr.add(this),zr.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,zr,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),Br(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,jr,"m",_r).call(this,t)})).observe(this,{childList:!0,subtree:!0});new MutationObserver((t=>{if(!this.formInputContainer)return;if(!t.some((t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue)))return;const e=[];for(const t 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(t)},s=this.getFormInputValueForNode(t);s&&(n.value=s),i.value=JSON.stringify(n),e.push(i)}this.formInputContainer.replaceChildren(...e)})).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),customElements.whenDefined("tree-view-sub-tree-node").then((()=>{b(this,jr,"m",_r).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,zr,"f").abort()}handleEvent(t){const e=b(this,jr,"m",Zr).call(this,t);e&&b(this,jr,"m",Gr).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");if(!this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[n]})))return;!this.getNodeCheckedValue(e)||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"}};var sa,oa;zr=new WeakMap,jr=new WeakSet,_r=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},Yr=function(t){return"click"===t.type},Zr=function(t){const e=t.target,i=e.closest("[role=treeitem]");return i?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:i:null},Gr=function(t,e){b(this,jr,"m",Xr).call(this,e,t)?b(this,jr,"m",Jr).call(this,e,t):b(this,jr,"m",Qr).call(this,e,t)?this.handleSingleSelection(e,t):b(this,jr,"m",Yr).call(this,e)?b(this,jr,"m",ta).call(this,e,t):"focusin"===e.type?b(this,jr,"m",ea).call(this,t):e instanceof KeyboardEvent&&b(this,jr,"m",ia).call(this,e,t)},Xr=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},Jr=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]})))},Qr=function(t,e){return"click"===t.type&&"single"===this.selectVariant(e)},ta=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)})))},ea=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},ia=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],na.prototype,"formInputContainer",void 0),g([F],na.prototype,"formInputPrototype",void 0),na=g([q],na),window.customElements.get("tree-view")||(window.TreeViewElement=na,window.customElements.define("tree-view",na));let ra=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),sa.add(this)}connectedCallback(){Ve(this,(()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon)),(()=>{this.expanded=this.collapsedIcon.hidden}))}showExpanded(){this.expanded=!0,b(this,sa,"m",oa).call(this)}showCollapsed(){this.expanded=!1,b(this,sa,"m",oa).call(this)}toggle(){this.expanded=!this.expanded,b(this,sa,"m",oa).call(this)}};var aa,la,ca,da,ha,ua,fa,ma,pa,ga,ba,va;sa=new WeakSet,oa=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([F],ra.prototype,"expandedIcon",void 0),g([F],ra.prototype,"collapsedIcon",void 0),ra=g([q],ra),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=ra,window.customElements.define("tree-view-icon-pair",ra));let wa=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),aa.add(this),la.set(this,null),ca.set(this,"success"),da.set(this,void 0),ha.set(this,!1)}connectedCallback(){Ve(this,(()=>Boolean(this.node)&&Boolean(this.subTree)),(()=>{b(this,aa,"m",ba).call(this)}));const{signal:t}=v(this,da,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),Ve(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,aa,"m",fa).call(this,t)}),{signal:t})})),Ve(this,(()=>Boolean(this.retryButton)),(()=>{this.retryButton.addEventListener("click",(t=>{b(this,aa,"m",ma).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,la,"f")&&v(this,la,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,la,"f")}set expanded(t){v(this,la,t,"f"),b(this,aa,"m",ba).call(this)}get loadingState(){return b(this,ca,"f")}set loadingState(t){v(this,ca,t,"f"),b(this,aa,"m",ba).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,da,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,aa,"m",ua).call(this,t):t.target===this.includeFragment?b(this,aa,"m",fa).call(this,t):t instanceof KeyboardEvent?b(this,aa,"m",pa).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,aa,"a",va)&&b(this,aa,"m",ga).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)}};la=new WeakMap,ca=new WeakMap,da=new WeakMap,ha=new WeakMap,aa=new WeakSet,ua=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},fa=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,ha,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,ha,"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,ha,!1,"f")}},ma=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},pa=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,aa,"a",va)?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,aa,"a",va)?(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()}},ga=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},ba=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)}},va=function(){return this.querySelector(".TreeViewItemCheckbox")},g([F],wa.prototype,"node",void 0),g([F],wa.prototype,"subTree",void 0),g([F],wa.prototype,"iconPair",void 0),g([F],wa.prototype,"toggleButton",void 0),g([F],wa.prototype,"expandedToggleIcon",void 0),g([F],wa.prototype,"collapsedToggleIcon",void 0),g([F],wa.prototype,"includeFragment",void 0),g([F],wa.prototype,"loadingIndicator",void 0),g([F],wa.prototype,"loadingFailureMessage",void 0),g([F],wa.prototype,"retryButton",void 0),wa=g([q],wa),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=wa,window.customElements.define("tree-view-sub-tree-node",wa));let ya=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})}};ya=g([q],ya),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=ya,window.customElements.define("tree-view-include-fragment",ya));let Ea=class PageHeaderElement extends HTMLElement{menuItemClick(t){const e=t.currentTarget,i=e?.getAttribute("data-for");i&&document.getElementById(i)?.click()}};Ea=g([q],Ea),window.customElements.get("page-header")||(window.PageHeaderElement=Ea,window.customElements.define("page-header",Ea));let Aa=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],Aa.prototype,"button",void 0),Aa=g([q],Aa),window.customElements.get("zen-mode-button")||(window.ZenModeButtonElement=Aa,window.customElements.define("zen-mode-button",Aa));let ka=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 La,Ta;g([F],ka.prototype,"filterInput",void 0),g([V],ka.prototype,"hiddenItemsOnExpandedFilter",void 0),g([V],ka.prototype,"shownItemsOnExpandedFilter",void 0),ka=g([q],ka),window.customElements.get("sub-header")||(window.SubHeaderElement=ka,window.customElements.define("sub-header",ka));let Ca=class DangerDialogFormHelperElement extends HTMLElement{constructor(){super(...arguments),La.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,La,"m",Ta).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"})}}};La=new WeakSet,Ta=function(){this.toggle()},g([F],Ca.prototype,"checkbox",void 0),g([F],Ca.prototype,"liveRegion",void 0),g([I],Ca.prototype,"confirmationLiveMessageChecked",void 0),g([I],Ca.prototype,"confirmationLiveMessageUnchecked",void 0),Ca=g([q],Ca),window.customElements.get("danger-dialog-form-helper")||(window.DangerDialogFormHelperElement=Ca,window.customElements.define("danger-dialog-form-helper",Ca));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([V],CollapsibleElement.prototype,"collapsibleElements",void 0),g([I],CollapsibleElement.prototype,"collapsed",void 0);let Sa=class CollapsibleHeaderElement extends CollapsibleElement{connectedCallback(){if(!this.closest(".Box"))throw new Error("No surrounding BorderBox found")}get baseClass(){return"CollapsibleHeader"}};Sa=g([q],Sa);let xa=class CollapsibleSectionElement extends CollapsibleElement{get baseClass(){return"CollapsibleSection"}};var Ma,Ia,Da,Pa,Na,Ha,Oa,Fa,Va,qa,Ra,Wa,Ba,$a,Ua,Ka,ja;xa=g([q],xa);let za=class FilterableTreeViewElement extends HTMLElement{constructor(){super(...arguments),Ma.add(this),Ia.set(this,void 0),Da.set(this,void 0),Pa.set(this,new Map)}connectedCallback(){const{signal:t}=v(this,Da,new AbortController,"f");this.addEventListener("treeViewNodeChecked",this,{signal:t}),this.addEventListener("itemActivated",this,{signal:t}),this.addEventListener("input",this,{signal:t})}disconnectedCallback(){b(this,Da,"f").abort()}handleEvent(t){t.target===this.filterModeControl?b(this,Ma,"m",Fa).call(this,t):t.target===this.filterInput?b(this,Ma,"m",Va).call(this,t):t.target===this.includeSubItemsCheckBox?b(this,Ma,"m",qa).call(this,t):(t.target instanceof na||t.target instanceof wa)&&b(this,Ma,"m",Na).call(this,t)}get filterModeControl(){return this.filterModeControlList.closest("segmented-control")}get treeView(){return this.treeViewList.closest("tree-view")}set filterFn(t){v(this,Ia,t,"f")}get filterFn(){return b(this,Ia,"f")?b(this,Ia,"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}};Ia=new WeakMap,Da=new WeakMap,Pa=new WeakMap,Ma=new WeakSet,Na=function(t){const e=t;if("treeViewNodeChecked"===t.type)b(this,Ma,"m",Ha).call(this,e)},Ha=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,Ma,"m",Oa).call(this,i):b(this,Ma,"m",Wa).call(this,i)},Oa=function(t){if(!this.treeView)return;if(!b(this,Pa,"f").has(t))return;const e=b(this,Pa,"f").get(t);for(const[t,i]of e.entries()){let e=t;t instanceof wa&&(e=t.node),this.treeView.setNodeCheckedValue(e,i.checked?"true":"false"),this.treeView.setNodeDisabledValue(e,i.disabled)}b(this,Pa,"f").delete(t)},Fa=function(t){"itemActivated"===t.type&&b(this,Ma,"m",$a).call(this)},Va=function(t){"input"===t.type&&b(this,Ma,"m",$a).call(this)},qa=function(t){this.treeView&&"input"===t.type&&(b(this,Ma,"m",$a).call(this),this.includeSubItemsCheckBox.checked?b(this,Ma,"m",Ra).call(this):b(this,Ma,"m",Ba).call(this))},Ra=function(){if(this.treeView)for(const t of this.treeView.rootSubTreeNodes())for(const e of this.eachShallowestCheckedSubTree(t))b(this,Ma,"m",Wa).call(this,e)},Wa=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,Pa,"f").set(t,e)},Ba=function(){for(const t of b(this,Pa,"f").keys())b(this,Ma,"m",Oa).call(this,t)},$a=function(){if(!this.treeView)return;b(this,Ma,"m",ja).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,Ma,"m",Ua).call(this,r))},Ua=function(t){CSS.highlights?CSS.highlights.set("primer-filterable-tree-view-search-results",new Highlight(...t)):b(this,Ma,"m",Ka).call(this,t)},Ka=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)},ja=function(){for(const t of this.querySelectorAll("mark"))t.parentElement&&t.parentElement.replaceChildren(t.parentElement.textContent)},g([F],za.prototype,"filterInput",void 0),g([F],za.prototype,"filterModeControlList",void 0),g([F],za.prototype,"treeViewList",void 0),g([F],za.prototype,"noResultsMessage",void 0),g([F],za.prototype,"includeSubItemsCheckBox",void 0),za=g([q],za),window.customElements.get("filterable-tree-view")||(window.FilterableTreeViewElement=za,window.customElements.define("filterable-tree-view",za))}();
|
2
2
|
//# sourceMappingURL=primer_view_components.js.map
|